raptor-1.4.21/0000755000175000017500000000000011331056235010106 500000000000000raptor-1.4.21/src/0000755000175000017500000000000011331056234010674 500000000000000raptor-1.4.21/src/fix-bison0000644000175000017500000000336411320027207012437 00000000000000#!/usr/bin/perl # # Format output generated by bison # # Usage: # bison -b brql_parser -p brql_parser_ -d -v brql_parser.y # perl fix-bison brql_parser.tab.c > $tmp # mv $tmp brql_parser.tab.c # # Copyright (C) 2004-2006, David Beckett http://www.dajobe.org/ # Copyright (C) 2004, University of Bristol, UK http://www.bristol.ac.uk/ # my $seen_yyerrlab1=0; my $line_offset=1; # #line directives always refer to the NEXT line while(<>) { # HACK: Pass YYPARSE_PARAM* to %destructors s/(yydestruct\s*\()const/$1void *YYPARSE_PARAM, const/; # yydestruct() definition sig 1 if(/(yydestruct\s*\()yymsg(.*)$/) { # yydestruct() defintion sig 2 print "$1YYPARSE_PARAM, yymsg$2\n void *YYPARSE_PARAM;\n"; $line_offset++; # added a line next; } s/(yydestruct\s*\()(".*)$/$1YYPARSE_PARAM, $2/; # yydestruct() calls # Remove code that causes a warning if(/Suppress GCC warning that yyerrlab1/) { do { $_=<>; $line_offset--; # skipped a line } while(!/^\#endif/); $line_offset--; # skipped a line next; } $seen_yyerrlab1=1 if /goto yyerrlab1/; s/^yyerrlab1:// unless $seen_yyerrlab1; # Do not use macro name for a temporary variable s/unsigned int yylineno = /unsigned int yylineno_tmp = /; s/yyrule - 1, yylineno\)/yyrule - 1, yylineno_tmp\)/; # Do not (re)define prototypes that the system did better if(m%^void \*malloc\s*\(%) { $line_offset--; # skipped a line next; } if(m%^void free\s*\(%) { $line_offset--; # skipped a line next; } # Suppress warnings about empty declarations s/(^static int .*_init_globals.*);$/$1/; # Fixup pending filename renaming, see above. # Fix line numbers. my $line=$. +$line_offset; s/^(\#line) \d+ (.*)\.tab\.c/$1 $line $2.c/; print; } raptor-1.4.21/src/raptor_serialize_rdfxml.c0000644000175000017500000006247211330672502015726 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_rdfxml.c - RDF/XML serializer * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * Raptor RDF/XML serializer object */ typedef struct { /* Namespace stack */ raptor_namespace_stack *nstack; /* the xml: namespace - this is destroyed when nstack above is deleted */ raptor_namespace *xml_nspace; /* the rdf: namespace - this is destroyed when nstack above is deleted */ raptor_namespace *rdf_nspace; /* the rdf:RDF element */ raptor_xml_element* rdf_RDF_element; /* where the xml is being written */ raptor_xml_writer *xml_writer; /* User declared namespaces */ raptor_sequence *namespaces; /* URI of rdf:XMLLiteral */ raptor_uri* rdf_xml_literal_uri; /* non zero if rdf:RDF has been written (and thus no new namespaces * can be declared). */ int written_header; } raptor_rdfxml_serializer_context; /* local prototypes */ static void raptor_rdfxml_serialize_terminate(raptor_serializer* serializer); /* create a new serializer */ static int raptor_rdfxml_serialize_init(raptor_serializer* serializer, const char *name) { raptor_rdfxml_serializer_context* context=(raptor_rdfxml_serializer_context*)serializer->context; context->nstack=raptor_new_namespaces_v2(serializer->world, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer, 1); if(!context->nstack) return 1; context->xml_nspace=raptor_new_namespace(context->nstack, (const unsigned char*)"xml", (const unsigned char*)raptor_xml_namespace_uri, 0); context->rdf_nspace=raptor_new_namespace(context->nstack, (const unsigned char*)"rdf", (const unsigned char*)raptor_rdf_namespace_uri, 0); context->namespaces=raptor_new_sequence(NULL, NULL); context->rdf_xml_literal_uri=raptor_new_uri_v2(serializer->world, raptor_xml_literal_datatype_uri_string); if(!context->xml_nspace || !context->rdf_nspace || !context->namespaces || !context->rdf_xml_literal_uri) { raptor_rdfxml_serialize_terminate(serializer); return 1; } /* Note: item 0 in the list is rdf:RDF's namespace */ if(raptor_sequence_push(context->namespaces, context->rdf_nspace)) { raptor_rdfxml_serialize_terminate(serializer); return 1; } return 0; } /* destroy a serializer */ static void raptor_rdfxml_serialize_terminate(raptor_serializer* serializer) { raptor_rdfxml_serializer_context* context=(raptor_rdfxml_serializer_context*)serializer->context; if(context->xml_writer) { raptor_free_xml_writer(context->xml_writer); context->xml_writer=NULL; } if(context->rdf_RDF_element) { raptor_free_xml_element(context->rdf_RDF_element); context->rdf_RDF_element=NULL; } if(context->rdf_nspace) { raptor_free_namespace(context->rdf_nspace); context->rdf_nspace=NULL; } if(context->xml_nspace) { raptor_free_namespace(context->xml_nspace); context->xml_nspace=NULL; } if(context->rdf_xml_literal_uri) { raptor_free_uri_v2(serializer->world, context->rdf_xml_literal_uri); context->rdf_xml_literal_uri=NULL; } if(context->namespaces) { int i; /* Note: item 0 in the list is rdf:RDF's namespace and freed above */ for(i=1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns=(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); if(ns) raptor_free_namespace(ns); } raptor_free_sequence(context->namespaces); context->namespaces=NULL; } if(context->nstack) { raptor_free_namespaces(context->nstack); context->nstack=NULL; } } #define RDFXML_NAMESPACE_DEPTH 0 /* add a namespace */ static int raptor_rdfxml_serialize_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_rdfxml_serializer_context* context=(raptor_rdfxml_serializer_context*)serializer->context; int i; if(context->written_header) return 1; for(i=0; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns=(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); /* If prefix is already declared, ignore it */ if(!ns->prefix && !nspace->prefix) return 1; if(ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) return 1; if(ns->uri && nspace->uri && raptor_uri_equals_v2(serializer->world, ns->uri, nspace->uri)) return 1; } nspace=raptor_new_namespace_from_uri(context->nstack, nspace->prefix, nspace->uri, RDFXML_NAMESPACE_DEPTH); if(!nspace) return 1; raptor_sequence_push(context->namespaces, nspace); return 0; } /* add a namespace */ static int raptor_rdfxml_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { raptor_rdfxml_serializer_context* context=(raptor_rdfxml_serializer_context*)serializer->context; raptor_namespace *ns; int rc; ns=raptor_new_namespace_from_uri(context->nstack, prefix, uri, RDFXML_NAMESPACE_DEPTH); rc=raptor_rdfxml_serialize_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /* start a serialize */ static int raptor_rdfxml_serialize_start(raptor_serializer* serializer) { raptor_rdfxml_serializer_context* context=(raptor_rdfxml_serializer_context*)serializer->context; raptor_xml_writer* xml_writer; if(context->xml_writer) { raptor_free_xml_writer(context->xml_writer); context->xml_writer=NULL; } xml_writer=raptor_new_xml_writer_v2(serializer->world, context->nstack, serializer->iostream, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer, 1); if(!xml_writer) return 1; raptor_xml_writer_set_feature(xml_writer, RAPTOR_FEATURE_WRITER_XML_VERSION, serializer->xml_version); raptor_xml_writer_set_feature(xml_writer, RAPTOR_FEATURE_WRITER_XML_DECLARATION, serializer->feature_write_xml_declaration); context->xml_writer=xml_writer; context->written_header=0; return 0; } static int raptor_rdfxml_ensure_writen_header(raptor_serializer* serializer, raptor_rdfxml_serializer_context* context) { raptor_xml_writer* xml_writer; raptor_uri *base_uri; int i; raptor_qname **attrs=NULL; int attrs_count=0; int rc=1; if(context->written_header) return 0; context->written_header=1; xml_writer=context->xml_writer; base_uri=serializer->base_uri; if(base_uri) base_uri=raptor_uri_copy_v2(serializer->world, base_uri); context->rdf_RDF_element=raptor_new_xml_element_from_namespace_local_name(context->rdf_nspace, (const unsigned char*)"RDF", NULL, base_uri); if(!context->rdf_RDF_element) goto tidy; /* NOTE: Starts it item 1 as item 0 is the element's namespace (rdf) * and does not need to be declared */ for(i=1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns=(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); if(raptor_xml_element_declare_namespace(context->rdf_RDF_element, ns)) goto tidy; } if(base_uri && serializer->feature_write_base_uri) { const unsigned char* base_uri_string; attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname*)); if(!attrs) goto tidy; base_uri_string=raptor_uri_as_string_v2(serializer->world, base_uri); attrs[attrs_count]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->xml_nspace, (const unsigned char*)"base", base_uri_string); if(!attrs[attrs_count]) { RAPTOR_FREE(qnamearray, attrs); goto tidy; } attrs_count++; } if(attrs_count) raptor_xml_element_set_attributes(context->rdf_RDF_element, attrs, attrs_count); else raptor_xml_element_set_attributes(context->rdf_RDF_element, NULL, 0); raptor_xml_writer_start_element(xml_writer, context->rdf_RDF_element); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); rc=0; tidy: if(base_uri) raptor_free_uri_v2(serializer->world, base_uri); return rc; } /* serialize a statement */ static int raptor_rdfxml_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement) { raptor_rdfxml_serializer_context* context=(raptor_rdfxml_serializer_context*)serializer->context; raptor_xml_writer* xml_writer=context->xml_writer; unsigned char* uri_string=NULL; /* predicate URI */ unsigned char ordinal_name[20]; unsigned char* name=NULL; /* where to split predicate name */ unsigned char* subject_uri_string=NULL; unsigned char* object_uri_string=NULL; const unsigned char* nsprefix=(const unsigned char*)"ns0"; int rc=1; size_t len; raptor_xml_element* rdf_Description_element=NULL; raptor_uri* predicate_ns_uri=NULL; raptor_namespace* predicate_ns=NULL; int free_predicate_ns=0; raptor_xml_element* predicate_element=NULL; int end_predicate_element=0; raptor_qname **attrs=NULL; int attrs_count=0; raptor_uri* base_uri=NULL; raptor_identifier_type object_type; int allocated=1; if(raptor_rdfxml_ensure_writen_header(serializer, context)) return 1; if(statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { predicate_ns=context->rdf_nspace; sprintf((char*)ordinal_name, "_%d", *((int*)statement->predicate)); name=ordinal_name; } else if((statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_PREDICATE) || (statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE)) { unsigned char *p; size_t uri_len; size_t name_len=1; unsigned char c; /* Do not use raptor_uri_as_counted_string() - we want a modifiable copy */ uri_string=raptor_uri_to_counted_string_v2(serializer->world, (raptor_uri*)statement->predicate, &uri_len); if(!uri_string) goto oom; p= uri_string; name_len=uri_len; /* FIXME: this loop could be made smarter */ while(name_len >0) { if(raptor_xml_name_check(p, name_len, 10)) { name=p; break; } p++; name_len--; } if(!name || (name == uri_string)) { raptor_serializer_error(serializer, "Cannot split predicate URI %s into an XML qname - skipping statement", uri_string); rc=0; /* skip but do not return an error */ goto tidy; } c=*name; *name='\0'; predicate_ns_uri=raptor_new_uri_v2(serializer->world, uri_string); if(!predicate_ns_uri) goto oom; *name=c; predicate_ns=raptor_namespaces_find_namespace_by_uri(context->nstack, predicate_ns_uri); if(!predicate_ns) { predicate_ns=raptor_new_namespace_from_uri(context->nstack, nsprefix, predicate_ns_uri, 0); if(!predicate_ns) { raptor_free_uri_v2(serializer->world, predicate_ns_uri); goto oom; } free_predicate_ns=1; } raptor_free_uri_v2(serializer->world, predicate_ns_uri); } else { raptor_serializer_error(serializer, "Cannot serialize a triple with subject node type %d\n", statement->predicate_type); goto tidy; } /* base uri */ if(serializer->base_uri) base_uri=raptor_uri_copy_v2(serializer->world, serializer->base_uri); rdf_Description_element=raptor_new_xml_element_from_namespace_local_name(context->rdf_nspace, (unsigned const char*)"Description", NULL, base_uri); if(!rdf_Description_element) goto oom; attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 3, sizeof(raptor_qname*)); if(!attrs) goto oom; attrs_count=0; /* subject */ switch(statement->subject_type) { case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: attrs[attrs_count]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (const unsigned char*)"nodeID", (unsigned char*)statement->subject); if(!attrs[attrs_count]) goto oom; attrs_count++; break; case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_ORDINAL: allocated=1; if(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { subject_uri_string=(unsigned char*)RAPTOR_MALLOC(cstring, raptor_rdf_namespace_uri_len+13); if(!subject_uri_string) goto oom; sprintf((char*)subject_uri_string, "%s_%d", raptor_rdf_namespace_uri, *((int*)statement->subject)); } else { if(serializer->feature_relative_uris) { subject_uri_string=raptor_uri_to_relative_uri_string_v2(serializer->world, serializer->base_uri, (raptor_uri*)statement->subject); if(!subject_uri_string) goto oom; } else { subject_uri_string=raptor_uri_as_string_v2(serializer->world, (raptor_uri*)statement->subject); allocated=0; } } attrs[attrs_count]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (const unsigned char*)"about", subject_uri_string); if(!attrs[attrs_count]) { if(allocated) RAPTOR_FREE(cstring, subject_uri_string); goto oom; } attrs_count++; if(allocated) RAPTOR_FREE(cstring, subject_uri_string); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: raptor_serializer_error(serializer, "Cannot serialize a triple with a literal subject\n"); break; case RAPTOR_IDENTIFIER_TYPE_PREDICATE: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: raptor_serializer_error(serializer, "Cannot serialize a triple with subject node type %d\n", statement->subject_type); } if(attrs_count) { raptor_xml_element_set_attributes(rdf_Description_element, attrs, attrs_count); attrs=NULL; /* attrs ownership transferred to element */ } raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 2); raptor_xml_writer_start_element(xml_writer, rdf_Description_element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); /* predicate */ predicate_element=raptor_new_xml_element_from_namespace_local_name(predicate_ns, name, NULL, base_uri); if(!predicate_element) goto oom; /* object */ attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 3, sizeof(raptor_qname*)); if(!attrs) goto oom; attrs_count=0; object_type=statement->object_type; switch(object_type) { case RAPTOR_IDENTIFIER_TYPE_LITERAL: if(statement->object_literal_datatype && raptor_uri_equals_v2(serializer->world, statement->object_literal_datatype, context->rdf_xml_literal_uri)) object_type = RAPTOR_IDENTIFIER_TYPE_XML_LITERAL; /* FALLTHROUGH */ case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: if(statement->object_literal_language) { attrs[attrs_count]=raptor_new_qname(context->nstack, (unsigned char*)"xml:lang", (unsigned char*)statement->object_literal_language, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer); if(!attrs[attrs_count]) goto oom; attrs_count++; } len=strlen((const char*)statement->object); if(object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { attrs[attrs_count]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (const unsigned char*)"parseType", (const unsigned char*)"Literal"); if(!attrs[attrs_count]) goto oom; attrs_count++; raptor_xml_element_set_attributes(predicate_element, attrs, attrs_count); attrs=NULL; /* attrs ownership transferred to element */ raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 4); raptor_xml_writer_start_element(xml_writer, predicate_element); end_predicate_element=1; /* Print without escaping XML */ if(len) raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)statement->object, len); } else { if(statement->object_literal_datatype) { attrs[attrs_count]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (const unsigned char*)"datatype", (unsigned char*)raptor_uri_as_string_v2(serializer->world, (raptor_uri*)statement->object_literal_datatype)); if(!attrs[attrs_count]) goto oom; attrs_count++; } raptor_xml_element_set_attributes(predicate_element, attrs, attrs_count); attrs=NULL; /* attrs ownership transferred to element */ raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 4); raptor_xml_writer_start_element(xml_writer, predicate_element); end_predicate_element=1; if(len) raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)statement->object, len); } raptor_xml_writer_end_element(xml_writer, predicate_element); end_predicate_element=0; raptor_free_xml_element(predicate_element); predicate_element=NULL; raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: attrs[attrs_count]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (const unsigned char*)"nodeID", (unsigned char*)statement->object); if(!attrs[attrs_count]) goto oom; attrs_count++; raptor_xml_element_set_attributes(predicate_element, attrs, attrs_count); attrs=NULL; /* attrs ownership transferred to element */ raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 4); raptor_xml_writer_empty_element(xml_writer, predicate_element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); break; case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_ORDINAL: allocated=1; if(object_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { object_uri_string=(unsigned char*)RAPTOR_MALLOC(cstring, raptor_rdf_namespace_uri_len+13); if(!object_uri_string) goto oom; sprintf((char*)object_uri_string, "%s_%d", raptor_rdf_namespace_uri, *((int*)statement->object)); } else { /* must be URI */ if(serializer->feature_relative_uris) { object_uri_string=raptor_uri_to_relative_uri_string_v2(serializer->world, serializer->base_uri, (raptor_uri*)statement->object); if(!object_uri_string) goto oom; } else { object_uri_string=raptor_uri_to_string_v2(serializer->world, (raptor_uri*)statement->object); allocated=0; } } attrs[attrs_count]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (const unsigned char*)"resource", object_uri_string); if(!attrs[attrs_count]) { if(allocated) RAPTOR_FREE(cstring, object_uri_string); goto oom; } attrs_count++; if(allocated) RAPTOR_FREE(cstring, object_uri_string); raptor_xml_element_set_attributes(predicate_element, attrs, 1); attrs=NULL; /* attrs ownership transferred to element */ raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 4); raptor_xml_writer_empty_element(xml_writer, predicate_element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); break; case RAPTOR_IDENTIFIER_TYPE_PREDICATE: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: raptor_serializer_error(serializer, "Cannot serialize a triple with object node type %d\n", object_type); } raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 2); rc=0; /* success */ goto tidy; oom: raptor_serializer_error(serializer, "Out of memory\n"); tidy: if(attrs) RAPTOR_FREE(qnamearray, attrs); if(predicate_element) { if(end_predicate_element) raptor_xml_writer_end_element(xml_writer, predicate_element); raptor_free_xml_element(predicate_element); } if(rdf_Description_element) { raptor_xml_writer_end_element(xml_writer, rdf_Description_element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); raptor_free_xml_element(rdf_Description_element); } if(base_uri) raptor_free_uri_v2(serializer->world, base_uri); if(free_predicate_ns) raptor_free_namespace(predicate_ns); if(uri_string) RAPTOR_FREE(cstring, uri_string); return rc; } /* end a serialize */ static int raptor_rdfxml_serialize_end(raptor_serializer* serializer) { raptor_rdfxml_serializer_context* context=(raptor_rdfxml_serializer_context*)serializer->context; raptor_xml_writer* xml_writer=context->xml_writer; if(xml_writer) { /* Make sure an empty RDF/XML document is written when 0 triples * were seen */ /* ignore ret value */ raptor_rdfxml_ensure_writen_header(serializer, context); if(context->rdf_RDF_element) { raptor_xml_writer_end_element(xml_writer, context->rdf_RDF_element); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); } raptor_xml_writer_flush(xml_writer); } if(context->rdf_RDF_element) { raptor_free_xml_element(context->rdf_RDF_element); context->rdf_RDF_element=NULL; } return 0; } /* finish the serializer factory */ static void raptor_rdfxml_serialize_finish_factory(raptor_serializer_factory* factory) { } static int raptor_rdfxml_serializer_register_factory(raptor_serializer_factory *factory) { factory->context_length = sizeof(raptor_rdfxml_serializer_context); factory->init = raptor_rdfxml_serialize_init; factory->terminate = raptor_rdfxml_serialize_terminate; factory->declare_namespace = raptor_rdfxml_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_rdfxml_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_rdfxml_serialize_start; factory->serialize_statement = raptor_rdfxml_serialize_statement; factory->serialize_end = raptor_rdfxml_serialize_end; factory->finish_factory = raptor_rdfxml_serialize_finish_factory; return 0; } int raptor_init_serializer_rdfxml(raptor_world* world) { return raptor_serializer_register_factory(world, "rdfxml", "RDF/XML", "application/rdf+xml", NULL, (const unsigned char*)"http://www.w3.org/TR/rdf-syntax-grammar", &raptor_rdfxml_serializer_register_factory); } raptor-1.4.21/src/raptor_librdfa.c0000644000175000017500000002102011330672502013746 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_librdfa.c - Raptor RDFA Parser via librdfa implementation * * Copyright (C) 2008, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #include "rdfa.h" #include "rdfa_utils.h" /* * RDFA parser object */ struct raptor_librdfa_parser_context_s { /* librdfa object */ rdfacontext* context; /* static statement for use in passing to user code */ raptor_statement statement; }; typedef struct raptor_librdfa_parser_context_s raptor_librdfa_parser_context; static int raptor_librdfa_parse_init(raptor_parser* rdf_parser, const char *name) { /*raptor_librdfa_parser_context *librdfa_parser=(raptor_librdfa_parser_context*)rdf_parser->context; */ return 0; } static void raptor_librdfa_parse_terminate(raptor_parser* rdf_parser) { raptor_librdfa_parser_context *librdfa_parser=(raptor_librdfa_parser_context*)rdf_parser->context; if(librdfa_parser->context) { rdfa_parse_end(librdfa_parser->context); rdfa_free_context(librdfa_parser->context); librdfa_parser->context=NULL; } } static void raptor_librdfa_generate_statement(rdftriple* triple, void* callback_data) { raptor_parser* parser=(raptor_parser*)callback_data; raptor_statement *s=&parser->statement; raptor_uri *subject_uri=NULL; raptor_uri *predicate_uri=NULL; raptor_uri *object_uri=NULL; raptor_uri *datatype_uri=NULL; if(!triple->subject || !triple->predicate || !triple->object) { RAPTOR_FATAL1("Triple has NULL parts\n"); rdfa_free_triple(triple); return; } if(triple->object_type == RDF_TYPE_NAMESPACE_PREFIX) { RAPTOR_FATAL1("Triple has namespace object type\n"); rdfa_free_triple(triple); return; } if((triple->subject[0] == '_') && (triple->subject[1] == ':')) { s->subject_type = RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; s->subject= (triple->subject + 2); } else { s->subject_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; subject_uri=raptor_new_uri_v2(parser->world, (const unsigned char*)triple->subject); if(!subject_uri) goto cleanup; s->subject=subject_uri; } predicate_uri=raptor_new_uri_v2(parser->world, (const unsigned char*)triple->predicate); if(!predicate_uri) goto cleanup; s->predicate=predicate_uri; s->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; s->object = triple->object; s->object_literal_datatype=NULL; s->object_literal_language=NULL; if(triple->object_type == RDF_TYPE_IRI) { if((triple->object[0] == '_') && (triple->object[1] == ':')) { s->object_type = RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; s->object = (triple->object + 2); } else { s->object_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; object_uri=raptor_new_uri_v2(parser->world, (const unsigned char*)triple->object); if(!object_uri) goto cleanup; s->object=object_uri; } } else if(triple->object_type == RDF_TYPE_PLAIN_LITERAL) { s->object_type=RAPTOR_IDENTIFIER_TYPE_LITERAL; if(triple->language) s->object_literal_language=(const unsigned char*)triple->language; } else if(triple->object_type == RDF_TYPE_XML_LITERAL) { s->object_type = RAPTOR_IDENTIFIER_TYPE_XML_LITERAL; } else if(triple->object_type == RDF_TYPE_TYPED_LITERAL) { s->object_type=RAPTOR_IDENTIFIER_TYPE_LITERAL; if(triple->language) s->object_literal_language=(const unsigned char*)triple->language; if(triple->datatype) { datatype_uri=raptor_new_uri_v2(parser->world, (const unsigned char*)triple->datatype); if(!datatype_uri) goto cleanup; s->object_literal_datatype=datatype_uri; /* If datatype, no language allowed */ s->object_literal_language=NULL; } } else { RAPTOR_FATAL2("Triple has unknown object type %d\n", s->object_type); goto cleanup; } if(!parser->statement_handler) goto cleanup; /* Generate triple */ (*parser->statement_handler)(parser->user_data, s); cleanup: rdfa_free_triple(triple); if(subject_uri) raptor_free_uri_v2(parser->world, subject_uri); if(predicate_uri) raptor_free_uri_v2(parser->world, predicate_uri); if(object_uri) raptor_free_uri_v2(parser->world, object_uri); if(datatype_uri) raptor_free_uri_v2(parser->world, datatype_uri); } static void raptor_librdfa_sax2_new_namespace_handler(void *user_data, raptor_namespace* nspace) { raptor_parser* rdf_parser; rdf_parser=(raptor_parser*)user_data; raptor_parser_start_namespace(rdf_parser, nspace); } static int raptor_librdfa_parse_start(raptor_parser* rdf_parser) { raptor_locator *locator=&rdf_parser->locator; raptor_librdfa_parser_context *librdfa_parser=(raptor_librdfa_parser_context*)rdf_parser->context; int rc; char* base_uri_string=NULL; locator->line=1; locator->column=0; locator->byte=0; if(rdf_parser->base_uri) base_uri_string=(char*)raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri); if(librdfa_parser->context) rdfa_free_context(librdfa_parser->context); librdfa_parser->context=rdfa_create_context(base_uri_string); if(!librdfa_parser->context) return 1; librdfa_parser->context->namespace_handler=raptor_librdfa_sax2_new_namespace_handler; librdfa_parser->context->namespace_handler_user_data=rdf_parser; librdfa_parser->context->error_handlers=&rdf_parser->error_handlers; librdfa_parser->context->callback_data=rdf_parser; rdfa_set_triple_handler(librdfa_parser->context, raptor_librdfa_generate_statement); rc = rdfa_parse_start(librdfa_parser->context); if(rc != RDFA_PARSE_SUCCESS) return 1; return 0; } static int raptor_librdfa_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { raptor_librdfa_parser_context *librdfa_parser=(raptor_librdfa_parser_context*)rdf_parser->context; int rval=rdfa_parse_chunk(librdfa_parser->context, (char*)s, len, is_end); return rval != RDFA_PARSE_SUCCESS; } static int raptor_librdfa_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score=0; if(identifier) { if(strstr((const char*)identifier, "RDFa")) score=10; } if(buffer && len) { #define HAS_RDFA_1 (raptor_memstr((const char*)buffer, len, "-//W3C//DTD XHTML+RDFa 1.0//EN") != NULL) #define HAS_RDFA_2 (raptor_memstr((const char*)buffer, len, "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd") != NULL) if(HAS_RDFA_1 || HAS_RDFA_2) score=10; } return score; } static int raptor_librdfa_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_librdfa_parser_context); factory->need_base_uri = 0; factory->init = raptor_librdfa_parse_init; factory->terminate = raptor_librdfa_parse_terminate; factory->start = raptor_librdfa_parse_start; factory->chunk = raptor_librdfa_parse_chunk; factory->recognise_syntax = raptor_librdfa_parse_recognise_syntax; rc=raptor_parser_factory_add_uri(factory, (const unsigned char*)"http://www.w3.org/TR/rdfa/"); return rc; } int raptor_init_parser_rdfa(raptor_world* world) { return !raptor_parser_register_factory(world, "rdfa", "RDF/A via librdfa", &raptor_librdfa_parser_register_factory); } raptor-1.4.21/src/n3_parser.c0000644000175000017500000026306411330672550012673 00000000000000 /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse n3_parser_parse #define yylex n3_parser_lex #define yyerror n3_parser_error #define yylval n3_parser_lval #define yychar n3_parser_char #define yydebug n3_parser_debug #define yynerrs n3_parser_nerrs /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ #line 27 "./n3_parser.y" #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #include #define YY_DECL int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t yyscanner) #define YY_NO_UNISTD_H 1 #include #include /* Make verbose error messages for syntax errors */ #ifdef RAPTOR_DEBUG #define YYERROR_VERBOSE 1 #endif /* Slow down the grammar operation and watch it work */ #if RAPTOR_DEBUG > 2 #define YYDEBUG 1 #endif /* the lexer does not seem to track this */ #undef RAPTOR_N3_USE_ERROR_COLUMNS /* Prototypes */ int n3_parser_error(void* rdf_parser, const char *msg); /* Missing n3_lexer.c/h prototypes */ int n3_lexer_get_column(yyscan_t yyscanner); /* Not used here */ /* void n3_lexer_set_column(int column_no , yyscan_t yyscanner);*/ /* What the lexer wants */ extern int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t scanner); #define YYLEX_PARAM ((raptor_n3_parser*)(((raptor_parser*)rdf_parser)->context))->scanner /* Pure parser argument (a void*) */ #define YYPARSE_PARAM rdf_parser /* Make the yyerror below use the rdf_parser */ #undef yyerror #define yyerror(message) n3_parser_error(rdf_parser, message) /* Make lex/yacc interface as small as possible */ #undef yylex #define yylex n3_lexer_lex static raptor_triple* raptor_n3_new_triple(raptor_identifier *subject, raptor_identifier *predicate, raptor_identifier *object); static void raptor_n3_free_triple(raptor_triple *triple); #ifdef RAPTOR_DEBUG static void raptor_triple_print(raptor_triple *data, FILE *fh); #endif /* Prototypes for local functions */ static void raptor_n3_generate_statement(raptor_parser *parser, raptor_triple *triple); /* Line 189 of yacc.c */ #line 165 "n3_parser.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { A = 258, AT = 259, HAT = 260, DOT = 261, COMMA = 262, SEMICOLON = 263, LEFT_SQUARE = 264, RIGHT_SQUARE = 265, LEFT_ROUND = 266, RIGHT_ROUND = 267, STRING_LITERAL = 268, URI_LITERAL = 269, BLANK_LITERAL = 270, QNAME_LITERAL = 271, PREFIX = 272, IDENTIFIER = 273, INTEGER_LITERAL = 274, FLOATING_LITERAL = 275, DECIMAL_LITERAL = 276, ERROR_TOKEN = 277 }; #endif /* Tokens. */ #define A 258 #define AT 259 #define HAT 260 #define DOT 261 #define COMMA 262 #define SEMICOLON 263 #define LEFT_SQUARE 264 #define RIGHT_SQUARE 265 #define LEFT_ROUND 266 #define RIGHT_ROUND 267 #define STRING_LITERAL 268 #define URI_LITERAL 269 #define BLANK_LITERAL 270 #define QNAME_LITERAL 271 #define PREFIX 272 #define IDENTIFIER 273 #define INTEGER_LITERAL 274 #define FLOATING_LITERAL 275 #define DECIMAL_LITERAL 276 #define ERROR_TOKEN 277 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 214 of yacc.c */ #line 119 "./n3_parser.y" unsigned char *string; raptor_identifier *identifier; raptor_sequence *sequence; raptor_uri *uri; int integer; /* 0+ for a xsd:integer datatyped RDF literal */ double floating; /* Line 214 of yacc.c */ #line 256 "n3_parser.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ #line 268 "n3_parser.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 76 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 23 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 16 /* YYNRULES -- Number of rules. */ #define YYNRULES 40 /* YYNRULES -- Number of states. */ #define YYNSTATES 56 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 277 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 8, 9, 11, 15, 18, 22, 24, 27, 29, 31, 33, 38, 41, 42, 45, 50, 52, 54, 56, 58, 60, 62, 66, 72, 78, 82, 86, 88, 90, 92, 94, 96, 98, 100, 104, 106, 110 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 24, 0, -1, 25, -1, 25, 26, -1, -1, 31, -1, 32, 30, 6, -1, 1, 6, -1, 27, 7, 34, -1, 34, -1, 28, 34, -1, 34, -1, 33, -1, 3, -1, 30, 8, 29, 27, -1, 29, 27, -1, -1, 30, 8, -1, 17, 18, 14, 6, -1, 36, -1, 37, -1, 36, -1, 36, -1, 37, -1, 35, -1, 13, 4, 18, -1, 13, 4, 18, 5, 14, -1, 13, 4, 18, 5, 16, -1, 13, 5, 14, -1, 13, 5, 16, -1, 13, -1, 19, -1, 20, -1, 21, -1, 14, -1, 16, -1, 15, -1, 9, 30, 10, -1, 38, -1, 11, 28, 12, -1, 11, 12, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 186, 186, 189, 190, 193, 194, 243, 247, 287, 331, 371, 415, 425, 443, 515, 556, 562, 573, 614, 618, 625, 632, 636, 640, 653, 663, 677, 691, 705, 718, 728, 746, 755, 771, 784, 801, 815, 880, 887, 988 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "\"a\"", "\"@\"", "\"^\"", "\".\"", "\",\"", "\";\"", "\"[\"", "\"]\"", "\"(\"", "\")\"", "\"string literal\"", "\"URI literal\"", "\"blank node\"", "\"QName\"", "\"@prefix\"", "\"identifier\"", "\"integer literal\"", "\"floating point literal\"", "\"decimal literal\"", "ERROR_TOKEN", "$accept", "Document", "statementList", "statement", "objectList", "itemList", "verb", "propertyList", "directive", "subject", "predicate", "object", "literal", "resource", "blank", "collection", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 23, 24, 25, 25, 26, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 30, 30, 31, 32, 32, 33, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 37, 37, 37, 38, 38 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 2, 0, 1, 3, 2, 3, 1, 2, 1, 1, 1, 4, 2, 0, 2, 4, 1, 1, 1, 1, 1, 1, 3, 5, 5, 3, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 2 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 4, 0, 0, 1, 0, 16, 0, 34, 36, 35, 0, 3, 5, 16, 19, 20, 38, 7, 13, 0, 0, 12, 21, 40, 30, 31, 32, 33, 0, 11, 24, 22, 23, 0, 0, 15, 9, 17, 37, 0, 0, 39, 10, 0, 6, 0, 0, 25, 28, 29, 18, 8, 14, 0, 26, 27 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 1, 2, 11, 35, 28, 19, 20, 12, 13, 21, 36, 30, 31, 32, 16 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -13 static const yytype_int8 yypact[] = { -13, 9, 2, -13, 8, 7, 29, -13, -13, -13, 12, -13, -13, 7, -13, -13, -13, -13, -13, 55, -3, -13, -13, -13, 24, -13, -13, -13, 42, -13, -13, -13, -13, 1, 0, 13, -13, 7, -13, 14, 10, -13, -13, 25, -13, 55, 55, 28, -13, -13, -13, -13, 13, 11, -13, -13 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -13, -13, -13, -13, -12, -13, -2, 33, -13, -13, -13, -6, -13, -1, 35, -13 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -3 static const yytype_int8 yytable[] = { 29, 14, -2, 4, 22, 37, 44, 38, 37, 3, 18, 5, 22, 6, 17, 43, 7, 8, 9, 10, 45, 7, 42, 9, 48, 54, 49, 55, 39, 40, 33, 50, 47, 53, 52, 46, 22, 15, 5, 51, 6, 23, 24, 7, 8, 9, 34, 0, 25, 26, 27, 5, 0, 6, 41, 24, 7, 8, 9, 0, 0, 25, 26, 27, 5, 0, 6, 0, 24, 7, 8, 9, 0, 0, 25, 26, 27 }; static const yytype_int8 yycheck[] = { 6, 2, 0, 1, 5, 8, 6, 10, 8, 0, 3, 9, 13, 11, 6, 14, 14, 15, 16, 17, 7, 14, 28, 16, 14, 14, 16, 16, 4, 5, 18, 6, 18, 5, 46, 37, 37, 2, 9, 45, 11, 12, 13, 14, 15, 16, 13, -1, 19, 20, 21, 9, -1, 11, 12, 13, 14, 15, 16, -1, -1, 19, 20, 21, 9, -1, 11, -1, 13, 14, 15, 16, -1, -1, 19, 20, 21 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 24, 25, 0, 1, 9, 11, 14, 15, 16, 17, 26, 31, 32, 36, 37, 38, 6, 3, 29, 30, 33, 36, 12, 13, 19, 20, 21, 28, 34, 35, 36, 37, 18, 30, 27, 34, 8, 10, 4, 5, 12, 34, 14, 6, 7, 29, 18, 14, 16, 6, 34, 27, 5, 14, 16 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) #else # define YYLEX yylex (&yylval) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (void *YYPARSE_PARAM, const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (YYPARSE_PARAM, yymsg, yytype, yyvaluep) void *YYPARSE_PARAM; const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { case 13: /* "\"string literal\"" */ /* Line 1000 of yacc.c */ #line 163 "./n3_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1219 "n3_parser.c" break; case 14: /* "\"URI literal\"" */ /* Line 1000 of yacc.c */ #line 168 "./n3_parser.y" { /* HACK: fix-bison adds rdf_parser param to yydestruct() */ if((yyvaluep->uri)) raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, (yyvaluep->uri)); }; /* Line 1000 of yacc.c */ #line 1232 "n3_parser.c" break; case 15: /* "\"blank node\"" */ /* Line 1000 of yacc.c */ #line 163 "./n3_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1244 "n3_parser.c" break; case 16: /* "\"QName\"" */ /* Line 1000 of yacc.c */ #line 168 "./n3_parser.y" { /* HACK: fix-bison adds rdf_parser param to yydestruct() */ if((yyvaluep->uri)) raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, (yyvaluep->uri)); }; /* Line 1000 of yacc.c */ #line 1257 "n3_parser.c" break; case 18: /* "\"identifier\"" */ /* Line 1000 of yacc.c */ #line 163 "./n3_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1269 "n3_parser.c" break; case 21: /* "\"decimal literal\"" */ /* Line 1000 of yacc.c */ #line 163 "./n3_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1281 "n3_parser.c" break; case 27: /* "objectList" */ /* Line 1000 of yacc.c */ #line 179 "./n3_parser.y" { if((yyvaluep->sequence)) raptor_free_sequence((yyvaluep->sequence)); }; /* Line 1000 of yacc.c */ #line 1293 "n3_parser.c" break; case 28: /* "itemList" */ /* Line 1000 of yacc.c */ #line 179 "./n3_parser.y" { if((yyvaluep->sequence)) raptor_free_sequence((yyvaluep->sequence)); }; /* Line 1000 of yacc.c */ #line 1305 "n3_parser.c" break; case 29: /* "verb" */ /* Line 1000 of yacc.c */ #line 174 "./n3_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1317 "n3_parser.c" break; case 30: /* "propertyList" */ /* Line 1000 of yacc.c */ #line 179 "./n3_parser.y" { if((yyvaluep->sequence)) raptor_free_sequence((yyvaluep->sequence)); }; /* Line 1000 of yacc.c */ #line 1329 "n3_parser.c" break; case 32: /* "subject" */ /* Line 1000 of yacc.c */ #line 174 "./n3_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1341 "n3_parser.c" break; case 33: /* "predicate" */ /* Line 1000 of yacc.c */ #line 174 "./n3_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1353 "n3_parser.c" break; case 34: /* "object" */ /* Line 1000 of yacc.c */ #line 174 "./n3_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1365 "n3_parser.c" break; case 35: /* "literal" */ /* Line 1000 of yacc.c */ #line 174 "./n3_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1377 "n3_parser.c" break; case 36: /* "resource" */ /* Line 1000 of yacc.c */ #line 174 "./n3_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1389 "n3_parser.c" break; case 37: /* "blank" */ /* Line 1000 of yacc.c */ #line 174 "./n3_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1401 "n3_parser.c" break; case 38: /* "collection" */ /* Line 1000 of yacc.c */ #line 174 "./n3_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1413 "n3_parser.c" break; default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /*-------------------------. | yyparse or yypush_parse. | `-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 6: /* Line 1455 of yacc.c */ #line 195 "./n3_parser.y" { int i; #if RAPTOR_DEBUG > 1 printf("statement 2\n subject="); if((yyvsp[(1) - (3)].identifier)) raptor_identifier_print(stdout, (yyvsp[(1) - (3)].identifier)); else fputs("NULL", stdout); if((yyvsp[(2) - (3)].sequence)) { printf("\n propertyList (reverse order to syntax)="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n"); } else printf("\n and empty propertyList\n"); #endif if((yyvsp[(1) - (3)].identifier) && (yyvsp[(2) - (3)].sequence)) { /* have subject and non-empty property list, handle it */ for(i=0; isubject=i2; t2->subject->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution propertyList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n\n"); #endif for(i=0; i 1 printf("objectList 1\n"); if((yyvsp[(3) - (3)].identifier)) { printf(" object=\n"); raptor_identifier_print(stdout, (yyvsp[(3) - (3)].identifier)); printf("\n"); } else printf(" and empty object\n"); if((yyvsp[(1) - (3)].sequence)) { printf(" objectList="); raptor_sequence_print((yyvsp[(1) - (3)].sequence), stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!(yyvsp[(3) - (3)].identifier)) (yyval.sequence)=NULL; else { triple=raptor_n3_new_triple(NULL, NULL, (yyvsp[(3) - (3)].identifier)); if(!triple) { raptor_free_sequence((yyvsp[(1) - (3)].sequence)); YYERROR; } if(raptor_sequence_push((yyvsp[(1) - (3)].sequence), triple)) { raptor_free_sequence((yyvsp[(1) - (3)].sequence)); YYERROR; } (yyval.sequence)=(yyvsp[(1) - (3)].sequence); #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } break; case 9: /* Line 1455 of yacc.c */ #line 288 "./n3_parser.y" { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 2\n"); if((yyvsp[(1) - (1)].identifier)) { printf(" object=\n"); raptor_identifier_print(stdout, (yyvsp[(1) - (1)].identifier)); printf("\n"); } else printf(" and empty object\n"); #endif if(!(yyvsp[(1) - (1)].identifier)) (yyval.sequence)=NULL; else { triple=raptor_n3_new_triple(NULL, NULL, (yyvsp[(1) - (1)].identifier)); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG (yyval.sequence)=raptor_new_sequence((raptor_sequence_free_handler*)raptor_n3_free_triple, (raptor_sequence_print_handler*)raptor_triple_print); #else (yyval.sequence)=raptor_new_sequence((raptor_sequence_free_handler*)raptor_n3_free_triple, NULL); #endif if(!(yyval.sequence)) { raptor_n3_free_triple(triple); YYERROR; } if(raptor_sequence_push((yyval.sequence), triple)) { raptor_free_sequence((yyval.sequence)); (yyval.sequence)=NULL; YYERROR; } #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } break; case 10: /* Line 1455 of yacc.c */ #line 332 "./n3_parser.y" { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 1\n"); if((yyvsp[(2) - (2)].identifier)) { printf(" object=\n"); raptor_identifier_print(stdout, (yyvsp[(2) - (2)].identifier)); printf("\n"); } else printf(" and empty object\n"); if((yyvsp[(1) - (2)].sequence)) { printf(" objectList="); raptor_sequence_print((yyvsp[(1) - (2)].sequence), stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!(yyvsp[(2) - (2)].identifier)) (yyval.sequence)=NULL; else { triple=raptor_n3_new_triple(NULL, NULL, (yyvsp[(2) - (2)].identifier)); if(!triple) { raptor_free_sequence((yyvsp[(1) - (2)].sequence)); YYERROR; } if(raptor_sequence_push((yyvsp[(1) - (2)].sequence), triple)) { raptor_free_sequence((yyvsp[(1) - (2)].sequence)); YYERROR; } (yyval.sequence)=(yyvsp[(1) - (2)].sequence); #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } break; case 11: /* Line 1455 of yacc.c */ #line 372 "./n3_parser.y" { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 2\n"); if((yyvsp[(1) - (1)].identifier)) { printf(" object=\n"); raptor_identifier_print(stdout, (yyvsp[(1) - (1)].identifier)); printf("\n"); } else printf(" and empty object\n"); #endif if(!(yyvsp[(1) - (1)].identifier)) (yyval.sequence)=NULL; else { triple=raptor_n3_new_triple(NULL, NULL, (yyvsp[(1) - (1)].identifier)); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG (yyval.sequence)=raptor_new_sequence((raptor_sequence_free_handler*)raptor_n3_free_triple, (raptor_sequence_print_handler*)raptor_triple_print); #else (yyval.sequence)=raptor_new_sequence((raptor_sequence_free_handler*)raptor_n3_free_triple, NULL); #endif if(!(yyval.sequence)) { raptor_n3_free_triple(triple); YYERROR; } if(raptor_sequence_push((yyval.sequence), triple)) { raptor_free_sequence((yyval.sequence)); (yyval.sequence)=NULL; YYERROR; } #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } break; case 12: /* Line 1455 of yacc.c */ #line 416 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("verb predicate="); raptor_identifier_print(stdout, (yyvsp[(1) - (1)].identifier)); printf("\n"); #endif (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 13: /* Line 1455 of yacc.c */ #line 426 "./n3_parser.y" { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("verb predicate=rdf:type (a)\n"); #endif uri=raptor_new_uri_for_rdf_concept_v2(((raptor_parser*)rdf_parser)->world, "type"); if(!uri) YYERROR; (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, uri, RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } break; case 14: /* Line 1455 of yacc.c */ #line 444 "./n3_parser.y" { int i; #if RAPTOR_DEBUG > 1 printf("propertyList 1\n verb="); raptor_identifier_print(stdout, (yyvsp[(3) - (4)].identifier)); printf("\n objectList="); raptor_sequence_print((yyvsp[(4) - (4)].sequence), stdout); printf("\n propertyList="); raptor_sequence_print((yyvsp[(1) - (4)].sequence), stdout); printf("\n\n"); #endif if((yyvsp[(4) - (4)].sequence) == NULL) { #if RAPTOR_DEBUG > 1 printf(" empty objectList not processed\n"); #endif } else if((yyvsp[(3) - (4)].identifier) && (yyvsp[(4) - (4)].sequence)) { /* non-empty property list, handle it */ for(i=0; ipredicate=i2; t2->predicate->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[(4) - (4)].sequence), stdout); printf("\n"); #endif } if((yyvsp[(1) - (4)].sequence) == NULL) { #if RAPTOR_DEBUG > 1 printf(" empty propertyList not copied\n\n"); #endif } else if ((yyvsp[(3) - (4)].identifier) && (yyvsp[(4) - (4)].sequence) && (yyvsp[(1) - (4)].sequence)) { while(raptor_sequence_size((yyvsp[(4) - (4)].sequence))) { raptor_triple* t2=(raptor_triple*)raptor_sequence_unshift((yyvsp[(4) - (4)].sequence)); if(raptor_sequence_push((yyvsp[(1) - (4)].sequence), t2)) { raptor_free_sequence((yyvsp[(1) - (4)].sequence)); if((yyvsp[(3) - (4)].identifier)) raptor_free_identifier((yyvsp[(3) - (4)].identifier)); raptor_free_sequence((yyvsp[(4) - (4)].sequence)); YYERROR; } } #if RAPTOR_DEBUG > 1 printf(" after appending objectList (reverse order)="); raptor_sequence_print((yyvsp[(1) - (4)].sequence), stdout); printf("\n\n"); #endif raptor_free_sequence((yyvsp[(4) - (4)].sequence)); } if((yyvsp[(3) - (4)].identifier)) raptor_free_identifier((yyvsp[(3) - (4)].identifier)); (yyval.sequence)=(yyvsp[(1) - (4)].sequence); } break; case 15: /* Line 1455 of yacc.c */ #line 516 "./n3_parser.y" { int i; #if RAPTOR_DEBUG > 1 printf("propertyList 2\n verb="); raptor_identifier_print(stdout, (yyvsp[(1) - (2)].identifier)); if((yyvsp[(2) - (2)].sequence)) { printf("\n objectList="); raptor_sequence_print((yyvsp[(2) - (2)].sequence), stdout); printf("\n"); } else printf("\n and empty objectList\n"); #endif if((yyvsp[(1) - (2)].identifier) && (yyvsp[(2) - (2)].sequence)) { for(i=0; ipredicate=i2; t2->predicate->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[(2) - (2)].sequence), stdout); printf("\n\n"); #endif } if((yyvsp[(1) - (2)].identifier)) raptor_free_identifier((yyvsp[(1) - (2)].identifier)); (yyval.sequence)=(yyvsp[(2) - (2)].sequence); } break; case 16: /* Line 1455 of yacc.c */ #line 556 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("propertyList 4\n empty returning NULL\n\n"); #endif (yyval.sequence)=NULL; } break; case 17: /* Line 1455 of yacc.c */ #line 563 "./n3_parser.y" { (yyval.sequence)=(yyvsp[(1) - (2)].sequence); #if RAPTOR_DEBUG > 1 printf("propertyList 5\n trailing semicolon returning existing list "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } break; case 18: /* Line 1455 of yacc.c */ #line 574 "./n3_parser.y" { unsigned char *prefix=(yyvsp[(2) - (4)].string); raptor_n3_parser* n3_parser=(raptor_n3_parser*)(((raptor_parser*)rdf_parser)->context); raptor_namespace *ns; #if 0 Get around bison complaining about not using (yyvsp[(1) - (4)].string) #endif #if RAPTOR_DEBUG > 1 printf("directive @prefix %s %s\n",((yyvsp[(2) - (4)].string) ? (char*)(yyvsp[(2) - (4)].string) : "(default)"),raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(3) - (4)].uri))); #endif if(prefix) { size_t len=strlen((const char*)prefix); if(prefix[len-1] == ':') { if(len == 1) /* declaring default namespace prefix @prefix : ... */ prefix=NULL; else prefix[len-1]='\0'; } } ns=raptor_new_namespace_from_uri(&n3_parser->namespaces, prefix, (yyvsp[(3) - (4)].uri), 0); if(ns) { raptor_namespaces_start_namespace(&n3_parser->namespaces, ns); raptor_parser_start_namespace((raptor_parser*)rdf_parser, ns); } if((yyvsp[(2) - (4)].string)) RAPTOR_FREE(cstring, (yyvsp[(2) - (4)].string)); raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(3) - (4)].uri)); if(!ns) YYERROR; } break; case 19: /* Line 1455 of yacc.c */ #line 615 "./n3_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 20: /* Line 1455 of yacc.c */ #line 619 "./n3_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 21: /* Line 1455 of yacc.c */ #line 626 "./n3_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 22: /* Line 1455 of yacc.c */ #line 633 "./n3_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 23: /* Line 1455 of yacc.c */ #line 637 "./n3_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 24: /* Line 1455 of yacc.c */ #line 641 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("object literal="); raptor_identifier_print(stdout, (yyvsp[(1) - (1)].identifier)); printf("\n"); #endif (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 25: /* Line 1455 of yacc.c */ #line 654 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + language string=\"%s\"\n", (yyvsp[(1) - (3)].string)); #endif (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (3)].string), NULL, (yyvsp[(3) - (3)].string)); if(!(yyval.identifier)) YYERROR; } break; case 26: /* Line 1455 of yacc.c */ #line 664 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" uri=\"%s\"\n", (yyvsp[(1) - (5)].string), (yyvsp[(3) - (5)].string), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(5) - (5)].uri))); #endif if((yyvsp[(5) - (5)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (5)].string), (yyvsp[(5) - (5)].uri), (yyvsp[(3) - (5)].string)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 27: /* Line 1455 of yacc.c */ #line 678 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" qname URI=<%s>\n", (yyvsp[(1) - (5)].string), (yyvsp[(3) - (5)].string), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(5) - (5)].uri))); #endif if((yyvsp[(5) - (5)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (const unsigned char*)(yyvsp[(1) - (5)].string), (yyvsp[(5) - (5)].uri), (yyvsp[(3) - (5)].string)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 28: /* Line 1455 of yacc.c */ #line 692 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" uri=\"%s\"\n", (yyvsp[(1) - (3)].string), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(3) - (3)].uri))); #endif if((yyvsp[(3) - (3)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].uri), NULL); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 29: /* Line 1455 of yacc.c */ #line 706 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" qname URI=<%s>\n", (yyvsp[(1) - (3)].string), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(3) - (3)].uri))); #endif if((yyvsp[(3) - (3)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].uri), NULL); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 30: /* Line 1455 of yacc.c */ #line 719 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal string=\"%s\"\n", (yyvsp[(1) - (1)].string)); #endif (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (1)].string), NULL, NULL); if(!(yyval.identifier)) YYERROR; } break; case 31: /* Line 1455 of yacc.c */ #line 729 "./n3_parser.y" { unsigned char *string; raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource integer=%d\n", (yyvsp[(1) - (1)].integer)); #endif string=(unsigned char*)RAPTOR_MALLOC(cstring, 32); /* FIXME */ if(!string) YYERROR; sprintf((char*)string, "%d", (yyvsp[(1) - (1)].integer)); uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#integer"); if(!uri) YYERROR; (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, string, uri, NULL); if(!(yyval.identifier)) YYERROR; } break; case 32: /* Line 1455 of yacc.c */ #line 747 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("resource double=%1g\n", (yyvsp[(1) - (1)].floating)); #endif (yyval.identifier)=raptor_new_identifier_from_double(((raptor_parser*)rdf_parser)->world, (yyvsp[(1) - (1)].floating)); if(!(yyval.identifier)) YYERROR; } break; case 33: /* Line 1455 of yacc.c */ #line 756 "./n3_parser.y" { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource decimal=%s\n", (yyvsp[(1) - (1)].string)); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#decimal"); if(!uri) YYERROR; (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (1)].string), uri, NULL); if(!(yyval.identifier)) YYERROR; } break; case 34: /* Line 1455 of yacc.c */ #line 772 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("resource URI=<%s>\n", raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(1) - (1)].uri))); #endif if((yyvsp[(1) - (1)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, (yyvsp[(1) - (1)].uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 35: /* Line 1455 of yacc.c */ #line 785 "./n3_parser.y" { #if RAPTOR_DEBUG > 1 printf("resource qname URI=<%s>\n", raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(1) - (1)].uri))); #endif if((yyvsp[(1) - (1)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, (yyvsp[(1) - (1)].uri), RAPTOR_URI_SOURCE_ELEMENT, NULL, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 36: /* Line 1455 of yacc.c */ #line 802 "./n3_parser.y" { const unsigned char *id; #if RAPTOR_DEBUG > 1 printf("subject blank=\"%s\"\n", (yyvsp[(1) - (1)].string)); #endif id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, (yyvsp[(1) - (1)].string)); if(!id) YYERROR; (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_BLANK_ID, id, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } break; case 37: /* Line 1455 of yacc.c */ #line 816 "./n3_parser.y" { int i; const unsigned char *id; id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!id) { if((yyvsp[(2) - (3)].sequence)) raptor_free_sequence((yyvsp[(2) - (3)].sequence)); YYERROR; } (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_GENERATED, id, NULL, NULL, NULL); if(!(yyval.identifier)) { if((yyvsp[(2) - (3)].sequence)) raptor_free_sequence((yyvsp[(2) - (3)].sequence)); YYERROR; } if((yyvsp[(2) - (3)].sequence) == NULL) { #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_identifier_print(stdout, (yyval.identifier)); printf("\n"); #endif } else { /* non-empty property list, handle it */ #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n"); #endif for(i=0; isubject=i2; t2->subject->is_malloced=1; raptor_n3_generate_statement((raptor_parser*)rdf_parser, t2); } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n\n"); #endif raptor_free_sequence((yyvsp[(2) - (3)].sequence)); } } break; case 38: /* Line 1455 of yacc.c */ #line 881 "./n3_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 39: /* Line 1455 of yacc.c */ #line 888 "./n3_parser.y" { int i; raptor_n3_parser* n3_parser=(raptor_n3_parser*)(((raptor_parser*)rdf_parser)->context); raptor_identifier* first_identifier=NULL; raptor_identifier* rest_identifier=NULL; raptor_identifier* object=NULL; raptor_identifier* blank=NULL; #if RAPTOR_DEBUG > 1 printf("collection\n objectList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n"); #endif first_identifier=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, n3_parser->first_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!first_identifier) goto err_collection; rest_identifier=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, n3_parser->rest_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!rest_identifier) goto err_collection; /* non-empty property list, handle it */ #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n"); #endif object=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, n3_parser->nil_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!object) goto err_collection; for(i=raptor_sequence_size((yyvsp[(2) - (3)].sequence))-1; i>=0; i--) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at((yyvsp[(2) - (3)].sequence), i); const unsigned char *blank_id; raptor_identifier* temp; blank_id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!blank_id) goto err_collection; blank=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_GENERATED, blank_id, NULL, NULL, NULL); if(!blank) goto err_collection; t2->subject=blank; t2->predicate=first_identifier; /* t2->object already set to the value we want */ raptor_n3_generate_statement((raptor_parser*)rdf_parser, t2); temp=t2->object; t2->subject=blank; t2->predicate=rest_identifier; t2->object=object; raptor_n3_generate_statement((raptor_parser*)rdf_parser, t2); raptor_free_identifier(object); t2->subject=NULL; t2->predicate=NULL; t2->object=temp; object=blank; blank=NULL; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n\n"); #endif raptor_free_sequence((yyvsp[(2) - (3)].sequence)); raptor_free_identifier(first_identifier); raptor_free_identifier(rest_identifier); (yyval.identifier)=object; break; /* success */ err_collection: if(blank) raptor_free_identifier(blank); if(object) raptor_free_identifier(object); if(rest_identifier) raptor_free_identifier(rest_identifier); if(first_identifier) raptor_free_identifier(first_identifier); raptor_free_sequence((yyvsp[(2) - (3)].sequence)); YYERROR; } break; case 40: /* Line 1455 of yacc.c */ #line 989 "./n3_parser.y" { raptor_n3_parser* n3_parser=(raptor_n3_parser*)(((raptor_parser*)rdf_parser)->context); #if RAPTOR_DEBUG > 1 printf("collection\n empty\n"); #endif (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, n3_parser->nil_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } break; /* Line 1455 of yacc.c */ #line 2658 "n3_parser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct (YYPARSE_PARAM, "Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct (YYPARSE_PARAM, "Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) yydestruct (YYPARSE_PARAM, "Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct (YYPARSE_PARAM, "Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 1675 of yacc.c */ #line 1003 "./n3_parser.y" /* Support functions */ /* This is declared in n3_lexer.h but never used, so we always get * a warning unless this dummy code is here. Used once below as a return. */ static int yy_init_globals (yyscan_t yyscanner ) { return 0; } /* helper - everything passed in is now owned by triple */ static raptor_triple* raptor_n3_new_triple(raptor_identifier *subject, raptor_identifier *predicate, raptor_identifier *object) { raptor_triple* t; t=(raptor_triple*)RAPTOR_MALLOC(raptor_triple, sizeof(raptor_triple)); if(!t) { if(subject) raptor_free_identifier(subject); if(predicate) raptor_free_identifier(predicate); if(object) raptor_free_identifier(object); return NULL; } t->subject=subject; t->predicate=predicate; t->object=object; return t; } static void raptor_n3_free_triple(raptor_triple *t) { if(t->subject) raptor_free_identifier(t->subject); if(t->predicate) raptor_free_identifier(t->predicate); if(t->object) raptor_free_identifier(t->object); RAPTOR_FREE(raptor_triple, t); } #ifdef RAPTOR_DEBUG static void raptor_triple_print(raptor_triple *t, FILE *fh) { fputs("triple(", fh); raptor_identifier_print(fh, t->subject); fputs(", ", fh); raptor_identifier_print(fh, t->predicate); fputs(", ", fh); raptor_identifier_print(fh, t->object); fputc(')', fh); } #endif int n3_parser_error(void* ctx, const char *msg) { raptor_parser* rdf_parser=(raptor_parser *)ctx; raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; if(n3_parser->error_count++) return 0; rdf_parser->locator.line=n3_parser->lineno; #ifdef RAPTOR_N3_USE_ERROR_COLUMNS rdf_parser->locator.column=n3_lexer_get_column(yyscanner); #endif raptor_parser_simple_error(rdf_parser, "%s", msg); return yy_init_globals(NULL); /* 0 but a way to use yy_init_globals */ } int n3_syntax_error(raptor_parser *rdf_parser, const char *message, ...) { raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; va_list arguments; if(n3_parser->error_count++) return 0; rdf_parser->locator.line=n3_parser->lineno; #ifdef RAPTOR_N3_USE_ERROR_COLUMNS rdf_parser->locator.column=n3_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_error_varargs(((raptor_parser*)rdf_parser), message, arguments); va_end(arguments); return 0; } raptor_uri* n3_qname_to_uri(raptor_parser *rdf_parser, unsigned char *name, size_t name_len) { raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; rdf_parser->locator.line=n3_parser->lineno; #ifdef RAPTOR_N3_USE_ERROR_COLUMNS rdf_parser->locator.column=n3_lexer_get_column(yyscanner); #endif return raptor_qname_string_to_uri(&n3_parser->namespaces, name, name_len, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser); } static int n3_parse(raptor_parser *rdf_parser, const char *string) { raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; void *buffer; if(!string || !*string) return 0; if(n3_lexer_lex_init(&n3_parser->scanner)) return 1; n3_parser->scanner_set=1; n3_lexer_set_extra(rdf_parser, n3_parser->scanner); buffer= n3_lexer__scan_string(string, n3_parser->scanner); n3_parser_parse(rdf_parser); n3_lexer_lex_destroy(n3_parser->scanner); n3_parser->scanner_set=0; return 0; } /** * raptor_n3_parse_init - Initialise the Raptor N3 parser * * Return value: non 0 on failure **/ static int raptor_n3_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; if(raptor_namespaces_init_v2(rdf_parser->world, &n3_parser->namespaces, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser, 0)) return 1; n3_parser->nil_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "nil"); n3_parser->first_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "first"); n3_parser->rest_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "rest"); if(!n3_parser->nil_uri || !n3_parser->first_uri || !n3_parser->rest_uri) return 1; return 0; } /* PUBLIC FUNCTIONS */ /* * raptor_n3_parse_terminate - Free the Raptor N3 parser * @rdf_parser: parser object * **/ static void raptor_n3_parse_terminate(raptor_parser *rdf_parser) { raptor_n3_parser *n3_parser=(raptor_n3_parser*)rdf_parser->context; if(n3_parser->nil_uri) raptor_free_uri_v2(rdf_parser->world, n3_parser->nil_uri); if(n3_parser->first_uri) raptor_free_uri_v2(rdf_parser->world, n3_parser->first_uri); if(n3_parser->rest_uri) raptor_free_uri_v2(rdf_parser->world, n3_parser->rest_uri); raptor_namespaces_clear(&n3_parser->namespaces); if(n3_parser->scanner_set) { n3_lexer_lex_destroy(n3_parser->scanner); n3_parser->scanner_set=0; } if(n3_parser->buffer_length) RAPTOR_FREE(cdata, n3_parser->buffer); } static void raptor_n3_generate_statement(raptor_parser *parser, raptor_triple *t) { /* raptor_n3_parser *n3_parser=(raptor_n3_parser*)parser->context; */ raptor_statement *statement=&parser->statement; if(!t->subject || !t->predicate || !t->object) return; /* Two choices for subject for N3 */ statement->subject_type=t->subject->type; if(t->subject->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { statement->subject=t->subject->id; } else { /* RAPTOR_IDENTIFIER_TYPE_RESOURCE */ RAPTOR_ASSERT(t->subject->type != RAPTOR_IDENTIFIER_TYPE_RESOURCE, "subject type is not resource"); statement->subject=t->subject->uri; } /* Predicates are URIs but check for bad ordinals */ if(!strncmp((const char*)raptor_uri_as_string_v2(parser->world, t->predicate->uri), "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) { unsigned char* predicate_uri_string=raptor_uri_as_string_v2(parser->world, t->predicate->uri); int predicate_ordinal=raptor_check_ordinal(predicate_uri_string+44); if(predicate_ordinal <= 0) raptor_parser_error(parser, "Illegal ordinal value %d in property '%s'.", predicate_ordinal, predicate_uri_string); } statement->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; statement->predicate=t->predicate->uri; /* Three choices for object for N3 */ statement->object_type=t->object->type; statement->object_literal_language=NULL; statement->object_literal_datatype=NULL; if(t->object->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { statement->object=t->object->uri; } else if(t->object->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { statement->object=t->object->id; } else { /* RAPTOR_IDENTIFIER_TYPE_LITERAL */ RAPTOR_ASSERT(t->object->type != RAPTOR_IDENTIFIER_TYPE_LITERAL, "object type is not literal"); statement->object=t->object->literal; statement->object_literal_language=t->object->literal_language; statement->object_literal_datatype=t->object->literal_datatype; if(statement->object_literal_datatype) statement->object_literal_language=NULL; } if(!parser->statement_handler) return; /* Generate the statement */ (*parser->statement_handler)(parser->user_data, statement); } static int raptor_n3_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { char *buffer; char *ptr; raptor_n3_parser *n3_parser=(raptor_n3_parser*)rdf_parser->context; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("adding %d bytes to line buffer\n", (int)len); #endif if(len) { buffer=(char*)RAPTOR_REALLOC(cstring, n3_parser->buffer, n3_parser->buffer_length + len + 1); if(!buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } n3_parser->buffer=buffer; /* move pointer to end of cdata buffer */ ptr=buffer+n3_parser->buffer_length; /* adjust stored length */ n3_parser->buffer_length += len; /* now write new stuff at end of cdata buffer */ strncpy(ptr, (char*)s, len); ptr += len; *ptr = '\0'; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("buffer buffer now '%s' (%d bytes)\n", n3_parser->buffer, n3_parser->buffer_length); #endif } /* if not end, wait for rest of input */ if(!is_end) return 0; /* Nothing to do */ if(!n3_parser->buffer_length) return 0; return n3_parse(rdf_parser, n3_parser->buffer); } static int raptor_n3_parse_start(raptor_parser *rdf_parser) { raptor_locator *locator=&rdf_parser->locator; raptor_n3_parser *n3_parser=(raptor_n3_parser*)rdf_parser->context; /* base URI required for N3 */ if(!rdf_parser->base_uri) return 1; locator->line=1; locator->column= -1; /* No column info */ locator->byte= -1; /* No bytes info */ if(n3_parser->buffer_length) { RAPTOR_FREE(cdata, n3_parser->buffer); n3_parser->buffer=NULL; n3_parser->buffer_length=0; } n3_parser->lineno=1; return 0; } static int raptor_n3_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "n3")) score=8; } if(mime_type) { if(strstr((const char*)mime_type, "n3")) score+=6; } return score; } static int raptor_n3_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_n3_parser); factory->need_base_uri = 1; factory->init = raptor_n3_parse_init; factory->terminate = raptor_n3_parse_terminate; factory->start = raptor_n3_parse_start; factory->chunk = raptor_n3_parse_chunk; factory->recognise_syntax = raptor_n3_parse_recognise_syntax; rc+= raptor_parser_factory_add_mime_type(factory, "text/n3", 6) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/rdf+n3", 6) != 0; return rc; } int raptor_init_parser_n3(raptor_world* world) { return !raptor_parser_register_factory(world, "n3", "Notation 3", &raptor_n3_parser_register_factory); } #ifdef STANDALONE #include #include #define N3_FILE_BUF_SIZE 2048 static void n3_parser_print_statement(void *user, const raptor_statement *statement) { FILE* stream=(FILE*)user; raptor_print_statement(statement, stream); putc('\n', stream); } int main(int argc, char *argv[]) { char string[N3_FILE_BUF_SIZE]; raptor_parser rdf_parser; /* static */ raptor_n3_parser n3_parser; /* static */ raptor_locator *locator=&rdf_parser.locator; FILE *fh; char *filename; int rc; #if RAPTOR_DEBUG > 2 n3_parser_debug=1; #endif if(argc > 1) { filename=argv[1]; fh = fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename=""; fh = stdin; } memset(string, 0, N3_FILE_BUF_SIZE); rc=fread(string, N3_FILE_BUF_SIZE, 1, fh); if(rc < N3_FILE_BUF_SIZE) { if(ferror(fh)) { fprintf(stderr, "%s: file '%s' read failed - %s\n", argv[0], filename, strerror(errno)); fclose(fh); return(1); } } if(argc>1) fclose(fh); raptor_init(); memset(&rdf_parser, 0, sizeof(raptor_parser)); memset(&n3_parser, 0, sizeof(raptor_n3_parser)); locator->line= locator->column = -1; locator->file= filename; n3_parser.lineno= 1; rdf_parser.context=&n3_parser; rdf_parser.base_uri=raptor_new_uri((const unsigned char*)"http://example.org/fake-base-uri/"); raptor_set_statement_handler(&rdf_parser, stdout, n3_parser_print_statement); raptor_n3_parse_init(&rdf_parser, "n3"); n3_parser.error_count=0; n3_parse(&rdf_parser, string); raptor_free_uri(rdf_parser.base_uri); raptor_finish(); return (0); } #endif raptor-1.4.21/src/n3_parser.h0000644000175000017500000000622411330672550012671 00000000000000 /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { A = 258, AT = 259, HAT = 260, DOT = 261, COMMA = 262, SEMICOLON = 263, LEFT_SQUARE = 264, RIGHT_SQUARE = 265, LEFT_ROUND = 266, RIGHT_ROUND = 267, STRING_LITERAL = 268, URI_LITERAL = 269, BLANK_LITERAL = 270, QNAME_LITERAL = 271, PREFIX = 272, IDENTIFIER = 273, INTEGER_LITERAL = 274, FLOATING_LITERAL = 275, DECIMAL_LITERAL = 276, ERROR_TOKEN = 277 }; #endif /* Tokens. */ #define A 258 #define AT 259 #define HAT 260 #define DOT 261 #define COMMA 262 #define SEMICOLON 263 #define LEFT_SQUARE 264 #define RIGHT_SQUARE 265 #define LEFT_ROUND 266 #define RIGHT_ROUND 267 #define STRING_LITERAL 268 #define URI_LITERAL 269 #define BLANK_LITERAL 270 #define QNAME_LITERAL 271 #define PREFIX 272 #define IDENTIFIER 273 #define INTEGER_LITERAL 274 #define FLOATING_LITERAL 275 #define DECIMAL_LITERAL 276 #define ERROR_TOKEN 277 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 1676 of yacc.c */ #line 119 "./n3_parser.y" unsigned char *string; raptor_identifier *identifier; raptor_sequence *sequence; raptor_uri *uri; int integer; /* 0+ for a xsd:integer datatyped RDF literal */ double floating; /* Line 1676 of yacc.c */ #line 107 "n3_parser.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif raptor-1.4.21/src/n3_parser.y0000644000175000017500000010765211330672502012716 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * n3_parser.y - Raptor Notation 3 parser - over tokens from n3 grammar lexer * * Copyright (C) 2003-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * Made from a subset of the terms in * http://www.w3.org/DesignIssues/Notation3.html * */ %{ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #include #define YY_DECL int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t yyscanner) #define YY_NO_UNISTD_H 1 #include #include /* Make verbose error messages for syntax errors */ #ifdef RAPTOR_DEBUG #define YYERROR_VERBOSE 1 #endif /* Slow down the grammar operation and watch it work */ #if RAPTOR_DEBUG > 2 #define YYDEBUG 1 #endif /* the lexer does not seem to track this */ #undef RAPTOR_N3_USE_ERROR_COLUMNS /* Prototypes */ int n3_parser_error(void* rdf_parser, const char *msg); /* Missing n3_lexer.c/h prototypes */ int n3_lexer_get_column(yyscan_t yyscanner); /* Not used here */ /* void n3_lexer_set_column(int column_no , yyscan_t yyscanner);*/ /* What the lexer wants */ extern int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t scanner); #define YYLEX_PARAM ((raptor_n3_parser*)(((raptor_parser*)rdf_parser)->context))->scanner /* Pure parser argument (a void*) */ #define YYPARSE_PARAM rdf_parser /* Make the yyerror below use the rdf_parser */ #undef yyerror #define yyerror(message) n3_parser_error(rdf_parser, message) /* Make lex/yacc interface as small as possible */ #undef yylex #define yylex n3_lexer_lex static raptor_triple* raptor_n3_new_triple(raptor_identifier *subject, raptor_identifier *predicate, raptor_identifier *object); static void raptor_n3_free_triple(raptor_triple *triple); #ifdef RAPTOR_DEBUG static void raptor_triple_print(raptor_triple *data, FILE *fh); #endif /* Prototypes for local functions */ static void raptor_n3_generate_statement(raptor_parser *parser, raptor_triple *triple); %} /* directives */ %pure-parser /* Interface between lexer and parser */ %union { unsigned char *string; raptor_identifier *identifier; raptor_sequence *sequence; raptor_uri *uri; int integer; /* 0+ for a xsd:integer datatyped RDF literal */ double floating; } %expect 0 /* others */ %token A "a" %token AT "@" %token HAT "^" %token DOT "." %token COMMA "," %token SEMICOLON ";" %token LEFT_SQUARE "[" %token RIGHT_SQUARE "]" %token LEFT_ROUND "(" %token RIGHT_ROUND ")" /* literals */ %token STRING_LITERAL "string literal" %token URI_LITERAL "URI literal" %token BLANK_LITERAL "blank node" %token QNAME_LITERAL "QName" %token PREFIX "@prefix" %token IDENTIFIER "identifier" %token INTEGER_LITERAL "integer literal" %token FLOATING_LITERAL "floating point literal" %token DECIMAL_LITERAL "decimal literal" /* syntax error */ %token ERROR_TOKEN %type subject predicate object verb literal resource blank collection %type objectList itemList propertyList /* tidy up tokens after errors */ %destructor { if($$) RAPTOR_FREE(cstring, $$); } STRING_LITERAL BLANK_LITERAL DECIMAL_LITERAL IDENTIFIER %destructor { /* HACK: fix-bison adds rdf_parser param to yydestruct() */ if($$) raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, $$); } URI_LITERAL QNAME_LITERAL %destructor { if($$) raptor_free_identifier($$); } subject predicate object verb literal resource blank collection %destructor { if($$) raptor_free_sequence($$); } objectList itemList propertyList %% Document : statementList ; statementList: statementList statement | /* empty line */ ; statement: directive | subject propertyList DOT { int i; #if RAPTOR_DEBUG > 1 printf("statement 2\n subject="); if($1) raptor_identifier_print(stdout, $1); else fputs("NULL", stdout); if($2) { printf("\n propertyList (reverse order to syntax)="); raptor_sequence_print($2, stdout); printf("\n"); } else printf("\n and empty propertyList\n"); #endif if($1 && $2) { /* have subject and non-empty property list, handle it */ for(i=0; isubject=i2; t2->subject->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution propertyList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif for(i=0; i 1 printf("objectList 1\n"); if($3) { printf(" object=\n"); raptor_identifier_print(stdout, $3); printf("\n"); } else printf(" and empty object\n"); if($1) { printf(" objectList="); raptor_sequence_print($1, stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!$3) $$=NULL; else { triple=raptor_n3_new_triple(NULL, NULL, $3); if(!triple) { raptor_free_sequence($1); YYERROR; } if(raptor_sequence_push($1, triple)) { raptor_free_sequence($1); YYERROR; } $$=$1; #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } | object { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 2\n"); if($1) { printf(" object=\n"); raptor_identifier_print(stdout, $1); printf("\n"); } else printf(" and empty object\n"); #endif if(!$1) $$=NULL; else { triple=raptor_n3_new_triple(NULL, NULL, $1); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG $$=raptor_new_sequence((raptor_sequence_free_handler*)raptor_n3_free_triple, (raptor_sequence_print_handler*)raptor_triple_print); #else $$=raptor_new_sequence((raptor_sequence_free_handler*)raptor_n3_free_triple, NULL); #endif if(!$$) { raptor_n3_free_triple(triple); YYERROR; } if(raptor_sequence_push($$, triple)) { raptor_free_sequence($$); $$=NULL; YYERROR; } #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } ; itemList: itemList object { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 1\n"); if($2) { printf(" object=\n"); raptor_identifier_print(stdout, $2); printf("\n"); } else printf(" and empty object\n"); if($1) { printf(" objectList="); raptor_sequence_print($1, stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!$2) $$=NULL; else { triple=raptor_n3_new_triple(NULL, NULL, $2); if(!triple) { raptor_free_sequence($1); YYERROR; } if(raptor_sequence_push($1, triple)) { raptor_free_sequence($1); YYERROR; } $$=$1; #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } | object { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 2\n"); if($1) { printf(" object=\n"); raptor_identifier_print(stdout, $1); printf("\n"); } else printf(" and empty object\n"); #endif if(!$1) $$=NULL; else { triple=raptor_n3_new_triple(NULL, NULL, $1); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG $$=raptor_new_sequence((raptor_sequence_free_handler*)raptor_n3_free_triple, (raptor_sequence_print_handler*)raptor_triple_print); #else $$=raptor_new_sequence((raptor_sequence_free_handler*)raptor_n3_free_triple, NULL); #endif if(!$$) { raptor_n3_free_triple(triple); YYERROR; } if(raptor_sequence_push($$, triple)) { raptor_free_sequence($$); $$=NULL; YYERROR; } #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } ; verb: predicate { #if RAPTOR_DEBUG > 1 printf("verb predicate="); raptor_identifier_print(stdout, $1); printf("\n"); #endif $$=$1; } | A { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("verb predicate=rdf:type (a)\n"); #endif uri=raptor_new_uri_for_rdf_concept_v2(((raptor_parser*)rdf_parser)->world, "type"); if(!uri) YYERROR; $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, uri, RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!$$) YYERROR; } ; propertyList: propertyList SEMICOLON verb objectList { int i; #if RAPTOR_DEBUG > 1 printf("propertyList 1\n verb="); raptor_identifier_print(stdout, $3); printf("\n objectList="); raptor_sequence_print($4, stdout); printf("\n propertyList="); raptor_sequence_print($1, stdout); printf("\n\n"); #endif if($4 == NULL) { #if RAPTOR_DEBUG > 1 printf(" empty objectList not processed\n"); #endif } else if($3 && $4) { /* non-empty property list, handle it */ for(i=0; ipredicate=i2; t2->predicate->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($4, stdout); printf("\n"); #endif } if($1 == NULL) { #if RAPTOR_DEBUG > 1 printf(" empty propertyList not copied\n\n"); #endif } else if ($3 && $4 && $1) { while(raptor_sequence_size($4)) { raptor_triple* t2=(raptor_triple*)raptor_sequence_unshift($4); if(raptor_sequence_push($1, t2)) { raptor_free_sequence($1); if($3) raptor_free_identifier($3); raptor_free_sequence($4); YYERROR; } } #if RAPTOR_DEBUG > 1 printf(" after appending objectList (reverse order)="); raptor_sequence_print($1, stdout); printf("\n\n"); #endif raptor_free_sequence($4); } if($3) raptor_free_identifier($3); $$=$1; } | verb objectList { int i; #if RAPTOR_DEBUG > 1 printf("propertyList 2\n verb="); raptor_identifier_print(stdout, $1); if($2) { printf("\n objectList="); raptor_sequence_print($2, stdout); printf("\n"); } else printf("\n and empty objectList\n"); #endif if($1 && $2) { for(i=0; ipredicate=i2; t2->predicate->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif } if($1) raptor_free_identifier($1); $$=$2; } | /* empty */ { #if RAPTOR_DEBUG > 1 printf("propertyList 4\n empty returning NULL\n\n"); #endif $$=NULL; } | propertyList SEMICOLON { $$=$1; #if RAPTOR_DEBUG > 1 printf("propertyList 5\n trailing semicolon returning existing list "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } ; directive : PREFIX IDENTIFIER URI_LITERAL DOT { unsigned char *prefix=$2; raptor_n3_parser* n3_parser=(raptor_n3_parser*)(((raptor_parser*)rdf_parser)->context); raptor_namespace *ns; #if 0 Get around bison complaining about not using $1 #endif #if RAPTOR_DEBUG > 1 printf("directive @prefix %s %s\n",($2 ? (char*)$2 : "(default)"),raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $3)); #endif if(prefix) { size_t len=strlen((const char*)prefix); if(prefix[len-1] == ':') { if(len == 1) /* declaring default namespace prefix @prefix : ... */ prefix=NULL; else prefix[len-1]='\0'; } } ns=raptor_new_namespace_from_uri(&n3_parser->namespaces, prefix, $3, 0); if(ns) { raptor_namespaces_start_namespace(&n3_parser->namespaces, ns); raptor_parser_start_namespace((raptor_parser*)rdf_parser, ns); } if($2) RAPTOR_FREE(cstring, $2); raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, $3); if(!ns) YYERROR; } ; subject: resource { $$=$1; } | blank { $$=$1; } ; predicate: resource { $$=$1; } ; object: resource { $$=$1; } | blank { $$=$1; } | literal { #if RAPTOR_DEBUG > 1 printf("object literal="); raptor_identifier_print(stdout, $1); printf("\n"); #endif $$=$1; } ; literal: STRING_LITERAL AT IDENTIFIER { #if RAPTOR_DEBUG > 1 printf("literal + language string=\"%s\"\n", $1); #endif $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, NULL, $3); if(!$$) YYERROR; } | STRING_LITERAL AT IDENTIFIER HAT URI_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" uri=\"%s\"\n", $1, $3, raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $5)); #endif if($5) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, $5, $3); if(!$$) YYERROR; } else $$=NULL; } | STRING_LITERAL AT IDENTIFIER HAT QNAME_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" qname URI=<%s>\n", $1, $3, raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $5)); #endif if($5) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (const unsigned char*)$1, $5, $3); if(!$$) YYERROR; } else $$=NULL; } | STRING_LITERAL HAT URI_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" uri=\"%s\"\n", $1, raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $3)); #endif if($3) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, $3, NULL); if(!$$) YYERROR; } else $$=NULL; } | STRING_LITERAL HAT QNAME_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" qname URI=<%s>\n", $1, raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $3)); #endif if($3) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, $3, NULL); if(!$$) YYERROR; } else $$=NULL; } | STRING_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal string=\"%s\"\n", $1); #endif $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, NULL, NULL); if(!$$) YYERROR; } | INTEGER_LITERAL { unsigned char *string; raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource integer=%d\n", $1); #endif string=(unsigned char*)RAPTOR_MALLOC(cstring, 32); /* FIXME */ if(!string) YYERROR; sprintf((char*)string, "%d", $1); uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#integer"); if(!uri) YYERROR; $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, string, uri, NULL); if(!$$) YYERROR; } | FLOATING_LITERAL { #if RAPTOR_DEBUG > 1 printf("resource double=%1g\n", $1); #endif $$=raptor_new_identifier_from_double(((raptor_parser*)rdf_parser)->world, $1); if(!$$) YYERROR; } | DECIMAL_LITERAL { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource decimal=%s\n", $1); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#decimal"); if(!uri) YYERROR; $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, uri, NULL); if(!$$) YYERROR; } ; resource: URI_LITERAL { #if RAPTOR_DEBUG > 1 printf("resource URI=<%s>\n", raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $1)); #endif if($1) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, $1, RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!$$) YYERROR; } else $$=NULL; } | QNAME_LITERAL { #if RAPTOR_DEBUG > 1 printf("resource qname URI=<%s>\n", raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $1)); #endif if($1) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, $1, RAPTOR_URI_SOURCE_ELEMENT, NULL, NULL, NULL, NULL); if(!$$) YYERROR; } else $$=NULL; } ; blank: BLANK_LITERAL { const unsigned char *id; #if RAPTOR_DEBUG > 1 printf("subject blank=\"%s\"\n", $1); #endif id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, $1); if(!id) YYERROR; $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_BLANK_ID, id, NULL, NULL, NULL); if(!$$) YYERROR; } | LEFT_SQUARE propertyList RIGHT_SQUARE { int i; const unsigned char *id; id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!id) { if($2) raptor_free_sequence($2); YYERROR; } $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_GENERATED, id, NULL, NULL, NULL); if(!$$) { if($2) raptor_free_sequence($2); YYERROR; } if($2 == NULL) { #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_identifier_print(stdout, $$); printf("\n"); #endif } else { /* non-empty property list, handle it */ #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_sequence_print($2, stdout); printf("\n"); #endif for(i=0; isubject=i2; t2->subject->is_malloced=1; raptor_n3_generate_statement((raptor_parser*)rdf_parser, t2); } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif raptor_free_sequence($2); } } | collection { $$=$1; } ; collection: LEFT_ROUND itemList RIGHT_ROUND { int i; raptor_n3_parser* n3_parser=(raptor_n3_parser*)(((raptor_parser*)rdf_parser)->context); raptor_identifier* first_identifier=NULL; raptor_identifier* rest_identifier=NULL; raptor_identifier* object=NULL; raptor_identifier* blank=NULL; #if RAPTOR_DEBUG > 1 printf("collection\n objectList="); raptor_sequence_print($2, stdout); printf("\n"); #endif first_identifier=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, n3_parser->first_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!first_identifier) goto err_collection; rest_identifier=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, n3_parser->rest_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!rest_identifier) goto err_collection; /* non-empty property list, handle it */ #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_sequence_print($2, stdout); printf("\n"); #endif object=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, n3_parser->nil_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!object) goto err_collection; for(i=raptor_sequence_size($2)-1; i>=0; i--) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at($2, i); const unsigned char *blank_id; raptor_identifier* temp; blank_id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!blank_id) goto err_collection; blank=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_GENERATED, blank_id, NULL, NULL, NULL); if(!blank) goto err_collection; t2->subject=blank; t2->predicate=first_identifier; /* t2->object already set to the value we want */ raptor_n3_generate_statement((raptor_parser*)rdf_parser, t2); temp=t2->object; t2->subject=blank; t2->predicate=rest_identifier; t2->object=object; raptor_n3_generate_statement((raptor_parser*)rdf_parser, t2); raptor_free_identifier(object); t2->subject=NULL; t2->predicate=NULL; t2->object=temp; object=blank; blank=NULL; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif raptor_free_sequence($2); raptor_free_identifier(first_identifier); raptor_free_identifier(rest_identifier); $$=object; break; /* success */ err_collection: if(blank) raptor_free_identifier(blank); if(object) raptor_free_identifier(object); if(rest_identifier) raptor_free_identifier(rest_identifier); if(first_identifier) raptor_free_identifier(first_identifier); raptor_free_sequence($2); YYERROR; } | LEFT_ROUND RIGHT_ROUND { raptor_n3_parser* n3_parser=(raptor_n3_parser*)(((raptor_parser*)rdf_parser)->context); #if RAPTOR_DEBUG > 1 printf("collection\n empty\n"); #endif $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, n3_parser->nil_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!$$) YYERROR; } ; %% /* Support functions */ /* This is declared in n3_lexer.h but never used, so we always get * a warning unless this dummy code is here. Used once below as a return. */ static int yy_init_globals (yyscan_t yyscanner ) { return 0; }; /* helper - everything passed in is now owned by triple */ static raptor_triple* raptor_n3_new_triple(raptor_identifier *subject, raptor_identifier *predicate, raptor_identifier *object) { raptor_triple* t; t=(raptor_triple*)RAPTOR_MALLOC(raptor_triple, sizeof(raptor_triple)); if(!t) { if(subject) raptor_free_identifier(subject); if(predicate) raptor_free_identifier(predicate); if(object) raptor_free_identifier(object); return NULL; } t->subject=subject; t->predicate=predicate; t->object=object; return t; } static void raptor_n3_free_triple(raptor_triple *t) { if(t->subject) raptor_free_identifier(t->subject); if(t->predicate) raptor_free_identifier(t->predicate); if(t->object) raptor_free_identifier(t->object); RAPTOR_FREE(raptor_triple, t); } #ifdef RAPTOR_DEBUG static void raptor_triple_print(raptor_triple *t, FILE *fh) { fputs("triple(", fh); raptor_identifier_print(fh, t->subject); fputs(", ", fh); raptor_identifier_print(fh, t->predicate); fputs(", ", fh); raptor_identifier_print(fh, t->object); fputc(')', fh); } #endif int n3_parser_error(void* ctx, const char *msg) { raptor_parser* rdf_parser=(raptor_parser *)ctx; raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; if(n3_parser->error_count++) return 0; rdf_parser->locator.line=n3_parser->lineno; #ifdef RAPTOR_N3_USE_ERROR_COLUMNS rdf_parser->locator.column=n3_lexer_get_column(yyscanner); #endif raptor_parser_simple_error(rdf_parser, "%s", msg); return yy_init_globals(NULL); /* 0 but a way to use yy_init_globals */ } int n3_syntax_error(raptor_parser *rdf_parser, const char *message, ...) { raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; va_list arguments; if(n3_parser->error_count++) return 0; rdf_parser->locator.line=n3_parser->lineno; #ifdef RAPTOR_N3_USE_ERROR_COLUMNS rdf_parser->locator.column=n3_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_error_varargs(((raptor_parser*)rdf_parser), message, arguments); va_end(arguments); return 0; } raptor_uri* n3_qname_to_uri(raptor_parser *rdf_parser, unsigned char *name, size_t name_len) { raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; rdf_parser->locator.line=n3_parser->lineno; #ifdef RAPTOR_N3_USE_ERROR_COLUMNS rdf_parser->locator.column=n3_lexer_get_column(yyscanner); #endif return raptor_qname_string_to_uri(&n3_parser->namespaces, name, name_len, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser); } static int n3_parse(raptor_parser *rdf_parser, const char *string) { raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; void *buffer; if(!string || !*string) return 0; if(n3_lexer_lex_init(&n3_parser->scanner)) return 1; n3_parser->scanner_set=1; n3_lexer_set_extra(rdf_parser, n3_parser->scanner); buffer= n3_lexer__scan_string(string, n3_parser->scanner); n3_parser_parse(rdf_parser); n3_lexer_lex_destroy(n3_parser->scanner); n3_parser->scanner_set=0; return 0; } /** * raptor_n3_parse_init - Initialise the Raptor N3 parser * * Return value: non 0 on failure **/ static int raptor_n3_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; if(raptor_namespaces_init_v2(rdf_parser->world, &n3_parser->namespaces, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser, 0)) return 1; n3_parser->nil_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "nil"); n3_parser->first_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "first"); n3_parser->rest_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "rest"); if(!n3_parser->nil_uri || !n3_parser->first_uri || !n3_parser->rest_uri) return 1; return 0; } /* PUBLIC FUNCTIONS */ /* * raptor_n3_parse_terminate - Free the Raptor N3 parser * @rdf_parser: parser object * **/ static void raptor_n3_parse_terminate(raptor_parser *rdf_parser) { raptor_n3_parser *n3_parser=(raptor_n3_parser*)rdf_parser->context; if(n3_parser->nil_uri) raptor_free_uri_v2(rdf_parser->world, n3_parser->nil_uri); if(n3_parser->first_uri) raptor_free_uri_v2(rdf_parser->world, n3_parser->first_uri); if(n3_parser->rest_uri) raptor_free_uri_v2(rdf_parser->world, n3_parser->rest_uri); raptor_namespaces_clear(&n3_parser->namespaces); if(n3_parser->scanner_set) { n3_lexer_lex_destroy(n3_parser->scanner); n3_parser->scanner_set=0; } if(n3_parser->buffer_length) RAPTOR_FREE(cdata, n3_parser->buffer); } static void raptor_n3_generate_statement(raptor_parser *parser, raptor_triple *t) { /* raptor_n3_parser *n3_parser=(raptor_n3_parser*)parser->context; */ raptor_statement *statement=&parser->statement; if(!t->subject || !t->predicate || !t->object) return; /* Two choices for subject for N3 */ statement->subject_type=t->subject->type; if(t->subject->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { statement->subject=t->subject->id; } else { /* RAPTOR_IDENTIFIER_TYPE_RESOURCE */ RAPTOR_ASSERT(t->subject->type != RAPTOR_IDENTIFIER_TYPE_RESOURCE, "subject type is not resource"); statement->subject=t->subject->uri; } /* Predicates are URIs but check for bad ordinals */ if(!strncmp((const char*)raptor_uri_as_string_v2(parser->world, t->predicate->uri), "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) { unsigned char* predicate_uri_string=raptor_uri_as_string_v2(parser->world, t->predicate->uri); int predicate_ordinal=raptor_check_ordinal(predicate_uri_string+44); if(predicate_ordinal <= 0) raptor_parser_error(parser, "Illegal ordinal value %d in property '%s'.", predicate_ordinal, predicate_uri_string); } statement->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; statement->predicate=t->predicate->uri; /* Three choices for object for N3 */ statement->object_type=t->object->type; statement->object_literal_language=NULL; statement->object_literal_datatype=NULL; if(t->object->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { statement->object=t->object->uri; } else if(t->object->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { statement->object=t->object->id; } else { /* RAPTOR_IDENTIFIER_TYPE_LITERAL */ RAPTOR_ASSERT(t->object->type != RAPTOR_IDENTIFIER_TYPE_LITERAL, "object type is not literal"); statement->object=t->object->literal; statement->object_literal_language=t->object->literal_language; statement->object_literal_datatype=t->object->literal_datatype; if(statement->object_literal_datatype) statement->object_literal_language=NULL; } if(!parser->statement_handler) return; /* Generate the statement */ (*parser->statement_handler)(parser->user_data, statement); } static int raptor_n3_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { char *buffer; char *ptr; raptor_n3_parser *n3_parser=(raptor_n3_parser*)rdf_parser->context; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("adding %d bytes to line buffer\n", (int)len); #endif if(len) { buffer=(char*)RAPTOR_REALLOC(cstring, n3_parser->buffer, n3_parser->buffer_length + len + 1); if(!buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } n3_parser->buffer=buffer; /* move pointer to end of cdata buffer */ ptr=buffer+n3_parser->buffer_length; /* adjust stored length */ n3_parser->buffer_length += len; /* now write new stuff at end of cdata buffer */ strncpy(ptr, (char*)s, len); ptr += len; *ptr = '\0'; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("buffer buffer now '%s' (%d bytes)\n", n3_parser->buffer, n3_parser->buffer_length); #endif } /* if not end, wait for rest of input */ if(!is_end) return 0; /* Nothing to do */ if(!n3_parser->buffer_length) return 0; return n3_parse(rdf_parser, n3_parser->buffer); } static int raptor_n3_parse_start(raptor_parser *rdf_parser) { raptor_locator *locator=&rdf_parser->locator; raptor_n3_parser *n3_parser=(raptor_n3_parser*)rdf_parser->context; /* base URI required for N3 */ if(!rdf_parser->base_uri) return 1; locator->line=1; locator->column= -1; /* No column info */ locator->byte= -1; /* No bytes info */ if(n3_parser->buffer_length) { RAPTOR_FREE(cdata, n3_parser->buffer); n3_parser->buffer=NULL; n3_parser->buffer_length=0; } n3_parser->lineno=1; return 0; } static int raptor_n3_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "n3")) score=8; } if(mime_type) { if(strstr((const char*)mime_type, "n3")) score+=6; } return score; } static int raptor_n3_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_n3_parser); factory->need_base_uri = 1; factory->init = raptor_n3_parse_init; factory->terminate = raptor_n3_parse_terminate; factory->start = raptor_n3_parse_start; factory->chunk = raptor_n3_parse_chunk; factory->recognise_syntax = raptor_n3_parse_recognise_syntax; rc+= raptor_parser_factory_add_mime_type(factory, "text/n3", 6) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/rdf+n3", 6) != 0; return rc; } int raptor_init_parser_n3(raptor_world* world) { return !raptor_parser_register_factory(world, "n3", "Notation 3", &raptor_n3_parser_register_factory); } #ifdef STANDALONE #include #include #define N3_FILE_BUF_SIZE 2048 static void n3_parser_print_statement(void *user, const raptor_statement *statement) { FILE* stream=(FILE*)user; raptor_print_statement(statement, stream); putc('\n', stream); } int main(int argc, char *argv[]) { char string[N3_FILE_BUF_SIZE]; raptor_parser rdf_parser; /* static */ raptor_n3_parser n3_parser; /* static */ raptor_locator *locator=&rdf_parser.locator; FILE *fh; char *filename; int rc; #if RAPTOR_DEBUG > 2 n3_parser_debug=1; #endif if(argc > 1) { filename=argv[1]; fh = fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename=""; fh = stdin; } memset(string, 0, N3_FILE_BUF_SIZE); rc=fread(string, N3_FILE_BUF_SIZE, 1, fh); if(rc < N3_FILE_BUF_SIZE) { if(ferror(fh)) { fprintf(stderr, "%s: file '%s' read failed - %s\n", argv[0], filename, strerror(errno)); fclose(fh); return(1); } } if(argc>1) fclose(fh); raptor_init(); memset(&rdf_parser, 0, sizeof(raptor_parser)); memset(&n3_parser, 0, sizeof(raptor_n3_parser)); locator->line= locator->column = -1; locator->file= filename; n3_parser.lineno= 1; rdf_parser.context=&n3_parser; rdf_parser.base_uri=raptor_new_uri((const unsigned char*)"http://example.org/fake-base-uri/"); raptor_set_statement_handler(&rdf_parser, stdout, n3_parser_print_statement); raptor_n3_parse_init(&rdf_parser, "n3"); n3_parser.error_count=0; n3_parse(&rdf_parser, string); raptor_free_uri(rdf_parser.base_uri); raptor_finish(); return (0); } #endif raptor-1.4.21/src/raptor_config.h.in0000644000175000017500000002025511330705007014230 00000000000000/* src/raptor_config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* have to check C99 vsnprintf at runtime because cross compiling */ #undef CHECK_VSNPRINTF_RUNTIME /* does expat crash when it sees an initial UTF8 BOM? */ #undef EXPAT_UTF8_BOM_CRASH /* vsnprint has C99 compatible return value */ #undef HAVE_C99_VSNPRINTF /* Have curl/curl.h */ #undef HAVE_CURL_CURL_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_DMALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_EXPAT_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FETCH_H /* Define to 1 if you have the `getopt' function. */ #undef HAVE_GETOPT /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* INN parsedate function present */ #undef HAVE_INN_PARSEDATE /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isascii' function. */ #undef HAVE_ISASCII /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_HASH_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_HTMLPARSER_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_NANOHTTP_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_PARSER_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_SAX2_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXSLT_XSLT_H /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Raptor raptor_parse_date available */ #undef HAVE_RAPTOR_PARSE_DATE /* have round() in libm */ #undef HAVE_ROUND /* Define to 1 if you have the `setjmp' function. */ #undef HAVE_SETJMP /* Define to 1 if you have the header file. */ #undef HAVE_SETJMP_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `stricmp' function. */ #undef HAVE_STRICMP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* have trunc() in libm */ #undef HAVE_TRUNC /* Define to 1 if the system has the type `u16'. */ #undef HAVE_U16 /* Define to 1 if the system has the type `u8'. */ #undef HAVE_U8 /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the `xmlCtxtUseOptions' function. */ #undef HAVE_XMLCTXTUSEOPTIONS /* Define to 1 if you have the header file. */ #undef HAVE_XMLPARSE_H /* Define to 1 if you have the `xmlSAX2InternalSubset' function. */ #undef HAVE_XMLSAX2INTERNALSUBSET /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* need 'extern int optind' declaration? */ #undef NEED_OPTIND_DECLARATION /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* does libxml struct xmlEntity have a field etype */ #undef RAPTOR_LIBXML_ENTITY_ETYPE /* does libxml struct xmlEntity have a field name_length */ #undef RAPTOR_LIBXML_ENTITY_NAME_LENGTH /* does libxml have HTML_PARSE_NONET */ #undef RAPTOR_LIBXML_HTML_PARSE_NONET /* does libxml xmlSAXHandler have externalSubset field */ #undef RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET /* does libxml xmlSAXHandler have initialized field */ #undef RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED /* does libxml have XML_PARSE_NONET */ #undef RAPTOR_LIBXML_XML_PARSE_NONET /* Provide a Unicode NFC check */ #undef RAPTOR_NFC_CHECK /* Building GRDDL parser */ #undef RAPTOR_PARSER_GRDDL /* Building guess parser */ #undef RAPTOR_PARSER_GUESS /* Building Notation 3 parser */ #undef RAPTOR_PARSER_N3 /* Building N-Triples parser */ #undef RAPTOR_PARSER_NTRIPLES /* Building RDFA parser */ #undef RAPTOR_PARSER_RDFA /* Building RDF/XML parser */ #undef RAPTOR_PARSER_RDFXML /* Building RSS Tag Soup parser */ #undef RAPTOR_PARSER_RSS /* Building TRiG parser */ #undef RAPTOR_PARSER_TRIG /* Building Turtle parser */ #undef RAPTOR_PARSER_TURTLE /* Building Atom 1.0 serializer */ #undef RAPTOR_SERIALIZER_ATOM /* Building GraphViz DOT serializer */ #undef RAPTOR_SERIALIZER_DOT /* Building JSON serializer */ #undef RAPTOR_SERIALIZER_JSON /* Building N-Triples serializer */ #undef RAPTOR_SERIALIZER_NTRIPLES /* Building RDF/XML serializer */ #undef RAPTOR_SERIALIZER_RDFXML /* Building RDF/XML-abbreviated serializer */ #undef RAPTOR_SERIALIZER_RDFXML_ABBREV /* Building RSS 1.0 serializer */ #undef RAPTOR_SERIALIZER_RSS_1_0 /* Building Turtle serializer */ #undef RAPTOR_SERIALIZER_TURTLE /* Release version as a decimal */ #undef RAPTOR_VERSION_DECIMAL /* Major version number */ #undef RAPTOR_VERSION_MAJOR /* Minor version number */ #undef RAPTOR_VERSION_MINOR /* Release version number */ #undef RAPTOR_VERSION_RELEASE /* Have libcurl WWW library */ #undef RAPTOR_WWW_LIBCURL /* Have libfetch WWW library */ #undef RAPTOR_WWW_LIBFETCH /* Have libxml available as a WWW library */ #undef RAPTOR_WWW_LIBXML /* No WWW library */ #undef RAPTOR_WWW_NONE /* Check XML 1.1 Names */ #undef RAPTOR_XML_1_1 /* Use expat XML parser */ #undef RAPTOR_XML_EXPAT /* Use libxml XML parser */ #undef RAPTOR_XML_LIBXML /* The size of `unsigned char', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_CHAR /* The size of `unsigned int', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_INT /* The size of `unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG /* The size of `unsigned short', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_SHORT /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const raptor-1.4.21/src/raptor_nfc_data.c0000644000175000017500000256417111322277061014131 00000000000000#ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #include "raptor_nfc.h" /* The data below was generated by charlint.pl -YWH -nf16check * and emitted the following original header: */ /* BEGIN QUOTE */ /* produced by charlint.pl, with option -nf16check */ /* charlint.pl by Martin J. Du"rst, W3C, 1999-2003 */ /* data derived from Unicode Character Database, see */ /* http://www.unicode.org/Public/UNIDATA/UCD.html#UCD_Terms */ /* END QUOTE */ /* pairs of (key, class) in a sparse sequence ordered by key */ const raptor_nfc_key_class raptor_nfc_classes[RAPTOR_NFC_CLASSES_COUNT] = { {0x00300, 230}, {0x00301, 230}, {0x00302, 230}, {0x00303, 230}, {0x00304, 230}, {0x00305, 230}, {0x00306, 230}, {0x00307, 230}, {0x00308, 230}, {0x00309, 230}, {0x0030A, 230}, {0x0030B, 230}, {0x0030C, 230}, {0x0030D, 230}, {0x0030E, 230}, {0x0030F, 230}, {0x00310, 230}, {0x00311, 230}, {0x00312, 230}, {0x00313, 230}, {0x00314, 230}, {0x00315, 232}, {0x00316, 220}, {0x00317, 220}, {0x00318, 220}, {0x00319, 220}, {0x0031A, 232}, {0x0031B, 216}, {0x0031C, 220}, {0x0031D, 220}, {0x0031E, 220}, {0x0031F, 220}, {0x00320, 220}, {0x00321, 202}, {0x00322, 202}, {0x00323, 220}, {0x00324, 220}, {0x00325, 220}, {0x00326, 220}, {0x00327, 202}, {0x00328, 202}, {0x00329, 220}, {0x0032A, 220}, {0x0032B, 220}, {0x0032C, 220}, {0x0032D, 220}, {0x0032E, 220}, {0x0032F, 220}, {0x00330, 220}, {0x00331, 220}, {0x00332, 220}, {0x00333, 220}, {0x00334, 1}, {0x00335, 1}, {0x00336, 1}, {0x00337, 1}, {0x00338, 1}, {0x00339, 220}, {0x0033A, 220}, {0x0033B, 220}, {0x0033C, 220}, {0x0033D, 230}, {0x0033E, 230}, {0x0033F, 230}, {0x00340, 230}, {0x00341, 230}, {0x00342, 230}, {0x00343, 230}, {0x00344, 230}, {0x00345, 240}, {0x00346, 230}, {0x00347, 220}, {0x00348, 220}, {0x00349, 220}, {0x0034A, 230}, {0x0034B, 230}, {0x0034C, 230}, {0x0034D, 220}, {0x0034E, 220}, {0x00350, 230}, {0x00351, 230}, {0x00352, 230}, {0x00353, 220}, {0x00354, 220}, {0x00355, 220}, {0x00356, 220}, {0x00357, 230}, {0x0035D, 234}, {0x0035E, 234}, {0x0035F, 233}, {0x00360, 234}, {0x00361, 234}, {0x00362, 233}, {0x00363, 230}, {0x00364, 230}, {0x00365, 230}, {0x00366, 230}, {0x00367, 230}, {0x00368, 230}, {0x00369, 230}, {0x0036A, 230}, {0x0036B, 230}, {0x0036C, 230}, {0x0036D, 230}, {0x0036E, 230}, {0x0036F, 230}, {0x00483, 230}, {0x00484, 230}, {0x00485, 230}, {0x00486, 230}, {0x00591, 220}, {0x00592, 230}, {0x00593, 230}, {0x00594, 230}, {0x00595, 230}, {0x00596, 220}, {0x00597, 230}, {0x00598, 230}, {0x00599, 230}, {0x0059A, 222}, {0x0059B, 220}, {0x0059C, 230}, {0x0059D, 230}, {0x0059E, 230}, {0x0059F, 230}, {0x005A0, 230}, {0x005A1, 230}, {0x005A3, 220}, {0x005A4, 220}, {0x005A5, 220}, {0x005A6, 220}, {0x005A7, 220}, {0x005A8, 230}, {0x005A9, 230}, {0x005AA, 220}, {0x005AB, 230}, {0x005AC, 230}, {0x005AD, 222}, {0x005AE, 228}, {0x005AF, 230}, {0x005B0, 10}, {0x005B1, 11}, {0x005B2, 12}, {0x005B3, 13}, {0x005B4, 14}, {0x005B5, 15}, {0x005B6, 16}, {0x005B7, 17}, {0x005B8, 18}, {0x005B9, 19}, {0x005BB, 20}, {0x005BC, 21}, {0x005BD, 22}, {0x005BF, 23}, {0x005C1, 24}, {0x005C2, 25}, {0x005C4, 230}, {0x00610, 230}, {0x00611, 230}, {0x00612, 230}, {0x00613, 230}, {0x00614, 230}, {0x00615, 230}, {0x0064B, 27}, {0x0064C, 28}, {0x0064D, 29}, {0x0064E, 30}, {0x0064F, 31}, {0x00650, 32}, {0x00651, 33}, {0x00652, 34}, {0x00653, 230}, {0x00654, 230}, {0x00655, 220}, {0x00656, 220}, {0x00657, 230}, {0x00658, 230}, {0x00670, 35}, {0x006D6, 230}, {0x006D7, 230}, {0x006D8, 230}, {0x006D9, 230}, {0x006DA, 230}, {0x006DB, 230}, {0x006DC, 230}, {0x006DF, 230}, {0x006E0, 230}, {0x006E1, 230}, {0x006E2, 230}, {0x006E3, 220}, {0x006E4, 230}, {0x006E7, 230}, {0x006E8, 230}, {0x006EA, 220}, {0x006EB, 230}, {0x006EC, 230}, {0x006ED, 220}, {0x00711, 36}, {0x00730, 230}, {0x00731, 220}, {0x00732, 230}, {0x00733, 230}, {0x00734, 220}, {0x00735, 230}, {0x00736, 230}, {0x00737, 220}, {0x00738, 220}, {0x00739, 220}, {0x0073A, 230}, {0x0073B, 220}, {0x0073C, 220}, {0x0073D, 230}, {0x0073E, 220}, {0x0073F, 230}, {0x00740, 230}, {0x00741, 230}, {0x00742, 220}, {0x00743, 230}, {0x00744, 220}, {0x00745, 230}, {0x00746, 220}, {0x00747, 230}, {0x00748, 220}, {0x00749, 230}, {0x0074A, 230}, {0x0093C, 7}, {0x0094D, 9}, {0x00951, 230}, {0x00952, 220}, {0x00953, 230}, {0x00954, 230}, {0x009BC, 7}, {0x009CD, 9}, {0x00A3C, 7}, {0x00A4D, 9}, {0x00ABC, 7}, {0x00ACD, 9}, {0x00B3C, 7}, {0x00B4D, 9}, {0x00BCD, 9}, {0x00C4D, 9}, {0x00C55, 84}, {0x00C56, 91}, {0x00CBC, 7}, {0x00CCD, 9}, {0x00D4D, 9}, {0x00DCA, 9}, {0x00E38, 103}, {0x00E39, 103}, {0x00E3A, 9}, {0x00E48, 107}, {0x00E49, 107}, {0x00E4A, 107}, {0x00E4B, 107}, {0x00EB8, 118}, {0x00EB9, 118}, {0x00EC8, 122}, {0x00EC9, 122}, {0x00ECA, 122}, {0x00ECB, 122}, {0x00F18, 220}, {0x00F19, 220}, {0x00F35, 220}, {0x00F37, 220}, {0x00F39, 216}, {0x00F71, 129}, {0x00F72, 130}, {0x00F74, 132}, {0x00F7A, 130}, {0x00F7B, 130}, {0x00F7C, 130}, {0x00F7D, 130}, {0x00F80, 130}, {0x00F82, 230}, {0x00F83, 230}, {0x00F84, 9}, {0x00F86, 230}, {0x00F87, 230}, {0x00FC6, 220}, {0x01037, 7}, {0x01039, 9}, {0x01714, 9}, {0x01734, 9}, {0x017D2, 9}, {0x017DD, 230}, {0x018A9, 228}, {0x01939, 222}, {0x0193A, 230}, {0x0193B, 220}, {0x020D0, 230}, {0x020D1, 230}, {0x020D2, 1}, {0x020D3, 1}, {0x020D4, 230}, {0x020D5, 230}, {0x020D6, 230}, {0x020D7, 230}, {0x020D8, 1}, {0x020D9, 1}, {0x020DA, 1}, {0x020DB, 230}, {0x020DC, 230}, {0x020E1, 230}, {0x020E5, 1}, {0x020E6, 1}, {0x020E7, 230}, {0x020E8, 220}, {0x020E9, 230}, {0x020EA, 1}, {0x0302A, 218}, {0x0302B, 228}, {0x0302C, 232}, {0x0302D, 222}, {0x0302E, 224}, {0x0302F, 224}, {0x03099, 8}, {0x0309A, 8}, {0x0FB1E, 26}, {0x0FE20, 230}, {0x0FE21, 230}, {0x0FE22, 230}, {0x0FE23, 230}, {0x1D165, 216}, {0x1D166, 216}, {0x1D167, 1}, {0x1D168, 1}, {0x1D169, 1}, {0x1D16D, 226}, {0x1D16E, 216}, {0x1D16F, 216}, {0x1D170, 216}, {0x1D171, 216}, {0x1D172, 216}, {0x1D17B, 220}, {0x1D17C, 220}, {0x1D17D, 220}, {0x1D17E, 220}, {0x1D17F, 220}, {0x1D180, 220}, {0x1D181, 220}, {0x1D182, 220}, {0x1D185, 230}, {0x1D186, 230}, {0x1D187, 230}, {0x1D188, 230}, {0x1D189, 230}, {0x1D18A, 220}, {0x1D18B, 220}, {0x1D1AA, 230}, {0x1D1AB, 230}, {0x1D1AC, 230}, {0x1D1AD, 230}, }; /* pairs of (base, follow) in a sparse sequence ordered by base */ const raptor_nfc_base_follow raptor_nfc_recombiners[RAPTOR_NFC_RECOMBINERS_COUNT] = { {0x003C, 0x0338}, {0x003D, 0x0338}, {0x003E, 0x0338}, {0x0041, 0x0300}, {0x0041, 0x0301}, {0x0041, 0x0302}, {0x0041, 0x0303}, {0x0041, 0x0304}, {0x0041, 0x0306}, {0x0041, 0x0307}, {0x0041, 0x0308}, {0x0041, 0x0309}, {0x0041, 0x030A}, {0x0041, 0x030C}, {0x0041, 0x030F}, {0x0041, 0x0311}, {0x0041, 0x0323}, {0x0041, 0x0325}, {0x0041, 0x0328}, {0x0042, 0x0307}, {0x0042, 0x0323}, {0x0042, 0x0331}, {0x0043, 0x0301}, {0x0043, 0x0302}, {0x0043, 0x0307}, {0x0043, 0x030C}, {0x0043, 0x0327}, {0x0044, 0x0307}, {0x0044, 0x030C}, {0x0044, 0x0323}, {0x0044, 0x0327}, {0x0044, 0x032D}, {0x0044, 0x0331}, {0x0045, 0x0300}, {0x0045, 0x0301}, {0x0045, 0x0302}, {0x0045, 0x0303}, {0x0045, 0x0304}, {0x0045, 0x0306}, {0x0045, 0x0307}, {0x0045, 0x0308}, {0x0045, 0x0309}, {0x0045, 0x030C}, {0x0045, 0x030F}, {0x0045, 0x0311}, {0x0045, 0x0323}, {0x0045, 0x0327}, {0x0045, 0x0328}, {0x0045, 0x032D}, {0x0045, 0x0330}, {0x0046, 0x0307}, {0x0047, 0x0301}, {0x0047, 0x0302}, {0x0047, 0x0304}, {0x0047, 0x0306}, {0x0047, 0x0307}, {0x0047, 0x030C}, {0x0047, 0x0327}, {0x0048, 0x0302}, {0x0048, 0x0307}, {0x0048, 0x0308}, {0x0048, 0x030C}, {0x0048, 0x0323}, {0x0048, 0x0327}, {0x0048, 0x032E}, {0x0049, 0x0300}, {0x0049, 0x0301}, {0x0049, 0x0302}, {0x0049, 0x0303}, {0x0049, 0x0304}, {0x0049, 0x0306}, {0x0049, 0x0307}, {0x0049, 0x0308}, {0x0049, 0x0309}, {0x0049, 0x030C}, {0x0049, 0x030F}, {0x0049, 0x0311}, {0x0049, 0x0323}, {0x0049, 0x0328}, {0x0049, 0x0330}, {0x004A, 0x0302}, {0x004B, 0x0301}, {0x004B, 0x030C}, {0x004B, 0x0323}, {0x004B, 0x0327}, {0x004B, 0x0331}, {0x004C, 0x0301}, {0x004C, 0x030C}, {0x004C, 0x0323}, {0x004C, 0x0327}, {0x004C, 0x032D}, {0x004C, 0x0331}, {0x004D, 0x0301}, {0x004D, 0x0307}, {0x004D, 0x0323}, {0x004E, 0x0300}, {0x004E, 0x0301}, {0x004E, 0x0303}, {0x004E, 0x0307}, {0x004E, 0x030C}, {0x004E, 0x0323}, {0x004E, 0x0327}, {0x004E, 0x032D}, {0x004E, 0x0331}, {0x004F, 0x0300}, {0x004F, 0x0301}, {0x004F, 0x0302}, {0x004F, 0x0303}, {0x004F, 0x0304}, {0x004F, 0x0306}, {0x004F, 0x0307}, {0x004F, 0x0308}, {0x004F, 0x0309}, {0x004F, 0x030B}, {0x004F, 0x030C}, {0x004F, 0x030F}, {0x004F, 0x0311}, {0x004F, 0x031B}, {0x004F, 0x0323}, {0x004F, 0x0328}, {0x0050, 0x0301}, {0x0050, 0x0307}, {0x0052, 0x0301}, {0x0052, 0x0307}, {0x0052, 0x030C}, {0x0052, 0x030F}, {0x0052, 0x0311}, {0x0052, 0x0323}, {0x0052, 0x0327}, {0x0052, 0x0331}, {0x0053, 0x0301}, {0x0053, 0x0302}, {0x0053, 0x0307}, {0x0053, 0x030C}, {0x0053, 0x0323}, {0x0053, 0x0326}, {0x0053, 0x0327}, {0x0054, 0x0307}, {0x0054, 0x030C}, {0x0054, 0x0323}, {0x0054, 0x0326}, {0x0054, 0x0327}, {0x0054, 0x032D}, {0x0054, 0x0331}, {0x0055, 0x0300}, {0x0055, 0x0301}, {0x0055, 0x0302}, {0x0055, 0x0303}, {0x0055, 0x0304}, {0x0055, 0x0306}, {0x0055, 0x0308}, {0x0055, 0x0309}, {0x0055, 0x030A}, {0x0055, 0x030B}, {0x0055, 0x030C}, {0x0055, 0x030F}, {0x0055, 0x0311}, {0x0055, 0x031B}, {0x0055, 0x0323}, {0x0055, 0x0324}, {0x0055, 0x0328}, {0x0055, 0x032D}, {0x0055, 0x0330}, {0x0056, 0x0303}, {0x0056, 0x0323}, {0x0057, 0x0300}, {0x0057, 0x0301}, {0x0057, 0x0302}, {0x0057, 0x0307}, {0x0057, 0x0308}, {0x0057, 0x0323}, {0x0058, 0x0307}, {0x0058, 0x0308}, {0x0059, 0x0300}, {0x0059, 0x0301}, {0x0059, 0x0302}, {0x0059, 0x0303}, {0x0059, 0x0304}, {0x0059, 0x0307}, {0x0059, 0x0308}, {0x0059, 0x0309}, {0x0059, 0x0323}, {0x005A, 0x0301}, {0x005A, 0x0302}, {0x005A, 0x0307}, {0x005A, 0x030C}, {0x005A, 0x0323}, {0x005A, 0x0331}, {0x0061, 0x0300}, {0x0061, 0x0301}, {0x0061, 0x0302}, {0x0061, 0x0303}, {0x0061, 0x0304}, {0x0061, 0x0306}, {0x0061, 0x0307}, {0x0061, 0x0308}, {0x0061, 0x0309}, {0x0061, 0x030A}, {0x0061, 0x030C}, {0x0061, 0x030F}, {0x0061, 0x0311}, {0x0061, 0x0323}, {0x0061, 0x0325}, {0x0061, 0x0328}, {0x0062, 0x0307}, {0x0062, 0x0323}, {0x0062, 0x0331}, {0x0063, 0x0301}, {0x0063, 0x0302}, {0x0063, 0x0307}, {0x0063, 0x030C}, {0x0063, 0x0327}, {0x0064, 0x0307}, {0x0064, 0x030C}, {0x0064, 0x0323}, {0x0064, 0x0327}, {0x0064, 0x032D}, {0x0064, 0x0331}, {0x0065, 0x0300}, {0x0065, 0x0301}, {0x0065, 0x0302}, {0x0065, 0x0303}, {0x0065, 0x0304}, {0x0065, 0x0306}, {0x0065, 0x0307}, {0x0065, 0x0308}, {0x0065, 0x0309}, {0x0065, 0x030C}, {0x0065, 0x030F}, {0x0065, 0x0311}, {0x0065, 0x0323}, {0x0065, 0x0327}, {0x0065, 0x0328}, {0x0065, 0x032D}, {0x0065, 0x0330}, {0x0066, 0x0307}, {0x0067, 0x0301}, {0x0067, 0x0302}, {0x0067, 0x0304}, {0x0067, 0x0306}, {0x0067, 0x0307}, {0x0067, 0x030C}, {0x0067, 0x0327}, {0x0068, 0x0302}, {0x0068, 0x0307}, {0x0068, 0x0308}, {0x0068, 0x030C}, {0x0068, 0x0323}, {0x0068, 0x0327}, {0x0068, 0x032E}, {0x0068, 0x0331}, {0x0069, 0x0300}, {0x0069, 0x0301}, {0x0069, 0x0302}, {0x0069, 0x0303}, {0x0069, 0x0304}, {0x0069, 0x0306}, {0x0069, 0x0308}, {0x0069, 0x0309}, {0x0069, 0x030C}, {0x0069, 0x030F}, {0x0069, 0x0311}, {0x0069, 0x0323}, {0x0069, 0x0328}, {0x0069, 0x0330}, {0x006A, 0x0302}, {0x006A, 0x030C}, {0x006B, 0x0301}, {0x006B, 0x030C}, {0x006B, 0x0323}, {0x006B, 0x0327}, {0x006B, 0x0331}, {0x006C, 0x0301}, {0x006C, 0x030C}, {0x006C, 0x0323}, {0x006C, 0x0327}, {0x006C, 0x032D}, {0x006C, 0x0331}, {0x006D, 0x0301}, {0x006D, 0x0307}, {0x006D, 0x0323}, {0x006E, 0x0300}, {0x006E, 0x0301}, {0x006E, 0x0303}, {0x006E, 0x0307}, {0x006E, 0x030C}, {0x006E, 0x0323}, {0x006E, 0x0327}, {0x006E, 0x032D}, {0x006E, 0x0331}, {0x006F, 0x0300}, {0x006F, 0x0301}, {0x006F, 0x0302}, {0x006F, 0x0303}, {0x006F, 0x0304}, {0x006F, 0x0306}, {0x006F, 0x0307}, {0x006F, 0x0308}, {0x006F, 0x0309}, {0x006F, 0x030B}, {0x006F, 0x030C}, {0x006F, 0x030F}, {0x006F, 0x0311}, {0x006F, 0x031B}, {0x006F, 0x0323}, {0x006F, 0x0328}, {0x0070, 0x0301}, {0x0070, 0x0307}, {0x0072, 0x0301}, {0x0072, 0x0307}, {0x0072, 0x030C}, {0x0072, 0x030F}, {0x0072, 0x0311}, {0x0072, 0x0323}, {0x0072, 0x0327}, {0x0072, 0x0331}, {0x0073, 0x0301}, {0x0073, 0x0302}, {0x0073, 0x0307}, {0x0073, 0x030C}, {0x0073, 0x0323}, {0x0073, 0x0326}, {0x0073, 0x0327}, {0x0074, 0x0307}, {0x0074, 0x0308}, {0x0074, 0x030C}, {0x0074, 0x0323}, {0x0074, 0x0326}, {0x0074, 0x0327}, {0x0074, 0x032D}, {0x0074, 0x0331}, {0x0075, 0x0300}, {0x0075, 0x0301}, {0x0075, 0x0302}, {0x0075, 0x0303}, {0x0075, 0x0304}, {0x0075, 0x0306}, {0x0075, 0x0308}, {0x0075, 0x0309}, {0x0075, 0x030A}, {0x0075, 0x030B}, {0x0075, 0x030C}, {0x0075, 0x030F}, {0x0075, 0x0311}, {0x0075, 0x031B}, {0x0075, 0x0323}, {0x0075, 0x0324}, {0x0075, 0x0328}, {0x0075, 0x032D}, {0x0075, 0x0330}, {0x0076, 0x0303}, {0x0076, 0x0323}, {0x0077, 0x0300}, {0x0077, 0x0301}, {0x0077, 0x0302}, {0x0077, 0x0307}, {0x0077, 0x0308}, {0x0077, 0x030A}, {0x0077, 0x0323}, {0x0078, 0x0307}, {0x0078, 0x0308}, {0x0079, 0x0300}, {0x0079, 0x0301}, {0x0079, 0x0302}, {0x0079, 0x0303}, {0x0079, 0x0304}, {0x0079, 0x0307}, {0x0079, 0x0308}, {0x0079, 0x0309}, {0x0079, 0x030A}, {0x0079, 0x0323}, {0x007A, 0x0301}, {0x007A, 0x0302}, {0x007A, 0x0307}, {0x007A, 0x030C}, {0x007A, 0x0323}, {0x007A, 0x0331}, {0x00A8, 0x0300}, {0x00A8, 0x0301}, {0x00A8, 0x0342}, {0x00C0, 0x0323}, {0x00C0, 0x0325}, {0x00C0, 0x0328}, {0x00C1, 0x0323}, {0x00C1, 0x0325}, {0x00C1, 0x0328}, {0x00C2, 0x0300}, {0x00C2, 0x0301}, {0x00C2, 0x0303}, {0x00C2, 0x0309}, {0x00C2, 0x0323}, {0x00C2, 0x0325}, {0x00C2, 0x0328}, {0x00C3, 0x0323}, {0x00C3, 0x0325}, {0x00C3, 0x0328}, {0x00C4, 0x0304}, {0x00C4, 0x0323}, {0x00C4, 0x0325}, {0x00C4, 0x0328}, {0x00C5, 0x0301}, {0x00C5, 0x0323}, {0x00C5, 0x0325}, {0x00C5, 0x0328}, {0x00C6, 0x0301}, {0x00C6, 0x0304}, {0x00C7, 0x0301}, {0x00C8, 0x0323}, {0x00C8, 0x0327}, {0x00C8, 0x0328}, {0x00C8, 0x032D}, {0x00C8, 0x0330}, {0x00C9, 0x0323}, {0x00C9, 0x0327}, {0x00C9, 0x0328}, {0x00C9, 0x032D}, {0x00C9, 0x0330}, {0x00CA, 0x0300}, {0x00CA, 0x0301}, {0x00CA, 0x0303}, {0x00CA, 0x0309}, {0x00CA, 0x0323}, {0x00CA, 0x0327}, {0x00CA, 0x0328}, {0x00CA, 0x032D}, {0x00CA, 0x0330}, {0x00CB, 0x0323}, {0x00CB, 0x0327}, {0x00CB, 0x0328}, {0x00CB, 0x032D}, {0x00CB, 0x0330}, {0x00CC, 0x0323}, {0x00CC, 0x0328}, {0x00CC, 0x0330}, {0x00CD, 0x0323}, {0x00CD, 0x0328}, {0x00CD, 0x0330}, {0x00CE, 0x0323}, {0x00CE, 0x0328}, {0x00CE, 0x0330}, {0x00CF, 0x0301}, {0x00CF, 0x0323}, {0x00CF, 0x0328}, {0x00CF, 0x0330}, {0x00D1, 0x0323}, {0x00D1, 0x0327}, {0x00D1, 0x032D}, {0x00D1, 0x0331}, {0x00D2, 0x031B}, {0x00D2, 0x0323}, {0x00D2, 0x0328}, {0x00D3, 0x031B}, {0x00D3, 0x0323}, {0x00D3, 0x0328}, {0x00D4, 0x0300}, {0x00D4, 0x0301}, {0x00D4, 0x0303}, {0x00D4, 0x0309}, {0x00D4, 0x031B}, {0x00D4, 0x0323}, {0x00D4, 0x0328}, {0x00D5, 0x0301}, {0x00D5, 0x0304}, {0x00D5, 0x0308}, {0x00D5, 0x031B}, {0x00D5, 0x0323}, {0x00D5, 0x0328}, {0x00D6, 0x0304}, {0x00D6, 0x031B}, {0x00D6, 0x0323}, {0x00D6, 0x0328}, {0x00D8, 0x0301}, {0x00D9, 0x031B}, {0x00D9, 0x0323}, {0x00D9, 0x0324}, {0x00D9, 0x0328}, {0x00D9, 0x032D}, {0x00D9, 0x0330}, {0x00DA, 0x031B}, {0x00DA, 0x0323}, {0x00DA, 0x0324}, {0x00DA, 0x0328}, {0x00DA, 0x032D}, {0x00DA, 0x0330}, {0x00DB, 0x031B}, {0x00DB, 0x0323}, {0x00DB, 0x0324}, {0x00DB, 0x0328}, {0x00DB, 0x032D}, {0x00DB, 0x0330}, {0x00DC, 0x0300}, {0x00DC, 0x0301}, {0x00DC, 0x0304}, {0x00DC, 0x030C}, {0x00DC, 0x031B}, {0x00DC, 0x0323}, {0x00DC, 0x0324}, {0x00DC, 0x0328}, {0x00DC, 0x032D}, {0x00DC, 0x0330}, {0x00DD, 0x0323}, {0x00E0, 0x0323}, {0x00E0, 0x0325}, {0x00E0, 0x0328}, {0x00E1, 0x0323}, {0x00E1, 0x0325}, {0x00E1, 0x0328}, {0x00E2, 0x0300}, {0x00E2, 0x0301}, {0x00E2, 0x0303}, {0x00E2, 0x0309}, {0x00E2, 0x0323}, {0x00E2, 0x0325}, {0x00E2, 0x0328}, {0x00E3, 0x0323}, {0x00E3, 0x0325}, {0x00E3, 0x0328}, {0x00E4, 0x0304}, {0x00E4, 0x0323}, {0x00E4, 0x0325}, {0x00E4, 0x0328}, {0x00E5, 0x0301}, {0x00E5, 0x0323}, {0x00E5, 0x0325}, {0x00E5, 0x0328}, {0x00E6, 0x0301}, {0x00E6, 0x0304}, {0x00E7, 0x0301}, {0x00E8, 0x0323}, {0x00E8, 0x0327}, {0x00E8, 0x0328}, {0x00E8, 0x032D}, {0x00E8, 0x0330}, {0x00E9, 0x0323}, {0x00E9, 0x0327}, {0x00E9, 0x0328}, {0x00E9, 0x032D}, {0x00E9, 0x0330}, {0x00EA, 0x0300}, {0x00EA, 0x0301}, {0x00EA, 0x0303}, {0x00EA, 0x0309}, {0x00EA, 0x0323}, {0x00EA, 0x0327}, {0x00EA, 0x0328}, {0x00EA, 0x032D}, {0x00EA, 0x0330}, {0x00EB, 0x0323}, {0x00EB, 0x0327}, {0x00EB, 0x0328}, {0x00EB, 0x032D}, {0x00EB, 0x0330}, {0x00EC, 0x0323}, {0x00EC, 0x0328}, {0x00EC, 0x0330}, {0x00ED, 0x0323}, {0x00ED, 0x0328}, {0x00ED, 0x0330}, {0x00EE, 0x0323}, {0x00EE, 0x0328}, {0x00EE, 0x0330}, {0x00EF, 0x0301}, {0x00EF, 0x0323}, {0x00EF, 0x0328}, {0x00EF, 0x0330}, {0x00F1, 0x0323}, {0x00F1, 0x0327}, {0x00F1, 0x032D}, {0x00F1, 0x0331}, {0x00F2, 0x031B}, {0x00F2, 0x0323}, {0x00F2, 0x0328}, {0x00F3, 0x031B}, {0x00F3, 0x0323}, {0x00F3, 0x0328}, {0x00F4, 0x0300}, {0x00F4, 0x0301}, {0x00F4, 0x0303}, {0x00F4, 0x0309}, {0x00F4, 0x031B}, {0x00F4, 0x0323}, {0x00F4, 0x0328}, {0x00F5, 0x0301}, {0x00F5, 0x0304}, {0x00F5, 0x0308}, {0x00F5, 0x031B}, {0x00F5, 0x0323}, {0x00F5, 0x0328}, {0x00F6, 0x0304}, {0x00F6, 0x031B}, {0x00F6, 0x0323}, {0x00F6, 0x0328}, {0x00F8, 0x0301}, {0x00F9, 0x031B}, {0x00F9, 0x0323}, {0x00F9, 0x0324}, {0x00F9, 0x0328}, {0x00F9, 0x032D}, {0x00F9, 0x0330}, {0x00FA, 0x031B}, {0x00FA, 0x0323}, {0x00FA, 0x0324}, {0x00FA, 0x0328}, {0x00FA, 0x032D}, {0x00FA, 0x0330}, {0x00FB, 0x031B}, {0x00FB, 0x0323}, {0x00FB, 0x0324}, {0x00FB, 0x0328}, {0x00FB, 0x032D}, {0x00FB, 0x0330}, {0x00FC, 0x0300}, {0x00FC, 0x0301}, {0x00FC, 0x0304}, {0x00FC, 0x030C}, {0x00FC, 0x031B}, {0x00FC, 0x0323}, {0x00FC, 0x0324}, {0x00FC, 0x0328}, {0x00FC, 0x032D}, {0x00FC, 0x0330}, {0x00FD, 0x0323}, {0x00FF, 0x0323}, {0x0100, 0x0323}, {0x0100, 0x0325}, {0x0100, 0x0328}, {0x0101, 0x0323}, {0x0101, 0x0325}, {0x0101, 0x0328}, {0x0102, 0x0300}, {0x0102, 0x0301}, {0x0102, 0x0303}, {0x0102, 0x0309}, {0x0102, 0x0323}, {0x0102, 0x0325}, {0x0102, 0x0328}, {0x0103, 0x0300}, {0x0103, 0x0301}, {0x0103, 0x0303}, {0x0103, 0x0309}, {0x0103, 0x0323}, {0x0103, 0x0325}, {0x0103, 0x0328}, {0x0106, 0x0327}, {0x0107, 0x0327}, {0x0108, 0x0327}, {0x0109, 0x0327}, {0x010A, 0x0327}, {0x010B, 0x0327}, {0x010C, 0x0327}, {0x010D, 0x0327}, {0x010E, 0x0323}, {0x010E, 0x0327}, {0x010E, 0x032D}, {0x010E, 0x0331}, {0x010F, 0x0323}, {0x010F, 0x0327}, {0x010F, 0x032D}, {0x010F, 0x0331}, {0x0112, 0x0300}, {0x0112, 0x0301}, {0x0112, 0x0323}, {0x0112, 0x0327}, {0x0112, 0x0328}, {0x0112, 0x032D}, {0x0112, 0x0330}, {0x0113, 0x0300}, {0x0113, 0x0301}, {0x0113, 0x0323}, {0x0113, 0x0327}, {0x0113, 0x0328}, {0x0113, 0x032D}, {0x0113, 0x0330}, {0x0114, 0x0323}, {0x0114, 0x0327}, {0x0114, 0x0328}, {0x0114, 0x032D}, {0x0114, 0x0330}, {0x0115, 0x0323}, {0x0115, 0x0327}, {0x0115, 0x0328}, {0x0115, 0x032D}, {0x0115, 0x0330}, {0x0116, 0x0323}, {0x0116, 0x0327}, {0x0116, 0x0328}, {0x0116, 0x032D}, {0x0116, 0x0330}, {0x0117, 0x0323}, {0x0117, 0x0327}, {0x0117, 0x0328}, {0x0117, 0x032D}, {0x0117, 0x0330}, {0x011A, 0x0323}, {0x011A, 0x0327}, {0x011A, 0x0328}, {0x011A, 0x032D}, {0x011A, 0x0330}, {0x011B, 0x0323}, {0x011B, 0x0327}, {0x011B, 0x0328}, {0x011B, 0x032D}, {0x011B, 0x0330}, {0x011C, 0x0327}, {0x011D, 0x0327}, {0x011E, 0x0327}, {0x011F, 0x0327}, {0x0120, 0x0327}, {0x0121, 0x0327}, {0x0124, 0x0323}, {0x0124, 0x0327}, {0x0124, 0x032E}, {0x0125, 0x0323}, {0x0125, 0x0327}, {0x0125, 0x032E}, {0x0125, 0x0331}, {0x0128, 0x0323}, {0x0128, 0x0328}, {0x0128, 0x0330}, {0x0129, 0x0323}, {0x0129, 0x0328}, {0x0129, 0x0330}, {0x012A, 0x0323}, {0x012A, 0x0328}, {0x012A, 0x0330}, {0x012B, 0x0323}, {0x012B, 0x0328}, {0x012B, 0x0330}, {0x012C, 0x0323}, {0x012C, 0x0328}, {0x012C, 0x0330}, {0x012D, 0x0323}, {0x012D, 0x0328}, {0x012D, 0x0330}, {0x0130, 0x0323}, {0x0130, 0x0328}, {0x0130, 0x0330}, {0x0139, 0x0323}, {0x0139, 0x0327}, {0x0139, 0x032D}, {0x0139, 0x0331}, {0x013A, 0x0323}, {0x013A, 0x0327}, {0x013A, 0x032D}, {0x013A, 0x0331}, {0x013D, 0x0323}, {0x013D, 0x0327}, {0x013D, 0x032D}, {0x013D, 0x0331}, {0x013E, 0x0323}, {0x013E, 0x0327}, {0x013E, 0x032D}, {0x013E, 0x0331}, {0x0143, 0x0323}, {0x0143, 0x0327}, {0x0143, 0x032D}, {0x0143, 0x0331}, {0x0144, 0x0323}, {0x0144, 0x0327}, {0x0144, 0x032D}, {0x0144, 0x0331}, {0x0147, 0x0323}, {0x0147, 0x0327}, {0x0147, 0x032D}, {0x0147, 0x0331}, {0x0148, 0x0323}, {0x0148, 0x0327}, {0x0148, 0x032D}, {0x0148, 0x0331}, {0x014C, 0x0300}, {0x014C, 0x0301}, {0x014C, 0x031B}, {0x014C, 0x0323}, {0x014C, 0x0328}, {0x014D, 0x0300}, {0x014D, 0x0301}, {0x014D, 0x031B}, {0x014D, 0x0323}, {0x014D, 0x0328}, {0x014E, 0x031B}, {0x014E, 0x0323}, {0x014E, 0x0328}, {0x014F, 0x031B}, {0x014F, 0x0323}, {0x014F, 0x0328}, {0x0150, 0x031B}, {0x0150, 0x0323}, {0x0150, 0x0328}, {0x0151, 0x031B}, {0x0151, 0x0323}, {0x0151, 0x0328}, {0x0154, 0x0323}, {0x0154, 0x0327}, {0x0154, 0x0331}, {0x0155, 0x0323}, {0x0155, 0x0327}, {0x0155, 0x0331}, {0x0158, 0x0323}, {0x0158, 0x0327}, {0x0158, 0x0331}, {0x0159, 0x0323}, {0x0159, 0x0327}, {0x0159, 0x0331}, {0x015A, 0x0307}, {0x015A, 0x0323}, {0x015A, 0x0326}, {0x015A, 0x0327}, {0x015B, 0x0307}, {0x015B, 0x0323}, {0x015B, 0x0326}, {0x015B, 0x0327}, {0x015C, 0x0323}, {0x015C, 0x0326}, {0x015C, 0x0327}, {0x015D, 0x0323}, {0x015D, 0x0326}, {0x015D, 0x0327}, {0x0160, 0x0307}, {0x0160, 0x0323}, {0x0160, 0x0326}, {0x0160, 0x0327}, {0x0161, 0x0307}, {0x0161, 0x0323}, {0x0161, 0x0326}, {0x0161, 0x0327}, {0x0164, 0x0323}, {0x0164, 0x0326}, {0x0164, 0x0327}, {0x0164, 0x032D}, {0x0164, 0x0331}, {0x0165, 0x0323}, {0x0165, 0x0326}, {0x0165, 0x0327}, {0x0165, 0x032D}, {0x0165, 0x0331}, {0x0168, 0x0301}, {0x0168, 0x031B}, {0x0168, 0x0323}, {0x0168, 0x0324}, {0x0168, 0x0328}, {0x0168, 0x032D}, {0x0168, 0x0330}, {0x0169, 0x0301}, {0x0169, 0x031B}, {0x0169, 0x0323}, {0x0169, 0x0324}, {0x0169, 0x0328}, {0x0169, 0x032D}, {0x0169, 0x0330}, {0x016A, 0x0308}, {0x016A, 0x031B}, {0x016A, 0x0323}, {0x016A, 0x0324}, {0x016A, 0x0328}, {0x016A, 0x032D}, {0x016A, 0x0330}, {0x016B, 0x0308}, {0x016B, 0x031B}, {0x016B, 0x0323}, {0x016B, 0x0324}, {0x016B, 0x0328}, {0x016B, 0x032D}, {0x016B, 0x0330}, {0x016C, 0x031B}, {0x016C, 0x0323}, {0x016C, 0x0324}, {0x016C, 0x0328}, {0x016C, 0x032D}, {0x016C, 0x0330}, {0x016D, 0x031B}, {0x016D, 0x0323}, {0x016D, 0x0324}, {0x016D, 0x0328}, {0x016D, 0x032D}, {0x016D, 0x0330}, {0x016E, 0x031B}, {0x016E, 0x0323}, {0x016E, 0x0324}, {0x016E, 0x0328}, {0x016E, 0x032D}, {0x016E, 0x0330}, {0x016F, 0x031B}, {0x016F, 0x0323}, {0x016F, 0x0324}, {0x016F, 0x0328}, {0x016F, 0x032D}, {0x016F, 0x0330}, {0x0170, 0x031B}, {0x0170, 0x0323}, {0x0170, 0x0324}, {0x0170, 0x0328}, {0x0170, 0x032D}, {0x0170, 0x0330}, {0x0171, 0x031B}, {0x0171, 0x0323}, {0x0171, 0x0324}, {0x0171, 0x0328}, {0x0171, 0x032D}, {0x0171, 0x0330}, {0x0174, 0x0323}, {0x0175, 0x0323}, {0x0176, 0x0323}, {0x0177, 0x0323}, {0x0178, 0x0323}, {0x0179, 0x0323}, {0x0179, 0x0331}, {0x017A, 0x0323}, {0x017A, 0x0331}, {0x017B, 0x0323}, {0x017B, 0x0331}, {0x017C, 0x0323}, {0x017C, 0x0331}, {0x017D, 0x0323}, {0x017D, 0x0331}, {0x017E, 0x0323}, {0x017E, 0x0331}, {0x017F, 0x0307}, {0x01A0, 0x0300}, {0x01A0, 0x0301}, {0x01A0, 0x0303}, {0x01A0, 0x0309}, {0x01A0, 0x0323}, {0x01A0, 0x0328}, {0x01A1, 0x0300}, {0x01A1, 0x0301}, {0x01A1, 0x0303}, {0x01A1, 0x0309}, {0x01A1, 0x0323}, {0x01A1, 0x0328}, {0x01AF, 0x0300}, {0x01AF, 0x0301}, {0x01AF, 0x0303}, {0x01AF, 0x0309}, {0x01AF, 0x0323}, {0x01AF, 0x0328}, {0x01B0, 0x0300}, {0x01B0, 0x0301}, {0x01B0, 0x0303}, {0x01B0, 0x0309}, {0x01B0, 0x0323}, {0x01B0, 0x0328}, {0x01B7, 0x030C}, {0x01CD, 0x0323}, {0x01CD, 0x0325}, {0x01CD, 0x0328}, {0x01CE, 0x0323}, {0x01CE, 0x0325}, {0x01CE, 0x0328}, {0x01CF, 0x0323}, {0x01CF, 0x0328}, {0x01CF, 0x0330}, {0x01D0, 0x0323}, {0x01D0, 0x0328}, {0x01D0, 0x0330}, {0x01D1, 0x031B}, {0x01D1, 0x0323}, {0x01D1, 0x0328}, {0x01D2, 0x031B}, {0x01D2, 0x0323}, {0x01D2, 0x0328}, {0x01D3, 0x031B}, {0x01D3, 0x0323}, {0x01D3, 0x0324}, {0x01D3, 0x0328}, {0x01D3, 0x032D}, {0x01D3, 0x0330}, {0x01D4, 0x031B}, {0x01D4, 0x0323}, {0x01D4, 0x0324}, {0x01D4, 0x0328}, {0x01D4, 0x032D}, {0x01D4, 0x0330}, {0x01D5, 0x031B}, {0x01D5, 0x0323}, {0x01D5, 0x0324}, {0x01D5, 0x0328}, {0x01D5, 0x032D}, {0x01D5, 0x0330}, {0x01D6, 0x031B}, {0x01D6, 0x0323}, {0x01D6, 0x0324}, {0x01D6, 0x0328}, {0x01D6, 0x032D}, {0x01D6, 0x0330}, {0x01D7, 0x031B}, {0x01D7, 0x0323}, {0x01D7, 0x0324}, {0x01D7, 0x0328}, {0x01D7, 0x032D}, {0x01D7, 0x0330}, {0x01D8, 0x031B}, {0x01D8, 0x0323}, {0x01D8, 0x0324}, {0x01D8, 0x0328}, {0x01D8, 0x032D}, {0x01D8, 0x0330}, {0x01D9, 0x031B}, {0x01D9, 0x0323}, {0x01D9, 0x0324}, {0x01D9, 0x0328}, {0x01D9, 0x032D}, {0x01D9, 0x0330}, {0x01DA, 0x031B}, {0x01DA, 0x0323}, {0x01DA, 0x0324}, {0x01DA, 0x0328}, {0x01DA, 0x032D}, {0x01DA, 0x0330}, {0x01DB, 0x031B}, {0x01DB, 0x0323}, {0x01DB, 0x0324}, {0x01DB, 0x0328}, {0x01DB, 0x032D}, {0x01DB, 0x0330}, {0x01DC, 0x031B}, {0x01DC, 0x0323}, {0x01DC, 0x0324}, {0x01DC, 0x0328}, {0x01DC, 0x032D}, {0x01DC, 0x0330}, {0x01DE, 0x0323}, {0x01DE, 0x0325}, {0x01DE, 0x0328}, {0x01DF, 0x0323}, {0x01DF, 0x0325}, {0x01DF, 0x0328}, {0x01E0, 0x0323}, {0x01E0, 0x0325}, {0x01E0, 0x0328}, {0x01E1, 0x0323}, {0x01E1, 0x0325}, {0x01E1, 0x0328}, {0x01E6, 0x0327}, {0x01E7, 0x0327}, {0x01E8, 0x0323}, {0x01E8, 0x0327}, {0x01E8, 0x0331}, {0x01E9, 0x0323}, {0x01E9, 0x0327}, {0x01E9, 0x0331}, {0x01EA, 0x0304}, {0x01EB, 0x0304}, {0x01F4, 0x0327}, {0x01F5, 0x0327}, {0x01F8, 0x0323}, {0x01F8, 0x0327}, {0x01F8, 0x032D}, {0x01F8, 0x0331}, {0x01F9, 0x0323}, {0x01F9, 0x0327}, {0x01F9, 0x032D}, {0x01F9, 0x0331}, {0x01FA, 0x0323}, {0x01FA, 0x0325}, {0x01FA, 0x0328}, {0x01FB, 0x0323}, {0x01FB, 0x0325}, {0x01FB, 0x0328}, {0x0200, 0x0323}, {0x0200, 0x0325}, {0x0200, 0x0328}, {0x0201, 0x0323}, {0x0201, 0x0325}, {0x0201, 0x0328}, {0x0202, 0x0323}, {0x0202, 0x0325}, {0x0202, 0x0328}, {0x0203, 0x0323}, {0x0203, 0x0325}, {0x0203, 0x0328}, {0x0204, 0x0323}, {0x0204, 0x0327}, {0x0204, 0x0328}, {0x0204, 0x032D}, {0x0204, 0x0330}, {0x0205, 0x0323}, {0x0205, 0x0327}, {0x0205, 0x0328}, {0x0205, 0x032D}, {0x0205, 0x0330}, {0x0206, 0x0323}, {0x0206, 0x0327}, {0x0206, 0x0328}, {0x0206, 0x032D}, {0x0206, 0x0330}, {0x0207, 0x0323}, {0x0207, 0x0327}, {0x0207, 0x0328}, {0x0207, 0x032D}, {0x0207, 0x0330}, {0x0208, 0x0323}, {0x0208, 0x0328}, {0x0208, 0x0330}, {0x0209, 0x0323}, {0x0209, 0x0328}, {0x0209, 0x0330}, {0x020A, 0x0323}, {0x020A, 0x0328}, {0x020A, 0x0330}, {0x020B, 0x0323}, {0x020B, 0x0328}, {0x020B, 0x0330}, {0x020C, 0x031B}, {0x020C, 0x0323}, {0x020C, 0x0328}, {0x020D, 0x031B}, {0x020D, 0x0323}, {0x020D, 0x0328}, {0x020E, 0x031B}, {0x020E, 0x0323}, {0x020E, 0x0328}, {0x020F, 0x031B}, {0x020F, 0x0323}, {0x020F, 0x0328}, {0x0210, 0x0323}, {0x0210, 0x0327}, {0x0210, 0x0331}, {0x0211, 0x0323}, {0x0211, 0x0327}, {0x0211, 0x0331}, {0x0212, 0x0323}, {0x0212, 0x0327}, {0x0212, 0x0331}, {0x0213, 0x0323}, {0x0213, 0x0327}, {0x0213, 0x0331}, {0x0214, 0x031B}, {0x0214, 0x0323}, {0x0214, 0x0324}, {0x0214, 0x0328}, {0x0214, 0x032D}, {0x0214, 0x0330}, {0x0215, 0x031B}, {0x0215, 0x0323}, {0x0215, 0x0324}, {0x0215, 0x0328}, {0x0215, 0x032D}, {0x0215, 0x0330}, {0x0216, 0x031B}, {0x0216, 0x0323}, {0x0216, 0x0324}, {0x0216, 0x0328}, {0x0216, 0x032D}, {0x0216, 0x0330}, {0x0217, 0x031B}, {0x0217, 0x0323}, {0x0217, 0x0324}, {0x0217, 0x0328}, {0x0217, 0x032D}, {0x0217, 0x0330}, {0x0218, 0x0327}, {0x0219, 0x0327}, {0x021A, 0x0327}, {0x021B, 0x0327}, {0x021E, 0x0323}, {0x021E, 0x0327}, {0x021E, 0x032E}, {0x021F, 0x0323}, {0x021F, 0x0327}, {0x021F, 0x032E}, {0x021F, 0x0331}, {0x0226, 0x0304}, {0x0226, 0x0323}, {0x0226, 0x0325}, {0x0226, 0x0328}, {0x0227, 0x0304}, {0x0227, 0x0323}, {0x0227, 0x0325}, {0x0227, 0x0328}, {0x0228, 0x0306}, {0x0229, 0x0306}, {0x022A, 0x031B}, {0x022A, 0x0323}, {0x022A, 0x0328}, {0x022B, 0x031B}, {0x022B, 0x0323}, {0x022B, 0x0328}, {0x022C, 0x031B}, {0x022C, 0x0323}, {0x022C, 0x0328}, {0x022D, 0x031B}, {0x022D, 0x0323}, {0x022D, 0x0328}, {0x022E, 0x0304}, {0x022E, 0x031B}, {0x022E, 0x0323}, {0x022E, 0x0328}, {0x022F, 0x0304}, {0x022F, 0x031B}, {0x022F, 0x0323}, {0x022F, 0x0328}, {0x0230, 0x031B}, {0x0230, 0x0323}, {0x0230, 0x0328}, {0x0231, 0x031B}, {0x0231, 0x0323}, {0x0231, 0x0328}, {0x0232, 0x0323}, {0x0233, 0x0323}, {0x0292, 0x030C}, {0x0391, 0x0300}, {0x0391, 0x0301}, {0x0391, 0x0304}, {0x0391, 0x0306}, {0x0391, 0x0313}, {0x0391, 0x0314}, {0x0391, 0x0345}, {0x0395, 0x0300}, {0x0395, 0x0301}, {0x0395, 0x0313}, {0x0395, 0x0314}, {0x0397, 0x0300}, {0x0397, 0x0301}, {0x0397, 0x0313}, {0x0397, 0x0314}, {0x0397, 0x0345}, {0x0399, 0x0300}, {0x0399, 0x0301}, {0x0399, 0x0304}, {0x0399, 0x0306}, {0x0399, 0x0308}, {0x0399, 0x0313}, {0x0399, 0x0314}, {0x039F, 0x0300}, {0x039F, 0x0301}, {0x039F, 0x0313}, {0x039F, 0x0314}, {0x03A1, 0x0314}, {0x03A5, 0x0300}, {0x03A5, 0x0301}, {0x03A5, 0x0304}, {0x03A5, 0x0306}, {0x03A5, 0x0308}, {0x03A5, 0x0314}, {0x03A9, 0x0300}, {0x03A9, 0x0301}, {0x03A9, 0x0313}, {0x03A9, 0x0314}, {0x03A9, 0x0345}, {0x03AC, 0x0345}, {0x03AE, 0x0345}, {0x03B1, 0x0300}, {0x03B1, 0x0301}, {0x03B1, 0x0304}, {0x03B1, 0x0306}, {0x03B1, 0x0313}, {0x03B1, 0x0314}, {0x03B1, 0x0342}, {0x03B1, 0x0345}, {0x03B5, 0x0300}, {0x03B5, 0x0301}, {0x03B5, 0x0313}, {0x03B5, 0x0314}, {0x03B7, 0x0300}, {0x03B7, 0x0301}, {0x03B7, 0x0313}, {0x03B7, 0x0314}, {0x03B7, 0x0342}, {0x03B7, 0x0345}, {0x03B9, 0x0300}, {0x03B9, 0x0301}, {0x03B9, 0x0304}, {0x03B9, 0x0306}, {0x03B9, 0x0308}, {0x03B9, 0x0313}, {0x03B9, 0x0314}, {0x03B9, 0x0342}, {0x03BF, 0x0300}, {0x03BF, 0x0301}, {0x03BF, 0x0313}, {0x03BF, 0x0314}, {0x03C1, 0x0313}, {0x03C1, 0x0314}, {0x03C5, 0x0300}, {0x03C5, 0x0301}, {0x03C5, 0x0304}, {0x03C5, 0x0306}, {0x03C5, 0x0308}, {0x03C5, 0x0313}, {0x03C5, 0x0314}, {0x03C5, 0x0342}, {0x03C9, 0x0300}, {0x03C9, 0x0301}, {0x03C9, 0x0313}, {0x03C9, 0x0314}, {0x03C9, 0x0342}, {0x03C9, 0x0345}, {0x03CA, 0x0300}, {0x03CA, 0x0301}, {0x03CA, 0x0342}, {0x03CB, 0x0300}, {0x03CB, 0x0301}, {0x03CB, 0x0342}, {0x03CE, 0x0345}, {0x03D2, 0x0301}, {0x03D2, 0x0308}, {0x0406, 0x0308}, {0x0410, 0x0306}, {0x0410, 0x0308}, {0x0413, 0x0301}, {0x0415, 0x0300}, {0x0415, 0x0306}, {0x0415, 0x0308}, {0x0416, 0x0306}, {0x0416, 0x0308}, {0x0417, 0x0308}, {0x0418, 0x0300}, {0x0418, 0x0304}, {0x0418, 0x0306}, {0x0418, 0x0308}, {0x041A, 0x0301}, {0x041E, 0x0308}, {0x0423, 0x0304}, {0x0423, 0x0306}, {0x0423, 0x0308}, {0x0423, 0x030B}, {0x0427, 0x0308}, {0x042B, 0x0308}, {0x042D, 0x0308}, {0x0430, 0x0306}, {0x0430, 0x0308}, {0x0433, 0x0301}, {0x0435, 0x0300}, {0x0435, 0x0306}, {0x0435, 0x0308}, {0x0436, 0x0306}, {0x0436, 0x0308}, {0x0437, 0x0308}, {0x0438, 0x0300}, {0x0438, 0x0304}, {0x0438, 0x0306}, {0x0438, 0x0308}, {0x043A, 0x0301}, {0x043E, 0x0308}, {0x0443, 0x0304}, {0x0443, 0x0306}, {0x0443, 0x0308}, {0x0443, 0x030B}, {0x0447, 0x0308}, {0x044B, 0x0308}, {0x044D, 0x0308}, {0x0456, 0x0308}, {0x0474, 0x030F}, {0x0475, 0x030F}, {0x04D8, 0x0308}, {0x04D9, 0x0308}, {0x04E8, 0x0308}, {0x04E9, 0x0308}, {0x05D9, 0x05B4}, {0x0622, 0x0655}, {0x0623, 0x0655}, {0x0627, 0x0653}, {0x0627, 0x0654}, {0x0627, 0x0655}, {0x0648, 0x0654}, {0x064A, 0x0654}, {0x06C1, 0x0654}, {0x06D2, 0x0654}, {0x06D5, 0x0654}, {0x0928, 0x093C}, {0x0930, 0x093C}, {0x0933, 0x093C}, {0x09C7, 0x09BE}, {0x09C7, 0x09D7}, {0x0B47, 0x0B3E}, {0x0B47, 0x0B56}, {0x0B47, 0x0B57}, {0x0B92, 0x0BD7}, {0x0BC6, 0x0BBE}, {0x0BC6, 0x0BD7}, {0x0BC7, 0x0BBE}, {0x0C46, 0x0C56}, {0x0CBF, 0x0CD5}, {0x0CC6, 0x0CC2}, {0x0CC6, 0x0CD5}, {0x0CC6, 0x0CD6}, {0x0CCA, 0x0CD5}, {0x0D46, 0x0D3E}, {0x0D46, 0x0D57}, {0x0D47, 0x0D3E}, {0x0DD9, 0x0DCA}, {0x0DD9, 0x0DCF}, {0x0DD9, 0x0DDF}, {0x0DDC, 0x0DCA}, {0x1025, 0x102E}, {0x1E00, 0x0328}, {0x1E01, 0x0328}, {0x1E02, 0x0323}, {0x1E02, 0x0331}, {0x1E03, 0x0323}, {0x1E03, 0x0331}, {0x1E0A, 0x0323}, {0x1E0A, 0x0327}, {0x1E0A, 0x032D}, {0x1E0A, 0x0331}, {0x1E0B, 0x0323}, {0x1E0B, 0x0327}, {0x1E0B, 0x032D}, {0x1E0B, 0x0331}, {0x1E0C, 0x0327}, {0x1E0D, 0x0327}, {0x1E0E, 0x0327}, {0x1E0F, 0x0327}, {0x1E12, 0x0327}, {0x1E13, 0x0327}, {0x1E14, 0x0323}, {0x1E14, 0x0327}, {0x1E14, 0x0328}, {0x1E14, 0x032D}, {0x1E14, 0x0330}, {0x1E15, 0x0323}, {0x1E15, 0x0327}, {0x1E15, 0x0328}, {0x1E15, 0x032D}, {0x1E15, 0x0330}, {0x1E16, 0x0323}, {0x1E16, 0x0327}, {0x1E16, 0x0328}, {0x1E16, 0x032D}, {0x1E16, 0x0330}, {0x1E17, 0x0323}, {0x1E17, 0x0327}, {0x1E17, 0x0328}, {0x1E17, 0x032D}, {0x1E17, 0x0330}, {0x1E18, 0x0327}, {0x1E18, 0x0328}, {0x1E19, 0x0327}, {0x1E19, 0x0328}, {0x1E1A, 0x0327}, {0x1E1A, 0x0328}, {0x1E1B, 0x0327}, {0x1E1B, 0x0328}, {0x1E20, 0x0327}, {0x1E21, 0x0327}, {0x1E22, 0x0323}, {0x1E22, 0x0327}, {0x1E22, 0x032E}, {0x1E23, 0x0323}, {0x1E23, 0x0327}, {0x1E23, 0x032E}, {0x1E23, 0x0331}, {0x1E24, 0x0327}, {0x1E25, 0x0327}, {0x1E26, 0x0323}, {0x1E26, 0x0327}, {0x1E26, 0x032E}, {0x1E27, 0x0323}, {0x1E27, 0x0327}, {0x1E27, 0x032E}, {0x1E27, 0x0331}, {0x1E2A, 0x0327}, {0x1E2B, 0x0327}, {0x1E2C, 0x0328}, {0x1E2D, 0x0328}, {0x1E2E, 0x0323}, {0x1E2E, 0x0328}, {0x1E2E, 0x0330}, {0x1E2F, 0x0323}, {0x1E2F, 0x0328}, {0x1E2F, 0x0330}, {0x1E30, 0x0323}, {0x1E30, 0x0327}, {0x1E30, 0x0331}, {0x1E31, 0x0323}, {0x1E31, 0x0327}, {0x1E31, 0x0331}, {0x1E32, 0x0327}, {0x1E33, 0x0327}, {0x1E34, 0x0327}, {0x1E35, 0x0327}, {0x1E36, 0x0304}, {0x1E36, 0x0327}, {0x1E37, 0x0304}, {0x1E37, 0x0327}, {0x1E38, 0x0327}, {0x1E39, 0x0327}, {0x1E3A, 0x0327}, {0x1E3B, 0x0327}, {0x1E3C, 0x0327}, {0x1E3D, 0x0327}, {0x1E3E, 0x0323}, {0x1E3F, 0x0323}, {0x1E40, 0x0323}, {0x1E41, 0x0323}, {0x1E44, 0x0323}, {0x1E44, 0x0327}, {0x1E44, 0x032D}, {0x1E44, 0x0331}, {0x1E45, 0x0323}, {0x1E45, 0x0327}, {0x1E45, 0x032D}, {0x1E45, 0x0331}, {0x1E46, 0x0327}, {0x1E47, 0x0327}, {0x1E48, 0x0327}, {0x1E49, 0x0327}, {0x1E4A, 0x0327}, {0x1E4B, 0x0327}, {0x1E4C, 0x031B}, {0x1E4C, 0x0323}, {0x1E4C, 0x0328}, {0x1E4D, 0x031B}, {0x1E4D, 0x0323}, {0x1E4D, 0x0328}, {0x1E4E, 0x031B}, {0x1E4E, 0x0323}, {0x1E4E, 0x0328}, {0x1E4F, 0x031B}, {0x1E4F, 0x0323}, {0x1E4F, 0x0328}, {0x1E50, 0x031B}, {0x1E50, 0x0323}, {0x1E50, 0x0328}, {0x1E51, 0x031B}, {0x1E51, 0x0323}, {0x1E51, 0x0328}, {0x1E52, 0x031B}, {0x1E52, 0x0323}, {0x1E52, 0x0328}, {0x1E53, 0x031B}, {0x1E53, 0x0323}, {0x1E53, 0x0328}, {0x1E58, 0x0323}, {0x1E58, 0x0327}, {0x1E58, 0x0331}, {0x1E59, 0x0323}, {0x1E59, 0x0327}, {0x1E59, 0x0331}, {0x1E5A, 0x0304}, {0x1E5A, 0x0327}, {0x1E5B, 0x0304}, {0x1E5B, 0x0327}, {0x1E5C, 0x0327}, {0x1E5D, 0x0327}, {0x1E5E, 0x0327}, {0x1E5F, 0x0327}, {0x1E60, 0x0323}, {0x1E60, 0x0326}, {0x1E60, 0x0327}, {0x1E61, 0x0323}, {0x1E61, 0x0326}, {0x1E61, 0x0327}, {0x1E62, 0x0307}, {0x1E62, 0x0327}, {0x1E63, 0x0307}, {0x1E63, 0x0327}, {0x1E64, 0x0323}, {0x1E64, 0x0326}, {0x1E64, 0x0327}, {0x1E65, 0x0323}, {0x1E65, 0x0326}, {0x1E65, 0x0327}, {0x1E66, 0x0323}, {0x1E66, 0x0326}, {0x1E66, 0x0327}, {0x1E67, 0x0323}, {0x1E67, 0x0326}, {0x1E67, 0x0327}, {0x1E68, 0x0327}, {0x1E69, 0x0327}, {0x1E6A, 0x0323}, {0x1E6A, 0x0326}, {0x1E6A, 0x0327}, {0x1E6A, 0x032D}, {0x1E6A, 0x0331}, {0x1E6B, 0x0323}, {0x1E6B, 0x0326}, {0x1E6B, 0x0327}, {0x1E6B, 0x032D}, {0x1E6B, 0x0331}, {0x1E6C, 0x0327}, {0x1E6D, 0x0327}, {0x1E6E, 0x0327}, {0x1E6F, 0x0327}, {0x1E70, 0x0327}, {0x1E71, 0x0327}, {0x1E72, 0x031B}, {0x1E72, 0x0328}, {0x1E73, 0x031B}, {0x1E73, 0x0328}, {0x1E74, 0x031B}, {0x1E74, 0x0328}, {0x1E75, 0x031B}, {0x1E75, 0x0328}, {0x1E76, 0x031B}, {0x1E76, 0x0328}, {0x1E77, 0x031B}, {0x1E77, 0x0328}, {0x1E78, 0x031B}, {0x1E78, 0x0323}, {0x1E78, 0x0324}, {0x1E78, 0x0328}, {0x1E78, 0x032D}, {0x1E78, 0x0330}, {0x1E79, 0x031B}, {0x1E79, 0x0323}, {0x1E79, 0x0324}, {0x1E79, 0x0328}, {0x1E79, 0x032D}, {0x1E79, 0x0330}, {0x1E7A, 0x031B}, {0x1E7A, 0x0323}, {0x1E7A, 0x0324}, {0x1E7A, 0x0328}, {0x1E7A, 0x032D}, {0x1E7A, 0x0330}, {0x1E7B, 0x031B}, {0x1E7B, 0x0323}, {0x1E7B, 0x0324}, {0x1E7B, 0x0328}, {0x1E7B, 0x032D}, {0x1E7B, 0x0330}, {0x1E7C, 0x0323}, {0x1E7D, 0x0323}, {0x1E80, 0x0323}, {0x1E81, 0x0323}, {0x1E82, 0x0323}, {0x1E83, 0x0323}, {0x1E84, 0x0323}, {0x1E85, 0x0323}, {0x1E86, 0x0323}, {0x1E87, 0x0323}, {0x1E8E, 0x0323}, {0x1E8F, 0x0323}, {0x1E90, 0x0323}, {0x1E90, 0x0331}, {0x1E91, 0x0323}, {0x1E91, 0x0331}, {0x1E96, 0x0327}, {0x1E97, 0x0323}, {0x1E97, 0x0326}, {0x1E97, 0x0327}, {0x1E97, 0x032D}, {0x1E97, 0x0331}, {0x1E98, 0x0323}, {0x1E99, 0x0323}, {0x1EA0, 0x0302}, {0x1EA0, 0x0306}, {0x1EA0, 0x0328}, {0x1EA1, 0x0302}, {0x1EA1, 0x0306}, {0x1EA1, 0x0328}, {0x1EA2, 0x0323}, {0x1EA2, 0x0325}, {0x1EA2, 0x0328}, {0x1EA3, 0x0323}, {0x1EA3, 0x0325}, {0x1EA3, 0x0328}, {0x1EA4, 0x0323}, {0x1EA4, 0x0325}, {0x1EA4, 0x0328}, {0x1EA5, 0x0323}, {0x1EA5, 0x0325}, {0x1EA5, 0x0328}, {0x1EA6, 0x0323}, {0x1EA6, 0x0325}, {0x1EA6, 0x0328}, {0x1EA7, 0x0323}, {0x1EA7, 0x0325}, {0x1EA7, 0x0328}, {0x1EA8, 0x0323}, {0x1EA8, 0x0325}, {0x1EA8, 0x0328}, {0x1EA9, 0x0323}, {0x1EA9, 0x0325}, {0x1EA9, 0x0328}, {0x1EAA, 0x0323}, {0x1EAA, 0x0325}, {0x1EAA, 0x0328}, {0x1EAB, 0x0323}, {0x1EAB, 0x0325}, {0x1EAB, 0x0328}, {0x1EAC, 0x0328}, {0x1EAD, 0x0328}, {0x1EAE, 0x0323}, {0x1EAE, 0x0325}, {0x1EAE, 0x0328}, {0x1EAF, 0x0323}, {0x1EAF, 0x0325}, {0x1EAF, 0x0328}, {0x1EB0, 0x0323}, {0x1EB0, 0x0325}, {0x1EB0, 0x0328}, {0x1EB1, 0x0323}, {0x1EB1, 0x0325}, {0x1EB1, 0x0328}, {0x1EB2, 0x0323}, {0x1EB2, 0x0325}, {0x1EB2, 0x0328}, {0x1EB3, 0x0323}, {0x1EB3, 0x0325}, {0x1EB3, 0x0328}, {0x1EB4, 0x0323}, {0x1EB4, 0x0325}, {0x1EB4, 0x0328}, {0x1EB5, 0x0323}, {0x1EB5, 0x0325}, {0x1EB5, 0x0328}, {0x1EB6, 0x0328}, {0x1EB7, 0x0328}, {0x1EB8, 0x0302}, {0x1EB8, 0x0327}, {0x1EB8, 0x0328}, {0x1EB9, 0x0302}, {0x1EB9, 0x0327}, {0x1EB9, 0x0328}, {0x1EBA, 0x0323}, {0x1EBA, 0x0327}, {0x1EBA, 0x0328}, {0x1EBA, 0x032D}, {0x1EBA, 0x0330}, {0x1EBB, 0x0323}, {0x1EBB, 0x0327}, {0x1EBB, 0x0328}, {0x1EBB, 0x032D}, {0x1EBB, 0x0330}, {0x1EBC, 0x0323}, {0x1EBC, 0x0327}, {0x1EBC, 0x0328}, {0x1EBC, 0x032D}, {0x1EBC, 0x0330}, {0x1EBD, 0x0323}, {0x1EBD, 0x0327}, {0x1EBD, 0x0328}, {0x1EBD, 0x032D}, {0x1EBD, 0x0330}, {0x1EBE, 0x0323}, {0x1EBE, 0x0327}, {0x1EBE, 0x0328}, {0x1EBE, 0x032D}, {0x1EBE, 0x0330}, {0x1EBF, 0x0323}, {0x1EBF, 0x0327}, {0x1EBF, 0x0328}, {0x1EBF, 0x032D}, {0x1EBF, 0x0330}, {0x1EC0, 0x0323}, {0x1EC0, 0x0327}, {0x1EC0, 0x0328}, {0x1EC0, 0x032D}, {0x1EC0, 0x0330}, {0x1EC1, 0x0323}, {0x1EC1, 0x0327}, {0x1EC1, 0x0328}, {0x1EC1, 0x032D}, {0x1EC1, 0x0330}, {0x1EC2, 0x0323}, {0x1EC2, 0x0327}, {0x1EC2, 0x0328}, {0x1EC2, 0x032D}, {0x1EC2, 0x0330}, {0x1EC3, 0x0323}, {0x1EC3, 0x0327}, {0x1EC3, 0x0328}, {0x1EC3, 0x032D}, {0x1EC3, 0x0330}, {0x1EC4, 0x0323}, {0x1EC4, 0x0327}, {0x1EC4, 0x0328}, {0x1EC4, 0x032D}, {0x1EC4, 0x0330}, {0x1EC5, 0x0323}, {0x1EC5, 0x0327}, {0x1EC5, 0x0328}, {0x1EC5, 0x032D}, {0x1EC5, 0x0330}, {0x1EC6, 0x0327}, {0x1EC6, 0x0328}, {0x1EC7, 0x0327}, {0x1EC7, 0x0328}, {0x1EC8, 0x0323}, {0x1EC8, 0x0328}, {0x1EC8, 0x0330}, {0x1EC9, 0x0323}, {0x1EC9, 0x0328}, {0x1EC9, 0x0330}, {0x1ECA, 0x0328}, {0x1ECB, 0x0328}, {0x1ECC, 0x0302}, {0x1ECC, 0x031B}, {0x1ECC, 0x0328}, {0x1ECD, 0x0302}, {0x1ECD, 0x031B}, {0x1ECD, 0x0328}, {0x1ECE, 0x031B}, {0x1ECE, 0x0323}, {0x1ECE, 0x0328}, {0x1ECF, 0x031B}, {0x1ECF, 0x0323}, {0x1ECF, 0x0328}, {0x1ED0, 0x031B}, {0x1ED0, 0x0323}, {0x1ED0, 0x0328}, {0x1ED1, 0x031B}, {0x1ED1, 0x0323}, {0x1ED1, 0x0328}, {0x1ED2, 0x031B}, {0x1ED2, 0x0323}, {0x1ED2, 0x0328}, {0x1ED3, 0x031B}, {0x1ED3, 0x0323}, {0x1ED3, 0x0328}, {0x1ED4, 0x031B}, {0x1ED4, 0x0323}, {0x1ED4, 0x0328}, {0x1ED5, 0x031B}, {0x1ED5, 0x0323}, {0x1ED5, 0x0328}, {0x1ED6, 0x031B}, {0x1ED6, 0x0323}, {0x1ED6, 0x0328}, {0x1ED7, 0x031B}, {0x1ED7, 0x0323}, {0x1ED7, 0x0328}, {0x1ED8, 0x031B}, {0x1ED8, 0x0328}, {0x1ED9, 0x031B}, {0x1ED9, 0x0328}, {0x1EDA, 0x0323}, {0x1EDA, 0x0328}, {0x1EDB, 0x0323}, {0x1EDB, 0x0328}, {0x1EDC, 0x0323}, {0x1EDC, 0x0328}, {0x1EDD, 0x0323}, {0x1EDD, 0x0328}, {0x1EDE, 0x0323}, {0x1EDE, 0x0328}, {0x1EDF, 0x0323}, {0x1EDF, 0x0328}, {0x1EE0, 0x0323}, {0x1EE0, 0x0328}, {0x1EE1, 0x0323}, {0x1EE1, 0x0328}, {0x1EE2, 0x0328}, {0x1EE3, 0x0328}, {0x1EE4, 0x031B}, {0x1EE4, 0x0328}, {0x1EE5, 0x031B}, {0x1EE5, 0x0328}, {0x1EE6, 0x031B}, {0x1EE6, 0x0323}, {0x1EE6, 0x0324}, {0x1EE6, 0x0328}, {0x1EE6, 0x032D}, {0x1EE6, 0x0330}, {0x1EE7, 0x031B}, {0x1EE7, 0x0323}, {0x1EE7, 0x0324}, {0x1EE7, 0x0328}, {0x1EE7, 0x032D}, {0x1EE7, 0x0330}, {0x1EE8, 0x0323}, {0x1EE8, 0x0328}, {0x1EE9, 0x0323}, {0x1EE9, 0x0328}, {0x1EEA, 0x0323}, {0x1EEA, 0x0328}, {0x1EEB, 0x0323}, {0x1EEB, 0x0328}, {0x1EEC, 0x0323}, {0x1EEC, 0x0328}, {0x1EED, 0x0323}, {0x1EED, 0x0328}, {0x1EEE, 0x0323}, {0x1EEE, 0x0328}, {0x1EEF, 0x0323}, {0x1EEF, 0x0328}, {0x1EF0, 0x0328}, {0x1EF1, 0x0328}, {0x1EF2, 0x0323}, {0x1EF3, 0x0323}, {0x1EF6, 0x0323}, {0x1EF7, 0x0323}, {0x1EF8, 0x0323}, {0x1EF9, 0x0323}, {0x1F00, 0x0300}, {0x1F00, 0x0301}, {0x1F00, 0x0342}, {0x1F00, 0x0345}, {0x1F01, 0x0300}, {0x1F01, 0x0301}, {0x1F01, 0x0342}, {0x1F01, 0x0345}, {0x1F02, 0x0345}, {0x1F03, 0x0345}, {0x1F04, 0x0345}, {0x1F05, 0x0345}, {0x1F06, 0x0345}, {0x1F07, 0x0345}, {0x1F08, 0x0300}, {0x1F08, 0x0301}, {0x1F08, 0x0342}, {0x1F08, 0x0345}, {0x1F09, 0x0300}, {0x1F09, 0x0301}, {0x1F09, 0x0342}, {0x1F09, 0x0345}, {0x1F0A, 0x0345}, {0x1F0B, 0x0345}, {0x1F0C, 0x0345}, {0x1F0D, 0x0345}, {0x1F0E, 0x0345}, {0x1F0F, 0x0345}, {0x1F10, 0x0300}, {0x1F10, 0x0301}, {0x1F11, 0x0300}, {0x1F11, 0x0301}, {0x1F18, 0x0300}, {0x1F18, 0x0301}, {0x1F19, 0x0300}, {0x1F19, 0x0301}, {0x1F20, 0x0300}, {0x1F20, 0x0301}, {0x1F20, 0x0342}, {0x1F20, 0x0345}, {0x1F21, 0x0300}, {0x1F21, 0x0301}, {0x1F21, 0x0342}, {0x1F21, 0x0345}, {0x1F22, 0x0345}, {0x1F23, 0x0345}, {0x1F24, 0x0345}, {0x1F25, 0x0345}, {0x1F26, 0x0345}, {0x1F27, 0x0345}, {0x1F28, 0x0300}, {0x1F28, 0x0301}, {0x1F28, 0x0342}, {0x1F28, 0x0345}, {0x1F29, 0x0300}, {0x1F29, 0x0301}, {0x1F29, 0x0342}, {0x1F29, 0x0345}, {0x1F2A, 0x0345}, {0x1F2B, 0x0345}, {0x1F2C, 0x0345}, {0x1F2D, 0x0345}, {0x1F2E, 0x0345}, {0x1F2F, 0x0345}, {0x1F30, 0x0300}, {0x1F30, 0x0301}, {0x1F30, 0x0342}, {0x1F31, 0x0300}, {0x1F31, 0x0301}, {0x1F31, 0x0342}, {0x1F38, 0x0300}, {0x1F38, 0x0301}, {0x1F38, 0x0342}, {0x1F39, 0x0300}, {0x1F39, 0x0301}, {0x1F39, 0x0342}, {0x1F40, 0x0300}, {0x1F40, 0x0301}, {0x1F41, 0x0300}, {0x1F41, 0x0301}, {0x1F48, 0x0300}, {0x1F48, 0x0301}, {0x1F49, 0x0300}, {0x1F49, 0x0301}, {0x1F50, 0x0300}, {0x1F50, 0x0301}, {0x1F50, 0x0342}, {0x1F51, 0x0300}, {0x1F51, 0x0301}, {0x1F51, 0x0342}, {0x1F59, 0x0300}, {0x1F59, 0x0301}, {0x1F59, 0x0342}, {0x1F60, 0x0300}, {0x1F60, 0x0301}, {0x1F60, 0x0342}, {0x1F60, 0x0345}, {0x1F61, 0x0300}, {0x1F61, 0x0301}, {0x1F61, 0x0342}, {0x1F61, 0x0345}, {0x1F62, 0x0345}, {0x1F63, 0x0345}, {0x1F64, 0x0345}, {0x1F65, 0x0345}, {0x1F66, 0x0345}, {0x1F67, 0x0345}, {0x1F68, 0x0300}, {0x1F68, 0x0301}, {0x1F68, 0x0342}, {0x1F68, 0x0345}, {0x1F69, 0x0300}, {0x1F69, 0x0301}, {0x1F69, 0x0342}, {0x1F69, 0x0345}, {0x1F6A, 0x0345}, {0x1F6B, 0x0345}, {0x1F6C, 0x0345}, {0x1F6D, 0x0345}, {0x1F6E, 0x0345}, {0x1F6F, 0x0345}, {0x1F70, 0x0345}, {0x1F74, 0x0345}, {0x1F7C, 0x0345}, {0x1F80, 0x0300}, {0x1F80, 0x0301}, {0x1F80, 0x0342}, {0x1F81, 0x0300}, {0x1F81, 0x0301}, {0x1F81, 0x0342}, {0x1F88, 0x0300}, {0x1F88, 0x0301}, {0x1F88, 0x0342}, {0x1F89, 0x0300}, {0x1F89, 0x0301}, {0x1F89, 0x0342}, {0x1F90, 0x0300}, {0x1F90, 0x0301}, {0x1F90, 0x0342}, {0x1F91, 0x0300}, {0x1F91, 0x0301}, {0x1F91, 0x0342}, {0x1F98, 0x0300}, {0x1F98, 0x0301}, {0x1F98, 0x0342}, {0x1F99, 0x0300}, {0x1F99, 0x0301}, {0x1F99, 0x0342}, {0x1FA0, 0x0300}, {0x1FA0, 0x0301}, {0x1FA0, 0x0342}, {0x1FA1, 0x0300}, {0x1FA1, 0x0301}, {0x1FA1, 0x0342}, {0x1FA8, 0x0300}, {0x1FA8, 0x0301}, {0x1FA8, 0x0342}, {0x1FA9, 0x0300}, {0x1FA9, 0x0301}, {0x1FA9, 0x0342}, {0x1FB3, 0x0300}, {0x1FB3, 0x0301}, {0x1FB3, 0x0304}, {0x1FB3, 0x0306}, {0x1FB3, 0x0313}, {0x1FB3, 0x0314}, {0x1FB3, 0x0342}, {0x1FB6, 0x0345}, {0x1FBC, 0x0300}, {0x1FBC, 0x0301}, {0x1FBC, 0x0304}, {0x1FBC, 0x0306}, {0x1FBC, 0x0313}, {0x1FBC, 0x0314}, {0x1FBF, 0x0300}, {0x1FBF, 0x0301}, {0x1FBF, 0x0342}, {0x1FC3, 0x0300}, {0x1FC3, 0x0301}, {0x1FC3, 0x0313}, {0x1FC3, 0x0314}, {0x1FC3, 0x0342}, {0x1FC6, 0x0345}, {0x1FCC, 0x0300}, {0x1FCC, 0x0301}, {0x1FCC, 0x0313}, {0x1FCC, 0x0314}, {0x1FF3, 0x0300}, {0x1FF3, 0x0301}, {0x1FF3, 0x0313}, {0x1FF3, 0x0314}, {0x1FF3, 0x0342}, {0x1FF6, 0x0345}, {0x1FFC, 0x0300}, {0x1FFC, 0x0301}, {0x1FFC, 0x0313}, {0x1FFC, 0x0314}, {0x1FFE, 0x0300}, {0x1FFE, 0x0301}, {0x1FFE, 0x0342}, {0x2190, 0x0338}, {0x2192, 0x0338}, {0x2194, 0x0338}, {0x21D0, 0x0338}, {0x21D2, 0x0338}, {0x21D4, 0x0338}, {0x2203, 0x0338}, {0x2208, 0x0338}, {0x220B, 0x0338}, {0x2223, 0x0338}, {0x2225, 0x0338}, {0x223C, 0x0338}, {0x2243, 0x0338}, {0x2245, 0x0338}, {0x2248, 0x0338}, {0x224D, 0x0338}, {0x2261, 0x0338}, {0x2264, 0x0338}, {0x2265, 0x0338}, {0x2272, 0x0338}, {0x2273, 0x0338}, {0x2276, 0x0338}, {0x2277, 0x0338}, {0x227A, 0x0338}, {0x227B, 0x0338}, {0x227C, 0x0338}, {0x227D, 0x0338}, {0x2282, 0x0338}, {0x2283, 0x0338}, {0x2286, 0x0338}, {0x2287, 0x0338}, {0x2291, 0x0338}, {0x2292, 0x0338}, {0x22A2, 0x0338}, {0x22A8, 0x0338}, {0x22A9, 0x0338}, {0x22AB, 0x0338}, {0x22B2, 0x0338}, {0x22B3, 0x0338}, {0x22B4, 0x0338}, {0x22B5, 0x0338}, {0x3046, 0x3099}, {0x304B, 0x3099}, {0x304D, 0x3099}, {0x304F, 0x3099}, {0x3051, 0x3099}, {0x3053, 0x3099}, {0x3055, 0x3099}, {0x3057, 0x3099}, {0x3059, 0x3099}, {0x305B, 0x3099}, {0x305D, 0x3099}, {0x305F, 0x3099}, {0x3061, 0x3099}, {0x3064, 0x3099}, {0x3066, 0x3099}, {0x3068, 0x3099}, {0x306F, 0x3099}, {0x306F, 0x309A}, {0x3072, 0x3099}, {0x3072, 0x309A}, {0x3075, 0x3099}, {0x3075, 0x309A}, {0x3078, 0x3099}, {0x3078, 0x309A}, {0x307B, 0x3099}, {0x307B, 0x309A}, {0x309D, 0x3099}, {0x30A6, 0x3099}, {0x30AB, 0x3099}, {0x30AD, 0x3099}, {0x30AF, 0x3099}, {0x30B1, 0x3099}, {0x30B3, 0x3099}, {0x30B5, 0x3099}, {0x30B7, 0x3099}, {0x30B9, 0x3099}, {0x30BB, 0x3099}, {0x30BD, 0x3099}, {0x30BF, 0x3099}, {0x30C1, 0x3099}, {0x30C4, 0x3099}, {0x30C6, 0x3099}, {0x30C8, 0x3099}, {0x30CF, 0x3099}, {0x30CF, 0x309A}, {0x30D2, 0x3099}, {0x30D2, 0x309A}, {0x30D5, 0x3099}, {0x30D5, 0x309A}, {0x30D8, 0x3099}, {0x30D8, 0x309A}, {0x30DB, 0x3099}, {0x30DB, 0x309A}, {0x30EF, 0x3099}, {0x30F0, 0x3099}, {0x30F1, 0x3099}, {0x30F2, 0x3099}, {0x30FD, 0x3099}, {0xFFFF, 0xFFFF} /* cieling off */ }; /* one 4-bit flag per code U+0 to U+108FF, U+1D000 to U+1D7FF, packed * 2 per byte with the flag for the first code in the lower 4 bits */ const u8 raptor_nfc_flags[RAPTOR_NFC_CODE_FLAGS_COUNT] = { /* U+0000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0038 */ simp*16+simp, simp*16+simp, Base*16+Base, Base*16+simp, /* U+0040 */ simp*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0048 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0050 */ Base*16+simp, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0058 */ Base*16+Base, Base*16+simp, simp*16+simp, simp*16+simp, /* U+0060 */ simp*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0068 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0070 */ Base*16+simp, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0078 */ Base*16+Base, Base*16+simp, simp*16+simp, simp*16+simp, /* U+0080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+00A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+00A8 */ Base*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+00B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+00B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+00C0 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+00C8 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+00D0 */ simp*16+Base, Base*16+Base, Base*16+Base, Base*16+simp, /* U+00D8 */ Base*16+Base, Base*16+Base, Base*16+Base, simp*16+simp, /* U+00E0 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+00E8 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+00F0 */ simp*16+Base, Base*16+Base, Base*16+Base, Base*16+simp, /* U+00F8 */ Base*16+Base, Base*16+Base, Base*16+Base, simp*16+Base, /* U+0100 */ Base*16+Base, Base*16+Base, simp*16+simp, Base*16+Base, /* U+0108 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0110 */ simp*16+simp, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0118 */ simp*16+simp, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0120 */ Base*16+Base, simp*16+simp, Base*16+Base, simp*16+simp, /* U+0128 */ Base*16+Base, Base*16+Base, Base*16+Base, simp*16+simp, /* U+0130 */ Base*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0138 */ simp*16+Base, Base*16+simp, simp*16+Base, Base*16+simp, /* U+0140 */ simp*16+simp, simp*16+Base, Base*16+simp, simp*16+Base, /* U+0148 */ Base*16+simp, simp*16+simp, Base*16+Base, Base*16+Base, /* U+0150 */ Base*16+Base, simp*16+simp, Base*16+Base, simp*16+simp, /* U+0158 */ Base*16+Base, Base*16+Base, Base*16+Base, simp*16+simp, /* U+0160 */ Base*16+Base, simp*16+simp, Base*16+Base, simp*16+simp, /* U+0168 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0170 */ Base*16+Base, simp*16+simp, Base*16+Base, Base*16+Base, /* U+0178 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+01A0 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+01A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+Base, /* U+01B0 */ Base*16+simp, simp*16+simp, simp*16+simp, simp*16+Base, /* U+01B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+01C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+01C8 */ simp*16+simp, simp*16+simp, simp*16+Base, Base*16+Base, /* U+01D0 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+01D8 */ Base*16+Base, Base*16+Base, Base*16+simp, Base*16+Base, /* U+01E0 */ Base*16+Base, simp*16+simp, simp*16+simp, Base*16+Base, /* U+01E8 */ Base*16+Base, Base*16+Base, simp*16+simp, simp*16+simp, /* U+01F0 */ simp*16+simp, simp*16+simp, Base*16+Base, simp*16+simp, /* U+01F8 */ Base*16+Base, Base*16+Base, simp*16+simp, simp*16+simp, /* U+0200 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0208 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0210 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0218 */ Base*16+Base, Base*16+Base, simp*16+simp, Base*16+Base, /* U+0220 */ simp*16+simp, simp*16+simp, simp*16+simp, Base*16+Base, /* U+0228 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+0230 */ Base*16+Base, Base*16+Base, simp*16+simp, simp*16+NoNo, /* U+0238 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0240 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0248 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0290 */ simp*16+simp, Base*16+simp, simp*16+simp, simp*16+simp, /* U+0298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+02F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0300 */ ReCo*16+ReCo, ReCo*16+ReCo, ReCo*16+NoRe, ReCo*16+ReCo, /* U+0308 */ ReCo*16+ReCo, ReCo*16+ReCo, ReCo*16+NoRe, NoRe*16+ReCo, /* U+0310 */ NoRe*16+ReCo, NoRe*16+ReCo, ReCo*16+NoRe, NoRe*16+NoRe, /* U+0318 */ NoRe*16+NoRe, NoRe*16+ReCo, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0320 */ NoRe*16+NoRe, NoRe*16+ReCo, ReCo*16+ReCo, ReCo*16+ReCo, /* U+0328 */ ReCo*16+NoRe, NoRe*16+NoRe, NoRe*16+ReCo, ReCo*16+NoRe, /* U+0330 */ ReCo*16+ReCo, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0338 */ ReCo*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0340 */ NOFC*16+NOFC, ReCo*16+NOFC, NOFC*16+ReCo, NoRe*16+NoRe, /* U+0348 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+simp, /* U+0350 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0358 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoRe, NoRe*16+NoRe, /* U+0360 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0368 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0370 */ NoNo*16+NoNo, NoNo*16+NoNo, NOFC*16+simp, NoNo*16+NoNo, /* U+0378 */ NoNo*16+NoNo, simp*16+NoNo, NoNo*16+NoNo, NOFC*16+NoNo, /* U+0380 */ NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, simp*16+NOFC, /* U+0388 */ simp*16+simp, simp*16+NoNo, simp*16+NoNo, simp*16+simp, /* U+0390 */ simp*16+Base, simp*16+simp, simp*16+Base, simp*16+Base, /* U+0398 */ simp*16+Base, simp*16+simp, simp*16+simp, simp*16+Base, /* U+03A0 */ simp*16+Base, NoNo*16+simp, simp*16+Base, simp*16+simp, /* U+03A8 */ simp*16+Base, simp*16+simp, Base*16+simp, Base*16+simp, /* U+03B0 */ simp*16+Base, simp*16+simp, simp*16+Base, simp*16+Base, /* U+03B8 */ simp*16+Base, simp*16+simp, simp*16+simp, simp*16+Base, /* U+03C0 */ simp*16+Base, simp*16+simp, simp*16+Base, simp*16+simp, /* U+03C8 */ simp*16+Base, Base*16+Base, simp*16+simp, Base*16+NoNo, /* U+03D0 */ simp*16+simp, Base*16+simp, simp*16+simp, simp*16+simp, /* U+03D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+03E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+03E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+03F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+03F8 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0400 */ simp*16+simp, simp*16+simp, simp*16+simp, Base*16+simp, /* U+0408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0410 */ Base*16+simp, simp*16+Base, simp*16+Base, Base*16+Base, /* U+0418 */ Base*16+simp, Base*16+simp, simp*16+simp, Base*16+simp, /* U+0420 */ simp*16+simp, simp*16+Base, simp*16+simp, simp*16+Base, /* U+0428 */ simp*16+simp, simp*16+Base, simp*16+Base, simp*16+simp, /* U+0430 */ Base*16+simp, simp*16+Base, simp*16+Base, Base*16+Base, /* U+0438 */ Base*16+simp, Base*16+simp, simp*16+simp, Base*16+simp, /* U+0440 */ simp*16+simp, simp*16+Base, simp*16+simp, simp*16+Base, /* U+0448 */ simp*16+simp, simp*16+Base, simp*16+Base, simp*16+simp, /* U+0450 */ simp*16+simp, simp*16+simp, simp*16+simp, Base*16+simp, /* U+0458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0470 */ simp*16+simp, simp*16+simp, Base*16+Base, simp*16+simp, /* U+0478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0480 */ simp*16+simp, simp*16+NoRe, NoRe*16+NoRe, NoRe*16+NoNo, /* U+0488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+04D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04D8 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04E8 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+04F0 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+04F8 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0510 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0518 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0520 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0528 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0530 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+0558 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0560 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0588 */ NoNo*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0590 */ NoNo*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0598 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+05A0 */ NoRe*16+NoRe, NoNo*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+05A8 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+05B0 */ NoRe*16+NoRe, NoRe*16+NoRe, ReCo*16+NoRe, NoRe*16+NoRe, /* U+05B8 */ NoRe*16+NoRe, NoNo*16+NoRe, NoRe*16+NoRe, simp*16+NoRe, /* U+05C0 */ simp*16+NoRe, NoRe*16+simp, NoRe*16+NoNo, NoNo*16+NoNo, /* U+05C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+05D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+05D8 */ simp*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+05E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+05E8 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+05F0 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+05F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0600 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0608 */ NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, simp*16+simp, /* U+0610 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoNo*16+NoNo, /* U+0618 */ NoNo*16+NoNo, NoNo*16+simp, NoNo*16+NoNo, NoNo*16+simp, /* U+0620 */ NoNo*16+simp, Base*16+Base, simp*16+simp, simp*16+Base, /* U+0628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0638 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0648 */ Base*16+simp, Base*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0650 */ NoRe*16+NoRe, NoRe*16+ReCo, ReCo*16+ReCo, NoRe*16+NoRe, /* U+0658 */ NoRe*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0670 */ NoRe*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+06A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+06A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+06B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+06B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+06C0 */ simp*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+06C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+06D0 */ simp*16+simp, Base*16+simp, simp*16+Base, NoRe*16+NoRe, /* U+06D8 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+simp, simp*16+NoRe, /* U+06E0 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+simp, simp*16+NoRe, /* U+06E8 */ NoRe*16+simp, NoRe*16+NoRe, NoRe*16+NoRe, simp*16+simp, /* U+06F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+06F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0708 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+simp, /* U+0710 */ simp*16+NoRe, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0730 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0738 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0740 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+0748 */ NoRe*16+NoRe, NoRe*16+NoNo, NoNo*16+simp, simp*16+simp, /* U+0750 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0758 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0760 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0768 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0770 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0778 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+07A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+07A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+07B0 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+07B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+07C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+07C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+07D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+07D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+07E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+07E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+07F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+07F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0800 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0808 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0810 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0818 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0820 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0828 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0830 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0838 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0840 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0848 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0850 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0858 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0860 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0868 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0870 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0878 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0880 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0888 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0890 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0898 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+08F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0900 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0928 */ Base*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0930 */ Base*16+simp, simp*16+Base, simp*16+simp, simp*16+simp, /* U+0938 */ simp*16+simp, NoNo*16+NoNo, ReCo*16+simp, simp*16+simp, /* U+0940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0948 */ simp*16+simp, simp*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+0950 */ simp*16+NoRe, NoRe*16+NoRe, NoRe*16+NoNo, NoNo*16+NoNo, /* U+0958 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+0960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0970 */ simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0978 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0980 */ NoNo*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0988 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+simp, /* U+0990 */ simp*16+NoNo, NoNo*16+simp, simp*16+simp, simp*16+simp, /* U+0998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+09A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+09A8 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+09B0 */ simp*16+NoNo, simp*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+09B8 */ simp*16+simp, NoNo*16+NoNo, NoRe*16+simp, COM0*16+simp, /* U+09C0 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+Base, /* U+09C8 */ simp*16+NoNo, NoNo*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+09D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+COM0, /* U+09D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NOFC*16+NOFC, NoNo*16+NOFC, /* U+09E0 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, simp*16+simp, /* U+09E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+09F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+09F8 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0A00 */ NoNo*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0A08 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+simp, /* U+0A10 */ simp*16+NoNo, NoNo*16+simp, simp*16+simp, simp*16+simp, /* U+0A18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0A20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0A28 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0A30 */ simp*16+NoNo, simp*16+NOFC, NoNo*16+simp, NOFC*16+NoNo, /* U+0A38 */ simp*16+simp, NoNo*16+NoNo, NoRe*16+NoNo, simp*16+simp, /* U+0A40 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+simp, /* U+0A48 */ simp*16+NoNo, NoNo*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+0A50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0A58 */ NoNo*16+NOFC, NOFC*16+NOFC, simp*16+NoNo, NOFC*16+NoNo, /* U+0A60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+0A68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0A70 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+0A78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0A80 */ NoNo*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0A88 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+simp, /* U+0A90 */ simp*16+simp, NoNo*16+simp, simp*16+simp, simp*16+simp, /* U+0A98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0AA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0AA8 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0AB0 */ simp*16+NoNo, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0AB8 */ simp*16+simp, NoNo*16+NoNo, NoRe*16+simp, simp*16+simp, /* U+0AC0 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+simp, /* U+0AC8 */ simp*16+simp, NoNo*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+0AD0 */ simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0AD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0AE0 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, simp*16+simp, /* U+0AE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0AF0 */ NoNo*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0AF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0B00 */ NoNo*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0B08 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+simp, /* U+0B10 */ simp*16+NoNo, NoNo*16+simp, simp*16+simp, simp*16+simp, /* U+0B18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0B20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0B28 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0B30 */ simp*16+NoNo, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0B38 */ simp*16+simp, NoNo*16+NoNo, NoRe*16+simp, COM0*16+simp, /* U+0B40 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+Base, /* U+0B48 */ simp*16+NoNo, NoNo*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+0B50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, COM0*16+COM0, /* U+0B58 */ NoNo*16+NoNo, NoNo*16+NoNo, NOFC*16+NOFC, NoNo*16+simp, /* U+0B60 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+0B68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0B70 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0B78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0B80 */ NoNo*16+NoNo, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0B88 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+0B90 */ simp*16+NoNo, Base*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+0B98 */ NoNo*16+simp, simp*16+NoNo, simp*16+NoNo, simp*16+simp, /* U+0BA0 */ NoNo*16+NoNo, NoNo*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+0BA8 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+0BB0 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+simp, /* U+0BB8 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, COM0*16+simp, /* U+0BC0 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, Base*16+Base, /* U+0BC8 */ simp*16+NoNo, simp*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+0BD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+COM0, /* U+0BD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0BE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+simp, /* U+0BE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0BF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0BF8 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0C00 */ NoNo*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0C08 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+0C10 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0C18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0C20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0C28 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0C30 */ simp*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0C38 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+0C40 */ simp*16+simp, simp*16+simp, simp*16+NoNo, Base*16+simp, /* U+0C48 */ simp*16+NoNo, simp*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+0C50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoRe, ReCo*16+NoNo, /* U+0C58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0C60 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+0C68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0C70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0C78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0C80 */ NoNo*16+NoNo, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0C88 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+0C90 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0C98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0CA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0CA8 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0CB0 */ simp*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0CB8 */ simp*16+simp, NoNo*16+NoNo, NoRe*16+simp, simp*16+Base, /* U+0CC0 */ simp*16+simp, COM0*16+simp, simp*16+NoNo, Base*16+simp, /* U+0CC8 */ simp*16+NoNo, Base*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+0CD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+COM0, COM0*16+NoNo, /* U+0CD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, simp*16+NoNo, /* U+0CE0 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+0CE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0CF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0CF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0D00 */ NoNo*16+NoNo, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0D08 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+0D10 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0D18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0D20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0D28 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0D30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0D38 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, COM0*16+simp, /* U+0D40 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, Base*16+Base, /* U+0D48 */ simp*16+NoNo, simp*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+0D50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+COM0, /* U+0D58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0D60 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+0D68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0D70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0D78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0D80 */ NoNo*16+NoNo, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0D88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0D90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+0D98 */ NoNo*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0DA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0DA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0DB0 */ simp*16+simp, NoNo*16+simp, simp*16+simp, simp*16+simp, /* U+0DB8 */ simp*16+simp, simp*16+simp, NoNo*16+simp, NoNo*16+NoNo, /* U+0DC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+0DC8 */ NoNo*16+NoNo, ReCo*16+NoNo, NoNo*16+NoNo, NoNo*16+COM0, /* U+0DD0 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+NoNo, /* U+0DD8 */ simp*16+Base, simp*16+simp, Base*16+simp, simp*16+COM0, /* U+0DE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0DE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0DF0 */ NoNo*16+NoNo, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+0DF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0E00 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0E08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0E10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0E18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0E20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0E28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0E30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0E38 */ NoRe*16+NoRe, NoRe*16+NoNo, NoNo*16+NoNo, NoNo*16+simp, /* U+0E40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0E48 */ NoRe*16+NoRe, NoRe*16+NoRe, simp*16+simp, simp*16+simp, /* U+0E50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0E58 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0E60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0E68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0E70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0E78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0E80 */ NoNo*16+simp, simp*16+NoNo, simp*16+NoNo, NoNo*16+simp, /* U+0E88 */ simp*16+NoNo, simp*16+NoNo, NoNo*16+simp, NoNo*16+NoNo, /* U+0E90 */ NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, simp*16+simp, /* U+0E98 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0EA0 */ NoNo*16+simp, simp*16+simp, NoNo*16+simp, NoNo*16+simp, /* U+0EA8 */ NoNo*16+NoNo, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+0EB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0EB8 */ NoRe*16+NoRe, NoNo*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+0EC0 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+NoNo, /* U+0EC8 */ NoRe*16+NoRe, NoRe*16+NoRe, simp*16+simp, NoNo*16+NoNo, /* U+0ED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0ED8 */ simp*16+simp, NoNo*16+NoNo, simp*16+simp, NoNo*16+NoNo, /* U+0EE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0EE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0EF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0EF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0F00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0F08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0F10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0F18 */ NoRe*16+NoRe, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0F20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0F28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0F30 */ simp*16+simp, simp*16+simp, simp*16+NoRe, simp*16+NoRe, /* U+0F38 */ simp*16+NoRe, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0F40 */ simp*16+simp, simp*16+NOFC, simp*16+simp, simp*16+simp, /* U+0F48 */ NoNo*16+simp, simp*16+simp, simp*16+NOFC, simp*16+simp, /* U+0F50 */ simp*16+simp, NOFC*16+simp, simp*16+simp, simp*16+NOFC, /* U+0F58 */ simp*16+simp, simp*16+simp, NOFC*16+simp, simp*16+simp, /* U+0F60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0F68 */ simp*16+NOFC, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0F70 */ NoNo*16+NoRe, NoRe*16+NOFC, NoRe*16+NOFC, NOFC*16+simp, /* U+0F78 */ NOFC*16+simp, NoRe*16+NoRe, NoRe*16+NoRe, simp*16+simp, /* U+0F80 */ NoRe*16+NOFC, NoRe*16+NoRe, NoRe*16+simp, NoRe*16+NoRe, /* U+0F88 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0F90 */ simp*16+simp, simp*16+NOFC, simp*16+simp, simp*16+simp, /* U+0F98 */ NoNo*16+simp, simp*16+simp, simp*16+NOFC, simp*16+simp, /* U+0FA0 */ simp*16+simp, NOFC*16+simp, simp*16+simp, simp*16+NOFC, /* U+0FA8 */ simp*16+simp, simp*16+simp, NOFC*16+simp, simp*16+simp, /* U+0FB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+0FB8 */ simp*16+NOFC, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+0FC0 */ simp*16+simp, simp*16+simp, simp*16+simp, NoRe*16+simp, /* U+0FC8 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+simp, /* U+0FD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0FD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0FE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0FE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0FF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+0FF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1020 */ simp*16+simp, NoNo*16+simp, simp*16+Base, simp*16+simp, /* U+1028 */ NoNo*16+simp, simp*16+NoNo, simp*16+simp, COM0*16+simp, /* U+1030 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, simp*16+NoRe, /* U+1038 */ simp*16+NoRe, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1058 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1060 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1068 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1070 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1078 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1080 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1088 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1090 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1098 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10C0 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+10C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10F8 */ simp*16+NoNo, NoNo*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1100 */ Hang*16+Hang, Hang*16+Hang, Hang*16+Hang, Hang*16+Hang, /* U+1108 */ Hang*16+Hang, Hang*16+Hang, Hang*16+Hang, Hang*16+Hang, /* U+1110 */ Hang*16+Hang, Hang*16+simp, simp*16+simp, simp*16+simp, /* U+1118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1158 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+simp, /* U+1160 */ simp*16+hAng, hAng*16+hAng, hAng*16+hAng, hAng*16+hAng, /* U+1168 */ hAng*16+hAng, hAng*16+hAng, hAng*16+hAng, hAng*16+hAng, /* U+1170 */ hAng*16+hAng, hAng*16+hAng, hAng*16+hAng, simp*16+simp, /* U+1178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+11A0 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+11A8 */ haNG*16+haNG, haNG*16+haNG, haNG*16+haNG, haNG*16+haNG, /* U+11B0 */ haNG*16+haNG, haNG*16+haNG, haNG*16+haNG, haNG*16+haNG, /* U+11B8 */ haNG*16+haNG, haNG*16+haNG, haNG*16+haNG, haNG*16+haNG, /* U+11C0 */ haNG*16+haNG, haNG*16+simp, simp*16+simp, simp*16+simp, /* U+11C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+11D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+11D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+11E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+11E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+11F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+11F8 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1248 */ simp*16+NoNo, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1258 */ simp*16+NoNo, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1288 */ simp*16+NoNo, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+12A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+12A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+12B0 */ simp*16+NoNo, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+12B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+12C0 */ simp*16+NoNo, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+12C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+12D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+12D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+12E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+12E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+12F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+12F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1310 */ simp*16+NoNo, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1358 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1360 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1378 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+1380 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1388 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1390 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1398 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+13A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+13F0 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+13F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1400 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+14F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+15F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1678 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1698 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+16A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+16F0 */ simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+16F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1708 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+1710 */ simp*16+simp, simp*16+simp, NoRe*16+NoNo, NoNo*16+NoNo, /* U+1718 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1730 */ simp*16+simp, simp*16+simp, NoRe*16+simp, simp*16+NoNo, /* U+1738 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1750 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1758 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1768 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+1770 */ simp*16+NoNo, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1778 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+17A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+17A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+17B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+17B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+17C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+17C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+17D0 */ simp*16+simp, NoRe*16+simp, simp*16+simp, simp*16+simp, /* U+17D8 */ simp*16+simp, simp*16+simp, simp*16+NoRe, NoNo*16+NoNo, /* U+17E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+17E8 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+17F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+17F8 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1818 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1878 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+18A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+18A8 */ simp*16+NoRe, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+18F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1918 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+1920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1928 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1938 */ simp*16+NoRe, NoRe*16+NoRe, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1940 */ simp*16+NoNo, NoNo*16+NoNo, simp*16+simp, simp*16+simp, /* U+1948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1968 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1970 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+1978 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1980 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1988 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1990 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1998 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+19A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+19A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+19B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+19B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+19C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+19C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+19D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+19D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+19E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+19E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+19F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+19F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1A00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1A98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1AF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1B98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1BF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1C98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1CF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D68 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1DF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1E00 */ Base*16+Base, Base*16+Base, simp*16+simp, simp*16+simp, /* U+1E08 */ simp*16+simp, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E10 */ simp*16+simp, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E18 */ Base*16+Base, Base*16+Base, simp*16+simp, simp*16+simp, /* U+1E20 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E28 */ simp*16+simp, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E30 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E38 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E40 */ Base*16+Base, simp*16+simp, Base*16+Base, Base*16+Base, /* U+1E48 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E50 */ Base*16+Base, Base*16+Base, simp*16+simp, simp*16+simp, /* U+1E58 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E60 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E68 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E70 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E78 */ Base*16+Base, Base*16+Base, Base*16+Base, simp*16+simp, /* U+1E80 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1E88 */ simp*16+simp, simp*16+simp, simp*16+simp, Base*16+Base, /* U+1E90 */ Base*16+Base, simp*16+simp, simp*16+simp, Base*16+Base, /* U+1E98 */ Base*16+Base, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1EA0 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1EA8 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1EB0 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1EB8 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1EC0 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1EC8 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1ED0 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1ED8 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1EE0 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1EE8 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1EF0 */ Base*16+Base, Base*16+Base, simp*16+simp, Base*16+Base, /* U+1EF8 */ Base*16+Base, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1F00 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1F08 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1F10 */ Base*16+Base, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1F18 */ Base*16+Base, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1F20 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1F28 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1F30 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1F38 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1F40 */ Base*16+Base, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1F48 */ Base*16+Base, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1F50 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1F58 */ NoNo*16+Base, NoNo*16+simp, NoNo*16+simp, NoNo*16+simp, /* U+1F60 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1F68 */ Base*16+Base, Base*16+Base, Base*16+Base, Base*16+Base, /* U+1F70 */ Base*16+NOFC, simp*16+NOFC, Base*16+NOFC, simp*16+NOFC, /* U+1F78 */ simp*16+NOFC, simp*16+NOFC, Base*16+NOFC, NoNo*16+NoNo, /* U+1F80 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1F88 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1F90 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1F98 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1FA0 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1FA8 */ Base*16+Base, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1FB0 */ simp*16+simp, simp*16+Base, simp*16+NoNo, Base*16+simp, /* U+1FB8 */ simp*16+simp, simp*16+NOFC, Base*16+simp, NOFC*16+Base, /* U+1FC0 */ simp*16+simp, simp*16+Base, simp*16+NoNo, Base*16+simp, /* U+1FC8 */ simp*16+NOFC, simp*16+NOFC, Base*16+simp, simp*16+simp, /* U+1FD0 */ simp*16+simp, simp*16+NOFC, NoNo*16+NoNo, simp*16+simp, /* U+1FD8 */ simp*16+simp, simp*16+NOFC, NoNo*16+simp, simp*16+simp, /* U+1FE0 */ simp*16+simp, simp*16+NOFC, simp*16+simp, simp*16+simp, /* U+1FE8 */ simp*16+simp, simp*16+NOFC, simp*16+simp, NOFC*16+NOFC, /* U+1FF0 */ NoNo*16+NoNo, simp*16+Base, simp*16+NoNo, Base*16+simp, /* U+1FF8 */ simp*16+NOFC, simp*16+NOFC, Base*16+NOFC, Base*16+NoNo, /* U+2000 */ NOFC*16+NOFC, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2050 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+simp, /* U+2058 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+simp, /* U+2060 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2068 */ NoNo*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2070 */ simp*16+simp, NoNo*16+NoNo, simp*16+simp, simp*16+simp, /* U+2078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+2090 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2098 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+20A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+20A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+20B0 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+20B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+20C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+20C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+20D0 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+20D8 */ NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+simp, simp*16+simp, /* U+20E0 */ simp*16+NoRe, simp*16+simp, simp*16+NoRe, NoRe*16+NoRe, /* U+20E8 */ NoRe*16+NoRe, NoRe*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+20F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+20F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2120 */ simp*16+simp, simp*16+simp, simp*16+simp, NOFC*16+simp, /* U+2128 */ simp*16+simp, NOFC*16+NOFC, simp*16+simp, simp*16+simp, /* U+2130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2138 */ simp*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+2140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2148 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2150 */ NoNo*16+NoNo, NoNo*16+simp, simp*16+simp, simp*16+simp, /* U+2158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2180 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2188 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2190 */ Base*16+simp, Base*16+simp, Base*16+simp, simp*16+simp, /* U+2198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21D0 */ Base*16+simp, Base*16+simp, Base*16+simp, simp*16+simp, /* U+21D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+21F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2200 */ simp*16+simp, simp*16+Base, simp*16+simp, simp*16+simp, /* U+2208 */ Base*16+simp, simp*16+Base, simp*16+simp, simp*16+simp, /* U+2210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2220 */ simp*16+simp, simp*16+Base, simp*16+Base, simp*16+simp, /* U+2228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2238 */ simp*16+simp, simp*16+simp, Base*16+simp, simp*16+simp, /* U+2240 */ simp*16+simp, simp*16+Base, simp*16+Base, simp*16+simp, /* U+2248 */ Base*16+simp, simp*16+simp, simp*16+Base, simp*16+simp, /* U+2250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2260 */ simp*16+Base, simp*16+simp, Base*16+Base, simp*16+simp, /* U+2268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2270 */ simp*16+simp, Base*16+Base, simp*16+simp, Base*16+Base, /* U+2278 */ simp*16+simp, Base*16+Base, Base*16+Base, simp*16+simp, /* U+2280 */ simp*16+simp, Base*16+Base, simp*16+simp, Base*16+Base, /* U+2288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2290 */ simp*16+Base, Base*16+simp, simp*16+simp, simp*16+simp, /* U+2298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+22A0 */ simp*16+simp, Base*16+simp, simp*16+simp, simp*16+simp, /* U+22A8 */ Base*16+Base, simp*16+Base, simp*16+simp, simp*16+simp, /* U+22B0 */ simp*16+simp, Base*16+Base, Base*16+Base, simp*16+simp, /* U+22B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+22C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+22C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+22D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+22D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+22E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+22E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+22F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+22F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2328 */ simp*16+NOFC, NOFC*16+simp, simp*16+simp, simp*16+simp, /* U+2330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+23A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+23A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+23B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+23B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+23C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+23C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+23D0 */ simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+23D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+23E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+23E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+23F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+23F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+2428 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2430 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2438 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2448 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2450 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2458 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+24F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+25F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2618 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2678 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+2680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2690 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2698 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26A0 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+26F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2700 */ NoNo*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+2708 */ simp*16+simp, NoNo*16+NoNo, simp*16+simp, simp*16+simp, /* U+2710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2728 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2748 */ simp*16+simp, simp*16+simp, NoNo*16+simp, NoNo*16+simp, /* U+2750 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, simp*16+NoNo, /* U+2758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+2760 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2790 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+2798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+27A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+27A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+27B0 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+27B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+27C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+27C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+27D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+27D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+27E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+27E8 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+27F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+27F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2878 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+28F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2938 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2970 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2988 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2990 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+29F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2A98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AD8 */ simp*16+simp, simp*16+simp, NOFC*16+simp, simp*16+simp, /* U+2AE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2AF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2B00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2B08 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+2B10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2B98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2BF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2C98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2CF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2D98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2DF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2E80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2E88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2E90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2E98 */ simp*16+simp, NoNo*16+simp, simp*16+simp, simp*16+simp, /* U+2EA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2EA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2EB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2EB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2EC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2EC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2ED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2ED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2EE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2EE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2EF0 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2EF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2F00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2F98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2FA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2FA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2FB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2FB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2FC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2FC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2FD0 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+2FD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2FE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2FE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+2FF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+2FF8 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+3000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3028 */ simp*16+simp, NoRe*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+3030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3040 */ NoNo*16+simp, simp*16+simp, simp*16+simp, Base*16+simp, /* U+3048 */ simp*16+simp, simp*16+Base, simp*16+Base, simp*16+Base, /* U+3050 */ simp*16+Base, simp*16+Base, simp*16+Base, simp*16+Base, /* U+3058 */ simp*16+Base, simp*16+Base, simp*16+Base, simp*16+Base, /* U+3060 */ simp*16+Base, simp*16+simp, Base*16+simp, Base*16+simp, /* U+3068 */ Base*16+simp, simp*16+simp, simp*16+simp, simp*16+Base, /* U+3070 */ simp*16+simp, Base*16+simp, simp*16+Base, simp*16+simp, /* U+3078 */ Base*16+simp, simp*16+Base, simp*16+simp, simp*16+simp, /* U+3080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+3098 */ NoNo*16+ReCo, ReCo*16+simp, simp*16+Base, simp*16+simp, /* U+30A0 */ simp*16+simp, simp*16+simp, simp*16+simp, Base*16+simp, /* U+30A8 */ simp*16+simp, simp*16+Base, simp*16+Base, simp*16+Base, /* U+30B0 */ simp*16+Base, simp*16+Base, simp*16+Base, simp*16+Base, /* U+30B8 */ simp*16+Base, simp*16+Base, simp*16+Base, simp*16+Base, /* U+30C0 */ simp*16+Base, simp*16+simp, Base*16+simp, Base*16+simp, /* U+30C8 */ Base*16+simp, simp*16+simp, simp*16+simp, simp*16+Base, /* U+30D0 */ simp*16+simp, Base*16+simp, simp*16+Base, simp*16+simp, /* U+30D8 */ Base*16+simp, simp*16+Base, simp*16+simp, simp*16+simp, /* U+30E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+30E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+Base, /* U+30F0 */ Base*16+Base, Base*16+simp, simp*16+simp, simp*16+simp, /* U+30F8 */ simp*16+simp, simp*16+simp, simp*16+Base, simp*16+simp, /* U+3100 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+simp, simp*16+simp, /* U+3108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3128 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+3130 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+3190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+31A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+31A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+31B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+31B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+31C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+31C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+31D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+31D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+31E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+31E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+31F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+31F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+3220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3240 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+3248 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+3250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3278 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+simp, /* U+3280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+32F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+3300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+33F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+34F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+35F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+36F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+37F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3878 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+38F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3938 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3970 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3988 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3990 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+39F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3A98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3AF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3B98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3BF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3C98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3CF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3D98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3DF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3E98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3ED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3ED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3EF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3F98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+3FF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+40F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+41F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4248 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+42F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+43F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+44F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+45F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+46F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+47F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4878 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+48F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4938 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4970 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4988 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4990 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+49F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4A98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4AF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4B98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4BF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4C98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4CF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4D98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DB0 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+4DB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+4DC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4DF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4E98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4ED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4ED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4EF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4F98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+4FF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+50F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+51F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5248 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+52F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+53F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+54F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+55F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+56F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+57F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5878 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+58F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5938 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5970 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5988 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5990 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+59F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5A98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5AF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5B98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5BF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5C98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5CF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5D98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5DF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5E98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5ED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5ED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5EF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5F98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+5FF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+60F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+61F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6248 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+62F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+63F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+64F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+65F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+66F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+67F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6878 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+68F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6938 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6970 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6988 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6990 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+69F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6A98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6AF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6B98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6BF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6C98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6CF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6D98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6DF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6E98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6ED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6ED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6EF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6F98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+6FF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+70F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+71F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7248 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+72F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+73F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+74F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+75F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+76F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+77F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7878 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+78F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7938 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7970 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7988 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7990 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+79F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7A98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7AF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7B98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7BF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7C98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7CF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7D98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7DF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7E98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7ED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7ED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7EF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7F98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+7FF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+80F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+81F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8248 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+82F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+83F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+84F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+85F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+86F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+87F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8878 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+88F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8938 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8970 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8988 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8990 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+89F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8A98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8AF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8B98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8BF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8C98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8CF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8D98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8DF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8E98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8ED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8ED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8EF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8F98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+8FF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+90F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+91F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9248 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+92F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+93F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+94F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+95F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+96F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+97F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9878 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+98F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9938 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9970 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9988 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9990 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+99F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9A98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9AF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9B98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9BF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9C98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9CF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9D98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9DF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9E98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9ED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9ED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9EF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9F98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+9FA0 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+9FA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+9FF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A0F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A1F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A248 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A2F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A3F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A488 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+A490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A4A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A4A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A4B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A4B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+A4C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+A4C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A4D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A4D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A4E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A4E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A4F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A4F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A500 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A508 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A510 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A518 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A520 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A528 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A530 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A538 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A540 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A548 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A550 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A558 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A560 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A568 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A570 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A578 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A580 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A588 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A590 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A598 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A5F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A600 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A608 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A610 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A618 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A620 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A628 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A630 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A638 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A640 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A648 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A650 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A658 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A660 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A668 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A670 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A678 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A680 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A688 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A690 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A698 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A6F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A700 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A708 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A710 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A718 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A720 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A728 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A730 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A738 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A740 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A748 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A750 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A758 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A760 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A768 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A770 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A778 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A780 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A788 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A790 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A798 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A7F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A800 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A808 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A810 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A818 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A820 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A828 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A830 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A838 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A840 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A848 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A850 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A858 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A860 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A868 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A870 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A878 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A880 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A888 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A890 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A898 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A8F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A900 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A908 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A910 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A918 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A920 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A928 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A930 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A938 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A940 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A948 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A950 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A958 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A960 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A968 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A970 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A978 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A980 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A988 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A990 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A998 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+A9F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AA98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AAF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AB98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ABF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+AC00 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC18 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AC20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC38 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC50 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AC58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC70 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC88 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AC90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AC98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACA8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACC0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+ACC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACE0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ACF8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AD00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD18 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD30 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AD38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD50 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD68 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AD70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD88 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AD98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADA0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+ADA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADC0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADD8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+ADE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+ADF8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE10 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AE18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE30 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE48 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AE50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE68 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE80 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AE88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AE98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AEA0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AEA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AEB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AEB8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AEC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AEC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AED8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AEE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AEE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AEF0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AEF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF10 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF28 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AF30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF48 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF60 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AF68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF80 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AF98 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AFA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFB8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFD0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+AFD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFF0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+AFF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B008 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B028 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B040 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B060 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B078 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B098 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0B0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B0B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0D0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0E8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B0F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B0F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B108 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B120 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B140 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B158 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B178 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B190 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1B0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1C8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B1D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1E8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B1F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B200 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B220 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B238 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B248 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B258 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B270 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B290 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2A8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B2B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2C8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2E0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B2E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B2F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B300 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B318 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B338 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B350 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B370 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B388 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3A8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3C0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B3C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3E0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B3F8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B418 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B430 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B450 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B468 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B488 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4A0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B4A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4C0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4D8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B4E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B4F8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B510 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B530 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B548 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B568 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B580 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5A0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5B8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B5C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5D8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B5F0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B5F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B610 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B628 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B648 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B660 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B680 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B698 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B6A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6B8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6D0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B6D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6F0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B6F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B708 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B728 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B740 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B760 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B778 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B798 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7B0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B7B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7D0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7E8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B7F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B7F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B800 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B808 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B820 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B838 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B840 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B850 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B858 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B870 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B878 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B888 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B890 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8B0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8C8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B8D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8E8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B8F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B900 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B918 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B920 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B930 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B938 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B950 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B958 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B968 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B970 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B988 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B990 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9A8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B9B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9C8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9E0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+B9E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+B9F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA00 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA18 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BA20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA38 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA50 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BA58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA70 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA88 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BA90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BA98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAA8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAC0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BAC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAE0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BAF8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BB00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB18 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB30 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BB38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB50 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB68 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BB70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB88 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BB98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBA0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BBA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBC0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBD8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BBE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BBF8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC10 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BC18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC30 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC48 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BC50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC68 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC80 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BC88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BC98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCA0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCB8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BCC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCD8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BCF0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BCF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD10 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD28 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BD30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD48 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD60 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BD68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD80 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BD98 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BDA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDB8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDD0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BDD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDF0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BDF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE08 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BE10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE28 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE40 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BE48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE60 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE78 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BE80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BE98 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BEA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BEA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BEB0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BEB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BEC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BEC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BED0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BEE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BEE8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BEF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BEF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF08 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF20 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BF28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF40 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF58 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BF60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF78 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BF90 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BF98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFB0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFC8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+BFD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFE8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+BFF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C000 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C020 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C038 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C058 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C070 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C090 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0A8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C0B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0C8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0E0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C0E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C0F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C100 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C118 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C138 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C150 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C168 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C170 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C180 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C188 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1A8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1C0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C1C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1E0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C1F8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C210 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C218 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C228 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C230 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C248 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C250 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C260 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C268 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C280 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C288 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C298 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2A0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C2A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2C0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2D8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C2E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C2F8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C310 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C330 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C348 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C360 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C368 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C378 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C380 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C398 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3A0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3B8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C3C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3D8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C3F0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C3F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C410 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C428 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C448 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C460 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C480 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C498 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C4A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4B8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4D0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C4D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4F0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C4F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C500 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C508 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C528 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C538 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C540 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C560 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C578 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C598 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5B0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C5B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5D0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5E8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C5F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C5F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C608 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C620 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C640 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C658 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C678 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C690 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6B0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6C8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C6D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6E8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C6F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C700 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C720 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C738 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C758 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C770 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C790 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7A8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C7B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7C8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7E0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C7E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C7F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C800 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C808 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C818 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C830 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C838 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C840 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C848 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C850 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C858 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C860 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C868 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C870 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C878 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C880 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C888 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C890 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C898 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8A8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8C0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C8C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8E0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C8F8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C900 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C908 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C910 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C918 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C920 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C928 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C930 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C938 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C940 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C948 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C950 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C958 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C960 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C968 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C970 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C978 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C980 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C988 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C990 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C998 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9A0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C9A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9C0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9D8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+C9E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+C9F8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA10 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CA18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA30 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA48 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CA50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA68 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA80 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CA88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CA98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAA0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAB8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CAC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAD8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CAF0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CAF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB10 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB28 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CB30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB48 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB60 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CB68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB80 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CB98 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CBA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBB8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBD0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CBD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBF0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CBF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC08 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CC10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC28 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC40 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CC48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC60 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC78 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CC80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CC98 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCB0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CCB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCD0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCE8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CCF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CCF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD08 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD20 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CD28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD40 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD58 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CD60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD78 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CD90 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CD98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDB0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDC8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CDD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDE8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CDF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE00 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CE08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE20 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE38 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CE40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE58 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE70 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CE78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE90 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CE98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CEA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CEA8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CEB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CEB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CEC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CEC8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CEE0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CEE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CEF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CEF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF00 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF18 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CF20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF38 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF50 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CF58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF70 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF88 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CF90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CF98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFA8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFC0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+CFC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFE0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+CFF8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D018 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D030 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D050 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D068 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D088 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0A0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D0A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0C0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0D8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D0E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D0F8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D110 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D130 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D148 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D158 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D160 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D168 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D170 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D178 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D180 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D188 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1A0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1B8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D1C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1D8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D1F0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D1F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D200 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D208 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D210 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D218 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D220 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D228 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D230 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D238 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D240 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D248 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D250 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D258 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D260 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D268 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D270 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D278 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D280 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D288 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D290 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D298 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D2A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2B8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2D0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D2D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2F0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D2F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D308 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D328 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D340 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D358 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D360 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D368 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D370 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D378 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D398 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3B0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D3B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3D0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3E8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D3F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D3F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D408 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D420 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D440 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D458 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D478 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D490 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D498 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4B0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4C8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D4D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4E8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D4F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D500 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D508 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D510 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D518 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D520 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D538 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D540 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D548 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D550 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D558 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D570 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D590 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5A8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D5B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5C8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5E0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D5E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D5F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D600 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D618 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D638 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D650 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D670 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D688 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6A8 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6C0 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D6C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6E0 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D6F8 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D718 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D730 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D750 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D768 */ simp*16+simp, simp*16+simp, HAng*16+simp, simp*16+simp, /* U+D770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D788 */ HAng*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+D7A0 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D7F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+D800 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D808 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D810 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D818 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D820 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D828 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D830 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D838 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D840 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D848 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D850 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D858 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D860 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D868 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D870 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D878 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D880 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D888 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D890 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D898 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8A0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8A8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8B0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8B8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8C0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8C8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8D0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8D8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8E0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8E8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8F0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D8F8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D900 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D908 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D910 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D918 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D920 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D928 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D930 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D938 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D940 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D948 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D950 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D958 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D960 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D968 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D970 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D978 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D980 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D988 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D990 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D998 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9A0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9A8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9B0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9B8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9C0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9C8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9D0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9D8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9E0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9E8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9F0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+D9F8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA00 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA08 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA10 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA18 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA20 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA28 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA30 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA38 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA40 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA48 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA50 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA58 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA60 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA68 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA70 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA78 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA80 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA88 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA90 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DA98 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAA0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAA8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAB0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAB8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAC0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAC8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAD0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAD8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAE0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAE8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAF0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DAF8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB00 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB08 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB10 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB18 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB20 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB28 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB30 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB38 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB40 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB48 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB50 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB58 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB60 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB68 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB70 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB78 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB80 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB88 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB90 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DB98 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBA0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBA8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBB0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBB8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBC0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBC8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBD0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBD8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBE0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBE8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBF0 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DBF8 */ HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, HIGH*16+HIGH, /* U+DC00 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC08 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC10 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC18 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC20 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC28 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC30 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC38 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC40 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC48 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC50 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC58 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC60 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC68 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC70 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC78 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC80 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC88 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC90 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DC98 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCA0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCA8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCB0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCB8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCC0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCC8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCD0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCD8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCE0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCE8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCF0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DCF8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD00 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD08 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD10 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD18 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD20 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD28 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD30 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD38 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD40 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD48 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD50 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD58 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD60 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD68 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD70 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD78 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD80 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD88 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD90 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DD98 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDA0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDA8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDB0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDB8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDC0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDC8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDD0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDD8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDE0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDE8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDF0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DDF8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE00 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE08 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE10 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE18 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE20 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE28 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE30 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE38 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE40 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE48 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE50 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE58 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE60 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE68 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE70 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE78 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE80 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE88 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE90 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DE98 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEA0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEA8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEB0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEB8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEC0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEC8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DED0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DED8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEE0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEE8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEF0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DEF8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF00 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF08 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF10 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF18 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF20 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF28 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF30 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF38 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF40 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF48 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF50 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF58 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF60 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF68 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF70 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF78 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF80 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF88 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF90 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DF98 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFA0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFA8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFB0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFB8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFC0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFC8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFD0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFD8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFE0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFE8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFF0 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+DFF8 */ loww*16+loww, loww*16+loww, loww*16+loww, loww*16+loww, /* U+E000 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E008 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E010 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E018 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E020 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E028 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E030 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E038 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E040 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E048 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E050 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E058 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E060 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E068 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E070 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E078 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E080 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E088 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E090 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E098 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E0F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E100 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E108 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E110 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E118 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E120 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E128 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E130 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E138 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E140 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E148 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E150 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E158 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E160 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E168 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E170 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E178 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E180 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E188 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E190 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E198 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E1F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E200 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E208 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E210 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E218 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E220 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E228 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E230 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E238 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E240 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E248 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E250 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E258 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E260 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E268 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E270 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E278 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E280 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E288 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E290 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E298 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E2F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E300 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E308 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E310 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E318 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E320 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E328 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E330 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E338 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E340 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E348 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E350 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E358 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E360 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E368 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E370 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E378 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E380 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E388 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E390 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E398 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E3F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E400 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E408 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E410 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E418 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E420 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E428 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E430 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E438 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E440 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E448 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E450 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E458 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E460 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E468 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E470 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E478 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E480 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E488 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E490 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E498 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E4F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E500 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E508 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E510 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E518 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E520 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E528 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E530 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E538 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E540 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E548 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E550 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E558 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E560 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E568 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E570 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E578 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E580 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E588 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E590 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E598 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E5F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E600 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E608 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E610 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E618 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E620 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E628 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E630 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E638 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E640 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E648 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E650 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E658 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E660 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E668 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E670 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E678 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E680 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E688 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E690 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E698 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E6F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E700 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E708 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E710 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E718 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E720 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E728 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E730 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E738 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E740 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E748 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E750 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E758 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E760 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E768 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E770 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E778 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E780 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E788 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E790 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E798 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E7F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E800 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E808 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E810 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E818 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E820 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E828 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E830 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E838 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E840 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E848 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E850 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E858 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E860 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E868 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E870 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E878 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E880 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E888 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E890 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E898 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E8F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E900 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E908 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E910 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E918 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E920 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E928 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E930 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E938 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E940 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E948 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E950 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E958 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E960 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E968 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E970 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E978 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E980 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E988 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E990 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E998 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+E9F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EA98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EAF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EB98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EBF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EC98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ECF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+ED98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EDF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EE98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EED0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EED8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EEF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF00 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF20 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF30 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF38 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF50 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF58 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF60 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF68 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EF98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+EFF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F000 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F008 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F010 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F018 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F020 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F028 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F030 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F038 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F040 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F048 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F050 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F058 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F060 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F068 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F070 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F078 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F080 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F088 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F090 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F098 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F0F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F100 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F108 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F110 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F118 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F120 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F128 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F130 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F138 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F140 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F148 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F150 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F158 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F160 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F168 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F170 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F178 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F180 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F188 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F190 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F198 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F1F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F200 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F208 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F210 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F218 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F220 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F228 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F230 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F238 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F240 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F248 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F250 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F258 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F260 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F268 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F270 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F278 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F280 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F288 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F290 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F298 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F2F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F300 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F308 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F310 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F318 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F320 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F328 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F330 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F338 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F340 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F348 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F350 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F358 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F360 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F368 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F370 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F378 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F380 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F388 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F390 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F398 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F3F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F400 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F408 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F410 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F418 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F420 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F428 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F430 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F438 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F440 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F448 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F450 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F458 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F460 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F468 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F470 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F478 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F480 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F488 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F490 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F498 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F4F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F500 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F508 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F510 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F518 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F520 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F528 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F530 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F538 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F540 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F548 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F550 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F558 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F560 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F568 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F570 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F578 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F580 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F588 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F590 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F598 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F5F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F600 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F608 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F610 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F618 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F620 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F628 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F630 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F638 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F640 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F648 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F650 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F658 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F660 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F668 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F670 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F678 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F680 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F688 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F690 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F698 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F6F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F700 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F708 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F710 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F718 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F720 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F728 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F730 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F738 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F740 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F748 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F750 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F758 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F760 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F768 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F770 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F778 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F780 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F788 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F790 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F798 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F7F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F800 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F808 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F810 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F818 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F820 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F828 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F830 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F838 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F840 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F848 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F850 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F858 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F860 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F868 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F870 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F878 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F880 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F888 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F890 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F898 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F8F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+F900 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F908 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F910 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F918 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F920 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F928 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F930 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F938 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F940 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F948 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F950 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F958 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F960 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F968 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F970 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F978 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F980 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F988 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F990 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F998 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9A0 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9A8 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9B0 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9B8 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9C0 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9C8 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9D0 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9D8 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9E0 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9E8 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9F0 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+F9F8 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FA00 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FA08 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, simp*16+simp, /* U+FA10 */ NOFC*16+simp, NOFC*16+simp, simp*16+NOFC, NOFC*16+NOFC, /* U+FA18 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+simp, /* U+FA20 */ NOFC*16+simp, NOFC*16+simp, simp*16+NOFC, NOFC*16+simp, /* U+FA28 */ simp*16+simp, NOFC*16+NOFC, NOFC*16+NOFC, NoNo*16+NoNo, /* U+FA30 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FA38 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FA40 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FA48 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FA50 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FA58 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FA60 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FA68 */ NOFC*16+NOFC, NOFC*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FA70 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FA78 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FA80 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FA88 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FA90 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FA98 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAA0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAA8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAB0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FAF8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FB00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+FB08 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FB10 */ NoNo*16+NoNo, NoNo*16+simp, simp*16+simp, simp*16+simp, /* U+FB18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+simp, NoRe*16+NOFC, /* U+FB20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB28 */ simp*16+simp, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+FB30 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NoNo, /* U+FB38 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NoNo, NOFC*16+NoNo, /* U+FB40 */ NOFC*16+NOFC, NoNo*16+NOFC, NOFC*16+NoNo, NOFC*16+NOFC, /* U+FB48 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+simp, /* U+FB50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FB98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FBA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FBA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FBB0 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FBB8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FBC0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FBC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FBD0 */ NoNo*16+NoNo, NoNo*16+simp, simp*16+simp, simp*16+simp, /* U+FBD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FBE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FBE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FBF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FBF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FC98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCD0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCD8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FCF8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD40 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FD48 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FD50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD90 */ NoNo*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FD98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FDA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FDA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FDB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FDB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FDC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FDC8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FDD0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FDD8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FDE0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FDE8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FDF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FDF8 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+FE00 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE10 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FE18 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FE20 */ NoRe*16+NoRe, NoRe*16+NoRe, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FE28 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FE30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE50 */ simp*16+simp, simp*16+NoNo, simp*16+simp, simp*16+simp, /* U+FE58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+FE68 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FE70 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+FE78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FE98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEC0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEC8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FED0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FED8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEF0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FEF8 */ simp*16+simp, simp*16+simp, simp*16+NoNo, NoNo*16+simp, /* U+FF00 */ NoNo*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF08 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF10 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF18 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF20 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF28 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF30 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF38 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF40 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF48 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF50 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF58 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF60 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF68 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF70 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF78 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF80 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF88 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF90 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FF98 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FFA0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FFA8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FFB0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FFB8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+FFC0 */ NoNo*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FFC8 */ NoNo*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FFD0 */ NoNo*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+FFD8 */ NoNo*16+NoNo, simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, /* U+FFE0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+FFE8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+FFF0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+FFF8 */ NoNo*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+10000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10008 */ simp*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+10010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+10028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10038 */ simp*16+simp, simp*16+NoNo, simp*16+simp, NoNo*16+simp, /* U+10040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10048 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+10050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10058 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+10060 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10068 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10070 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10078 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+100F8 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10100 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+simp, /* U+10108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10128 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10130 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+simp, /* U+10138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10140 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10148 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10150 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10158 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10160 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10168 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10170 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10178 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10180 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10188 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10190 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10198 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+101F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10200 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10208 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10210 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10218 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10220 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10228 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10230 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10238 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10240 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10248 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10250 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10258 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10260 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10268 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10270 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10278 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10280 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10288 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10290 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10298 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+102F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+10320 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10328 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10348 */ simp*16+simp, simp*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10350 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10358 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10360 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10368 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10370 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10378 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10380 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10388 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10390 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10398 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+simp, /* U+103A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+103F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10450 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10498 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+104A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+104A8 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+104F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10500 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10508 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10510 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10518 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10520 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10528 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10530 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10538 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10540 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10548 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10550 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10558 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10560 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10568 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10570 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10578 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10580 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10588 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10590 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10598 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+105F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10600 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10608 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10610 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10618 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10620 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10628 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10630 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10638 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10640 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10648 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10650 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10658 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10660 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10668 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10670 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10678 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10680 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10688 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10690 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10698 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+106F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10700 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10708 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10710 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10718 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10720 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10728 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10730 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10738 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10740 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10748 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10750 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10758 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10760 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10768 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10770 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10778 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10780 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10788 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10790 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10798 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+107F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10800 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+10808 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10810 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10818 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10820 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10828 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+10830 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+simp, /* U+10838 */ simp*16+NoNo, NoNo*16+NoNo, simp*16+NoNo, NoNo*16+simp, /* U+10840 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10848 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10850 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10858 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10860 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10868 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10870 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10878 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10880 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10888 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10890 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+10898 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+108F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D000 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D008 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D010 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D018 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D020 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D028 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D030 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D038 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D040 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D048 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D050 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D058 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D060 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D068 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D070 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D078 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D080 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D088 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D090 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D098 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D0F0 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1D0F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D100 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D108 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D110 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D118 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D120 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1D128 */ NoNo*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D130 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D138 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D140 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D148 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D150 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D158 */ simp*16+simp, simp*16+simp, simp*16+simp, NOFC*16+NOFC, /* U+1D160 */ NOFC*16+NOFC, NOFC*16+NOFC, NOFC*16+NoRe, NoRe*16+NoRe, /* U+1D168 */ NoRe*16+NoRe, simp*16+simp, simp*16+NoRe, NoRe*16+NoRe, /* U+1D170 */ NoRe*16+NoRe, NoRe*16+simp, simp*16+simp, simp*16+simp, /* U+1D178 */ simp*16+simp, simp*16+NoRe, NoRe*16+NoRe, NoRe*16+NoRe, /* U+1D180 */ NoRe*16+NoRe, NoRe*16+simp, simp*16+NoRe, NoRe*16+NoRe, /* U+1D188 */ NoRe*16+NoRe, NoRe*16+NoRe, simp*16+simp, simp*16+simp, /* U+1D190 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D198 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D1A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D1A8 */ simp*16+simp, NoRe*16+NoRe, NoRe*16+NoRe, simp*16+simp, /* U+1D1B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D1B8 */ simp*16+simp, simp*16+NOFC, NOFC*16+NOFC, NOFC*16+NOFC, /* U+1D1C0 */ NOFC*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D1C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D1D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D1D8 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+NoNo, /* U+1D1E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D1E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D1F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D1F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D200 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D208 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D210 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D218 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D220 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D228 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D230 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D238 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D240 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D248 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D250 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D258 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D260 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D268 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D270 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D278 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D280 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D288 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D290 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D298 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D2F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D300 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D308 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D310 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D318 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D320 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D328 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D330 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D338 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D340 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D348 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D350 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+NoNo, /* U+1D358 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D360 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D368 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D370 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D378 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D380 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D388 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D390 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D398 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3A0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3A8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3B0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3B8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3C0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3C8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3D0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3D8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3E0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3E8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3F0 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D3F8 */ NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D400 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D408 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D410 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D418 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D420 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D428 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D430 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D438 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D440 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D448 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D450 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+1D458 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D460 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D468 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D470 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D478 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D480 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D488 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D490 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D498 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+1D4A0 */ NoNo*16+NoNo, simp*16+NoNo, NoNo*16+simp, simp*16+NoNo, /* U+1D4A8 */ NoNo*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+1D4B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D4B8 */ simp*16+simp, NoNo*16+simp, NoNo*16+simp, simp*16+simp, /* U+1D4C0 */ simp*16+simp, simp*16+simp, NoNo*16+simp, simp*16+simp, /* U+1D4C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D4D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D4D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D4E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D4E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D4F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D4F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D500 */ simp*16+simp, simp*16+simp, simp*16+simp, NoNo*16+simp, /* U+1D508 */ simp*16+simp, simp*16+NoNo, NoNo*16+simp, simp*16+simp, /* U+1D510 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+1D518 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+simp, /* U+1D520 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D528 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D530 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D538 */ simp*16+simp, NoNo*16+simp, simp*16+simp, simp*16+NoNo, /* U+1D540 */ simp*16+simp, simp*16+simp, simp*16+NoNo, simp*16+NoNo, /* U+1D548 */ NoNo*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D550 */ simp*16+NoNo, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D558 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D560 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D568 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D570 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D578 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D580 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D588 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D590 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D598 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D5F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D600 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D608 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D610 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D618 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D620 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D628 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D630 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D638 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D640 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D648 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D650 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D658 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D660 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D668 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D670 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D678 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D680 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D688 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D690 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D698 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6A0 */ simp*16+simp, simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, /* U+1D6A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6C8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D6F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D700 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D708 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D710 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D718 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D720 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D728 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D730 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D738 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D740 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D748 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D750 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D758 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D760 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D768 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D770 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D778 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D780 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D788 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D790 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D798 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7A0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7A8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7B0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7B8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7C0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7C8 */ simp*16+simp, NoNo*16+NoNo, NoNo*16+NoNo, simp*16+simp, /* U+1D7D0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7D8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7E0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7E8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7F0 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, /* U+1D7F8 */ simp*16+simp, simp*16+simp, simp*16+simp, simp*16+simp, }; raptor-1.4.21/src/raptor_serialize_dot.c0000644000175000017500000007156011330672502015216 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_dot.c - Serialize RDF graph to GraphViz DOT format * * Copyright (C) 2004-2007, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * Raptor dot serializer object */ typedef struct { raptor_namespace_stack *nstack; raptor_sequence *namespaces; raptor_sequence *resources; raptor_sequence *literals; raptor_sequence *bnodes; } raptor_dot_context; typedef struct { raptor_world* world; raptor_identifier_type type; /* node type */ union { struct { raptor_uri *uri; } resource; struct { unsigned char *string; raptor_uri *datatype; unsigned char *language; } literal; struct { unsigned char *string; } blank; } value; } raptor_dot_serializer_node; /* Free a node */ static void raptor_dot_serializer_free_node(raptor_dot_serializer_node *node) { if(!node) return; switch (node->type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: raptor_free_uri_v2(node->world, node->value.resource.uri); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: RAPTOR_FREE(blank, node->value.blank.string); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: RAPTOR_FREE(literal, node->value.literal.string); if(node->value.literal.datatype) raptor_free_uri_v2(node->world, node->value.literal.datatype); if(node->value.literal.language) RAPTOR_FREE(language, node->value.literal.language); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: /* Nothing to do */ break; } RAPTOR_FREE(raptor_node, node); } /* * raptor_dot_serializer_node_matches: * @node: #raptor_node to compare * @node_type: Raptor identifier type * @node_data: For node_type RAPTOR_IDENTIFIER_TYPE_ORDINAL, int* to the * ordinal. * @datatype: Literal datatype or NULL * @language: Literal language or NULL * * Return value: non-zero if @node matches the node described by the rest of * the parameters. */ static int raptor_dot_serializer_node_matches(raptor_dot_serializer_node* node, raptor_identifier_type node_type, const void* node_data, raptor_uri* datatype, const unsigned char* language) { int rv = 0; if(node->type != node_type) return 0; switch (node->type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: rv = raptor_uri_equals_v2(node->world, node->value.resource.uri, (raptor_uri*)node_data); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: rv = !strcmp((const char*)node->value.blank.string, (const char*)node_data); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: if((char*)node->value.literal.string != NULL && (char*)node_data != NULL) { /* string */ rv = (strcmp((char*)node->value.literal.string, (char*)node_data) == 0); /* language */ if((char*)node->value.literal.language != NULL && (char*)language != NULL) rv &= (strcmp((char*)node->value.literal.language, (char*)language) == 0); else if((char*)node->value.literal.language != NULL || (char*)language != NULL) rv= 0; /* datatype */ if(node->value.literal.datatype != NULL && datatype != NULL) rv &= (raptor_uri_equals_v2(node->world, node->value.literal.datatype,datatype) !=0); else if(node->value.literal.datatype != NULL || datatype != NULL) rv = 0; } else { RAPTOR_FATAL1("string must be non-NULL for literal or xml literal\n"); rv = 0; } break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: /* Nothing to do */ break; } return rv; } /* * raptor_dot_serializer_new_node implementation: * @world: raptor_world object * @node_type: Raptor identifier type * @node_data: For node_type RAPTOR_IDENTIFIER_TYPE_ORDINAL, int* to the * ordinal. * @datatype: Literal datatype or NULL * @language: Literal language or NULL * * Parts of this is taken from redland librdf_node.h and librdf_node.c * * Return value: a new raptor_dot_serializer_node * **/ static raptor_dot_serializer_node * raptor_dot_serializer_new_node(raptor_world* world, raptor_identifier_type node_type, const void* node_data, raptor_uri* datatype, const unsigned char *language) { unsigned char *string; raptor_dot_serializer_node* node; if(node_type == RAPTOR_IDENTIFIER_TYPE_UNKNOWN) return NULL; node = (raptor_dot_serializer_node *)RAPTOR_CALLOC(raptor_dot_serializer_node, 1, sizeof(raptor_dot_serializer_node)); if(node) { node->world = world; node->type = node_type; switch (node_type) { case RAPTOR_IDENTIFIER_TYPE_PREDICATE: node->type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; /* intentional fall through */ case RAPTOR_IDENTIFIER_TYPE_RESOURCE: node->value.resource.uri = raptor_uri_copy_v2(world, (raptor_uri*)node_data); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: string=(unsigned char*)RAPTOR_MALLOC(blank, strlen((char*)node_data)+1); strcpy((char*)string, (const char*) node_data); node->value.blank.string = string; break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: string = (unsigned char*)RAPTOR_MALLOC(literal, strlen((char*)node_data)+1); strcpy((char*)string, (const char*)node_data); node->value.literal.string = string; if(datatype) node->value.literal.datatype = raptor_uri_copy_v2(world, datatype); if(language) { unsigned char *lang; lang = (unsigned char*)RAPTOR_MALLOC(language, strlen((const char*)language)+1); strcpy((char*)lang, (const char*)language); node->value.literal.language = lang; } break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FREE(raptor_dot_serializer_node, node); } } return node; } /* add a namespace */ static int raptor_dot_serializer_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_dot_context * context = (raptor_dot_context *)serializer->context; int i; for( i = 0 ; i < raptor_sequence_size(context->namespaces) ; i++ ) { raptor_namespace * ns; ns = (raptor_namespace *)raptor_sequence_get_at(context->namespaces, i); /* If prefix is already declared, ignore it */ if((!ns->prefix && !nspace->prefix) || (ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) || (ns->uri && nspace->uri && raptor_uri_equals_v2(serializer->world, ns->uri, nspace->uri)) ) return 1; } nspace = raptor_new_namespace_from_uri(context->nstack, nspace->prefix, nspace->uri, 0); if(!nspace) return 1; raptor_sequence_push(context->namespaces, nspace); return 0; } /* add a namespace */ static int raptor_dot_serializer_declare_namespace(raptor_serializer* serializer, raptor_uri* uri, const unsigned char *prefix) { raptor_dot_context * context = (raptor_dot_context *)serializer->context; raptor_namespace *ns; int rc; ns = raptor_new_namespace_from_uri(context->nstack, prefix, uri, 0); rc = raptor_dot_serializer_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /* create a new serializer */ static int raptor_dot_serializer_init(raptor_serializer *serializer, const char *name) { raptor_dot_context * context = (raptor_dot_context *)serializer->context; /* Setup namespace handling */ context->nstack = raptor_new_namespaces_v2(serializer->world, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer, 1); context->namespaces=raptor_new_sequence((raptor_sequence_free_handler *)raptor_free_namespace, NULL); /* We keep a list of nodes to avoid duplication (which isn't * critical in graphviz, but why bloat the file?) */ context->resources = raptor_new_sequence((raptor_sequence_free_handler *)raptor_dot_serializer_free_node, NULL); context->literals = raptor_new_sequence((raptor_sequence_free_handler *)raptor_dot_serializer_free_node, NULL); context->bnodes = raptor_new_sequence((raptor_sequence_free_handler *)raptor_dot_serializer_free_node, NULL); return 0; } /** * raptor_dot_iostream_write_string: * @iostr: #raptor_iostream to write to * @string: UTF-8 string to write * @len: length of UTF-8 string * or \0 for no escaping. * * Write an UTF-8 string, escaped for graphviz. * * Return value: non-0 on failure. **/ static int raptor_dot_iostream_write_string(raptor_iostream *iostr, const unsigned char *string) { unsigned char c; for( ; (c = *string) ; string++ ) { if( (c == '\\') || (c == '"') || (c == '|') || (c == '{') || (c == '}') ) { raptor_iostream_write_byte(iostr, '\\'); raptor_iostream_write_byte(iostr, c); } else if( c == '\n' ) { raptor_iostream_write_byte(iostr, '\\'); raptor_iostream_write_byte(iostr, 'n'); } else raptor_iostream_write_byte(iostr, c); } return 0; } static void raptor_dot_serializer_write_node_type(raptor_serializer * serializer, raptor_identifier_type type) { switch(type) { case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: raptor_iostream_write_byte(serializer->iostream, 'L'); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: raptor_iostream_write_byte(serializer->iostream, 'B'); break; case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: raptor_iostream_write_byte(serializer->iostream, 'R'); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: raptor_iostream_write_byte(serializer->iostream, '?'); break; } } static void raptor_dot_serializer_write_uri(raptor_serializer* serializer, raptor_uri* uri) { raptor_dot_context* context = (raptor_dot_context*)serializer->context; unsigned char* full = raptor_uri_as_string_v2(serializer->world, uri); int i; for( i = 0 ; i < raptor_sequence_size(context->namespaces) ; i++ ) { raptor_namespace* ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); const unsigned char* ns_uri_string; size_t ns_uri_string_len; ns_uri_string=raptor_uri_as_counted_string_v2(serializer->world, ns->uri, &ns_uri_string_len); if(!strncmp((char*)full, (char*)ns_uri_string, ns_uri_string_len) ) { const unsigned char* prefix = raptor_namespace_get_prefix(ns); if(prefix) { raptor_iostream_write_string(serializer->iostream, prefix); raptor_iostream_write_byte(serializer->iostream, ':'); } raptor_iostream_write_string(serializer->iostream, full + ns_uri_string_len); return; } } raptor_iostream_write_string(serializer->iostream, full); } static void raptor_dot_serializer_write_node(raptor_serializer * serializer, const void* term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char * literal_language) { switch(type) { case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: raptor_dot_iostream_write_string(serializer->iostream, (const unsigned char*)term); if(literal_language && type == RAPTOR_IDENTIFIER_TYPE_LITERAL) { raptor_iostream_write_byte(serializer->iostream, '|'); raptor_iostream_write_string(serializer->iostream, "Language: "); raptor_iostream_write_string(serializer->iostream, literal_language); } if(type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { raptor_iostream_write_byte(serializer->iostream, '|'); raptor_iostream_write_string(serializer->iostream, "Datatype: "); raptor_iostream_write_string(serializer->iostream, raptor_xml_literal_datatype_uri_string); } else if(literal_datatype) { raptor_iostream_write_byte(serializer->iostream, '|'); raptor_iostream_write_string(serializer->iostream, "Datatype: "); raptor_dot_serializer_write_uri(serializer, (raptor_uri*)literal_datatype); } break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: raptor_iostream_write_counted_string(serializer->iostream, "_:", 2); raptor_iostream_write_string(serializer->iostream, term); break; case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: raptor_dot_serializer_write_uri(serializer, (raptor_uri*)term); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL2("Unknown type %d", type); } } /* Check the list to see if the node is a duplicate. If not, add it * to the list. */ static void raptor_dot_serializer_assert_node(raptor_serializer* serializer, raptor_identifier_type node_type, const void* node_data, raptor_uri* datatype, const unsigned char* language) { raptor_dot_context* context = (raptor_dot_context*)serializer->context; raptor_sequence* seq = NULL; int i; /* Which list are we searching? */ switch(node_type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: seq = context->resources; break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: seq = context->bnodes; break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: seq = context->literals; break; case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: case RAPTOR_IDENTIFIER_TYPE_ORDINAL: break; } for( i = 0 ; i < raptor_sequence_size(seq) ; i++ ) { raptor_dot_serializer_node* node = (raptor_dot_serializer_node*)raptor_sequence_get_at(seq, i); if(raptor_dot_serializer_node_matches(node, node_type, node_data, datatype, language) ) return; } raptor_sequence_push(seq, raptor_dot_serializer_new_node(serializer->world, node_type, node_data, datatype, language)); } /* start a serialize */ static int raptor_dot_serializer_start(raptor_serializer* serializer) { raptor_iostream_write_string(serializer->iostream, (const unsigned char *) "digraph {\n\trankdir=LR;\n\tcharset=\"utf-8\";\n\n"); return 0; } static int raptor_dot_serializer_write_colors(raptor_serializer* serializer, raptor_identifier_type type) { switch(type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: if(serializer->feature_resource_border) { raptor_iostream_write_string(serializer->iostream, (const unsigned char *)", color="); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)serializer->feature_resource_border); } else raptor_iostream_write_string(serializer->iostream, (const unsigned char *)", color=blue"); if(serializer->feature_resource_fill) { raptor_iostream_write_string(serializer->iostream, (const unsigned char *)", style=filled, fillcolor="); raptor_iostream_write_string(serializer->iostream, (const unsigned char *) serializer->feature_resource_fill); } break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: if(serializer->feature_bnode_border) { raptor_iostream_write_string(serializer->iostream, (const unsigned char *)", color="); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)serializer->feature_bnode_border); } else raptor_iostream_write_string(serializer->iostream, (const unsigned char *)", color=green"); if(serializer->feature_bnode_fill) { raptor_iostream_write_string(serializer->iostream, (const unsigned char *)", style=filled, fillcolor="); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)serializer->feature_bnode_fill); } break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: if(serializer->feature_literal_border) { raptor_iostream_write_string(serializer->iostream, (const unsigned char *)", color="); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)serializer->feature_literal_border); } if(serializer->feature_literal_fill) { raptor_iostream_write_string(serializer->iostream, (const unsigned char *)", style=filled, fillcolor="); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)serializer->feature_literal_fill); } break; case RAPTOR_IDENTIFIER_TYPE_PREDICATE: case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: break; } return 0; } /* end a serialize */ static int raptor_dot_serializer_end(raptor_serializer* serializer) { raptor_dot_context* context=(raptor_dot_context*)serializer->context; raptor_dot_serializer_node* node; int i; /* Print our nodes. */ raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\n\t// Resources\n"); for( i = 0 ; i < raptor_sequence_size(context->resources) ; i++ ) { node = (raptor_dot_serializer_node*)raptor_sequence_get_at(context->resources, i); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\t\"R"); raptor_dot_serializer_write_node(serializer, node->value.resource.uri, RAPTOR_IDENTIFIER_TYPE_RESOURCE, NULL, NULL); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\" [ label=\""); raptor_dot_serializer_write_node(serializer, node->value.resource.uri, RAPTOR_IDENTIFIER_TYPE_RESOURCE, NULL, NULL); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\", shape=ellipse"); raptor_dot_serializer_write_colors(serializer, RAPTOR_IDENTIFIER_TYPE_RESOURCE); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)" ];\n"); } raptor_free_sequence(context->resources); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\n\t// Anonymous nodes\n"); for( i = 0 ; i < raptor_sequence_size(context->bnodes) ; i++ ) { node = (raptor_dot_serializer_node *)raptor_sequence_get_at(context->bnodes, i); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\t\"B"); raptor_dot_serializer_write_node(serializer, node->value.resource.uri, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, NULL); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\" [ label=\""); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\", shape=circle"); raptor_dot_serializer_write_colors(serializer, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)" ];\n"); } raptor_free_sequence(context->bnodes); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\n\t// Literals\n"); for( i = 0 ; i < raptor_sequence_size(context->literals) ; i++ ) { node = (raptor_dot_serializer_node *)raptor_sequence_get_at(context->literals, i); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\t\"L"); raptor_dot_serializer_write_node(serializer, node->value.literal.string, RAPTOR_IDENTIFIER_TYPE_LITERAL, node->value.literal.datatype, node->value.literal.language); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\" [ label=\""); raptor_dot_serializer_write_node(serializer, node->value.literal.string, RAPTOR_IDENTIFIER_TYPE_LITERAL, node->value.literal.datatype, node->value.literal.language); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\", shape=record"); raptor_dot_serializer_write_colors(serializer, RAPTOR_IDENTIFIER_TYPE_LITERAL); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)" ];\n"); } raptor_free_sequence(context->literals); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\n\tlabel=\"\\n\\nModel:\\n"); if(serializer->base_uri) raptor_iostream_write_string(serializer->iostream, raptor_uri_as_string_v2(serializer->world, serializer->base_uri)); else raptor_iostream_write_string(serializer->iostream, "(Unknown)"); if(raptor_sequence_size(context->namespaces)) { raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\\n\\nNamespaces:\\n"); for( i = 0 ; i < raptor_sequence_size(context->namespaces) ; i++ ) { raptor_namespace* ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); const unsigned char* prefix = raptor_namespace_get_prefix(ns); if(prefix) { raptor_iostream_write_string(serializer->iostream, (const unsigned char *)ns->prefix); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)": "); } raptor_iostream_write_string(serializer->iostream, raptor_uri_as_string_v2(serializer->world, ns->uri)); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\\n"); } raptor_free_sequence(context->namespaces); } raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\";\n"); raptor_iostream_write_string(serializer->iostream, (const unsigned char *) "}\n"); return 0; } /* destroy a serializer */ static void raptor_dot_serializer_terminate(raptor_serializer* serializer) { /* raptor_dot_context* context=(raptor_dot_context*)serializer->context; */ /* Everything should have been freed in raptor_dot_serializer_end */ } /* serialize a statement */ static int raptor_dot_serializer_statement(raptor_serializer* serializer, const raptor_statement *statement) { /* Cache the nodes for later. */ raptor_dot_serializer_assert_node(serializer, statement->subject_type, statement->subject, NULL, NULL); raptor_dot_serializer_assert_node(serializer, statement->object_type, statement->object, statement->object_literal_datatype, statement->object_literal_language); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\t\""); raptor_dot_serializer_write_node_type(serializer, statement->subject_type); raptor_dot_serializer_write_node(serializer, statement->subject, statement->subject_type, NULL, NULL); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\" -> \""); raptor_dot_serializer_write_node_type(serializer, statement->object_type); raptor_dot_serializer_write_node(serializer, statement->object, statement->object_type, statement->object_literal_datatype, statement->object_literal_language); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\" [ label=\""); raptor_dot_serializer_write_node(serializer, statement->predicate, statement->predicate_type, NULL, NULL); raptor_iostream_write_string(serializer->iostream, (const unsigned char *)"\" ];\n"); return 0; } static int raptor_dot_serializer_register_factory(raptor_serializer_factory *factory) { factory->context_length = sizeof(raptor_dot_context); factory->init = raptor_dot_serializer_init; factory->declare_namespace = raptor_dot_serializer_declare_namespace; factory->declare_namespace_from_namespace = raptor_dot_serializer_declare_namespace_from_namespace; factory->serialize_start = raptor_dot_serializer_start; factory->serialize_statement = raptor_dot_serializer_statement; factory->serialize_end = raptor_dot_serializer_end; factory->finish_factory = NULL; factory->terminate = raptor_dot_serializer_terminate; return 0; } int raptor_init_serializer_dot(raptor_world* world) { return raptor_serializer_register_factory(world, "dot", "GraphViz DOT format", "text/x-graphviz", NULL, (const unsigned char*)"http://www.graphviz.org/doc/info/lang.html", &raptor_dot_serializer_register_factory); } raptor-1.4.21/src/raptor_memstr.c0000644000175000017500000000372111330672502013662 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_memstr.c - search for a string in a block of memory * * Copyright (C) 2008, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * raptor_memstr: * @haystack: memory block to search in * @haystack_len: size of memory block * @needle: string to search with * * INTERNAL: Search for a string in a block of memory * * The block of memory in @haystack may not be NUL terminated but * the searching for @needle will end if a NUL is found in @haystack. * * Return value: pointer to match string or NULL on failure or failed to find */ const char* raptor_memstr(const char *haystack, size_t haystack_len, const char *needle) { char c; size_t needle_len; const char *p; if(!haystack || !needle) return NULL; if(!*needle) return haystack; needle_len=strlen(needle); /* loop invariant: haystack_len is always length of remaining buffer at *p */ for(p=haystack; (haystack_len >= needle_len) && (c=*p); p++, haystack_len--) { /* check match */ if(!memcmp(p, needle, needle_len)) return p; } return NULL; } raptor-1.4.21/src/raptor_serialize_rss.c0000644000175000017500000024156211330672502015240 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_rss.c - Raptor RSS 1.0 and Atom 1.0 serializers * * Copyright (C) 2003-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #include "raptor_rss.h" typedef struct { raptor_world* world; /* owned by this: URI OR bnode if starts with _: */ raptor_uri* uri; /* shared pointer */ raptor_rss_item* item; } raptor_rss_group_map; /* * Raptor 'RSS 1.0' serializer object */ typedef struct { raptor_world* world; /* static rss model */ raptor_rss_model model; /* Triples with no assigned type node */ raptor_sequence *triples; /* Sequence of raptor_rss_item* : rdf:Seq items rdf:_ at offset n */ raptor_sequence *items; /* Sequence of raptor_rss_item* (?x rdf:type rss:Enclosure) */ raptor_sequence *enclosures; /* URI of rdf:Seq node */ raptor_uri *seq_uri; /* Namespace stack for serializing */ raptor_namespace_stack *nstack; /* the default namespace (rdf: or atom:) - * this is destroyed when nstack above is deleted */ raptor_namespace* default_nspace; /* the xml: namespace */ raptor_namespace *xml_nspace; /* the root element (rdf:RDF or atom:feed) */ raptor_xml_element* root_element; /* where the xml is being written */ raptor_xml_writer *xml_writer; /* non-0 if this is an atom 1.0 serializer */ int is_atom; /* 0 = none * 1 = existing rss:item item containg rdf/xml encoding of any extra * triples about URI (rss-1.0 serializer only) * 2 = at:md element containing rdf/xml property elements encoding * of any extra triples about URI (atom serializer only) */ int rss_triples_mode; /* namespaces declared here */ raptor_namespace* nspaces[RAPTOR_RSS_NAMESPACES_SIZE]; /* Map of group URI (key, owned) : rss item object (value, shared) */ raptor_avltree *group_map; /* User declared namespaces */ raptor_sequence *user_namespaces; /* URI of XML Literal datatype */ raptor_uri* xml_literal_dt; int free_default_nspace; } raptor_rss10_serializer_context; static void raptor_free_group_map(raptor_rss_group_map* gm) { if(gm->uri) raptor_free_uri_v2(gm->world, gm->uri); RAPTOR_FREE(raptor_rss_group_map, gm); } static int raptor_rss_group_map_compare(raptor_rss_group_map* gm1, raptor_rss_group_map* gm2) { return raptor_uri_compare_v2(gm1->world, gm1->uri, gm2->uri); } static raptor_rss_item* raptor_rss10_get_group_item(raptor_rss10_serializer_context *rss_serializer, raptor_uri* uri) { raptor_rss_group_map search_gm; raptor_rss_group_map* gm; search_gm.world=rss_serializer->world; search_gm.uri=uri; gm=(raptor_rss_group_map*)raptor_avltree_search(rss_serializer->group_map, (void*)&search_gm); return gm ? gm->item : NULL; } static int raptor_rss10_set_item_group(raptor_rss10_serializer_context *rss_serializer, raptor_uri* uri, raptor_rss_item *item) { raptor_rss_group_map* gm; if(raptor_rss10_get_group_item(rss_serializer, uri)) return 0; gm=(raptor_rss_group_map*)RAPTOR_CALLOC(raptor_rss_group_map, 1, sizeof(raptor_rss_group_map)); gm->world=rss_serializer->world; gm->uri=raptor_uri_copy_v2(rss_serializer->world, uri); gm->item=item; raptor_avltree_add(rss_serializer->group_map, gm); return 0; } /** * raptor_rss10_serialize_init: * @serializer: serializer object * @name: serializer name * * INTERNAL (raptor_serializer_factory API) - create a new serializer * * Return value: non-0 on failure */ static int raptor_rss10_serialize_init(raptor_serializer* serializer, const char *name) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; rss_serializer->world=serializer->world; raptor_rss_common_init(serializer->world); raptor_rss_model_init(serializer->world, &rss_serializer->model); rss_serializer->triples=raptor_new_sequence((raptor_sequence_free_handler*)raptor_free_statement_v2, (raptor_sequence_print_handler*)raptor_print_statement_v2); rss_serializer->items=raptor_new_sequence((raptor_sequence_free_handler*)raptor_free_rss_item, (raptor_sequence_print_handler*)NULL); rss_serializer->enclosures=raptor_new_sequence((raptor_sequence_free_handler*)raptor_free_rss_item, (raptor_sequence_print_handler*)NULL); rss_serializer->group_map=raptor_new_avltree(serializer->world, (raptor_data_compare_function)raptor_rss_group_map_compare, (raptor_data_free_function)raptor_free_group_map, 0); rss_serializer->user_namespaces=raptor_new_sequence((raptor_sequence_free_handler*)raptor_free_namespace, NULL); rss_serializer->is_atom=!(strcmp(name,"atom")); rss_serializer->nstack=raptor_new_namespaces_v2(serializer->world, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer, 1); rss_serializer->xml_literal_dt=raptor_new_uri_v2(serializer->world, raptor_xml_literal_datatype_uri_string); return 0; } /** * raptor_rss10_serialize_terminate: * @serializer: serializer object * * INTERNAL (raptor_serializer_factory API) - destroy a serializer */ static void raptor_rss10_serialize_terminate(raptor_serializer* serializer) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; int i; raptor_world* world=serializer->world; raptor_rss_model_clear(&rss_serializer->model); raptor_rss_common_terminate(world); if(rss_serializer->triples) raptor_free_sequence(rss_serializer->triples); if(rss_serializer->items) raptor_free_sequence(rss_serializer->items); if(rss_serializer->enclosures) raptor_free_sequence(rss_serializer->enclosures); if(rss_serializer->seq_uri) raptor_free_uri_v2(rss_serializer->world, rss_serializer->seq_uri); if(rss_serializer->xml_writer) raptor_free_xml_writer(rss_serializer->xml_writer); for(i=0; inspaces[i]) raptor_free_namespace(rss_serializer->nspaces[i]); } if(rss_serializer->free_default_nspace && rss_serializer->default_nspace) raptor_free_namespace(rss_serializer->default_nspace); if(rss_serializer->xml_nspace) raptor_free_namespace(rss_serializer->xml_nspace); if(rss_serializer->user_namespaces) raptor_free_sequence(rss_serializer->user_namespaces); /* all raptor_namespace* objects must be freed BEFORE the stack * they are attached to here: */ if(rss_serializer->nstack) raptor_free_namespaces(rss_serializer->nstack); if(rss_serializer->group_map) raptor_free_avltree(rss_serializer->group_map); if(world->rss_fields_info_qnames) { for(i=0; i< RAPTOR_RSS_FIELDS_SIZE; i++) { if(world->rss_fields_info_qnames[i]) raptor_free_qname(world->rss_fields_info_qnames[i]); } RAPTOR_FREE(raptor_qname* array, world->rss_fields_info_qnames); world->rss_fields_info_qnames=NULL; } if(world->rss_types_info_qnames) { for(i=0; i< RAPTOR_RSS_COMMON_SIZE; i++) { if(world->rss_types_info_qnames[i]) raptor_free_qname(world->rss_types_info_qnames[i]); } RAPTOR_FREE(raptor_wname* array, world->rss_types_info_qnames); world->rss_types_info_qnames=NULL; } if(rss_serializer->xml_literal_dt) raptor_free_uri_v2(rss_serializer->world, rss_serializer->xml_literal_dt); } /** * raptor_rss10_move_statements: * @rss_serializer: serializer object * @type: item type * @item: item object * * INTERNAL - Move statements from the stored triples into item @item * that match @item's URI as subject. * * Return value: count of number of triples moved */ static int raptor_rss10_move_statements(raptor_rss10_serializer_context *rss_serializer, raptor_rss_type type, raptor_rss_item *item) { int t; int count=0; int is_atom=rss_serializer->is_atom; for(t=0; t< raptor_sequence_size(rss_serializer->triples); t++) { raptor_statement_v2* s; int f; s=(raptor_statement_v2*)raptor_sequence_get_at(rss_serializer->triples, t); if(!s) continue; if(s->s->subject_type != RAPTOR_IDENTIFIER_TYPE_RESOURCE || !raptor_uri_equals_v2(rss_serializer->world, (raptor_uri*)s->s->subject, item->uri)) continue; /* now we know this triple is associated with the item URI * and can count the relevant triples */ count++; /* add triples with anonymous object to the general triples sequence * for this item, and to the group map (blank node closure) */ if(s->s->object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { raptor_uri* fake_uri=raptor_new_uri_v2(rss_serializer->world, (const unsigned char*)s->s->object); raptor_rss10_set_item_group(rss_serializer, fake_uri, item); raptor_free_uri_v2(rss_serializer->world, fake_uri); RAPTOR_DEBUG4("Moved anonymous value property URI <%s> for typed node %i - %s\n", raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)s->s->predicate), type, raptor_rss_items_info[type].name); s=(raptor_statement_v2*)raptor_sequence_delete_at(rss_serializer->triples, t); raptor_sequence_push(item->triples, s); continue; } /* otherwise process object value types resource or literal */ for(f=0; f < RAPTOR_RSS_FIELDS_SIZE; f++) { if(!rss_serializer->world->rss_fields_info_uris[f]) continue; if((s->s->predicate_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || s->s->predicate_type == RAPTOR_IDENTIFIER_TYPE_PREDICATE) && s->s->object_type != RAPTOR_IDENTIFIER_TYPE_ANONYMOUS && raptor_uri_equals_v2(rss_serializer->world, (raptor_uri*)s->s->predicate, rss_serializer->world->rss_fields_info_uris[f])) { raptor_rss_field* field=raptor_rss_new_field(rss_serializer->world); /* found field this triple to go in 'item' so move the * object value over */ if(s->s->object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) field->uri=(raptor_uri*)s->s->object; else { field->value=(unsigned char*)s->s->object; if(s->s->object_literal_datatype && raptor_uri_equals_v2(rss_serializer->world, s->s->object_literal_datatype, rss_serializer->xml_literal_dt)) field->is_xml=1; if(f == RAPTOR_RSS_FIELD_CONTENT_ENCODED) field->is_xml=1; if(f == RAPTOR_RSS_FIELD_ATOM_SUMMARY && *field->value == '<') field->is_xml=1; } s->s->object=NULL; if(is_atom) { int i; /* Rewrite item fields rss->atom */ for(i=0; raptor_atom_to_rss[i].from != RAPTOR_RSS_FIELD_UNKNOWN; i++) { int from_f=raptor_atom_to_rss[i].to; int to_f=raptor_atom_to_rss[i].from; /* Do not rewrite to atom0.3 terms */ if(raptor_rss_fields_info[to_f].nspace == ATOM0_3_NS) continue; if(f == from_f && !(item->fields[to_f] && item->fields[to_f]->value)) { f= to_f; if(to_f == RAPTOR_RSS_FIELD_ATOM_SUMMARY && *field->value == '<') field->is_xml=1; field->is_mapped=1; RAPTOR_DEBUG5("Moved field %d - %s to field %d - %s\n", from_f, raptor_rss_fields_info[from_f].name, to_f, raptor_rss_fields_info[to_f].name); break; } } } /* end is atom field to map */ RAPTOR_DEBUG1("Adding field\n"); raptor_rss_item_add_field(item, f, field); raptor_sequence_set_at(rss_serializer->triples, t, NULL); break; } } /* end for field loop */ /* loop ended early so triple was assocated with a field - continue */ if(f < RAPTOR_RSS_FIELDS_SIZE) continue; /* otherwise triple was not found as a field so store in triples * sequence */ RAPTOR_DEBUG4("UNKNOWN property URI <%s> for typed node %i - %s\n", raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)s->s->predicate), type, raptor_rss_items_info[type].name); s=(raptor_statement_v2*)raptor_sequence_delete_at(rss_serializer->triples, t); raptor_sequence_push(item->triples, s); } /* end for all triples */ #ifdef RAPTOR_DEBUG if(count > 0) RAPTOR_DEBUG5("Moved %d triples to typed node %i - %s with uri <%s>\n", count, type, raptor_rss_items_info[type].name, raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)item->uri)); #endif return count; } /** * raptor_rss10_move_anonymous_statements: * @rss_serializer: serializer object * * INTERNAL - Move statements with a blank node subject to the appropriate item * */ static int raptor_rss10_move_anonymous_statements(raptor_rss10_serializer_context *rss_serializer) { int t; int handled=1; int round=0; #ifdef RAPTOR_DEBUG int moved_count=0; #endif for(round=0; handled; round++) { handled=0; for(t=0; t< raptor_sequence_size(rss_serializer->triples); t++) { raptor_statement_v2* s; raptor_uri* fake_uri; raptor_rss_item* item; s=(raptor_statement_v2*)raptor_sequence_get_at(rss_serializer->triples, t); if(!s) continue; if(s->s->subject_type != RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) continue; fake_uri=raptor_new_uri_v2(rss_serializer->world, (const unsigned char*)s->s->subject); item=raptor_rss10_get_group_item(rss_serializer, fake_uri); raptor_free_uri_v2(rss_serializer->world, fake_uri); if(item) { /* triple matched an existing item */ s=(raptor_statement_v2*)raptor_sequence_delete_at(rss_serializer->triples, t); raptor_sequence_push(item->triples, s); #ifdef RAPTOR_DEBUG moved_count++; #endif if(s->s->object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { fake_uri=raptor_new_uri_v2(rss_serializer->world, (const unsigned char*)s->s->object); raptor_rss10_set_item_group(rss_serializer, fake_uri, item); raptor_free_uri_v2(rss_serializer->world, fake_uri); } handled=1; } } /* end for all triples */ #ifdef RAPTOR_DEBUG if(moved_count > 0) RAPTOR_DEBUG3("Round %d: Moved %d triples\n", round, moved_count); #endif } return 0; } /** * raptor_rss10_move_leftover_statements: * @rss_serializer: serializer object * * INTERNAL - Move any statements in the serializer pool to items or channel * */ static int raptor_rss10_move_leftover_statements(raptor_rss10_serializer_context *rss_serializer) { raptor_rss_model* rss_model; int i; int type; raptor_rss_item* item; rss_model=&rss_serializer->model; type=RAPTOR_RSS_ITEM; for(i=0; i < raptor_sequence_size(rss_serializer->items); i++) { item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); raptor_rss10_move_statements(rss_serializer, (raptor_rss_type)type, item); } type=RAPTOR_RSS_CHANNEL; if(rss_model->common[type]) { item=rss_model->common[type]; raptor_rss10_move_statements(rss_serializer, (raptor_rss_type)type, item); } return 0; } /** * raptor_rss10_remove_mapped_item_fields: * @rss_serializer: serializer object * @item: rss item * @type: item type * * INTERNAL - Remove mapped fields for an item * */ static int raptor_rss10_remove_mapped_item_fields(raptor_rss10_serializer_context *rss_serializer, raptor_rss_item* item, int type) { int f; if(!item->fields_count) return 0; for(f=0; f < RAPTOR_RSS_FIELDS_SIZE; f++) { raptor_rss_field* field; int saw_mapped=0; int saw_non_mapped=0; for (field=item->fields[f]; field; field=field->next) { if(field->is_mapped) saw_mapped++; else saw_non_mapped++; } if(saw_mapped && saw_non_mapped) { raptor_rss_field* last_field=NULL; RAPTOR_DEBUG6("Item %p Field %d - %s: %d mapped %d non-mapped\n", item, f, raptor_rss_fields_info[f].name, saw_mapped, saw_non_mapped); field=item->fields[f]; while(field) { raptor_rss_field* next=field->next; field->next=NULL; if(field->is_mapped) raptor_rss_field_free(field); else { if(!last_field) item->fields[f]=field; else last_field->next=field; last_field=field; } field=next; } } } return 0; } /** * raptor_rss10_remove_mapped_fields: * @rss_serializer: serializer object * * INTERNAL - Move statements with a blank node subject to the appropriate item * */ static int raptor_rss10_remove_mapped_fields(raptor_rss10_serializer_context *rss_serializer) { raptor_rss_model* rss_model; int is_atom; int i; rss_model=&rss_serializer->model; is_atom=rss_serializer->is_atom; if(!is_atom) return 0; if(rss_model->items_count) { for(i=0; i < raptor_sequence_size(rss_serializer->items); i++) { raptor_rss_item* item; item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); raptor_rss10_remove_mapped_item_fields(rss_serializer, item, RAPTOR_RSS_ITEM); } } for(i=RAPTOR_RSS_CHANNEL; i< RAPTOR_RSS_COMMON_SIZE; i++) { raptor_rss_item* item; for (item=rss_model->common[i]; item; item=item->next) { raptor_rss10_remove_mapped_item_fields(rss_serializer, item, i); } } return 0; } /** * raptor_rss10_store_statement: * @rss_serializer: serializer object * @s: statement * * INTERNAL - decide where to store a statement in an item or keep pending * * Return value: non-0 if handled (stored) */ static int raptor_rss10_store_statement(raptor_rss10_serializer_context *rss_serializer, raptor_statement_v2 *s) { raptor_rss_item *item=NULL; int handled=0; int is_atom=rss_serializer->is_atom; raptor_uri* fake_uri; fake_uri=raptor_new_uri_v2(rss_serializer->world, (const unsigned char*)s->s->subject); item=raptor_rss10_get_group_item(rss_serializer, fake_uri); raptor_free_uri_v2(rss_serializer->world, fake_uri); if(item && s->s->object_type != RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { int f; for(f=0; f < RAPTOR_RSS_FIELDS_SIZE; f++) { raptor_rss_field* field; if(!rss_serializer->world->rss_fields_info_uris[f]) continue; if((s->s->predicate_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || s->s->predicate_type == RAPTOR_IDENTIFIER_TYPE_PREDICATE) && raptor_uri_equals_v2(rss_serializer->world, (raptor_uri*)s->s->predicate, rss_serializer->world->rss_fields_info_uris[f])) { /* found field this triple to go in 'item' so move the * object value over */ field=raptor_rss_new_field(rss_serializer->world); if(s->s->object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { field->uri=(raptor_uri*)s->s->object; } else { field->value=(unsigned char*)s->s->object; if(s->s->object_literal_datatype && raptor_uri_equals_v2(rss_serializer->world, s->s->object_literal_datatype, rss_serializer->xml_literal_dt)) field->is_xml=1; if(f == RAPTOR_RSS_FIELD_CONTENT_ENCODED) field->is_xml=1; if(f == RAPTOR_RSS_FIELD_ATOM_SUMMARY && *field->value == '<') field->is_xml=1; } s->s->object=NULL; if(is_atom) { int i; /* Rewrite item fields rss->atom */ for(i=0; raptor_atom_to_rss[i].from != RAPTOR_RSS_FIELD_UNKNOWN; i++) { int from_f=raptor_atom_to_rss[i].to; int to_f=raptor_atom_to_rss[i].from; /* Do not rewrite to atom0.3 terms */ if(raptor_rss_fields_info[to_f].nspace == ATOM0_3_NS) continue; if(f == from_f && !(item->fields[to_f] && item->fields[to_f]->value)) { f= to_f; if(to_f == RAPTOR_RSS_FIELD_ATOM_SUMMARY && *field->value == '<') field->is_xml=1; field->is_mapped=1; RAPTOR_DEBUG5("Moved field %d - %s to field %d - %s\n", from_f, raptor_rss_fields_info[from_f].name, to_f, raptor_rss_fields_info[to_f].name); break; } } } RAPTOR_DEBUG1("Adding field\n"); raptor_rss_item_add_field(item, f, field); raptor_free_statement_v2(s); #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Stored statement under typed node %p\n", item); #endif handled=1; break; } } } if(!handled) { raptor_sequence_push(rss_serializer->triples, s); #if RAPTOR_DEBUG > 1 fprintf(stderr,"Stored statement: "); raptor_print_statement_as_ntriples_v2(s, stderr); fprintf(stderr,"\n"); #endif handled=1; } return handled; } static int raptor_rss10_serialize_start(raptor_serializer* serializer) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; if(serializer->feature_rss_triples) { if(!strcmp((const char*)serializer->feature_rss_triples, "none")) rss_serializer->rss_triples_mode=0; else if(!strcmp((const char*)serializer->feature_rss_triples, "rdf-xml")) rss_serializer->rss_triples_mode=1; else if(!strcmp((const char*)serializer->feature_rss_triples, "atom-triples")) rss_serializer->rss_triples_mode=2; else rss_serializer->rss_triples_mode=0; } return 0; } /** * raptor_rss10_serialize_statement: * @serializer: serializer object * @statement: statement * * INTERNAL (raptor_serializer_factory API) - Serialize a statement * * Return value: non-0 on failure */ static int raptor_rss10_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement) { raptor_rss10_serializer_context *rss_serializer; raptor_rss_model *rss_model; int handled = 0; int i; raptor_rss_type type; raptor_rss_item *item = NULL; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; rss_model = &rss_serializer->model; #if RAPTOR_DEBUG > 1 if(1) { raptor_statement_v2 s2; RAPTOR_DEBUG1("Processing statement\n "); s2.s = (raptor_statement*)statement; s2.world = rss_serializer->world; raptor_print_statement_as_ntriples_v2(&s2, stderr); fputc('\n', stderr); } #endif if(raptor_uri_equals_v2(rss_serializer->world, (raptor_uri*)statement->predicate, RAPTOR_RSS_RSS_items_URI(rss_model))) { /* ignore any triple (? rss:items ?) - is infered */ return 0; } if(!raptor_uri_equals_v2(rss_serializer->world, (raptor_uri*)statement->predicate, RAPTOR_RSS_RDF_type_URI(rss_model))) goto savetriple; /* Look for triple (?resource rdf:type rdf:Seq) */ if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE && raptor_uri_equals_v2(rss_serializer->world, (raptor_uri*)statement->object, RAPTOR_RSS_RDF_Seq_URI(rss_model))) { if(statement->subject_type==RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { RAPTOR_DEBUG2("Saw rdf:Seq with blank node %s\n", (char*)statement->subject); rss_serializer->seq_uri = raptor_new_uri_v2(rss_serializer->world, (unsigned char*)statement->subject); } else { RAPTOR_DEBUG2("Saw rdf:Seq with URI <%s>\n", raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)statement->subject)); rss_serializer->seq_uri=raptor_uri_copy_v2(rss_serializer->world, rss_serializer->seq_uri); } handled = 1; goto savetriple; } /* look for triple: (? rdf:type ?) to find containers and blocks */ type = RAPTOR_RSS_NONE; for(i = 0; i < RAPTOR_RSS_COMMON_SIZE; i++) { raptor_uri *item_uri = serializer->world->rss_types_info_uris[i]; if(item_uri && raptor_uri_equals_v2(rss_serializer->world, (raptor_uri*)statement->object, item_uri)) { type = (raptor_rss_type)i; RAPTOR_DEBUG4("Found typed node %i - %s with URI <%s>\n", type, raptor_rss_items_info[type].name, raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)statement->subject)); break; } } if(type == RAPTOR_RSS_NONE) { RAPTOR_DEBUG2("UNKNOWN typed node with type URI <%s>\n", raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)statement->object)); goto savetriple; } if(type == RAPTOR_RSS_ITEM) { for(i = 0; i < raptor_sequence_size(rss_serializer->items); i++) { item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); if(raptor_rss_item_equals_statement_subject(item, statement)) break; } if(i < raptor_sequence_size(rss_serializer->items)) { RAPTOR_DEBUG2("Found RSS item at entry %d in sequence of items\n", i); } else { RAPTOR_DEBUG2("RSS item URI <%s> is not in sequence of items\n", raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)statement->subject)); item = NULL; } } else if(type == RAPTOR_RSS_ENCLOSURE) { for(i = 0; i < raptor_sequence_size(rss_serializer->enclosures); i++) { item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->enclosures, i); if(raptor_rss_item_equals_statement_subject(item, statement)) break; } if(i < raptor_sequence_size(rss_serializer->items)) { RAPTOR_DEBUG2("Found enclosure at entry %d in sequence of enclosures\n", i); } else { RAPTOR_DEBUG2("Add new enclosure to sequence with URI <%s>\n", raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)statement->subject)); item = raptor_new_rss_item(rss_serializer->world); raptor_sequence_push(rss_serializer->enclosures, item); } } else { item=raptor_rss_model_add_common(rss_model, type); } if(item) { raptor_rss_item_set_uri(item, (raptor_uri*)statement->subject); /* Move any existing statements to the newly discovered item */ raptor_rss10_move_statements(rss_serializer, type, item); raptor_rss10_set_item_group(rss_serializer, item->uri, item); handled = 1; } savetriple: if(!handled) { raptor_statement_v2 *t; t = raptor_statement_copy_v2_from_v1(rss_serializer->world, statement); if(t) handled = raptor_rss10_store_statement(rss_serializer, t); } return 0; } static void raptor_rss10_build_items(raptor_rss10_serializer_context *rss_serializer) { raptor_rss_model* rss_model=&rss_serializer->model; int i; if(!rss_serializer->seq_uri) return; for(i=0; i < raptor_sequence_size(rss_serializer->triples); i++) { int ordinal= -1; raptor_uri* fake_uri=NULL; raptor_statement_v2* s; s=(raptor_statement_v2*)raptor_sequence_get_at(rss_serializer->triples, i); if(!s) continue; #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG1("Processing statement\n "); raptor_print_statement_as_ntriples_v2(s, stderr); fputc('\n', stderr); #endif /* skip triples that are not ? ? */ if(s->s->object_type != RAPTOR_IDENTIFIER_TYPE_RESOURCE) { RAPTOR_DEBUG1("Not ? ? - continuing\n"); continue; } if(s->s->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) fake_uri=raptor_new_uri_v2(rss_serializer->world, (unsigned char*)s->s->subject); else fake_uri=raptor_uri_copy_v2(rss_serializer->world, (raptor_uri*)s->s->subject); if(raptor_uri_equals_v2(rss_serializer->world, fake_uri, rss_serializer->seq_uri)) { /* found triple */ if(s->s->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) ordinal= *((int*)s->s->predicate); else { /* predicate is a resource */ const unsigned char* uri_str; uri_str= raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)s->s->predicate); if(!strncmp((const char*)uri_str, "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) ordinal= raptor_check_ordinal(uri_str+44); } RAPTOR_DEBUG3("Found RSS 1.0 item %d with URI <%s>\n", ordinal, raptor_uri_as_string_v2(rss_serializer->world, (raptor_uri*)s->s->object)); if(ordinal >= 0) { raptor_rss_item *item; item = raptor_new_rss_item(rss_serializer->world); raptor_rss_item_set_uri(item, (raptor_uri*)s->s->object); raptor_sequence_set_at(rss_serializer->items, ordinal-1, item); raptor_sequence_set_at(rss_serializer->triples, i, NULL); /* Move any existing statements to the newly discovered item */ raptor_rss10_move_statements(rss_serializer, RAPTOR_RSS_ITEM, item); raptor_rss10_set_item_group(rss_serializer, item->uri, item); } } raptor_free_uri_v2(rss_serializer->world, fake_uri); } rss_model->items_count=raptor_sequence_size(rss_serializer->items); } static void raptor_rss10_build_xml_names(raptor_serializer *serializer, int is_entry) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; raptor_rss_model* rss_model=&rss_serializer->model; raptor_uri *base_uri=serializer->base_uri; raptor_xml_element *element; raptor_qname *qname; const unsigned char*root_local_name; int i; int is_atom=rss_serializer->is_atom; const raptor_rss_item_info *item_node_type; int item_node_typei; const unsigned char* ns_uri; raptor_world* world=serializer->world; int default_ns_id; const unsigned char *default_prefix; if(is_atom) { default_ns_id = ATOM1_0_NS; ns_uri = raptor_atom_namespace_uri; root_local_name = (is_entry ? (const unsigned char*)"entry" : (const unsigned char*)"feed"); item_node_typei = RAPTOR_ATOM_ENTRY; } else { default_ns_id = RSS1_0_NS; ns_uri = raptor_rdf_namespace_uri; root_local_name = (const unsigned char*)"RDF"; item_node_typei = RAPTOR_RSS_ITEM; } item_node_type = &raptor_rss_items_info[item_node_typei]; if(serializer->feature_prefix_elements) /* declare this NS with standard prefix */ default_prefix = (const unsigned char*)raptor_rss_namespaces_info[default_ns_id].prefix; else default_prefix = NULL; rss_serializer->default_nspace = raptor_new_namespace(rss_serializer->nstack, default_prefix, ns_uri, 0); rss_serializer->free_default_nspace = 1; if(serializer->feature_prefix_elements) { rss_serializer->nspaces[default_ns_id] = rss_serializer->default_nspace; rss_serializer->free_default_nspace = 0; } rss_serializer->xml_nspace = raptor_new_namespace(rss_serializer->nstack, (const unsigned char*)"xml", (const unsigned char*)raptor_xml_namespace_uri, 0); /* Now we have a namespace stack, declare the namespaces */ for(i = 0; i < RAPTOR_RSS_NAMESPACES_SIZE; i++) { raptor_uri* uri = serializer->world->rss_namespaces_info_uris[i]; const unsigned char *prefix; prefix = (const unsigned char*)raptor_rss_namespaces_info[i].prefix; if(!prefix) continue; if(i == default_ns_id) { if(serializer->feature_prefix_elements) prefix = NULL; } if(uri) { raptor_namespace* nspace; nspace = raptor_new_namespace_from_uri(rss_serializer->nstack, prefix, uri, 0); rss_serializer->nspaces[i] = nspace; } } qname = raptor_new_qname_from_namespace_local_name_v2(serializer->world, rss_serializer->nspaces[default_ns_id], root_local_name, NULL); if(base_uri) base_uri = raptor_uri_copy_v2(rss_serializer->world, base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); rss_serializer->root_element = element; /* Declare the namespaces on the root element */ raptor_xml_element_declare_namespace(element, rss_serializer->default_nspace); for(i = 0; i < RAPTOR_RSS_NAMESPACES_SIZE; i++) { const unsigned char *prefix; prefix = (const unsigned char*)raptor_rss_namespaces_info[i].prefix; if(!prefix && i != default_ns_id) continue; if(rss_serializer->nspaces[i]) raptor_xml_element_declare_namespace(element, rss_serializer->nspaces[i]); } for(i = 0; i < raptor_sequence_size(rss_serializer->user_namespaces); i++) { raptor_namespace* nspace; nspace = (raptor_namespace*)raptor_sequence_get_at(rss_serializer->user_namespaces, i); /* Ignore user setting default namespace prefix */ if(!nspace->prefix) continue; raptor_xml_element_declare_namespace(element, nspace); } world->rss_fields_info_qnames=(raptor_qname**)RAPTOR_CALLOC(raptor_qname* array, RAPTOR_RSS_FIELDS_SIZE, sizeof(raptor_qname*)); if(!world->rss_fields_info_qnames) return; for(i=0; i< RAPTOR_RSS_FIELDS_SIZE; i++) { int n=raptor_rss_fields_info[i].nspace; raptor_namespace* nspace=rss_serializer->nspaces[n]; world->rss_fields_info_qnames[i]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, nspace, (const unsigned char*)raptor_rss_fields_info[i].name, NULL); if(!world->rss_fields_info_qnames[i]) return; } world->rss_types_info_qnames=(raptor_qname**)RAPTOR_CALLOC(raptor_qname* array, RAPTOR_RSS_COMMON_SIZE, sizeof(raptor_qname*)); if(!world->rss_types_info_qnames) return; for(i=0; i< RAPTOR_RSS_COMMON_SIZE; i++) { int n=raptor_rss_items_info[i].nspace; raptor_namespace* nspace=rss_serializer->nspaces[n]; if(nspace) { world->rss_types_info_qnames[i]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, nspace, (const unsigned char*)raptor_rss_items_info[i].name, NULL); if(!world->rss_types_info_qnames[i]) return; } } for(i=0; i< RAPTOR_RSS_COMMON_SIZE; i++) { raptor_rss_item* item; for (item=rss_model->common[i]; item; item=item->next) { int typei=i; if(!item->fields_count) continue; if(is_atom) { if(typei == RAPTOR_RSS_CHANNEL) typei=RAPTOR_ATOM_FEED; else if(typei == RAPTOR_RSS_ITEM) typei=RAPTOR_ATOM_ENTRY; } item->node_type=&raptor_rss_items_info[typei]; item->node_typei=typei; } } for(i=0; i < raptor_sequence_size(rss_serializer->items); i++) { raptor_rss_item* item; item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); item->node_type=item_node_type; item->node_typei=item_node_typei; } for(i=0; i < raptor_sequence_size(rss_serializer->enclosures); i++) { raptor_rss_item* item; item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->enclosures, i); item->node_type=&raptor_rss_items_info[RAPTOR_RSS_ENCLOSURE]; item->node_typei=RAPTOR_RSS_ENCLOSURE; } } static void raptor_rss10_emit_atom_triples_map(raptor_serializer *serializer, int is_feed, const unsigned char* map_element_name) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; raptor_xml_writer* xml_writer; raptor_uri *base_uri=serializer->base_uri; raptor_uri* base_uri_copy=NULL; raptor_namespace* at_nspace=rss_serializer->nspaces[ATOMTRIPLES_NS]; raptor_xml_element* at_map_root_element; raptor_qname *at_map_root_qname; int i; xml_writer=rss_serializer->xml_writer; at_map_root_qname=raptor_new_qname_from_namespace_local_name_v2(serializer->world, at_nspace, (const unsigned char*)map_element_name, NULL); base_uri_copy=base_uri ? raptor_uri_copy_v2(rss_serializer->world, base_uri) : NULL; at_map_root_element=raptor_new_xml_element(at_map_root_qname, NULL, base_uri_copy); raptor_xml_writer_start_element(xml_writer, at_map_root_element); /* Walk list of fields mapped atom to rss */ for(i=0; raptor_atom_to_rss[i].from != RAPTOR_RSS_FIELD_UNKNOWN; i++) { int from_f=raptor_atom_to_rss[i].from; int to_f=raptor_atom_to_rss[i].to; const raptor_rss_field_info* from_field_info = &raptor_rss_fields_info[from_f]; const raptor_rss_field_info* to_field_info = &raptor_rss_fields_info[to_f]; raptor_xml_element* at_map_element; raptor_qname *at_map_qname; raptor_qname** at_map_attrs; const char* predicate_prefix; unsigned char* ruri_string; /* Do not rewrite to atom0.3 terms */ if(to_field_info->nspace == ATOM0_3_NS) continue; /* atom:feed only contains some fields that are mapped */ if(is_feed && !(from_f == RAPTOR_RSS_FIELD_ATOM_ID || from_f == RAPTOR_RSS_FIELD_ATOM_UPDATED || from_f == RAPTOR_RSS_FIELD_ATOM_RIGHTS || from_f == RAPTOR_RSS_FIELD_ATOM_TITLE)) continue; predicate_prefix=raptor_rss_namespaces_info[from_field_info->nspace].prefix; if(!predicate_prefix) continue; /* {atom element} */ at_map_qname=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, at_nspace, map_element_name, NULL); base_uri_copy=base_uri ? raptor_uri_copy_v2(rss_serializer->world, base_uri) : NULL; at_map_element=raptor_new_xml_element(at_map_qname, NULL, base_uri_copy); at_map_attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname*)); ruri_string=raptor_uri_to_relative_uri_string_v2(serializer->world, base_uri, serializer->world->rss_fields_info_uris[to_f]); at_map_attrs[0]=raptor_new_qname(rss_serializer->nstack, (const unsigned char*)"property", ruri_string, NULL, NULL); /* errors */ raptor_free_memory(ruri_string); raptor_xml_element_set_attributes(at_map_element, at_map_attrs, 1); raptor_xml_writer_start_element(xml_writer, at_map_element); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)predicate_prefix); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)":", 1); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)from_field_info->name); raptor_xml_writer_end_element(xml_writer, at_map_element); raptor_free_xml_element(at_map_element); } raptor_xml_writer_end_element(xml_writer, at_map_root_element); raptor_free_xml_element(at_map_root_element); } /* atom-specific feed XML elements */ static void raptor_rss10_emit_atom_feed(raptor_serializer *serializer, raptor_rss_item *item) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; raptor_xml_writer* xml_writer; raptor_uri *base_uri=serializer->base_uri; raptor_uri* base_uri_copy=NULL; raptor_xml_element* atom_link_element; raptor_qname *atom_link_qname; raptor_qname** atom_link_attrs; raptor_namespace* atom_nspace=rss_serializer->nspaces[ATOM1_0_NS]; unsigned char* ruri_string; xml_writer=rss_serializer->xml_writer; atom_link_qname=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, atom_nspace, (const unsigned char*)"link", NULL); base_uri_copy=base_uri ? raptor_uri_copy_v2(rss_serializer->world, base_uri) : NULL; atom_link_element=raptor_new_xml_element(atom_link_qname, NULL, base_uri_copy); atom_link_attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 2, sizeof(raptor_qname*)); ruri_string = raptor_uri_to_relative_uri_string_v2(rss_serializer->world, base_uri, item->uri); atom_link_attrs[0]=raptor_new_qname(rss_serializer->nstack, (const unsigned char*)"href", ruri_string, NULL, NULL); /* errors */ raptor_free_memory(ruri_string); atom_link_attrs[1]=raptor_new_qname(rss_serializer->nstack, (const unsigned char*)"rel", (const unsigned char*)"self", NULL, NULL); /* errors */ raptor_xml_element_set_attributes(atom_link_element, atom_link_attrs, 2); raptor_xml_writer_empty_element(xml_writer, atom_link_element); raptor_free_xml_element(atom_link_element); if(rss_serializer->rss_triples_mode == 2) { raptor_rss10_emit_atom_triples_map(serializer, 1, (const unsigned char*)"feedmap"); raptor_rss10_emit_atom_triples_map(serializer, 0, (const unsigned char*)"entrymap"); } } /* emit the RSS 1.0-specific rdf:Seq and rss:item XML elements */ static void raptor_rss10_emit_rss_items(raptor_serializer *serializer) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; raptor_xml_writer* xml_writer; raptor_uri *base_uri=serializer->base_uri; raptor_uri* base_uri_copy=NULL; raptor_xml_element* rss_items_predicate; int i; raptor_qname *rdf_Seq_qname; raptor_xml_element *rdf_Seq_element; if(!raptor_sequence_size(rss_serializer->items)) return; xml_writer=rss_serializer->xml_writer; rdf_Seq_qname=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"Seq", NULL); base_uri_copy=base_uri ? raptor_uri_copy_v2(rss_serializer->world, base_uri) : NULL; rdf_Seq_element=raptor_new_xml_element(rdf_Seq_qname, NULL, base_uri_copy); /* make the .... */ base_uri_copy=base_uri ? raptor_uri_copy_v2(rss_serializer->world, base_uri) : NULL; rss_items_predicate=raptor_new_xml_element(raptor_qname_copy(serializer->world->rss_fields_info_qnames[RAPTOR_RSS_FIELD_ITEMS]), NULL, base_uri_copy); raptor_xml_writer_start_element(xml_writer, rss_items_predicate); raptor_xml_writer_start_element(xml_writer, rdf_Seq_element); for(i=0; i < raptor_sequence_size(rss_serializer->items); i++) { raptor_rss_item* item_item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); raptor_qname *rdf_li_qname; raptor_xml_element *rdf_li_element; raptor_qname **attrs; unsigned char* ruri_string; rdf_li_qname=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"li", NULL); base_uri_copy=base_uri ? raptor_uri_copy_v2(rss_serializer->world, base_uri) : NULL; rdf_li_element=raptor_new_xml_element(rdf_li_qname, NULL, base_uri_copy); attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname*)); ruri_string=raptor_uri_to_relative_uri_string_v2(rss_serializer->world, base_uri, item_item->uri); attrs[0]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"resource", ruri_string); raptor_free_memory(ruri_string); raptor_xml_element_set_attributes(rdf_li_element, attrs, 1); raptor_xml_writer_empty_element(xml_writer, rdf_li_element); raptor_xml_writer_newline(xml_writer); raptor_free_xml_element(rdf_li_element); } raptor_xml_writer_end_element(xml_writer, rdf_Seq_element); raptor_free_xml_element(rdf_Seq_element); raptor_xml_writer_end_element(xml_writer, rss_items_predicate); raptor_free_xml_element(rss_items_predicate); } /* emit a block of RDF/XML depending on the rssTriples feature mode */ static void raptor_rss10_emit_rdfxml_item_triples(raptor_serializer *serializer, raptor_rss_item *item) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; raptor_xml_writer* xml_writer; raptor_qname* root_qname=NULL; raptor_xml_element* root_element=NULL; raptor_serializer* ser=NULL; raptor_uri* base_uri=NULL; int t_max_count=raptor_sequence_size(item->triples); int t_count; int t; int is_atom; if(rss_serializer->rss_triples_mode == 0 || !item->triples) return; xml_writer=rss_serializer->xml_writer; is_atom=rss_serializer->is_atom; /* can only use atom-triples with atom serializer */ if(rss_serializer->rss_triples_mode == 2 && !is_atom) return; /* can only use rdf-xml with rss-1.0 serializer */ if(rss_serializer->rss_triples_mode == 1 && is_atom) return; t_count=0; for(t=0; t < t_max_count; t++) { if(raptor_sequence_get_at(item->triples, t)) t_count++; } if(!t_count) return; RAPTOR_DEBUG2("Serializing %d triples\n", t_count); if(is_atom) { raptor_namespace* at_nspace=rss_serializer->nspaces[ATOMTRIPLES_NS]; /* atom:md with no attribute */ root_qname=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, at_nspace, (const unsigned char*)"md", NULL); if(!root_qname) goto oom; base_uri=serializer->base_uri; if(base_uri) base_uri=raptor_uri_copy_v2(rss_serializer->world, base_uri); /* after this root_element owns root_qname and (this copy of) base_uri */ root_element=raptor_new_xml_element(root_qname, NULL, base_uri); if(!root_element) { if(base_uri) raptor_free_uri_v2(rss_serializer->world, base_uri); raptor_free_qname(root_qname); root_qname=NULL; goto oom; } root_qname=NULL; raptor_xml_writer_start_element(xml_writer, root_element); } ser=raptor_new_serializer_v2(rss_serializer->world, "rdfxml-abbrev"); if(!ser) goto oom; raptor_rdfxmla_serialize_set_xml_writer(ser, xml_writer, rss_serializer->nstack); raptor_rdfxmla_serialize_set_write_rdf_RDF(ser, 0); raptor_rdfxmla_serialize_set_single_node(ser, item->uri); if(rss_serializer->rss_triples_mode == 2) { /* raptor_rdfxmla_serialize_set_write_typed_nodes(ser, 0); */ } if(base_uri) base_uri=raptor_uri_copy_v2(rss_serializer->world, base_uri); /* after this call, ser owns (this copy of) base_uri and does * NOT own serializer->iostream and will not destroy it * when raptor_free_serializer(ser) is called. */ raptor_serialize_start_to_iostream(ser, base_uri, serializer->iostream); for(t=0; t < t_max_count; t++) { raptor_statement_v2* s; s=(raptor_statement_v2*)raptor_sequence_get_at(item->triples, t); if(s) raptor_serialize_statement(ser, s->s); } raptor_serialize_end(ser); raptor_free_serializer(ser); ser=NULL; if(is_atom) raptor_xml_writer_end_element(xml_writer, root_element); oom: if(ser) raptor_free_serializer(ser); if(root_qname) raptor_free_qname(root_qname); if(root_element) raptor_free_xml_element(root_element); } /** * raptor_rss10_ensure_atom_field_zero_one: * @item: RSS item object * @f: ATOM field type * * INTERNAL - Check that the given item @field appears 0 or 1 times */ static void raptor_rss10_ensure_atom_field_zero_one(raptor_rss_item* item, raptor_rss_fields_type f) { raptor_rss_field* field=item->fields[f]; if(!field) return; if(field->next) { /* more than 1 value so delete rest of values */ raptor_rss_field* next=field->next; field->next=NULL; do { field=next; next=field->next; field->next=NULL; raptor_rss_field_free(field); } while(next); } } /** * raptor_rss10_ensure_atom_feed_valid: * @rss_serializer: serializer object * * INTERNAL - Ensure the atom items have all the fields they need: * & & <updated> * plus: * <link rel='alternate' ...> OR <content>.. * */ static int raptor_rss10_ensure_atom_feed_valid(raptor_rss10_serializer_context *rss_serializer) { int is_atom; int i; raptor_rss_item* item; raptor_rss_model* rss_model; struct timeval tv; time_t now = 0; #ifdef HAVE_GETTIMEOFDAY if(!gettimeofday(&tv, NULL)) now = tv.tv_sec; #endif is_atom=rss_serializer->is_atom; rss_model=&rss_serializer->model; if(!is_atom) return 0; item=rss_model->common[RAPTOR_RSS_CHANNEL]; if(item) { int f; /* atom:id is required */ f=RAPTOR_RSS_FIELD_ATOM_ID; if(!item->fields[f]) { raptor_rss_field* field=raptor_rss_new_field(rss_serializer->world); field->uri=raptor_uri_copy_v2(rss_serializer->world, item->uri); raptor_rss_item_add_field(item, f, field); } /* atom:updated is required */ f=RAPTOR_RSS_FIELD_ATOM_UPDATED; if(!item->fields[f]) { raptor_rss_field* field=raptor_rss_new_field(rss_serializer->world); raptor_rss_set_date_field(field, now); raptor_rss_item_add_field(item, f, field); } /* atom:content is forbidden in feed */ f=RAPTOR_RSS_FIELD_ATOM_CONTENT; if(item->fields[f]) { raptor_rss_field_free(item->fields[f]); item->fields[f]=NULL; } /* atom:summary is forbidden in feed */ f=RAPTOR_RSS_FIELD_ATOM_SUMMARY; if(item->fields[f]) { raptor_rss_field_free(item->fields[f]); item->fields[f]=NULL; } /* These fields can appear 0 or 1 times on a feed */ raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_ICON); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_LOGO); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_RIGHTS); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_SUBTITLE); } for(i=0; i < raptor_sequence_size(rss_serializer->items); i++) { item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); /* atom:id - defaults to item URI */ if(!item->fields[RAPTOR_RSS_FIELD_ATOM_ID]) { raptor_rss_field* field=raptor_rss_new_field(rss_serializer->world); field->uri=raptor_uri_copy_v2(rss_serializer->world, item->uri); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_ATOM_ID, field); } /* atom:title - defaults to "untitled" */ if(!item->fields[RAPTOR_RSS_FIELD_ATOM_TITLE]) { raptor_rss_field* field=raptor_rss_new_field(rss_serializer->world); field->value=(unsigned char*)RAPTOR_MALLOC(cstring, 9); strncpy((char*)field->value, "untitled", 9); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_ATOM_TITLE, field); } /* atom:updated - defaults to now time */ if(!item->fields[RAPTOR_RSS_FIELD_ATOM_UPDATED]) { raptor_rss_field* field=raptor_rss_new_field(rss_serializer->world); raptor_rss_set_date_field(field, now); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_ATOM_UPDATED, field); } /* enforce there is either an atom:content OR atom:link (rel=alternate) * by adding a link to {item URI} if missing */ if(!item->fields[RAPTOR_RSS_FIELD_ATOM_CONTENT] && !item->fields[RAPTOR_RSS_FIELD_ATOM_LINK]) { raptor_rss_field* field=raptor_rss_new_field(rss_serializer->world); field->uri=raptor_uri_copy_v2(rss_serializer->world, item->uri); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_ATOM_LINK, field); } /* These fields can appear 0 or 1 times on an entry */ raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_PUBLISHED); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_RIGHTS); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_SOURCE); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_SUMMARY); } return 0; } static void raptor_rss10_emit_item(raptor_serializer* serializer, raptor_rss_item *item, int item_type, int emit_container) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; raptor_xml_writer* xml_writer; raptor_rss_model* rss_model; raptor_uri *base_uri=serializer->base_uri; raptor_xml_element *element=NULL; raptor_qname **attrs=NULL; raptor_uri* base_uri_copy=NULL; int fi; int is_atom; #ifdef RAPTOR_DEBUG if(!item) { RAPTOR_FATAL3("Tried to emit NULL item of type %d - %s\n", item_type, raptor_rss_items_info[item_type].name); } #endif xml_writer=rss_serializer->xml_writer; is_atom=rss_serializer->is_atom; rss_model=&rss_serializer->model; if(!item->fields_count) { int i; for(i=0; i < raptor_sequence_size(rss_serializer->enclosures); i++) { raptor_rss_item *enclosure_item; enclosure_item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->enclosures, i); /* If the item and enclosure item have the same URI, move the * enclosure fields to the item. Assumed that they got conflated * previously such as when the enclosure url = the guid */ if(enclosure_item->uri && raptor_uri_equals_v2(rss_serializer->world, item->uri, enclosure_item->uri)) { int j; for (j=0; j < RAPTOR_RSS_FIELDS_SIZE;j++) { if (j != RAPTOR_RSS_RDF_ENCLOSURE_TYPE && j != RAPTOR_RSS_RDF_ENCLOSURE_LENGTH && j != RAPTOR_RSS_RDF_ENCLOSURE_URL) { item->fields[j]=enclosure_item->fields[j]; enclosure_item->fields[j]=NULL; item->fields_count++; enclosure_item->fields_count--; } } break; } } } if(!item->fields_count) return; if(emit_container) { base_uri_copy=base_uri ? raptor_uri_copy_v2(rss_serializer->world, base_uri) : NULL; element=raptor_new_xml_element(raptor_qname_copy(serializer->world->rss_types_info_qnames[item->node_typei]), NULL, base_uri_copy); if(!is_atom && item->uri) { unsigned char* ruri_string; attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname*)); ruri_string=raptor_uri_to_relative_uri_string_v2(rss_serializer->world, base_uri, item->uri); attrs[0]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"about", ruri_string); raptor_free_memory(ruri_string); raptor_xml_element_set_attributes(element, attrs, 1); } raptor_xml_writer_start_element(xml_writer, element); } for(fi = 0; fi < RAPTOR_RSS_FIELDS_SIZE; fi++) { raptor_rss_fields_type f = (raptor_rss_fields_type)fi; raptor_rss_field* field; if(f == RAPTOR_RSS_FIELD_ITEMS) /* emitting the RSS items rdf:Seq block is done after this loop */ continue; if(!serializer->world->rss_fields_info_uris[f]) continue; if(f == RAPTOR_RSS_FIELD_ATOM_AUTHOR) { int typei; if(!is_atom) continue; if(item_type != RAPTOR_RSS_CHANNEL) continue; typei=RAPTOR_ATOM_AUTHOR; if(!rss_model->common[typei]) { raptor_rss_item* author_item; raptor_identifier* identifier; /* No atom author was present so make a new atom:author item * then either promote the string to an atom:name field OR * use "unknown" */ author_item=raptor_rss_model_add_common(rss_model, (raptor_rss_type)typei); identifier=&(author_item->identifier); author_item->node_type=&raptor_rss_items_info[typei]; author_item->node_typei=typei; /* FIXME - uses _:author as bnode name - should make a new * genid for each author node. This is OK because there * is a check above that there is only 1 author per FEED. */ identifier->id=(const unsigned char*)RAPTOR_MALLOC(cstring, 7); strncpy((char*)identifier->id, "author", 7); identifier->type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; identifier->uri_source=RAPTOR_URI_SOURCE_GENERATED; /* Move atom:name author field, or create a dummy one */ f=RAPTOR_RSS_FIELD_ATOM_NAME; if(item->fields[f]) { field=item->fields[f]; item->fields[f]=NULL; } else { field=raptor_rss_new_field(serializer->world); field->value=(unsigned char*)RAPTOR_MALLOC(cstring, 8); strncpy((char*)field->value, "unknown", 8); } raptor_rss_item_add_field(author_item, RAPTOR_RSS_FIELD_ATOM_NAME, field); /* Move atom author fields if found: atom:uri and atom:email * are only used inside Person constructs */ f=RAPTOR_RSS_FIELD_ATOM_URI; if(item->fields[f]) { field=item->fields[f]; raptor_rss_item_add_field(author_item, f, field); item->fields[f]=NULL; } f=RAPTOR_RSS_FIELD_ATOM_EMAIL; if(item->fields[f]) { field=item->fields[f]; raptor_rss_item_add_field(author_item, f, field); item->fields[f]=NULL; } } RAPTOR_DEBUG3("Emitting type %i - %s\n", typei, raptor_rss_items_info[typei].name); raptor_rss10_emit_item(serializer, rss_model->common[typei], typei, 1); continue; } for (field=item->fields[f]; field; field=field->next) { raptor_xml_element* predicate; base_uri_copy=base_uri ? raptor_uri_copy_v2(rss_serializer->world, base_uri) : NULL; predicate=raptor_new_xml_element(raptor_qname_copy(serializer->world->rss_fields_info_qnames[f]), NULL, base_uri_copy); /* Use atom:summary in preference */ if(is_atom && f == RAPTOR_RSS_FIELD_DESCRIPTION) continue; if(is_atom && field->uri) { unsigned char* ruri_string; size_t len; raptor_uri* my_base_uri=base_uri; if(f == RAPTOR_RSS_FIELD_ATOM_ID) my_base_uri=NULL; ruri_string=raptor_uri_to_relative_counted_uri_string_v2(rss_serializer->world, my_base_uri, field->uri, &len); if(f == RAPTOR_RSS_FIELD_ATOM_LINK && !item->fields[RAPTOR_RSS_FIELD_ATOM_CONTENT]) { /* atom:link to URI and there is no atom:content */ raptor_qname **predicate_attrs=NULL; predicate_attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 2, sizeof(raptor_qname*)); predicate_attrs[0]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, NULL, (const unsigned char*)"href", ruri_string); predicate_attrs[1]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, NULL, (const unsigned char*)"rel", (const unsigned char*)"alternate"); field->value=NULL; raptor_xml_element_set_attributes(predicate, predicate_attrs, 2); raptor_xml_writer_empty_element(xml_writer, predicate); } else if(f == RAPTOR_RSS_FIELD_ATOM_CONTENT) { /* <atom:content src="{uri value}" type="{type}" /> */ raptor_qname **predicate_attrs=NULL; const unsigned char* content_type; raptor_rss_field* content_type_field; /* get the type */ content_type_field=item->fields[RAPTOR_RSS_FIELD_AT_CONTENT_TYPE]; if(content_type_field && content_type_field->value) content_type=content_type_field->value; else /* FIXME - default content type */ content_type=(const unsigned char*)"text/html"; predicate_attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 2, sizeof(raptor_qname*)); predicate_attrs[0]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, NULL, (const unsigned char*)"src", ruri_string); predicate_attrs[1]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, NULL, (const unsigned char*)"type", (const unsigned char*)content_type); /* free at:contentType field - no need to emit it */ if(content_type_field) { raptor_rss_field_free(content_type_field); item->fields[RAPTOR_RSS_FIELD_AT_CONTENT_TYPE]=NULL; } field->value=NULL; raptor_xml_element_set_attributes(predicate, predicate_attrs, 2); raptor_xml_writer_empty_element(xml_writer, predicate); } else { raptor_xml_writer_start_element(xml_writer, predicate); raptor_xml_writer_cdata_counted(xml_writer, ruri_string, len); raptor_xml_writer_end_element(xml_writer, predicate); } raptor_free_memory(ruri_string); } else if (field->uri) { raptor_uri* enclosure_uri=field->uri; raptor_rss_item *enclosure_item=NULL; int i; if (f == RAPTOR_RSS_FIELD_ENCLOSURE && item_type == RAPTOR_RSS_ITEM) { for(i=0; i < raptor_sequence_size(rss_serializer->enclosures); i++) { enclosure_item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->enclosures, i); if(enclosure_item->uri && raptor_uri_equals_v2(rss_serializer->world, enclosure_uri, enclosure_item->uri)) break; } if (enclosure_item) { int attr_count=0; unsigned char* ruri_string; attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 3, sizeof(raptor_qname*)); ruri_string=raptor_uri_to_relative_uri_string_v2(rss_serializer->world, base_uri, field->uri); attrs[attr_count]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"resource", ruri_string); raptor_free_memory(ruri_string); attr_count++; if (enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_TYPE] && enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_TYPE]->value) { attrs[attr_count]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->nspaces[RSS2_0_ENC_NS], (const unsigned char*)raptor_rss_fields_info[RAPTOR_RSS_RDF_ENCLOSURE_TYPE].name, (const unsigned char*)enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_TYPE]->value); attr_count++; } if (enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_LENGTH] && enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_LENGTH]->value) { attrs[attr_count]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->nspaces[RSS2_0_ENC_NS], (const unsigned char*)raptor_rss_fields_info[RAPTOR_RSS_RDF_ENCLOSURE_LENGTH].name, (const unsigned char*)enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_LENGTH]->value); attr_count++; } raptor_xml_element_set_attributes(predicate, attrs, attr_count); } else { RAPTOR_DEBUG2("Enclosure item with URI %s could not be found in list of enclosures\n", raptor_uri_as_string_v2(rss_serializer->world, enclosure_uri)); } } else { unsigned char* ruri_string; /* not an rss:item with an rss:enclosure field */ attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname*)); ruri_string=raptor_uri_to_relative_uri_string_v2(rss_serializer->world, base_uri, field->uri); attrs[0]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"resource", ruri_string); raptor_free_memory(ruri_string); raptor_xml_element_set_attributes(predicate, attrs, 1); } raptor_xml_writer_empty_element(xml_writer, predicate); } else if(field->value) { /* not a URI, must be a literal */ int is_xhtml_content=field->is_xml; int prefer_cdata=(!is_atom && f == RAPTOR_RSS_FIELD_CONTENT_ENCODED); if(is_xhtml_content && !prefer_cdata) { raptor_qname **predicate_attrs=NULL; predicate_attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname*)); if(is_atom) predicate_attrs[0]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, NULL, (const unsigned char*)"type", (const unsigned char*)"xhtml"); else predicate_attrs[0]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"parseType", (const unsigned char*)"Literal"); raptor_xml_element_set_attributes(predicate, predicate_attrs, 1); } raptor_xml_writer_start_element(xml_writer, predicate); if(is_xhtml_content) { if(prefer_cdata) raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"<![CDATA[", 9); raptor_xml_writer_raw(xml_writer, (const unsigned char*)field->value); if(prefer_cdata) raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"]]>", 3); } else raptor_xml_writer_cdata(xml_writer, (const unsigned char*)field->value); raptor_xml_writer_end_element(xml_writer, predicate); } else { RAPTOR_DEBUG3("Field %d - %s had no URI or literal value\n", f, raptor_rss_fields_info[f].name); } raptor_free_xml_element(predicate); } } if(item_type == RAPTOR_RSS_CHANNEL) { if(is_atom) raptor_rss10_emit_atom_feed(serializer, item); if(!is_atom) raptor_rss10_emit_rss_items(serializer); } /* Add an RDF/XML block with remaining triples if Atom */ if(item->triples && raptor_sequence_size(item->triples)) raptor_rss10_emit_rdfxml_item_triples(serializer, item); if(emit_container) { raptor_xml_writer_end_element(xml_writer, element); raptor_free_xml_element(element); } } /** * raptor_rss10_serialize_end: * @serializer: serializer object * * INTERNAL (raptor_serializer_factory API) - End a serializing * * Return value: non-0 on failure */ static int raptor_rss10_serialize_end(raptor_serializer* serializer) { raptor_rss10_serializer_context *rss_serializer=(raptor_rss10_serializer_context*)serializer->context; raptor_rss_model* rss_model; int i; raptor_xml_writer* xml_writer; #ifdef RAPTOR_DEBUG int triple_count=0; #endif int is_atom; raptor_qname **attrs=NULL; int attrs_count=0; raptor_uri* entry_uri=NULL; raptor_rss_item* entry_item=NULL; rss_model=&rss_serializer->model; is_atom=rss_serializer->is_atom; raptor_rss10_build_items(rss_serializer); raptor_rss10_move_leftover_statements(rss_serializer); raptor_rss10_move_anonymous_statements(rss_serializer); if(is_atom) { raptor_rss10_ensure_atom_feed_valid(rss_serializer); raptor_rss10_remove_mapped_fields(rss_serializer); if(serializer->feature_atom_entry_uri) { entry_uri=raptor_new_uri_v2(rss_serializer->world, serializer->feature_atom_entry_uri); for(i=0; i < raptor_sequence_size(rss_serializer->items); i++) { raptor_rss_item* item; item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); if(raptor_uri_equals_v2(rss_serializer->world, item->uri, entry_uri)) { entry_item=item; break; } } if(!entry_item) { RAPTOR_DEBUG2("Entry URI %s was not found in list of items\n", raptor_uri_as_string_v2(rss_serializer->world, entry_uri)); raptor_free_uri_v2(rss_serializer->world, entry_uri); entry_uri=NULL; } } } #ifdef RAPTOR_DEBUG for(i=0; i < raptor_sequence_size(rss_serializer->triples); i++) { raptor_statement_v2* t=(raptor_statement_v2*)raptor_sequence_get_at(rss_serializer->triples, i); if(t) { fprintf(stderr, " %d: ", i); raptor_print_statement_v2(t, stderr); fputc('\n', stderr); triple_count++; } } RAPTOR_DEBUG2("Starting with %d stored triples\n", triple_count); #endif if(!rss_model->common[RAPTOR_RSS_CHANNEL]) { raptor_serializer_error(serializer, "No RSS channel found"); return 1; } if(rss_serializer->xml_writer) raptor_free_xml_writer(rss_serializer->xml_writer); xml_writer=raptor_new_xml_writer_v2(rss_serializer->world, rss_serializer->nstack, serializer->iostream, NULL, NULL, /* errors */ 1); rss_serializer->xml_writer=xml_writer; raptor_xml_writer_set_feature(xml_writer, RAPTOR_FEATURE_WRITER_AUTO_INDENT, 1); raptor_xml_writer_set_feature(xml_writer, RAPTOR_FEATURE_WRITER_AUTO_EMPTY, 1); raptor_rss10_build_xml_names(serializer, (is_atom && entry_uri)); if(serializer->base_uri && serializer->feature_write_base_uri) { const unsigned char* base_uri_string; attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname*)); base_uri_string=raptor_uri_as_string_v2(rss_serializer->world, serializer->base_uri); attrs[attrs_count++]=raptor_new_qname_from_namespace_local_name_v2(rss_serializer->world, rss_serializer->xml_nspace, (const unsigned char*)"base", base_uri_string); } if(attrs_count) raptor_xml_element_set_attributes(rss_serializer->root_element, attrs, attrs_count); else raptor_xml_element_set_attributes(rss_serializer->root_element, NULL, 0); raptor_xml_writer_start_element(xml_writer, rss_serializer->root_element); if(entry_item) { RAPTOR_DEBUG1("Emitting entry\n"); raptor_rss10_emit_item(serializer, entry_item, RAPTOR_RSS_ITEM, 0); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); } else { i=RAPTOR_RSS_CHANNEL; RAPTOR_DEBUG3("Emitting type %i - %s\n", i, raptor_rss_items_info[i].name); raptor_rss10_emit_item(serializer, rss_model->common[i], i, !is_atom); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); if(rss_model->items_count) { for(i=0; i < raptor_sequence_size(rss_serializer->items); i++) { raptor_rss_item* item=(raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); raptor_rss10_emit_item(serializer, item, RAPTOR_RSS_ITEM, 1); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); } } for(i=RAPTOR_RSS_CHANNEL+1; i< RAPTOR_RSS_COMMON_SIZE; i++) { raptor_rss_item* item; if(is_atom) { /* atom 1.0 only serializes rss:item (channel is done above) */ if(i != RAPTOR_RSS_ITEM) continue; } else { /* rss 1.0 ignores atom:author for now - FIXME */ if(i == RAPTOR_ATOM_AUTHOR) continue; } for (item=rss_model->common[i]; item; item=item->next) { RAPTOR_DEBUG3("Emitting type %i - %s\n", i, raptor_rss_items_info[i].name); raptor_rss10_emit_item(serializer, item, i, 1); } } } raptor_xml_writer_end_element(xml_writer, rss_serializer->root_element); raptor_free_xml_element(rss_serializer->root_element); raptor_xml_writer_newline(xml_writer); raptor_xml_writer_flush(xml_writer); return 0; } /* add a namespace */ static int raptor_rss10_serialize_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_rss10_serializer_context* rss_serializer=(raptor_rss10_serializer_context*)serializer->context; int i; for(i=0; i< raptor_sequence_size(rss_serializer->user_namespaces); i++) { raptor_namespace* ns; ns=(raptor_namespace*)raptor_sequence_get_at(rss_serializer->user_namespaces, i); /* If prefix is already declared, ignore it */ if(!ns->prefix && !nspace->prefix) return 1; if(ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) return 1; if(ns->uri && nspace->uri && raptor_uri_equals_v2(rss_serializer->world, ns->uri, nspace->uri)) return 1; } nspace=raptor_new_namespace_from_uri(rss_serializer->nstack, nspace->prefix, nspace->uri, 0); if(!nspace) return 1; raptor_sequence_push(rss_serializer->user_namespaces, nspace); return 0; } /* add a namespace */ static int raptor_rss10_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { raptor_rss10_serializer_context* rss_serializer=(raptor_rss10_serializer_context*)serializer->context; raptor_namespace *ns; int rc; ns=raptor_new_namespace_from_uri(rss_serializer->nstack, prefix, uri, 0); rc=raptor_rss10_serialize_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /** * raptor_rss10_serialize_finish_factory: * @factory: serializer factory * * INTERNAL (raptor_serializer_factory API) - finish the serializer factory */ static void raptor_rss10_serialize_finish_factory(raptor_serializer_factory* factory) { } static int raptor_rss10_serializer_register_factory(raptor_serializer_factory *factory) { factory->context_length = sizeof(raptor_rss10_serializer_context); factory->init = raptor_rss10_serialize_init; factory->terminate = raptor_rss10_serialize_terminate; factory->declare_namespace = raptor_rss10_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_rss10_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_rss10_serialize_start; factory->serialize_statement = raptor_rss10_serialize_statement; factory->serialize_end = raptor_rss10_serialize_end; factory->finish_factory = raptor_rss10_serialize_finish_factory; return 0; } int raptor_init_serializer_rss10(raptor_world* world) { return raptor_serializer_register_factory(world, "rss-1.0", "RSS 1.0", NULL, NULL, (const unsigned char*)"http://purl.org/rss/1.0/spec", &raptor_rss10_serializer_register_factory); } int raptor_init_serializer_atom(raptor_world* world) { return raptor_serializer_register_factory(world, "atom", "Atom 1.0", "application/atom+xml", NULL, NULL, &raptor_rss10_serializer_register_factory); } ����������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/n3_common.h�����������������������������������������������������������������������0000644�0001750�0001750�00000003466�11330672502�012667� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * n3_common.h - Notation 3 lexer/parser shared internals * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef N3_COMMON_H #define N3_COMMON_H #ifdef __cplusplus extern "C" { #endif /* n3_parser.y */ int n3_syntax_error(raptor_parser *rdf_parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); raptor_uri* n3_qname_to_uri(raptor_parser *rdf_parser, unsigned char *name, size_t name_len); /* * N3 parser object */ struct raptor_n3_parser_s { /* buffer */ char *buffer; /* buffer length */ int buffer_length; /* static statement for use in passing to user code */ raptor_statement statement; raptor_namespace_stack namespaces; /* for lexer to store result in */ YYSTYPE lval; /* STATIC lexer */ yyscan_t scanner; int scanner_set; int lineno; raptor_uri* nil_uri; raptor_uri* first_uri; raptor_uri* rest_uri; /* for creating long literals */ raptor_stringbuffer* sb; /* count of errors in current parse */ int error_count; }; #ifdef __cplusplus } #endif #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_feature.c������������������������������������������������������������������0000644�0001750�0001750�00000023015�11330672502�014004� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_feature.c - Parser and Serializer features * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" static const struct { raptor_feature feature; /* flag bits * 0: default is bool/int value * * 1=parser feature * 2=serializer feature * 4=string value (else bool/int) * 8=xml writer feature * 16=bool/int value is an integer */ int flags; const char *name; const char *label; } raptor_features_list[RAPTOR_FEATURE_LAST+1]= { { RAPTOR_FEATURE_SCANNING , 1, "scanForRDF", "Scan for rdf:RDF in XML content" }, { RAPTOR_FEATURE_ASSUME_IS_RDF , 1, "assumeIsRDF", "Assume content is RDF/XML, don't require rdf:RDF" }, { RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES , 1, "allowNonNsAttributes", "Allow bare 'name' rather than namespaced 'rdf:name'" }, { RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES , 1, "allowOtherParsetypes", "Allow user-defined rdf:parseType values" }, { RAPTOR_FEATURE_ALLOW_BAGID , 1, "allowBagID", "Allow rdf:bagID" }, { RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST , 1, "allowRDFtypeRDFlist", "Generate the collection rdf:type rdf:List triple" }, { RAPTOR_FEATURE_NORMALIZE_LANGUAGE , 1, "normalizeLanguage", "Normalize xml:lang values to lowercase" }, { RAPTOR_FEATURE_NON_NFC_FATAL , 1, "nonNFCfatal", "Make non-NFC literals cause a fatal error" }, { RAPTOR_FEATURE_WARN_OTHER_PARSETYPES , 1, "warnOtherParseTypes", "Warn about unknown rdf:parseType values" }, { RAPTOR_FEATURE_CHECK_RDF_ID , 1, "checkRdfID", "Check rdf:ID values for duplicates" }, { RAPTOR_FEATURE_RELATIVE_URIS , 2, "relativeURIs", "Write relative URIs wherever possible in serializing." }, { RAPTOR_FEATURE_START_URI , 6, "startURI", "Start URI for serializing to use." }, { RAPTOR_FEATURE_WRITER_AUTO_INDENT , 8, "autoIndent", "Automatically indent elements." }, { RAPTOR_FEATURE_WRITER_AUTO_EMPTY , 8, "autoEmpty", "Automatically detect and abbreviate empty elements." }, { RAPTOR_FEATURE_WRITER_INDENT_WIDTH , 8, "indentWidth", "Number of spaces to indent." }, { RAPTOR_FEATURE_WRITER_XML_VERSION , 10, "xmlVersion", "XML version to write." }, { RAPTOR_FEATURE_WRITER_XML_DECLARATION , 10, "xmlDeclaration", "Write XML declaration." }, { RAPTOR_FEATURE_NO_NET , 1, "noNet", "Deny network requests." }, { RAPTOR_FEATURE_RESOURCE_BORDER , 6, "resourceBorder", "DOT serializer resource border color" }, { RAPTOR_FEATURE_LITERAL_BORDER , 6, "literalBorder", "DOT serializer literal border color" }, { RAPTOR_FEATURE_BNODE_BORDER , 6, "bnodeBorder", "DOT serializer blank node border color" }, { RAPTOR_FEATURE_RESOURCE_FILL , 6, "resourceFill", "DOT serializer resource fill color" }, { RAPTOR_FEATURE_LITERAL_FILL , 6, "literalFill", "DOT serializer literal fill color" }, { RAPTOR_FEATURE_BNODE_FILL , 6, "bnodeFill", "DOT serializer blank node fill color" }, { RAPTOR_FEATURE_HTML_TAG_SOUP , 1, "htmlTagSoup", "HTML parsing uses a lax HTML parser" }, { RAPTOR_FEATURE_MICROFORMATS , 1, "microformats", "GRDDL parsing looks for microformats" }, { RAPTOR_FEATURE_HTML_LINK , 1, "htmlLink", "GRDDL parsing looks for <link type=\"application/rdf+xml\">" }, { RAPTOR_FEATURE_WWW_TIMEOUT , 1+16, "wwwTimeout", "Set internal WWW URI retrieval timeout" }, { RAPTOR_FEATURE_WRITE_BASE_URI , 2, "writeBaseURI", "Write @base / xml:base directive in serializer output" }, { RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL, 5, "wwwHttpCacheControl", "Set HTTP Cache-Control: header value" }, { RAPTOR_FEATURE_WWW_HTTP_USER_AGENT , 5, "wwwHttpUserAgent", "Set HTTP User-Agent: header value" }, { RAPTOR_FEATURE_JSON_CALLBACK , 6, "jsonCallback", "JSON serializer callback" }, { RAPTOR_FEATURE_JSON_EXTRA_DATA , 6, "jsonExtraData", "JSON serializer extra data" }, { RAPTOR_FEATURE_RSS_TRIPLES , 6, "rssTriples", "Atom/RSS serializer writes extra RDF triples" }, { RAPTOR_FEATURE_ATOM_ENTRY_URI , 6, "atomEntryUri", "Atom serializer Entry URI" }, { RAPTOR_FEATURE_PREFIX_ELEMENTS , 2, "prefixElements", "Atom/RSS serializers write namespace-prefixed elements" } }; static const char * const raptor_feature_uri_prefix="http://feature.librdf.org/raptor-"; /* NOTE: this is strlen(raptor_feature_uri_prefix) */ #define RAPTOR_FEATURE_URI_PREFIX_LEN 33 /* * raptor_features_enumerate_common: * @world: raptor_world object * @feature: feature enumeration (0+) * @name: pointer to store feature short name (or NULL) * @uri: pointer to store feature URI (or NULL) * @label: pointer to feature label (or NULL) * @flags: flags to match * * Internal: Get list of syntax features. * * If @uri is not NULL, a pointer toa new raptor_uri is returned * that must be freed by the caller with raptor_free_uri(). * * Return value: 0 on success, <0 on failure, >0 if feature is unknown **/ int raptor_features_enumerate_common(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label, int flags) { int i; for(i=0; i <= RAPTOR_FEATURE_LAST; i++) if(raptor_features_list[i].feature == feature && (raptor_features_list[i].flags & flags)) { if(name) *name=raptor_features_list[i].name; if(uri) { raptor_uri *base_uri=raptor_new_uri_v2(world, (const unsigned char*)raptor_feature_uri_prefix); if(!base_uri) return -1; *uri=raptor_new_uri_from_uri_local_name_v2(world, base_uri, (const unsigned char*)raptor_features_list[i].name); raptor_free_uri_v2(world, base_uri); } if(label) *label=raptor_features_list[i].label; return 0; } return 1; } /** * raptor_feature_value_type * @feature: raptor serializer or parser feature * * Get the type of a features. * * The type of the @feature is 0=integer , 1=string. Other values are * undefined. Most features are integer values and use * raptor_set_feature and raptor_get_feature() * ( raptor_serializer_set_feature raptor_serializer_get_feature() ) * * String value features use raptor_parser_set_feature_string() and * raptor_parser_get_feature_string() * ( raptor_serializer_set_feature_string() * and raptor_serializer_get_feature_string() ) * * Return value: the type of the feature or <0 if @feature is unknown */ int raptor_feature_value_type(const raptor_feature feature) { if(feature > RAPTOR_FEATURE_LAST) return -1; return (raptor_features_list[feature].flags & 4) ? 1 : 0; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_feature_from_uri: * @uri: feature URI * * Turn a feature URI into an feature enum. * * The allowed feature URIs are available via raptor_features_enumerate(). * * raptor_init() MUST have been called before calling this function. * Use raptor_feature_from_uri_v2() if using raptor_world APIs. * * Return value: < 0 if the feature is unknown **/ raptor_feature raptor_feature_from_uri(raptor_uri *uri) { return raptor_feature_from_uri_v2(raptor_world_instance(), uri); } #endif /** * raptor_feature_from_uri_v2: * @world: raptor_world instance * @uri: feature URI * * Turn a feature URI into an feature enum. * * The allowed feature URIs are available via raptor_features_enumerate(). * * Return value: < 0 if the feature is unknown **/ raptor_feature raptor_feature_from_uri_v2(raptor_world* world, raptor_uri *uri) { unsigned char *uri_string; int i; raptor_feature feature= (raptor_feature)-1; if(!uri) return feature; uri_string=raptor_uri_as_string_v2(world, uri); if(strncmp((const char*)uri_string, raptor_feature_uri_prefix, RAPTOR_FEATURE_URI_PREFIX_LEN)) return feature; uri_string += RAPTOR_FEATURE_URI_PREFIX_LEN; for(i=0; i <= RAPTOR_FEATURE_LAST; i++) if(!strcmp(raptor_features_list[i].name, (const char*)uri_string)) { feature=(raptor_feature)i; break; } return feature; } /** * raptor_get_feature_count: * * Get the count of features defined. * * This is prefered to the compile time-only symbol #RAPTOR_FEATURE_LAST * and returns a count of the number of features which is * #RAPTOR_FEATURE_LAST+1. * * Return value: count of features in the #raptor_feature enumeration **/ unsigned int raptor_get_feature_count(void) { return RAPTOR_FEATURE_LAST+1; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_avltree.c������������������������������������������������������������������0000644�0001750�0001750�00000125342�11330672502�014021� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_avltree.c - Balanced Binary Tree / AVL Tree * * This file is in the public domain. * * Based on public domain sources posted to comp.sources.misc in 1993 * * From: p...@vix.com (Paul Vixie) * Newsgroups: comp.sources.unix * Subject: v27i034: REPOST AVL Tree subroutines (replaces v11i020 from 1987), Part01/01 * Date: 6 Sep 1993 13:51:22 -0700 * Message-ID: <1.747348668.4037@gw.home.vix.com> * * ---------------------------------------------------------------------- * Original headers below */ /* as_tree - tree library for as * vix 14dec85 [written] * vix 02feb86 [added tree balancing from wirth "a+ds=p" p. 220-221] * vix 06feb86 [added tree_mung()] * vix 20jun86 [added tree_delete per wirth a+ds (mod2 v.) p. 224] * vix 23jun86 [added delete uar to add for replaced nodes] * vix 22jan93 [revisited; uses RCS, ANSI, POSIX; has bug fixes] */ /* This program text was created by Paul Vixie using examples from the book: * "Algorithms & Data Structures," Niklaus Wirth, Prentice-Hall, 1986, ISBN * 0-13-022005-1. This code and associated documentation is hereby placed * in the public domain. */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #if RAPTOR_DEBUG > 1 #define RAPTOR_AVLTREE_DEBUG1(msg) RAPTOR_DEBUG1(msg) #else #define RAPTOR_AVLTREE_DEBUG1(msg) #endif #define RAPTOR_AVLTREE_ENOMEM -1 #define RAPTOR_AVLTREE_EXISTS 1 #ifndef STANDALONE /* AVL-tree node */ struct raptor_avltree_node_s { /* parent tree */ struct raptor_avltree_node_s *parent; /* left child tree */ struct raptor_avltree_node_s *left; /* right child tree */ struct raptor_avltree_node_s *right; /* balance factor = * height of the right tree minus the height of the left tree * i.e. equal: 0 left larger: -1 right larger: 1 */ signed char balance; /* actual data */ void* data; }; #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif /* local prototypes */ static int raptor_avltree_sprout(raptor_avltree* tree, raptor_avltree_node* parent, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p); static void* raptor_avltree_delete_internal(raptor_avltree* tree, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p); static void* raptor_avltree_delete_internal2(raptor_avltree* tree, raptor_avltree_node** ppr_r, int *rebalancing_p, raptor_avltree_node** ppr_q); static void raptor_avltree_balance_left(raptor_avltree* tree, raptor_avltree_node** node_pp, int *rebalancing_p); static void raptor_avltree_balance_right(raptor_avltree* tree, raptor_avltree_node** node_pp, int *rebalancing_p); static raptor_avltree_node* raptor_avltree_search_internal(raptor_avltree* tree, raptor_avltree_node* node, const void* p_data); static int raptor_avltree_visit_internal(raptor_avltree* tree, raptor_avltree_node* node, int depth, raptor_avltree_visit_function visit_fn, void* user_data); static void raptor_free_avltree_internal(raptor_avltree* tree, raptor_avltree_node* node); /* * raptor_new_avltree: * @world: raptor_world object * @compare_fn: item comparison function for ordering * @free_fn: item free function (or NULL) * @flags: AVLTree flags - bitmask of * RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES - raptor_avltree_add() * will replace any duplicate items (default is to ignore them and * return >0 on duplicates) * * INTERNAL - AVL Tree Constructor * * Return value: new AVL Tree or NULL on failure */ raptor_avltree* raptor_new_avltree(raptor_world* world, raptor_data_compare_function compare_fn, raptor_data_free_function free_fn, unsigned int flags) { raptor_avltree* tree; tree=(raptor_avltree*)RAPTOR_MALLOC(raptor_avltree, sizeof(*tree)); if(!tree) return NULL; tree->world=world; tree->root=NULL; tree->compare_fn=compare_fn; tree->free_fn=free_fn; tree->print_fn=NULL; tree->flags=flags; tree->size=0; tree->cursor_iterator=NULL; return tree; } /* * raptor_free_avltree: * @tree: AVLTree object * * INTERNAL - AVL Tree destructor */ void raptor_free_avltree(raptor_avltree* tree) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(tree, raptor_avltree); raptor_free_avltree_internal(tree, tree->root); if(tree->cursor_iterator) raptor_free_avltree_iterator(tree->cursor_iterator); RAPTOR_FREE(raptor_avltree, tree); } static void raptor_free_avltree_internal(raptor_avltree* tree, raptor_avltree_node* node) { if(node) { raptor_free_avltree_internal(tree, node->left); raptor_free_avltree_internal(tree, node->right); if(tree->free_fn) tree->free_fn(node->data); tree->size--; RAPTOR_FREE(raptor_avltree_node, node); } } /* methods */ static raptor_avltree_node* raptor_avltree_search_internal(raptor_avltree* tree, raptor_avltree_node* node, const void* p_data) { if(node) { int cmp= tree->compare_fn(p_data, node->data); if(cmp > 0) return raptor_avltree_search_internal(tree, node->right, p_data); else if(cmp < 0) return raptor_avltree_search_internal(tree, node->left, p_data); /* found */ return node; } /* otherwise not found */ return NULL; } /* * raptor_avltree_search: * @tree: AVL Tree object * @p_data: pointer to data item * * INTERNAL - find an item in an AVL Tree * * Return value: shared pointer to item (still owned by AVL Tree) or NULL on failure or if not found */ void* raptor_avltree_search(raptor_avltree* tree, const void* p_data) { raptor_avltree_node* node; node=raptor_avltree_search_internal(tree, tree->root, p_data); return node ? node->data : NULL; } /* * raptor_avltree_add: * @tree: AVL Tree object * @p_data: pointer to data item * * INTERNAL - add an item to an AVL Tree * * The item added becomes owned by the AVL Tree, and will be freed by * the free_fn argument given to raptor_new_avltree(). * * Return value: 0 on success, >0 if equivalent item exists (and the old element remains in the tree), <0 on failure */ int raptor_avltree_add(raptor_avltree* tree, void* p_data) { int rebalancing= FALSE; int rv; rv=raptor_avltree_sprout(tree, NULL, &tree->root, p_data, &rebalancing); #if RAPTOR_DEBUG > 1 raptor_avltree_check(tree); #endif return rv; } /* * raptor_avltree_remove: * @tree: AVL Tree object * @p_data: pointer to data item * * INTERNAL - remove an item from an AVL Tree and return it * * The item removed is no longer owned by the AVL Tree and is * owned by the caller. * * Return value: object or NULL on failure or if not found */ void* raptor_avltree_remove(raptor_avltree* tree, void* p_data) { int rebalancing= FALSE; void* rdata; rdata=raptor_avltree_delete_internal(tree, &tree->root, p_data, &rebalancing); if(rdata) tree->size--; #if RAPTOR_DEBUG > 1 raptor_avltree_check(tree); #endif return rdata; } /* * raptor_avltree_delete: * @tree: AVL Tree object * @p_data: pointer to data item * * INTERNAL - remove an item from an AVL Tree and free it */ int raptor_avltree_delete(raptor_avltree* tree, void* p_data) { void* rdata; rdata=raptor_avltree_remove(tree, p_data); if(rdata) { if(tree->free_fn) tree->free_fn(rdata); } return (rdata != NULL); } static int raptor_avltree_visit_internal(raptor_avltree* tree, raptor_avltree_node* node, int depth, raptor_avltree_visit_function visit_fn, void* user_data) { if(!node) return TRUE; if(!raptor_avltree_visit_internal(tree, node->left, depth+1, visit_fn, user_data)) return FALSE; if(!visit_fn(depth, node->data, user_data)) return FALSE; if(!raptor_avltree_visit_internal(tree, node->right, depth+1, visit_fn, user_data)) return FALSE; return TRUE; } /* * raptor_avltree_visit: * @tree: AVL Tree object * @visit_fn: visit function to call at each item * @user_data: user data pointer fo visit function * * INTERNAL - perform an in-order visit of the items in the AVL Tree * * Return value: non-0 if traversal was terminated early by @visit_fn */ int raptor_avltree_visit(raptor_avltree* tree, raptor_avltree_visit_function visit_fn, void* user_data) { return raptor_avltree_visit_internal(tree, tree->root, 0, visit_fn, user_data); } #ifdef RAPTOR_DEBUG static void raptor_avltree_print_node(raptor_avltree_node* node) { fprintf(stderr, "%p: parent %p left %p right %p data %p", node, node->parent, node->left, node->right, node->data); } static void raptor_avltree_check_node(raptor_avltree* tree, raptor_avltree_node* node, const char* fn, const char* where) { if(node->parent) { if((node->parent == node->left) || (node->parent == node->right)) { if(fn && where) fprintf(stderr, "%s (%s): ", fn, where); fputs("ERROR bad node ", stderr); raptor_avltree_print_node(node); fputc('\n', stderr); fflush(stderr); abort(); } if(node->parent->left != node && node->parent->right != node) { if(fn && where) fprintf(stderr, "%s (%s): ", fn, where); fputs("ERROR parent node ", stderr); raptor_avltree_print_node(node->parent); fputs(" has no reference to child node ", stderr); raptor_avltree_print_node(node); fputc('\n', stderr); fflush(stderr); abort(); } } } #endif static int raptor_avltree_sprout_left(raptor_avltree* tree, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p) { raptor_avltree_node *p1, *p2, *p_parent; int rc; RAPTOR_AVLTREE_DEBUG1("LESS. raptor_avltree_sprouting left.\n"); p_parent=(*node_pp)->parent; rc=raptor_avltree_sprout(tree, *node_pp, &(*node_pp)->left, p_data, rebalancing_p); if(rc) return rc; if(!*rebalancing_p) return FALSE; /* left branch has grown longer */ RAPTOR_AVLTREE_DEBUG1("LESS: left branch has grown\n"); switch((*node_pp)->balance) { case 1: /* right branch WAS longer; balance is ok now */ RAPTOR_AVLTREE_DEBUG1("LESS: case 1.. balance restored implicitly\n"); (*node_pp)->balance= 0; *rebalancing_p= FALSE; break; case 0: /* balance WAS okay; now left branch longer */ RAPTOR_AVLTREE_DEBUG1("LESS: case 0.. balance bad but still ok\n"); (*node_pp)->balance= -1; break; case -1: /* left branch was already too long. rebalance */ RAPTOR_AVLTREE_DEBUG1("LESS: case -1: rebalancing\n"); p1= (*node_pp)->left; if(p1->balance == -1) { /* LL */ RAPTOR_AVLTREE_DEBUG1("LESS: single LL\n"); (*node_pp)->left= p1->right; if((*node_pp)->left) (*node_pp)->left->parent=(*node_pp); p1->right = *node_pp; if(p1->right) p1->right->parent=p1; (*node_pp)->balance= 0; *node_pp= p1; (*node_pp)->parent=p_parent; } else { /* double LR */ RAPTOR_AVLTREE_DEBUG1("LESS: double LR\n"); p2= p1->right; p1->right= p2->left; if(p1->right) p1->right->parent=p1; p2->left= p1; if(p2->left) p2->left->parent=p2; (*node_pp)->left= p2->right; if((*node_pp)->left) (*node_pp)->left->parent= (*node_pp); p2->right= *node_pp; if(p2->right) p2->right->parent=p2; if(p2->balance == -1) (*node_pp)->balance= 1; else (*node_pp)->balance= 0; if(p2->balance == 1) p1->balance= -1; else p1->balance= 0; *node_pp = p2; (*node_pp)->parent=p_parent; } /* end else */ (*node_pp)->balance= 0; *rebalancing_p= FALSE; } /* end switch */ return FALSE; } static int raptor_avltree_sprout_right(raptor_avltree* tree, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p) { raptor_avltree_node *p1, *p2, *p_parent; int rc; RAPTOR_AVLTREE_DEBUG1("MORE: raptor_avltree_sprouting to the right\n"); p_parent=(*node_pp)->parent; rc=raptor_avltree_sprout(tree, *node_pp, &(*node_pp)->right, p_data, rebalancing_p); if(rc) return rc; if(!*rebalancing_p) return FALSE; /* right branch has grown longer */ RAPTOR_AVLTREE_DEBUG1("MORE: right branch has grown\n"); switch((*node_pp)->balance) { case -1: RAPTOR_AVLTREE_DEBUG1("MORE: balance was off, fixed implicitly\n"); (*node_pp)->balance= 0; *rebalancing_p= FALSE; break; case 0: RAPTOR_AVLTREE_DEBUG1("MORE: balance was okay, now off but ok\n"); (*node_pp)->balance= 1; break; case 1: RAPTOR_AVLTREE_DEBUG1("MORE: balance was off, need to rebalance\n"); p1= (*node_pp)->right; if(p1->balance == 1) { /* RR */ RAPTOR_AVLTREE_DEBUG1("MORE: single RR\n"); (*node_pp)->right= p1->left; if((*node_pp)->right) (*node_pp)->right->parent= (*node_pp); p1->left= *node_pp; if(p1->left) p1->left->parent= p1; (*node_pp)->balance= 0; *node_pp= p1; (*node_pp)->parent=p_parent; } else { /* double RL */ RAPTOR_AVLTREE_DEBUG1("MORE: double RL\n"); p2= p1->left; p1->left= p2->right; if(p1->left) p1->left->parent=p1; p2->right= p1; if(p2->right) p2->right->parent=p2; (*node_pp)->right= p2->left; if((*node_pp)->right) (*node_pp)->right->parent= (*node_pp); p2->left= *node_pp; if(p2->left) p2->left->parent=p2; if(p2->balance == 1) (*node_pp)->balance= -1; else (*node_pp)->balance= 0; if(p2->balance == -1) p1->balance= 1; else p1->balance= 0; *node_pp= p2; (*node_pp)->parent=p_parent; } /* end else */ (*node_pp)->balance= 0; *rebalancing_p= FALSE; } /* end switch */ return FALSE; } /* grow a tree by sprouting with a new node * * Return values: * 0 on success * >0 if equivalent item exists (and the old element remains in the tree) * <0 if memory is exhausted. */ static int raptor_avltree_sprout(raptor_avltree* tree, raptor_avltree_node* parent, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p) { int cmp; RAPTOR_AVLTREE_DEBUG1("Enter\n"); /* If grounded, add the node here, set the rebalance flag and return */ if(!*node_pp) { RAPTOR_AVLTREE_DEBUG1("grounded. adding new node, setting rebalancing flag true\n"); *node_pp= (raptor_avltree_node*)RAPTOR_MALLOC(raptor_avltree_node, sizeof(**node_pp)); if(!*node_pp) { if(tree->free_fn) tree->free_fn(p_data); return RAPTOR_AVLTREE_ENOMEM; } (*node_pp)->parent= parent; (*node_pp)->left= NULL; (*node_pp)->right= NULL; (*node_pp)->balance= 0; (*node_pp)->data= p_data; *rebalancing_p= TRUE; tree->size++; return FALSE; } /* compare the data */ cmp= tree->compare_fn(p_data, (*node_pp)->data); if(cmp < 0) /* if LESS, prepare to move to the left. */ return raptor_avltree_sprout_left(tree, node_pp, p_data, rebalancing_p); else if(cmp > 0) /* if MORE, prepare to move to the right. */ return raptor_avltree_sprout_right(tree, node_pp, p_data, rebalancing_p); /* otherwise equivalent key */ *rebalancing_p= FALSE; if(tree->flags & RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES) { /* replace item with equivalent key */ if(tree->free_fn) tree->free_fn((*node_pp)->data); (*node_pp)->data= p_data; return FALSE; } else { /* ignore item with equivalent key */ if(tree->free_fn) tree->free_fn(p_data); return RAPTOR_AVLTREE_EXISTS; } } static void* raptor_avltree_delete_internal(raptor_avltree* tree, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p) { int cmp; void* rdata=NULL; RAPTOR_AVLTREE_DEBUG1("Enter\n"); if(*node_pp == NULL) { RAPTOR_AVLTREE_DEBUG1("key not in tree\n"); return rdata; } cmp= tree->compare_fn((*node_pp)->data, p_data); if(cmp > 0) { RAPTOR_AVLTREE_DEBUG1("too high - scan left\n"); rdata= raptor_avltree_delete_internal(tree, &(*node_pp)->left, p_data, rebalancing_p); if(*rebalancing_p) raptor_avltree_balance_left(tree, node_pp, rebalancing_p); } else if(cmp < 0) { RAPTOR_AVLTREE_DEBUG1("too low - scan right\n"); rdata= raptor_avltree_delete_internal(tree, &(*node_pp)->right, p_data, rebalancing_p); if(*rebalancing_p) raptor_avltree_balance_right(tree, node_pp, rebalancing_p); } else { raptor_avltree_node *pr_q; RAPTOR_AVLTREE_DEBUG1("equal\n"); pr_q= *node_pp; rdata=pr_q->data; if(pr_q->right == NULL) { RAPTOR_AVLTREE_DEBUG1("right subtree null\n"); *node_pp= pr_q->left; *rebalancing_p= TRUE; } else if(pr_q->left == NULL) { RAPTOR_AVLTREE_DEBUG1("right subtree non-null, left subtree null\n"); *node_pp= pr_q->right; *rebalancing_p= TRUE; } else { RAPTOR_AVLTREE_DEBUG1("neither subtree null\n"); rdata=raptor_avltree_delete_internal2(tree, &pr_q->left, rebalancing_p, &pr_q); if(*rebalancing_p) raptor_avltree_balance_left(tree, node_pp, rebalancing_p); } RAPTOR_FREE(raptor_avltree_node, pr_q); } return rdata; } static void* raptor_avltree_delete_internal2(raptor_avltree* tree, raptor_avltree_node** ppr_r, int *rebalancing_p, raptor_avltree_node** ppr_q) { void* rdata=NULL; RAPTOR_AVLTREE_DEBUG1("Enter\n"); if((*ppr_r)->right != NULL) { rdata=raptor_avltree_delete_internal2(tree, &(*ppr_r)->right, rebalancing_p, ppr_q); if(*rebalancing_p) raptor_avltree_balance_right(tree, ppr_r, rebalancing_p); } else { rdata=(*ppr_q)->data; (*ppr_q)->data= (*ppr_r)->data; *ppr_q= *ppr_r; *ppr_r= (*ppr_r)->left; *rebalancing_p= TRUE; } return rdata; } static void raptor_avltree_balance_left(raptor_avltree* tree, raptor_avltree_node** node_pp, int *rebalancing_p) { raptor_avltree_node *p1, *p2, *p_parent; int b1, b2; RAPTOR_AVLTREE_DEBUG1("left branch has shrunk\n"); p_parent=(*node_pp)->parent; switch((*node_pp)->balance) { case -1: RAPTOR_AVLTREE_DEBUG1("was imbalanced, fixed implicitly\n"); (*node_pp)->balance= 0; break; case 0: RAPTOR_AVLTREE_DEBUG1("was okay, is now one off\n"); (*node_pp)->balance= 1; *rebalancing_p= FALSE; break; case 1: RAPTOR_AVLTREE_DEBUG1("was already off, this is too much\n"); p1= (*node_pp)->right; b1= p1->balance; if(b1 >= 0) { RAPTOR_AVLTREE_DEBUG1("single RR\n"); (*node_pp)->right= p1->left; if((*node_pp)->right) (*node_pp)->right->parent= (*node_pp); p1->left= *node_pp; if(p1->left) p1->left->parent= p1; if(b1 == 0) { RAPTOR_AVLTREE_DEBUG1("b1 == 0\n"); (*node_pp)->balance= 1; p1->balance= -1; *rebalancing_p= FALSE; } else { RAPTOR_AVLTREE_DEBUG1("b1 != 0\n"); (*node_pp)->balance= 0; p1->balance= 0; } *node_pp= p1; (*node_pp)->parent=p_parent; } else { RAPTOR_AVLTREE_DEBUG1("double RL\n"); p2= p1->left; b2= p2->balance; p1->left= p2->right; if(p1->left) p1->left->parent=p1; p2->right= p1; if(p2->right) p2->right->parent=p2; (*node_pp)->right= p2->left; if((*node_pp)->right) (*node_pp)->right->parent= (*node_pp); p2->left= *node_pp; if(p2->left) p2->left->parent= p2; if(b2 == 1) (*node_pp)->balance= -1; else (*node_pp)->balance= 0; if(b2 == -1) p1->balance= 1; else p1->balance= 0; *node_pp= p2; (*node_pp)->parent=p_parent; p2->balance= 0; } break; } /* end switch */ } static void raptor_avltree_balance_right(raptor_avltree* tree, raptor_avltree_node** node_pp, int *rebalancing_p) { raptor_avltree_node *p1, *p2, *p_parent; int b1, b2; RAPTOR_AVLTREE_DEBUG1("right branch has shrunk\n"); p_parent=(*node_pp)->parent; switch((*node_pp)->balance) { case 1: RAPTOR_AVLTREE_DEBUG1("was imbalanced, fixed implicitly\n"); (*node_pp)->balance= 0; break; case 0: RAPTOR_AVLTREE_DEBUG1("was okay, is now one off\n"); (*node_pp)->balance= -1; *rebalancing_p= FALSE; break; case -1: RAPTOR_AVLTREE_DEBUG1("was already off, this is too much\n"); p1= (*node_pp)->left; b1= p1->balance; if(b1 <= 0) { RAPTOR_AVLTREE_DEBUG1("single LL\n"); (*node_pp)->left= p1->right; if((*node_pp)->left) (*node_pp)->left->parent= (*node_pp); p1->right= *node_pp; if(p1->right) p1->right->parent= p1; if(b1 == 0) { RAPTOR_AVLTREE_DEBUG1("b1 == 0\n"); (*node_pp)->balance= -1; p1->balance= 1; *rebalancing_p= FALSE; } else { RAPTOR_AVLTREE_DEBUG1("b1 != 0\n"); (*node_pp)->balance= 0; p1->balance= 0; } *node_pp= p1; (*node_pp)->parent=p_parent; } else { RAPTOR_AVLTREE_DEBUG1("double LR\n"); p2= p1->right; b2= p2->balance; p1->right= p2->left; if(p1->right) p1->right->parent= p1; p2->left= p1; if(p2->left) p2->left->parent= p2; (*node_pp)->left= p2->right; if((*node_pp)->left) (*node_pp)->left->parent= (*node_pp); p2->right= *node_pp; if(p2->right) p2->right->parent= p2; if(b2 == -1) (*node_pp)->balance= 1; else (*node_pp)->balance= 0; if(b2 == 1) p1->balance= -1; else p1->balance= 0; *node_pp= p2; (*node_pp)->parent=p_parent; p2->balance= 0; } } /* end switch */ } /* * raptor_avltree_size: * @tree: AVL Tree object * * INTERNAL - Get the number of items in the AVL Tree * * Return value: number of items in tree */ int raptor_avltree_size(raptor_avltree* tree) { return tree->size; } /* * raptor_avltree_set_print_handler: * @tree: AVL Tree object * @print_fn: print function * * INTERNAL - set the handler for printing an item in a tree * */ void raptor_avltree_set_print_handler(raptor_avltree* tree, raptor_data_print_function print_fn) { tree->print_fn=print_fn; } /* Follow left children until a match for range is found (if range not NULL) */ static raptor_avltree_node* raptor_avltree_node_leftmost(raptor_avltree* tree, raptor_avltree_node* node, void* range) { /*assert(node); assert(!range || tree->compare_fn(range, node->data) == 0);*/ if(range) while(node && node->left && tree->compare_fn(range, node->left->data) == 0) node=node->left; else while(node && node->left) node=node->left; return node; } static raptor_avltree_node* raptor_avltree_node_rightmost(raptor_avltree* tree, raptor_avltree_node* node, void* range) { /*assert(node); assert(!range || tree->compare_fn(range, node->data) == 0);*/ if(range) while(node && node->right && tree->compare_fn(range, node->right->data) == 0) node=node->right; else while(node && node->right) node=node->right; return node; } /* Follow right children until a match for range is found (range required) */ static raptor_avltree_node* raptor_avltree_node_search_right(raptor_avltree* tree, raptor_avltree_node* node, void* range) { raptor_avltree_node* result; if(node == NULL) return NULL; result=node->right; while(result) { if(tree->compare_fn(range, result->data) == 0) { return result; } else { result = result->right; } } return node; } /* Follow left children until a match for range is found (range required) */ static raptor_avltree_node* raptor_avltree_node_search_left(raptor_avltree* tree, raptor_avltree_node* node, void* range) { raptor_avltree_node* result; if(node == NULL) return NULL; result=node->left; while(result) { if(tree->compare_fn(range, result->data) == 0) { return result; } else { result = result->left; } } return node; } static raptor_avltree_node* raptor_avltree_node_prev(raptor_avltree* tree, raptor_avltree_node* node, void* range) { int up=0; /*assert(!range || tree->compare_fn(range, node->data) == 0);*/ if(node->left) { /* Should never go left if the current node is already < range */ raptor_avltree_node* prev; prev=raptor_avltree_node_rightmost(tree, node->left, NULL); /*assert(!range ||tree->compare_fn(range, node->data) <= 0);*/ if(range) { if(tree->compare_fn(range, prev->data) == 0) { up = 0; node = prev; } else { up = 1; } } else { node = prev; up = 0; } } else { up = 1; } if(up) { raptor_avltree_node* last=node; /* Need to go up */ node=node->parent; while(node) { /* moving from right subtree to this node */ if(node->right && last == node->right) { break; } /* moved up to find an unvisited left subtree */ if(node->left && last != node->left) { /* Should never go left if the current node is already > range */ /*assert(!range ||tree->compare_fn(range, node->data) <= 0);*/ node=raptor_avltree_node_rightmost(tree, node->left, range); break; } last=node; node=node->parent; } } if (node && range) { if (tree->compare_fn(range, node->data) == 0) return node; else return NULL; } else { return node; } } /* Follow right children until a match for range is found (if range not NULL) */ static raptor_avltree_node* raptor_avltree_node_next(raptor_avltree* tree, raptor_avltree_node* node, void* range) { int up=0; /*assert(!range || tree->compare_fn(range, node->data) == 0);*/ if(node->right) { /* Should never go right if the current node is already > range */ raptor_avltree_node* next; next=raptor_avltree_node_leftmost(tree, node->right, NULL); /*assert(!range ||tree->compare_fn(range, node->data) <= 0);*/ if(range) { if(tree->compare_fn(range, next->data) == 0) { up = 0; node = next; } else { up = 1; } } else { node = next; up = 0; } } else { up = 1; } if(up) { raptor_avltree_node* last=node; /* Need to go up */ node=node->parent; while(node) { /* moving from left subtree to this node */ if(node->left && last == node->left) { break; } /* moved up to find an unvisited right subtree */ if(node->right && last != node->right) { /* Should never go right if the current node is already > range */ /*assert(!range ||tree->compare_fn(range, node->data) <= 0);*/ node=raptor_avltree_node_leftmost(tree, node->right, range); break; } last=node; node=node->parent; } } if (node && range) { if (tree->compare_fn(range, node->data) == 0) return node; else return NULL; } else { return node; } } struct raptor_avltree_iterator_s { raptor_avltree* tree; raptor_avltree_node* root; raptor_avltree_node* current; void* range; raptor_data_free_function range_free_fn; int direction; int is_finished; }; /* * raptor_new_avltree_iterator: * @tree: #raptor_avltree object * @range: range * @range_free_fn: function to free @range object * @direction: <0 to go 'backwards' otherwise 'forwards' * * INTERNAL - Get an in-order iterator for the start of a range, or the entire contents * * If range is NULL, the entire tree is walked in order. If range * specifies a range (i.e. the tree comparison function will 'match' * (return 0 for) range and /several/ nodes), the iterator will be * placed at the leftmost child matching range, and * raptor_avltree_iterator_next will iterate over all nodes (and only * nodes) that match range. * * Return value: a new #raptor_avltree_iterator object or NULL on failure **/ raptor_avltree_iterator* raptor_new_avltree_iterator(raptor_avltree* tree, void* range, raptor_data_free_function range_free_fn, int direction) { raptor_avltree_iterator* iterator; iterator=(raptor_avltree_iterator*)RAPTOR_CALLOC(raptor_avltree_iterator, 1, sizeof(raptor_avltree_iterator)); if(!iterator) return NULL; iterator->is_finished=0; iterator->current=NULL; iterator->tree = tree; iterator->range = range; iterator->range_free_fn = range_free_fn; iterator->direction = direction; if(range) { /* find the topmost match (range is contained entirely in tree * rooted here) */ iterator->current=raptor_avltree_search_internal(tree, tree->root, range); } else { iterator->current=tree->root; } iterator->root = iterator->current; if(iterator->current) { if(iterator->direction < 0) { /* go down to find END of range (or tree) */ while (1) { raptor_avltree_node* pred; iterator->current=raptor_avltree_node_rightmost(tree, iterator->current, range); /* move left until a match is found */ pred=raptor_avltree_node_search_left(tree, iterator->current->right, range); if(pred && tree->compare_fn(range, pred->data) == 0) iterator->current = pred; else break; } } else { /* go down to find START of range (or tree) */ while (1) { raptor_avltree_node* pred; iterator->current=raptor_avltree_node_leftmost(tree, iterator->current, range); /* move right until a match is found */ pred=raptor_avltree_node_search_right(tree, iterator->current->left, range); if(pred && tree->compare_fn(range, pred->data) == 0) iterator->current = pred; else break; } } } return iterator; } /* * raptor_free_avltree_iterator: * @iterator: AVL Tree iterator object * * INTERNAL - AVL Tree Iterator destructor */ void raptor_free_avltree_iterator(raptor_avltree_iterator* iterator) { if(!iterator) return; if(iterator->range && iterator->range_free_fn) iterator->range_free_fn(iterator->range); RAPTOR_FREE(raptor_avltree_iterator, iterator); } /* * raptor_avltree_iterator_end: * @iterator: AVL Tree iterator object * * INTERNAL - test if an iteration is finished * * Return value: non-0 if iteration is finished */ int raptor_avltree_iterator_end(raptor_avltree_iterator* iterator) { raptor_avltree_node *node=iterator->current; if(iterator->is_finished) return 1; iterator->is_finished=(node == NULL); return iterator->is_finished; } /* * raptor_avltree_iterator_next: * @iterator: AVL Tree iterator object * * INTERNAL - move iteration to next/prev object * * Return value: non-0 if iteration is finished */ int raptor_avltree_iterator_next(raptor_avltree_iterator* iterator) { raptor_avltree_node *node=iterator->current; if(!node || iterator->is_finished) return 1; if(iterator->direction < 0) iterator->current=raptor_avltree_node_prev(iterator->tree, node, iterator->range); else iterator->current=raptor_avltree_node_next(iterator->tree, node, iterator->range); /* Stay within rooted subtree */ if (iterator->root->parent == iterator->current) iterator->current = NULL; iterator->is_finished=(iterator->current == NULL); return iterator->is_finished; } /* * raptor_avltree_iterator_get: * @iterator: AVL Tree iterator object * * INTERNAL - get current iteration object * * Return value: object or NULL if iteration is finished */ void* raptor_avltree_iterator_get(raptor_avltree_iterator* iterator) { raptor_avltree_node *node=iterator->current; if(iterator->is_finished) return NULL; iterator->is_finished=(node == NULL); if(iterator->is_finished) return NULL; return node->data; } /* move the tree cursor to the first item by order */ int raptor_avltree_cursor_first(raptor_avltree* tree) { if(tree->cursor_iterator) { raptor_free_avltree_iterator(tree->cursor_iterator); tree->cursor_iterator=NULL; } if(!tree->size) return 1; tree->cursor_iterator=raptor_new_avltree_iterator(tree, NULL, NULL, 1); return (tree->cursor_iterator == NULL); } /* move the tree cursor to the last item by order */ int raptor_avltree_cursor_last(raptor_avltree* tree) { if(tree->cursor_iterator) { raptor_free_avltree_iterator(tree->cursor_iterator); tree->cursor_iterator=NULL; } if(!tree->size) return 1; tree->cursor_iterator=raptor_new_avltree_iterator(tree, NULL, NULL, -1); return (tree->cursor_iterator == NULL); } /* move the tree cursor to the previous item by order */ int raptor_avltree_cursor_prev(raptor_avltree* tree) { int rc; if(!tree->cursor_iterator) rc=raptor_avltree_cursor_last(tree); else rc=raptor_avltree_iterator_next(tree->cursor_iterator); return rc; } /* move the tree cursor to the next item by order */ int raptor_avltree_cursor_next(raptor_avltree* tree) { int rc; if(!tree->cursor_iterator) rc=raptor_avltree_cursor_first(tree); else rc=raptor_avltree_iterator_next(tree->cursor_iterator); return rc; } /* get the item at the tree cursor (or NULL if no cursor was set) */ void* raptor_avltree_cursor_get(raptor_avltree* tree) { if(tree->cursor_iterator) return raptor_avltree_iterator_get(tree->cursor_iterator); return NULL; } /* print the items in the tree in order (for debugging) */ void raptor_avltree_print(raptor_avltree* tree, FILE* stream) { int i; int rv=0; raptor_avltree_iterator* iter; fprintf(stream, "AVL Tree size %u\n", tree->size); for(i=0, (iter=raptor_new_avltree_iterator(tree, NULL, NULL, 1)); iter && !rv; i++, (rv=raptor_avltree_iterator_next(iter))) { const void* data=raptor_avltree_iterator_get(iter); if(!data) continue; fprintf(stream, "%d) ", i); if(tree->print_fn) tree->print_fn(stream, data); else fprintf(stream, "Data Node %p\n", data); } /*assert(i == tree->size);*/ } #ifdef RAPTOR_DEBUG static int raptor_avltree_dump_internal(raptor_avltree* tree, raptor_avltree_node* node, int depth, FILE* stream) { int i; if(!node) return TRUE; for(i=0; i < depth; i++) fputs(" ", stream); fprintf(stream, "Node %p: parent %p left %p right %p data %p\n", node, node->parent, node->left, node->right, node->data); if(tree->print_fn) { for(i= 0; i < depth; i++) fputs(" ", stream); tree->print_fn(stream, node->data); } if(!raptor_avltree_dump_internal(tree, node->left, depth+1, stream)) return FALSE; if(!raptor_avltree_dump_internal(tree, node->right, depth+1, stream)) return FALSE; return TRUE; } /* debugging tree dump with pointers and depth indenting */ int raptor_avltree_dump(raptor_avltree* tree, FILE* stream) { fprintf(stream, "Dumping avltree %p size %u\n", tree, tree->size); return raptor_avltree_dump_internal(tree, tree->root, 0, stream); } static void raptor_avltree_check_internal(raptor_avltree* tree, raptor_avltree_node* node, unsigned int* count_p) { if(!node) return; (*count_p)++; raptor_avltree_check_node(tree, node, NULL, NULL); raptor_avltree_check_internal(tree, node->left, count_p); raptor_avltree_check_internal(tree, node->right, count_p); } /* debugging tree check - parent/child pointers and counts */ void raptor_avltree_check(raptor_avltree* tree) { unsigned int count=0; raptor_avltree_check_internal(tree, tree->root, &count); if(count != tree->size) { fprintf(stderr, "Tree %p nodes count is %u. actual count %d\n", tree, tree->size, count); abort(); } } #endif #endif #ifdef STANDALONE #include <string.h> typedef struct { FILE *fh; int count; const char** results; int failed; } visit_state; #if RAPTOR_DEBUG > 1 static int print_string(int depth, void* data, void *user_data) { visit_state* vs=(visit_state*)user_data; fprintf(vs->fh, "%3d: %s\n", vs->count, (char*) data); vs->count++; return 1; } #endif static int check_string(int depth, void* data, void *user_data) { visit_state* vs=(visit_state*)user_data; const char* result=vs->results[vs->count]; if(strcmp((const char*)data, result)) { fprintf(vs->fh, "%3d: Expected '%s' but found '%s'\n", vs->count, result, (char*)data); vs->failed=1; } vs->count++; return 1; } static int compare_strings(const void *l, const void *r) { return strcmp((const char*)l, (const char*)r); } /* one more prototype */ int main(int argc, char *argv[]); int main(int argc, char *argv[]) { raptor_world *world; const char *program=raptor_basename(argv[0]); #define ITEM_COUNT 8 const char *items[ITEM_COUNT+1] = { "ron", "amy", "jen", "bij", "jib", "daj", "jim", "def", NULL }; #define DELETE_COUNT 2 const char *delete_items[DELETE_COUNT+1] = { "jen", "jim", NULL }; #define RESULT_COUNT (ITEM_COUNT-DELETE_COUNT) const char *results[RESULT_COUNT+1] = { "amy", "bij", "daj", "def", "jib", "ron", NULL}; raptor_avltree* tree; raptor_avltree_iterator* iter; visit_state vs; int i; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); tree=raptor_new_avltree(world, compare_strings, NULL, /* no free as they are static pointers above */ 0); if(!tree) { fprintf(stderr, "%s: Failed to create tree\n", program); exit(1); } for(i=0; items[i]; i++) { int rc; void* node; #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Adding tree item '%s'\n", program, items[i]); #endif rc=raptor_avltree_add(tree, (void*)items[i]); if(rc) { fprintf(stderr, "%s: Adding tree item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } #ifdef RAPTOR_DEBUG raptor_avltree_check(tree); #endif node=raptor_avltree_search(tree, (void*)items[i]); if(!node) { fprintf(stderr, "%s: Tree did NOT contain item %d '%s' as expected\n", program, i, items[i]); exit(1); } } #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Printing tree\n", program); vs.fh=stderr; vs.count=0; raptor_avltree_visit(tree, print_string, &vs); fprintf(stderr, "%s: Dumping tree\n", program); raptor_avltree_dump(tree, stderr); #endif for(i=0; delete_items[i]; i++) { int rc; #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Deleting tree item '%s'\n", program, delete_items[i]); #endif rc=raptor_avltree_delete(tree, (void*)delete_items[i]); if(!rc) { fprintf(stderr, "%s: Deleting tree item %d '%s' failed, returning error %d\n", program, i, delete_items[i], rc); exit(1); } #ifdef RAPTOR_DEBUG raptor_avltree_check(tree); #endif } #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Walking tree forwards via iterator\n", program); #endif iter=raptor_new_avltree_iterator(tree, NULL, NULL, 1); for(i=0; 1; i++) { const char* data=(const char*)raptor_avltree_iterator_get(iter); const char* result=results[i]; if((!data && data != result) || (data && strcmp(data, result))) { fprintf(stderr, "%3d: Forwards iterator expected '%s' but found '%s'\n", i, result, data); exit(1); } #if RAPTOR_DEBUG > 1 fprintf(stderr, "%3d: Got '%s'\n", i, data); #endif if(raptor_avltree_iterator_next(iter)) break; if(i > RESULT_COUNT) { fprintf(stderr, "Forward iterator did not end on result %i as expected\n", i); exit(1); } } raptor_free_avltree_iterator(iter); #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Walking tree backwards via cursor\n", program); #endif raptor_avltree_cursor_last(tree); for(i=RESULT_COUNT-1; 1; i--) { const char* data=(const char*)raptor_avltree_cursor_get(tree); const char* result=results[i]; if((!data && data != result) || (data && strcmp(data, result))) { fprintf(stderr, "%3d: Backwards cursoring expected '%s' but found '%s'\n", i, result, data); exit(1); } #if RAPTOR_DEBUG > 1 fprintf(stderr, "%3d: Got '%s'\n", i, data); #endif if(raptor_avltree_cursor_prev(tree)) break; if(i < 0) { fprintf(stderr, "Backwards cursor did not end on result %i as expected\n", i); exit(1); } } #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Checking tree\n", program); #endif vs.count=0; vs.results=results; vs.failed=0; raptor_avltree_visit(tree, check_string, &vs); if(vs.failed) { fprintf(stderr, "%s: Checking tree failed\n", program); exit(1); } for(i=0; results[i]; i++) { const char* result=results[i]; char* data=(char*)raptor_avltree_remove(tree, (void*)result); if(!data) { fprintf(stderr, "%s: remove %i failed at item '%s'\n", program, i, result); exit(1); } if(strcmp(data, result)) { fprintf(stderr, "%s: remove %i returned %s not %s as expected\n", program, i, data, result); exit(1); } } #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing tree\n", program); #endif raptor_free_avltree(tree); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_serialize_ntriples.c�������������������������������������������������������0000644�0001750�0001750�00000022240�11330672502�016257� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_ntriples.c - N-Triples serializer * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * Raptor N-Triples serializer object */ typedef struct { int dummy; } raptor_ntriples_serializer_context; /* create a new serializer */ static int raptor_ntriples_serialize_init(raptor_serializer* serializer, const char *name) { return 0; } /* destroy a serializer */ static void raptor_ntriples_serialize_terminate(raptor_serializer* serializer) { } /* add a namespace */ static int raptor_ntriples_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { /* NOP */ return 0; } #if 0 /* start a serialize */ static int raptor_ntriples_serialize_start(raptor_serializer* serializer) { return 0; } #endif /** * raptor_iostream_write_string_ntriples: * @iostr: #raptor_iostream to write to * @string: UTF-8 string to write * @len: length of UTF-8 string * @delim: Terminating delimiter character for string (such as " or >) * or \0 for no escaping. * * Write an UTF-8 string using N-Triples escapes to an iostream. * * Return value: non-0 on failure such as bad UTF-8 encoding. **/ int raptor_iostream_write_string_ntriples(raptor_iostream *iostr, const unsigned char *string, size_t len, const char delim) { return raptor_iostream_write_string_python(iostr, string, len, delim, 0); } static void raptor_iostream_write_statement_part_ntriples(raptor_world* world, raptor_iostream* iostr, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language) { size_t len; switch(type) { case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: raptor_iostream_write_byte(iostr, '"'); raptor_iostream_write_string_ntriples(iostr, (const unsigned char*)term, strlen((const char*)term), '"'); raptor_iostream_write_byte(iostr, '"'); if(literal_language && type == RAPTOR_IDENTIFIER_TYPE_LITERAL) { raptor_iostream_write_byte(iostr, '@'); raptor_iostream_write_string(iostr, literal_language); } if(type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { raptor_iostream_write_counted_string(iostr, "^^<", 3); raptor_iostream_write_string(iostr, raptor_xml_literal_datatype_uri_string); raptor_iostream_write_byte(iostr, '>'); } else if(literal_datatype) { raptor_iostream_write_counted_string(iostr, "^^<", 3); raptor_iostream_write_string(iostr, raptor_uri_as_string_v2(world, (raptor_uri*)literal_datatype)); raptor_iostream_write_byte(iostr, '>'); } break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: raptor_iostream_write_counted_string(iostr, "_:", 2); raptor_iostream_write_string(iostr, term); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: raptor_iostream_write_counted_string(iostr, "<_", 1); raptor_iostream_write_counted_string(iostr, raptor_rdf_namespace_uri, raptor_rdf_namespace_uri_len); raptor_iostream_write_counted_string(iostr, "_", 1); raptor_iostream_write_decimal(iostr, *((int*)term)); raptor_iostream_write_byte(iostr, '>'); break; case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: raptor_iostream_write_byte(iostr, '<'); term=raptor_uri_as_counted_string_v2(world, (raptor_uri*)term, &len); raptor_iostream_write_string_ntriples(iostr, (const unsigned char*)term, len, '>'); raptor_iostream_write_byte(iostr, '>'); break; case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL2("Unknown type %d", type); } } #ifndef RAPTOR_DISABLE_V1 /** * raptor_iostream_write_statement_ntriples: * @iostr: raptor iostream * @statement: statement to write * * Write a #raptor_statement formatted in N-Triples format to a #raptor_iostream * * raptor_init() MUST have been called before calling this function. * Use raptor_iostream_write_statement_ntriples_v2() if using raptor_world APIs. * **/ void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement) { raptor_iostream_write_statement_ntriples_v2(raptor_world_instance(), iostr, statement); } #endif /** * raptor_iostream_write_statement_ntriples_v2: * @world: raptor_world object * @iostr: raptor iostream * @statement: statement to write * * Write a #raptor_statement formatted in N-Triples format to a #raptor_iostream * **/ void raptor_iostream_write_statement_ntriples_v2(raptor_world* world, raptor_iostream* iostr, const raptor_statement *statement) { raptor_iostream_write_statement_part_ntriples(world, iostr, statement->subject, statement->subject_type, NULL, NULL); raptor_iostream_write_byte(iostr, ' '); raptor_iostream_write_statement_part_ntriples(world, iostr, statement->predicate, statement->predicate_type, NULL, NULL); raptor_iostream_write_byte(iostr, ' '); raptor_iostream_write_statement_part_ntriples(world, iostr, statement->object, statement->object_type, statement->object_literal_datatype, statement->object_literal_language); raptor_iostream_write_counted_string(iostr, " .\n", 3); } /* serialize a statement */ static int raptor_ntriples_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement) { raptor_iostream_write_statement_ntriples_v2(serializer->world, serializer->iostream, statement); return 0; } #if 0 /* end a serialize */ static int raptor_ntriples_serialize_end(raptor_serializer* serializer) { return 0; } #endif /* finish the serializer factory */ static void raptor_ntriples_serialize_finish_factory(raptor_serializer_factory* factory) { } static int raptor_ntriples_serializer_register_factory(raptor_serializer_factory *factory) { factory->context_length = sizeof(raptor_ntriples_serializer_context); factory->init = raptor_ntriples_serialize_init; factory->terminate = raptor_ntriples_serialize_terminate; factory->declare_namespace = raptor_ntriples_serialize_declare_namespace; factory->serialize_start = NULL; factory->serialize_statement = raptor_ntriples_serialize_statement; factory->serialize_end = NULL; factory->finish_factory = raptor_ntriples_serialize_finish_factory; return 0; } int raptor_init_serializer_ntriples(raptor_world* world) { return raptor_serializer_register_factory(world, "ntriples", "N-Triples", "text/plain", NULL, (const unsigned char*)"http://www.w3.org/TR/rdf-testcases/#ntriples", &raptor_ntriples_serializer_register_factory); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_www_libxml.c���������������������������������������������������������������0000644�0001750�0001750�00000007647�11330672502�014561� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www_libxml.c - Raptor WWW retrieval via libxml2 * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <stdarg.h> /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifdef RAPTOR_WWW_LIBXML void raptor_www_libxml_init(raptor_www *www) { www->error_handlers.handlers[RAPTOR_LOG_LEVEL_NONE].user_data=www; www->old_xmlGenericErrorContext=xmlGenericErrorContext; xmlSetGenericErrorFunc(&www->error_handlers, raptor_libxml_generic_error); www->ctxt=NULL; } void raptor_www_libxml_free(raptor_www *www) { xmlSetGenericErrorFunc(www->old_xmlGenericErrorContext, raptor_libxml_generic_error); } int raptor_www_libxml_fetch(raptor_www *www) { char* headers=NULL; if(www->proxy) xmlNanoHTTPScanProxy(www->proxy); if(www->http_accept || www->user_agent) { size_t accept_len=0; size_t ua_len=0; size_t cc_len=0; size_t len=0; char *p; if(www->http_accept) { accept_len=strlen(www->http_accept); len+=accept_len+2; /* \r\n */ } if(www->user_agent) { ua_len=strlen(www->user_agent); len+=12+ua_len+2; /* strlen("User-Agent: ") + \r\n */ } if(www->cache_control) { cc_len=strlen(www->cache_control); len+=cc_len+2; /* \r\n */ } headers=(char*)RAPTOR_MALLOC(cstring, len+1); if(!headers) return 1; p=headers; if(www->http_accept) { strncpy(p, www->http_accept, accept_len); p+= accept_len; *p++='\r'; *p++='\n'; } if(www->user_agent) { strncpy(p, "User-Agent: ", 12); p+=12; strncpy(p, www->user_agent, ua_len); p+= ua_len; *p++='\r'; *p++='\n'; } if(www->cache_control) { strncpy(p, www->cache_control, cc_len); p+= cc_len; *p++='\r'; *p++='\n'; } *p='\0'; } www->ctxt=xmlNanoHTTPMethod((const char*)raptor_uri_as_string_v2(www->world, www->uri), NULL, /* HTTP method (default GET) */ NULL, /* input string */ &www->type, headers, 0); /* input length - ilen */ if(headers) RAPTOR_FREE(cstring, headers); if(!www->ctxt) return 1; if(www->type) { if(www->content_type) { www->content_type(www, www->content_type_userdata, www->type); if(www->failed) { xmlNanoHTTPClose(www->ctxt); return 1; } } xmlFree(www->type); www->type=NULL; } www->status_code=xmlNanoHTTPReturnCode(www->ctxt); while(1) { int len=xmlNanoHTTPRead(www->ctxt, www->buffer, RAPTOR_WWW_BUFFER_SIZE); if(len<0) break; www->total_bytes += len; if(www->write_bytes) www->write_bytes(www, www->write_bytes_userdata, www->buffer, len, 1); if(len < RAPTOR_WWW_BUFFER_SIZE || www->failed) break; } xmlNanoHTTPClose(www->ctxt); return www->failed; } #endif /* #ifdef RAPTOR_WWW_LIBXML*/ �����������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_namespace.c����������������������������������������������������������������0000644�0001750�0001750�00000100231�11330672502�014301� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_namespace.c - Raptor XML namespace classes * * Copyright (C) 2002-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* Define these for far too much output */ #undef RAPTOR_DEBUG_VERBOSE /* * Namespaces in XML * http://www.w3.org/TR/1999/REC-xml-names-19990114/#nsc-NSDeclared * (section 4) says: * * -------------------------------------------------------------------- * The prefix xml is by definition bound to the namespace name * http://www.w3.org/XML/1998/namespace * -------------------------------------------------------------------- * * Errata NE05 * http://www.w3.org/XML/xml-names-19990114-errata#NE05 * changes that to read: * * -------------------------------------------------------------------- * The prefix xml is by definition bound to the namespace name * http://www.w3.org/XML/1998/namespace. It may, but need not, be * declared, and must not be bound to any other namespace name. No * other prefix may be bound to this namespace name. * * The prefix xmlns is used only to declare namespace bindings and is * by definition bound to the namespace name * http://www.w3.org/2000/xmlns/. It must not be declared. No other * prefix may be bound to this namespace name. * * All other prefixes beginning with the three-letter sequence x, m, l, * in any case combination, are reserved. This means that * * users should not use them except as defined by later specifications * * processors must not treat them as fatal errors. * -------------------------------------------------------------------- * * Thus should define it in the table of namespaces before we start. * * We *can* also define others, but let's not. * */ const unsigned char * const raptor_xml_namespace_uri=(const unsigned char *)"http://www.w3.org/XML/1998/namespace"; const unsigned char * const raptor_rdf_namespace_uri=(const unsigned char *)"http://www.w3.org/1999/02/22-rdf-syntax-ns#"; const unsigned int raptor_rdf_namespace_uri_len=43; const unsigned char * const raptor_rdf_schema_namespace_uri=(const unsigned char *)"http://www.w3.org/2000/01/rdf-schema#"; const unsigned char * const raptor_xmlschema_datatypes_namespace_uri=(const unsigned char *)"http://www.w3.org/2001/XMLSchema#"; const unsigned char * const raptor_owl_namespace_uri=(const unsigned char *)"http://www.w3.org/2002/07/owl#"; #ifndef RAPTOR_DISABLE_V1 /** * raptor_namespaces_init: * @nstack: #raptor_namespace_stack to initialise * @uri_handler: URI handler function (ignored) * @uri_context: context for URI handler (ignored) * @error_handler: error handler function * @error_data: context for error handler * @defaults: namespaces to initialise. * * Initialise a namespaces stack some optional common namespaces. * * @defaults can be 0 for none, 1 for just XML, 2 for RDF, RDFS, OWL * and XSD (RDQL uses this) or 3+ undefined. * * @uri_handler and @uri_context parameters are ignored but are retained * in the API for backwards compatibility. Internally the same uri handler * as returned by raptor_uri_get_handler() will be used. * * raptor_init() MUST have been called before calling this function. * Use raptor_namespaces_init_v2() if using raptor_world APIs. * * Return value: non-0 on error */ int raptor_namespaces_init(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults) { return raptor_namespaces_init_v2(raptor_world_instance(), nstack, error_handler, error_data, defaults); } #endif /* hash function to hash namespace prefix strings (usually short strings) * * Uses DJ Bernstein original hash function - good on short text keys. */ static unsigned int raptor_hash_ns_string(const unsigned char *str, int length) { unsigned int hash = 5381; int c; for(; length && (c = *str++); length--) { hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ } return hash; } #define RAPTOR_NAMESPACES_HASHTABLE_SIZE 1024 /** * raptor_namespaces_init_v2: * @world: raptor_world object * @nstack: #raptor_namespace_stack to initialise * @error_handler: error handler function * @error_data: context for error handler * @defaults: namespaces to initialise. * * Initialise a namespaces stack some optional common namespaces. * * @defaults can be 0 for none, 1 for just XML, 2 for RDF, RDFS, OWL * and XSD (RDQL uses this) or 3+ undefined. * * Return value: non-0 on error */ int raptor_namespaces_init_v2(raptor_world* world, raptor_namespace_stack *nstack, raptor_simple_message_handler error_handler, void *error_data, int defaults) { int failures=0; nstack->world=world; nstack->error_handler=error_handler; nstack->error_data=error_data; nstack->size = 0; nstack->table_size = RAPTOR_NAMESPACES_HASHTABLE_SIZE; nstack->table = (raptor_namespace**)RAPTOR_CALLOC(raptor_namespaces, RAPTOR_NAMESPACES_HASHTABLE_SIZE, sizeof(raptor_namespace*)); if(!nstack->table) return -1; nstack->def_namespace = NULL; nstack->rdf_ms_uri = raptor_new_uri_v2(nstack->world, (const unsigned char*)raptor_rdf_namespace_uri); failures += !nstack->rdf_ms_uri; nstack->rdf_schema_uri = raptor_new_uri_v2(nstack->world, (const unsigned char*)raptor_rdf_schema_namespace_uri); failures += !nstack->rdf_schema_uri; /* raptor_new_namespace_from_uri() that eventually gets called by * raptor_new_namespace() in raptor_namespaces_start_namespace_full() * needs rdf_ms_uri and rdf_schema_uri * - do not call if we had failures initializing those uris */ if(defaults && !failures) { /* defined at level -1 since always 'present' when inside the XML world */ failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"xml", raptor_xml_namespace_uri, -1); if(defaults >= 2) { failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"rdf", raptor_rdf_namespace_uri, 0); failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"rdfs", raptor_rdf_schema_namespace_uri, 0); failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"xsd", raptor_xmlschema_datatypes_namespace_uri, 0); failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"owl", raptor_owl_namespace_uri, 0); } } return failures; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_namespaces: * @uri_handler: URI handler function (ignored) * @uri_context: URI handler context data (ignored) * @error_handler: error handler function * @error_data: error handler data * @defaults: namespaces to initialise * * Constructor - create a new #raptor_namespace_stack. * * See raptor_namespaces_init() for the values of @defaults. * * @uri_handler and @uri_context parameters are ignored but are retained * in the API for backwards compatibility. Internally the same uri handler * as returned by raptor_uri_get_handler() will be used. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_namespaces_v2() if using raptor_world APIs. * * Return value: a new namespace stack or NULL on failure **/ raptor_namespace_stack * raptor_new_namespaces(const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults) { return raptor_new_namespaces_v2(raptor_world_instance(), error_handler, error_data, defaults); } #endif /** * raptor_new_namespaces_v2: * @world: raptor_world object * @error_handler: error handler function * @error_data: error handler data * @defaults: namespaces to initialise * * Constructor - create a new #raptor_namespace_stack. * * See raptor_namespaces_init() for the values of @defaults. * * Return value: a new namespace stack or NULL on failure **/ raptor_namespace_stack * raptor_new_namespaces_v2(raptor_world* world, raptor_simple_message_handler error_handler, void *error_data, int defaults) { raptor_namespace_stack *nstack=(raptor_namespace_stack *)RAPTOR_CALLOC(raptor_namespace_stack, 1, sizeof(raptor_namespace_stack)); if(!nstack) return NULL; if(raptor_namespaces_init_v2(world, nstack, error_handler, error_data, defaults)) { raptor_free_namespaces(nstack); nstack=NULL; } return nstack; } /** * raptor_namespaces_start_namespace: * @nstack: namespace stack * @nspace: namespace to start * * Start a namespace on a stack of namespaces. **/ void raptor_namespaces_start_namespace(raptor_namespace_stack *nstack, raptor_namespace *nspace) { unsigned int hash = raptor_hash_ns_string(nspace->prefix, nspace->prefix_length); const int bucket = hash % nstack->table_size; nstack->size++; if(nstack->table[bucket]) nspace->next = nstack->table[bucket]; nstack->table[bucket] = nspace; if(!nstack->def_namespace) nstack->def_namespace = nspace; #ifndef STANDALONE #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("start namespace prefix %s depth %d\n", nspace->prefix ? (char*)nspace->prefix : "(default)", nspace->depth); #endif #endif } /** * raptor_namespaces_start_namespace_full - * @nstack: namespace stack * @prefix: new namespace prefix (or NULL) * @ns_uri_string: new namespace URI (or NULL) * @depth: new namespace depth * * Create a new namespace and start it on a stack of namespaces. * * See raptor_new_namespace() for the meanings of @prefix, * @ns_uri_string and @depth for namespaces. * * Return value: non-0 on failure **/ int raptor_namespaces_start_namespace_full(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth) { raptor_namespace *ns; ns = raptor_new_namespace(nstack, prefix, ns_uri_string, depth); if(!ns) return 1; raptor_namespaces_start_namespace(nstack, ns); return 0; } /** * raptor_namespaces_clear: * @nstack: namespace stack * * Empty a namespace stack of namespaces and any other resources. **/ void raptor_namespaces_clear(raptor_namespace_stack *nstack) { if(nstack->table) { int bucket; for(bucket = 0; bucket < nstack->table_size; bucket++) { raptor_namespace *ns = nstack->table[bucket]; while(ns) { raptor_namespace* next_ns = ns->next; raptor_free_namespace(ns); nstack->size--; ns = next_ns; } nstack->table[bucket] = NULL; } RAPTOR_FREE(raptor_namespaces, nstack->table); nstack->table = NULL; nstack->table_size = 0; } if(nstack->world) { if(nstack->rdf_ms_uri) { raptor_free_uri_v2(nstack->world, nstack->rdf_ms_uri); nstack->rdf_ms_uri = NULL; } if(nstack->rdf_schema_uri) { raptor_free_uri_v2(nstack->world, nstack->rdf_schema_uri); nstack->rdf_schema_uri = NULL; } } nstack->size = 0; nstack->world = NULL; } /** * raptor_free_namespaces: * @nstack: namespace stack * * Destructor - destroy a namespace stack **/ void raptor_free_namespaces(raptor_namespace_stack *nstack) { if(!nstack) return; raptor_namespaces_clear(nstack); RAPTOR_FREE(raptor_namespace_stack, nstack); } /** * raptor_namespaces_end_for_depth: * @nstack: namespace stack * @depth: depth * * End all namespaces at the given depth in the namespace stack. **/ void raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int depth) { int bucket; for(bucket = 0; bucket < nstack->table_size; bucket++) { while(nstack->table[bucket] && nstack->table[bucket]->depth == depth) { raptor_namespace* ns = nstack->table[bucket]; raptor_namespace* next_ns = ns->next; #ifndef STANDALONE #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("namespace prefix %s depth %d\n", ns->prefix ? (char*)ns->prefix : "(default)", depth); #endif #endif raptor_free_namespace(ns); nstack->size--; nstack->table[bucket] = next_ns; } } } /** * raptor_namespaces_get_default_namespace: * @nstack: namespace stack * * Get the current default namespace in-scope in a stack. * * Return value: #raptor_namespace or NULL if no default namespace is in scope **/ raptor_namespace* raptor_namespaces_get_default_namespace(raptor_namespace_stack *nstack) { unsigned int hash = raptor_hash_ns_string((const unsigned char *)"", 0); const int bucket = hash % nstack->table_size; raptor_namespace* ns; for(ns = nstack->table[bucket]; ns && ns->prefix; ns = ns->next) ; return ns; } /** * raptor_namespaces_find_namespace: * @nstack: namespace stack * @prefix: namespace prefix to find * @prefix_length: length of prefix. * * Find a namespace in a namespace stack by prefix. * * Note that this uses the @length so that the prefix may be a prefix (sic) * of a longer string. If @prefix is NULL, the default namespace will * be returned if present, @prefix_length length is ignored in this case. * * Return value: #raptor_namespace for the prefix or NULL on failure **/ raptor_namespace* raptor_namespaces_find_namespace(raptor_namespace_stack *nstack, const unsigned char *prefix, int prefix_length) { raptor_namespace* ns; unsigned int hash = raptor_hash_ns_string(prefix, prefix_length); const int bucket = hash % (nstack->table_size); for(ns = nstack->table[bucket]; ns ; ns = ns->next) { if(!prefix && !ns->prefix) break; if(prefix_length == ns->prefix_length && !strncmp((char*)prefix, (char*)ns->prefix, prefix_length)) break; } return ns; } /** * raptor_namespaces_find_namespace_by_uri: * @nstack: namespace stack * @ns_uri: namespace URI to find * * Find a namespace in a namespace stack by namespace URI. * * Return value: #raptor_namespace for the URI or NULL on failure **/ raptor_namespace* raptor_namespaces_find_namespace_by_uri(raptor_namespace_stack *nstack, raptor_uri *ns_uri) { int bucket; if(!ns_uri) return NULL; for (bucket = 0; bucket < nstack->table_size; bucket++) { raptor_namespace* ns; for(ns = nstack->table[bucket]; ns ; ns = ns->next) if(raptor_uri_equals_v2(nstack->world, ns->uri, ns_uri)) return ns; } return NULL; } /** * raptor_namespaces_namespace_in_scope: * @nstack: namespace stack * @nspace: namespace * * Test if a given namespace is in-scope in the namespace stack. * * Return value: non-0 if the namespace is in scope. **/ int raptor_namespaces_namespace_in_scope(raptor_namespace_stack *nstack, const raptor_namespace *nspace) { raptor_namespace* ns; int bucket; for(bucket = 0; bucket < nstack->table_size; bucket++) { for(ns = nstack->table[bucket]; ns ; ns = ns->next) if(raptor_uri_equals_v2(nstack->world, ns->uri, nspace->uri)) return 1; } return 0; } /** * raptor_new_namespace_from_uri: * @nstack: namespace stack * @prefix: namespace prefix string * @ns_uri: namespace URI * @depth: depth of namespace in the stack * * Constructor - create a new namespace from a prefix and URI object. * * Return value: a new #raptor_namespace or NULL on failure **/ raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *nstack, const unsigned char *prefix, raptor_uri* ns_uri, int depth) { int prefix_length=0; int len; raptor_namespace *ns; unsigned char *p; #ifndef STANDALONE #if RAPTOR_DEBUG >1 RAPTOR_DEBUG4("namespace prefix %s uri %s depth %d\n", prefix ? (char*)prefix : "(default)", ns_uri ? (char*)raptor_uri_as_string_v2(nstack->world, ns_uri) : "(none)", depth); #endif #endif if(prefix && !ns_uri) { /* failed to find namespace - now what? */ if(nstack->error_handler) nstack->error_handler((raptor_parser*)nstack->error_data, "The namespace URI for prefix \"%s\" is empty.", prefix); return NULL; } len=sizeof(raptor_namespace); if(prefix) { prefix_length=strlen((char*)prefix); len+=prefix_length+1; } /* Just one malloc for structure + namespace (maybe) + prefix (maybe)*/ ns=(raptor_namespace*)RAPTOR_CALLOC(raptor_namespace, 1, len); if(!ns) return NULL; p=(unsigned char*)ns+sizeof(raptor_namespace); if(ns_uri) { ns->uri = raptor_uri_copy_v2(nstack->world, ns_uri); if(!ns->uri) { RAPTOR_FREE(raptor_namespace, ns); return NULL; } } if(prefix) { ns->prefix=(const unsigned char*)strcpy((char*)p, (char*)prefix); ns->prefix_length=prefix_length; if(!strcmp((char*)ns->prefix, "xml")) ns->is_xml=1; } ns->depth=depth; /* set convienience flags when there is a defined namespace URI */ if(ns->uri) { if(raptor_uri_equals_v2(nstack->world, ns->uri, nstack->rdf_ms_uri)) ns->is_rdf_ms = 1; else if(raptor_uri_equals_v2(nstack->world, ns->uri, nstack->rdf_schema_uri)) ns->is_rdf_schema=1; } ns->nstack=nstack; return ns; } /** * raptor_new_namespace: * @nstack: namespace stack * @prefix: namespace prefix string * @ns_uri_string: namespace URI string * @depth: depth of namespace in the stack * * Constructor - create a new namespace from a prefix and URI string. * * Return value: a new #raptor_namespace or NULL on failure **/ raptor_namespace* raptor_new_namespace(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth) { raptor_uri* ns_uri=NULL; raptor_namespace* ns; /* Convert an empty namespace string "" to a NULL pointer */ if(ns_uri_string && !*ns_uri_string) ns_uri_string=NULL; if(ns_uri_string) { ns_uri=raptor_new_uri_v2(nstack->world, ns_uri_string); if(!ns_uri) return NULL; } ns=raptor_new_namespace_from_uri(nstack, prefix, ns_uri, depth); if(ns_uri) raptor_free_uri_v2(nstack->world, ns_uri); return ns; } /** * raptor_namespace_copy: * @nstack: namespace stack * @ns: namespace * @new_depth: new depth * * Copy a namespace to a new namespace stack with a new depth. * * Return value: non-0 on failure **/ int raptor_namespace_copy(raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth) { raptor_namespace *new_ns; new_ns=raptor_new_namespace_from_uri(nstack, ns->prefix, ns->uri, new_depth); if(!new_ns) return 1; raptor_namespaces_start_namespace(nstack, new_ns); return 0; } /** * raptor_free_namespace: * @ns: namespace object * * Destructor - destroy a namespace. **/ void raptor_free_namespace(raptor_namespace *ns) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(ns, raptor_namespace); if(ns->uri) raptor_free_uri_v2(ns->nstack->world, ns->uri); RAPTOR_FREE(raptor_namespace, ns); } /** * raptor_namespace_get_uri: * @ns: namespace object * * Get the namespace URI. * * Return value: namespace URI or NULL **/ raptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns) { return ns->uri; } /** * raptor_namespace_get_prefix: * @ns: namespace object * * Get the namespace prefix. * * Return value: prefix string or NULL **/ const unsigned char* raptor_namespace_get_prefix(const raptor_namespace *ns) { return (const unsigned char*)ns->prefix; } /** * raptor_namespace_get_counted_prefix: * @ns: namespace object * @length_p: pointer to store length or NULL * * Get the namespace prefix and length. * * Return value: prefix string or NULL **/ const unsigned char* raptor_namespace_get_counted_prefix(const raptor_namespace *ns, size_t *length_p) { if(length_p) *length_p=ns->prefix_length; return (const unsigned char*)ns->prefix; } /** * raptor_namespaces_format: * @ns: namespace object * @length_p: pointer to length (or NULL) * * Format a namespace in an XML style into a newly allocated string. * * Generates a string of the form xmlns:prefix="uri", * xmlns="uri", xmlns:prefix="" or xmlns="" depending on the * namespace's prefix or URI. Double quotes are always used. * * If @length_p is not NULL, the length of the string is * stored in the address it points to. * * See also raptor_new_namespace_parts_from_string() * * Return value: namespace formatted as newly allocated string or NULL on failure **/ unsigned char * raptor_namespaces_format(const raptor_namespace *ns, size_t *length_p) { size_t uri_length=0L; const unsigned char *uri_string=NULL; size_t xml_uri_length=0L; size_t length; unsigned char *buffer; const char quote='"'; unsigned char *p; if(ns->uri) { uri_string=raptor_uri_as_counted_string_v2(ns->nstack->world, ns->uri, &uri_length); xml_uri_length=raptor_xml_escape_string(uri_string, uri_length, NULL, 0, quote, NULL, NULL); } length=8+xml_uri_length+ns->prefix_length; /* 8=length of [[xmlns=""] */ if(ns->prefix) length++; /* for : */ if(length_p) *length_p=length; buffer=(unsigned char*)RAPTOR_MALLOC(cstring, length+1); if(!buffer) return NULL; p=buffer; strncpy((char*)p, "xmlns", 5); p+= 5; if(ns->prefix) { *p++ = ':'; strncpy((char*)p, (char*)ns->prefix, ns->prefix_length); p+= ns->prefix_length; } *p++ = '='; *p++ = quote; if(uri_length) { raptor_xml_escape_string(uri_string, uri_length, p, xml_uri_length, quote, NULL, NULL); p+= xml_uri_length; } *p++ = quote; *p++ = '\0'; return buffer; } /** * raptor_iostream_write_namespace: * @iostr: raptor iosteram * @ns: namespace to write * * Write a formatted namespace to an iostream * * Return value: non-0 on failure **/ int raptor_iostream_write_namespace(raptor_iostream* iostr, raptor_namespace *ns) { size_t uri_length=0L; const unsigned char *uri_string=NULL; if(!ns || !iostr) return 1; if(ns->uri) uri_string=raptor_uri_as_counted_string_v2(ns->nstack->world, ns->uri, &uri_length); raptor_iostream_write_counted_string(iostr, "xmlns", 5); if(ns->prefix) { raptor_iostream_write_byte(iostr, ':'); raptor_iostream_write_string(iostr, ns->prefix); } raptor_iostream_write_counted_string(iostr, "=\"", 2); if(uri_length) raptor_iostream_write_counted_string(iostr, uri_string, uri_length); raptor_iostream_write_byte(iostr, '"'); return 0; } /** * raptor_new_namespace_parts_from_string: * @string: string to parse * @prefix: pointer to location to store namespace prefix * @uri_string: pointer to location to store namespace URI * * Parse a string containin an XML style namespace declaration * into a namespace prefix and URI. * * The string is of the form xmlns:prefix="uri", * xmlns="uri", xmlns:prefix="" or xmlns="". * The quotes can be single or double quotes. * * Two values are returned from this function into *@prefix and * *@uri_string neither of which may be NULL. * * See also raptor_namespaces_format() * * Return value: non-0 on failure. **/ int raptor_new_namespace_parts_from_string(const unsigned char *string, unsigned char **prefix, unsigned char **uri_string) { const unsigned char *t; unsigned char quote; if((!prefix || !uri_string)) return 1; if(!string || (string && !*string)) return 1; if(strncmp((const char*)string, "xmlns", 5)) return 1; *prefix=NULL; *uri_string=NULL; /* * Four cases are expected and handled: * xmlns="" * xmlns="uri" * xmlns:foo="" * xmlns:foo="uri" * * (with " or ' quotes) */ /* skip "xmlns" */ string+= 5; if (*string == ':') { /* non-empty prefix */ t= ++string; while(*string && *string != '=') string++; if(!*string || string == t) return 1; *prefix=(unsigned char*)RAPTOR_MALLOC(cstring, string-t+1); if(!*prefix) return 1; strncpy((char*)*prefix, (const char*)t, string-t); (*prefix)[string-t]='\0'; } if(*string++ != '=') return 1; if(*string != '"' && *string != '\'') return 1; quote=*string++; t=string; while(*string && *string != quote) string++; if(*string != quote) return 1; if(!(string-t)) /* xmlns...="" */ *uri_string=NULL; else { *uri_string=(unsigned char*)RAPTOR_MALLOC(cstring, string-t+1); if(!*uri_string) return 1; strncpy((char*)*uri_string, (const char*)t, string-t); (*uri_string)[string-t]='\0'; } return 0; } /** * raptor_namespaces_qname_from_uri: * @nstack: namespace stack * @uri: URI to use to make qname * @xml_version: XML Version * * Make an appropriate XML Qname from the namespaces on a namespace stack * * Makes a qname from the in-scope namespaces in a stack if the URI matches * the prefix and the rest is a legal XML name. * * Return value: #raptor_qname for the URI or NULL on failure **/ raptor_qname* raptor_namespaces_qname_from_uri(raptor_namespace_stack *nstack, raptor_uri *uri, int xml_version) { unsigned char *uri_string; size_t uri_len; raptor_namespace* ns = NULL; unsigned char *ns_uri_string; size_t ns_uri_len; unsigned char *name = NULL; int bucket; if(!uri) return NULL; uri_string = raptor_uri_as_counted_string_v2(nstack->world, uri, &uri_len); for(bucket = 0; bucket < nstack->table_size; bucket++) { for(ns = nstack->table[bucket]; ns ; ns = ns->next) { if(!ns->uri) continue; ns_uri_string = raptor_uri_as_counted_string_v2(nstack->world, ns->uri, &ns_uri_len); if(ns_uri_len >= uri_len) continue; if(strncmp((const char*)uri_string, (const char*)ns_uri_string, ns_uri_len)) continue; /* uri_string is a prefix of ns_uri_string */ name = uri_string + ns_uri_len; if(!raptor_xml_name_check(name, uri_len-ns_uri_len, xml_version)) name = NULL; /* If name is set, we've found a prefix with a legal XML name value */ if(name) break; } if(name) break; } if(!ns) return NULL; return raptor_new_qname_from_namespace_local_name_v2(nstack->world, ns, name, NULL); } #ifdef RAPTOR_DEBUG void raptor_namespace_print(FILE *stream, raptor_namespace* ns) { const unsigned char *uri_string; uri_string = raptor_uri_as_string_v2(ns->nstack->world, ns->uri); if(ns->prefix) fprintf(stream, "%s:%s", ns->prefix, uri_string); else fprintf(stream, "(default):%s", uri_string); } #endif raptor_namespace** raptor_namespace_stack_to_array(raptor_namespace_stack *nstack, size_t *size_p) { raptor_namespace** ns_list; size_t size = 0; int bucket; ns_list = (raptor_namespace**)RAPTOR_CALLOC(namespace_stack, nstack->size, sizeof(raptor_namespace*)); if(!ns_list) return NULL; for(bucket = 0; bucket < nstack->table_size; bucket++) { raptor_namespace* ns; for(ns = nstack->table[bucket]; ns; ns = ns->next) { int skip = 0; unsigned int i; if(ns->depth < 1) continue; for(i = 0; i < size; i++) { raptor_namespace* ns2 = ns_list[i]; if((!ns->prefix && !ns2->prefix) || (ns->prefix && ns2->prefix && !strcmp((const char*)ns->prefix, (const char*)ns2->prefix))) { /* this prefix was seen (overridden) earlier so skip */ skip = 1; break; } } if(!skip) ns_list[size++] = ns; } } if(size_p) *size_p = size; return ns_list; } #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); int main(int argc, char *argv[]) { raptor_world *world; const char *program=raptor_basename(argv[0]); raptor_namespace_stack namespaces; raptor_namespace* ns; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); raptor_namespaces_init_v2(world, &namespaces, NULL, NULL, 1); raptor_namespaces_start_namespace_full(&namespaces, (const unsigned char*)"ex1", (const unsigned char*)"http://example.org/ns1", 0); raptor_namespaces_start_namespace_full(&namespaces, (const unsigned char*)"ex2", (const unsigned char*)"http://example.org/ns2", 1); if(raptor_namespaces_find_namespace(&namespaces, NULL, 0)) { fprintf(stderr, "%s: Default namespace found when should not be found, returning error\n", program); return(1); } raptor_namespaces_start_namespace_full(&namespaces, NULL, (const unsigned char*)"http://example.org/ns3", 2); ns=raptor_namespaces_find_namespace(&namespaces, NULL, 0); if(!ns) { fprintf(stderr, "%s: Default namespace not found when should not be found, returning error\n", program); return(1); } ns=raptor_namespaces_find_namespace(&namespaces, (const unsigned char*)"ex2", 3); if(!ns) { fprintf(stderr, "%s: namespace ex2 not found when should not be found, returning error\n", program); return(1); } raptor_namespaces_end_for_depth(&namespaces, 2); raptor_namespaces_end_for_depth(&namespaces, 1); raptor_namespaces_end_for_depth(&namespaces, 0); raptor_namespaces_clear(&namespaces); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif /* * Local Variables: * mode:c * c-basic-offset: 2 * End: */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_www_curl.c�����������������������������������������������������������������0000644�0001750�0001750�00000013325�11330672502�014225� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www_curl.c - Raptor WWW retrieval via libcurl * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #ifdef RAPTOR_WWW_LIBCURL #include <stdio.h> #include <string.h> #include <stdarg.h> /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" static void raptor_www_curl_update_status(raptor_www* www) { char* final_uri; if(www->failed) return; if(www->checked_status++) return; if(curl_easy_getinfo(www->curl_handle, CURLINFO_EFFECTIVE_URL, &final_uri) == CURLE_OK) { www->final_uri=raptor_new_uri_v2(www->world, (const unsigned char*)final_uri); if(www->final_uri_handler) www->final_uri_handler(www, www->final_uri_userdata, www->final_uri); } } static size_t raptor_www_curl_write_callback(void *ptr, size_t size, size_t nmemb, void *userdata) { raptor_www* www=(raptor_www*)userdata; int bytes=size*nmemb; /* If WWW has been aborted, return nothing so that * libcurl will abort the transfer */ if(www->failed) return 0; raptor_www_curl_update_status(www); #if RAPTOR_DEBUG > 2 RAPTOR_DEBUG2("Got %d bytes\n", bytes); #endif if(www->write_bytes) www->write_bytes(www, www->write_bytes_userdata, ptr, size, nmemb); www->total_bytes += bytes; return bytes; } static size_t raptor_www_curl_header_callback(void* ptr, size_t size, size_t nmemb, void *userdata) { raptor_www* www=(raptor_www*)userdata; int bytes=size*nmemb; /* If WWW has been aborted, return nothing so that * libcurl will abort the transfer */ if(www->failed) return 0; if(!strncmp((char*)ptr, "Content-Type: ", 14)) { int len=bytes-16; char *type_buffer=(char*)RAPTOR_MALLOC(cstring, len+1); strncpy(type_buffer, (char*)ptr+14, len); type_buffer[len]='\0'; if(www->type) RAPTOR_FREE(cstring, www->type); www->type=type_buffer; www->free_type=1; #if RAPTOR_DEBUG > 2 RAPTOR_DEBUG3("Got content type '%s' (%d bytes)\n", type_buffer, len); #endif if(www->content_type) www->content_type(www, www->content_type_userdata, www->type); } return bytes; } void raptor_www_curl_init(raptor_www *www) { if(!www->curl_handle) { www->curl_handle=curl_easy_init(); www->curl_init_here=1; } #ifndef CURLOPT_WRITEDATA #define CURLOPT_WRITEDATA CURLOPT_FILE #endif /* send all data to this function */ curl_easy_setopt(www->curl_handle, CURLOPT_WRITEFUNCTION, raptor_www_curl_write_callback); /* ... using this data pointer */ curl_easy_setopt(www->curl_handle, CURLOPT_WRITEDATA, www); /* send all headers to this function */ curl_easy_setopt(www->curl_handle, CURLOPT_HEADERFUNCTION, raptor_www_curl_header_callback); /* ... using this data pointer */ curl_easy_setopt(www->curl_handle, CURLOPT_WRITEHEADER, www); /* Make it follow Location: headers */ curl_easy_setopt(www->curl_handle, CURLOPT_FOLLOWLOCATION, 1); #if RAPTOR_DEBUG > 2 curl_easy_setopt(www->curl_handle, CURLOPT_VERBOSE, (void*)1); #endif curl_easy_setopt(www->curl_handle, CURLOPT_ERRORBUFFER, www->error_buffer); /* Connection timeout in seconds */ curl_easy_setopt(www->curl_handle, CURLOPT_CONNECTTIMEOUT, www->connection_timeout); curl_easy_setopt(www->curl_handle, CURLOPT_NOSIGNAL, 1); } void raptor_www_curl_free(raptor_www *www) { /* only tidy up if we did all the work */ if(www->curl_init_here && www->curl_handle) { curl_easy_cleanup(www->curl_handle); www->curl_handle=NULL; } } int raptor_www_curl_fetch(raptor_www *www) { struct curl_slist *slist=NULL; if(www->proxy) curl_easy_setopt(www->curl_handle, CURLOPT_PROXY, www->proxy); if(www->user_agent) curl_easy_setopt(www->curl_handle, CURLOPT_USERAGENT, www->user_agent); if(www->http_accept) slist=curl_slist_append(slist, (const char*)www->http_accept); /* ALWAYS disable curl default "Pragma: no-cache" */ slist=curl_slist_append(slist, "Pragma:"); if(www->cache_control) slist=curl_slist_append(slist, (const char*)www->cache_control); if(slist) curl_easy_setopt(www->curl_handle, CURLOPT_HTTPHEADER, slist); /* specify URL to get */ curl_easy_setopt(www->curl_handle, CURLOPT_URL, raptor_uri_as_string_v2(www->world, www->uri)); if(curl_easy_perform(www->curl_handle)) { /* failed */ www->failed=1; raptor_www_error(www, "Resolving URI failed: %s", www->error_buffer); } else { long lstatus; #ifndef CURLINFO_RESPONSE_CODE #define CURLINFO_RESPONSE_CODE CURLINFO_HTTP_CODE #endif /* Requires pointer to a long */ if(curl_easy_getinfo(www->curl_handle, CURLINFO_RESPONSE_CODE, &lstatus) == CURLE_OK) www->status_code=lstatus; } if(slist) curl_slist_free_all(slist); return www->failed; } #endif /* RAPTOR_WWW_LIBCURL */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_www_libfetch.c�������������������������������������������������������������0000644�0001750�0001750�00000004360�11330672502�015037� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www_libfetch.c - Raptor WWW retrieval via libfetch * * Copyright (C) 2003-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #ifdef RAPTOR_WWW_LIBFETCH #include <stdio.h> #include <string.h> #include <stdarg.h> #include <errno.h> #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif #include <fetch.h> /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" void raptor_www_libfetch_init(raptor_www *www) { } void raptor_www_libfetch_free(raptor_www *www) { } int raptor_www_libfetch_fetch(raptor_www *www) { FILE *stream; if(www->proxy) { setenv("HTTP_PROXY", www->proxy, 0); setenv("FTP_PROXY", www->proxy, 0); } if(www->user_agent) setenv("HTTP_USER_AGENT", www->user_agent, 0); stream=fetchXGetURL((const char*)raptor_uri_as_string_v2(www->world, www->uri), NULL, NULL); if(!stream) { www->failed=1; raptor_www_error(www, "%s", fetchLastErrString); return 1; } /* fetch does not give us access to this */ www->status_code=200; while(!feof(stream)) { size_t len=fread(www->buffer, 1, RAPTOR_WWW_BUFFER_SIZE, stream); www->total_bytes += len; if(www->write_bytes) www->write_bytes(www, www->write_bytes_userdata, www->buffer, len, 1); if(len < RAPTOR_WWW_BUFFER_SIZE) break; } fclose(stream); return www->failed; } #endif /* RAPTOR_WWW_LIBFETCH */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/parsedate.c�����������������������������������������������������������������������0000644�0001750�0001750�00000247203�11330705007�012736� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse raptor_parsedate_parse #define yylex raptor_parsedate_lex #define yyerror raptor_parsedate_error #define yylval raptor_parsedate_lval #define yychar raptor_parsedate_char #define yydebug raptor_parsedate_debug #define yynerrs raptor_parsedate_nerrs /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ #line 1 "./parsedate.y" /* * Imported from * PHP CVS 1.56.2.2 * Fri May 20 07:14:01 2005 * http://cvs.php.net/php-src/ext/standard/parsedate.y * * and patched from there * * 1.59 removed this from PHP CVS and replaced it with entirely new * code written under the PHP license: * http://viewcvs.php.net/viewcvs.cgi/php-src/ext/date/lib/ * That code is not used here and cannot be used. * * The old version is now in the CVS Attic: * http://viewcvs.php.net/viewcvs.cgi/php-src/ext/standard/Attic/parsedate.y */ /* ** Originally written by Steven M. Bellovin <smb@research.att.com> while ** at the University of North Carolina at Chapel Hill. Later tweaked by ** a couple of people on Usenet. Completely overhauled by Rich $alz ** <rsalz@bbn.com> and Jim Berets <jberets@bbn.com> in August, 1990. ** ** This code is in the public domain and has no copyright. */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <sys/types.h> #include <time.h> #include <ctype.h> #ifdef HAVE_SYS_TIME_H # include <sys/time.h> #endif #if HAVE_STDLIB_H #include <stdlib.h> #endif #if defined(_HPUX_SOURCE) #include <alloca.h> #endif #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) # define IN_CTYPE_DOMAIN(c) 1 #else # define IN_CTYPE_DOMAIN(c) isascii(c) #endif #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) /* ISDIGIT differs from ISDIGIT_LOCALE, as follows: - Its arg may be any int or unsigned int; it need not be an unsigned char. - It's guaranteed to evaluate its argument exactly once. - It's typically faster. Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that only '0' through '9' are digits. Prefer ISDIGIT to ISDIGIT_LOCALE unless it's important to use the locale's definition of `digit' even when the host does not conform to Posix. */ #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9) #if defined (STDC_HEADERS) || defined (USG) # include <string.h> #endif #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(x) #endif #ifndef ATTRIBUTE_UNUSED # define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* Some old versions of bison generate parsers that use bcopy. That loses on systems that don't provide the function, so we have to redefine it here. */ #if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy) # define bcopy(from, to, len) memcpy ((to), (from), (len)) #endif /* Prototypes */ static int raptor_parsedate_error(const char *msg); time_t raptor_parse_date(const char *p, time_t *now); #define EPOCH 1970 #define HOUR(x) ((x) * 60) #define MAX_BUFF_LEN 128 /* size of buffer to read the date into */ /* ** An entry in the lexical lookup table. */ typedef struct _TABLE { const char *name; int type; int value; } TABLE; /* ** Meridian: am, pm, or 24-hour style. */ typedef enum _MERIDIAN { MERam, MERpm, MER24 } MERIDIAN; struct date_yy { const char *yyInput; int yyDayOrdinal; int yyDayNumber; int yyHaveDate; int yyHaveDay; int yyHaveRel; int yyHaveTime; int yyHaveZone; int yyTimezone; int yyDay; int yyHour; int yyMinutes; int yyMonth; int yySeconds; int yyYear; MERIDIAN yyMeridian; int yyRelDay; int yyRelHour; int yyRelMinutes; int yyRelMonth; int yyRelSeconds; int yyRelYear; }; typedef union _date_ll { int Number; enum _MERIDIAN Meridian; } date_ll; #define YYPARSE_PARAM parm #define YYLEX_PARAM parm #define YYSTYPE date_ll #define YYLTYPE void static int yylex (YYSTYPE *lvalp, void *parm); static int ToHour (int Hours, MERIDIAN Meridian); static int ToYear (int Year); static int LookupWord (YYSTYPE *lvalp, char *buff); /* Line 189 of yacc.c */ #line 246 "parsedate.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { tAGO = 258, tDAY = 259, tDAY_UNIT = 260, tDAYZONE = 261, tDST = 262, tHOUR_UNIT = 263, tID = 264, tTZONE = 265, tWZONE = 266, tZZONE = 267, tMERIDIAN = 268, tMINUTE_UNIT = 269, tMONTH = 270, tMONTH_UNIT = 271, tSEC_UNIT = 272, tSNUMBER = 273, tUNUMBER = 274, tYEAR_UNIT = 275, tZONE = 276 }; #endif /* Tokens. */ #define tAGO 258 #define tDAY 259 #define tDAY_UNIT 260 #define tDAYZONE 261 #define tDST 262 #define tHOUR_UNIT 263 #define tID 264 #define tTZONE 265 #define tWZONE 266 #define tZZONE 267 #define tMERIDIAN 268 #define tMINUTE_UNIT 269 #define tMONTH 270 #define tMONTH_UNIT 271 #define tSEC_UNIT 272 #define tSNUMBER 273 #define tUNUMBER 274 #define tYEAR_UNIT 275 #define tZONE 276 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ #line 329 "parsedate.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 110 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 26 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 22 /* YYNRULES -- Number of rules. */ #define YYNRULES 77 /* YYNRULES -- Number of states. */ #define YYNSTATES 100 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 276 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 24, 2, 22, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 23, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 7, 9, 11, 13, 15, 17, 19, 21, 24, 26, 30, 34, 38, 42, 44, 46, 48, 49, 52, 53, 55, 59, 63, 67, 69, 71, 73, 75, 77, 80, 82, 85, 88, 92, 101, 107, 109, 111, 115, 119, 122, 127, 130, 134, 138, 142, 146, 149, 152, 155, 159, 161, 165, 168, 170, 173, 176, 178, 181, 184, 186, 189, 192, 194, 197, 200, 202, 205, 208, 210, 213, 216, 218, 220 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 27, 0, -1, -1, 27, 28, -1, 29, -1, 37, -1, 39, -1, 38, -1, 44, -1, 46, -1, 47, -1, 19, 13, -1, 30, -1, 35, 32, 44, -1, 36, 32, 44, -1, 35, 32, 31, -1, 36, 32, 31, -1, 33, -1, 34, -1, 37, -1, -1, 22, 19, -1, -1, 18, -1, 18, 23, 19, -1, 36, 23, 19, -1, 19, 23, 19, -1, 10, -1, 11, -1, 12, -1, 21, -1, 6, -1, 21, 7, -1, 4, -1, 4, 24, -1, 19, 4, -1, 19, 25, 19, -1, 15, 19, 19, 23, 19, 23, 19, 19, -1, 19, 25, 19, 25, 19, -1, 41, -1, 40, -1, 19, 15, 18, -1, 15, 19, 19, -1, 15, 19, -1, 15, 19, 24, 19, -1, 19, 15, -1, 19, 15, 19, -1, 41, 10, 43, -1, 19, 10, 43, -1, 19, 18, 18, -1, 19, 18, -1, 19, 42, -1, 11, 19, -1, 11, 19, 18, -1, 30, -1, 19, 32, 31, -1, 45, 3, -1, 45, -1, 19, 20, -1, 18, 20, -1, 20, -1, 19, 16, -1, 18, 16, -1, 16, -1, 19, 5, -1, 18, 5, -1, 5, -1, 19, 8, -1, 18, 8, -1, 8, -1, 19, 14, -1, 18, 14, -1, 14, -1, 19, 17, -1, 18, 17, -1, 17, -1, 19, -1, 13, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 180, 180, 181, 184, 187, 190, 193, 196, 199, 200, 203, 209, 213, 216, 220, 223, 229, 232, 235, 238, 241, 243, 246, 256, 262, 268, 284, 287, 290, 293, 296, 299, 304, 308, 312, 318, 322, 333, 351, 352, 355, 361, 366, 374, 379, 387, 394, 395, 414, 420, 426, 438, 441, 447, 448, 473, 487, 490, 493, 496, 499, 502, 505, 508, 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 546, 581 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "tAGO", "tDAY", "tDAY_UNIT", "tDAYZONE", "tDST", "tHOUR_UNIT", "tID", "tTZONE", "tWZONE", "tZZONE", "tMERIDIAN", "tMINUTE_UNIT", "tMONTH", "tMONTH_UNIT", "tSEC_UNIT", "tSNUMBER", "tUNUMBER", "tYEAR_UNIT", "tZONE", "'.'", "':'", "','", "'/'", "$accept", "spec", "item", "time", "iso8601time_colon", "iso8601zonepart", "sec_fraction_part", "zonepart_numeric_without_colon", "zonepart_numeric_with_colon", "HMStime_with_colon", "HMtime_with_colon", "zone", "day", "date", "iso8601datetime", "iso8601date", "iso8601weekspec", "iso8601time", "rel", "relunit", "number", "o_merid", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 46, 58, 44, 47 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 26, 27, 27, 28, 28, 28, 28, 28, 28, 28, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 32, 32, 33, 34, 35, 36, 37, 37, 37, 37, 37, 37, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 41, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 47 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 3, 3, 3, 1, 1, 1, 0, 2, 0, 1, 3, 3, 3, 1, 1, 1, 1, 1, 2, 1, 2, 2, 3, 8, 5, 1, 1, 3, 3, 2, 4, 2, 3, 3, 3, 3, 2, 2, 2, 3, 1, 3, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 0, 1, 33, 66, 31, 69, 27, 28, 29, 77, 72, 0, 63, 75, 0, 76, 60, 30, 3, 4, 12, 22, 22, 5, 7, 6, 40, 39, 8, 57, 9, 10, 34, 43, 65, 68, 71, 62, 74, 59, 35, 64, 67, 0, 0, 11, 70, 45, 61, 73, 50, 58, 0, 0, 51, 32, 0, 20, 0, 20, 0, 56, 42, 0, 22, 54, 48, 52, 41, 46, 49, 26, 36, 21, 23, 0, 15, 17, 18, 19, 13, 25, 16, 14, 47, 0, 44, 20, 53, 0, 0, 0, 23, 55, 38, 24, 0, 0, 37 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 1, 19, 20, 66, 77, 58, 78, 79, 22, 23, 80, 25, 26, 27, 28, 55, 67, 29, 30, 31, 32 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -60 static const yytype_int8 yypact[] = { -60, 2, -60, -13, -60, -60, -60, -60, -60, -60, -60, -60, 13, -60, -60, 69, 20, -60, 32, -60, -60, -60, 29, 4, -60, -60, -60, -60, 44, -60, 58, -60, -60, -60, -15, -60, -60, -60, -60, -60, -60, -60, -60, -60, 46, 48, -60, -60, 28, -60, -60, 37, -60, 56, 57, -60, -60, 59, 52, 61, 52, 46, -60, 64, 62, 26, -60, -60, 66, -60, -60, -60, -60, 68, -60, 36, 74, -60, -60, -60, -60, -60, -60, -60, -60, -60, 76, -60, 86, -60, 80, 81, 78, 79, -60, -60, -60, 84, 87, -60 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -60, -60, -60, -60, 104, -59, -23, -60, -60, -60, -60, 107, -60, -60, -60, -60, -60, 49, -55, -60, -60, -60 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 60, 83, 2, 81, 63, 84, 3, 4, 5, 64, 6, 33, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 41, 42, 57, 59, 43, 94, 44, 45, 34, 46, 47, 48, 49, 50, 51, 56, 52, 35, 88, 53, 36, 54, 69, 70, 57, 53, 37, 57, 38, 39, 61, 71, 40, 4, 5, 91, 6, 62, 7, 8, 9, 65, 11, 68, 13, 14, 75, 76, 17, 18, 35, 72, 73, 36, 74, 42, 82, 87, 43, 37, 89, 38, 39, 86, 47, 40, 49, 50, 5, 90, 52, 92, 7, 8, 9, 95, 96, 97, 91, 98, 93, 21, 99, 18, 24, 0, 85 }; static const yytype_int8 yycheck[] = { 23, 60, 0, 58, 19, 60, 4, 5, 6, 24, 8, 24, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 4, 5, 22, 23, 8, 88, 10, 11, 19, 13, 14, 15, 16, 17, 18, 7, 20, 5, 65, 23, 8, 25, 18, 19, 22, 23, 14, 22, 16, 17, 10, 18, 20, 5, 6, 23, 8, 3, 10, 11, 12, 19, 14, 19, 16, 17, 18, 19, 20, 21, 5, 19, 19, 8, 19, 5, 19, 19, 8, 14, 18, 16, 17, 23, 14, 20, 16, 17, 6, 25, 20, 19, 10, 11, 12, 19, 19, 23, 23, 19, 18, 1, 19, 21, 1, -1, 61 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 27, 0, 4, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 28, 29, 30, 35, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 24, 19, 5, 8, 14, 16, 17, 20, 4, 5, 8, 10, 11, 13, 14, 15, 16, 17, 18, 20, 23, 25, 42, 7, 22, 32, 23, 32, 10, 3, 19, 24, 19, 30, 43, 19, 18, 19, 18, 19, 19, 19, 18, 19, 31, 33, 34, 37, 44, 19, 31, 44, 43, 23, 19, 32, 18, 25, 23, 19, 18, 31, 19, 19, 23, 19, 19 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) #else # define YYLEX yylex (&yylval) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /*-------------------------. | yyparse or yypush_parse. | `-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 4: /* Line 1455 of yacc.c */ #line 184 "./parsedate.y" { ((struct date_yy *)parm)->yyHaveTime++; } break; case 5: /* Line 1455 of yacc.c */ #line 187 "./parsedate.y" { ((struct date_yy *)parm)->yyHaveZone++; } break; case 6: /* Line 1455 of yacc.c */ #line 190 "./parsedate.y" { ((struct date_yy *)parm)->yyHaveDate++; } break; case 7: /* Line 1455 of yacc.c */ #line 193 "./parsedate.y" { ((struct date_yy *)parm)->yyHaveDay++; } break; case 8: /* Line 1455 of yacc.c */ #line 196 "./parsedate.y" { ((struct date_yy *)parm)->yyHaveRel++; } break; case 11: /* Line 1455 of yacc.c */ #line 203 "./parsedate.y" { ((struct date_yy *)parm)->yyHour = (yyvsp[(1) - (2)].Number); ((struct date_yy *)parm)->yyMinutes = 0; ((struct date_yy *)parm)->yySeconds = 0; ((struct date_yy *)parm)->yyMeridian = (yyvsp[(2) - (2)].Meridian); } break; case 13: /* Line 1455 of yacc.c */ #line 213 "./parsedate.y" { ((struct date_yy *)parm)->yyMeridian = MER24; } break; case 14: /* Line 1455 of yacc.c */ #line 216 "./parsedate.y" { ((struct date_yy *)parm)->yyMeridian = MER24; ((struct date_yy *)parm)->yySeconds = 0; } break; case 15: /* Line 1455 of yacc.c */ #line 220 "./parsedate.y" { ((struct date_yy *)parm)->yyMeridian = MER24; } break; case 16: /* Line 1455 of yacc.c */ #line 223 "./parsedate.y" { ((struct date_yy *)parm)->yyMeridian = MER24; ((struct date_yy *)parm)->yySeconds = 0; } break; case 17: /* Line 1455 of yacc.c */ #line 229 "./parsedate.y" { ((struct date_yy *)parm)->yyHaveZone++; } break; case 18: /* Line 1455 of yacc.c */ #line 232 "./parsedate.y" { ((struct date_yy *)parm)->yyHaveZone++; } break; case 19: /* Line 1455 of yacc.c */ #line 235 "./parsedate.y" { ((struct date_yy *)parm)->yyHaveZone++; } break; case 21: /* Line 1455 of yacc.c */ #line 241 "./parsedate.y" { } break; case 23: /* Line 1455 of yacc.c */ #line 246 "./parsedate.y" { /* format: [+-]hhmm */ if ((yyvsp[(1) - (1)].Number) <= -100 || (yyvsp[(1) - (1)].Number) >= 100) { ((struct date_yy *)parm)->yyTimezone = (-(yyvsp[(1) - (1)].Number) / 100) * 60 + (-(yyvsp[(1) - (1)].Number) % 100); } else if ((yyvsp[(1) - (1)].Number) >= -99 || (yyvsp[(1) - (1)].Number) <= 99) { ((struct date_yy *)parm)->yyTimezone = -(yyvsp[(1) - (1)].Number) * 60; } } break; case 24: /* Line 1455 of yacc.c */ #line 256 "./parsedate.y" { /* format: [+-]hh:mm */ ((struct date_yy *)parm)->yyTimezone = -(yyvsp[(1) - (3)].Number) * 60 + ((yyvsp[(1) - (3)].Number) > 0 ? -(yyvsp[(3) - (3)].Number): (yyvsp[(3) - (3)].Number)); } break; case 25: /* Line 1455 of yacc.c */ #line 262 "./parsedate.y" { /* format: hh:mm:ss */ ((struct date_yy *)parm)->yySeconds = (yyvsp[(3) - (3)].Number); } break; case 26: /* Line 1455 of yacc.c */ #line 268 "./parsedate.y" { /* format: hh:mm */ ((struct date_yy *)parm)->yyHour = (yyvsp[(1) - (3)].Number); ((struct date_yy *)parm)->yyMinutes = (yyvsp[(3) - (3)].Number); } break; case 27: /* Line 1455 of yacc.c */ #line 284 "./parsedate.y" { ((struct date_yy *)parm)->yyTimezone = (yyvsp[(1) - (1)].Number); } break; case 28: /* Line 1455 of yacc.c */ #line 287 "./parsedate.y" { ((struct date_yy *)parm)->yyTimezone = (yyvsp[(1) - (1)].Number); } break; case 29: /* Line 1455 of yacc.c */ #line 290 "./parsedate.y" { ((struct date_yy *)parm)->yyTimezone = (yyvsp[(1) - (1)].Number); } break; case 30: /* Line 1455 of yacc.c */ #line 293 "./parsedate.y" { ((struct date_yy *)parm)->yyTimezone = (yyvsp[(1) - (1)].Number); } break; case 31: /* Line 1455 of yacc.c */ #line 296 "./parsedate.y" { ((struct date_yy *)parm)->yyTimezone = (yyvsp[(1) - (1)].Number) - 60; } break; case 32: /* Line 1455 of yacc.c */ #line 299 "./parsedate.y" { ((struct date_yy *)parm)->yyTimezone = (yyvsp[(1) - (2)].Number) - 60; } break; case 33: /* Line 1455 of yacc.c */ #line 304 "./parsedate.y" { ((struct date_yy *)parm)->yyDayOrdinal = 1; ((struct date_yy *)parm)->yyDayNumber = (yyvsp[(1) - (1)].Number); } break; case 34: /* Line 1455 of yacc.c */ #line 308 "./parsedate.y" { ((struct date_yy *)parm)->yyDayOrdinal = 1; ((struct date_yy *)parm)->yyDayNumber = (yyvsp[(1) - (2)].Number); } break; case 35: /* Line 1455 of yacc.c */ #line 312 "./parsedate.y" { ((struct date_yy *)parm)->yyDayOrdinal = (yyvsp[(1) - (2)].Number); ((struct date_yy *)parm)->yyDayNumber = (yyvsp[(2) - (2)].Number); } break; case 36: /* Line 1455 of yacc.c */ #line 318 "./parsedate.y" { ((struct date_yy *)parm)->yyMonth = (yyvsp[(1) - (3)].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[(3) - (3)].Number); } break; case 37: /* Line 1455 of yacc.c */ #line 322 "./parsedate.y" { ((struct date_yy *)parm)->yyYear = (yyvsp[(8) - (8)].Number); ((struct date_yy *)parm)->yyMonth = (yyvsp[(1) - (8)].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[(2) - (8)].Number); ((struct date_yy *)parm)->yyHour = (yyvsp[(3) - (8)].Number); ((struct date_yy *)parm)->yyMinutes = (yyvsp[(5) - (8)].Number); ((struct date_yy *)parm)->yySeconds = (yyvsp[(7) - (8)].Number); ((struct date_yy *)parm)->yyHaveTime = 1; } break; case 38: /* Line 1455 of yacc.c */ #line 333 "./parsedate.y" { /* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY. The goal in recognizing YYYY/MM/DD is solely to support legacy machine-generated dates like those in an RCS log listing. If you want portability, use the ISO 8601 format. */ if ((yyvsp[(1) - (5)].Number) >= 1000) { ((struct date_yy *)parm)->yyYear = (yyvsp[(1) - (5)].Number); ((struct date_yy *)parm)->yyMonth = (yyvsp[(3) - (5)].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[(5) - (5)].Number); } else { ((struct date_yy *)parm)->yyMonth = (yyvsp[(1) - (5)].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[(3) - (5)].Number); ((struct date_yy *)parm)->yyYear = (yyvsp[(5) - (5)].Number); } } break; case 40: /* Line 1455 of yacc.c */ #line 352 "./parsedate.y" { ((struct date_yy *)parm)->yyHaveTime++; } break; case 41: /* Line 1455 of yacc.c */ #line 355 "./parsedate.y" { /* e.g. 17-JUN-1992. */ ((struct date_yy *)parm)->yyDay = (yyvsp[(1) - (3)].Number); ((struct date_yy *)parm)->yyMonth = (yyvsp[(2) - (3)].Number); ((struct date_yy *)parm)->yyYear = -(yyvsp[(3) - (3)].Number); } break; case 42: /* Line 1455 of yacc.c */ #line 361 "./parsedate.y" { ((struct date_yy *)parm)->yyMonth = (yyvsp[(1) - (3)].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[(2) - (3)].Number); ((struct date_yy *)parm)->yyYear = (yyvsp[(3) - (3)].Number); } break; case 43: /* Line 1455 of yacc.c */ #line 366 "./parsedate.y" { ((struct date_yy *)parm)->yyMonth = (yyvsp[(1) - (2)].Number); if ((yyvsp[(2) - (2)].Number) > 1000) { ((struct date_yy *)parm)->yyYear = (yyvsp[(2) - (2)].Number); } else { ((struct date_yy *)parm)->yyDay = (yyvsp[(2) - (2)].Number); } } break; case 44: /* Line 1455 of yacc.c */ #line 374 "./parsedate.y" { ((struct date_yy *)parm)->yyMonth = (yyvsp[(1) - (4)].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[(2) - (4)].Number); ((struct date_yy *)parm)->yyYear = (yyvsp[(4) - (4)].Number); } break; case 45: /* Line 1455 of yacc.c */ #line 379 "./parsedate.y" { ((struct date_yy *)parm)->yyMonth = (yyvsp[(2) - (2)].Number); if ((yyvsp[(1) - (2)].Number) > 1000) { ((struct date_yy *)parm)->yyYear = (yyvsp[(1) - (2)].Number); } else { ((struct date_yy *)parm)->yyDay = (yyvsp[(1) - (2)].Number); } } break; case 46: /* Line 1455 of yacc.c */ #line 387 "./parsedate.y" { ((struct date_yy *)parm)->yyMonth = (yyvsp[(2) - (3)].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[(1) - (3)].Number); ((struct date_yy *)parm)->yyYear = (yyvsp[(3) - (3)].Number); } break; case 48: /* Line 1455 of yacc.c */ #line 395 "./parsedate.y" { int i = (yyvsp[(1) - (3)].Number); if (i >= 10000) { /* format: yyyymmdd */ ((struct date_yy *)parm)->yyYear = i / 10000; i %= 10000; ((struct date_yy *)parm)->yyMonth = i / 100; i %= 100; ((struct date_yy *)parm)->yyDay = i; } else if (i >= 1000 && i <= 9999) { /* format: yyyy */ ((struct date_yy *)parm)->yyYear = i; ((struct date_yy *)parm)->yyDay= 1; ((struct date_yy *)parm)->yyMonth = 1; } } break; case 49: /* Line 1455 of yacc.c */ #line 414 "./parsedate.y" { /* ISO 8601 format. yyyy-mm-dd. */ ((struct date_yy *)parm)->yyYear = (yyvsp[(1) - (3)].Number); ((struct date_yy *)parm)->yyMonth = -(yyvsp[(2) - (3)].Number); ((struct date_yy *)parm)->yyDay = -(yyvsp[(3) - (3)].Number); } break; case 50: /* Line 1455 of yacc.c */ #line 420 "./parsedate.y" { /* ISO 8601 format yyyy-mm */ ((struct date_yy *)parm)->yyYear = (yyvsp[(1) - (2)].Number); ((struct date_yy *)parm)->yyMonth = -(yyvsp[(2) - (2)].Number); ((struct date_yy *)parm)->yyDay = 1; } break; case 51: /* Line 1455 of yacc.c */ #line 426 "./parsedate.y" { const int om = (1 + 9) % 12; /* offset month */ const int oy = (yyvsp[(1) - (2)].Number) - 1; /* offset year */ ((struct date_yy *)parm)->yyYear = (yyvsp[(1) - (2)].Number); ((struct date_yy *)parm)->yyMonth = 1; /* Zeller's formula */ ((struct date_yy *)parm)->yyDay -= ((13 * om + 12) / 5 + oy + oy / 4 + oy / 400 - oy / 100) % 7 - 1; } break; case 52: /* Line 1455 of yacc.c */ #line 438 "./parsedate.y" { ((struct date_yy *)parm)->yyDay = ((yyvsp[(2) - (2)].Number) / 10) * 7 + ((yyvsp[(2) - (2)].Number) % 10) - 8; } break; case 53: /* Line 1455 of yacc.c */ #line 441 "./parsedate.y" { ((struct date_yy *)parm)->yyDay = (yyvsp[(2) - (3)].Number) * 7 - (yyvsp[(3) - (3)].Number) - 8; } break; case 55: /* Line 1455 of yacc.c */ #line 448 "./parsedate.y" { int i = (yyvsp[(1) - (3)].Number); if (i <= -100000 || i >= 100000) { ((struct date_yy *)parm)->yyHour = i / 10000; i %= 10000; ((struct date_yy *)parm)->yyMinutes = i / 100; i %= 100; ((struct date_yy *)parm)->yySeconds = i; } else if (i <= -1000 || i >= 1000) { ((struct date_yy *)parm)->yyHour = i / 100; i %= 100; ((struct date_yy *)parm)->yyMinutes = i; ((struct date_yy *)parm)->yySeconds = 0; } else if (i >= -99 || i <= 99) { ((struct date_yy *)parm)->yyHour = (yyvsp[(1) - (3)].Number); ((struct date_yy *)parm)->yyMinutes = 0; ((struct date_yy *)parm)->yySeconds = 0; } else { ((struct date_yy *)parm)->yyHaveTime = 0; } ((struct date_yy *)parm)->yyMeridian = MER24; } break; case 56: /* Line 1455 of yacc.c */ #line 473 "./parsedate.y" { ((struct date_yy *)parm)->yyRelSeconds = -((struct date_yy *)parm)->yyRelSeconds; ((struct date_yy *)parm)->yyRelMinutes = -((struct date_yy *)parm)->yyRelMinutes; ((struct date_yy *)parm)->yyRelHour = -((struct date_yy *)parm)->yyRelHour; ((struct date_yy *)parm)->yyRelDay = -((struct date_yy *)parm)->yyRelDay; ((struct date_yy *)parm)->yyRelMonth = -((struct date_yy *)parm)->yyRelMonth; ((struct date_yy *)parm)->yyRelYear = -((struct date_yy *)parm)->yyRelYear; } break; case 58: /* Line 1455 of yacc.c */ #line 490 "./parsedate.y" { ((struct date_yy *)parm)->yyRelYear += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 59: /* Line 1455 of yacc.c */ #line 493 "./parsedate.y" { ((struct date_yy *)parm)->yyRelYear += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 60: /* Line 1455 of yacc.c */ #line 496 "./parsedate.y" { ((struct date_yy *)parm)->yyRelYear += (yyvsp[(1) - (1)].Number); } break; case 61: /* Line 1455 of yacc.c */ #line 499 "./parsedate.y" { ((struct date_yy *)parm)->yyRelMonth += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 62: /* Line 1455 of yacc.c */ #line 502 "./parsedate.y" { ((struct date_yy *)parm)->yyRelMonth += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 63: /* Line 1455 of yacc.c */ #line 505 "./parsedate.y" { ((struct date_yy *)parm)->yyRelMonth += (yyvsp[(1) - (1)].Number); } break; case 64: /* Line 1455 of yacc.c */ #line 508 "./parsedate.y" { ((struct date_yy *)parm)->yyRelDay += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 65: /* Line 1455 of yacc.c */ #line 511 "./parsedate.y" { ((struct date_yy *)parm)->yyRelDay += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 66: /* Line 1455 of yacc.c */ #line 514 "./parsedate.y" { ((struct date_yy *)parm)->yyRelDay += (yyvsp[(1) - (1)].Number); } break; case 67: /* Line 1455 of yacc.c */ #line 517 "./parsedate.y" { ((struct date_yy *)parm)->yyRelHour += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 68: /* Line 1455 of yacc.c */ #line 520 "./parsedate.y" { ((struct date_yy *)parm)->yyRelHour += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 69: /* Line 1455 of yacc.c */ #line 523 "./parsedate.y" { ((struct date_yy *)parm)->yyRelHour += (yyvsp[(1) - (1)].Number); } break; case 70: /* Line 1455 of yacc.c */ #line 526 "./parsedate.y" { ((struct date_yy *)parm)->yyRelMinutes += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 71: /* Line 1455 of yacc.c */ #line 529 "./parsedate.y" { ((struct date_yy *)parm)->yyRelMinutes += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 72: /* Line 1455 of yacc.c */ #line 532 "./parsedate.y" { ((struct date_yy *)parm)->yyRelMinutes += (yyvsp[(1) - (1)].Number); } break; case 73: /* Line 1455 of yacc.c */ #line 535 "./parsedate.y" { ((struct date_yy *)parm)->yyRelSeconds += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 74: /* Line 1455 of yacc.c */ #line 538 "./parsedate.y" { ((struct date_yy *)parm)->yyRelSeconds += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); } break; case 75: /* Line 1455 of yacc.c */ #line 541 "./parsedate.y" { ((struct date_yy *)parm)->yyRelSeconds += (yyvsp[(1) - (1)].Number); } break; case 76: /* Line 1455 of yacc.c */ #line 547 "./parsedate.y" { if (((struct date_yy *)parm)->yyHaveTime && ((struct date_yy *)parm)->yyHaveDate && !((struct date_yy *)parm)->yyHaveRel) ((struct date_yy *)parm)->yyYear = (yyvsp[(1) - (1)].Number); else { if ((yyvsp[(1) - (1)].Number)>10000) { ((struct date_yy *)parm)->yyHaveDate++; ((struct date_yy *)parm)->yyDay= ((yyvsp[(1) - (1)].Number))%100; ((struct date_yy *)parm)->yyMonth= ((yyvsp[(1) - (1)].Number)/100)%100; ((struct date_yy *)parm)->yyYear = (yyvsp[(1) - (1)].Number)/10000; } else { ((struct date_yy *)parm)->yyHaveTime++; if ((yyvsp[(1) - (1)].Number) < 100) { ((struct date_yy *)parm)->yyHour = (yyvsp[(1) - (1)].Number); ((struct date_yy *)parm)->yyMinutes = 0; } else { ((struct date_yy *)parm)->yyHour = (yyvsp[(1) - (1)].Number) / 100; ((struct date_yy *)parm)->yyMinutes = (yyvsp[(1) - (1)].Number) % 100; } ((struct date_yy *)parm)->yySeconds = 0; ((struct date_yy *)parm)->yyMeridian = MER24; } } } break; case 77: /* Line 1455 of yacc.c */ #line 582 "./parsedate.y" { ((struct date_yy *)parm)->yyMeridian = (yyvsp[(1) - (1)].Meridian); } break; /* Line 1455 of yacc.c */ #line 2350 "parsedate.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 1675 of yacc.c */ #line 587 "./parsedate.y" time_t get_date (char *p, time_t *now); /* Month and day table. */ static TABLE const MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, { "april", tMONTH, 4 }, { "may", tMONTH, 5 }, { "june", tMONTH, 6 }, { "july", tMONTH, 7 }, { "august", tMONTH, 8 }, { "september", tMONTH, 9 }, { "sept", tMONTH, 9 }, { "october", tMONTH, 10 }, { "november", tMONTH, 11 }, { "december", tMONTH, 12 }, { "sunday", tDAY, 0 }, { "monday", tDAY, 1 }, { "tuesday", tDAY, 2 }, { "tues", tDAY, 2 }, { "wednesday", tDAY, 3 }, { "wednes", tDAY, 3 }, { "thursday", tDAY, 4 }, { "thur", tDAY, 4 }, { "thurs", tDAY, 4 }, { "friday", tDAY, 5 }, { "saturday", tDAY, 6 }, { NULL, 0, 0 } }; /* Time units table. */ static TABLE const UnitsTable[] = { { "year", tYEAR_UNIT, 1 }, { "month", tMONTH_UNIT, 1 }, { "fortnight", tDAY_UNIT, 14 }, { "week", tDAY_UNIT, 7 }, { "day", tDAY_UNIT, 1 }, { "hour", tHOUR_UNIT, 1 }, { "minute", tMINUTE_UNIT, 1 }, { "min", tMINUTE_UNIT, 1 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, { NULL, 0, 0 } }; /* Assorted relative-time words. */ static TABLE const OtherTable[] = { { "tomorrow", tDAY_UNIT, 1 }, { "yesterday", tDAY_UNIT, -1 }, { "today", tDAY_UNIT, 0 }, { "now", tDAY_UNIT, 0 }, { "last", tUNUMBER, -1 }, { "this", tUNUMBER, 0 }, { "next", tUNUMBER, 1 }, { "first", tUNUMBER, 1 }, /* { "second", tUNUMBER, 2 }, */ { "third", tUNUMBER, 3 }, { "fourth", tUNUMBER, 4 }, { "fifth", tUNUMBER, 5 }, { "sixth", tUNUMBER, 6 }, { "seventh", tUNUMBER, 7 }, { "eighth", tUNUMBER, 8 }, { "ninth", tUNUMBER, 9 }, { "tenth", tUNUMBER, 10 }, { "eleventh", tUNUMBER, 11 }, { "twelfth", tUNUMBER, 12 }, { "ago", tAGO, 1 }, { NULL, 0, 0 } }; /* The timezone table. */ static TABLE const TimezoneTable[] = { { "gmt", tZONE, HOUR ( 0) }, /* Greenwich Mean */ { "ut", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ { "utc", tZONE, HOUR ( 0) }, { "wet", tZONE, HOUR ( 0) }, /* Western European */ { "bst", tDAYZONE, HOUR ( 0) }, /* British Summer */ { "wat", tZONE, HOUR ( 1) }, /* West Africa */ { "at", tZONE, HOUR ( 2) }, /* Azores */ #if 0 /* For completeness. BST is also British Summer, and GST is * also Guam Standard. */ { "bst", tZONE, HOUR ( 3) }, /* Brazil Standard */ { "gst", tZONE, HOUR ( 3) }, /* Greenland Standard */ #endif #if 0 { "nft", tZONE, HOUR (3.5) }, /* Newfoundland */ { "nst", tZONE, HOUR (3.5) }, /* Newfoundland Standard */ { "ndt", tDAYZONE, HOUR (3.5) }, /* Newfoundland Daylight */ #endif { "ast", tZONE, HOUR ( 4) }, /* Atlantic Standard */ { "adt", tDAYZONE, HOUR ( 4) }, /* Atlantic Daylight */ { "est", tZONE, HOUR ( 5) }, /* Eastern Standard */ { "edt", tDAYZONE, HOUR ( 5) }, /* Eastern Daylight */ { "cst", tZONE, HOUR ( 6) }, /* Central Standard */ { "cdt", tDAYZONE, HOUR ( 6) }, /* Central Daylight */ { "mst", tZONE, HOUR ( 7) }, /* Mountain Standard */ { "mdt", tDAYZONE, HOUR ( 7) }, /* Mountain Daylight */ { "pst", tZONE, HOUR ( 8) }, /* Pacific Standard */ { "pdt", tDAYZONE, HOUR ( 8) }, /* Pacific Daylight */ { "yst", tZONE, HOUR ( 9) }, /* Yukon Standard */ { "ydt", tDAYZONE, HOUR ( 9) }, /* Yukon Daylight */ { "hst", tZONE, HOUR (10) }, /* Hawaii Standard */ { "hdt", tDAYZONE, HOUR (10) }, /* Hawaii Daylight */ { "cat", tZONE, HOUR (10) }, /* Central Alaska */ { "akst", tZONE, HOUR (10) }, /* Alaska Standard */ { "akdt", tZONE, HOUR (10) }, /* Alaska Daylight */ { "ahst", tZONE, HOUR (10) }, /* Alaska-Hawaii Standard */ { "nt", tZONE, HOUR (11) }, /* Nome */ { "idlw", tZONE, HOUR (12) }, /* International Date Line West */ { "cet", tZONE, -HOUR (1) }, /* Central European */ { "cest", tDAYZONE, -HOUR (1) }, /* Central European Summer */ { "met", tZONE, -HOUR (1) }, /* Middle European */ { "mewt", tZONE, -HOUR (1) }, /* Middle European Winter */ { "mest", tDAYZONE, -HOUR (1) }, /* Middle European Summer */ { "mesz", tDAYZONE, -HOUR (1) }, /* Middle European Summer */ { "swt", tZONE, -HOUR (1) }, /* Swedish Winter */ { "sst", tDAYZONE, -HOUR (1) }, /* Swedish Summer */ { "fwt", tZONE, -HOUR (1) }, /* French Winter */ { "fst", tDAYZONE, -HOUR (1) }, /* French Summer */ { "eet", tZONE, -HOUR (2) }, /* Eastern Europe, USSR Zone 1 */ { "bt", tZONE, -HOUR (3) }, /* Baghdad, USSR Zone 2 */ #if 0 { "it", tZONE, -HOUR (3.5) },/* Iran */ #endif { "zp4", tZONE, -HOUR (4) }, /* USSR Zone 3 */ { "zp5", tZONE, -HOUR (5) }, /* USSR Zone 4 */ #if 0 { "ist", tZONE, -HOUR (5.5) },/* Indian Standard */ #endif { "zp6", tZONE, -HOUR (6) }, /* USSR Zone 5 */ #if 0 /* For completeness. NST is also Newfoundland Standard, and SST is * also Swedish Summer. */ { "nst", tZONE, -HOUR (6.5) },/* North Sumatra */ { "sst", tZONE, -HOUR (7) }, /* South Sumatra, USSR Zone 6 */ #endif /* 0 */ { "wast", tZONE, -HOUR (7) }, /* West Australian Standard */ { "wadt", tDAYZONE, -HOUR (7) }, /* West Australian Daylight */ #if 0 { "jt", tZONE, -HOUR (7.5) },/* Java (3pm in Cronusland!) */ #endif { "cct", tZONE, -HOUR (8) }, /* China Coast, USSR Zone 7 */ { "jst", tZONE, -HOUR (9) }, /* Japan Standard, USSR Zone 8 */ #if 0 { "cast", tZONE, -HOUR (9.5) },/* Central Australian Standard */ { "cadt", tDAYZONE, -HOUR (9.5) },/* Central Australian Daylight */ #endif { "east", tZONE, -HOUR (10) }, /* Eastern Australian Standard */ { "eadt", tDAYZONE, -HOUR (10) }, /* Eastern Australian Daylight */ { "gst", tZONE, -HOUR (10) }, /* Guam Standard, USSR Zone 9 */ { "nzt", tZONE, -HOUR (12) }, /* New Zealand */ { "nzst", tZONE, -HOUR (12) }, /* New Zealand Standard */ { "nzdt", tDAYZONE, -HOUR (12) }, /* New Zealand Daylight */ { "idle", tZONE, -HOUR (12) }, /* International Date Line East */ { NULL, 0, 0 } }; /* Military timezone table. */ static TABLE const MilitaryTable[] = { { "a", tZONE, HOUR (- 1) }, { "b", tZONE, HOUR (- 2) }, { "c", tZONE, HOUR (- 3) }, { "d", tZONE, HOUR (- 4) }, { "e", tZONE, HOUR (- 5) }, { "f", tZONE, HOUR (- 6) }, { "g", tZONE, HOUR (- 7) }, { "h", tZONE, HOUR (- 8) }, { "i", tZONE, HOUR (- 9) }, { "k", tZONE, HOUR (-10) }, { "l", tZONE, HOUR (-11) }, { "m", tZONE, HOUR (-12) }, { "n", tZONE, HOUR ( 1) }, { "o", tZONE, HOUR ( 2) }, { "p", tZONE, HOUR ( 3) }, { "q", tZONE, HOUR ( 4) }, { "r", tZONE, HOUR ( 5) }, { "s", tZONE, HOUR ( 6) }, { "t", tTZONE, HOUR ( 7) }, { "u", tZONE, HOUR ( 8) }, { "v", tZONE, HOUR ( 9) }, { "w", tWZONE, HOUR ( 10) }, { "x", tZONE, HOUR ( 11) }, { "y", tZONE, HOUR ( 12) }, { "z", tZZONE, HOUR ( 0) }, { NULL, 0, 0 } }; /* ARGSUSED */ static int yyerror(const char *s) { return 0; } static int ToHour(int Hours, MERIDIAN Meridian) { switch (Meridian) { case MER24: if (Hours < 0 || Hours > 23) return -1; return Hours; case MERam: if (Hours < 1 || Hours > 12) return -1; if (Hours == 12) Hours = 0; return Hours; case MERpm: if (Hours < 1 || Hours > 12) return -1; if (Hours == 12) Hours = 0; return Hours + 12; default: #ifdef RAPTOR_DEBUG fprintf(stderr, "%s:%d:%s: UNKNOWN Meridian %d - add a new case", __FILE__, __LINE__, __func__, (int)Meridian); #endif return -1; } /* NOTREACHED */ } static int ToYear(int Year) { if (Year < 0) Year = -Year; /* XPG4 suggests that years 00-68 map to 2000-2068, and years 69-99 map to 1969-1999. */ if (Year < 69) Year += 2000; else if (Year < 100) Year += 1900; return Year; } static int LookupWord (YYSTYPE *lvalp, char *buff) { char *p; char *q; const TABLE *tp; int i; int abbrev; /* Make it lowercase. */ for (p = buff; *p; p++) if (ISUPPER ((unsigned char) *p)) *p = tolower (*p); if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0) { lvalp->Meridian = MERam; return tMERIDIAN; } if (strcmp (buff, "pm") == 0 || strcmp (buff, "p.m.") == 0) { lvalp->Meridian = MERpm; return tMERIDIAN; } /* See if we have an abbreviation for a month. */ if (strlen (buff) == 3) abbrev = 1; else if (strlen (buff) == 4 && buff[3] == '.') { abbrev = 1; buff[3] = '\0'; } else abbrev = 0; for (tp = MonthDayTable; tp->name; tp++) { if (abbrev) { if (strncmp (buff, tp->name, 3) == 0) { lvalp->Number = tp->value; return tp->type; } } else if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } } for (tp = TimezoneTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } if (strcmp (buff, "dst") == 0) return tDST; for (tp = UnitsTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } /* Strip off any plural and try the units table again. */ i = strlen (buff) - 1; if (buff[i] == 's') { buff[i] = '\0'; for (tp = UnitsTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } buff[i] = 's'; /* Put back for "this" in OtherTable. */ } for (tp = OtherTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } /* Military timezones. */ if (buff[1] == '\0' && ISALPHA ((unsigned char) *buff)) { for (tp = MilitaryTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } } /* Drop out any periods and try the timezone table again. */ for (i = 0, p = q = buff; *q; q++) if (*q != '.') *p++ = *q; else i++; *p = '\0'; if (i) for (tp = TimezoneTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } return tID; } int yylex(YYSTYPE *lvalp, void *parm) { unsigned char c; char *p; char buff[20]; int Count; int sign; struct date_yy * date = (struct date_yy *)parm; for (;;) { while (ISSPACE ((unsigned char) *date->yyInput)) date->yyInput++; if (ISDIGIT (c = *date->yyInput) || c == '-' || c == '+') { if (c == '-' || c == '+') { sign = c == '-' ? -1 : 1; if (!ISDIGIT (*++date->yyInput)) /* skip the '-' sign */ continue; } else sign = 0; for (lvalp->Number = 0; ISDIGIT (c = *date->yyInput++);) lvalp->Number = 10 * lvalp->Number + c - '0'; date->yyInput--; if (sign < 0) lvalp->Number = -lvalp->Number; /* Ignore ordinal suffixes on numbers */ c = *date->yyInput; if (c == 's' || c == 'n' || c == 'r' || c == 't') { c = *++date->yyInput; if (c == 't' || c == 'd' || c == 'h') { date->yyInput++; } else { date->yyInput--; } } return sign ? tSNUMBER : tUNUMBER; } if (ISALPHA (c)) { for (p = buff; (c = *date->yyInput++, ISALPHA (c)) || c == '.';) if (p < &buff[sizeof buff - 1]) *p++ = c; *p = '\0'; date->yyInput--; return LookupWord (lvalp, buff); } if (c != '(') return *date->yyInput++; Count = 0; do { c = *date->yyInput++; if (c == '\0') return c; if (c == '(') Count++; else if (c == ')') Count--; } while (Count > 0); } } #define TM_YEAR_ORIGIN 1900 /* Yield A - B, measured in seconds. */ static long difftm (struct tm *a, struct tm *b) { int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); int by = b->tm_year + (TM_YEAR_ORIGIN - 1); long days = ( /* difference in day of year */ a->tm_yday - b->tm_yday /* + intervening leap days */ + ((ay >> 2) - (by >> 2)) - (ay / 100 - by / 100) + ((ay / 100 >> 2) - (by / 100 >> 2)) /* + difference in years * 365 */ + (long) (ay - by) * 365 ); return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + (a->tm_min - b->tm_min)) + (a->tm_sec - b->tm_sec)); } time_t raptor_parse_date(const char *p, time_t *now) { struct tm tm, tm0, *tmp; time_t Start; struct date_yy date; date.yyInput = p; Start = now ? *now : time ((time_t *) NULL); tmp = localtime (&Start); if (!tmp) return -1; date.yyYear = tmp->tm_year + TM_YEAR_ORIGIN; date.yyMonth = tmp->tm_mon + 1; date.yyDay = tmp->tm_mday; date.yyHour = tmp->tm_hour; date.yyMinutes = tmp->tm_min; date.yySeconds = tmp->tm_sec; tm.tm_isdst = tmp->tm_isdst; date.yyMeridian = MER24; date.yyRelSeconds = 0; date.yyRelMinutes = 0; date.yyRelHour = 0; date.yyRelDay = 0; date.yyRelMonth = 0; date.yyRelYear = 0; date.yyHaveDate = 0; date.yyHaveDay = 0; date.yyHaveRel = 0; date.yyHaveTime = 0; date.yyHaveZone = 0; if (yyparse ((void *)&date) || date.yyHaveTime > 1 || date.yyHaveZone > 1 || date.yyHaveDate > 1 || date.yyHaveDay > 1) { return -1; } tm.tm_year = ToYear (date.yyYear) - TM_YEAR_ORIGIN + date.yyRelYear; tm.tm_mon = date.yyMonth - 1 + date.yyRelMonth; tm.tm_mday = date.yyDay + date.yyRelDay; if (date.yyHaveTime || (date.yyHaveRel && !date.yyHaveDate && !date.yyHaveDay)) { tm.tm_hour = ToHour (date.yyHour, date.yyMeridian); if (tm.tm_hour < 0) return -1; tm.tm_min = date.yyMinutes; tm.tm_sec = date.yySeconds; } else { tm.tm_hour = tm.tm_min = tm.tm_sec = 0; } tm.tm_hour += date.yyRelHour; tm.tm_min += date.yyRelMinutes; tm.tm_sec += date.yyRelSeconds; /* Let mktime deduce tm_isdst if we have an absolute timestamp, or if the relative timestamp mentions days, months, or years. */ if (date.yyHaveDate | date.yyHaveDay | date.yyHaveTime | date.yyRelDay | date.yyRelMonth | date.yyRelYear) tm.tm_isdst = -1; tm0 = tm; Start = mktime (&tm); if (Start == (time_t) -1) { /* Guard against falsely reporting errors near the time_t boundaries when parsing times in other time zones. For example, if the min time_t value is 1970-01-01 00:00:00 UTC and we are 8 hours ahead of UTC, then the min localtime value is 1970-01-01 08:00:00; if we apply mktime to 1970-01-01 00:00:00 we will get an error, so we apply mktime to 1970-01-02 08:00:00 instead and adjust the time zone by 24 hours to compensate. This algorithm assumes that there is no DST transition within a day of the time_t boundaries. */ if (date.yyHaveZone) { tm = tm0; if (tm.tm_year <= EPOCH - TM_YEAR_ORIGIN) { tm.tm_mday++; date.yyTimezone -= 24 * 60; } else { tm.tm_mday--; date.yyTimezone += 24 * 60; } Start = mktime (&tm); } if (Start == (time_t) -1) return Start; } if (date.yyHaveDay && !date.yyHaveDate) { tm.tm_mday += ((date.yyDayNumber - tm.tm_wday + 7) % 7 + 7 * (date.yyDayOrdinal - (0 < date.yyDayOrdinal))); Start = mktime (&tm); if (Start == (time_t) -1) return Start; } if (date.yyHaveZone) { long delta; struct tm *gmt = gmtime (&Start); if (!gmt) return -1; delta = date.yyTimezone * 60L + difftm (&tm, gmt); if ((Start + delta < Start) != (delta < 0)) return -1; /* time_t overflow */ Start += delta; } return Start; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/parsedate.y�����������������������������������������������������������������������0000644�0001750�0001750�00000075013�11330672502�012765� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ /* * Imported from * PHP CVS 1.56.2.2 * Fri May 20 07:14:01 2005 * http://cvs.php.net/php-src/ext/standard/parsedate.y * * and patched from there * * 1.59 removed this from PHP CVS and replaced it with entirely new * code written under the PHP license: * http://viewcvs.php.net/viewcvs.cgi/php-src/ext/date/lib/ * That code is not used here and cannot be used. * * The old version is now in the CVS Attic: * http://viewcvs.php.net/viewcvs.cgi/php-src/ext/standard/Attic/parsedate.y */ /* ** Originally written by Steven M. Bellovin <smb@research.att.com> while ** at the University of North Carolina at Chapel Hill. Later tweaked by ** a couple of people on Usenet. Completely overhauled by Rich $alz ** <rsalz@bbn.com> and Jim Berets <jberets@bbn.com> in August, 1990. ** ** This code is in the public domain and has no copyright. */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <sys/types.h> #include <time.h> #include <ctype.h> #ifdef HAVE_SYS_TIME_H # include <sys/time.h> #endif #if HAVE_STDLIB_H #include <stdlib.h> #endif #if defined(_HPUX_SOURCE) #include <alloca.h> #endif #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) # define IN_CTYPE_DOMAIN(c) 1 #else # define IN_CTYPE_DOMAIN(c) isascii(c) #endif #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) /* ISDIGIT differs from ISDIGIT_LOCALE, as follows: - Its arg may be any int or unsigned int; it need not be an unsigned char. - It's guaranteed to evaluate its argument exactly once. - It's typically faster. Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that only '0' through '9' are digits. Prefer ISDIGIT to ISDIGIT_LOCALE unless it's important to use the locale's definition of `digit' even when the host does not conform to Posix. */ #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9) #if defined (STDC_HEADERS) || defined (USG) # include <string.h> #endif #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(x) #endif #ifndef ATTRIBUTE_UNUSED # define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* Some old versions of bison generate parsers that use bcopy. That loses on systems that don't provide the function, so we have to redefine it here. */ #if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy) # define bcopy(from, to, len) memcpy ((to), (from), (len)) #endif /* Prototypes */ static int raptor_parsedate_error(const char *msg); time_t raptor_parse_date(const char *p, time_t *now); #define EPOCH 1970 #define HOUR(x) ((x) * 60) #define MAX_BUFF_LEN 128 /* size of buffer to read the date into */ /* ** An entry in the lexical lookup table. */ typedef struct _TABLE { const char *name; int type; int value; } TABLE; /* ** Meridian: am, pm, or 24-hour style. */ typedef enum _MERIDIAN { MERam, MERpm, MER24 } MERIDIAN; struct date_yy { const char *yyInput; int yyDayOrdinal; int yyDayNumber; int yyHaveDate; int yyHaveDay; int yyHaveRel; int yyHaveTime; int yyHaveZone; int yyTimezone; int yyDay; int yyHour; int yyMinutes; int yyMonth; int yySeconds; int yyYear; MERIDIAN yyMeridian; int yyRelDay; int yyRelHour; int yyRelMinutes; int yyRelMonth; int yyRelSeconds; int yyRelYear; }; typedef union _date_ll { int Number; enum _MERIDIAN Meridian; } date_ll; #define YYPARSE_PARAM parm #define YYLEX_PARAM parm #define YYSTYPE date_ll #define YYLTYPE void static int yylex (YYSTYPE *lvalp, void *parm); static int ToHour (int Hours, MERIDIAN Meridian); static int ToYear (int Year); static int LookupWord (YYSTYPE *lvalp, char *buff); %} /* This grammar has 56 shift/reduce conflicts. */ %expect 56 %pure_parser %token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID tTZONE tWZONE tZZONE %token tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT %token tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE %type <Number> tDAY tDAY_UNIT tDAYZONE tHOUR_UNIT tMINUTE_UNIT %type <Number> tMONTH tMONTH_UNIT %type <Number> tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE tTZONE tWZONE tZZONE %type <Meridian> tMERIDIAN %% spec : /* NULL */ | spec item ; item : time { ((struct date_yy *)parm)->yyHaveTime++; } | zone { ((struct date_yy *)parm)->yyHaveZone++; } | date { ((struct date_yy *)parm)->yyHaveDate++; } | day { ((struct date_yy *)parm)->yyHaveDay++; } | rel { ((struct date_yy *)parm)->yyHaveRel++; } | number | o_merid ; time : tUNUMBER tMERIDIAN { ((struct date_yy *)parm)->yyHour = $1; ((struct date_yy *)parm)->yyMinutes = 0; ((struct date_yy *)parm)->yySeconds = 0; ((struct date_yy *)parm)->yyMeridian = $2; } | iso8601time_colon /* | pgsqltime ... shares a common spec with ISO8601 */ ; iso8601time_colon: HMStime_with_colon sec_fraction_part rel { ((struct date_yy *)parm)->yyMeridian = MER24; } | HMtime_with_colon sec_fraction_part rel { ((struct date_yy *)parm)->yyMeridian = MER24; ((struct date_yy *)parm)->yySeconds = 0; } | HMStime_with_colon sec_fraction_part iso8601zonepart { ((struct date_yy *)parm)->yyMeridian = MER24; } | HMtime_with_colon sec_fraction_part iso8601zonepart { ((struct date_yy *)parm)->yyMeridian = MER24; ((struct date_yy *)parm)->yySeconds = 0; } ; iso8601zonepart: zonepart_numeric_without_colon { ((struct date_yy *)parm)->yyHaveZone++; } | zonepart_numeric_with_colon { ((struct date_yy *)parm)->yyHaveZone++; } | zone { ((struct date_yy *)parm)->yyHaveZone++; } | /* empty */ ; sec_fraction_part: '.' tUNUMBER { } | /* empty */ ; zonepart_numeric_without_colon: tSNUMBER { /* format: [+-]hhmm */ if ($1 <= -100 || $1 >= 100) { ((struct date_yy *)parm)->yyTimezone = (-$1 / 100) * 60 + (-$1 % 100); } else if ($1 >= -99 || $1 <= 99) { ((struct date_yy *)parm)->yyTimezone = -$1 * 60; } } ; zonepart_numeric_with_colon: tSNUMBER ':' tUNUMBER { /* format: [+-]hh:mm */ ((struct date_yy *)parm)->yyTimezone = -$1 * 60 + ($1 > 0 ? -$3: $3); } ; HMStime_with_colon: HMtime_with_colon ':' tUNUMBER { /* format: hh:mm:ss */ ((struct date_yy *)parm)->yySeconds = $3; } ; HMtime_with_colon: tUNUMBER ':' tUNUMBER { /* format: hh:mm */ ((struct date_yy *)parm)->yyHour = $1; ((struct date_yy *)parm)->yyMinutes = $3; } ; /* we have to deal with a special case for the datetime format of XML Schema here: '2003-11-18T22:40:00Z' the combination of a 'T' timezone specifier later followed by a 'Z' is now recognized and allowed TODO: change the grammer so that the exact positions are checked right now '2003-11-18 22:40:00 TZ' is also accepted (hartmut) */ zone : tTZONE { ((struct date_yy *)parm)->yyTimezone = $1; } | tWZONE { ((struct date_yy *)parm)->yyTimezone = $1; } | tZZONE { ((struct date_yy *)parm)->yyTimezone = $1; } | tZONE { ((struct date_yy *)parm)->yyTimezone = $1; } | tDAYZONE { ((struct date_yy *)parm)->yyTimezone = $1 - 60; } | tZONE tDST { ((struct date_yy *)parm)->yyTimezone = $1 - 60; } ; day : tDAY { ((struct date_yy *)parm)->yyDayOrdinal = 1; ((struct date_yy *)parm)->yyDayNumber = $1; } | tDAY ',' { ((struct date_yy *)parm)->yyDayOrdinal = 1; ((struct date_yy *)parm)->yyDayNumber = $1; } | tUNUMBER tDAY { ((struct date_yy *)parm)->yyDayOrdinal = $1; ((struct date_yy *)parm)->yyDayNumber = $2; } ; date : tUNUMBER '/' tUNUMBER { ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $3; } | tMONTH tUNUMBER tUNUMBER ':' tUNUMBER ':' tUNUMBER tUNUMBER { ((struct date_yy *)parm)->yyYear = $8; ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $2; ((struct date_yy *)parm)->yyHour = $3; ((struct date_yy *)parm)->yyMinutes = $5; ((struct date_yy *)parm)->yySeconds = $7; ((struct date_yy *)parm)->yyHaveTime = 1; } | tUNUMBER '/' tUNUMBER '/' tUNUMBER { /* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY. The goal in recognizing YYYY/MM/DD is solely to support legacy machine-generated dates like those in an RCS log listing. If you want portability, use the ISO 8601 format. */ if ($1 >= 1000) { ((struct date_yy *)parm)->yyYear = $1; ((struct date_yy *)parm)->yyMonth = $3; ((struct date_yy *)parm)->yyDay = $5; } else { ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $3; ((struct date_yy *)parm)->yyYear = $5; } } | iso8601date | iso8601datetime { ((struct date_yy *)parm)->yyHaveTime++; } | tUNUMBER tMONTH tSNUMBER { /* e.g. 17-JUN-1992. */ ((struct date_yy *)parm)->yyDay = $1; ((struct date_yy *)parm)->yyMonth = $2; ((struct date_yy *)parm)->yyYear = -$3; } | tMONTH tUNUMBER tUNUMBER { ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $2; ((struct date_yy *)parm)->yyYear = $3; } | tMONTH tUNUMBER { ((struct date_yy *)parm)->yyMonth = $1; if ($2 > 1000) { ((struct date_yy *)parm)->yyYear = $2; } else { ((struct date_yy *)parm)->yyDay = $2; } } | tMONTH tUNUMBER ',' tUNUMBER { ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $2; ((struct date_yy *)parm)->yyYear = $4; } | tUNUMBER tMONTH { ((struct date_yy *)parm)->yyMonth = $2; if ($1 > 1000) { ((struct date_yy *)parm)->yyYear = $1; } else { ((struct date_yy *)parm)->yyDay = $1; } } | tUNUMBER tMONTH tUNUMBER { ((struct date_yy *)parm)->yyMonth = $2; ((struct date_yy *)parm)->yyDay = $1; ((struct date_yy *)parm)->yyYear = $3; } ; iso8601datetime: iso8601date tTZONE iso8601time | tUNUMBER tTZONE iso8601time { int i = $1; if (i >= 10000) { /* format: yyyymmdd */ ((struct date_yy *)parm)->yyYear = i / 10000; i %= 10000; ((struct date_yy *)parm)->yyMonth = i / 100; i %= 100; ((struct date_yy *)parm)->yyDay = i; } else if (i >= 1000 && i <= 9999) { /* format: yyyy */ ((struct date_yy *)parm)->yyYear = i; ((struct date_yy *)parm)->yyDay= 1; ((struct date_yy *)parm)->yyMonth = 1; } } ; iso8601date: tUNUMBER tSNUMBER tSNUMBER { /* ISO 8601 format. yyyy-mm-dd. */ ((struct date_yy *)parm)->yyYear = $1; ((struct date_yy *)parm)->yyMonth = -$2; ((struct date_yy *)parm)->yyDay = -$3; } | tUNUMBER tSNUMBER { /* ISO 8601 format yyyy-mm */ ((struct date_yy *)parm)->yyYear = $1; ((struct date_yy *)parm)->yyMonth = -$2; ((struct date_yy *)parm)->yyDay = 1; } | tUNUMBER iso8601weekspec { const int om = (1 + 9) % 12; /* offset month */ const int oy = $1 - 1; /* offset year */ ((struct date_yy *)parm)->yyYear = $1; ((struct date_yy *)parm)->yyMonth = 1; /* Zeller's formula */ ((struct date_yy *)parm)->yyDay -= ((13 * om + 12) / 5 + oy + oy / 4 + oy / 400 - oy / 100) % 7 - 1; } ; iso8601weekspec: tWZONE tUNUMBER { ((struct date_yy *)parm)->yyDay = ($2 / 10) * 7 + ($2 % 10) - 8; } | tWZONE tUNUMBER tSNUMBER { ((struct date_yy *)parm)->yyDay = $2 * 7 - $3 - 8; } ; iso8601time: iso8601time_colon | tUNUMBER sec_fraction_part iso8601zonepart { int i = $1; if (i <= -100000 || i >= 100000) { ((struct date_yy *)parm)->yyHour = i / 10000; i %= 10000; ((struct date_yy *)parm)->yyMinutes = i / 100; i %= 100; ((struct date_yy *)parm)->yySeconds = i; } else if (i <= -1000 || i >= 1000) { ((struct date_yy *)parm)->yyHour = i / 100; i %= 100; ((struct date_yy *)parm)->yyMinutes = i; ((struct date_yy *)parm)->yySeconds = 0; } else if (i >= -99 || i <= 99) { ((struct date_yy *)parm)->yyHour = $1; ((struct date_yy *)parm)->yyMinutes = 0; ((struct date_yy *)parm)->yySeconds = 0; } else { ((struct date_yy *)parm)->yyHaveTime = 0; } ((struct date_yy *)parm)->yyMeridian = MER24; } ; rel : relunit tAGO { ((struct date_yy *)parm)->yyRelSeconds = -((struct date_yy *)parm)->yyRelSeconds; ((struct date_yy *)parm)->yyRelMinutes = -((struct date_yy *)parm)->yyRelMinutes; ((struct date_yy *)parm)->yyRelHour = -((struct date_yy *)parm)->yyRelHour; ((struct date_yy *)parm)->yyRelDay = -((struct date_yy *)parm)->yyRelDay; ((struct date_yy *)parm)->yyRelMonth = -((struct date_yy *)parm)->yyRelMonth; ((struct date_yy *)parm)->yyRelYear = -((struct date_yy *)parm)->yyRelYear; } | relunit ; relunit : tUNUMBER tYEAR_UNIT { ((struct date_yy *)parm)->yyRelYear += $1 * $2; } | tSNUMBER tYEAR_UNIT { ((struct date_yy *)parm)->yyRelYear += $1 * $2; } | tYEAR_UNIT { ((struct date_yy *)parm)->yyRelYear += $1; } | tUNUMBER tMONTH_UNIT { ((struct date_yy *)parm)->yyRelMonth += $1 * $2; } | tSNUMBER tMONTH_UNIT { ((struct date_yy *)parm)->yyRelMonth += $1 * $2; } | tMONTH_UNIT { ((struct date_yy *)parm)->yyRelMonth += $1; } | tUNUMBER tDAY_UNIT { ((struct date_yy *)parm)->yyRelDay += $1 * $2; } | tSNUMBER tDAY_UNIT { ((struct date_yy *)parm)->yyRelDay += $1 * $2; } | tDAY_UNIT { ((struct date_yy *)parm)->yyRelDay += $1; } | tUNUMBER tHOUR_UNIT { ((struct date_yy *)parm)->yyRelHour += $1 * $2; } | tSNUMBER tHOUR_UNIT { ((struct date_yy *)parm)->yyRelHour += $1 * $2; } | tHOUR_UNIT { ((struct date_yy *)parm)->yyRelHour += $1; } | tUNUMBER tMINUTE_UNIT { ((struct date_yy *)parm)->yyRelMinutes += $1 * $2; } | tSNUMBER tMINUTE_UNIT { ((struct date_yy *)parm)->yyRelMinutes += $1 * $2; } | tMINUTE_UNIT { ((struct date_yy *)parm)->yyRelMinutes += $1; } | tUNUMBER tSEC_UNIT { ((struct date_yy *)parm)->yyRelSeconds += $1 * $2; } | tSNUMBER tSEC_UNIT { ((struct date_yy *)parm)->yyRelSeconds += $1 * $2; } | tSEC_UNIT { ((struct date_yy *)parm)->yyRelSeconds += $1; } ; number : tUNUMBER { if (((struct date_yy *)parm)->yyHaveTime && ((struct date_yy *)parm)->yyHaveDate && !((struct date_yy *)parm)->yyHaveRel) ((struct date_yy *)parm)->yyYear = $1; else { if ($1>10000) { ((struct date_yy *)parm)->yyHaveDate++; ((struct date_yy *)parm)->yyDay= ($1)%100; ((struct date_yy *)parm)->yyMonth= ($1/100)%100; ((struct date_yy *)parm)->yyYear = $1/10000; } else { ((struct date_yy *)parm)->yyHaveTime++; if ($1 < 100) { ((struct date_yy *)parm)->yyHour = $1; ((struct date_yy *)parm)->yyMinutes = 0; } else { ((struct date_yy *)parm)->yyHour = $1 / 100; ((struct date_yy *)parm)->yyMinutes = $1 % 100; } ((struct date_yy *)parm)->yySeconds = 0; ((struct date_yy *)parm)->yyMeridian = MER24; } } } ; o_merid : tMERIDIAN { ((struct date_yy *)parm)->yyMeridian = $1; } ; %% time_t get_date (char *p, time_t *now); /* Month and day table. */ static TABLE const MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, { "april", tMONTH, 4 }, { "may", tMONTH, 5 }, { "june", tMONTH, 6 }, { "july", tMONTH, 7 }, { "august", tMONTH, 8 }, { "september", tMONTH, 9 }, { "sept", tMONTH, 9 }, { "october", tMONTH, 10 }, { "november", tMONTH, 11 }, { "december", tMONTH, 12 }, { "sunday", tDAY, 0 }, { "monday", tDAY, 1 }, { "tuesday", tDAY, 2 }, { "tues", tDAY, 2 }, { "wednesday", tDAY, 3 }, { "wednes", tDAY, 3 }, { "thursday", tDAY, 4 }, { "thur", tDAY, 4 }, { "thurs", tDAY, 4 }, { "friday", tDAY, 5 }, { "saturday", tDAY, 6 }, { NULL, 0, 0 } }; /* Time units table. */ static TABLE const UnitsTable[] = { { "year", tYEAR_UNIT, 1 }, { "month", tMONTH_UNIT, 1 }, { "fortnight", tDAY_UNIT, 14 }, { "week", tDAY_UNIT, 7 }, { "day", tDAY_UNIT, 1 }, { "hour", tHOUR_UNIT, 1 }, { "minute", tMINUTE_UNIT, 1 }, { "min", tMINUTE_UNIT, 1 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, { NULL, 0, 0 } }; /* Assorted relative-time words. */ static TABLE const OtherTable[] = { { "tomorrow", tDAY_UNIT, 1 }, { "yesterday", tDAY_UNIT, -1 }, { "today", tDAY_UNIT, 0 }, { "now", tDAY_UNIT, 0 }, { "last", tUNUMBER, -1 }, { "this", tUNUMBER, 0 }, { "next", tUNUMBER, 1 }, { "first", tUNUMBER, 1 }, /* { "second", tUNUMBER, 2 }, */ { "third", tUNUMBER, 3 }, { "fourth", tUNUMBER, 4 }, { "fifth", tUNUMBER, 5 }, { "sixth", tUNUMBER, 6 }, { "seventh", tUNUMBER, 7 }, { "eighth", tUNUMBER, 8 }, { "ninth", tUNUMBER, 9 }, { "tenth", tUNUMBER, 10 }, { "eleventh", tUNUMBER, 11 }, { "twelfth", tUNUMBER, 12 }, { "ago", tAGO, 1 }, { NULL, 0, 0 } }; /* The timezone table. */ static TABLE const TimezoneTable[] = { { "gmt", tZONE, HOUR ( 0) }, /* Greenwich Mean */ { "ut", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ { "utc", tZONE, HOUR ( 0) }, { "wet", tZONE, HOUR ( 0) }, /* Western European */ { "bst", tDAYZONE, HOUR ( 0) }, /* British Summer */ { "wat", tZONE, HOUR ( 1) }, /* West Africa */ { "at", tZONE, HOUR ( 2) }, /* Azores */ #if 0 /* For completeness. BST is also British Summer, and GST is * also Guam Standard. */ { "bst", tZONE, HOUR ( 3) }, /* Brazil Standard */ { "gst", tZONE, HOUR ( 3) }, /* Greenland Standard */ #endif #if 0 { "nft", tZONE, HOUR (3.5) }, /* Newfoundland */ { "nst", tZONE, HOUR (3.5) }, /* Newfoundland Standard */ { "ndt", tDAYZONE, HOUR (3.5) }, /* Newfoundland Daylight */ #endif { "ast", tZONE, HOUR ( 4) }, /* Atlantic Standard */ { "adt", tDAYZONE, HOUR ( 4) }, /* Atlantic Daylight */ { "est", tZONE, HOUR ( 5) }, /* Eastern Standard */ { "edt", tDAYZONE, HOUR ( 5) }, /* Eastern Daylight */ { "cst", tZONE, HOUR ( 6) }, /* Central Standard */ { "cdt", tDAYZONE, HOUR ( 6) }, /* Central Daylight */ { "mst", tZONE, HOUR ( 7) }, /* Mountain Standard */ { "mdt", tDAYZONE, HOUR ( 7) }, /* Mountain Daylight */ { "pst", tZONE, HOUR ( 8) }, /* Pacific Standard */ { "pdt", tDAYZONE, HOUR ( 8) }, /* Pacific Daylight */ { "yst", tZONE, HOUR ( 9) }, /* Yukon Standard */ { "ydt", tDAYZONE, HOUR ( 9) }, /* Yukon Daylight */ { "hst", tZONE, HOUR (10) }, /* Hawaii Standard */ { "hdt", tDAYZONE, HOUR (10) }, /* Hawaii Daylight */ { "cat", tZONE, HOUR (10) }, /* Central Alaska */ { "akst", tZONE, HOUR (10) }, /* Alaska Standard */ { "akdt", tZONE, HOUR (10) }, /* Alaska Daylight */ { "ahst", tZONE, HOUR (10) }, /* Alaska-Hawaii Standard */ { "nt", tZONE, HOUR (11) }, /* Nome */ { "idlw", tZONE, HOUR (12) }, /* International Date Line West */ { "cet", tZONE, -HOUR (1) }, /* Central European */ { "cest", tDAYZONE, -HOUR (1) }, /* Central European Summer */ { "met", tZONE, -HOUR (1) }, /* Middle European */ { "mewt", tZONE, -HOUR (1) }, /* Middle European Winter */ { "mest", tDAYZONE, -HOUR (1) }, /* Middle European Summer */ { "mesz", tDAYZONE, -HOUR (1) }, /* Middle European Summer */ { "swt", tZONE, -HOUR (1) }, /* Swedish Winter */ { "sst", tDAYZONE, -HOUR (1) }, /* Swedish Summer */ { "fwt", tZONE, -HOUR (1) }, /* French Winter */ { "fst", tDAYZONE, -HOUR (1) }, /* French Summer */ { "eet", tZONE, -HOUR (2) }, /* Eastern Europe, USSR Zone 1 */ { "bt", tZONE, -HOUR (3) }, /* Baghdad, USSR Zone 2 */ #if 0 { "it", tZONE, -HOUR (3.5) },/* Iran */ #endif { "zp4", tZONE, -HOUR (4) }, /* USSR Zone 3 */ { "zp5", tZONE, -HOUR (5) }, /* USSR Zone 4 */ #if 0 { "ist", tZONE, -HOUR (5.5) },/* Indian Standard */ #endif { "zp6", tZONE, -HOUR (6) }, /* USSR Zone 5 */ #if 0 /* For completeness. NST is also Newfoundland Standard, and SST is * also Swedish Summer. */ { "nst", tZONE, -HOUR (6.5) },/* North Sumatra */ { "sst", tZONE, -HOUR (7) }, /* South Sumatra, USSR Zone 6 */ #endif /* 0 */ { "wast", tZONE, -HOUR (7) }, /* West Australian Standard */ { "wadt", tDAYZONE, -HOUR (7) }, /* West Australian Daylight */ #if 0 { "jt", tZONE, -HOUR (7.5) },/* Java (3pm in Cronusland!) */ #endif { "cct", tZONE, -HOUR (8) }, /* China Coast, USSR Zone 7 */ { "jst", tZONE, -HOUR (9) }, /* Japan Standard, USSR Zone 8 */ #if 0 { "cast", tZONE, -HOUR (9.5) },/* Central Australian Standard */ { "cadt", tDAYZONE, -HOUR (9.5) },/* Central Australian Daylight */ #endif { "east", tZONE, -HOUR (10) }, /* Eastern Australian Standard */ { "eadt", tDAYZONE, -HOUR (10) }, /* Eastern Australian Daylight */ { "gst", tZONE, -HOUR (10) }, /* Guam Standard, USSR Zone 9 */ { "nzt", tZONE, -HOUR (12) }, /* New Zealand */ { "nzst", tZONE, -HOUR (12) }, /* New Zealand Standard */ { "nzdt", tDAYZONE, -HOUR (12) }, /* New Zealand Daylight */ { "idle", tZONE, -HOUR (12) }, /* International Date Line East */ { NULL, 0, 0 } }; /* Military timezone table. */ static TABLE const MilitaryTable[] = { { "a", tZONE, HOUR (- 1) }, { "b", tZONE, HOUR (- 2) }, { "c", tZONE, HOUR (- 3) }, { "d", tZONE, HOUR (- 4) }, { "e", tZONE, HOUR (- 5) }, { "f", tZONE, HOUR (- 6) }, { "g", tZONE, HOUR (- 7) }, { "h", tZONE, HOUR (- 8) }, { "i", tZONE, HOUR (- 9) }, { "k", tZONE, HOUR (-10) }, { "l", tZONE, HOUR (-11) }, { "m", tZONE, HOUR (-12) }, { "n", tZONE, HOUR ( 1) }, { "o", tZONE, HOUR ( 2) }, { "p", tZONE, HOUR ( 3) }, { "q", tZONE, HOUR ( 4) }, { "r", tZONE, HOUR ( 5) }, { "s", tZONE, HOUR ( 6) }, { "t", tTZONE, HOUR ( 7) }, { "u", tZONE, HOUR ( 8) }, { "v", tZONE, HOUR ( 9) }, { "w", tWZONE, HOUR ( 10) }, { "x", tZONE, HOUR ( 11) }, { "y", tZONE, HOUR ( 12) }, { "z", tZZONE, HOUR ( 0) }, { NULL, 0, 0 } }; /* ARGSUSED */ static int yyerror(const char *s) { return 0; } static int ToHour(int Hours, MERIDIAN Meridian) { switch (Meridian) { case MER24: if (Hours < 0 || Hours > 23) return -1; return Hours; case MERam: if (Hours < 1 || Hours > 12) return -1; if (Hours == 12) Hours = 0; return Hours; case MERpm: if (Hours < 1 || Hours > 12) return -1; if (Hours == 12) Hours = 0; return Hours + 12; default: #ifdef RAPTOR_DEBUG fprintf(stderr, "%s:%d:%s: UNKNOWN Meridian %d - add a new case", __FILE__, __LINE__, __func__, (int)Meridian); #endif return -1; } /* NOTREACHED */ } static int ToYear(int Year) { if (Year < 0) Year = -Year; /* XPG4 suggests that years 00-68 map to 2000-2068, and years 69-99 map to 1969-1999. */ if (Year < 69) Year += 2000; else if (Year < 100) Year += 1900; return Year; } static int LookupWord (YYSTYPE *lvalp, char *buff) { char *p; char *q; const TABLE *tp; int i; int abbrev; /* Make it lowercase. */ for (p = buff; *p; p++) if (ISUPPER ((unsigned char) *p)) *p = tolower (*p); if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0) { lvalp->Meridian = MERam; return tMERIDIAN; } if (strcmp (buff, "pm") == 0 || strcmp (buff, "p.m.") == 0) { lvalp->Meridian = MERpm; return tMERIDIAN; } /* See if we have an abbreviation for a month. */ if (strlen (buff) == 3) abbrev = 1; else if (strlen (buff) == 4 && buff[3] == '.') { abbrev = 1; buff[3] = '\0'; } else abbrev = 0; for (tp = MonthDayTable; tp->name; tp++) { if (abbrev) { if (strncmp (buff, tp->name, 3) == 0) { lvalp->Number = tp->value; return tp->type; } } else if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } } for (tp = TimezoneTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } if (strcmp (buff, "dst") == 0) return tDST; for (tp = UnitsTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } /* Strip off any plural and try the units table again. */ i = strlen (buff) - 1; if (buff[i] == 's') { buff[i] = '\0'; for (tp = UnitsTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } buff[i] = 's'; /* Put back for "this" in OtherTable. */ } for (tp = OtherTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } /* Military timezones. */ if (buff[1] == '\0' && ISALPHA ((unsigned char) *buff)) { for (tp = MilitaryTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } } /* Drop out any periods and try the timezone table again. */ for (i = 0, p = q = buff; *q; q++) if (*q != '.') *p++ = *q; else i++; *p = '\0'; if (i) for (tp = TimezoneTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } return tID; } int yylex(YYSTYPE *lvalp, void *parm) { unsigned char c; char *p; char buff[20]; int Count; int sign; struct date_yy * date = (struct date_yy *)parm; for (;;) { while (ISSPACE ((unsigned char) *date->yyInput)) date->yyInput++; if (ISDIGIT (c = *date->yyInput) || c == '-' || c == '+') { if (c == '-' || c == '+') { sign = c == '-' ? -1 : 1; if (!ISDIGIT (*++date->yyInput)) /* skip the '-' sign */ continue; } else sign = 0; for (lvalp->Number = 0; ISDIGIT (c = *date->yyInput++);) lvalp->Number = 10 * lvalp->Number + c - '0'; date->yyInput--; if (sign < 0) lvalp->Number = -lvalp->Number; /* Ignore ordinal suffixes on numbers */ c = *date->yyInput; if (c == 's' || c == 'n' || c == 'r' || c == 't') { c = *++date->yyInput; if (c == 't' || c == 'd' || c == 'h') { date->yyInput++; } else { date->yyInput--; } } return sign ? tSNUMBER : tUNUMBER; } if (ISALPHA (c)) { for (p = buff; (c = *date->yyInput++, ISALPHA (c)) || c == '.';) if (p < &buff[sizeof buff - 1]) *p++ = c; *p = '\0'; date->yyInput--; return LookupWord (lvalp, buff); } if (c != '(') return *date->yyInput++; Count = 0; do { c = *date->yyInput++; if (c == '\0') return c; if (c == '(') Count++; else if (c == ')') Count--; } while (Count > 0); } } #define TM_YEAR_ORIGIN 1900 /* Yield A - B, measured in seconds. */ static long difftm (struct tm *a, struct tm *b) { int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); int by = b->tm_year + (TM_YEAR_ORIGIN - 1); long days = ( /* difference in day of year */ a->tm_yday - b->tm_yday /* + intervening leap days */ + ((ay >> 2) - (by >> 2)) - (ay / 100 - by / 100) + ((ay / 100 >> 2) - (by / 100 >> 2)) /* + difference in years * 365 */ + (long) (ay - by) * 365 ); return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + (a->tm_min - b->tm_min)) + (a->tm_sec - b->tm_sec)); } time_t raptor_parse_date(const char *p, time_t *now) { struct tm tm, tm0, *tmp; time_t Start; struct date_yy date; date.yyInput = p; Start = now ? *now : time ((time_t *) NULL); tmp = localtime (&Start); if (!tmp) return -1; date.yyYear = tmp->tm_year + TM_YEAR_ORIGIN; date.yyMonth = tmp->tm_mon + 1; date.yyDay = tmp->tm_mday; date.yyHour = tmp->tm_hour; date.yyMinutes = tmp->tm_min; date.yySeconds = tmp->tm_sec; tm.tm_isdst = tmp->tm_isdst; date.yyMeridian = MER24; date.yyRelSeconds = 0; date.yyRelMinutes = 0; date.yyRelHour = 0; date.yyRelDay = 0; date.yyRelMonth = 0; date.yyRelYear = 0; date.yyHaveDate = 0; date.yyHaveDay = 0; date.yyHaveRel = 0; date.yyHaveTime = 0; date.yyHaveZone = 0; if (yyparse ((void *)&date) || date.yyHaveTime > 1 || date.yyHaveZone > 1 || date.yyHaveDate > 1 || date.yyHaveDay > 1) { return -1; } tm.tm_year = ToYear (date.yyYear) - TM_YEAR_ORIGIN + date.yyRelYear; tm.tm_mon = date.yyMonth - 1 + date.yyRelMonth; tm.tm_mday = date.yyDay + date.yyRelDay; if (date.yyHaveTime || (date.yyHaveRel && !date.yyHaveDate && !date.yyHaveDay)) { tm.tm_hour = ToHour (date.yyHour, date.yyMeridian); if (tm.tm_hour < 0) return -1; tm.tm_min = date.yyMinutes; tm.tm_sec = date.yySeconds; } else { tm.tm_hour = tm.tm_min = tm.tm_sec = 0; } tm.tm_hour += date.yyRelHour; tm.tm_min += date.yyRelMinutes; tm.tm_sec += date.yyRelSeconds; /* Let mktime deduce tm_isdst if we have an absolute timestamp, or if the relative timestamp mentions days, months, or years. */ if (date.yyHaveDate | date.yyHaveDay | date.yyHaveTime | date.yyRelDay | date.yyRelMonth | date.yyRelYear) tm.tm_isdst = -1; tm0 = tm; Start = mktime (&tm); if (Start == (time_t) -1) { /* Guard against falsely reporting errors near the time_t boundaries when parsing times in other time zones. For example, if the min time_t value is 1970-01-01 00:00:00 UTC and we are 8 hours ahead of UTC, then the min localtime value is 1970-01-01 08:00:00; if we apply mktime to 1970-01-01 00:00:00 we will get an error, so we apply mktime to 1970-01-02 08:00:00 instead and adjust the time zone by 24 hours to compensate. This algorithm assumes that there is no DST transition within a day of the time_t boundaries. */ if (date.yyHaveZone) { tm = tm0; if (tm.tm_year <= EPOCH - TM_YEAR_ORIGIN) { tm.tm_mday++; date.yyTimezone -= 24 * 60; } else { tm.tm_mday--; date.yyTimezone += 24 * 60; } Start = mktime (&tm); } if (Start == (time_t) -1) return Start; } if (date.yyHaveDay && !date.yyHaveDate) { tm.tm_mday += ((date.yyDayNumber - tm.tm_wday + 7) % 7 + 7 * (date.yyDayOrdinal - (0 < date.yyDayOrdinal))); Start = mktime (&tm); if (Start == (time_t) -1) return Start; } if (date.yyHaveZone) { long delta; struct tm *gmt = gmtime (&Start); if (!gmt) return -1; delta = date.yyTimezone * 60L + difftm (&tm, gmt); if ((Start + delta < Start) != (delta < 0)) return -1; /* time_t overflow */ Start += delta; } return Start; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_identifier.c���������������������������������������������������������������0000644�0001750�0001750�00000020474�11330672502�014501� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_identifier.c - Raptor identifier classes * * Copyright (C) 2003-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_identifier: * @type: raptor_identifier_type of identifier * @uri: #raptor_uri of identifier (if relevant) (SHARED) * @uri_source: raptor_uri_source of URI (if relevant) * @id: string for ID or genid (if relevant) (SHARED) * @literal: string for literal (SHARED) * @literal_datatype: #raptor_uri of identifier (SHARED) * @literal_language: literal language (SHARED) * * Constructor - create a raptor_identifier. * * Constructs a new identifier copying the URI, ID fields. * SHARED means raptor_new_identifier owns this argument after calling. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_identifier_v2() if using raptor_world APIs. * * Return value: a new raptor_identifier object or NULL on failure **/ raptor_identifier* raptor_new_identifier(raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char *id, const unsigned char *literal, raptor_uri *literal_datatype, const unsigned char *literal_language) { return raptor_new_identifier_v2(raptor_world_instance(), type, uri, uri_source, id, literal, literal_datatype, literal_language); } #endif /** * raptor_new_identifier_v2: * @world: raptor_world object * @type: raptor_identifier_type of identifier * @uri: #raptor_uri of identifier (if relevant) (SHARED) * @uri_source: raptor_uri_source of URI (if relevant) * @id: string for ID or genid (if relevant) (SHARED) * @literal: string for literal (SHARED) * @literal_datatype: #raptor_uri of identifier (SHARED) * @literal_language: literal language (SHARED) * * Constructor - create a raptor_identifier. * * Constructs a new identifier copying the URI, ID fields. * SHARED means raptor_new_identifier owns this argument after calling. * * Return value: a new raptor_identifier object or NULL on failure **/ raptor_identifier* raptor_new_identifier_v2(raptor_world* world, raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char *id, const unsigned char *literal, raptor_uri *literal_datatype, const unsigned char *literal_language) { raptor_identifier *identifier; identifier=(raptor_identifier*)RAPTOR_CALLOC(raptor_identifier, 1, sizeof(raptor_identifier)); if(!identifier) { if(uri) raptor_free_uri_v2(world, uri); if(id) RAPTOR_FREE(cstring, (void*)id); if(literal) RAPTOR_FREE(cstring, (void*)literal); if(literal_datatype) raptor_free_uri_v2(world, literal_datatype); if(literal_language) RAPTOR_FREE(cstring, (void*)literal_language); return NULL; } identifier->world=world; identifier->type=type; identifier->is_malloced=1; /* SHARED */ identifier->uri=uri; identifier->id=id; identifier->literal=literal; identifier->literal_datatype=literal_datatype; identifier->literal_language=literal_language; return identifier; } /** * raptor_copy_identifier: * @dest: destination #raptor_identifier (previously created) * @src: source #raptor_identifier * * Copy raptor_identifiers. * * Return value: Non 0 on failure **/ int raptor_copy_identifier(raptor_identifier *dest, raptor_identifier *src) { int len; raptor_free_identifier(dest); dest->world=src->world; dest->type=src->type; dest->uri_source=src->uri_source; dest->ordinal=src->ordinal; dest->uri=raptor_uri_copy_v2(src->world, src->uri); if(src->id) { len=strlen((char*)src->id); dest->id=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!dest->id) { raptor_free_identifier(dest); return 1; } strncpy((char*)dest->id, (char*)src->id, len+1); } if(src->literal_language) { len=strlen((char*)src->literal_language); dest->literal_language=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!dest->literal_language) { raptor_free_identifier(dest); return 1; } strncpy((char*)dest->literal_language, (char*)src->literal_language, len+1); } dest->literal_datatype=raptor_uri_copy_v2(src->world, src->literal_datatype); return 0; } /** * raptor_free_identifier: * @identifier: #raptor_identifier object * * Destructor - destroy a raptor_identifier object. * **/ void raptor_free_identifier(raptor_identifier *identifier) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(identifier, raptor_identifier); if(identifier->uri) { raptor_free_uri_v2(identifier->world, identifier->uri); identifier->uri=NULL; } if(identifier->id) { RAPTOR_FREE(cstring, (void*)identifier->id); identifier->id=NULL; } if(identifier->literal) { RAPTOR_FREE(cstring, (void*)identifier->literal); identifier->literal=NULL; } if(identifier->literal_datatype) { raptor_free_uri_v2(identifier->world, identifier->literal_datatype); identifier->literal_datatype=NULL; } if(identifier->literal_language) { RAPTOR_FREE(cstring, (void*)identifier->literal_language); identifier->literal_language=NULL; } if(identifier->is_malloced) RAPTOR_FREE(identifier, (void*)identifier); } void raptor_set_identifier_uri(raptor_identifier *identifier, raptor_uri *uri) { identifier->uri = uri; identifier->type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; identifier->uri_source = RAPTOR_URI_SOURCE_URI; } void raptor_set_identifier_id(raptor_identifier *identifier, const unsigned char *id) { identifier->id = id; identifier->type = RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; identifier->uri_source = RAPTOR_URI_SOURCE_GENERATED; } #ifdef RAPTOR_DEBUG void raptor_identifier_print(FILE *stream, raptor_identifier *identifier) { if(!identifier) { fputs("-", stream); return; } if(identifier->type == RAPTOR_IDENTIFIER_TYPE_LITERAL || identifier->type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { fputc('"', stream); fputs((const char*)identifier->literal, stream); fputc('"', stream); if(identifier->literal_language) fprintf(stream, "@%s", identifier->literal_language); fputc('<', stream); if(identifier->type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) fputs((const char*)raptor_xml_literal_datatype_uri_string, stream); else if(identifier->literal_datatype) fputs((const char*)raptor_uri_as_string_v2(identifier->world, identifier->literal_datatype), stream); fputc('>', stream); } else if(identifier->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) fputs((const char*)identifier->id, stream); else if(identifier->type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) fprintf(stream, "[rdf:_%d]", identifier->ordinal); else { fprintf(stream, "%s", raptor_uri_as_string_v2(identifier->world, identifier->uri)); } } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/strcasecmp.c����������������������������������������������������������������������0000644�0001750�0001750�00000004166�11330672502�013134� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * strcasecmp.c - strcasecmp compatibility * * This file is in the public domain. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> int raptor_strcasecmp(const char* s1, const char* s2); int raptor_strncasecmp(const char* s1, const char* s2, size_t n); int raptor_strcasecmp(const char* s1, const char* s2) { register int c1, c2; while(*s1 && *s2) { c1 = tolower(*s1); c2 = tolower(*s2); if (c1 != c2) return (c1 - c2); s1++; s2++; } return (int) (*s1 - *s2); } int raptor_strncasecmp(const char* s1, const char* s2, size_t n) { register int c1, c2; while(*s1 && *s2 && n) { c1 = tolower(*s1); c2 = tolower(*s2); if (c1 != c2) return (c1 - c2); s1++; s2++; n--; } return 0; } #ifdef STANDALONE #include <stdio.h> /* one more prototype */ int main(int argc, char *argv[]); static int assert_strcasecmp (const char *s1, const char *s2, int expected) { int result=strcasecmp(s1, s2); result=(result>0) ? 1 : ((result <0) ? -1 : 0); if (result != expected) { fprintf(stderr, "FAIL strcasecmp (%s, %s) gave %d != %d\n", s1, s2, result, expected); return 1; } return 0; } static int assert_strncasecmp (const char *s1, const char *s2, size_t size, int expected) { int result=strncasecmp(s1, s2, size); result=(result>0) ? 1 : ((result <0) ? -1 : 0); if (result != expected) { fprintf(stderr, "FAIL strncasecmp (%s, %s, %d) gave %d != %d\n", s1, s2, (unsigned int)size, result, expected); return 1; } return 0; } int main(int argc, char *argv[]) { int failures=0; failures += assert_strcasecmp("foo", "foo", 0); failures += assert_strcasecmp("foo", "FOO", 0); failures += assert_strcasecmp("foo", "BaR", 1); failures += assert_strncasecmp("foo", "foobar", 3, 0); failures += assert_strncasecmp("foo", "FOOxyz", 3, 0); failures += assert_strncasecmp("foo", "BaRfoo", 3, 1); return failures; } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_rss_common.c���������������������������������������������������������������0000644�0001750�0001750�00000055761�11330672502�014545� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rss_common.c - Raptor Feeds (RSS and Atom) common code * * Copyright (C) 2003-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #include "raptor_rss.h" static int raptor_rss_field_conversion_date_uplift(raptor_rss_field* from_field, raptor_rss_field* to_field); const raptor_rss_namespace_info raptor_rss_namespaces_info[RAPTOR_RSS_NAMESPACES_SIZE]={ { NULL, NULL, }, { NULL, NULL, }, { RSS0_91_NAMESPACE_URI, "rss091", }, { RSS0_9_NAMESPACE_URI, NULL, }, { RSS1_0_NAMESPACE_URI, "rss", }, { ATOM0_3_NAMESPACE_URI, NULL, }, { DC_NAMESPACE_URI, "dc", }, { RSS2_0_ENC_NAMESPACE_URI, "enc", }, { RSS1_1_NAMESPACE_URI, NULL, }, { CONTENT_NAMESPACE_URI, "content", }, { ATOM1_0_NAMESPACE_URI, "atom", }, { RDF_NAMESPACE_URI, "rdf", }, { ATOMTRIPLES_NAMESPACE_URI, "at", }, { ITUNES_NAMESPACE_URI, "itunes", }, }; const raptor_rss_item_info raptor_rss_items_info[RAPTOR_RSS_COMMON_SIZE+1]={ { "channel", RSS1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "image", RSS1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "textinput", RSS1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "item", RSS1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "author", ATOM1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS, RAPTOR_RSS_FIELD_ATOM_AUTHOR }, { "Link", ATOM1_0_NS, RAPTOR_RSS_ITEM_BLOCK, RAPTOR_RSS_RDF_ATOM_LINK_CLASS, RAPTOR_RSS_FIELD_ATOM_LINK }, { "owner" , ITUNES_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_ITUNES_OWNER, RAPTOR_RSS_FIELD_ITUNES_OWNER }, { "skipHours", RSS0_91_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "skipDays", RSS0_91_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "Enclosure", RSS2_0_ENC_NS, RAPTOR_RSS_ITEM_BLOCK, RAPTOR_RSS_RDF_ENCLOSURE_CLASS, RAPTOR_RSS_RDF_ENCLOSURE }, { "category", ATOM1_0_NS, RAPTOR_RSS_ITEM_BLOCK, RAPTOR_RSS_RDF_ATOM_CATEGORY_CLASS, RAPTOR_RSS_FIELD_ATOM_CATEGORY }, { "source" , RSS2_0_NS, RAPTOR_RSS_ITEM_BLOCK, RAPTOR_RSS_FIELD_SOURCE, RAPTOR_RSS_FIELD_NONE }, { "feed", ATOM1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "entry", ATOM1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "<none>", RSS_UNKNOWN_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE } }; const raptor_rss_field_info raptor_rss_fields_info[RAPTOR_RSS_FIELDS_SIZE+2]={ { "title", RSS1_0_NS, 0 }, { "link", RSS1_0_NS, 0 }, /* Actually a URI but RSS 1.0 spec wants this as an (XML & RDF) literal */ { "description", RSS1_0_NS, 0 }, { "url", RSS1_0_NS, 0 }, { "name", RSS1_0_NS, 0 }, { "language", RSS0_91_NS, 0 }, { "rating", RSS0_91_NS, 0 }, { "copyright", RSS0_91_NS, 0 }, { "pubDate", RSS0_91_NS, 0 }, { "lastBuildDate", RSS0_91_NS, 0 }, { "docs", RSS0_91_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "managingEditor", RSS0_91_NS, 0 }, { "webMaster", RSS0_91_NS, 0 }, { "cloud", RSS0_92_NS, 0 }, { "ttl", RSS2_0_NS, 0 }, { "width", RSS0_91_NS, 0 }, { "height", RSS0_91_NS, 0 }, { "hour", RSS0_91_NS, 0 }, { "day", RSS0_91_NS, 0 }, { "generator", RSS0_92_NS, 0 }, { "source", RSS0_92_NS, 0 }, { "author", RSS2_0_NS, 0 }, { "guid", RSS2_0_NS, 0 }, { "enclosure", RSS2_0_NS, RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE, RAPTOR_RSS_ENCLOSURE }, /* enclosure in RSS */ { "enclosure", RSS2_0_ENC_NS, 0 }, /* RDF output predicate, not an RSS field */ { "Enclosure", RSS2_0_ENC_NS, 0 }, /* RDF output class, not an RSS field */ { "url", RSS2_0_ENC_NS, 0 }, /* In RDF output, not an RSS field */ { "length", RSS2_0_ENC_NS, 0 }, /* In RDF output, not an RSS field */ { "type", RSS2_0_ENC_NS, 0 }, /* In RDF output, not an RSS field */ { "length", RSS2_0_NS, 0 }, { "type", RSS2_0_NS, 0 }, { "category", RSS0_92_NS, 0 }, { "comments", RSS0_92_NS, 0 }, { "items", RSS1_0_NS, 0 }, { "image", RSS1_0_NS, 0 }, { "textinput", RSS1_0_NS, 0 }, { "copyright", ATOM0_3_NS, 0 }, { "created", ATOM0_3_NS, 0 }, { "issued", ATOM0_3_NS, 0 }, { "modified", ATOM0_3_NS, 0 }, { "tagline", ATOM0_3_NS, 0 }, /* atom 1.0 required fields */ { "id", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "title", ATOM1_0_NS, 0 }, { "updated", ATOM1_0_NS, 0 }, /* atom 1.0 optional fields */ { "author", ATOM1_0_NS, 0, RAPTOR_ATOM_AUTHOR }, { "category", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE, RAPTOR_ATOM_CATEGORY }, { "content", ATOM1_0_NS, 0 }, { "contributor", ATOM1_0_NS, 0 }, { "email", ATOM1_0_NS, 0 }, { "entry", ATOM1_0_NS, 0 }, { "feed", ATOM1_0_NS, 0 }, { "generator", ATOM1_0_NS, 0 }, { "icon", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "link", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE, RAPTOR_ATOM_LINK }, { "logo", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "name", ATOM1_0_NS, 0 }, { "published", ATOM1_0_NS, 0 }, { "rights", ATOM1_0_NS, 0 }, { "source", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE, RAPTOR_RSS_SOURCE }, { "subtitle", ATOM1_0_NS, 0 }, { "summary", ATOM1_0_NS, 0 }, { "uri", ATOM1_0_NS, 0 }, { "Author", ATOM1_0_NS, 0 }, { "Category", ATOM1_0_NS, 0 }, { "Link", ATOM1_0_NS, 0 }, { "label", ATOM1_0_NS, 0 }, { "scheme", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "term", ATOM1_0_NS, 0 }, { "href", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "rel", ATOM1_0_NS, 0 }, { "type", ATOM1_0_NS, 0 }, { "hreflang", ATOM1_0_NS, 0 }, { "length", ATOM1_0_NS, 0 }, { "title", DC_NS, 0 }, { "contributor", DC_NS, 0 }, { "creator", DC_NS, 0 }, { "publisher", DC_NS, 0 }, { "subject", DC_NS, 0 }, { "description", DC_NS, 0 }, { "date", DC_NS, 0 }, { "type", DC_NS, 0 }, { "format", DC_NS, 0 }, { "identifier", DC_NS, 0 }, { "language", DC_NS, 0 }, { "relation", DC_NS, 0 }, { "source", DC_NS, 0 }, { "coverage", DC_NS, 0 }, { "rights", DC_NS, 0 }, { "encoded", CONTENT_NS, 0 }, { "contentType", ATOMTRIPLES_NS, 0 }, { "author", ITUNES_NS, 0 }, { "subtitle", ITUNES_NS, 0 }, { "summary", ITUNES_NS, 0 }, { "keywords", ITUNES_NS, 0 }, { "explicit", ITUNES_NS, 0 }, { "image", ITUNES_NS, 0 }, { "name", ITUNES_NS, 0 }, { "owner", ITUNES_NS, 0 }, { "block", ITUNES_NS, 0 }, { "category", ITUNES_NS, 0 }, { "email", ITUNES_NS, 0 }, { "<unknown>", RSS_UNKNOWN_NS, 0 }, { "<none>", RSS_UNKNOWN_NS, 0 } }; /* FIeld mappings from atom fields to RSS/DC */ const raptor_field_pair raptor_atom_to_rss[]={ /* rss clone of atom fields */ { RAPTOR_RSS_FIELD_ATOM_SUMMARY, RAPTOR_RSS_FIELD_DESCRIPTION }, { RAPTOR_RSS_FIELD_ATOM_ID, RAPTOR_RSS_FIELD_LINK }, { RAPTOR_RSS_FIELD_ATOM_UPDATED, RAPTOR_RSS_FIELD_DC_DATE }, { RAPTOR_RSS_FIELD_ATOM_RIGHTS, RAPTOR_RSS_FIELD_DC_RIGHTS }, { RAPTOR_RSS_FIELD_ATOM_TITLE, RAPTOR_RSS_FIELD_TITLE }, { RAPTOR_RSS_FIELD_ATOM_SUMMARY, RAPTOR_RSS_FIELD_CONTENT_ENCODED }, /* atom 0.3 to atom 1.0 */ { RAPTOR_RSS_FIELD_ATOM_COPYRIGHT, RAPTOR_RSS_FIELD_ATOM_RIGHTS }, { RAPTOR_RSS_FIELD_ATOM_TAGLINE, RAPTOR_RSS_FIELD_ATOM_SUBTITLE }, #if 0 /* other old atom 0.3 fields - IGNORED */ { RAPTOR_RSS_FIELD_ATOM_CREATED, RAPTOR_RSS_FIELD_UNKNOWN }, { RAPTOR_RSS_FIELD_ATOM_ISSUED, RAPTOR_RSS_FIELD_UNKNOWN }, { RAPTOR_RSS_FIELD_ATOM_MODIFIED, RAPTOR_RSS_FIELD_UNKNOWN }, #endif #ifdef RAPTOR_PARSEDATE_FUNCTION /* convert to ISO date */ { RAPTOR_RSS_FIELD_PUBDATE, RAPTOR_RSS_FIELD_DC_DATE, &raptor_rss_field_conversion_date_uplift }, #endif /* rss content encoded */ { RAPTOR_RSS_FIELD_DESCRIPTION, RAPTOR_RSS_FIELD_CONTENT_ENCODED }, { RAPTOR_RSS_FIELD_UNKNOWN, RAPTOR_RSS_FIELD_UNKNOWN } }; const raptor_rss_block_field_info raptor_rss_block_fields_info[RAPTOR_RSS_BLOCKS_SIZE+1] = { /* RSS 2 <enclosure> - optional element inside <item> attributes: url (required): where the enclosure is located. url length (required): how big enclosure it is in bytes. integer type (required): what enclosure type is as a standard MIME type. string content: empty */ { RAPTOR_RSS_ENCLOSURE, "url", RSS_BLOCK_FIELD_TYPE_URL, 0, RAPTOR_RSS_RDF_ENCLOSURE_URL }, { RAPTOR_RSS_ENCLOSURE, "length", RSS_BLOCK_FIELD_TYPE_STRING, 0, RAPTOR_RSS_RDF_ENCLOSURE_LENGTH }, { RAPTOR_RSS_ENCLOSURE, "type", RSS_BLOCK_FIELD_TYPE_STRING, 1, RAPTOR_RSS_RDF_ENCLOSURE_TYPE }, /* RSS 2 <source> - optional element inside <item> attributes: url (required): location of source. url content: source name. string */ { RAPTOR_RSS_SOURCE, "url", RSS_BLOCK_FIELD_TYPE_URL, 0 }, /* Atom <category> - optional element inside <entry> attributes: term (required): the category. string scheme (optional): categorization scheme. url label (optional): human-readable label. string content: empty */ { RAPTOR_ATOM_CATEGORY, "term", RSS_BLOCK_FIELD_TYPE_STRING, 0, RAPTOR_RSS_FIELD_ATOM_TERM }, { RAPTOR_ATOM_CATEGORY, "scheme", RSS_BLOCK_FIELD_TYPE_URL, 0, RAPTOR_RSS_FIELD_ATOM_SCHEME }, { RAPTOR_ATOM_CATEGORY, "label", RSS_BLOCK_FIELD_TYPE_STRING, 1, RAPTOR_RSS_FIELD_ATOM_LABEL }, /* Atom <link> - optional element inside <entry> attributes: href (required): . url rel (optional): . string type (optional): . string hreflang (optional): . string title (optional): . string length (optional): . string content: empty */ { RAPTOR_ATOM_LINK, "href", RSS_BLOCK_FIELD_TYPE_URL, 0, RAPTOR_RSS_FIELD_ATOM_HREF }, { RAPTOR_ATOM_LINK, "rel", RSS_BLOCK_FIELD_TYPE_STRING, 0, RAPTOR_RSS_FIELD_ATOM_REL }, { RAPTOR_ATOM_LINK, "type", RSS_BLOCK_FIELD_TYPE_STRING, 1, RAPTOR_RSS_FIELD_ATOM_TYPE }, { RAPTOR_ATOM_LINK, "hreflang", RSS_BLOCK_FIELD_TYPE_STRING, 2, RAPTOR_RSS_FIELD_ATOM_HREFLANG }, { RAPTOR_ATOM_LINK, "title", RSS_BLOCK_FIELD_TYPE_STRING, 3, RAPTOR_RSS_FIELD_ATOM_TITLE }, { RAPTOR_ATOM_LINK, "length", RSS_BLOCK_FIELD_TYPE_STRING, 4, RAPTOR_RSS_FIELD_ATOM_LENGTH }, { RAPTOR_ATOM_LINK, NULL, RSS_BLOCK_FIELD_TYPE_URL, 0, RAPTOR_RSS_FIELD_ATOM_HREF }, /* sentinel */ { RAPTOR_RSS_NONE, NULL, 0, 0 } }; const unsigned char * const raptor_atom_namespace_uri=(const unsigned char *)"http://www.w3.org/2005/Atom"; int raptor_rss_common_init(raptor_world* world) { int i; raptor_uri *namespace_uri; if(world->rss_common_initialised++) return 0; world->rss_namespaces_info_uris=(raptor_uri**)RAPTOR_CALLOC(raptor_uri* array, RAPTOR_RSS_NAMESPACES_SIZE, sizeof(raptor_uri*)); if(!world->rss_namespaces_info_uris) return -1; for(i=0; i<RAPTOR_RSS_NAMESPACES_SIZE;i++) { const char *uri_string=raptor_rss_namespaces_info[i].uri_string; if(uri_string) { world->rss_namespaces_info_uris[i]=raptor_new_uri_v2(world, (const unsigned char*)uri_string); if(!world->rss_namespaces_info_uris[i]) return -1; } } world->rss_types_info_uris=(raptor_uri**)RAPTOR_CALLOC(raptor_uri* array, RAPTOR_RSS_COMMON_SIZE, sizeof(raptor_uri*)); if(!world->rss_types_info_uris) return -1; for(i=0; i< RAPTOR_RSS_COMMON_SIZE; i++) { int n=raptor_rss_items_info[i].nspace; namespace_uri=world->rss_namespaces_info_uris[n]; if(namespace_uri) { world->rss_types_info_uris[i]=raptor_new_uri_from_uri_local_name_v2(world, namespace_uri, (const unsigned char*)raptor_rss_items_info[i].name); if(!world->rss_types_info_uris[i]) return -1; } } world->rss_fields_info_uris=(raptor_uri**)RAPTOR_CALLOC(raptor_uri* array, RAPTOR_RSS_FIELDS_SIZE, sizeof(raptor_uri*)); if(!world->rss_fields_info_uris) return -1; for(i=0; i< RAPTOR_RSS_FIELDS_SIZE; i++) { namespace_uri=world->rss_namespaces_info_uris[raptor_rss_fields_info[i].nspace]; if(namespace_uri) { world->rss_fields_info_uris[i]=raptor_new_uri_from_uri_local_name_v2(world, namespace_uri, (const unsigned char*)raptor_rss_fields_info[i].name); if(!world->rss_fields_info_uris[i]) return -1; } } return 0; } void raptor_rss_common_terminate(raptor_world* world) { int i; if(--world->rss_common_initialised) return; if(world->rss_types_info_uris) { for(i=0; i< RAPTOR_RSS_COMMON_SIZE; i++) { if(world->rss_types_info_uris[i]) raptor_free_uri_v2(world, world->rss_types_info_uris[i]); } RAPTOR_FREE(raptor_uri* array, world->rss_types_info_uris); world->rss_types_info_uris=NULL; } if(world->rss_fields_info_uris) { for(i=0; i< RAPTOR_RSS_FIELDS_SIZE; i++) { if(world->rss_fields_info_uris[i]) raptor_free_uri_v2(world, world->rss_fields_info_uris[i]); } RAPTOR_FREE(raptor_uri* array, world->rss_fields_info_uris); world->rss_fields_info_uris=NULL; } if(world->rss_namespaces_info_uris) { for(i=0; i<RAPTOR_RSS_NAMESPACES_SIZE;i++) { if(world->rss_namespaces_info_uris[i]) raptor_free_uri_v2(world, world->rss_namespaces_info_uris[i]); } RAPTOR_FREE(raptor_uri* array, world->rss_namespaces_info_uris); world->rss_namespaces_info_uris=NULL; } } void raptor_rss_model_init(raptor_world* world, raptor_rss_model* rss_model) { memset(rss_model->common, 0, sizeof(void*)*RAPTOR_RSS_COMMON_SIZE); rss_model->world=world; rss_model->last=rss_model->items=NULL; rss_model->items_count=0; RAPTOR_RSS_RDF_type_URI(rss_model)=raptor_new_uri_for_rdf_concept_v2(world, "type"); RAPTOR_RSS_RDF_Seq_URI(rss_model)=raptor_new_uri_for_rdf_concept_v2(world, "Seq"); RAPTOR_RSS_RSS_items_URI(rss_model)=raptor_new_uri_relative_to_base_v2(world, world->rss_namespaces_info_uris[RSS1_0_NS], (const unsigned char*)"items"); } void raptor_rss_model_clear(raptor_rss_model* rss_model) { int i; raptor_rss_item* item; for(i=0; i< RAPTOR_RSS_COMMON_SIZE; i++) { item=rss_model->common[i]; while(item) { raptor_rss_item *next=item->next; raptor_free_rss_item(item); item=next; } } item=rss_model->items; while(item) { raptor_rss_item *next=item->next; raptor_free_rss_item(item); item=next; } rss_model->last=rss_model->items=NULL; for(i=0; i< RAPTOR_RSS_N_CONCEPTS; i++) { raptor_uri* concept_uri=rss_model->concepts[i]; if(concept_uri) { raptor_free_uri_v2(rss_model->world, concept_uri); rss_model->concepts[i]=NULL; } } } raptor_rss_item* raptor_new_rss_item(raptor_world* world) { raptor_rss_item* item; item=(raptor_rss_item*)RAPTOR_CALLOC(raptor_rss_item, 1, sizeof(raptor_rss_item)); if(!item) return NULL; item->world=world; item->identifier.world=world; item->triples=raptor_new_sequence((raptor_sequence_free_handler*)raptor_free_statement_v2, (raptor_sequence_print_handler*)raptor_print_statement_v2); if(!item->triples) { RAPTOR_FREE(raptor_rss_item, item); return NULL; } return item; } int raptor_rss_model_add_item(raptor_rss_model* rss_model) { raptor_rss_item* item; item=raptor_new_rss_item(rss_model->world); if(!item) return 1; /* new list */ if(!rss_model->items) rss_model->items=item; /* join last item to this one */ if(rss_model->last) rss_model->last->next=item; /* this is now the last item */ rss_model->last=item; rss_model->items_count++; RAPTOR_DEBUG2("Added item %d\n", rss_model->items_count); return 0; } raptor_rss_item* raptor_rss_model_add_common(raptor_rss_model* rss_model, raptor_rss_type type) { raptor_rss_item* item; item=raptor_new_rss_item(rss_model->world); if(!item) return NULL; if(rss_model->common[type]==NULL) { RAPTOR_DEBUG3("Adding common type %d - %s\n", type, raptor_rss_items_info[type].name); rss_model->common[type]=item; } else { raptor_rss_item* next; RAPTOR_DEBUG3("Appending common type %d - %s\n", type, raptor_rss_items_info[type].name); for (next=rss_model->common[type]; next->next; next=next->next) ; next->next=item; } return item; } raptor_rss_item* raptor_rss_model_get_common(raptor_rss_model* rss_model, raptor_rss_type type) { raptor_rss_item* item; for(item=rss_model->common[type]; item && item->next; item=item->next) ; return item; } void raptor_free_rss_item(raptor_rss_item* item) { int i; for(i=0; i< RAPTOR_RSS_FIELDS_SIZE; i++) { if(item->fields[i]) raptor_rss_field_free(item->fields[i]); } if(item->blocks) raptor_free_rss_block(item->blocks); if(item->uri) raptor_free_uri_v2(item->world, item->uri); raptor_free_identifier(&item->identifier); if(item->triples) raptor_free_sequence(item->triples); RAPTOR_FREE(raptor_rss_item, item); } void raptor_rss_item_add_block(raptor_rss_item* item, raptor_rss_block *block) { if(!item->blocks) { RAPTOR_DEBUG1("Adding first block\n"); item->blocks = block; } else { raptor_rss_block *cur; RAPTOR_DEBUG1("Adding subsequent block\n"); for(cur = item->blocks; cur->next; cur = cur->next) ; cur->next = block; } } void raptor_rss_item_add_field(raptor_rss_item* item, int type, raptor_rss_field* field) { if(!item->fields[type]) { RAPTOR_DEBUG3("Adding first type %d field %s\n", type, raptor_rss_fields_info[type].name); item->fields_count++; item->fields[type]=field; } else { raptor_rss_field* cur; RAPTOR_DEBUG1("Adding subsequent field\n"); for(cur=item->fields[type]; cur->next; cur=cur->next) ; cur->next=field; } } int raptor_rss_item_equals_statement_subject(const raptor_rss_item *item, const raptor_statement *statement) { if(item->identifier.uri) return raptor_uri_equals_v2(item->world, (raptor_uri*)statement->subject, item->identifier.uri); return !strcmp((const char*)statement->subject, (const char*)item->identifier.id); } int raptor_rss_item_set_uri(raptor_rss_item *item, raptor_uri* uri) { RAPTOR_DEBUG3("Set node %p to URI <%s>\n", item, raptor_uri_as_string_v2(item->world, uri)); item->uri = raptor_uri_copy_v2(item->world, uri); if(!item->uri) return 1; uri = raptor_uri_copy_v2(item->world, item->uri); if(!uri) return 1; raptor_set_identifier_uri(&item->identifier, uri); return 0; } raptor_rss_block* raptor_new_rss_block(raptor_world* world, raptor_rss_type type, const unsigned char* id) { raptor_rss_block *block; block = (raptor_rss_block*)RAPTOR_CALLOC(raptor_rss_block, 1, sizeof(raptor_rss_block)); if(block) { raptor_identifier* identifier = &block->identifier; block->rss_type = type; block->node_type = world->rss_types_info_uris[type]; identifier->world = world; raptor_set_identifier_id(identifier, id); } else RAPTOR_FREE(cstring, id); return block; } void raptor_free_rss_block(raptor_rss_block *block) { int i; for(i = 0; i < RSS_BLOCK_MAX_URLS; i++) { if(block->urls[i]) raptor_free_uri_v2(block->identifier.world, block->urls[i]); } for(i = 0; i < RSS_BLOCK_MAX_STRINGS; i++) { if(block->strings[i]) RAPTOR_FREE(cstring, block->strings[i]); } if(block->next) raptor_free_rss_block(block->next); raptor_free_identifier(&(block->identifier)); RAPTOR_FREE(raptor_rss_block, block); } raptor_rss_field* raptor_rss_new_field(raptor_world* world) { raptor_rss_field* field=(raptor_rss_field*)RAPTOR_CALLOC(raptor_rss_field, 1, sizeof(raptor_rss_field)); if(field) field->world=world; return field; } void raptor_rss_field_free(raptor_rss_field* field) { if(field->value) RAPTOR_FREE(cstring, field->value); if(field->uri) raptor_free_uri_v2(field->world, field->uri); if(field->next) raptor_rss_field_free(field->next); RAPTOR_FREE(raptor_rss_field, field); } #define RAPTOR_ISO_DATE_FORMAT "%Y-%m-%dT%H:%M:%SZ" int raptor_rss_format_iso_date(char* buffer, size_t len, time_t unix_time) { struct tm* structured_time; if(len < RAPTOR_ISO_DATE_LEN) return 1; structured_time=gmtime(&unix_time); strftime(buffer, len+1, RAPTOR_ISO_DATE_FORMAT, structured_time); return 0; } int raptor_rss_set_date_field(raptor_rss_field* field, time_t unix_time) { size_t len=RAPTOR_ISO_DATE_LEN; if(field->value) RAPTOR_FREE(cstring, field->value); field->value=(unsigned char*)RAPTOR_MALLOC(cstring, len + 1); if(!field->value) return 1; if(raptor_rss_format_iso_date((char*)field->value, len, unix_time)) { RAPTOR_FREE(cstring, field->value); return 1; } return 0; } static int raptor_rss_field_conversion_date_uplift(raptor_rss_field* from_field, raptor_rss_field* to_field) { #ifdef RAPTOR_PARSEDATE_FUNCTION time_t unix_time; char *date_string = (char*)from_field->value; if(!date_string) return 1; unix_time = RAPTOR_PARSEDATE_FUNCTION(date_string, NULL); if(unix_time < 0) return 1; return raptor_rss_set_date_field(to_field, unix_time); #else return 1; #endif } ���������������raptor-1.4.21/src/raptor_sax2.c���������������������������������������������������������������������0000644�0001750�0001750�00000073322�11330672502�013234� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_sax2.c - Raptor SAX2 API * * Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* Define this for far too much output */ #undef RAPTOR_DEBUG_CDATA int raptor_sax2_init(raptor_world* world) { if(world->sax2_initialized++) return 0; #ifdef RAPTOR_XML_LIBXML xmlInitParser(); #endif return 0; } void raptor_sax2_finish(raptor_world* world) { if(--world->sax2_initialized) return; #ifdef RAPTOR_XML_LIBXML /* Should call this after all uses of libxml are done. * In particular after xmlSetStructuredErrorFunc() otherwise * it has reportedly caused an access violation on windows. */ xmlCleanupParser(); #endif } /** * raptor_new_sax2: * @user_data: pointer context information to pass to handlers * @error_handlers: error handlers pointer * * Constructor - Create a new SAX2 with error handlers * * Return value: new #raptor_sax2 object or NULL on failure */ raptor_sax2* raptor_new_sax2(void* user_data, raptor_error_handlers* error_handlers) { raptor_sax2* sax2; sax2=(raptor_sax2*)RAPTOR_CALLOC(raptor_sax2, 1, sizeof(raptor_sax2)); if(!sax2) return NULL; #ifdef RAPTOR_XML_LIBXML sax2->magic=RAPTOR_LIBXML_MAGIC; #endif sax2->world=error_handlers->world; sax2->user_data=user_data; sax2->locator=error_handlers->locator; sax2->error_handlers=error_handlers; #ifdef RAPTOR_XML_LIBXML if(sax2->world->libxml_flags & RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE) { sax2->saved_structured_error_context = xmlGenericErrorContext; sax2->saved_structured_error_handler = xmlStructuredError; /* sets xmlGenericErrorContext and xmlStructuredError */ xmlSetStructuredErrorFunc(&sax2->error_handlers, (xmlStructuredErrorFunc)raptor_libxml_xmlStructuredErrorFunc); } if(sax2->world->libxml_flags & RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE) { sax2->saved_generic_error_context = xmlGenericErrorContext; sax2->saved_generic_error_handler = xmlGenericError; /* sets xmlGenericErrorContext and xmlGenericError */ xmlSetGenericErrorFunc(&sax2->error_handlers, (xmlGenericErrorFunc)raptor_libxml_generic_error); } #endif return sax2; } /** * raptor_free_sax2: * @sax2: SAX2 object * * Destructor - destroy a SAX2 object */ void raptor_free_sax2(raptor_sax2 *sax2) { raptor_xml_element *xml_element; RAPTOR_ASSERT_OBJECT_POINTER_RETURN(sax2, raptor_sax2); #ifdef RAPTOR_XML_EXPAT if(sax2->xp) { XML_ParserFree(sax2->xp); sax2->xp=NULL; } #endif #ifdef RAPTOR_XML_LIBXML if(sax2->xc) { raptor_libxml_free(sax2->xc); sax2->xc=NULL; } if(sax2->world->libxml_flags & RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE) xmlSetStructuredErrorFunc(sax2->saved_structured_error_context, sax2->saved_structured_error_handler); if(sax2->world->libxml_flags & RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE) xmlSetGenericErrorFunc(sax2->saved_generic_error_context, sax2->saved_generic_error_handler); #endif while( (xml_element=raptor_xml_element_pop(sax2)) ) raptor_free_xml_element(xml_element); raptor_namespaces_clear(&sax2->namespaces); if(sax2->base_uri) raptor_free_uri_v2(sax2->world, sax2->base_uri); RAPTOR_FREE(raptor_sax2, sax2); } /** * raptor_sax2_set_start_element_handler: * @sax2: SAX2 object * @handler: start element handler * * Set SAX2 start element handler. */ void raptor_sax2_set_start_element_handler(raptor_sax2* sax2, raptor_sax2_start_element_handler handler) { sax2->start_element_handler=handler; } /** * raptor_sax2_set_end_element_handler: * @sax2: SAX2 object * @handler: end element handler * * Set SAX2 end element handler. */ void raptor_sax2_set_end_element_handler(raptor_sax2* sax2, raptor_sax2_end_element_handler handler) { sax2->end_element_handler=handler; } /** * raptor_sax2_set_characters_handler: * @sax2: SAX2 object * @handler: characters handler * * Set SAX2 characters handler. */ void raptor_sax2_set_characters_handler(raptor_sax2* sax2, raptor_sax2_characters_handler handler) { sax2->characters_handler=handler; } /** * raptor_sax2_set_cdata_handler: * @sax2: SAX2 object * @handler: CDATA handler * * Set SAX2 CDATA handler. */ void raptor_sax2_set_cdata_handler(raptor_sax2* sax2, raptor_sax2_cdata_handler handler) { sax2->cdata_handler=handler; } /** * raptor_sax2_set_comment_handler: * @sax2: SAX2 object * @handler: comment handler * * Set SAX2 XML comment handler. */ void raptor_sax2_set_comment_handler(raptor_sax2* sax2, raptor_sax2_comment_handler handler) { sax2->comment_handler=handler; } /** * raptor_sax2_set_unparsed_entity_decl_handler: * @sax2: SAX2 object * @handler: unparsed entity declaration handler * * Set SAX2 XML unparsed entity declaration handler. */ void raptor_sax2_set_unparsed_entity_decl_handler(raptor_sax2* sax2, raptor_sax2_unparsed_entity_decl_handler handler) { sax2->unparsed_entity_decl_handler=handler; } /** * raptor_sax2_set_external_entity_ref_handler: * @sax2: SAX2 object * @handler: entity reference handler * * Set SAX2 XML entity reference handler. */ void raptor_sax2_set_external_entity_ref_handler(raptor_sax2* sax2, raptor_sax2_external_entity_ref_handler handler) { sax2->external_entity_ref_handler=handler; } /** * raptor_sax2_set_namespace_handler: * @sax2: #raptor_sax2 object * @handler: new namespace callback function * * Set the XML namespace handler function. * * When a prefix/namespace is seen in an XML parser, call the given * @handler with the prefix string and the #raptor_uri namespace URI. * Either can be NULL for the default prefix or default namespace. * * The handler function does not deal with duplicates so any * namespace may be declared multiple times when a namespace is seen * in different parts of a document. * */ void raptor_sax2_set_namespace_handler(raptor_sax2* sax2, raptor_namespace_handler handler) { sax2->namespace_handler=handler; } raptor_xml_element* raptor_xml_element_pop(raptor_sax2 *sax2) { raptor_xml_element *element=sax2->current_element; if(!element) return NULL; sax2->current_element=element->parent; if(sax2->root_element == element) /* just deleted root */ sax2->root_element=NULL; return element; } void raptor_xml_element_push(raptor_sax2 *sax2, raptor_xml_element* element) { element->parent=sax2->current_element; sax2->current_element=element; if(!sax2->root_element) sax2->root_element=element; } /** * raptor_xml_element_is_empty: * @xml_element: XML Element * * Check if an XML Element is empty. * * Return value: non-0 if the element is empty. */ int raptor_xml_element_is_empty(raptor_xml_element* xml_element) { return !xml_element->content_cdata_seen && !xml_element->content_element_seen; } /** * raptor_sax2_inscope_xml_language: * @sax2: SAX2 object * * Get the in-scope XML language * * Return value: the XML language or NULL if none is in scope. */ const unsigned char* raptor_sax2_inscope_xml_language(raptor_sax2 *sax2) { raptor_xml_element* xml_element; for(xml_element=sax2->current_element; xml_element; xml_element=xml_element->parent) if(xml_element->xml_language) { if(!*xml_element->xml_language) return NULL; return xml_element->xml_language; } return NULL; } /** * raptor_sax2_inscope_base_uri: * @sax2: SAX2 object * * Get the in-scope base URI * * Return value: the in-scope base URI shared object or NULL if none is in scope. */ raptor_uri* raptor_sax2_inscope_base_uri(raptor_sax2 *sax2) { raptor_xml_element *xml_element; for(xml_element=sax2->current_element; xml_element; xml_element=xml_element->parent) if(xml_element->base_uri) return xml_element->base_uri; return sax2->base_uri; } int raptor_sax2_get_depth(raptor_sax2 *sax2) { return sax2->depth; } void raptor_sax2_inc_depth(raptor_sax2 *sax2) { sax2->depth++; } void raptor_sax2_dec_depth(raptor_sax2 *sax2) { sax2->depth--; } static void raptor_sax2_simple_error(void* user_data, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); /* * raptor_sax2_simple_error - Error from a sax2 - Internal * * Matches the raptor_simple_message_handler API but calls * the sax2 error_handler */ static void raptor_sax2_simple_error(void* user_data, const char *message, ...) { raptor_sax2* sax2=(raptor_sax2*)user_data; va_list arguments; va_start(arguments, message); if(sax2) { raptor_log_level level=RAPTOR_LOG_LEVEL_ERROR; raptor_message_handler_closure* cl; cl=&sax2->error_handlers->handlers[level]; raptor_log_error_varargs(sax2->world, level, cl->handler, cl->user_data, sax2->locator, message, arguments); } va_end(arguments); } /** * raptor_sax2_parse_start: * @sax2: sax2 object * @base_uri: base URI * * Start an XML SAX2 parse. */ void raptor_sax2_parse_start(raptor_sax2* sax2, raptor_uri *base_uri) { sax2->depth=0; sax2->root_element=NULL; sax2->current_element=NULL; if(sax2->base_uri) raptor_free_uri_v2(sax2->world, sax2->base_uri); if(base_uri) sax2->base_uri=raptor_uri_copy_v2(sax2->world, base_uri); else sax2->base_uri=NULL; #ifdef RAPTOR_XML_EXPAT if(sax2->xp) { XML_ParserFree(sax2->xp); sax2->xp=NULL; } raptor_expat_init(sax2, base_uri); #endif #ifdef RAPTOR_XML_LIBXML raptor_libxml_init(sax2, base_uri); xmlSetStructuredErrorFunc(&sax2->error_handlers, raptor_libxml_xmlStructuredErrorFunc); #if LIBXML_VERSION < 20425 sax2->first_read=1; #endif if(sax2->xc) { raptor_libxml_free(sax2->xc); sax2->xc=NULL; } #endif raptor_namespaces_clear(&sax2->namespaces); if(raptor_namespaces_init_v2(sax2->world, &sax2->namespaces, (raptor_simple_message_handler)raptor_sax2_simple_error, sax2, 1)) { /* log a fatal error and set sax2 to failed state since the function signature does not currently support returning an error */ raptor_log_error_to_handlers(sax2->world, sax2->error_handlers, RAPTOR_LOG_LEVEL_FATAL, sax2->locator, "raptor_namespaces_init_v2() failed"); sax2->failed = 1; } } /** * raptor_sax2_parse_chunk: * @sax2: sax2 object * @buffer: input buffer * @len: input buffer lenght * @is_end: non-0 if end of data * * Parse a chunk of XML data generating SAX2 events * * Return value: non-0 on failure */ int raptor_sax2_parse_chunk(raptor_sax2* sax2, const unsigned char *buffer, size_t len, int is_end) { #ifdef RAPTOR_XML_EXPAT XML_Parser xp=sax2->xp; int rc; #endif #ifdef RAPTOR_XML_LIBXML /* parser context */ xmlParserCtxtPtr xc=sax2->xc; int rc; #endif #ifdef RAPTOR_XML_LIBXML if(!xc) { int libxml_options = 0; if(!len) { /* no data given at all - emit a similar message to expat */ raptor_sax2_update_document_locator(sax2, sax2->locator); raptor_log_error_to_handlers(sax2->world, sax2->error_handlers, RAPTOR_LOG_LEVEL_ERROR, sax2->locator, "XML Parsing failed - no element found"); return 1; } xc = xmlCreatePushParserCtxt(&sax2->sax, sax2, /* user data */ (char*)buffer, len, NULL); if(!xc) goto handle_error; #ifdef RAPTOR_LIBXML_XML_PARSE_NONET if(sax2->feature_no_net) libxml_options |= XML_PARSE_NONET; #endif #ifdef HAVE_XMLCTXTUSEOPTIONS xmlCtxtUseOptions(xc, libxml_options); #endif xc->userData = sax2; /* user data */ xc->vctxt.userData = sax2; /* user data */ xc->vctxt.error=(xmlValidityErrorFunc)raptor_libxml_validation_error; xc->vctxt.warning=(xmlValidityWarningFunc)raptor_libxml_validation_warning; xc->replaceEntities = 1; sax2->xc = xc; if(is_end) len=0; else return 0; } #endif if(!len) { #ifdef RAPTOR_XML_EXPAT rc=XML_Parse(xp, (char*)buffer, 0, 1); if(!rc) /* expat: 0 is failure */ goto handle_error; #endif #ifdef RAPTOR_XML_LIBXML xmlParseChunk(xc, (char*)buffer, 0, 1); #endif return 0; } #ifdef RAPTOR_XML_EXPAT rc=XML_Parse(xp, (char*)buffer, len, is_end); if(!rc) /* expat: 0 is failure */ goto handle_error; if(is_end) return 0; #endif #ifdef RAPTOR_XML_LIBXML /* This works around some libxml versions that fail to work * if the buffer size is larger than the entire file * and thus the entire parsing is done in one operation. * * The code below: * 2.4.19 (oldest tested) to 2.4.24 - required * 2.4.25 - works with or without it * 2.4.26 or later - fails with this code */ #if LIBXML_VERSION < 20425 if(sax2->first_read && is_end) { /* parse all but the last character */ rc = xmlParseChunk(xc, (char*)buffer, len-1, 0); if(rc && rc != XML_WAR_UNDECLARED_ENTITY) goto handle_error; /* last character */ rc = xmlParseChunk(xc, (char*)buffer + (len-1), 1, 0); if(rc && rc != XML_WAR_UNDECLARED_ENTITY) goto handle_error; /* end */ xmlParseChunk(xc, (char*)buffer, 0, 1); return 0; } #endif #if LIBXML_VERSION < 20425 sax2->first_read=0; #endif rc = xmlParseChunk(xc, (char*)buffer, len, is_end); if(rc && rc != XML_WAR_UNDECLARED_ENTITY) /* libxml: non 0 is failure */ goto handle_error; if(is_end) return 0; #endif return 0; #if defined(RAPTOR_XML_EXPAT) || defined(RAPTOR_XML_LIBXML) handle_error: #endif #ifdef RAPTOR_XML_EXPAT #ifdef EXPAT_UTF8_BOM_CRASH if(sax2->tokens_count) { #endif /* Work around a bug with the expat 1.95.1 shipped with RedHat 7.2 * which dies here if the error is before <?xml?... * The expat 1.95.1 source release version works fine. */ if(sax2->locator) raptor_sax2_update_document_locator(sax2, sax2->locator); #ifdef EXPAT_UTF8_BOM_CRASH } #endif #endif /* EXPAT */ #ifdef RAPTOR_XML_EXPAT if(1) { const char *error_prefix="XML Parsing failed - "; /* 21 chars */ #define ERROR_PREFIX_LEN 21 const char *error_message=XML_ErrorString(XML_GetErrorCode(xp)); size_t error_length; char *error_buffer; error_length=strlen(error_message); error_buffer=(char*)RAPTOR_MALLOC(cstring, ERROR_PREFIX_LEN + error_length+1); if(error_buffer) { strncpy(error_buffer, error_prefix, ERROR_PREFIX_LEN); strncpy(error_buffer+ERROR_PREFIX_LEN, error_message, error_length+1); raptor_log_error_to_handlers(sax2->world, sax2->error_handlers, RAPTOR_LOG_LEVEL_ERROR, sax2->locator, error_buffer); RAPTOR_FREE(cstring, error_buffer); } else raptor_log_error_to_handlers(sax2->world, sax2->error_handlers, RAPTOR_LOG_LEVEL_ERROR, sax2->locator, "XML Parsing failed"); } #endif return 1; } /** * raptor_sax2_set_feature: * @sax2: #raptor_sax2 SAX2 object * @feature: feature to set from enumerated #raptor_feature values * @value: integer feature value (0 or larger) * * Set various SAX2 features. * * The allowed features are available via raptor_sax2_features_enumerate(). * * Return value: non 0 on failure or if the feature is unknown */ int raptor_sax2_set_feature(raptor_sax2 *sax2, raptor_feature feature, int value) { if(value < 0) return -1; switch(feature) { case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: sax2->feature_normalize_language=value; break; case RAPTOR_FEATURE_NO_NET: sax2->feature_no_net=value; break; case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ASSUME_IS_RDF: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: case RAPTOR_FEATURE_RELATIVE_URIS: case RAPTOR_FEATURE_START_URI: case RAPTOR_FEATURE_WRITER_AUTO_INDENT: case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: case RAPTOR_FEATURE_WRITER_XML_VERSION: case RAPTOR_FEATURE_WRITER_XML_DECLARATION: /* DOT serializer features */ case RAPTOR_FEATURE_RESOURCE_BORDER: case RAPTOR_FEATURE_LITERAL_BORDER: case RAPTOR_FEATURE_BNODE_BORDER: case RAPTOR_FEATURE_RESOURCE_FILL: case RAPTOR_FEATURE_LITERAL_FILL: case RAPTOR_FEATURE_BNODE_FILL: /* JSON serializer features */ case RAPTOR_FEATURE_JSON_CALLBACK: case RAPTOR_FEATURE_JSON_EXTRA_DATA: case RAPTOR_FEATURE_RSS_TRIPLES: case RAPTOR_FEATURE_ATOM_ENTRY_URI: case RAPTOR_FEATURE_PREFIX_ELEMENTS: /* Turtle serializer feature */ case RAPTOR_FEATURE_WRITE_BASE_URI: /* WWW feature */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: return -1; break; } return 0; } void raptor_sax2_update_document_locator(raptor_sax2* sax2, raptor_locator* locator) { #ifdef RAPTOR_XML_EXPAT raptor_expat_update_document_locator(sax2, locator); #endif #ifdef RAPTOR_XML_LIBXML raptor_libxml_update_document_locator(sax2, locator); #endif } /* start of an element */ void raptor_sax2_start_element(void* user_data, const unsigned char *name, const unsigned char **atts) { raptor_sax2* sax2=(raptor_sax2*)user_data; raptor_qname* el_name; unsigned char **xml_atts_copy=NULL; size_t xml_atts_size=0; int all_atts_count=0; int ns_attributes_count=0; raptor_qname** named_attrs=NULL; raptor_xml_element* xml_element=NULL; unsigned char *xml_language=NULL; raptor_uri *xml_base=NULL; if(sax2->failed) return; #ifdef RAPTOR_XML_EXPAT #ifdef EXPAT_UTF8_BOM_CRASH sax2->tokens_count++; #endif #endif #ifdef RAPTOR_XML_LIBXML if(atts) { int i; /* Do XML attribute value normalization */ for (i = 0; atts[i]; i+=2) { unsigned char *value=(unsigned char*)atts[i+1]; unsigned char *src = value; unsigned char *dst = xmlStrdup(value); if(!dst) { raptor_log_error_to_handlers(sax2->world, sax2->error_handlers, RAPTOR_LOG_LEVEL_FATAL, sax2->locator, "Out of memory"); return; } atts[i+1]=dst; while (*src == 0x20 || *src == 0x0d || *src == 0x0a || *src == 0x09) src++; while (*src) { if (*src == 0x20 || *src == 0x0d || *src == 0x0a || *src == 0x09) { while (*src == 0x20 || *src == 0x0d || *src == 0x0a || *src == 0x09) src++; if (*src) *dst++ = 0x20; } else { *dst++ = *src++; } } *dst = '\0'; xmlFree(value); } } #endif raptor_sax2_inc_depth(sax2); if(atts) { int i; /* Save passed in XML attributes pointers so we can * NULL the pointers when they get handled below (various atts[i]=NULL) */ for (i = 0; atts[i]; i++) ; xml_atts_size=sizeof(unsigned char*) * i; if(xml_atts_size) { xml_atts_copy=(unsigned char**)RAPTOR_MALLOC(cstringpointer,xml_atts_size); if(!xml_atts_copy) goto fail; memcpy(xml_atts_copy, atts, xml_atts_size); } /* XML attributes processing: * xmlns* - XML namespaces (Namespaces in XML REC) * Deleted and used to synthesise namespaces declarations * xml:lang - XML language (XML REC) * Deleted and optionally normalised to lowercase * xml:base - XML Base (XML Base REC) * Deleted and used to set the in-scope base URI for this XML element */ for (i = 0; atts[i]; i+= 2) { all_atts_count++; if(strncmp((char*)atts[i], "xml", 3)) { /* count and skip non xml* attributes */ ns_attributes_count++; continue; } /* synthesise the XML namespace events */ if(!memcmp((const char*)atts[i], "xmlns", 5)) { const unsigned char *prefix=atts[i][5] ? &atts[i][6] : NULL; const unsigned char *namespace_name=atts[i+1]; raptor_namespace* nspace; nspace=raptor_new_namespace(&sax2->namespaces, prefix, namespace_name, raptor_sax2_get_depth(sax2)); if(nspace) { raptor_namespaces_start_namespace(&sax2->namespaces, nspace); if(sax2->namespace_handler) (*sax2->namespace_handler)(sax2->user_data, nspace); } } else if(!strcmp((char*)atts[i], "xml:lang")) { xml_language=(unsigned char*)RAPTOR_MALLOC(cstring, strlen((char*)atts[i+1])+1); if(!xml_language) { raptor_log_error_to_handlers(sax2->world, sax2->error_handlers, RAPTOR_LOG_LEVEL_FATAL, sax2->locator, "Out of memory"); goto fail; } /* optionally normalize language to lowercase */ if(sax2->feature_normalize_language) { unsigned char *from=(unsigned char*)atts[i+1]; unsigned char *to=xml_language; while(*from) { if(isupper(*from)) *to++ =tolower(*from++); else *to++ =*from++; } *to='\0'; } else strcpy((char*)xml_language, (char*)atts[i+1]); } else if(!strcmp((char*)atts[i], "xml:base")) { raptor_uri* base_uri; raptor_uri* xuri; base_uri=raptor_sax2_inscope_base_uri(sax2); xuri=raptor_new_uri_relative_to_base_v2(sax2->world, base_uri, atts[i+1]); xml_base=raptor_new_uri_for_xmlbase_v2(sax2->world, xuri); raptor_free_uri_v2(sax2->world, xuri); } /* delete all xml attributes whether processed above or not */ atts[i]=NULL; } } /* Create new element structure */ el_name=raptor_new_qname(&sax2->namespaces, name, NULL, (raptor_simple_message_handler)raptor_sax2_simple_error, sax2); if(!el_name) goto fail; xml_element=raptor_new_xml_element(el_name, xml_language, xml_base); if(!xml_element) { raptor_free_qname(el_name); goto fail; } /* xml_language,xml_base now owned by xml_element */ xml_language = NULL; xml_base = NULL; /* Turn string attributes into namespaced-attributes */ if(ns_attributes_count) { int i; int offset = 0; /* Allocate new array to hold namespaced-attributes */ named_attrs=(raptor_qname**)RAPTOR_CALLOC(raptor_qname_array, ns_attributes_count, sizeof(raptor_qname*)); if(!named_attrs) { raptor_log_error_to_handlers(sax2->world, sax2->error_handlers, RAPTOR_LOG_LEVEL_FATAL, sax2->locator, "Out of memory"); goto fail; } for (i = 0; i < all_atts_count; i++) { raptor_qname* attr; /* Skip previously processed attributes */ if(!atts[i<<1]) continue; /* namespace-name[i] stored in named_attrs[i] */ attr=raptor_new_qname(&sax2->namespaces, atts[i<<1], atts[(i<<1)+1], (raptor_simple_message_handler)raptor_sax2_simple_error, sax2); if(!attr) { /* failed - tidy up and return */ int j; for (j=0; j < i; j++) RAPTOR_FREE(raptor_qname, named_attrs[j]); RAPTOR_FREE(raptor_qname_array, named_attrs); goto fail; } named_attrs[offset++]=attr; } } /* end if ns_attributes_count */ if(named_attrs) raptor_xml_element_set_attributes(xml_element, named_attrs, ns_attributes_count); raptor_xml_element_push(sax2, xml_element); if(sax2->start_element_handler) sax2->start_element_handler(sax2->user_data, xml_element); if(xml_atts_copy) { /* Restore passed in XML attributes, free the copy */ memcpy((void*)atts, xml_atts_copy, xml_atts_size); RAPTOR_FREE(cstringpointer, xml_atts_copy); } return; fail: if(xml_atts_copy) RAPTOR_FREE(cstringpointer, xml_atts_copy); if(xml_base) raptor_free_uri_v2(sax2->world, xml_base); if(xml_language) RAPTOR_FREE(cstring, xml_language); if(xml_element) raptor_free_xml_element(xml_element); } /* end of an element */ void raptor_sax2_end_element(void* user_data, const unsigned char *name) { raptor_sax2* sax2=(raptor_sax2*)user_data; raptor_xml_element* xml_element; if(sax2->failed) return; #ifdef RAPTOR_XML_EXPAT #ifdef EXPAT_UTF8_BOM_CRASH sax2->tokens_count++; #endif #endif xml_element=sax2->current_element; if(xml_element) { #ifdef RAPTOR_DEBUG_VERBOSE fprintf(stderr, "\nraptor_rdfxml_end_element_handler: End ns-element: "); raptor_qname_print(stderr, xml_element->name); fputc('\n', stderr); #endif if(sax2->end_element_handler) sax2->end_element_handler(sax2->user_data, xml_element); } raptor_namespaces_end_for_depth(&sax2->namespaces, raptor_sax2_get_depth(sax2)); xml_element=raptor_xml_element_pop(sax2); if(xml_element) raptor_free_xml_element(xml_element); raptor_sax2_dec_depth(sax2); } /* characters */ void raptor_sax2_characters(void* user_data, const unsigned char *s, int len) { raptor_sax2* sax2=(raptor_sax2*)user_data; if(!sax2->failed && sax2->characters_handler) sax2->characters_handler(sax2->user_data, sax2->current_element, s, len); } /* like <![CDATA[...]> */ void raptor_sax2_cdata(void* user_data, const unsigned char *s, int len) { raptor_sax2* sax2=(raptor_sax2*)user_data; #ifdef RAPTOR_XML_EXPAT #ifdef EXPAT_UTF8_BOM_CRASH sax2->tokens_count++; #endif #endif if(!sax2->failed && sax2->cdata_handler) sax2->cdata_handler(sax2->user_data, sax2->current_element, s, len); } /* comment */ void raptor_sax2_comment(void* user_data, const unsigned char *s) { raptor_sax2* sax2=(raptor_sax2*)user_data; if(!sax2->failed && sax2->comment_handler) sax2->comment_handler(sax2->user_data, sax2->current_element, s); } /* unparsed (NDATA) entity */ void raptor_sax2_unparsed_entity_decl(void* user_data, const unsigned char* entityName, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId, const unsigned char* notationName) { raptor_sax2* sax2=(raptor_sax2*)user_data; if(!sax2->failed && sax2->unparsed_entity_decl_handler) sax2->unparsed_entity_decl_handler(sax2->user_data, entityName, base, systemId, publicId, notationName); } /* external entity reference */ int raptor_sax2_external_entity_ref(void* user_data, const unsigned char* context, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId) { raptor_sax2* sax2=(raptor_sax2*)user_data; if(sax2->failed) return 0; if(sax2->external_entity_ref_handler) return sax2->external_entity_ref_handler(sax2->user_data, context, base, systemId, publicId); raptor_sax2_simple_error((void*)sax2, "Failed to handle external entity reference with base %s systemId %s publicId %s", (base ? (const char*)base : "(None)"), systemId, (publicId ? (const char*)publicId: "(None)")); /* Failed to handle external entity reference */ return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_nfc_test.c�����������������������������������������������������������������0000644�0001750�0001750�00000015275�11330672502�014167� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_nfc_test.c - Raptor Unicode NFC validation check * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * It operates over the Unicode NormalizationTest.txt * which tests normalization the process, NOT normalization checking. * It says: * " CONFORMANCE: * 1. The following invariants must be true for all conformant implementations * NFC * c2 == NFC(c1) == NFC(c2) == NFC(c3) * c4 == NFC(c4) == NFC(c5) * " * * It does NOT require that c1, c3 and c5 are NFC. */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> /* for isprint() */ #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #include "raptor_nfc.h" #undef RAPTOR_NFC_DECODE_DEBUG /* * decode_to_utf8: * @utf8_string: destination utf8 buffer (FIXME big enough!) * @unicode_string: first char of string * @end: last char of unicode_string */ static int decode_to_utf8(unsigned char *utf8_string, size_t utf8_string_length, const char *unicode_string, const char *end) { unsigned char *u=utf8_string; const char *p=unicode_string; #ifdef RAPTOR_NFC_DECODE_DEBUG fputs("decode_to_utf8: string '", stderr); (void)fwrite(unicode_string, sizeof(char), (end-unicode_string)+1, stderr); fputs("' converts to:\n ", stderr); #endif while(p < end) { unsigned long c=0; char *endptr; if(*p == ' ') { p++; continue; } c=(unsigned long)strtol(p, &endptr, 16); #ifdef RAPTOR_NFC_DECODE_DEBUG fprintf(stderr, "U+%04lX ", c); #endif p=(const char*)endptr; u+= raptor_unicode_char_to_utf8(c, u); if((u-utf8_string) > (int)utf8_string_length) { fprintf(stderr, "decode_to_utf8 overwote utf8_string buffer at byte %d\n", (u-utf8_string)); abort(); } } #ifdef RAPTOR_NFC_DECODE_DEBUG fputs("\n", stderr); #endif return u-utf8_string; } static void utf8_print(const unsigned char *input, int length, FILE *stream) { int i=0; while(i<length && *input) { unsigned long c; int size=raptor_utf8_to_unicode_char(&c, input, length-i); if(size <= 0) return; if(i) fputc(' ', stream); fprintf(stream, "U+%04X", (int)c); input += size; i += size; } } int main (int argc, char *argv[]) { const char *program=raptor_basename(argv[0]); const char *filename; FILE *fh; int rc=0; unsigned int line=1; size_t max_c2_len=0; size_t max_c4_len=0; int passes=0; int fails=0; if(argc != 2) { fprintf(stderr, "USAGE %s [path to NormalizationTest.txt]\n" "Get it at http://unicode.org/Public/UNIDATA/NormalizationTest.txt\n", program); return 1; } filename=argv[1]; fh=fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: file '%s' open failed - %s\n", program, filename, strerror(errno)); return 1; } #define LINE_BUFFER_SIZE 1024 /* FIXME big enough for Unicode 4 (c2 max 16; c4 max 33) */ #define UNISTR_SIZE 40 for(;!feof(fh); line++) { char buffer[LINE_BUFFER_SIZE]; char *p, *start; unsigned char column2[UNISTR_SIZE]; unsigned char column4[UNISTR_SIZE]; size_t column2_len, column4_len; int nfc_rc; int error; p=fgets(buffer, LINE_BUFFER_SIZE, fh); if(!p) { if(ferror(fh)) { fprintf(stderr, "%s: file '%s' read failed - %s\n", program, filename, strerror(errno)); rc=1; break; } /* assume feof */ break; }; #if 0 fprintf(stderr, "%s:%d: line '%s'\n", program, line, buffer); #endif /* skip lines */ if(*p == '@' || *p == '#') continue; if(line != 56) continue; /* skip column 1 */ while(*p++ != ';') ; /* read column 2 into column2, column2_len */ start=p; /* find end column 2 */ while(*p++ != ';') ; column2_len=decode_to_utf8(column2, UNISTR_SIZE, start, p-1); if(column2_len > max_c2_len) max_c2_len=column2_len; /* skip column 3 */ while(*p++ != ';') ; /* read column 4 into column4, column4_len */ start=p; /* find end column 4 */ while(*p++ != ';') ; column4_len=decode_to_utf8(column4, UNISTR_SIZE, start, p-1); if(column4_len > max_c4_len) max_c4_len=column4_len; if(!raptor_utf8_check(column2, column2_len)) { fprintf(stderr, "%s:%d: UTF8 column 2 failed on: '", filename, line); utf8_print(column2, column2_len, stderr); fputs("'\n", stderr); fails++; } else passes++; /* Column 2 must be NFC */ nfc_rc=raptor_nfc_check(column2, column2_len, &error); if(!nfc_rc) { fprintf(stderr, "%s:%d: NFC column 2 failed on: '", filename, line); utf8_print(column2, column2_len, stderr); fprintf(stderr, "' at byte %d of %d\n", error, (int)column2_len); fails++; } else passes++; if(column2_len == column4_len && !memcmp(column2, column4, column2_len)) continue; if(!raptor_utf8_check(column4, column4_len)) { fprintf(stderr, "%s:%d: UTF8 column 4 failed on: '", filename, line); utf8_print(column4, column4_len, stderr); fputs("'\n", stderr); fails++; } else passes++; /* Column 4 must be in NFC */ nfc_rc=raptor_nfc_check(column4, column4_len, &error); if(!nfc_rc) { fprintf(stderr, "%s:%d: NFC column 4 failed on: '", filename, line); utf8_print(column4, column4_len, stderr); fprintf(stderr, "' at byte %d of %d\n", error, (int)column4_len); fails++; } else passes++; } fclose(fh); fprintf(stderr, "%s: max column 2 len: %d, max column 4 len: %d\n", program, (int)max_c2_len, (int)max_c4_len); fprintf(stderr, "%s: passes: %d fails: %d\n", program, passes, fails); return rc; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_expat.c��������������������������������������������������������������������0000644�0001750�0001750�00000004767�11330672502�013507� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_expat.c - Raptor expat functions * * Copyright (C) 2000-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifdef RAPTOR_XML_EXPAT void raptor_expat_init(raptor_sax2* sax2, raptor_uri *base_uri) { XML_Parser xp=XML_ParserCreate(NULL); /* create a new parser in the specified encoding */ XML_SetUserData(xp, sax2); XML_SetBase(xp, (XML_Char*)raptor_uri_as_string_v2(sax2->world, base_uri)); /* XML_SetEncoding(xp, "..."); */ XML_SetElementHandler(xp, (XML_StartElementHandler)raptor_sax2_start_element, (XML_EndElementHandler)raptor_sax2_end_element); XML_SetCharacterDataHandler(xp, (XML_CharacterDataHandler)raptor_sax2_characters); XML_SetCommentHandler(xp, (XML_CommentHandler)raptor_sax2_comment); XML_SetUnparsedEntityDeclHandler(xp, (XML_UnparsedEntityDeclHandler)raptor_sax2_unparsed_entity_decl); XML_SetExternalEntityRefHandler(xp, (XML_ExternalEntityRefHandler)raptor_sax2_external_entity_ref); sax2->xp=xp; } void raptor_expat_update_document_locator(raptor_sax2* sax2, raptor_locator* locator) { locator->line=XML_GetCurrentLineNumber(sax2->xp); locator->column=XML_GetCurrentColumnNumber(sax2->xp); locator->byte=XML_GetCurrentByteIndex(sax2->xp); } /* end if RAPTOR_XML_EXPAT */ #endif ���������raptor-1.4.21/src/raptor_xml_writer.c���������������������������������������������������������������0000644�0001750�0001750�00000115353�11330672502�014554� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_xml_writer.c - Raptor XML Writer for SAX2 events API * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE typedef enum { XML_WRITER_AUTO_INDENT = 1, XML_WRITER_AUTO_EMPTY = 2 } raptor_xml_writer_flags; #define XML_WRITER_AUTO_INDENT(xml_writer) ((xml_writer->flags & XML_WRITER_AUTO_INDENT) != 0) #define XML_WRITER_AUTO_EMPTY(xml_writer) ((xml_writer->flags & XML_WRITER_AUTO_EMPTY) != 0) #define XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer) \ if ((xml_writer->flags & XML_WRITER_AUTO_EMPTY) && \ xml_writer->current_element && \ !(xml_writer->current_element->content_cdata_seen || \ xml_writer->current_element->content_element_seen)) { \ raptor_iostream_write_byte(xml_writer->iostr, '>'); \ } /* Define this for far too much output */ #undef RAPTOR_DEBUG_CDATA struct raptor_xml_writer_s { int canonicalize; int depth; int my_nstack; raptor_namespace_stack *nstack; int nstack_depth; const raptor_uri_handler *uri_handler; void *uri_context; raptor_simple_message_handler error_handler; void *error_data; raptor_xml_element* current_element; /* outputting to this iostream */ raptor_iostream *iostr; /* XML Writer flags - bits defined in enum raptor_xml_writer_flags */ int flags; /* indentation per level if formatting */ int indent; /* XML 1.0 (10) or XML 1.1 (11) */ int xml_version; /* Write XML 1.0 or 1.1 declaration (default 1) */ int xml_declaration; /* Has writing the XML declaration writing been checked? */ int xml_declaration_checked; /* An extra newline is wanted */ int pending_newline; }; /* 16 spaces */ #define SPACES_BUFFER_SIZE sizeof(spaces_buffer) static const unsigned char spaces_buffer[] = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' }; /* helper functions */ /* Handle printing a pending newline OR newline with indenting */ static int raptor_xml_writer_indent(raptor_xml_writer *xml_writer) { int num_spaces; if(!XML_WRITER_AUTO_INDENT(xml_writer)) { if(xml_writer->pending_newline) { raptor_iostream_write_byte(xml_writer->iostr, '\n'); xml_writer->pending_newline=0; if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen=1; } return 0; } num_spaces = xml_writer->depth * xml_writer->indent; /* Do not write an extra newline at the start of the document * (after the XML declaration or XMP processing instruction has * been writtten) */ if(xml_writer->xml_declaration_checked == 1) xml_writer->xml_declaration_checked++; else { raptor_iostream_write_byte(xml_writer->iostr, '\n'); xml_writer->pending_newline=0; } while (num_spaces > 0) { int count = (num_spaces > (int)SPACES_BUFFER_SIZE) ? (int)SPACES_BUFFER_SIZE : num_spaces; raptor_iostream_write_counted_string(xml_writer->iostr, spaces_buffer, count); num_spaces -= count; } if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen=1; return 0; } struct nsd { const raptor_namespace *nspace; unsigned char *declaration; size_t length; }; /* * FIXME: This is duplicate code taken from raptor_sax2.c: * struct nsd * raptor_xml_writer_nsd_compare (from raptor_nsd_compare) */ static int raptor_xml_writer_nsd_compare(const void *a, const void *b) { struct nsd* nsd_a=(struct nsd*)a; struct nsd* nsd_b=(struct nsd*)b; return strcmp((const char*)nsd_a->declaration, (const char*)nsd_b->declaration); } static int raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer, raptor_xml_element* element, int auto_empty) { raptor_iostream* iostr=xml_writer->iostr; raptor_namespace_stack *nstack=xml_writer->nstack; raptor_simple_message_handler error_handler=xml_writer->error_handler; void *error_data=xml_writer->error_data; int depth=xml_writer->depth; int auto_indent=XML_WRITER_AUTO_INDENT(xml_writer); int xml_version=xml_writer->xml_version; struct nsd *nspace_declarations=NULL; size_t nspace_declarations_count=0; unsigned int i; /* max is 1 per element and 1 for each attribute + size of declared */ if(nstack) { int nspace_max_count=element->attribute_count+1; if(element->declared_nspaces) nspace_max_count += raptor_sequence_size(element->declared_nspaces); nspace_declarations=(struct nsd*)RAPTOR_CALLOC(nsdarray, nspace_max_count, sizeof(struct nsd)); if(!nspace_declarations) return 1; } if(element->name->nspace) { if(nstack && !raptor_namespaces_namespace_in_scope(nstack, element->name->nspace)) { nspace_declarations[0].declaration= raptor_namespaces_format(element->name->nspace, &nspace_declarations[0].length); if(!nspace_declarations[0].declaration) goto error; nspace_declarations[0].nspace=element->name->nspace; nspace_declarations_count++; } } if (element->attributes) { for(i=0; i < element->attribute_count; i++) { /* qname */ if(element->attributes[i]->nspace) { if(nstack && !raptor_namespaces_namespace_in_scope(nstack, element->attributes[i]->nspace) && element->attributes[i]->nspace != element->name->nspace) { /* not in scope and not same as element (so already going to be declared)*/ unsigned int j; int declare_me=1; /* check it wasn't an earlier declaration too */ for (j=0; j < nspace_declarations_count; j++) if(nspace_declarations[j].nspace == element->attributes[j]->nspace) { declare_me=0; break; } if(declare_me) { nspace_declarations[nspace_declarations_count].declaration= raptor_namespaces_format(element->attributes[i]->nspace, &nspace_declarations[nspace_declarations_count].length); if(!nspace_declarations[nspace_declarations_count].declaration) goto error; nspace_declarations[nspace_declarations_count].nspace=element->attributes[i]->nspace; nspace_declarations_count++; } } } } } if(nstack && element->declared_nspaces && raptor_sequence_size(element->declared_nspaces) > 0) { for(i=0; i< (unsigned int)raptor_sequence_size(element->declared_nspaces); i++) { raptor_namespace* nspace=(raptor_namespace*)raptor_sequence_get_at(element->declared_nspaces, i); unsigned int j; int declare_me=1; /* check it wasn't an earlier declaration too */ for (j=0; j < nspace_declarations_count; j++) if(nspace_declarations[j].nspace == nspace) { declare_me=0; break; } if(declare_me) { nspace_declarations[nspace_declarations_count].declaration= raptor_namespaces_format(nspace, &nspace_declarations[nspace_declarations_count].length); if(!nspace_declarations[nspace_declarations_count].declaration) goto error; nspace_declarations[nspace_declarations_count].nspace=nspace; nspace_declarations_count++; } } } raptor_iostream_write_byte(iostr, '<'); if(element->name->nspace && element->name->nspace->prefix_length > 0) { raptor_iostream_write_counted_string(iostr, (const char*)element->name->nspace->prefix, element->name->nspace->prefix_length); raptor_iostream_write_byte(iostr, ':'); } raptor_iostream_write_counted_string(iostr, (const char*)element->name->local_name, element->name->local_name_length); /* declare namespaces */ if(nspace_declarations_count) { /* sort them into the canonical order */ qsort((void*)nspace_declarations, nspace_declarations_count, sizeof(struct nsd), raptor_xml_writer_nsd_compare); /* add them */ for (i=0; i < nspace_declarations_count; i++) { if(auto_indent && nspace_declarations_count > 1) { /* indent xmlns namespace attributes */ raptor_xml_writer_newline(xml_writer); xml_writer->depth++; raptor_xml_writer_indent(xml_writer); xml_writer->depth--; } raptor_iostream_write_byte(iostr, ' '); raptor_iostream_write_counted_string(iostr, (const char*)nspace_declarations[i].declaration, nspace_declarations[i].length); RAPTOR_FREE(cstring, nspace_declarations[i].declaration); nspace_declarations[i].declaration=NULL; if(raptor_namespace_copy(nstack, (raptor_namespace*)nspace_declarations[i].nspace, depth)) goto error; } } if(element->attributes) { for(i=0; i < element->attribute_count; i++) { raptor_iostream_write_byte(iostr, ' '); if(element->attributes[i]->nspace && element->attributes[i]->nspace->prefix_length > 0) { raptor_iostream_write_counted_string(iostr, (char*)element->attributes[i]->nspace->prefix, element->attributes[i]->nspace->prefix_length); raptor_iostream_write_byte(iostr, ':'); } raptor_iostream_write_counted_string(iostr, (const char*)element->attributes[i]->local_name, element->attributes[i]->local_name_length); raptor_iostream_write_counted_string(iostr, "=\"", 2); raptor_iostream_write_xml_any_escaped_string(iostr, element->attributes[i]->value, element->attributes[i]->value_length, '"', xml_version, error_handler, error_data); raptor_iostream_write_byte(iostr, '"'); } } if (!auto_empty) raptor_iostream_write_byte(iostr, '>'); if(nstack) RAPTOR_FREE(stringarray, nspace_declarations); return 0; /* Clean up nspace_declarations on error */ error: for (i=0; i < nspace_declarations_count; i++) { if(nspace_declarations[i].declaration) RAPTOR_FREE(cstring, nspace_declarations[i].declaration); } if(nspace_declarations) RAPTOR_FREE(stringarray, nspace_declarations); return 1; } static int raptor_xml_writer_end_element_common(raptor_xml_writer* xml_writer, raptor_xml_element *element, int is_empty) { raptor_iostream* iostr=xml_writer->iostr; if (is_empty) raptor_iostream_write_byte(iostr, '/'); else { raptor_iostream_write_byte(iostr, '<'); raptor_iostream_write_byte(iostr, '/'); if(element->name->nspace && element->name->nspace->prefix_length > 0) { raptor_iostream_write_counted_string(iostr, (const char*)element->name->nspace->prefix, element->name->nspace->prefix_length); raptor_iostream_write_byte(iostr, ':'); } raptor_iostream_write_counted_string(iostr, (const char*)element->name->local_name, element->name->local_name_length); } raptor_iostream_write_byte(iostr, '>'); return 0; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_xml_writer: * @nstack: Namespace stack for the writer to start with (or NULL) * @uri_handler: URI handler function (ignored) * @uri_context: URI handler context data (ignored) * @iostr: I/O stream to write to * @error_handler: error handler function * @error_data: error handler data * @canonicalize: unused * * Constructor - Create a new XML Writer writing XML to a raptor_iostream * * @uri_handler and @uri_context parameters are ignored but are retained * in the API for backwards compatibility. Internally the same uri handler * as returned by raptor_uri_get_handler() will be used. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_xml_writer_v2() if using raptor_world APIs. * * Return value: a new #raptor_xml_writer object or NULL on failure **/ raptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize) { return raptor_new_xml_writer_v2(raptor_world_instance(), nstack, iostr, error_handler, error_data, canonicalize); } #endif /** * raptor_new_xml_writer_v2: * @world: raptor_world object * @nstack: Namespace stack for the writer to start with (or NULL) * @iostr: I/O stream to write to * @error_handler: error handler function * @error_data: error handler data * @canonicalize: unused * * Constructor - Create a new XML Writer writing XML to a raptor_iostream * * Return value: a new #raptor_xml_writer object or NULL on failure **/ raptor_xml_writer* raptor_new_xml_writer_v2(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize) { raptor_xml_writer* xml_writer; xml_writer=(raptor_xml_writer*)RAPTOR_CALLOC(raptor_xml_writer, 1, sizeof(raptor_xml_writer)+1); if(!xml_writer) return NULL; xml_writer->nstack_depth=0; xml_writer->error_handler=error_handler; xml_writer->error_data=error_data; xml_writer->nstack=nstack; if(!xml_writer->nstack) { xml_writer->nstack=nstack=raptor_new_namespaces_v2(world, error_handler, error_data, 1); xml_writer->my_nstack=1; } xml_writer->iostr=iostr; xml_writer->flags = 0; xml_writer->indent = 2; xml_writer->xml_version = 10; /* Write XML declaration */ xml_writer->xml_declaration=1; return xml_writer; } /** * raptor_free_xml_writer: * @xml_writer: XML writer object * * Destructor - Free XML Writer * **/ void raptor_free_xml_writer(raptor_xml_writer* xml_writer) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(xml_writer, raptor_xml_writer); if(xml_writer->nstack && xml_writer->my_nstack) raptor_free_namespaces(xml_writer->nstack); RAPTOR_FREE(raptor_xml_writer, xml_writer); } static void raptor_xml_writer_write_xml_declaration(raptor_xml_writer* xml_writer) { if(!xml_writer->xml_declaration_checked) { /* check that it should be written once only */ xml_writer->xml_declaration_checked=1; if(xml_writer->xml_declaration) { raptor_iostream_write_string(xml_writer->iostr, (const unsigned char*)"<?xml version=\""); raptor_iostream_write_counted_string(xml_writer->iostr, (xml_writer->xml_version == 10) ? (const unsigned char*)"1.0" : (const unsigned char*)"1.1", 3); raptor_iostream_write_string(xml_writer->iostr, (const unsigned char*)"\" encoding=\"utf-8\"?>\n"); } } } /** * raptor_xml_writer_empty_element: * @xml_writer: XML writer object * @element: XML element object * * Write an empty XML element to the XML writer. * * Closes any previous empty element if XML writer feature AUTO_EMPTY * is enabled. **/ void raptor_xml_writer_empty_element(raptor_xml_writer* xml_writer, raptor_xml_element *element) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); if(xml_writer->pending_newline || XML_WRITER_AUTO_INDENT(xml_writer)) raptor_xml_writer_indent(xml_writer); raptor_xml_writer_start_element_common(xml_writer, element, 1); raptor_xml_writer_end_element_common(xml_writer, element, 1); raptor_namespaces_end_for_depth(xml_writer->nstack, xml_writer->depth); } /** * raptor_xml_writer_start_element: * @xml_writer: XML writer object * @element: XML element object * * Write a start XML element to the XML writer. * * Closes any previous empty element if XML writer feature AUTO_EMPTY * is enabled. * * Indents the start element if XML writer feature AUTO_INDENT is enabled. **/ void raptor_xml_writer_start_element(raptor_xml_writer* xml_writer, raptor_xml_element *element) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); if(xml_writer->pending_newline || XML_WRITER_AUTO_INDENT(xml_writer)) raptor_xml_writer_indent(xml_writer); raptor_xml_writer_start_element_common(xml_writer, element, XML_WRITER_AUTO_EMPTY(xml_writer)); xml_writer->depth++; /* SJS Note: This "if" clause is necessary because raptor_rdfxml.c * uses xml_writer for parseType="literal" and passes in elements * whose parent field is already set. The first time this function * is called, it sets element->parent to 0, causing the warn-07.rdf * test to fail. Subsequent calls to this function set * element->parent to its existing value. */ if(xml_writer->current_element) element->parent = xml_writer->current_element; xml_writer->current_element=element; if(element && element->parent) element->parent->content_element_seen=1; } /** * raptor_xml_writer_end_element: * @xml_writer: XML writer object * @element: XML element object * * Write an end XML element to the XML writer. * * Indents the end element if XML writer feature AUTO_INDENT is enabled. **/ void raptor_xml_writer_end_element(raptor_xml_writer* xml_writer, raptor_xml_element* element) { int is_empty; xml_writer->depth--; if(xml_writer->pending_newline || (XML_WRITER_AUTO_INDENT(xml_writer) && element->content_element_seen)) raptor_xml_writer_indent(xml_writer); is_empty = XML_WRITER_AUTO_EMPTY(xml_writer) ? !(element->content_cdata_seen || element->content_element_seen) : 0; raptor_xml_writer_end_element_common(xml_writer, element, is_empty); raptor_namespaces_end_for_depth(xml_writer->nstack, xml_writer->depth); if(xml_writer->current_element) xml_writer->current_element = xml_writer->current_element->parent; } /** * raptor_xml_writer_newline: * @xml_writer: XML writer object * * Write a newline to the XML writer. * * Indents the next line if XML writer feature AUTO_INDENT is enabled. **/ void raptor_xml_writer_newline(raptor_xml_writer* xml_writer) { xml_writer->pending_newline=1; } /** * raptor_xml_writer_cdata: * @xml_writer: XML writer object * @s: string to XML escape and write * * Write CDATA XML-escaped to the XML writer. * * Closes any previous empty element if XML writer feature AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_cdata(raptor_xml_writer* xml_writer, const unsigned char *s) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_iostream_write_xml_any_escaped_string(xml_writer->iostr, s, strlen((const char*)s), '\0', xml_writer->xml_version, xml_writer->error_handler, xml_writer->error_data); if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen=1; } /** * raptor_xml_writer_cdata_counted: * @xml_writer: XML writer object * @s: string to XML escape and write * @len: length of string * * Write counted CDATA XML-escaped to the XML writer. * * Closes any previous empty element if XML writer feature AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_cdata_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_iostream_write_xml_any_escaped_string(xml_writer->iostr, s, len, '\0', xml_writer->xml_version, xml_writer->error_handler, xml_writer->error_data); if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen=1; } /** * raptor_xml_writer_raw: * @xml_writer: XML writer object * @s: string to write * * Write a string raw to the XML writer. * * Closes any previous empty element if XML writer feature AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_raw(raptor_xml_writer* xml_writer, const unsigned char *s) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_iostream_write_string(xml_writer->iostr, s); if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen=1; } /** * raptor_xml_writer_raw_counted: * @xml_writer: XML writer object * @s: string to write * @len: length of string * * Write a counted string raw to the XML writer. * * Closes any previous empty element if XML writer feature AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_raw_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_iostream_write_counted_string(xml_writer->iostr, s, len); if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen=1; } /** * raptor_xml_writer_comment: * @xml_writer: XML writer object * @s: comment string to write * * Write an XML comment to the XML writer. * * Closes any previous empty element if XML writer feature AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_comment(raptor_xml_writer* xml_writer, const unsigned char *s) { XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"<!-- ", 5); raptor_xml_writer_cdata(xml_writer, s); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)" -->", 4); } /** * raptor_xml_writer_comment_counted: * @xml_writer: XML writer object * @s: comment string to write * @len: length of string * * Write a counted XML comment to the XML writer. * * Closes any previous empty element if XML writer feature AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_comment_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len) { XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"<!-- ", 5); raptor_xml_writer_cdata_counted(xml_writer, s, len); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)" -->", 4); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_xml_writer_features_enumerate: * @feature: feature enumeration (0+) * @name: pointer to store feature short name (or NULL) * @uri: pointer to store feature URI (or NULL) * @label: pointer to feature label (or NULL) * * Get list of xml_writer features. * * If uri is not NULL, a pointer to a new raptor_uri is returned * that must be freed by the caller with raptor_free_uri(). * * raptor_init() MUST have been called before calling this function. * Use raptor_xml_writer_features_enumerate_v2() if using raptor_world APIs. * * Return value: 0 on success, <0 on failure, >0 if feature is unknown **/ int raptor_xml_writer_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label) { return raptor_xml_writer_features_enumerate_v2(raptor_world_instance(), feature, name, uri, label); } #endif /** * raptor_xml_writer_features_enumerate_v2: * @world: raptor_world object * @feature: feature enumeration (0+) * @name: pointer to store feature short name (or NULL) * @uri: pointer to store feature URI (or NULL) * @label: pointer to feature label (or NULL) * * Get list of xml_writer features. * * If uri is not NULL, a pointer to a new raptor_uri is returned * that must be freed by the caller with raptor_free_uri_v2(). * * Return value: 0 on success, <0 on failure, >0 if feature is unknown **/ int raptor_xml_writer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label) { return raptor_features_enumerate_common(world, feature, name, uri, label, 8); } /** * raptor_xml_writer_flush: * @xml_writer: XML writer object * * Finish the XML writer. * **/ void raptor_xml_writer_flush(raptor_xml_writer* xml_writer) { if(xml_writer->pending_newline) { raptor_iostream_write_byte(xml_writer->iostr, '\n'); xml_writer->pending_newline=0; } } /** * raptor_xml_writer_set_feature: * @xml_writer: #raptor_xml_writer xml_writer object * @feature: feature to set from enumerated #raptor_feature values * @value: integer feature value (0 or larger) * * Set xml_writer features with integer values. * * The allowed features are available via raptor_features_enumerate(). * * Return value: non 0 on failure or if the feature is unknown **/ int raptor_xml_writer_set_feature(raptor_xml_writer *xml_writer, raptor_feature feature, int value) { if(value < 0) return -1; switch(feature) { case RAPTOR_FEATURE_WRITER_AUTO_INDENT: if (value) xml_writer->flags |= XML_WRITER_AUTO_INDENT; else xml_writer->flags &= ~XML_WRITER_AUTO_INDENT; break; case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: if (value) xml_writer->flags |= XML_WRITER_AUTO_EMPTY; else xml_writer->flags &= ~XML_WRITER_AUTO_EMPTY; break; case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: xml_writer->indent = value; break; case RAPTOR_FEATURE_WRITER_XML_VERSION: if(value == 10 || value == 11) xml_writer->xml_version = value; break; case RAPTOR_FEATURE_WRITER_XML_DECLARATION: xml_writer->xml_declaration = value; break; /* parser features */ case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ASSUME_IS_RDF: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: /* Shared */ case RAPTOR_FEATURE_NO_NET: /* XML writer features */ case RAPTOR_FEATURE_RELATIVE_URIS: case RAPTOR_FEATURE_START_URI: /* DOT serializer features */ case RAPTOR_FEATURE_RESOURCE_BORDER: case RAPTOR_FEATURE_LITERAL_BORDER: case RAPTOR_FEATURE_BNODE_BORDER: case RAPTOR_FEATURE_RESOURCE_FILL: case RAPTOR_FEATURE_LITERAL_FILL: case RAPTOR_FEATURE_BNODE_FILL: /* JSON serializer features */ case RAPTOR_FEATURE_JSON_CALLBACK: case RAPTOR_FEATURE_JSON_EXTRA_DATA: case RAPTOR_FEATURE_RSS_TRIPLES: case RAPTOR_FEATURE_ATOM_ENTRY_URI: case RAPTOR_FEATURE_PREFIX_ELEMENTS: /* Turtle serializer feature */ case RAPTOR_FEATURE_WRITE_BASE_URI: /* WWW feature */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: return -1; break; } return 0; } /** * raptor_xml_writer_set_feature_string: * @xml_writer: #raptor_xml_writer xml_writer object * @feature: feature to set from enumerated #raptor_feature values * @value: feature value * * Set xml_writer features with string values. * * The allowed features are available via raptor_xml_writer_features_enumerate(). * If the feature type is integer, the value is interpreted as an integer. * * Return value: non 0 on failure or if the feature is unknown **/ int raptor_xml_writer_set_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature, const unsigned char *value) { int value_is_string=(raptor_feature_value_type(feature) == 1); if(!value_is_string) return raptor_xml_writer_set_feature(xml_writer, feature, atoi((const char*)value)); else return -1; } /** * raptor_xml_writer_get_feature: * @xml_writer: #raptor_xml_writer xml writer object * @feature: feature to get value * * Get various xml_writer features. * * The allowed features are available via raptor_features_enumerate(). * * Note: no feature value is negative * * Return value: feature value or < 0 for an illegal feature **/ int raptor_xml_writer_get_feature(raptor_xml_writer *xml_writer, raptor_feature feature) { int result= -1; switch(feature) { case RAPTOR_FEATURE_WRITER_AUTO_INDENT: result=XML_WRITER_AUTO_INDENT(xml_writer); break; case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: result=XML_WRITER_AUTO_EMPTY(xml_writer); break; case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: result=xml_writer->indent; break; case RAPTOR_FEATURE_WRITER_XML_VERSION: result=xml_writer->xml_version; break; case RAPTOR_FEATURE_WRITER_XML_DECLARATION: result=xml_writer->xml_declaration; break; /* parser features */ case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ASSUME_IS_RDF: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: /* Shared */ case RAPTOR_FEATURE_NO_NET: /* XML writer features */ case RAPTOR_FEATURE_RELATIVE_URIS: case RAPTOR_FEATURE_START_URI: /* DOT serializer features */ case RAPTOR_FEATURE_RESOURCE_BORDER: case RAPTOR_FEATURE_LITERAL_BORDER: case RAPTOR_FEATURE_BNODE_BORDER: case RAPTOR_FEATURE_RESOURCE_FILL: case RAPTOR_FEATURE_LITERAL_FILL: case RAPTOR_FEATURE_BNODE_FILL: /* JSON serializer features */ case RAPTOR_FEATURE_JSON_CALLBACK: case RAPTOR_FEATURE_JSON_EXTRA_DATA: case RAPTOR_FEATURE_RSS_TRIPLES: case RAPTOR_FEATURE_ATOM_ENTRY_URI: case RAPTOR_FEATURE_PREFIX_ELEMENTS: /* Turtle serializer feature */ case RAPTOR_FEATURE_WRITE_BASE_URI: /* WWW feature */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: break; } return result; } /** * raptor_xml_writer_get_feature_string: * @xml_writer: #raptor_xml_writer xml writer object * @feature: feature to get value * * Get xml_writer features with string values. * * The allowed features are available via raptor_features_enumerate(). * * Return value: feature value or NULL for an illegal feature or no value **/ const unsigned char * raptor_xml_writer_get_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature) { return NULL; } /** * raptor_xml_writer_get_depth: * @xml_writer: #raptor_xml_writer xml writer object * * Get the current XML Writer element depth * * Return value: element stack depth */ int raptor_xml_writer_get_depth(raptor_xml_writer *xml_writer) { return xml_writer->depth; } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); const unsigned char *base_uri_string=(const unsigned char*)"http://example.org/base#"; #define OUT_BYTES_COUNT 135 int main(int argc, char *argv[]) { raptor_world *world; const char *program=raptor_basename(argv[0]); raptor_iostream *iostr; raptor_namespace_stack *nstack; raptor_namespace* foo_ns; raptor_xml_writer* xml_writer; raptor_uri* base_uri; raptor_qname* el_name; raptor_xml_element *element; unsigned long offset; raptor_qname **attrs; raptor_uri* base_uri_copy=NULL; /* for raptor_new_iostream_to_string */ void *string=NULL; size_t string_len=0; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); iostr=raptor_new_iostream_to_string(&string, &string_len, NULL); if(!iostr) { fprintf(stderr, "%s: Failed to create iostream to string\n", program); exit(1); } nstack=raptor_new_namespaces_v2(world, NULL, NULL, /* errors */ 1); xml_writer=raptor_new_xml_writer_v2(world, nstack, iostr, NULL, NULL, /* errors */ 1); if(!xml_writer) { fprintf(stderr, "%s: Failed to create xml_writer to iostream\n", program); exit(1); } base_uri=raptor_new_uri_v2(world, base_uri_string); foo_ns=raptor_new_namespace(nstack, (const unsigned char*)"foo", (const unsigned char*)"http://example.org/foo-ns#", 0); el_name=raptor_new_qname_from_namespace_local_name_v2(world, foo_ns, (const unsigned char*)"bar", NULL); base_uri_copy=base_uri ? raptor_uri_copy_v2(world, base_uri) : NULL; element=raptor_new_xml_element(el_name, NULL, /* language */ base_uri_copy); raptor_xml_writer_start_element(xml_writer, element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"hello\n", 6); raptor_xml_writer_comment_counted(xml_writer, (const unsigned char*)"comment", 7); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)"\n"); raptor_xml_writer_end_element(xml_writer, element); raptor_free_xml_element(element); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)"\n"); el_name=raptor_new_qname(nstack, (const unsigned char*)"blah", NULL, /* no attribute value - element */ NULL, NULL); /* errors */ base_uri_copy=base_uri ? raptor_uri_copy_v2(world, base_uri) : NULL; element=raptor_new_xml_element(el_name, NULL, /* language */ base_uri_copy); attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname*)); attrs[0]=raptor_new_qname(nstack, (const unsigned char*)"a", (const unsigned char*)"b", /* attribute value */ NULL, NULL); /* errors */ raptor_xml_element_set_attributes(element, attrs, 1); raptor_xml_writer_empty_element(xml_writer, element); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)"\n"); raptor_free_xml_writer(xml_writer); raptor_free_xml_element(element); raptor_free_namespace(foo_ns); raptor_free_namespaces(nstack); raptor_free_uri_v2(world, base_uri); offset=raptor_iostream_tell(iostr); #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing iostream\n", program); #endif raptor_free_iostream(iostr); if(offset != OUT_BYTES_COUNT) { fprintf(stderr, "%s: I/O stream wrote %d bytes, expected %d\n", program, (int)offset, (int)OUT_BYTES_COUNT); fputs("[[", stderr); (void)fwrite(string, 1, string_len, stderr); fputs("]]\n", stderr); return 1; } if(!string) { fprintf(stderr, "%s: I/O stream failed to create a string\n", program); return 1; } string_len=strlen((const char*)string); if(string_len != offset) { fprintf(stderr, "%s: I/O stream created a string length %d, expected %d\n", program, (int)string_len, (int)offset); return 1; } #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Made XML string of %d bytes\n", program, (int)string_len); fputs("[[", stderr); (void)fwrite(string, 1, string_len, stderr); fputs("]]\n", stderr); #endif raptor_free_memory(string); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_json_writer.c��������������������������������������������������������������0000644�0001750�0001750�00000030213�11330672502�014714� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_json_writer.c - Raptor JSON Writer * * Copyright (C) 2008, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_LIMITS_H #include <limits.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE #ifndef RAPTOR_JSON_WRITER_DATATYPES #define RAPTOR_JSON_WRITER_DATATYPES 0 #endif struct raptor_json_writer_s { raptor_world* world; raptor_uri* base_uri; raptor_simple_message_handler error_handler; void *error_data; /* outputting to this iostream */ raptor_iostream *iostr; #if RAPTOR_JSON_WRITER_DATATYPES == 1 raptor_uri* xsd_boolean_uri; raptor_uri* xsd_decimal_uri; raptor_uri* xsd_double_uri; raptor_uri* xsd_integer_uri; #endif /* current indent */ int indent; /* indent step */ int indent_step; }; /** * raptor_new_json_writer: * @world: raptor_world object * @base_uri: Base URI for the writer * @iostr: I/O stream to write to * @error_handler: error handler function * @error_data: error handler data * * INTERNAL - Constructor - Create a new JSON writer writing to a raptor_iostream * * Return value: a new #raptor_json_writer object or NULL on failure **/ raptor_json_writer* raptor_new_json_writer(raptor_world* world, raptor_uri* base_uri, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data) { raptor_json_writer* json_writer; json_writer=(raptor_json_writer*)RAPTOR_CALLOC(raptor_json_writer, 1, sizeof(raptor_json_writer)+1); if(!json_writer) return NULL; json_writer->world=world; json_writer->error_handler=error_handler; json_writer->error_data=error_data; json_writer->iostr=iostr; json_writer->base_uri=base_uri; #if RAPTOR_JSON_WRITER_DATATYPES == 1 json_writer->xsd_boolean_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#boolean"); json_writer->xsd_decimal_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#decimal"); json_writer->xsd_double_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#double"); json_writer->xsd_integer_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#integer"); #endif json_writer->indent_step=2; return json_writer; } /** * raptor_free_json_writer: * @json_writer: JSON writer object * * INTERNAL - Destructor - Free JSON Writer * **/ void raptor_free_json_writer(raptor_json_writer* json_writer) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(json_writer, raptor_json_writer); #if RAPTOR_JSON_WRITER_DATATYPES == 1 if(json_writer->xsd_boolean_uri) raptor_free_uri_v2(json_writer->world, json_writer->xsd_boolean_uri); if(json_writer->xsd_decimal_uri) raptor_free_uri_v2(json_writer->world, json_writer->xsd_decimal_uri); if(json_writer->xsd_double_uri) raptor_free_uri_v2(json_writer->world, json_writer->xsd_double_uri); if(json_writer->xsd_integer_uri) raptor_free_uri_v2(json_writer->world, json_writer->xsd_integer_uri); #endif RAPTOR_FREE(raptor_json_writer, json_writer); } static int raptor_json_writer_quoted(raptor_json_writer* json_writer, const char *value, size_t value_len) { if(!value) { raptor_iostream_write_counted_string(json_writer->iostr, "\"\"", 2); return 0; } if(!value_len) value_len=strlen((const char*)value); raptor_iostream_write_byte(json_writer->iostr, '\"'); raptor_iostream_write_string_python(json_writer->iostr, (const unsigned char*)value, value_len, '"', 3); raptor_iostream_write_byte(json_writer->iostr, '\"'); return 0; } static int raptor_json_writer_spaces(raptor_json_writer* json_writer, int depth) { int i; for(i=0; i<depth; i++) raptor_iostream_write_byte(json_writer->iostr, ' '); return 0; } int raptor_json_writer_newline(raptor_json_writer* json_writer) { raptor_iostream_write_byte(json_writer->iostr, '\n'); if(json_writer->indent) raptor_json_writer_spaces(json_writer, json_writer->indent); return 0; } int raptor_json_writer_key_value(raptor_json_writer* json_writer, const char* key, size_t key_len, const char* value, size_t value_len) { if(!key_len && key) key_len=strlen(key); if(!value_len && value) value_len=strlen(value); raptor_json_writer_quoted(json_writer, key, key_len); raptor_iostream_write_counted_string(json_writer->iostr, " : ", 3); raptor_json_writer_quoted(json_writer, value, value_len); return 0; } int raptor_json_writer_key_uri_value(raptor_json_writer* json_writer, const char* key, size_t key_len, raptor_uri* uri) { const char* value; size_t value_len; int rc=0; value=(const char*)raptor_uri_to_relative_counted_uri_string_v2(json_writer->world, json_writer->base_uri, uri, &value_len); if(!value) return 1; if(key) rc=raptor_json_writer_key_value(json_writer, key, key_len, value, value_len); else rc=raptor_json_writer_quoted(json_writer, value, value_len); RAPTOR_FREE(cstring, value); return 0; } int raptor_json_writer_start_block(raptor_json_writer* json_writer, char c) { json_writer->indent += json_writer->indent_step; raptor_iostream_write_byte(json_writer->iostr, c); return 0; } int raptor_json_writer_end_block(raptor_json_writer* json_writer, char c) { raptor_iostream_write_byte(json_writer->iostr, c); json_writer->indent -= json_writer->indent_step; return 0; } int raptor_json_writer_literal_object(raptor_json_writer* json_writer, unsigned char* s, unsigned char* lang, raptor_uri* datatype, const char* key, const char* type_key) { if(key) { raptor_json_writer_start_block(json_writer, '{'); raptor_json_writer_newline(json_writer); raptor_json_writer_quoted(json_writer, key, 0); raptor_iostream_write_counted_string(json_writer->iostr, " : ", 3); } raptor_json_writer_quoted(json_writer, (const char*)s, 0); if(datatype || lang) { raptor_iostream_write_byte(json_writer->iostr, ','); raptor_json_writer_newline(json_writer); if(datatype) raptor_json_writer_key_uri_value(json_writer, "datatype", 8, datatype); if(lang) { if(datatype) { raptor_iostream_write_byte(json_writer->iostr, ','); raptor_json_writer_newline(json_writer); } raptor_json_writer_key_value(json_writer, "lang", 4, (const char*)lang, 0); } } if(type_key) { raptor_iostream_write_byte(json_writer->iostr, ','); raptor_json_writer_newline(json_writer); raptor_json_writer_key_value(json_writer, type_key, 0, "literal", 0); } raptor_json_writer_newline(json_writer); if(key) { raptor_json_writer_end_block(json_writer, '}'); raptor_json_writer_newline(json_writer); } return 0; } /* not used here */ #if RAPTOR_JSON_WRITER_DATATYPES == 1 int raptor_json_writer_literal_datatype(raptor_json_writer* json_writer, raptor_namespace_stack *nstack, unsigned char* s, unsigned char* lang, raptor_uri* datatype); int raptor_json_writer_literal_datatype(raptor_json_writer* json_writer, raptor_namespace_stack *nstack, unsigned char* s, unsigned char* lang, raptor_uri* datatype) { /* DBL_MAX = 309 decimal digits */ #define INT_MAX_LEN 309 /* DBL_EPSILON = 52 digits */ #define FRAC_MAX_LEN 52 const size_t buflen = INT_MAX_LEN + FRAC_MAX_LEN + 3; /* sign, decimal, \0 */ char buf[buflen]; size_t len = 0; char* endptr = (char *)s; int written = 0; /* typed literal special cases */ if(datatype) { /* integer */ if(raptor_uri_equals_v2(json_writer->world, datatype, json_writer->xsd_integer_uri)) { long inum = strtol((const char*)s, NULL, 10); if(inum != LONG_MIN && inum != LONG_MAX) { raptor_iostream_write_decimal(json_writer->iostr, inum); written = 1; } /* double */ } else if(raptor_uri_equals_v2(json_writer->world, datatype, json_writer->xsd_double_uri)) { double dnum = strtod((const char*)s, &endptr); if(endptr != (char*)s) { const char* decimal = strchr((const char*)s, '.'); const size_t max_digits = (decimal ? (endptr - decimal - 2) : 1); char* num_str; num_str=raptor_format_float(buf, &len, buflen, dnum, 1, max_digits, 0); raptor_iostream_write_counted_string(json_writer->iostr, num_str, len); written = 1; } /* decimal */ } else if(raptor_uri_equals_v2(json_writer->world, datatype, json_writer->xsd_decimal_uri)) { double dnum = strtod((const char*)s, &endptr); if(endptr != (char*)s) { snprintf(buf, 20, "%.1lf", dnum); raptor_iostream_write_string(json_writer->iostr, buf); written = 1; } /* boolean */ } else if(raptor_uri_equals_v2(json_writer->world, datatype, json_writer->xsd_boolean_uri)) { if(!strcmp((const char*)s, "0") || !strcmp((const char*)s, "false")) { raptor_iostream_write_string(json_writer->iostr, "false"); written = 1; } else if(!strcmp((const char*)s, "1") || !strcmp((const char*)s, "true")) { raptor_iostream_write_string(json_writer->iostr, "true"); written = 1; } else { json_writer->error_handler(json_writer->error_data, "Illegal value for xsd:boolean literal."); return 1; } } } if(written) return 0; return raptor_json_writer_literal_object(json_writer, s, lang, datatype, "value", NULL); } #endif int raptor_json_writer_blank_object(raptor_json_writer* json_writer, const char* blank) { raptor_json_writer_start_block(json_writer, '{'); raptor_json_writer_newline(json_writer); raptor_iostream_write_counted_string(json_writer->iostr, "\"value\" : \"_:", 13); raptor_iostream_write_string(json_writer->iostr, blank); raptor_iostream_write_counted_string(json_writer->iostr, "\",", 2); raptor_json_writer_newline(json_writer); raptor_iostream_write_counted_string(json_writer->iostr, "\"type\" : \"bnode\"", 16); raptor_json_writer_newline(json_writer); raptor_json_writer_end_block(json_writer, '}'); return 0; } int raptor_json_writer_uri_object(raptor_json_writer* json_writer, raptor_uri* uri) { raptor_json_writer_start_block(json_writer, '{'); raptor_json_writer_newline(json_writer); raptor_json_writer_key_uri_value(json_writer, "value", 5, uri); raptor_iostream_write_byte(json_writer->iostr, ','); raptor_json_writer_newline(json_writer); raptor_iostream_write_counted_string(json_writer->iostr, "\"type\" : \"uri\"", 14); raptor_json_writer_newline(json_writer); raptor_json_writer_end_block(json_writer, '}'); return 0; } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_utf8.c���������������������������������������������������������������������0000644�0001750�0001750�00000056656�11330672502�013260� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_utf8.c - Raptor UTF-8 and Unicode support * * Copyright (C) 2002-2007, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifdef RAPTOR_NFC_CHECK #include "raptor_nfc.h" #endif /** * raptor_unicode_char_to_utf8: * @c: Unicode character * @output: UTF-8 string buffer or NULL * * Convert a Unicode character to UTF-8 encoding. * * Based on librdf_unicode_char_to_utf8() with no need to calculate * length since the encoded character is always copied into a buffer * with sufficient size. * * Return value: bytes encoded to output buffer or <0 on failure **/ int raptor_unicode_char_to_utf8(raptor_unichar c, unsigned char *output) { int size=0; if (c < 0x00000080) size=1; else if (c < 0x00000800) size=2; else if (c < 0x00010000) size=3; else if (c < 0x00200000) size=4; else if (c < 0x04000000) size=5; else if (c < 0x80000000) size=6; else return -1; switch(size) { case 6: output[5]=0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bit 2 (bits 7,6,5,4,3,2 less 7,6,5,4,3 set below) on last byte */ c |= 0x4000000; /* 0x10000 = 0x04 << 24 */ /* FALLTHROUGH */ case 5: output[4]=0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bit 3 (bits 7,6,5,4,3 less 7,6,5,4 set below) on last byte */ c |= 0x200000; /* 0x10000 = 0x08 << 18 */ /* FALLTHROUGH */ case 4: output[3]=0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bit 4 (bits 7,6,5,4 less 7,6,5 set below) on last byte */ c |= 0x10000; /* 0x10000 = 0x10 << 12 */ /* FALLTHROUGH */ case 3: output[2]=0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bit 5 (bits 7,6,5 less 7,6 set below) on last byte */ c |= 0x800; /* 0x800 = 0x20 << 6 */ /* FALLTHROUGH */ case 2: output[1]=0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bits 7,6 on last byte */ c |= 0xc0; /* FALLTHROUGH */ case 1: output[0]=(unsigned char)c; } return size; } /** * raptor_utf8_to_unicode_char: * @output: Pointer to the Unicode character or NULL * @input: UTF-8 string buffer * @length: buffer size * * Convert an UTF-8 encoded buffer to a Unicode character. * * If output is NULL, then will calculate the number of bytes that * will be used from the input buffer and not perform the conversion. * * Return value: bytes used from input buffer or <0 on failure: -1 input buffer too short or length error, -2 overlong UTF-8 sequence, -3 illegal code positions, -4 code out of range U+0000 to U+10FFFF. In cases -2, -3 and -4 the coded character is stored in the output. */ int raptor_utf8_to_unicode_char(raptor_unichar *output, const unsigned char *input, int length) { unsigned char in; int size; raptor_unichar c=0; if(length < 1) return -1; in=*input++; if((in & 0x80) == 0) { size=1; c= in & 0x7f; } else if((in & 0xe0) == 0xc0) { size=2; c= in & 0x1f; } else if((in & 0xf0) == 0xe0) { size=3; c= in & 0x0f; } else if((in & 0xf8) == 0xf0) { size=4; c = in & 0x07; } else if((in & 0xfc) == 0xf8) { size=5; c = in & 0x03; } else if((in & 0xfe) == 0xfc) { size=6; c = in & 0x01; } else return -1; if(!output) return size; if(length < size) return -1; switch(size) { case 6: in=*input++ & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ case 5: in=*input++ & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ case 4: in=*input++ & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ case 3: in=*input++ & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ case 2: in=*input++ & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ default: break; } *output=c; /* check for overlong UTF-8 sequences */ switch(size) { case 2: if(c < 0x00000080) return -2; break; case 3: if(c < 0x00000800) return -2; break; case 4: if(c < 0x00010000) return -2; break; default: /* 1 */ break; } /* check for illegal code positions: * U+D800 to U+DFFF (UTF-16 surrogates) * U+FFFE and U+FFFF */ if((c > 0xD7FF && c < 0xE000) || c == 0xFFFE || c == 0xFFFF) return -3; /* Unicode 3.2 only defines U+0000 to U+10FFFF and UTF-8 encodings of it */ /* of course this makes some 4 byte forms illegal */ if(c > 0x10ffff) return -4; return size; } static int raptor_unicode_is_letter(long c); static int raptor_unicode_is_basechar(long c); static int raptor_unicode_is_ideographic(long c); static int raptor_unicode_is_combiningchar(long c); static int raptor_unicode_is_digit(long c); static int raptor_unicode_is_extender(long c); /** * raptor_unicode_is_xml11_namestartchar: * @c: Unicode character to check * * Check if Unicode character is legal to start an XML 1.1 Name * * Namespaces in XML 1.1 REC 2004-02-04 * http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-NameStartChar * updating * Extensible Markup Language (XML) 1.1 REC 2004-02-04 * http://www.w3.org/TR/2004/REC-xml11-20040204/ sec 2.3, [4a] * excluding the ':' * * Return value: non-0 if legal **/ int raptor_unicode_is_xml11_namestartchar(raptor_unichar c) { return (((c >= 0x0041) && (c <= 0x005A)) || /* [A-Z] */ (c == 0x005F) || /* '_' */ ((c >= 0x0061) && (c <= 0x007A)) || /* [a-z] */ ((c >= 0x00C0) && (c <= 0x00D6)) || ((c >= 0x00D8) && (c <= 0x00F6)) || ((c >= 0x00F8) && (c <= 0x02FF)) || ((c >= 0x0370) && (c <= 0x037D)) || ((c >= 0x037F) && (c <= 0x1FFF)) || ((c >= 0x200C) && (c <= 0x200D)) || ((c >= 0x2070) && (c <= 0x218F)) || ((c >= 0x2C00) && (c <= 0x2FEF)) || ((c >= 0x3001) && (c <= 0xD7FF)) || ((c >= 0xF900) && (c <= 0xFDCF)) || ((c >= 0xFDF0) && (c <= 0xFFFD)) || ((c >= 0x10000) && (c <= 0xEFFFF))); } /** * raptor_unicode_is_xml10_namestartchar: * @c: Unicode character to check * * Check if Unicode character is legal to start an XML 1.0 Name * * Namespaces in XML REC 1999-01-14 * http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName * updating * Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04 * http://www.w3.org/TR/2004/REC-xml-20040204/ * excluding the ':' * * Return value: non-0 if legal **/ int raptor_unicode_is_xml10_namestartchar(raptor_unichar c) { return (raptor_unicode_is_letter(c) || (c == '_')); } /** * raptor_unicode_is_namestartchar: * @c: Unicode character to check * * Check if Unicode character is legal to start an XML Name * * Return value: non-0 if the character is legal **/ int raptor_unicode_is_namestartchar(raptor_unichar c) { #ifdef RAPTOR_XML_1_1 return raptor_unicode_is_xml11_namestartchar(c); #else return raptor_unicode_is_xml10_namestartchar(c); #endif } /** * raptor_unicode_is_xml11_namechar: * @c: Unicode character * * Check if a Unicode codepoint is a legal to continue an XML 1.1 Name * * Namespaces in XML 1.1 REC 2004-02-04 * http://www.w3.org/TR/2004/REC-xml11-20040204/ * updating * Extensible Markup Language (XML) 1.1 REC 2004-02-04 * http://www.w3.org/TR/2004/REC-xml11-20040204/ sec 2.3, [4a] * excluding the ':' * * Return value: non-0 if legal **/ int raptor_unicode_is_xml11_namechar(raptor_unichar c) { return (raptor_unicode_is_xml11_namestartchar(c) || (c == 0x002D) || /* '-' */ (c == 0x002E) || /* '.' */ (c >= 0x0030 && c <= 0x0039) || /* 0-9 */ (c == 0x00B7) || (c >= 0x0300 && c <=0x036F) || (c >= 0x203F && c <=0x2040)); } /** * raptor_unicode_is_xml10_namechar: * @c: Unicode character * * Check if a Unicode codepoint is a legal to continue an XML 1.0 Name * * Namespaces in XML REC 1999-01-14 * http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCNameChar * updating * Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04 * http://www.w3.org/TR/2004/REC-xml-20040204/ * excluding the ':' * * Return value: non-0 if legal **/ int raptor_unicode_is_xml10_namechar(raptor_unichar c) { return (raptor_unicode_is_letter(c) || raptor_unicode_is_digit(c) || (c == 0x002E) || /* '.' */ (c == 0x002D) || /* '-' */ (c == 0x005F) || /* '_' */ raptor_unicode_is_combiningchar(c) || raptor_unicode_is_extender(c)); } /** * raptor_unicode_is_namechar: * @c: Unicode character to check * * Check if Unicode character is legal to continue an XML Name . * * Return value: non-0 if the character is legal **/ int raptor_unicode_is_namechar(raptor_unichar c) { #ifdef RAPTOR_XML_1_1 return raptor_unicode_is_xml11_namechar(c); #else return raptor_unicode_is_xml10_namechar(c); #endif } /* * All this below was derived by machine-transforming the classes in Appendix B * of http://www.w3.org/TR/2000/REC-xml-20001006 */ static int raptor_unicode_is_letter(long c) { return(raptor_unicode_is_basechar(c) || raptor_unicode_is_ideographic(c)); } static int raptor_unicode_is_basechar(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-BaseChar */ return((c >= 0x0041 && c <= 0x005A ) || (c >= 0x0061 && c <= 0x007A ) || (c >= 0x00C0 && c <= 0x00D6 ) || (c >= 0x00D8 && c <= 0x00F6 ) || (c >= 0x00F8 && c <= 0x00FF ) || (c >= 0x0100 && c <= 0x0131 ) || (c >= 0x0134 && c <= 0x013E ) || (c >= 0x0141 && c <= 0x0148 ) || (c >= 0x014A && c <= 0x017E ) || (c >= 0x0180 && c <= 0x01C3 ) || (c >= 0x01CD && c <= 0x01F0 ) || (c >= 0x01F4 && c <= 0x01F5 ) || (c >= 0x01FA && c <= 0x0217 ) || (c >= 0x0250 && c <= 0x02A8 ) || (c >= 0x02BB && c <= 0x02C1 ) || (c == 0x0386) || (c >= 0x0388 && c <= 0x038A ) || (c == 0x038C) || (c >= 0x038E && c <= 0x03A1 ) || (c >= 0x03A3 && c <= 0x03CE ) || (c >= 0x03D0 && c <= 0x03D6 ) || (c == 0x03DA) || (c == 0x03DC) || (c == 0x03DE) || (c == 0x03E0) || (c >= 0x03E2 && c <= 0x03F3 ) || (c >= 0x0401 && c <= 0x040C ) || (c >= 0x040E && c <= 0x044F ) || (c >= 0x0451 && c <= 0x045C ) || (c >= 0x045E && c <= 0x0481 ) || (c >= 0x0490 && c <= 0x04C4 ) || (c >= 0x04C7 && c <= 0x04C8 ) || (c >= 0x04CB && c <= 0x04CC ) || (c >= 0x04D0 && c <= 0x04EB ) || (c >= 0x04EE && c <= 0x04F5 ) || (c >= 0x04F8 && c <= 0x04F9 ) || (c >= 0x0531 && c <= 0x0556 ) || (c == 0x0559) || (c >= 0x0561 && c <= 0x0586 ) || (c >= 0x05D0 && c <= 0x05EA ) || (c >= 0x05F0 && c <= 0x05F2 ) || (c >= 0x0621 && c <= 0x063A ) || (c >= 0x0641 && c <= 0x064A ) || (c >= 0x0671 && c <= 0x06B7 ) || (c >= 0x06BA && c <= 0x06BE ) || (c >= 0x06C0 && c <= 0x06CE ) || (c >= 0x06D0 && c <= 0x06D3 ) || (c == 0x06D5) || (c >= 0x06E5 && c <= 0x06E6 ) || (c >= 0x0905 && c <= 0x0939 ) || (c == 0x093D) || (c >= 0x0958 && c <= 0x0961 ) || (c >= 0x0985 && c <= 0x098C ) || (c >= 0x098F && c <= 0x0990 ) || (c >= 0x0993 && c <= 0x09A8 ) || (c >= 0x09AA && c <= 0x09B0 ) || (c == 0x09B2) || (c >= 0x09B6 && c <= 0x09B9 ) || (c >= 0x09DC && c <= 0x09DD ) || (c >= 0x09DF && c <= 0x09E1 ) || (c >= 0x09F0 && c <= 0x09F1 ) || (c >= 0x0A05 && c <= 0x0A0A ) || (c >= 0x0A0F && c <= 0x0A10 ) || (c >= 0x0A13 && c <= 0x0A28 ) || (c >= 0x0A2A && c <= 0x0A30 ) || (c >= 0x0A32 && c <= 0x0A33 ) || (c >= 0x0A35 && c <= 0x0A36 ) || (c >= 0x0A38 && c <= 0x0A39 ) || (c >= 0x0A59 && c <= 0x0A5C ) || (c == 0x0A5E) || (c >= 0x0A72 && c <= 0x0A74 ) || (c >= 0x0A85 && c <= 0x0A8B ) || (c == 0x0A8D) || (c >= 0x0A8F && c <= 0x0A91 ) || (c >= 0x0A93 && c <= 0x0AA8 ) || (c >= 0x0AAA && c <= 0x0AB0 ) || (c >= 0x0AB2 && c <= 0x0AB3 ) || (c >= 0x0AB5 && c <= 0x0AB9 ) || (c == 0x0ABD) || (c == 0x0AE0) || (c >= 0x0B05 && c <= 0x0B0C ) || (c >= 0x0B0F && c <= 0x0B10 ) || (c >= 0x0B13 && c <= 0x0B28 ) || (c >= 0x0B2A && c <= 0x0B30 ) || (c >= 0x0B32 && c <= 0x0B33 ) || (c >= 0x0B36 && c <= 0x0B39 ) || (c == 0x0B3D) || (c >= 0x0B5C && c <= 0x0B5D ) || (c >= 0x0B5F && c <= 0x0B61 ) || (c >= 0x0B85 && c <= 0x0B8A ) || (c >= 0x0B8E && c <= 0x0B90 ) || (c >= 0x0B92 && c <= 0x0B95 ) || (c >= 0x0B99 && c <= 0x0B9A ) || (c == 0x0B9C) || (c >= 0x0B9E && c <= 0x0B9F ) || (c >= 0x0BA3 && c <= 0x0BA4 ) || (c >= 0x0BA8 && c <= 0x0BAA ) || (c >= 0x0BAE && c <= 0x0BB5 ) || (c >= 0x0BB7 && c <= 0x0BB9 ) || (c >= 0x0C05 && c <= 0x0C0C ) || (c >= 0x0C0E && c <= 0x0C10 ) || (c >= 0x0C12 && c <= 0x0C28 ) || (c >= 0x0C2A && c <= 0x0C33 ) || (c >= 0x0C35 && c <= 0x0C39 ) || (c >= 0x0C60 && c <= 0x0C61 ) || (c >= 0x0C85 && c <= 0x0C8C ) || (c >= 0x0C8E && c <= 0x0C90 ) || (c >= 0x0C92 && c <= 0x0CA8 ) || (c >= 0x0CAA && c <= 0x0CB3 ) || (c >= 0x0CB5 && c <= 0x0CB9 ) || (c == 0x0CDE) || (c >= 0x0CE0 && c <= 0x0CE1 ) || (c >= 0x0D05 && c <= 0x0D0C ) || (c >= 0x0D0E && c <= 0x0D10 ) || (c >= 0x0D12 && c <= 0x0D28 ) || (c >= 0x0D2A && c <= 0x0D39 ) || (c >= 0x0D60 && c <= 0x0D61 ) || (c >= 0x0E01 && c <= 0x0E2E ) || (c == 0x0E30) || (c >= 0x0E32 && c <= 0x0E33 ) || (c >= 0x0E40 && c <= 0x0E45 ) || (c >= 0x0E81 && c <= 0x0E82 ) || (c == 0x0E84) || (c >= 0x0E87 && c <= 0x0E88 ) || (c == 0x0E8A) || (c == 0x0E8D) || (c >= 0x0E94 && c <= 0x0E97 ) || (c >= 0x0E99 && c <= 0x0E9F ) || (c >= 0x0EA1 && c <= 0x0EA3 ) || (c == 0x0EA5) || (c == 0x0EA7) || (c >= 0x0EAA && c <= 0x0EAB ) || (c >= 0x0EAD && c <= 0x0EAE ) || (c == 0x0EB0) || (c >= 0x0EB2 && c <= 0x0EB3 ) || (c == 0x0EBD) || (c >= 0x0EC0 && c <= 0x0EC4 ) || (c >= 0x0F40 && c <= 0x0F47 ) || (c >= 0x0F49 && c <= 0x0F69 ) || (c >= 0x10A0 && c <= 0x10C5 ) || (c >= 0x10D0 && c <= 0x10F6 ) || (c == 0x1100) || (c >= 0x1102 && c <= 0x1103 ) || (c >= 0x1105 && c <= 0x1107 ) || (c == 0x1109) || (c >= 0x110B && c <= 0x110C ) || (c >= 0x110E && c <= 0x1112 ) || (c == 0x113C) || (c == 0x113E) || (c == 0x1140) || (c == 0x114C) || (c == 0x114E) || (c == 0x1150) || (c >= 0x1154 && c <= 0x1155 ) || (c == 0x1159) || (c >= 0x115F && c <= 0x1161 ) || (c == 0x1163) || (c == 0x1165) || (c == 0x1167) || (c == 0x1169) || (c >= 0x116D && c <= 0x116E ) || (c >= 0x1172 && c <= 0x1173 ) || (c == 0x1175) || (c == 0x119E) || (c == 0x11A8) || (c == 0x11AB) || (c >= 0x11AE && c <= 0x11AF ) || (c >= 0x11B7 && c <= 0x11B8 ) || (c == 0x11BA) || (c >= 0x11BC && c <= 0x11C2 ) || (c == 0x11EB) || (c == 0x11F0) || (c == 0x11F9) || (c >= 0x1E00 && c <= 0x1E9B ) || (c >= 0x1EA0 && c <= 0x1EF9 ) || (c >= 0x1F00 && c <= 0x1F15 ) || (c >= 0x1F18 && c <= 0x1F1D ) || (c >= 0x1F20 && c <= 0x1F45 ) || (c >= 0x1F48 && c <= 0x1F4D ) || (c >= 0x1F50 && c <= 0x1F57 ) || (c == 0x1F59) || (c == 0x1F5B) || (c == 0x1F5D) || (c >= 0x1F5F && c <= 0x1F7D ) || (c >= 0x1F80 && c <= 0x1FB4 ) || (c >= 0x1FB6 && c <= 0x1FBC ) || (c == 0x1FBE) || (c >= 0x1FC2 && c <= 0x1FC4 ) || (c >= 0x1FC6 && c <= 0x1FCC ) || (c >= 0x1FD0 && c <= 0x1FD3 ) || (c >= 0x1FD6 && c <= 0x1FDB ) || (c >= 0x1FE0 && c <= 0x1FEC ) || (c >= 0x1FF2 && c <= 0x1FF4 ) || (c >= 0x1FF6 && c <= 0x1FFC ) || (c == 0x2126) || (c >= 0x212A && c <= 0x212B ) || (c == 0x212E) || (c >= 0x2180 && c <= 0x2182 ) || (c >= 0x3041 && c <= 0x3094 ) || (c >= 0x30A1 && c <= 0x30FA ) || (c >= 0x3105 && c <= 0x312C ) || (c >= 0xAC00 && c <= 0xD7A3 ) ); } static int raptor_unicode_is_ideographic(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-Ideographic */ return((c >= 0x4E00 && c <= 0x9FA5 ) || (c == 0x3007) || (c >= 0x3021 && c <= 0x3029 )); } static int raptor_unicode_is_combiningchar(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-CombiningChar */ return((c >= 0x0300 && c <= 0x0345 ) || (c >= 0x0360 && c <= 0x0361 ) || (c >= 0x0483 && c <= 0x0486 ) || (c >= 0x0591 && c <= 0x05A1 ) || (c >= 0x05A3 && c <= 0x05B9 ) || (c >= 0x05BB && c <= 0x05BD ) || (c == 0x05BF) || (c >= 0x05C1 && c <= 0x05C2 ) || (c == 0x05C4) || (c >= 0x064B && c <= 0x0652 ) || (c == 0x0670) || (c >= 0x06D6 && c <= 0x06DC ) || (c >= 0x06DD && c <= 0x06DF ) || (c >= 0x06E0 && c <= 0x06E4 ) || (c >= 0x06E7 && c <= 0x06E8 ) || (c >= 0x06EA && c <= 0x06ED ) || (c >= 0x0901 && c <= 0x0903 ) || (c == 0x093C) || (c >= 0x093E && c <= 0x094C ) || (c == 0x094D) || (c >= 0x0951 && c <= 0x0954 ) || (c >= 0x0962 && c <= 0x0963 ) || (c >= 0x0981 && c <= 0x0983 ) || (c == 0x09BC) || (c == 0x09BE) || (c == 0x09BF) || (c >= 0x09C0 && c <= 0x09C4 ) || (c >= 0x09C7 && c <= 0x09C8 ) || (c >= 0x09CB && c <= 0x09CD ) || (c == 0x09D7) || (c >= 0x09E2 && c <= 0x09E3 ) || (c == 0x0A02) || (c == 0x0A3C) || (c == 0x0A3E) || (c == 0x0A3F) || (c >= 0x0A40 && c <= 0x0A42 ) || (c >= 0x0A47 && c <= 0x0A48 ) || (c >= 0x0A4B && c <= 0x0A4D ) || (c >= 0x0A70 && c <= 0x0A71 ) || (c >= 0x0A81 && c <= 0x0A83 ) || (c == 0x0ABC) || (c >= 0x0ABE && c <= 0x0AC5 ) || (c >= 0x0AC7 && c <= 0x0AC9 ) || (c >= 0x0ACB && c <= 0x0ACD ) || (c >= 0x0B01 && c <= 0x0B03 ) || (c == 0x0B3C) || (c >= 0x0B3E && c <= 0x0B43 ) || (c >= 0x0B47 && c <= 0x0B48 ) || (c >= 0x0B4B && c <= 0x0B4D ) || (c >= 0x0B56 && c <= 0x0B57 ) || (c >= 0x0B82 && c <= 0x0B83 ) || (c >= 0x0BBE && c <= 0x0BC2 ) || (c >= 0x0BC6 && c <= 0x0BC8 ) || (c >= 0x0BCA && c <= 0x0BCD ) || (c == 0x0BD7) || (c >= 0x0C01 && c <= 0x0C03 ) || (c >= 0x0C3E && c <= 0x0C44 ) || (c >= 0x0C46 && c <= 0x0C48 ) || (c >= 0x0C4A && c <= 0x0C4D ) || (c >= 0x0C55 && c <= 0x0C56 ) || (c >= 0x0C82 && c <= 0x0C83 ) || (c >= 0x0CBE && c <= 0x0CC4 ) || (c >= 0x0CC6 && c <= 0x0CC8 ) || (c >= 0x0CCA && c <= 0x0CCD ) || (c >= 0x0CD5 && c <= 0x0CD6 ) || (c >= 0x0D02 && c <= 0x0D03 ) || (c >= 0x0D3E && c <= 0x0D43 ) || (c >= 0x0D46 && c <= 0x0D48 ) || (c >= 0x0D4A && c <= 0x0D4D ) || (c == 0x0D57) || (c == 0x0E31) || (c >= 0x0E34 && c <= 0x0E3A ) || (c >= 0x0E47 && c <= 0x0E4E ) || (c == 0x0EB1) || (c >= 0x0EB4 && c <= 0x0EB9 ) || (c >= 0x0EBB && c <= 0x0EBC ) || (c >= 0x0EC8 && c <= 0x0ECD ) || (c >= 0x0F18 && c <= 0x0F19 ) || (c == 0x0F35) || (c == 0x0F37) || (c == 0x0F39) || (c == 0x0F3E) || (c == 0x0F3F) || (c >= 0x0F71 && c <= 0x0F84 ) || (c >= 0x0F86 && c <= 0x0F8B ) || (c >= 0x0F90 && c <= 0x0F95 ) || (c == 0x0F97) || (c >= 0x0F99 && c <= 0x0FAD ) || (c >= 0x0FB1 && c <= 0x0FB7 ) || (c == 0x0FB9) || (c >= 0x20D0 && c <= 0x20DC ) || (c == 0x20E1) || (c >= 0x302A && c <= 0x302F ) || (c == 0x3099) || (c == 0x309A)); } static int raptor_unicode_is_digit(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-Digit */ return((c >= 0x0030 && c <= 0x0039 ) || (c >= 0x0660 && c <= 0x0669 ) || (c >= 0x06F0 && c <= 0x06F9 ) || (c >= 0x0966 && c <= 0x096F ) || (c >= 0x09E6 && c <= 0x09EF ) || (c >= 0x0A66 && c <= 0x0A6F ) || (c >= 0x0AE6 && c <= 0x0AEF ) || (c >= 0x0B66 && c <= 0x0B6F ) || (c >= 0x0BE7 && c <= 0x0BEF ) || (c >= 0x0C66 && c <= 0x0C6F ) || (c >= 0x0CE6 && c <= 0x0CEF ) || (c >= 0x0D66 && c <= 0x0D6F ) || (c >= 0x0E50 && c <= 0x0E59 ) || (c >= 0x0ED0 && c <= 0x0ED9 ) || (c >= 0x0F20 && c <= 0x0F29 )); } static int raptor_unicode_is_extender(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-Extender */ return((c == 0x00B7) || (c == 0x02D0) || (c == 0x02D1) || (c == 0x0387) || (c == 0x0640) || (c == 0x0E46) || (c == 0x0EC6) || (c == 0x3005) || (c >= 0x3031 && c <= 0x3035 ) || (c >= 0x309D && c <= 0x309E ) || (c >= 0x30FC && c <= 0x30FE )); } /** * raptor_utf8_is_nfc: * @input: UTF-8 string * @length: length of string * * Check a string is in Unicode Normal Form C. * * Return value: Non 0 if the string is NFC **/ int raptor_utf8_is_nfc(const unsigned char *input, size_t length) { unsigned int i; int plain=1; for(i=0; i<length; i++) if(input[i]>0x7f) { plain=0; break; } if(plain) return 1; #ifdef RAPTOR_NFC_CHECK return raptor_nfc_check(input, length, NULL); #else return 1; #endif } /** * raptor_utf8_check: * @string: UTF-8 string * @length: length of string * * Check a string is UTF-8. * * Return value: Non 0 if the string is UTF-8 **/ int raptor_utf8_check(const unsigned char *string, size_t length) { while(length > 0) { raptor_unichar unichar=0; int unichar_len=raptor_utf8_to_unicode_char(&unichar, string, length); if(unichar_len < 0 || unichar_len > (int)length) return 0; if(unichar > 0x10ffff) return 0; string += unichar_len; length -= unichar_len; } return 1; } ����������������������������������������������������������������������������������raptor-1.4.21/src/raptor_abbrev.c�������������������������������������������������������������������0000644�0001750�0001750�00000057272�11330672502�013626� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_abbrev.c - Code common to abbreviating serializers (ttl/rdfxmla) * * Copyright (C) 2006, Dave Robillard * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * Copyright (C) 2005, Steve Shepard steveshep@gmail.com * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * raptor_abbrev_node implementation. * * FIXME Duplicate code * * Parts of this is taken from redland librdf_node.h and librdf_node.c * **/ raptor_abbrev_node* raptor_new_abbrev_node(raptor_world* world, raptor_identifier_type node_type, const void *node_data, raptor_uri *datatype, const unsigned char *language) { unsigned char *string; raptor_abbrev_node* node=NULL; if(node_type == RAPTOR_IDENTIFIER_TYPE_UNKNOWN) return NULL; node = (raptor_abbrev_node*)RAPTOR_CALLOC(raptor_abbrev_node, 1, sizeof(raptor_abbrev_node)); if(node) { node->world = world; node->ref_count = 1; node->type = node_type; switch (node_type) { case RAPTOR_IDENTIFIER_TYPE_PREDICATE: node->type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; /* intentional fall through */ case RAPTOR_IDENTIFIER_TYPE_RESOURCE: node->value.resource.uri = raptor_uri_copy_v2(world, (raptor_uri*)node_data); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: string=(unsigned char*)RAPTOR_MALLOC(blank, strlen((char*)node_data)+1); if(!string) goto oom; strcpy((char*)string, (const char*) node_data); node->value.blank.string = string; break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: node->value.ordinal.ordinal = *(int *)node_data; break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: string = (unsigned char*)RAPTOR_MALLOC(literal, strlen((char*)node_data)+1); if(!string) goto oom; strcpy((char*)string, (const char*)node_data); node->value.literal.string = string; if(datatype) { node->value.literal.datatype = raptor_uri_copy_v2(world, datatype); } if(language) { unsigned char *lang; lang=(unsigned char*)RAPTOR_MALLOC(language, strlen((const char*)language)+1); if(!lang) { RAPTOR_FREE(literal, string); goto oom; } strcpy((char*)lang, (const char*)language); node->value.literal.language = lang; } break; case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FREE(raptor_abbrev_node, node); } } return node; /* out of memory - clean up and return NULL */ oom: RAPTOR_FREE(raptor_abbrev_node, node); return NULL; } void raptor_free_abbrev_node(raptor_abbrev_node* node) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(node, raptor_abbrev_node); if(--node->ref_count) return; switch (node->type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: raptor_free_uri_v2(node->world, node->value.resource.uri); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: RAPTOR_FREE(blank, node->value.blank.string); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: RAPTOR_FREE(literal, node->value.literal.string); if(node->value.literal.datatype) raptor_free_uri_v2(node->world, node->value.literal.datatype); if(node->value.literal.language) RAPTOR_FREE(language, node->value.literal.language); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: /* Nothing to do */ break; } RAPTOR_FREE(raptor_abbrev_node, node); } /** * raptor_abbrev_node_cmp: * @node1: node 1 * @node2: node 2 * * INTERNAL -compare two raptor_abbrev_nodes. * * This needs to be a strong ordering for use by raptor_avltree. * This is very performance critical, anything to make it faster is worth it. * * Return value: <0, 0 or 1 if @node1 less than, equal or greater * than @node2 respectively */ int raptor_abbrev_node_cmp(raptor_abbrev_node* node1, raptor_abbrev_node* node2) { int rv = 0; if(node1 == node2) { return 0; } else if(node1->type < node2->type) { return -1; } else if(node1->type > node2->type) { return 1; } switch (node1->type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: rv = raptor_uri_compare_v2(node1->world, node1->value.resource.uri, node2->value.resource.uri); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: rv = strcmp((const char*)node1->value.blank.string, (const char*)node2->value.blank.string); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: if((char *)node1->value.literal.string != NULL && (char *)node2->value.literal.string != NULL) { /* string */ rv = strcmp((const char*)node1->value.literal.string, (const char*)node2->value.literal.string); if(rv != 0) break; /* if strings are equal, compare language */ if(node1->value.literal.language == NULL && node2->value.literal.language == NULL) { rv = 0; } else if(node1->value.literal.language != NULL && node2->value.literal.language != NULL) { rv = strcmp((const char*)node1->value.literal.language, (const char*)node2->value.literal.language); } else if(node1->value.literal.language == NULL) { rv = -1; } else { rv = 1; } if(rv != 0) break; /* if string and language are equal, compare datatype */ if(node1->value.literal.datatype == NULL && node2->value.literal.datatype == NULL ) { rv = 0; } else if(node1->value.literal.datatype != NULL && node2->value.literal.datatype != NULL) { rv = strcmp((char*)node1->value.literal.datatype, (char*)node2->value.literal.datatype); } else if(node1->value.literal.datatype == NULL) { rv = -1; } else { rv = 1; } /* if rv = 0 here then the nodes are completely equal */ } else { RAPTOR_FATAL1("string must be non-NULL for literal or xml literal\n"); rv = 0; } break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: if(node1->value.ordinal.ordinal == node2->value.ordinal.ordinal) rv = 0; else if(node1->value.ordinal.ordinal < node2->value.ordinal.ordinal) rv = -1; else rv = 1; break; case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: /* Nothing to do */ break; } return rv; } int raptor_abbrev_node_equals(raptor_abbrev_node* node1, raptor_abbrev_node* node2) { return raptor_abbrev_node_cmp(node1, node2) == 0; } /** * raptor_abbrev_node_lookup: * @nodes: Tree of nodes to search * @node_type: Raptor identifier type * @node_value: Node value to search for * @datatype: Literal datatype or NULL * @language: Literal language or NULL * @created_p: (output parameter) set to non-0 if a node was created * * INTERNAL - Look in an avltree of nodes for a node described by parameters * and if present create it, add it and return it * * Return value: the node found/created or NULL on failure */ raptor_abbrev_node* raptor_abbrev_node_lookup(raptor_avltree* nodes, raptor_identifier_type node_type, const void *node_value, raptor_uri *datatype, const unsigned char *language, int* created_p) { raptor_abbrev_node *lookup_node; raptor_abbrev_node *rv_node; /* Create a temporary node for search comparison. */ lookup_node = raptor_new_abbrev_node(nodes->world, node_type, node_value, datatype, language); if(!lookup_node) return NULL; rv_node=(raptor_abbrev_node*)raptor_avltree_search(nodes, lookup_node); if(created_p) *created_p=(!rv_node); /* If not found, insert/return a new one */ if(!rv_node) { if(raptor_avltree_add(nodes, lookup_node)) return NULL; else return lookup_node; /* Found */ } else { raptor_free_abbrev_node(lookup_node); return rv_node; } } static raptor_abbrev_node** raptor_new_abbrev_po(raptor_abbrev_node* predicate, raptor_abbrev_node* object) { raptor_abbrev_node** nodes=NULL; nodes = (raptor_abbrev_node**)RAPTOR_CALLOC(raptor_abbrev_nodes, 2, sizeof(raptor_abbrev_node*)); if(!nodes) return NULL; nodes[0]=predicate; nodes[1]=object; return nodes; } static void raptor_free_abbrev_po(raptor_abbrev_node** nodes) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(nodes, raptor_abbrev_node_pair); if(nodes[0]) raptor_free_abbrev_node(nodes[0]); if(nodes[1]) raptor_free_abbrev_node(nodes[1]); RAPTOR_FREE(raptor_abbrev_nodes, nodes); } static int raptor_compare_abbrev_po(raptor_abbrev_node** nodes1, raptor_abbrev_node** nodes2) { int d; d=raptor_abbrev_node_cmp(nodes1[0], nodes2[0]); if(!d) d=raptor_abbrev_node_cmp(nodes1[1], nodes2[1]); return d; } #ifdef RAPTOR_DEBUG static void raptor_print_abbrev_po(FILE* handle, raptor_abbrev_node** nodes) { raptor_abbrev_node* p = nodes[0]; raptor_abbrev_node* o = nodes[1]; if(p && o) { unsigned char *pred; unsigned char *obj; pred = raptor_statement_part_as_string_v2(p->world, p->value.resource.uri, p->type, NULL, NULL); obj = raptor_statement_part_as_string_v2(o->world, o->value.literal.string, o->type, o->value.literal.datatype, o->value.literal.language); fprintf(handle, "[%s : %s]\n", pred, obj); RAPTOR_FREE(cstring, pred); RAPTOR_FREE(cstring, obj); } } #endif /* * raptor_abbrev_subject implementation * * The subject of triples, with all predicates and values * linked from them. * **/ raptor_abbrev_subject* raptor_new_abbrev_subject(raptor_abbrev_node* node) { raptor_abbrev_subject* subject; if(!(node->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || node->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS || node->type == RAPTOR_IDENTIFIER_TYPE_ORDINAL)) { RAPTOR_FATAL1("Subject node must be a resource, blank, or ordinal\n"); return NULL; } subject = (raptor_abbrev_subject*)RAPTOR_CALLOC(raptor_subject, 1, sizeof(raptor_abbrev_subject)); if (subject) { subject->node = node; subject->node->ref_count++; subject->node->count_as_subject++; subject->node_type = NULL; subject->valid = 1; subject->properties = raptor_new_avltree(node->world, (raptor_data_compare_function)raptor_compare_abbrev_po, (raptor_data_free_function)raptor_free_abbrev_po, 0); #ifdef RAPTOR_DEBUG raptor_avltree_set_print_handler(subject->properties, (raptor_data_print_function)raptor_print_abbrev_po); #endif subject->list_items = raptor_new_sequence((raptor_sequence_free_handler *)raptor_free_abbrev_node, NULL); if(!subject->node || !subject->properties || !subject->list_items) { raptor_free_abbrev_subject(subject); subject = NULL; } } return subject; } void raptor_free_abbrev_subject(raptor_abbrev_subject* subject) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(subject, raptor_abbrev_subject); if(subject->node) raptor_free_abbrev_node(subject->node); if(subject->node_type) raptor_free_abbrev_node(subject->node_type); if(subject->properties) raptor_free_avltree(subject->properties); if(subject->list_items) raptor_free_sequence(subject->list_items); RAPTOR_FREE(raptor_subject, subject); } int raptor_abbrev_subject_valid(raptor_abbrev_subject *subject) { return subject->valid; } int raptor_abbrev_subject_invalidate(raptor_abbrev_subject *subject) { subject->valid = 0; return 0; } /** * raptor_subject_add_property: * @subject: subject node to add to * @predicate: predicate node * @object: object node * * INTERNAL - Add predicate/object pair into properties array of a subject node. * * The subject node takes ownership of the predicate/object nodes. * On error, predicate/object are freed immediately. * * Return value: <0 on failure, >0 if pair is a duplicate and it was not added **/ int raptor_abbrev_subject_add_property(raptor_abbrev_subject* subject, raptor_abbrev_node* predicate, raptor_abbrev_node* object) { int err; raptor_abbrev_node** nodes; nodes=raptor_new_abbrev_po(predicate, object); if(!nodes) return -1; predicate->ref_count++; object->ref_count++; if(raptor_avltree_search(subject->properties, nodes)) { /* Already present - do not add a duplicate triple (s->[p o]) */ raptor_free_abbrev_po(nodes); return 1; } #if 0 fprintf(stderr, "Adding P,O "); raptor_print_abbrev_po(stderr, nodes); raptor_avltree_dump(subject->properties, stderr); #endif err = raptor_avltree_add(subject->properties, nodes); if(err) return -1; #if 0 fprintf(stderr, "Result "); raptor_avltree_print(subject->properties, stderr); raptor_avltree_dump(subject->properties, stderr); raptor_avltree_check(subject->properties); fprintf(stderr, "\n\n"); #endif return 0; } /** * raptor_abbrev_subject_add_list_element: * @subject: subject node to add to * @ordinal: ordinal index * @object: object node * * INTERNAL - Add rdf:li into list element array of a #raptor_abbrev_subject node. * * Return value: non-0 on failure **/ int raptor_abbrev_subject_add_list_element(raptor_abbrev_subject* subject, int ordinal, raptor_abbrev_node* object) { int rv = 1; raptor_abbrev_node* node; node = (raptor_abbrev_node*)raptor_sequence_get_at(subject->list_items, ordinal); if(!node) { /* If there isn't already an entry */ rv = raptor_sequence_set_at(subject->list_items, ordinal, object); if(!rv) { object->ref_count++; object->count_as_subject++; } } return rv; } int raptor_abbrev_subject_cmp(raptor_abbrev_subject* subject1, raptor_abbrev_subject* subject2) { return raptor_abbrev_node_cmp(subject1->node, subject2->node); } raptor_abbrev_subject* raptor_abbrev_subject_find(raptor_avltree *subjects, raptor_identifier_type node_type, const void *node_data) { raptor_abbrev_subject* rv_subject = NULL; raptor_abbrev_node* lookup_node = NULL; raptor_abbrev_subject* lookup = NULL; /* datatype and language both null for a subject node */ lookup_node = raptor_new_abbrev_node(subjects->world, node_type, node_data, NULL, NULL); if(!lookup_node) return NULL; lookup = raptor_new_abbrev_subject(lookup_node); if(!lookup) { raptor_free_abbrev_node(lookup_node); return NULL; } rv_subject = (raptor_abbrev_subject*) raptor_avltree_search(subjects, lookup); raptor_free_abbrev_subject(lookup); raptor_free_abbrev_node(lookup_node); return rv_subject; } raptor_abbrev_subject* raptor_abbrev_subject_lookup(raptor_avltree* nodes, raptor_avltree* subjects, raptor_avltree* blanks, raptor_identifier_type node_type, const void *node_data, int* created_p) { raptor_avltree *tree; raptor_abbrev_subject* rv_subject; /* Search for specified resource. */ tree = (node_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) ? blanks : subjects; rv_subject= raptor_abbrev_subject_find(tree, node_type, node_data); if(created_p) *created_p=(!rv_subject); /* If not found, create one and insert it */ if(!rv_subject) { raptor_abbrev_node* node = raptor_abbrev_node_lookup(nodes, node_type, node_data, NULL, NULL, NULL); if(node) { rv_subject = raptor_new_abbrev_subject(node); if(rv_subject) { if(raptor_avltree_add(tree, rv_subject)) { rv_subject = NULL; } } } } return rv_subject; } #ifdef ABBREV_DEBUG void raptor_print_subject(raptor_abbrev_subject* subject) { int i; unsigned char *subj; unsigned char *pred; unsigned char *obj; raptor_avltree_iterator* iter=NULL; /* Note: The raptor_abbrev_node field passed as the first argument for * raptor_statement_part_as_string() is somewhat arbitrary, since as * the data structure is designed, the first word in the value union * is what was passed as the subject/predicate/object of the * statement. */ subj = raptor_statement_part_as_string(subject->node->value.resource.uri, subject->node->type, NULL, NULL); if(subject->type) { obj=raptor_statement_part_as_string(subject->type->value.resource.uri, subject->type->type, subject->type->value.literal.datatype, subject->type->value.literal.language); fprintf(stderr,"[%s, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, %s]\n", subj, obj); RAPTOR_FREE(cstring, obj); } for(i=0; i < raptor_sequence_size(subject->elements); i++) { raptor_abbrev_node* o = raptor_sequence_get_at(subject->elements, i); if(o) { obj = raptor_statement_part_as_string(o->value.literal.string, o->type, o->value.literal.datatype, o->value.literal.language); fprintf(stderr,"[%s, [rdf:_%d], %s]\n", subj, i, obj); RAPTOR_FREE(cstring, obj); } } iter=raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1); while(iter) { raptor_abbrev_node** nodes; nodes=(raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; raptor_print_abbrev_po(stderr, nodes); if(raptor_avltree_iterator_next(iter)) break; } if(iter) raptor_free_avltree_iterator(iter); RAPTOR_FREE(cstring, subj); } #endif /* helper functions */ /** * raptor_unique_id: * @base: base ID * * INTERNAL - Generate a node ID for serializing * * Raptor doesn't check that blank IDs it generates are unique from * any specified by rdf:nodeID. Here, we need to emit IDs that are * different from the ones the parser generates so that there is no * collision. For now, just prefix a '_' to the parser generated * name. * * Return value: new node ID **/ unsigned char* raptor_unique_id(unsigned char *base) { const char *prefix = "_"; int prefix_len = strlen(prefix); int base_len = strlen((const char*)base); int len = prefix_len + base_len + 1; unsigned char *unique_id; unique_id= (unsigned char *)RAPTOR_MALLOC(cstring, len); strncpy((char*)unique_id, prefix, prefix_len); strncpy((char*)unique_id+prefix_len, (char *)base, base_len); unique_id[len-1]='\0'; return unique_id; } /** * raptor_new_qname_from_resource: * @namespaces: sequence of namespaces (corresponding to nstack) * @nstack: #raptor_namespace_stack to use/update * @namespace_count: size of nstack (may be modified) * @node: #raptor_abbrev_node to use * * INTERNAL - Make an XML QName from the URI associated with the node. * * Return value: the QName or NULL on failure **/ raptor_qname* raptor_new_qname_from_resource(raptor_sequence* namespaces, raptor_namespace_stack* nstack, int* namespace_count, raptor_abbrev_node* node) { unsigned char* name=NULL; /* where to split predicate name */ size_t name_len=1; unsigned char *uri_string; size_t uri_len; unsigned char c; unsigned char *p; raptor_uri *ns_uri; raptor_namespace *ns; raptor_qname *qname; if(node->type != RAPTOR_IDENTIFIER_TYPE_RESOURCE) { RAPTOR_FATAL1("Node must be a resource\n"); return NULL; } qname=raptor_namespaces_qname_from_uri(nstack, node->value.resource.uri, 10); if(qname) return qname; uri_string = raptor_uri_as_counted_string_v2(node->world, node->value.resource.uri, &uri_len); p= uri_string; name_len=uri_len; while(name_len >0) { if(raptor_xml_name_check(p, name_len, 10)) { name=p; break; } p++; name_len--; } if(!name || (name == uri_string)) return NULL; c=*name; *name='\0'; ns_uri=raptor_new_uri_v2(node->world, uri_string); if(!ns_uri) return NULL; *name=c; ns = raptor_namespaces_find_namespace_by_uri(nstack, ns_uri); if(!ns) { /* The namespace was not declared, so create one */ unsigned char prefix[2 + MAX_ASCII_INT_SIZE + 1]; *namespace_count = *namespace_count + 1; sprintf((char *)prefix, "ns%d", *namespace_count); ns = raptor_new_namespace_from_uri(nstack, prefix, ns_uri, 0); /* We'll most likely need this namespace again. Push it on our * stack. It will be deleted in raptor_rdfxmla_serialize_terminate() */ if(raptor_sequence_push(namespaces, ns)) { /* namespaces sequence has no free handler so we have to free * the ns ourselves on error */ raptor_free_namespace(ns); raptor_free_uri_v2(node->world, ns_uri); return NULL; } } qname = raptor_new_qname_from_namespace_local_name_v2(node->world, ns, name, NULL); raptor_free_uri_v2(node->world, ns_uri); return qname; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_serialize.c����������������������������������������������������������������0000644�0001750�0001750�00000125237�11330672502�014351� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize.c - Serializers * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* prototypes for helper functions */ static raptor_serializer_factory* raptor_get_serializer_factory(raptor_world* world, const char *name); /* helper methods */ static void raptor_free_serializer_factory(raptor_serializer_factory* factory) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(factory, raptor_serializer_factory); if(factory->finish_factory) factory->finish_factory(factory); if(factory->name) RAPTOR_FREE(raptor_serializer_factory, (void*)factory->name); if(factory->label) RAPTOR_FREE(raptor_serializer_factory, (void*)factory->label); if(factory->alias) RAPTOR_FREE(raptor_serializer_factory, (void*)factory->alias); if(factory->mime_type) RAPTOR_FREE(cstring, factory->mime_type); if(factory->uri_string) RAPTOR_FREE(raptor_serializer_factory, (void*)factory->uri_string); RAPTOR_FREE(raptor_serializer_factory, factory); } /* class methods */ int raptor_serializers_init(raptor_world* world) { int rc=0; world->serializers=raptor_new_sequence((raptor_sequence_free_handler *)raptor_free_serializer_factory, NULL); if(!world->serializers) return 1; /* raptor_init_serializer_simple(); */ #ifdef RAPTOR_SERIALIZER_NTRIPLES rc+= raptor_init_serializer_ntriples(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_TURTLE rc+= raptor_init_serializer_turtle(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_RDFXML_ABBREV rc+= raptor_init_serializer_rdfxmla(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_RDFXML rc+= raptor_init_serializer_rdfxml(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_RSS_1_0 rc+= raptor_init_serializer_rss10(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_ATOM rc+= raptor_init_serializer_atom(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_DOT rc+= raptor_init_serializer_dot(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_JSON rc+= raptor_init_serializer_json(world) != 0; #endif return rc; } /* * raptor_serializers_finish - delete all the registered serializers */ void raptor_serializers_finish(raptor_world* world) { if(world->serializers) { raptor_free_sequence(world->serializers); world->serializers=NULL; } } /* * raptor_serializer_register_factory - Register a syntax that can be generated by a serializer factory * @world: raptor_world object * @name: the short syntax name * @label: readable label for syntax * @mime_type: MIME type of the syntax generated by the serializer (or NULL) * @uri_string: URI string of the syntax (or NULL) * @factory: pointer to function to call to register the factory * * INTERNAL * * Return value: non-0 on failure **/ RAPTOR_EXTERN_C int raptor_serializer_register_factory(raptor_world* world, const char *name, const char *label, const char *mime_type, const char *alias, const unsigned char *uri_string, int (*factory) (raptor_serializer_factory*)) { raptor_serializer_factory *serializer; char *name_copy, *label_copy, *mime_type_copy, *alias_copy; unsigned char *uri_string_copy; int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG4("Received registration for syntax serializer %s '%s' with alias '%s'\n", name, label, (alias ? alias : "none")); RAPTOR_DEBUG3("MIME type %s, URI %s\n", (mime_type ? mime_type : "none"), (uri_string ? (const char *)uri_string : "none")); #endif for(i=0; (serializer=(raptor_serializer_factory*)raptor_sequence_get_at(world->serializers, i)); i++) { if(!strcmp(serializer->name, name)) { RAPTOR_FATAL2("serializer %s already registered\n", name); return 1; } } serializer=(raptor_serializer_factory*)RAPTOR_CALLOC(raptor_serializer_factory, 1, sizeof(raptor_serializer_factory)); if(!serializer) return 1; serializer->world=world; name_copy=(char*)RAPTOR_CALLOC(cstring, strlen(name)+1, 1); if(!name_copy) goto tidy; strcpy(name_copy, name); serializer->name=name_copy; label_copy=(char*)RAPTOR_CALLOC(cstring, strlen(label)+1, 1); if(!label_copy) goto tidy; strcpy(label_copy, label); serializer->label=label_copy; if(mime_type) { mime_type_copy=(char*)RAPTOR_CALLOC(cstring, strlen(mime_type)+1, 1); if(!mime_type_copy) goto tidy; strcpy(mime_type_copy, mime_type); serializer->mime_type=mime_type_copy; } if(uri_string) { uri_string_copy=(unsigned char*)RAPTOR_CALLOC(cstring, strlen((const char*)uri_string)+1, 1); if(!uri_string_copy) goto tidy; strcpy((char*)uri_string_copy, (const char*)uri_string); serializer->uri_string=uri_string_copy; } if(alias) { alias_copy=(char*)RAPTOR_CALLOC(cstring, strlen(alias)+1, 1); if(!alias_copy) goto tidy; strcpy(alias_copy, alias); serializer->alias=alias_copy; } if(raptor_sequence_push(world->serializers, serializer)) return 1; /* on error, serializer is already freed by the sequence */ /* Call the serializer registration function on the new object */ if (factory(serializer)) return 1; /* serializer is owned and freed by the serializers sequence */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("%s has context size %d\n", name, serializer->context_length); #endif return 0; /* Clean up on failure */ tidy: raptor_free_serializer_factory(serializer); return 1; } /** * raptor_get_serializer_factory: * @world: raptor_world object * @name: the factory name or NULL for the default factory * * Get a serializer factory by name. * * Return value: the factory object or NULL if there is no such factory **/ static raptor_serializer_factory* raptor_get_serializer_factory(raptor_world* world, const char *name) { raptor_serializer_factory *factory; /* return 1st serializer if no particular one wanted - why? */ if(!name) { factory=(raptor_serializer_factory *)raptor_sequence_get_at(world->serializers, 0); if(!factory) { RAPTOR_DEBUG1("No (default) serializers registered\n"); return NULL; } } else { int i; for(i=0; (factory=(raptor_serializer_factory*)raptor_sequence_get_at(world->serializers, i)); i++) { if(!strcmp(factory->name, name) || (factory->alias && !strcmp(factory->alias, name))) break; } /* else FACTORY name not found */ if(!factory) { RAPTOR_DEBUG2("No serializer with name %s found\n", name); return NULL; } } return factory; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_serializers_enumerate: * @counter: index into the list of syntaxes * @name: pointer to store the name of the syntax (or NULL) * @label: pointer to store syntax readable label (or NULL) * @mime_type: pointer to store syntax MIME Type (or NULL) * @uri_string: pointer to store syntax URI string (or NULL) * * Get information on syntax serializers. * * raptor_init() MUST have been called before calling this function. * Use raptor_serializers_enumerate_v2() if using raptor_world APIs. * * Return value: non 0 on failure of if counter is out of range **/ int raptor_serializers_enumerate(const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string) { return raptor_serializers_enumerate_v2(raptor_world_instance(), counter, name, label, mime_type, uri_string); } #endif /** * raptor_serializers_enumerate_v2: * @world: raptor_world object * @counter: index into the list of syntaxes * @name: pointer to store the name of the syntax (or NULL) * @label: pointer to store syntax readable label (or NULL) * @mime_type: pointer to store syntax MIME Type (or NULL) * @uri_string: pointer to store syntax URI string (or NULL) * * Get information on syntax serializers. * * Return value: non 0 on failure of if counter is out of range **/ int raptor_serializers_enumerate_v2(raptor_world* world, const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string) { raptor_serializer_factory *factory; factory=(raptor_serializer_factory*)raptor_sequence_get_at(world->serializers, counter); if(!factory) return 1; if(name) *name=factory->name; if(label) *label=factory->label; if(mime_type) *mime_type=factory->mime_type; if(uri_string) *uri_string=factory->uri_string; return 0; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_serializer_syntax_name_check: * @name: the syntax name * * Check name of a serializer. * * raptor_init() MUST have been called before calling this function. * Use raptor_serializer_syntax_name_check_v2() if using raptor_world APIs. * * Return value: non 0 if name is a known syntax name */ int raptor_serializer_syntax_name_check(const char *name) { return raptor_serializer_syntax_name_check_v2(raptor_world_instance(), name); } #endif /** * raptor_serializer_syntax_name_check_v2: * @world: raptor_world object * @name: the syntax name * * Check name of a serializer. * * Return value: non 0 if name is a known syntax name */ int raptor_serializer_syntax_name_check_v2(raptor_world* world, const char *name) { return (raptor_get_serializer_factory(world, name) != NULL); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_serializer: * @name: the serializer name * * Constructor - create a new raptor_serializer object. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_serializer_v2() if using raptor_world APIs. * * Return value: a new #raptor_serializer object or NULL on failure */ raptor_serializer* raptor_new_serializer(const char *name) { return raptor_new_serializer_v2(raptor_world_instance(), name); } #endif /** * raptor_new_serializer_v2: * @world: raptor_world object * @name: the serializer name * * Constructor - create a new raptor_serializer object. * * Return value: a new #raptor_serializer object or NULL on failure */ raptor_serializer* raptor_new_serializer_v2(raptor_world* world, const char *name) { raptor_serializer_factory* factory; raptor_serializer* rdf_serializer; factory=raptor_get_serializer_factory(world, name); if(!factory) return NULL; rdf_serializer=(raptor_serializer*)RAPTOR_CALLOC(raptor_serializer, 1, sizeof(raptor_serializer)); if(!rdf_serializer) return NULL; rdf_serializer->world=world; rdf_serializer->context=(char*)RAPTOR_CALLOC(raptor_serializer_context, 1, factory->context_length); if(!rdf_serializer->context) { raptor_free_serializer(rdf_serializer); return NULL; } rdf_serializer->factory=factory; /* Default features */ /* Emit @base directive or equivalent */ rdf_serializer->feature_write_base_uri=1; /* Emit relative URIs where possible */ rdf_serializer->feature_relative_uris=1; rdf_serializer->feature_resource_border = rdf_serializer->feature_literal_border = rdf_serializer->feature_bnode_border = rdf_serializer->feature_resource_fill = rdf_serializer->feature_literal_fill = rdf_serializer->feature_bnode_fill = NULL; /* XML 1.0 output */ rdf_serializer->xml_version=10; /* Write XML declaration */ rdf_serializer->feature_write_xml_declaration=1; /* JSON callback function name */ rdf_serializer->feature_json_callback= NULL; /* JSON extra data */ rdf_serializer->feature_json_extra_data= NULL; /* RSS triples */ rdf_serializer->feature_rss_triples= NULL; /* Atom entry URI */ rdf_serializer->feature_atom_entry_uri= NULL; /* Prefix elements with a namespace */ rdf_serializer->feature_prefix_elements = 0; if(factory->init(rdf_serializer, name)) { raptor_free_serializer(rdf_serializer); return NULL; } return rdf_serializer; } /** * raptor_serialize_start_to_iostream: * @rdf_serializer: the #raptor_serializer * @uri: base URI or NULL if no base URI is required * @iostream: #raptor_iostream to write serialization to * * Start serialization to an iostream with given base URI * * The passed in @iostream does not becomes owned by the serializer * and can be used by the caller after serializing is done. It * must be destroyed by the caller. Compare to * raptor_serialize_start() which will be deprecated in future. * * Return value: non-0 on failure. **/ int raptor_serialize_start_to_iostream(raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream) { if(rdf_serializer->base_uri) raptor_free_uri_v2(rdf_serializer->world, rdf_serializer->base_uri); if(!iostream) return 1; if(uri) uri=raptor_uri_copy_v2(rdf_serializer->world, uri); rdf_serializer->base_uri=uri; rdf_serializer->locator.uri=uri; rdf_serializer->locator.line=rdf_serializer->locator.column = 0; rdf_serializer->iostream=iostream; if(rdf_serializer->factory->serialize_start) return rdf_serializer->factory->serialize_start(rdf_serializer); return 0; } /** * raptor_serialize_start: * @rdf_serializer: the #raptor_serializer * @uri: base URI or NULL if no base URI is required * @iostream: #raptor_iostream to write serialization to * * Start serialization with given base URI * * The passed in @iostream becomes owned by the serializer and will * be destroyed when the serializing is complete. Compare to * raptor_serialize_start_to_iostream(). This function * will be deprecated for raptor_serialize_start_to_iostream() in future. * * Return value: non-0 on failure. **/ int raptor_serialize_start(raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream) { int rc; rc=raptor_serialize_start_to_iostream(rdf_serializer, uri, iostream); if(!rc) rdf_serializer->free_iostream_on_end=1; return rc; } /** * raptor_serialize_start_to_filename: * @rdf_serializer: the #raptor_serializer * @filename: filename to serialize to * * Start serializing to a filename. * * Return value: non-0 on failure. **/ int raptor_serialize_start_to_filename(raptor_serializer *rdf_serializer, const char *filename) { unsigned char *uri_string=raptor_uri_filename_to_uri_string(filename); if(!uri_string) return 1; if(rdf_serializer->base_uri) raptor_free_uri_v2(rdf_serializer->world, rdf_serializer->base_uri); rdf_serializer->base_uri=raptor_new_uri_v2(rdf_serializer->world, uri_string); rdf_serializer->locator.uri=rdf_serializer->base_uri; rdf_serializer->locator.line=rdf_serializer->locator.column = 0; RAPTOR_FREE(cstring, uri_string); rdf_serializer->iostream=raptor_new_iostream_to_filename(filename); if(!rdf_serializer->iostream) return 1; rdf_serializer->free_iostream_on_end=1; if(rdf_serializer->factory->serialize_start) return rdf_serializer->factory->serialize_start(rdf_serializer); return 0; } /** * raptor_serialize_start_to_string: * @rdf_serializer: the #raptor_serializer * @uri: base URI or NULL if no base URI is required * @string_p: pointer to location to hold string * @length_p: pointer to location to hold length of string (or NULL) * * Start serializing to a string. * * Return value: non-0 on failure. **/ int raptor_serialize_start_to_string(raptor_serializer *rdf_serializer, raptor_uri *uri, void **string_p, size_t *length_p) { if(rdf_serializer->base_uri) raptor_free_uri_v2(rdf_serializer->world, rdf_serializer->base_uri); if(uri) rdf_serializer->base_uri=raptor_uri_copy_v2(rdf_serializer->world, uri); else rdf_serializer->base_uri=NULL; rdf_serializer->locator.uri=rdf_serializer->base_uri; rdf_serializer->locator.line=rdf_serializer->locator.column = 0; rdf_serializer->iostream=raptor_new_iostream_to_string(string_p, length_p, NULL); if(!rdf_serializer->iostream) return 1; rdf_serializer->free_iostream_on_end=1; if(rdf_serializer->factory->serialize_start) return rdf_serializer->factory->serialize_start(rdf_serializer); return 0; } /** * raptor_serialize_start_to_file_handle: * @rdf_serializer: the #raptor_serializer * @uri: base URI or NULL if no base URI is required * @fh: FILE* to serialize to * * Start serializing to a FILE*. * * NOTE: This does not fclose the handle when it is finished. * * Return value: non-0 on failure. **/ int raptor_serialize_start_to_file_handle(raptor_serializer *rdf_serializer, raptor_uri *uri, FILE *fh) { if(rdf_serializer->base_uri) raptor_free_uri_v2(rdf_serializer->world, rdf_serializer->base_uri); if(uri) rdf_serializer->base_uri=raptor_uri_copy_v2(rdf_serializer->world, uri); else rdf_serializer->base_uri=NULL; rdf_serializer->locator.uri=rdf_serializer->base_uri; rdf_serializer->locator.line=rdf_serializer->locator.column = 0; rdf_serializer->iostream=raptor_new_iostream_to_file_handle(fh); if(!rdf_serializer->iostream) return 1; rdf_serializer->free_iostream_on_end=1; if(rdf_serializer->factory->serialize_start) return rdf_serializer->factory->serialize_start(rdf_serializer); return 0; } /** * raptor_serialize_set_namespace: * @rdf_serializer: the #raptor_serializer * @uri: #raptor_uri of namespace or NULL * @prefix: prefix to use or NULL * * set a namespace uri/prefix mapping for serializing. * * return value: non-0 on failure. **/ int raptor_serialize_set_namespace(raptor_serializer* rdf_serializer, raptor_uri *uri, const unsigned char *prefix) { if(prefix && !*prefix) prefix=NULL; if(rdf_serializer->factory->declare_namespace) return rdf_serializer->factory->declare_namespace(rdf_serializer, uri, prefix); return 1; } /** * raptor_serialize_set_namespace_from_namespace: * @rdf_serializer: the #raptor_serializer * @nspace: #raptor_namespace to set * * Set a namespace uri/prefix mapping for serializing from an existing namespace. * * Return value: non-0 on failure. **/ int raptor_serialize_set_namespace_from_namespace(raptor_serializer* rdf_serializer, raptor_namespace *nspace) { if(rdf_serializer->factory->declare_namespace_from_namespace) return rdf_serializer->factory->declare_namespace_from_namespace(rdf_serializer, nspace); else if (rdf_serializer->factory->declare_namespace) return rdf_serializer->factory->declare_namespace(rdf_serializer, raptor_namespace_get_uri(nspace), raptor_namespace_get_prefix(nspace)); return 1; } /** * raptor_serialize_statement: * @rdf_serializer: the #raptor_serializer * @statement: #raptor_statement to serialize to a syntax * * Serialize a statement. * * Return value: non-0 on failure. **/ int raptor_serialize_statement(raptor_serializer* rdf_serializer, const raptor_statement *statement) { if(!rdf_serializer->iostream) return 1; return rdf_serializer->factory->serialize_statement(rdf_serializer, statement); } /** * raptor_serialize_end: * @rdf_serializer: the #raptor_serializer * * End a serialization. * * Return value: non-0 on failure. **/ int raptor_serialize_end(raptor_serializer *rdf_serializer) { int rc; if(!rdf_serializer->iostream) return 1; if(rdf_serializer->factory->serialize_end) rc=rdf_serializer->factory->serialize_end(rdf_serializer); else rc=0; if(rdf_serializer->iostream) { if(rdf_serializer->free_iostream_on_end) raptor_free_iostream(rdf_serializer->iostream); rdf_serializer->iostream=NULL; } return rc; } /** * raptor_free_serializer: * @rdf_serializer: #raptor_serializer object * * Destructor - destroy a raptor_serializer object. * **/ void raptor_free_serializer(raptor_serializer* rdf_serializer) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(rdf_serializer, raptor_serializer); if(rdf_serializer->factory) rdf_serializer->factory->terminate(rdf_serializer); if(rdf_serializer->context) RAPTOR_FREE(raptor_serializer_context, rdf_serializer->context); if(rdf_serializer->base_uri) raptor_free_uri_v2(rdf_serializer->world, rdf_serializer->base_uri); if(rdf_serializer->feature_start_uri) raptor_free_uri_v2(rdf_serializer->world, rdf_serializer->feature_start_uri); if(rdf_serializer->feature_resource_border) RAPTOR_FREE(cstring, rdf_serializer->feature_resource_border); if(rdf_serializer->feature_literal_border) RAPTOR_FREE(cstring, rdf_serializer->feature_literal_border); if(rdf_serializer->feature_bnode_border) RAPTOR_FREE(cstring, rdf_serializer->feature_bnode_border); if(rdf_serializer->feature_resource_fill) RAPTOR_FREE(cstring, rdf_serializer->feature_resource_fill); if(rdf_serializer->feature_literal_fill) RAPTOR_FREE(cstring, rdf_serializer->feature_literal_fill); if(rdf_serializer->feature_bnode_fill) RAPTOR_FREE(cstring, rdf_serializer->feature_bnode_fill); if(rdf_serializer->feature_json_callback) RAPTOR_FREE(cstring, rdf_serializer->feature_json_callback); if(rdf_serializer->feature_json_extra_data) RAPTOR_FREE(cstring, rdf_serializer->feature_json_extra_data); if(rdf_serializer->feature_rss_triples) RAPTOR_FREE(cstring, rdf_serializer->feature_rss_triples); if(rdf_serializer->feature_atom_entry_uri) RAPTOR_FREE(cstring, rdf_serializer->feature_atom_entry_uri); RAPTOR_FREE(raptor_serializer, rdf_serializer); } /** * raptor_serializer_get_iostream: * @serializer: #raptor_serializer object * * Get the current serializer iostream. * * Return value: the serializer's current iostream or NULL if **/ raptor_iostream* raptor_serializer_get_iostream(raptor_serializer *serializer) { return serializer->iostream; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_serializer_features_enumerate: * @feature: feature enumeration (0+) * @name: pointer to store feature short name (or NULL) * @uri: pointer to store feature URI (or NULL) * @label: pointer to feature label (or NULL) * * Get list of serializer features. * * If uri is not NULL, a pointer toa new raptor_uri is returned * that must be freed by the caller with raptor_free_uri(). * * raptor_init() MUST have been called before calling this function. * Use raptor_serializer_features_enumerate_v2() if using raptor_world APIs. * * Return value: 0 on success, <0 on failure, >0 if feature is unknown **/ int raptor_serializer_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label) { return raptor_serializer_features_enumerate_v2(raptor_world_instance(), feature, name, uri, label); } #endif /** * raptor_serializer_features_enumerate_v2: * @world: raptor_world object * @feature: feature enumeration (0+) * @name: pointer to store feature short name (or NULL) * @uri: pointer to store feature URI (or NULL) * @label: pointer to feature label (or NULL) * * Get list of serializer features. * * If uri is not NULL, a pointer toa new raptor_uri is returned * that must be freed by the caller with raptor_free_uri_v2(). * * Return value: 0 on success, <0 on failure, >0 if feature is unknown **/ int raptor_serializer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label) { return raptor_features_enumerate_common(world, feature, name, uri, label, 2); } /** * raptor_serializer_set_feature: * @serializer: #raptor_serializer serializer object * @feature: feature to set from enumerated #raptor_feature values * @value: integer feature value (0 or larger) * * Set serializer features with integer values. * * The allowed features are available via raptor_features_enumerate(). * * Return value: non 0 on failure or if the feature is unknown **/ int raptor_serializer_set_feature(raptor_serializer *serializer, raptor_feature feature, int value) { if(value < 0) return -1; switch(feature) { case RAPTOR_FEATURE_WRITE_BASE_URI: serializer->feature_write_base_uri=value; break; case RAPTOR_FEATURE_RELATIVE_URIS: serializer->feature_relative_uris=value; break; case RAPTOR_FEATURE_START_URI: return -1; break; case RAPTOR_FEATURE_WRITER_XML_VERSION: if(value == 10 || value == 11) serializer->xml_version=value; break; case RAPTOR_FEATURE_WRITER_XML_DECLARATION: serializer->feature_write_xml_declaration = value; break; case RAPTOR_FEATURE_PREFIX_ELEMENTS: serializer->feature_prefix_elements = value; break; /* parser features */ case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ASSUME_IS_RDF: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: /* Shared */ case RAPTOR_FEATURE_NO_NET: /* XML writer features */ case RAPTOR_FEATURE_WRITER_AUTO_INDENT: case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: /* String features */ case RAPTOR_FEATURE_RESOURCE_BORDER: case RAPTOR_FEATURE_LITERAL_BORDER: case RAPTOR_FEATURE_BNODE_BORDER: case RAPTOR_FEATURE_RESOURCE_FILL: case RAPTOR_FEATURE_LITERAL_FILL: case RAPTOR_FEATURE_BNODE_FILL: case RAPTOR_FEATURE_JSON_CALLBACK: case RAPTOR_FEATURE_JSON_EXTRA_DATA: case RAPTOR_FEATURE_RSS_TRIPLES: case RAPTOR_FEATURE_ATOM_ENTRY_URI: /* WWW features */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: return -1; break; } return 0; } static int raptor_serializer_copy_string(unsigned char ** dest, const unsigned char * src) { size_t src_len=strlen((const char *)src); if(*dest) { RAPTOR_FREE(cstring, *dest); *dest=NULL; } if(!(*dest=(unsigned char*)RAPTOR_MALLOC(cstring, src_len+1))) return -1; strcpy((char *)(*dest), (const char *)src); return 0; } /** * raptor_serializer_set_feature_string: * @serializer: #raptor_serializer serializer object * @feature: feature to set from enumerated #raptor_feature values * @value: feature value * * Set serializer features with string values. * * The allowed features are available via raptor_serializer_features_enumerate(). * If the feature type is integer, the value is interpreted as an integer. * * Return value: non 0 on failure or if the feature is unknown **/ int raptor_serializer_set_feature_string(raptor_serializer *serializer, raptor_feature feature, const unsigned char *value) { int value_is_string=(raptor_feature_value_type(feature) == 1); if(!value_is_string) return raptor_serializer_set_feature(serializer, feature, atoi((const char*)value)); switch(feature) { case RAPTOR_FEATURE_START_URI: if(value) serializer->feature_start_uri=raptor_new_uri_v2(serializer->world, value); else return -1; break; case RAPTOR_FEATURE_WRITE_BASE_URI: case RAPTOR_FEATURE_RELATIVE_URIS: case RAPTOR_FEATURE_PREFIX_ELEMENTS: /* actually handled above because value_is_string is false */ return -1; break; /* parser features */ case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ASSUME_IS_RDF: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: /* Shared */ case RAPTOR_FEATURE_NO_NET: /* XML writer features */ case RAPTOR_FEATURE_WRITER_AUTO_INDENT: case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: case RAPTOR_FEATURE_WRITER_XML_VERSION: case RAPTOR_FEATURE_WRITER_XML_DECLARATION: /* GraphViz serializer features */ case RAPTOR_FEATURE_RESOURCE_BORDER: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_resource_border), value); break; case RAPTOR_FEATURE_LITERAL_BORDER: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_literal_border), value); break; case RAPTOR_FEATURE_BNODE_BORDER: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_bnode_border), value); break; case RAPTOR_FEATURE_RESOURCE_FILL: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_resource_fill), value); break; case RAPTOR_FEATURE_LITERAL_FILL: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_literal_fill), value); break; case RAPTOR_FEATURE_BNODE_FILL: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_bnode_fill), value); break; /* JSON serializer features */ case RAPTOR_FEATURE_JSON_CALLBACK: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_json_callback), value); break; case RAPTOR_FEATURE_JSON_EXTRA_DATA: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_json_extra_data), value); break; case RAPTOR_FEATURE_RSS_TRIPLES: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_rss_triples), value); break; case RAPTOR_FEATURE_ATOM_ENTRY_URI: return raptor_serializer_copy_string( (unsigned char **)&(serializer->feature_atom_entry_uri), value); break; /* WWW features */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: return -1; break; } return 0; } /** * raptor_serializer_get_feature: * @serializer: #raptor_serializer serializer object * @feature: feature to get value * * Get various serializer features. * * The allowed features are available via raptor_features_enumerate(). * * Note: no feature value is negative * * Return value: feature value or < 0 for an illegal feature **/ int raptor_serializer_get_feature(raptor_serializer *serializer, raptor_feature feature) { int result= -1; switch(feature) { case RAPTOR_FEATURE_WRITE_BASE_URI: result=(serializer->feature_write_base_uri != 0); break; case RAPTOR_FEATURE_RELATIVE_URIS: result=(serializer->feature_relative_uris != 0); break; /* String features */ case RAPTOR_FEATURE_START_URI: case RAPTOR_FEATURE_RESOURCE_BORDER: case RAPTOR_FEATURE_LITERAL_BORDER: case RAPTOR_FEATURE_BNODE_BORDER: case RAPTOR_FEATURE_RESOURCE_FILL: case RAPTOR_FEATURE_LITERAL_FILL: case RAPTOR_FEATURE_BNODE_FILL: case RAPTOR_FEATURE_JSON_CALLBACK: case RAPTOR_FEATURE_JSON_EXTRA_DATA: case RAPTOR_FEATURE_RSS_TRIPLES: case RAPTOR_FEATURE_ATOM_ENTRY_URI: result= -1; break; case RAPTOR_FEATURE_PREFIX_ELEMENTS: result = serializer->feature_prefix_elements; break; case RAPTOR_FEATURE_WRITER_XML_VERSION: result=serializer->xml_version; break; case RAPTOR_FEATURE_WRITER_XML_DECLARATION: result=serializer->feature_write_xml_declaration; break; /* parser features */ case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ASSUME_IS_RDF: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: /* Shared */ case RAPTOR_FEATURE_NO_NET: /* XML writer features */ case RAPTOR_FEATURE_WRITER_AUTO_INDENT: case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: /* WWW features */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: break; } return result; } /** * raptor_serializer_get_feature_string: * @serializer: #raptor_serializer serializer object * @feature: feature to get value * * Get serializer features with string values. * * The allowed features are available via raptor_features_enumerate(). * * Return value: feature value or NULL for an illegal feature or no value **/ const unsigned char * raptor_serializer_get_feature_string(raptor_serializer *serializer, raptor_feature feature) { int value_is_string=(raptor_feature_value_type(feature) == 1); if(!value_is_string) return NULL; switch(feature) { case RAPTOR_FEATURE_START_URI: if(serializer->feature_start_uri) return raptor_uri_to_string_v2(serializer->world, serializer->feature_start_uri); break; case RAPTOR_FEATURE_WRITE_BASE_URI: case RAPTOR_FEATURE_RELATIVE_URIS: /* actually handled above because value_is_string is false */ return NULL; break; /* GraphViz serializer features */ case RAPTOR_FEATURE_RESOURCE_BORDER: return (unsigned char *)(serializer->feature_resource_border); break; case RAPTOR_FEATURE_LITERAL_BORDER: return (unsigned char *)(serializer->feature_literal_border); break; case RAPTOR_FEATURE_BNODE_BORDER: return (unsigned char *)(serializer->feature_bnode_border); break; case RAPTOR_FEATURE_RESOURCE_FILL: return (unsigned char *)(serializer->feature_resource_fill); break; case RAPTOR_FEATURE_LITERAL_FILL: return (unsigned char *)(serializer->feature_literal_fill); break; case RAPTOR_FEATURE_BNODE_FILL: return (unsigned char *)(serializer->feature_bnode_fill); break; case RAPTOR_FEATURE_JSON_CALLBACK: return (unsigned char *)(serializer->feature_json_callback); break; case RAPTOR_FEATURE_JSON_EXTRA_DATA: return (unsigned char *)(serializer->feature_json_extra_data); break; case RAPTOR_FEATURE_RSS_TRIPLES: return (unsigned char *)(serializer->feature_rss_triples); break; case RAPTOR_FEATURE_ATOM_ENTRY_URI: return (unsigned char *)(serializer->feature_atom_entry_uri); break; case RAPTOR_FEATURE_PREFIX_ELEMENTS: return NULL; break; /* parser features */ case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ASSUME_IS_RDF: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: /* Shared */ case RAPTOR_FEATURE_NO_NET: /* XML writer features */ case RAPTOR_FEATURE_WRITER_AUTO_INDENT: case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: case RAPTOR_FEATURE_WRITER_XML_VERSION: case RAPTOR_FEATURE_WRITER_XML_DECLARATION: /* WWW features */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: return NULL; break; } return NULL; } /* * raptor_serializer_error - Error from a serializer - Internal */ void raptor_serializer_error(raptor_serializer* serializer, const char *message, ...) { va_list arguments; va_start(arguments, message); raptor_serializer_error_varargs(serializer, message, arguments); va_end(arguments); } /* * raptor_serializer_simple_error - Error from a serializer - Internal * * Matches the raptor_simple_message_handler API but same as * raptor_serializer_error */ void raptor_serializer_simple_error(void* serializer, const char *message, ...) { va_list arguments; va_start(arguments, message); raptor_serializer_error_varargs((raptor_serializer*)serializer, message, arguments); va_end(arguments); } /* * raptor_serializer_error_varargs - Error from a serializer - Internal */ void raptor_serializer_error_varargs(raptor_serializer* serializer, const char *message, va_list arguments) { if(serializer->error_handler) { char *buffer=raptor_vsnprintf(message, arguments); size_t length; if(!buffer) { fprintf(stderr, "raptor_serializer_error_varargs: Out of memory\n"); return; } length=strlen(buffer); if(buffer[length-1]=='\n') buffer[length-1]='\0'; serializer->error_handler(serializer->error_user_data, &serializer->locator, buffer); RAPTOR_FREE(cstring, buffer); return; } raptor_print_locator_v2(serializer->world, stderr, &serializer->locator); fprintf(stderr, " raptor error - "); vfprintf(stderr, message, arguments); fputc('\n', stderr); } /* * raptor_serializer_warning - Warning from a serializer - Internal */ void raptor_serializer_warning(raptor_serializer* serializer, const char *message, ...) { va_list arguments; va_start(arguments, message); raptor_serializer_warning_varargs(serializer, message, arguments); va_end(arguments); } /* * raptor_serializer_warning - Warning from a serializer - Internal */ void raptor_serializer_warning_varargs(raptor_serializer* serializer, const char *message, va_list arguments) { if(serializer->warning_handler) { char *buffer=raptor_vsnprintf(message, arguments); size_t length; if(!buffer) { fprintf(stderr, "raptor_serializer_warning_varargs: Out of memory\n"); return; } length=strlen(buffer); if(buffer[length-1]=='\n') buffer[length-1]='\0'; serializer->warning_handler(serializer->warning_user_data, &serializer->locator, buffer); RAPTOR_FREE(cstring, buffer); return; } raptor_print_locator_v2(serializer->world, stderr, &serializer->locator); fprintf(stderr, " raptor warning - "); vfprintf(stderr, message, arguments); fputc('\n', stderr); } /** * raptor_serializer_set_error_handler: * @serializer: the serializer * @user_data: user data to pass to function * @handler: pointer to the function * * Set the serializer error handling function. * * The function will receive callbacks when the serializer fails. * **/ void raptor_serializer_set_error_handler(raptor_serializer* serializer, void *user_data, raptor_message_handler handler) { serializer->error_user_data=user_data; serializer->error_handler=handler; } /** * raptor_serializer_set_warning_handler: * @serializer: the serializer * @user_data: user data to pass to function * @handler: pointer to the function * * Set the serializer warning handling function. * * The function will receive callbacks when the serializer fails. * **/ void raptor_serializer_set_warning_handler(raptor_serializer* serializer, void *user_data, raptor_message_handler handler) { serializer->warning_user_data=user_data; serializer->warning_handler=handler; } /** * raptor_serializer_get_locator: * @rdf_serializer: raptor serializer * * Get the serializer raptor locator object. * * Return value: raptor locator **/ raptor_locator* raptor_serializer_get_locator(raptor_serializer *rdf_serializer) { return &rdf_serializer->locator; } /** * raptor_serializer_get_world: * @rdf_serializer: raptor serializer * * Get the #raptor_world object associated with a serializer. * * Return value: raptor_world* pointer **/ raptor_world * raptor_serializer_get_world(raptor_serializer* rdf_serializer) { return rdf_serializer->world; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/turtle_parser.c�������������������������������������������������������������������0000644�0001750�0001750�00000313351�11330672547�013673� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse turtle_parser_parse #define yylex turtle_parser_lex #define yyerror turtle_parser_error #define yylval turtle_parser_lval #define yychar turtle_parser_char #define yydebug turtle_parser_debug #define yynerrs turtle_parser_nerrs /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ #line 30 "./turtle_parser.y" #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include <raptor.h> #include <raptor_internal.h> #include <turtle_parser.h> #define YY_DECL int turtle_lexer_lex (YYSTYPE *turtle_parser_lval, yyscan_t yyscanner) #define YY_NO_UNISTD_H 1 #include <turtle_lexer.h> #include <turtle_common.h> /* Make verbose error messages for syntax errors */ #ifdef RAPTOR_DEBUG #define YYERROR_VERBOSE 1 #endif /* Slow down the grammar operation and watch it work */ #if RAPTOR_DEBUG > 2 #define YYDEBUG 1 #endif /* the lexer does not seem to track this */ #undef RAPTOR_TURTLE_USE_ERROR_COLUMNS /* Prototypes */ int turtle_parser_error(void* rdf_parser, const char *msg); /* Missing turtle_lexer.c/h prototypes */ int turtle_lexer_get_column(yyscan_t yyscanner); /* Not used here */ /* void turtle_lexer_set_column(int column_no , yyscan_t yyscanner);*/ /* What the lexer wants */ extern int turtle_lexer_lex (YYSTYPE *turtle_parser_lval, yyscan_t scanner); #define YYLEX_PARAM ((raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context))->scanner /* Pure parser argument (a void*) */ #define YYPARSE_PARAM rdf_parser /* Make the yyerror below use the rdf_parser */ #undef yyerror #define yyerror(message) turtle_parser_error(rdf_parser, message) /* Make lex/yacc interface as small as possible */ #undef yylex #define yylex turtle_lexer_lex static raptor_triple* raptor_turtle_new_triple(raptor_identifier *subject, raptor_identifier *predicate, raptor_identifier *object); static void raptor_turtle_free_triple(raptor_triple *triple); #ifdef RAPTOR_DEBUG static void raptor_triple_print(raptor_triple *data, FILE *fh); #endif /* Prototypes for local functions */ static void raptor_turtle_generate_statement(raptor_parser *parser, raptor_triple *triple); /* Line 189 of yacc.c */ #line 165 "turtle_parser.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { A = 258, AT = 259, HAT = 260, DOT = 261, COMMA = 262, SEMICOLON = 263, LEFT_SQUARE = 264, RIGHT_SQUARE = 265, LEFT_ROUND = 266, RIGHT_ROUND = 267, LEFT_CURLY = 268, RIGHT_CURLY = 269, COLONMINUS = 270, TRUE_TOKEN = 271, FALSE_TOKEN = 272, STRING_LITERAL = 273, URI_LITERAL = 274, BLANK_LITERAL = 275, QNAME_LITERAL = 276, PREFIX = 277, BASE = 278, IDENTIFIER = 279, INTEGER_LITERAL = 280, FLOATING_LITERAL = 281, DECIMAL_LITERAL = 282, ERROR_TOKEN = 283 }; #endif /* Tokens. */ #define A 258 #define AT 259 #define HAT 260 #define DOT 261 #define COMMA 262 #define SEMICOLON 263 #define LEFT_SQUARE 264 #define RIGHT_SQUARE 265 #define LEFT_ROUND 266 #define RIGHT_ROUND 267 #define LEFT_CURLY 268 #define RIGHT_CURLY 269 #define COLONMINUS 270 #define TRUE_TOKEN 271 #define FALSE_TOKEN 272 #define STRING_LITERAL 273 #define URI_LITERAL 274 #define BLANK_LITERAL 275 #define QNAME_LITERAL 276 #define PREFIX 277 #define BASE 278 #define IDENTIFIER 279 #define INTEGER_LITERAL 280 #define FLOATING_LITERAL 281 #define DECIMAL_LITERAL 282 #define ERROR_TOKEN 283 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 214 of yacc.c */ #line 122 "./turtle_parser.y" unsigned char *string; raptor_identifier *identifier; raptor_sequence *sequence; raptor_uri *uri; int integer; /* 0+ for a xsd:integer datatyped RDF literal */ /* Line 214 of yacc.c */ #line 267 "turtle_parser.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ #line 279 "turtle_parser.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 117 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 29 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 27 /* YYNRULES -- Number of rules. */ #define YYNRULES 60 /* YYNRULES -- Number of states. */ #define YYNSTATES 82 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 283 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 7, 8, 9, 16, 17, 22, 24, 26, 27, 29, 32, 34, 37, 40, 41, 43, 45, 47, 50, 53, 57, 59, 62, 64, 66, 68, 73, 76, 77, 80, 82, 84, 89, 93, 95, 97, 99, 101, 103, 105, 109, 115, 121, 125, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 151, 153, 157 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 30, 0, -1, 39, -1, 15, -1, -1, -1, 35, 31, 13, 33, 36, 14, -1, -1, 13, 34, 36, 14, -1, 53, -1, 37, -1, -1, 41, -1, 38, 37, -1, 38, -1, 41, 6, -1, 39, 40, -1, -1, 46, -1, 32, -1, 38, -1, 49, 45, -1, 1, 6, -1, 42, 7, 51, -1, 51, -1, 43, 51, -1, 51, -1, 50, -1, 3, -1, 45, 8, 44, 42, -1, 44, 42, -1, -1, 45, 8, -1, 47, -1, 48, -1, 22, 24, 19, 6, -1, 23, 19, 6, -1, 53, -1, 54, -1, 53, -1, 53, -1, 54, -1, 52, -1, 18, 4, 24, -1, 18, 4, 24, 5, 19, -1, 18, 4, 24, 5, 21, -1, 18, 5, 19, -1, 18, 5, 21, -1, 18, -1, 25, -1, 26, -1, 27, -1, 16, -1, 17, -1, 19, -1, 21, -1, 20, -1, 9, 45, 10, -1, 55, -1, 11, 43, 12, -1, 11, 12, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 194, 194, 197, 204, 208, 207, 224, 223, 236, 239, 240, 244, 246, 248, 251, 254, 255, 258, 259, 260, 263, 312, 316, 356, 400, 440, 484, 494, 512, 589, 634, 640, 651, 651, 654, 695, 706, 710, 717, 724, 728, 732, 745, 755, 769, 783, 797, 810, 820, 835, 850, 865, 885, 908, 921, 937, 951, 1016, 1023, 1123 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "\"a\"", "\"@\"", "\"^\"", "\".\"", "\",\"", "\";\"", "\"[\"", "\"]\"", "\"(\"", "\")\"", "\"{\"", "\"}\"", "\":-\"", "\"true\"", "\"false\"", "\"string literal\"", "\"URI literal\"", "\"blank node\"", "\"QName\"", "\"@prefix\"", "\"@base\"", "\"identifier\"", "\"integer literal\"", "\"floating point literal\"", "\"decimal literal\"", "ERROR_TOKEN", "$accept", "Document", "colonMinusOpt", "graph", "$@1", "$@2", "graphName", "graphBody", "triplesList", "terminatedTriples", "statementList", "statement", "triples", "objectList", "itemList", "verb", "propertyList", "directive", "prefix", "base", "subject", "predicate", "object", "literal", "resource", "blank", "collection", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 29, 30, 31, 31, 33, 32, 34, 32, 35, 36, 36, 37, 37, 37, 38, 39, 39, 40, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 45, 45, 46, 46, 47, 48, 49, 49, 50, 51, 51, 51, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 54, 54, 54, 55, 55 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 0, 0, 6, 0, 4, 1, 1, 0, 1, 2, 1, 2, 2, 0, 1, 1, 1, 2, 2, 3, 1, 2, 1, 1, 1, 4, 2, 0, 2, 1, 1, 4, 3, 1, 1, 1, 1, 1, 1, 3, 5, 5, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 2 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 17, 0, 0, 1, 0, 31, 0, 7, 54, 56, 55, 0, 0, 19, 4, 20, 16, 0, 18, 33, 34, 31, 37, 38, 58, 22, 28, 0, 0, 27, 39, 60, 52, 53, 48, 49, 50, 51, 0, 26, 42, 40, 41, 0, 0, 0, 3, 0, 15, 21, 30, 24, 32, 57, 0, 0, 59, 25, 0, 10, 0, 12, 37, 0, 36, 5, 0, 0, 43, 46, 47, 8, 13, 35, 0, 23, 29, 0, 0, 44, 45, 6 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 1, 47, 13, 74, 43, 14, 58, 59, 60, 2, 16, 61, 50, 38, 27, 28, 18, 19, 20, 21, 29, 51, 40, 41, 42, 24 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -12 static const yytype_int8 yypact[] = { -12, 7, 4, -12, 12, 28, 58, -12, -12, -12, -12, 5, 13, -12, 21, -12, -12, 31, -12, -12, -12, 28, -7, -12, -12, -12, -12, 90, 1, -12, -12, -12, -12, -12, 17, -12, -12, -12, 77, -12, -12, -12, -12, 19, 25, 40, -12, 38, -12, 44, 49, -12, 28, -12, 33, -9, -12, -12, 46, -12, 34, 31, -12, 55, -12, -12, 90, 90, 59, -12, -12, -12, -12, -12, 19, -12, 49, -5, 51, -12, -12, -12 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -12, -12, -12, -12, -12, -12, -12, -11, 6, 66, -12, -12, 69, 14, -12, 30, 70, -12, -12, -12, -12, -12, -4, -12, -2, -1, -12 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -15 static const yytype_int8 yytable[] = { 22, 23, 39, 30, -2, 4, -9, 3, -9, 52, 69, 53, 70, 5, 79, 6, 80, 7, 25, 30, 4, 54, 55, 8, 9, 10, 11, 12, 5, 44, 6, 26, 45, -11, 57, 4, 46, 48, 8, 9, 10, 62, 23, 5, 63, 6, 64, 8, -14, 10, 30, 65, 52, 8, 9, 10, 66, 68, 62, 23, 71, 73, 75, 78, 77, 81, 72, 5, 15, 6, 31, 17, 62, 23, 32, 33, 34, 8, 9, 10, 0, 76, 67, 35, 36, 37, 5, 0, 6, 56, 0, 49, 0, 32, 33, 34, 8, 9, 10, 5, 0, 6, 35, 36, 37, 0, 32, 33, 34, 8, 9, 10, 0, 0, 0, 35, 36, 37 }; static const yytype_int8 yycheck[] = { 2, 2, 6, 5, 0, 1, 13, 0, 15, 8, 19, 10, 21, 9, 19, 11, 21, 13, 6, 21, 1, 4, 5, 19, 20, 21, 22, 23, 9, 24, 11, 3, 19, 14, 38, 1, 15, 6, 19, 20, 21, 43, 43, 9, 19, 11, 6, 19, 14, 21, 52, 13, 8, 19, 20, 21, 7, 24, 60, 60, 14, 6, 66, 74, 5, 14, 60, 9, 2, 11, 12, 2, 74, 74, 16, 17, 18, 19, 20, 21, -1, 67, 52, 25, 26, 27, 9, -1, 11, 12, -1, 21, -1, 16, 17, 18, 19, 20, 21, 9, -1, 11, 25, 26, 27, -1, 16, 17, 18, 19, 20, 21, -1, -1, -1, 25, 26, 27 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 30, 39, 0, 1, 9, 11, 13, 19, 20, 21, 22, 23, 32, 35, 38, 40, 41, 46, 47, 48, 49, 53, 54, 55, 6, 3, 44, 45, 50, 53, 12, 16, 17, 18, 25, 26, 27, 43, 51, 52, 53, 54, 34, 24, 19, 15, 31, 6, 45, 42, 51, 8, 10, 4, 5, 12, 51, 36, 37, 38, 41, 53, 19, 6, 13, 7, 44, 24, 19, 21, 14, 37, 6, 33, 51, 42, 5, 36, 19, 21, 14 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) #else # define YYLEX yylex (&yylval) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (void *YYPARSE_PARAM, const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (YYPARSE_PARAM, yymsg, yytype, yyvaluep) void *YYPARSE_PARAM; const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { case 18: /* "\"string literal\"" */ /* Line 1000 of yacc.c */ #line 171 "./turtle_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1265 "turtle_parser.c" break; case 19: /* "\"URI literal\"" */ /* Line 1000 of yacc.c */ #line 176 "./turtle_parser.y" { /* HACK: fix-bison adds rdf_parser param to yydestruct() */ if((yyvaluep->uri)) raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, (yyvaluep->uri)); }; /* Line 1000 of yacc.c */ #line 1278 "turtle_parser.c" break; case 20: /* "\"blank node\"" */ /* Line 1000 of yacc.c */ #line 171 "./turtle_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1290 "turtle_parser.c" break; case 21: /* "\"QName\"" */ /* Line 1000 of yacc.c */ #line 176 "./turtle_parser.y" { /* HACK: fix-bison adds rdf_parser param to yydestruct() */ if((yyvaluep->uri)) raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, (yyvaluep->uri)); }; /* Line 1000 of yacc.c */ #line 1303 "turtle_parser.c" break; case 24: /* "\"identifier\"" */ /* Line 1000 of yacc.c */ #line 171 "./turtle_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1315 "turtle_parser.c" break; case 25: /* "\"integer literal\"" */ /* Line 1000 of yacc.c */ #line 171 "./turtle_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1327 "turtle_parser.c" break; case 26: /* "\"floating point literal\"" */ /* Line 1000 of yacc.c */ #line 171 "./turtle_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1339 "turtle_parser.c" break; case 27: /* "\"decimal literal\"" */ /* Line 1000 of yacc.c */ #line 171 "./turtle_parser.y" { if((yyvaluep->string)) RAPTOR_FREE(cstring, (yyvaluep->string)); }; /* Line 1000 of yacc.c */ #line 1351 "turtle_parser.c" break; case 35: /* "graphName" */ /* Line 1000 of yacc.c */ #line 182 "./turtle_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1363 "turtle_parser.c" break; case 42: /* "objectList" */ /* Line 1000 of yacc.c */ #line 187 "./turtle_parser.y" { if((yyvaluep->sequence)) raptor_free_sequence((yyvaluep->sequence)); }; /* Line 1000 of yacc.c */ #line 1375 "turtle_parser.c" break; case 43: /* "itemList" */ /* Line 1000 of yacc.c */ #line 187 "./turtle_parser.y" { if((yyvaluep->sequence)) raptor_free_sequence((yyvaluep->sequence)); }; /* Line 1000 of yacc.c */ #line 1387 "turtle_parser.c" break; case 44: /* "verb" */ /* Line 1000 of yacc.c */ #line 182 "./turtle_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1399 "turtle_parser.c" break; case 45: /* "propertyList" */ /* Line 1000 of yacc.c */ #line 187 "./turtle_parser.y" { if((yyvaluep->sequence)) raptor_free_sequence((yyvaluep->sequence)); }; /* Line 1000 of yacc.c */ #line 1411 "turtle_parser.c" break; case 49: /* "subject" */ /* Line 1000 of yacc.c */ #line 182 "./turtle_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1423 "turtle_parser.c" break; case 50: /* "predicate" */ /* Line 1000 of yacc.c */ #line 182 "./turtle_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1435 "turtle_parser.c" break; case 51: /* "object" */ /* Line 1000 of yacc.c */ #line 182 "./turtle_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1447 "turtle_parser.c" break; case 52: /* "literal" */ /* Line 1000 of yacc.c */ #line 182 "./turtle_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1459 "turtle_parser.c" break; case 53: /* "resource" */ /* Line 1000 of yacc.c */ #line 182 "./turtle_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1471 "turtle_parser.c" break; case 54: /* "blank" */ /* Line 1000 of yacc.c */ #line 182 "./turtle_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1483 "turtle_parser.c" break; case 55: /* "collection" */ /* Line 1000 of yacc.c */ #line 182 "./turtle_parser.y" { if((yyvaluep->identifier)) raptor_free_identifier((yyvaluep->identifier)); }; /* Line 1000 of yacc.c */ #line 1495 "turtle_parser.c" break; default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /*-------------------------. | yyparse or yypush_parse. | `-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 3: /* Line 1455 of yacc.c */ #line 198 "./turtle_parser.y" { raptor_parser* parser=(raptor_parser *)rdf_parser; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, ":- is not allowed in Turtle"); } break; case 5: /* Line 1455 of yacc.c */ #line 208 "./turtle_parser.y" { /* action in mid-rule so this is run BEFORE the triples in graphBody */ raptor_parser* parser=(raptor_parser *)rdf_parser; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, "{ ... } is not allowed in Turtle"); else raptor_parser_set_graph_name(parser, (yyvsp[(1) - (3)].identifier)->uri); } break; case 6: /* Line 1455 of yacc.c */ #line 218 "./turtle_parser.y" { /* free graph name in final action */ raptor_free_identifier((yyvsp[(1) - (6)].identifier)); } break; case 7: /* Line 1455 of yacc.c */ #line 224 "./turtle_parser.y" { /* action in mid-rule so this is run BEFORE the triples in graphBody */ raptor_parser* parser=(raptor_parser *)rdf_parser; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, "{ ... } is not allowed in Turtle"); else raptor_parser_set_graph_name(parser, NULL); } break; case 21: /* Line 1455 of yacc.c */ #line 264 "./turtle_parser.y" { int i; #if RAPTOR_DEBUG > 1 printf("statement 2\n subject="); if((yyvsp[(1) - (2)].identifier)) raptor_identifier_print(stdout, (yyvsp[(1) - (2)].identifier)); else fputs("NULL", stdout); if((yyvsp[(2) - (2)].sequence)) { printf("\n propertyList (reverse order to syntax)="); raptor_sequence_print((yyvsp[(2) - (2)].sequence), stdout); printf("\n"); } else printf("\n and empty propertyList\n"); #endif if((yyvsp[(1) - (2)].identifier) && (yyvsp[(2) - (2)].sequence)) { /* have subject and non-empty property list, handle it */ for(i=0; i<raptor_sequence_size((yyvsp[(2) - (2)].sequence)); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at((yyvsp[(2) - (2)].sequence), i); raptor_identifier *i2=(raptor_identifier*)RAPTOR_CALLOC(raptor_identifier, 1, sizeof(raptor_identifier)); if(!i2) { raptor_free_sequence((yyvsp[(2) - (2)].sequence)); raptor_free_identifier((yyvsp[(1) - (2)].identifier)); YYERROR; } raptor_copy_identifier(i2, (yyvsp[(1) - (2)].identifier)); t2->subject=i2; t2->subject->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution propertyList="); raptor_sequence_print((yyvsp[(2) - (2)].sequence), stdout); printf("\n\n"); #endif for(i=0; i<raptor_sequence_size((yyvsp[(2) - (2)].sequence)); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at((yyvsp[(2) - (2)].sequence), i); raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); } } if((yyvsp[(2) - (2)].sequence)) raptor_free_sequence((yyvsp[(2) - (2)].sequence)); if((yyvsp[(1) - (2)].identifier)) raptor_free_identifier((yyvsp[(1) - (2)].identifier)); } break; case 23: /* Line 1455 of yacc.c */ #line 317 "./turtle_parser.y" { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 1\n"); if((yyvsp[(3) - (3)].identifier)) { printf(" object=\n"); raptor_identifier_print(stdout, (yyvsp[(3) - (3)].identifier)); printf("\n"); } else printf(" and empty object\n"); if((yyvsp[(1) - (3)].sequence)) { printf(" objectList="); raptor_sequence_print((yyvsp[(1) - (3)].sequence), stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!(yyvsp[(3) - (3)].identifier)) (yyval.sequence)=NULL; else { triple=raptor_turtle_new_triple(NULL, NULL, (yyvsp[(3) - (3)].identifier)); if(!triple) { raptor_free_sequence((yyvsp[(1) - (3)].sequence)); YYERROR; } if(raptor_sequence_push((yyvsp[(1) - (3)].sequence), triple)) { raptor_free_sequence((yyvsp[(1) - (3)].sequence)); YYERROR; } (yyval.sequence)=(yyvsp[(1) - (3)].sequence); #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } break; case 24: /* Line 1455 of yacc.c */ #line 357 "./turtle_parser.y" { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 2\n"); if((yyvsp[(1) - (1)].identifier)) { printf(" object=\n"); raptor_identifier_print(stdout, (yyvsp[(1) - (1)].identifier)); printf("\n"); } else printf(" and empty object\n"); #endif if(!(yyvsp[(1) - (1)].identifier)) (yyval.sequence)=NULL; else { triple=raptor_turtle_new_triple(NULL, NULL, (yyvsp[(1) - (1)].identifier)); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG (yyval.sequence)=raptor_new_sequence((raptor_sequence_free_handler*)raptor_turtle_free_triple, (raptor_sequence_print_handler*)raptor_triple_print); #else (yyval.sequence)=raptor_new_sequence((raptor_sequence_free_handler*)raptor_turtle_free_triple, NULL); #endif if(!(yyval.sequence)) { raptor_turtle_free_triple(triple); YYERROR; } if(raptor_sequence_push((yyval.sequence), triple)) { raptor_free_sequence((yyval.sequence)); (yyval.sequence)=NULL; YYERROR; } #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } break; case 25: /* Line 1455 of yacc.c */ #line 401 "./turtle_parser.y" { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 1\n"); if((yyvsp[(2) - (2)].identifier)) { printf(" object=\n"); raptor_identifier_print(stdout, (yyvsp[(2) - (2)].identifier)); printf("\n"); } else printf(" and empty object\n"); if((yyvsp[(1) - (2)].sequence)) { printf(" objectList="); raptor_sequence_print((yyvsp[(1) - (2)].sequence), stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!(yyvsp[(2) - (2)].identifier)) (yyval.sequence)=NULL; else { triple=raptor_turtle_new_triple(NULL, NULL, (yyvsp[(2) - (2)].identifier)); if(!triple) { raptor_free_sequence((yyvsp[(1) - (2)].sequence)); YYERROR; } if(raptor_sequence_push((yyvsp[(1) - (2)].sequence), triple)) { raptor_free_sequence((yyvsp[(1) - (2)].sequence)); YYERROR; } (yyval.sequence)=(yyvsp[(1) - (2)].sequence); #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } break; case 26: /* Line 1455 of yacc.c */ #line 441 "./turtle_parser.y" { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 2\n"); if((yyvsp[(1) - (1)].identifier)) { printf(" object=\n"); raptor_identifier_print(stdout, (yyvsp[(1) - (1)].identifier)); printf("\n"); } else printf(" and empty object\n"); #endif if(!(yyvsp[(1) - (1)].identifier)) (yyval.sequence)=NULL; else { triple=raptor_turtle_new_triple(NULL, NULL, (yyvsp[(1) - (1)].identifier)); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG (yyval.sequence)=raptor_new_sequence((raptor_sequence_free_handler*)raptor_turtle_free_triple, (raptor_sequence_print_handler*)raptor_triple_print); #else (yyval.sequence)=raptor_new_sequence((raptor_sequence_free_handler*)raptor_turtle_free_triple, NULL); #endif if(!(yyval.sequence)) { raptor_turtle_free_triple(triple); YYERROR; } if(raptor_sequence_push((yyval.sequence), triple)) { raptor_free_sequence((yyval.sequence)); (yyval.sequence)=NULL; YYERROR; } #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } break; case 27: /* Line 1455 of yacc.c */ #line 485 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("verb predicate="); raptor_identifier_print(stdout, (yyvsp[(1) - (1)].identifier)); printf("\n"); #endif (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 28: /* Line 1455 of yacc.c */ #line 495 "./turtle_parser.y" { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("verb predicate=rdf:type (a)\n"); #endif uri=raptor_new_uri_for_rdf_concept_v2(((raptor_parser*)rdf_parser)->world, "type"); if(!uri) YYERROR; (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, uri, RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } break; case 29: /* Line 1455 of yacc.c */ #line 513 "./turtle_parser.y" { int i; #if RAPTOR_DEBUG > 1 printf("propertyList 1\n verb="); raptor_identifier_print(stdout, (yyvsp[(3) - (4)].identifier)); printf("\n objectList="); raptor_sequence_print((yyvsp[(4) - (4)].sequence), stdout); printf("\n propertyList="); raptor_sequence_print((yyvsp[(1) - (4)].sequence), stdout); printf("\n\n"); #endif if((yyvsp[(4) - (4)].sequence) == NULL) { #if RAPTOR_DEBUG > 1 printf(" empty objectList not processed\n"); #endif } else if((yyvsp[(3) - (4)].identifier) && (yyvsp[(4) - (4)].sequence)) { /* non-empty property list, handle it */ for(i=0; i<raptor_sequence_size((yyvsp[(4) - (4)].sequence)); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at((yyvsp[(4) - (4)].sequence), i); raptor_identifier *i2=(raptor_identifier*)RAPTOR_CALLOC(raptor_identifier, 1, sizeof(raptor_identifier)); if(!i2) { if((yyvsp[(1) - (4)].sequence)) raptor_free_sequence((yyvsp[(1) - (4)].sequence)); raptor_free_identifier((yyvsp[(3) - (4)].identifier)); raptor_free_sequence((yyvsp[(4) - (4)].sequence)); YYERROR; } if(raptor_copy_identifier(i2, (yyvsp[(3) - (4)].identifier))) { if((yyvsp[(1) - (4)].sequence)) raptor_free_sequence((yyvsp[(1) - (4)].sequence)); raptor_free_identifier((yyvsp[(3) - (4)].identifier)); raptor_free_sequence((yyvsp[(4) - (4)].sequence)); YYERROR; } t2->predicate=i2; t2->predicate->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[(4) - (4)].sequence), stdout); printf("\n"); #endif } if((yyvsp[(1) - (4)].sequence) == NULL) { #if RAPTOR_DEBUG > 1 printf(" empty propertyList not copied\n\n"); #endif } else if ((yyvsp[(3) - (4)].identifier) && (yyvsp[(4) - (4)].sequence) && (yyvsp[(1) - (4)].sequence)) { while(raptor_sequence_size((yyvsp[(4) - (4)].sequence))) { raptor_triple* t2=(raptor_triple*)raptor_sequence_unshift((yyvsp[(4) - (4)].sequence)); if(raptor_sequence_push((yyvsp[(1) - (4)].sequence), t2)) { raptor_free_sequence((yyvsp[(1) - (4)].sequence)); raptor_free_identifier((yyvsp[(3) - (4)].identifier)); raptor_free_sequence((yyvsp[(4) - (4)].sequence)); YYERROR; } } #if RAPTOR_DEBUG > 1 printf(" after appending objectList (reverse order)="); raptor_sequence_print((yyvsp[(1) - (4)].sequence), stdout); printf("\n\n"); #endif raptor_free_sequence((yyvsp[(4) - (4)].sequence)); } if((yyvsp[(3) - (4)].identifier)) raptor_free_identifier((yyvsp[(3) - (4)].identifier)); (yyval.sequence)=(yyvsp[(1) - (4)].sequence); } break; case 30: /* Line 1455 of yacc.c */ #line 590 "./turtle_parser.y" { int i; #if RAPTOR_DEBUG > 1 printf("propertyList 2\n verb="); raptor_identifier_print(stdout, (yyvsp[(1) - (2)].identifier)); if((yyvsp[(2) - (2)].sequence)) { printf("\n objectList="); raptor_sequence_print((yyvsp[(2) - (2)].sequence), stdout); printf("\n"); } else printf("\n and empty objectList\n"); #endif if((yyvsp[(1) - (2)].identifier) && (yyvsp[(2) - (2)].sequence)) { for(i=0; i<raptor_sequence_size((yyvsp[(2) - (2)].sequence)); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at((yyvsp[(2) - (2)].sequence), i); raptor_identifier *i2=(raptor_identifier*)RAPTOR_CALLOC(raptor_identifier, 1, sizeof(raptor_identifier)); if(!i2) { raptor_free_identifier((yyvsp[(1) - (2)].identifier)); raptor_free_sequence((yyvsp[(2) - (2)].sequence)); YYERROR; } if(raptor_copy_identifier(i2, (yyvsp[(1) - (2)].identifier))) { raptor_free_identifier((yyvsp[(1) - (2)].identifier)); raptor_free_sequence((yyvsp[(2) - (2)].sequence)); YYERROR; } t2->predicate=i2; t2->predicate->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[(2) - (2)].sequence), stdout); printf("\n\n"); #endif } if((yyvsp[(1) - (2)].identifier)) raptor_free_identifier((yyvsp[(1) - (2)].identifier)); (yyval.sequence)=(yyvsp[(2) - (2)].sequence); } break; case 31: /* Line 1455 of yacc.c */ #line 634 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("propertyList 4\n empty returning NULL\n\n"); #endif (yyval.sequence)=NULL; } break; case 32: /* Line 1455 of yacc.c */ #line 641 "./turtle_parser.y" { (yyval.sequence)=(yyvsp[(1) - (2)].sequence); #if RAPTOR_DEBUG > 1 printf("propertyList 5\n trailing semicolon returning existing list "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } break; case 35: /* Line 1455 of yacc.c */ #line 655 "./turtle_parser.y" { unsigned char *prefix=(yyvsp[(2) - (4)].string); raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context); raptor_namespace *ns; #if 0 Get around bison complaining about not using (yyvsp[(1) - (4)].string) #endif #if RAPTOR_DEBUG > 1 printf("directive @prefix %s %s\n",((yyvsp[(2) - (4)].string) ? (char*)(yyvsp[(2) - (4)].string) : "(default)"), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(3) - (4)].uri))); #endif if(prefix) { size_t len=strlen((const char*)prefix); if(prefix[len-1] == ':') { if(len == 1) /* declaring default namespace prefix @prefix : ... */ prefix=NULL; else prefix[len-1]='\0'; } } ns=raptor_new_namespace_from_uri(&turtle_parser->namespaces, prefix, (yyvsp[(3) - (4)].uri), 0); if(ns) { raptor_namespaces_start_namespace(&turtle_parser->namespaces, ns); raptor_parser_start_namespace((raptor_parser*)rdf_parser, ns); } if((yyvsp[(2) - (4)].string)) RAPTOR_FREE(cstring, (yyvsp[(2) - (4)].string)); raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(3) - (4)].uri)); if(!ns) YYERROR; } break; case 36: /* Line 1455 of yacc.c */ #line 696 "./turtle_parser.y" { raptor_uri *uri=(yyvsp[(2) - (3)].uri); /*raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context);*/ raptor_parser* parser=(raptor_parser*)rdf_parser; if(parser->base_uri) raptor_free_uri_v2(parser->world, parser->base_uri); parser->base_uri=uri; } break; case 37: /* Line 1455 of yacc.c */ #line 707 "./turtle_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 38: /* Line 1455 of yacc.c */ #line 711 "./turtle_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 39: /* Line 1455 of yacc.c */ #line 718 "./turtle_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 40: /* Line 1455 of yacc.c */ #line 725 "./turtle_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 41: /* Line 1455 of yacc.c */ #line 729 "./turtle_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 42: /* Line 1455 of yacc.c */ #line 733 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("object literal="); raptor_identifier_print(stdout, (yyvsp[(1) - (1)].identifier)); printf("\n"); #endif (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 43: /* Line 1455 of yacc.c */ #line 746 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + language string=\"%s\"\n", (yyvsp[(1) - (3)].string)); #endif (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (3)].string), NULL, (yyvsp[(3) - (3)].string)); if(!(yyval.identifier)) YYERROR; } break; case 44: /* Line 1455 of yacc.c */ #line 756 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" uri=\"%s\"\n", (yyvsp[(1) - (5)].string), (yyvsp[(3) - (5)].string), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(5) - (5)].uri))); #endif if((yyvsp[(5) - (5)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world,RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (5)].string), (yyvsp[(5) - (5)].uri), (yyvsp[(3) - (5)].string)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 45: /* Line 1455 of yacc.c */ #line 770 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" qname URI=<%s>\n", (yyvsp[(1) - (5)].string), (yyvsp[(3) - (5)].string), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(5) - (5)].uri))); #endif if((yyvsp[(5) - (5)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (const unsigned char*)(yyvsp[(1) - (5)].string), (yyvsp[(5) - (5)].uri), (yyvsp[(3) - (5)].string)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 46: /* Line 1455 of yacc.c */ #line 784 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" uri=\"%s\"\n", (yyvsp[(1) - (3)].string), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(3) - (3)].uri))); #endif if((yyvsp[(3) - (3)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].uri), NULL); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 47: /* Line 1455 of yacc.c */ #line 798 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" qname URI=<%s>\n", (yyvsp[(1) - (3)].string), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(3) - (3)].uri))); #endif if((yyvsp[(3) - (3)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].uri), NULL); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 48: /* Line 1455 of yacc.c */ #line 811 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("literal string=\"%s\"\n", (yyvsp[(1) - (1)].string)); #endif (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (1)].string), NULL, NULL); if(!(yyval.identifier)) YYERROR; } break; case 49: /* Line 1455 of yacc.c */ #line 821 "./turtle_parser.y" { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource integer=%s\n", (yyvsp[(1) - (1)].string)); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#integer"); if(!uri) { RAPTOR_FREE(cstring, (yyvsp[(1) - (1)].string)); YYERROR; } (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (1)].string), uri, NULL); if(!(yyval.identifier)) YYERROR; } break; case 50: /* Line 1455 of yacc.c */ #line 836 "./turtle_parser.y" { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource double=%s\n", (yyvsp[(1) - (1)].string)); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#double"); if(!uri) { RAPTOR_FREE(cstring, (yyvsp[(1) - (1)].string)); YYERROR; } (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (1)].string), uri, NULL); if(!(yyval.identifier)) YYERROR; } break; case 51: /* Line 1455 of yacc.c */ #line 851 "./turtle_parser.y" { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource decimal=%s\n", (yyvsp[(1) - (1)].string)); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#decimal"); if(!uri) { RAPTOR_FREE(cstring, (yyvsp[(1) - (1)].string)); YYERROR; } (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (yyvsp[(1) - (1)].string), uri, NULL); if(!(yyval.identifier)) YYERROR; } break; case 52: /* Line 1455 of yacc.c */ #line 866 "./turtle_parser.y" { unsigned char *string; raptor_uri *uri; #if RAPTOR_DEBUG > 1 fputs("resource boolean true\n", stderr); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#boolean"); if(!uri) YYERROR; string=(unsigned char*)RAPTOR_MALLOC(cstring, 5); if(!string) { raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, uri); YYERROR; } strncpy((char*)string, "true", 5); (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, string, uri, NULL); if(!(yyval.identifier)) YYERROR; } break; case 53: /* Line 1455 of yacc.c */ #line 886 "./turtle_parser.y" { unsigned char *string; raptor_uri *uri; #if RAPTOR_DEBUG > 1 fputs("resource boolean false\n", stderr); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#boolean"); if(!uri) YYERROR; string=(unsigned char*)RAPTOR_MALLOC(cstring, 6); if(!string) { raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, uri); YYERROR; } strncpy((char*)string, "false", 6); (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, string, uri, NULL); if(!(yyval.identifier)) YYERROR; } break; case 54: /* Line 1455 of yacc.c */ #line 909 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("resource URI=<%s>\n", raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(1) - (1)].uri))); #endif if((yyvsp[(1) - (1)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, (yyvsp[(1) - (1)].uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 55: /* Line 1455 of yacc.c */ #line 922 "./turtle_parser.y" { #if RAPTOR_DEBUG > 1 printf("resource qname URI=<%s>\n", raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, (yyvsp[(1) - (1)].uri))); #endif if((yyvsp[(1) - (1)].uri)) { (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, (yyvsp[(1) - (1)].uri), RAPTOR_URI_SOURCE_ELEMENT, NULL, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier)=NULL; } break; case 56: /* Line 1455 of yacc.c */ #line 938 "./turtle_parser.y" { const unsigned char *id; #if RAPTOR_DEBUG > 1 printf("subject blank=\"%s\"\n", (yyvsp[(1) - (1)].string)); #endif id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, (yyvsp[(1) - (1)].string)); if(!id) YYERROR; (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_BLANK_ID, id, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } break; case 57: /* Line 1455 of yacc.c */ #line 952 "./turtle_parser.y" { int i; const unsigned char *id; id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!id) { if((yyvsp[(2) - (3)].sequence)) raptor_free_sequence((yyvsp[(2) - (3)].sequence)); YYERROR; } (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_GENERATED, id, NULL, NULL, NULL); if(!(yyval.identifier)) { if((yyvsp[(2) - (3)].sequence)) raptor_free_sequence((yyvsp[(2) - (3)].sequence)); YYERROR; } if((yyvsp[(2) - (3)].sequence) == NULL) { #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_identifier_print(stdout, (yyval.identifier)); printf("\n"); #endif } else { /* non-empty property list, handle it */ #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n"); #endif for(i=0; i<raptor_sequence_size((yyvsp[(2) - (3)].sequence)); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at((yyvsp[(2) - (3)].sequence), i); raptor_identifier *i2=(raptor_identifier*)RAPTOR_CALLOC(raptor_identifier, 1, sizeof(raptor_identifier)); if(!i2) { raptor_free_sequence((yyvsp[(2) - (3)].sequence)); raptor_free_identifier((yyval.identifier)); (yyval.identifier)=NULL; YYERROR; } if(raptor_copy_identifier(i2, (yyval.identifier))) { RAPTOR_FREE(raptor_identifier, i2); raptor_free_sequence((yyvsp[(2) - (3)].sequence)); raptor_free_identifier((yyval.identifier)); (yyval.identifier)=NULL; YYERROR; } t2->subject=i2; t2->subject->is_malloced=1; raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n\n"); #endif raptor_free_sequence((yyvsp[(2) - (3)].sequence)); } } break; case 58: /* Line 1455 of yacc.c */ #line 1017 "./turtle_parser.y" { (yyval.identifier)=(yyvsp[(1) - (1)].identifier); } break; case 59: /* Line 1455 of yacc.c */ #line 1024 "./turtle_parser.y" { int i; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context); raptor_identifier* first_identifier=NULL; raptor_identifier* rest_identifier=NULL; raptor_identifier* object=NULL; raptor_identifier* blank=NULL; #if RAPTOR_DEBUG > 1 printf("collection\n objectList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n"); #endif first_identifier=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, turtle_parser->first_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!first_identifier) goto err_collection; rest_identifier=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, turtle_parser->rest_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!rest_identifier) goto err_collection; /* non-empty property list, handle it */ #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n"); #endif object=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, turtle_parser->nil_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!object) goto err_collection; for(i=raptor_sequence_size((yyvsp[(2) - (3)].sequence))-1; i>=0; i--) { raptor_identifier* temp; raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at((yyvsp[(2) - (3)].sequence), i); const unsigned char *blank_id; blank_id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!blank_id) goto err_collection; blank=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_GENERATED, blank_id, NULL, NULL, NULL); if(!blank) goto err_collection; t2->subject=blank; t2->predicate=first_identifier; /* t2->object already set to the value we want */ raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); temp=t2->object; t2->subject=blank; t2->predicate=rest_identifier; t2->object=object; raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); t2->subject=NULL; t2->predicate=NULL; t2->object=temp; raptor_free_identifier(object); object=blank; blank=NULL; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[(2) - (3)].sequence), stdout); printf("\n\n"); #endif raptor_free_sequence((yyvsp[(2) - (3)].sequence)); raptor_free_identifier(first_identifier); raptor_free_identifier(rest_identifier); (yyval.identifier)=object; break; /* success */ err_collection: if(blank) raptor_free_identifier(blank); if(object) raptor_free_identifier(object); if(rest_identifier) raptor_free_identifier(rest_identifier); if(first_identifier) raptor_free_identifier(first_identifier); raptor_free_sequence((yyvsp[(2) - (3)].sequence)); YYERROR; } break; case 60: /* Line 1455 of yacc.c */ #line 1124 "./turtle_parser.y" { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context); #if RAPTOR_DEBUG > 1 printf("collection\n empty\n"); #endif (yyval.identifier)=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, turtle_parser->nil_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!(yyval.identifier)) YYERROR; } break; /* Line 1455 of yacc.c */ #line 2869 "turtle_parser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct (YYPARSE_PARAM, "Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct (YYPARSE_PARAM, "Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) yydestruct (YYPARSE_PARAM, "Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct (YYPARSE_PARAM, "Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 1675 of yacc.c */ #line 1138 "./turtle_parser.y" /* Support functions */ /* This is declared in turtle_lexer.h but never used, so we always get * a warning unless this dummy code is here. Used once below as a return. */ static int yy_init_globals (yyscan_t yyscanner ) { return 0; } /* helper - everything passed in is now owned by triple */ static raptor_triple* raptor_turtle_new_triple(raptor_identifier *subject, raptor_identifier *predicate, raptor_identifier *object) { raptor_triple* t; t=(raptor_triple*)RAPTOR_MALLOC(raptor_triple, sizeof(raptor_triple)); if(!t) { if(subject) raptor_free_identifier(subject); if(predicate) raptor_free_identifier(predicate); if(object) raptor_free_identifier(object); return NULL; } t->subject=subject; t->predicate=predicate; t->object=object; return t; } static void raptor_turtle_free_triple(raptor_triple *t) { if(t->subject) raptor_free_identifier(t->subject); if(t->predicate) raptor_free_identifier(t->predicate); if(t->object) raptor_free_identifier(t->object); RAPTOR_FREE(raptor_triple, t); } #ifdef RAPTOR_DEBUG static void raptor_triple_print(raptor_triple *t, FILE *fh) { fputs("triple(", fh); raptor_identifier_print(fh, t->subject); fputs(", ", fh); raptor_identifier_print(fh, t->predicate); fputs(", ", fh); raptor_identifier_print(fh, t->object); fputc(')', fh); } #endif int turtle_parser_error(void* ctx, const char *msg) { raptor_parser* rdf_parser=(raptor_parser *)ctx; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->error_count++) return 0; rdf_parser->locator.line=turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column=turtle_lexer_get_column(yyscanner); #endif raptor_parser_simple_error(rdf_parser, "%s", msg); return yy_init_globals(NULL); /* 0 but a way to use yy_init_globals */ } int turtle_syntax_error(raptor_parser *rdf_parser, const char *message, ...) { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; va_list arguments; if(turtle_parser->error_count++) return 0; rdf_parser->locator.line=turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column=turtle_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_error_varargs(((raptor_parser*)rdf_parser), message, arguments); va_end(arguments); return 0; } raptor_uri* turtle_qname_to_uri(raptor_parser *rdf_parser, unsigned char *name, size_t name_len) { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; rdf_parser->locator.line=turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column=turtle_lexer_get_column(yyscanner); #endif return raptor_qname_string_to_uri(&turtle_parser->namespaces, name, name_len, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser); } static int turtle_parse(raptor_parser *rdf_parser, const char *string, size_t length) { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; void *buffer; if(!string || !*string) return 0; if(turtle_lexer_lex_init(&turtle_parser->scanner)) return 1; turtle_parser->scanner_set=1; turtle_lexer_set_extra(rdf_parser, turtle_parser->scanner); buffer = turtle_lexer__scan_bytes(string, length, turtle_parser->scanner); turtle_parser_parse(rdf_parser); turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set=0; return 0; } /** * raptor_turtle_parse_init - Initialise the Raptor Turtle parser * * Return value: non 0 on failure **/ static int raptor_turtle_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; if(raptor_namespaces_init_v2(rdf_parser->world, &turtle_parser->namespaces, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser, 0)) return 1; turtle_parser->nil_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "nil"); turtle_parser->first_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "first"); turtle_parser->rest_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "rest"); if(!turtle_parser->nil_uri || !turtle_parser->first_uri || !turtle_parser->rest_uri) return 1; turtle_parser->trig=!strcmp(name, "trig"); return 0; } /* PUBLIC FUNCTIONS */ /* * raptor_turtle_parse_terminate - Free the Raptor Turtle parser * @rdf_parser: parser object * **/ static void raptor_turtle_parse_terminate(raptor_parser *rdf_parser) { raptor_turtle_parser *turtle_parser=(raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->nil_uri) raptor_free_uri_v2(rdf_parser->world, turtle_parser->nil_uri); if(turtle_parser->first_uri) raptor_free_uri_v2(rdf_parser->world, turtle_parser->first_uri); if(turtle_parser->rest_uri) raptor_free_uri_v2(rdf_parser->world, turtle_parser->rest_uri); raptor_namespaces_clear(&turtle_parser->namespaces); if(turtle_parser->scanner_set) { turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set=0; } if(turtle_parser->buffer) RAPTOR_FREE(cdata, turtle_parser->buffer); } static void raptor_turtle_generate_statement(raptor_parser *parser, raptor_triple *t) { /* raptor_turtle_parser *turtle_parser=(raptor_turtle_parser*)parser->context; */ raptor_statement *statement=&parser->statement; if(!t->subject || !t->predicate || !t->object) return; /* Two choices for subject for Turtle */ statement->subject_type=t->subject->type; if(t->subject->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { statement->subject=t->subject->id; } else { /* RAPTOR_IDENTIFIER_TYPE_RESOURCE */ RAPTOR_ASSERT(t->subject->type != RAPTOR_IDENTIFIER_TYPE_RESOURCE, "subject type is not resource"); statement->subject=t->subject->uri; } /* Predicates are URIs but check for bad ordinals */ if(!strncmp((const char*)raptor_uri_as_string_v2(parser->world, t->predicate->uri), "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) { unsigned char* predicate_uri_string=raptor_uri_as_string_v2(parser->world, t->predicate->uri); int predicate_ordinal=raptor_check_ordinal(predicate_uri_string+44); if(predicate_ordinal <= 0) raptor_parser_error(parser, "Illegal ordinal value %d in property '%s'.", predicate_ordinal, predicate_uri_string); } statement->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; statement->predicate=t->predicate->uri; /* Three choices for object for Turtle */ statement->object_type=t->object->type; statement->object_literal_language=NULL; statement->object_literal_datatype=NULL; if(t->object->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { statement->object=t->object->uri; } else if(t->object->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { statement->object=t->object->id; } else { /* RAPTOR_IDENTIFIER_TYPE_LITERAL */ RAPTOR_ASSERT(t->object->type != RAPTOR_IDENTIFIER_TYPE_LITERAL, "object type is not literal"); statement->object=t->object->literal; statement->object_literal_language=t->object->literal_language; statement->object_literal_datatype=t->object->literal_datatype; if(statement->object_literal_datatype) statement->object_literal_language=NULL; } if(!parser->statement_handler) return; /* Generate the statement */ (*parser->statement_handler)(parser->user_data, statement); } static int raptor_turtle_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { char *ptr; raptor_turtle_parser *turtle_parser=(raptor_turtle_parser*)rdf_parser->context; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("adding %d bytes to line buffer\n", (int)len); #endif if(len) { turtle_parser->buffer=(char*)RAPTOR_REALLOC(cstring, turtle_parser->buffer, turtle_parser->buffer_length + len + 1); if(!turtle_parser->buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } /* move pointer to end of cdata buffer */ ptr=turtle_parser->buffer+turtle_parser->buffer_length; /* adjust stored length */ turtle_parser->buffer_length += len; /* now write new stuff at end of cdata buffer */ strncpy(ptr, (char*)s, len); ptr += len; *ptr = '\0'; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("buffer buffer now '%s' (%d bytes)\n", turtle_parser->buffer, turtle_parser->buffer_length); #endif } /* if not end, wait for rest of input */ if(!is_end) return 0; /* Nothing to do */ if(!turtle_parser->buffer_length) return 0; turtle_parse(rdf_parser, turtle_parser->buffer, turtle_parser->buffer_length); return 0; } static int raptor_turtle_parse_start(raptor_parser *rdf_parser) { raptor_locator *locator=&rdf_parser->locator; raptor_turtle_parser *turtle_parser=(raptor_turtle_parser*)rdf_parser->context; /* base URI required for Turtle */ if(!rdf_parser->base_uri) return 1; locator->line=1; locator->column= -1; /* No column info */ locator->byte= -1; /* No bytes info */ if(turtle_parser->buffer_length) { RAPTOR_FREE(cdata, turtle_parser->buffer); turtle_parser->buffer=NULL; turtle_parser->buffer_length=0; } turtle_parser->lineno=1; return 0; } static int raptor_turtle_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "ttl")) score=8; if(!strcmp((const char*)suffix, "n3")) score=3; } if(mime_type) { if(strstr((const char*)mime_type, "turtle")) score+=6; #ifndef RAPTOR_PARSER_N3 if(strstr((const char*)mime_type, "n3")) score+=3; #endif } /* FIXME: Should do this as long as N3 is not also present since * shares the same syntax */ if(buffer && len) { #define HAS_TURTLE_PREFIX (raptor_memstr((const char*)buffer, len, "@prefix ") != NULL) /* The following could also be found with N-Triples but not with @prefix */ #define HAS_TURTLE_RDF_URI (raptor_memstr((const char*)buffer, len, ": <http://www.w3.org/1999/02/22-rdf-syntax-ns#>") != NULL) if(HAS_TURTLE_PREFIX) { score=6; if(HAS_TURTLE_RDF_URI) score+=2; } } return score; } #ifdef RAPTOR_PARSER_TRIG static int raptor_trig_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "trig")) score=9; #ifndef RAPTOR_PARSER_TURTLE if(!strcmp((const char*)suffix, "ttl")) score=8; #endif if(!strcmp((const char*)suffix, "n3")) score=3; } if(mime_type) { #ifndef RAPTOR_PARSER_TURTLE if(strstr((const char*)mime_type, "turtle")) score+=6; #endif #ifndef RAPTOR_PARSER_N3 if(strstr((const char*)mime_type, "n3")) score+=3; #endif } #ifndef RAPTOR_PARSER_TURTLE /* FIXME: Should do this as long as N3 is not also present since * shares the same syntax */ if(buffer && len) { #define HAS_TRIG_PREFIX (raptor_memstr((const char*)buffer, len, "@prefix ") != NULL) /* The following could also be found with N-Triples but not with @prefix */ #define HAS_TRIG_RDF_URI (raptor_memstr((const char*)buffer, len, ": <http://www.w3.org/1999/02/22-rdf-syntax-ns#>") != NULL) if(HAS_TRIG_PREFIX) { score=6; if(HAS_TRIG_RDF_URI) score+=2; } } #endif return score; } #endif #ifdef RAPTOR_PARSER_TURTLE static int raptor_turtle_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_turtle_parser); factory->need_base_uri = 1; factory->init = raptor_turtle_parse_init; factory->terminate = raptor_turtle_parse_terminate; factory->start = raptor_turtle_parse_start; factory->chunk = raptor_turtle_parse_chunk; factory->recognise_syntax = raptor_turtle_parse_recognise_syntax; rc+= raptor_parser_factory_add_alias(factory, "ntriples-plus") != 0; rc+= raptor_parser_factory_add_uri(factory, (const unsigned char*)"http://www.dajobe.org/2004/01/turtle/") != 0; /* first one is the default */ rc+= raptor_parser_factory_add_mime_type(factory, "application/x-turtle", 10) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/turtle", 10) != 0; #ifndef RAPTOR_PARSER_N3 rc+= raptor_parser_factory_add_mime_type(factory, "text/n3", 3) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "text/rdf+n3", 3) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/rdf+n3", 3) != 0; #endif return rc; } #endif #ifdef RAPTOR_PARSER_TRIG static int raptor_trig_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_turtle_parser); factory->need_base_uri = 1; factory->init = raptor_turtle_parse_init; factory->terminate = raptor_turtle_parse_terminate; factory->start = raptor_turtle_parse_start; factory->chunk = raptor_turtle_parse_chunk; factory->recognise_syntax = raptor_trig_parse_recognise_syntax; rc+= raptor_parser_factory_add_uri(factory, (const unsigned char*)"http://www.wiwiss.fu-berlin.de/suhl/bizer/TriG/Spec/") != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/x-trig", 10) != 0; return rc; } #endif #ifdef RAPTOR_PARSER_TURTLE int raptor_init_parser_turtle(raptor_world* world) { return !raptor_parser_register_factory(world, "turtle", "Turtle Terse RDF Triple Language", &raptor_turtle_parser_register_factory); } #endif #ifdef RAPTOR_PARSER_TRIG int raptor_init_parser_trig(raptor_world* world) { return !raptor_parser_register_factory(world, "trig", "TriG - Turtle with Named Graphs", &raptor_trig_parser_register_factory); } #endif #ifdef STANDALONE #include <stdio.h> #include <locale.h> #define TURTLE_FILE_BUF_SIZE 2048 static void turtle_parser_print_statement(void *user, const raptor_statement *statement) { FILE* stream=(FILE*)user; raptor_print_statement(statement, stream); putc('\n', stream); } int main(int argc, char *argv[]) { char string[TURTLE_FILE_BUF_SIZE]; raptor_parser rdf_parser; /* static */ raptor_turtle_parser turtle_parser; /* static */ raptor_locator *locator=&rdf_parser.locator; FILE *fh; const char *filename; int rc; #if RAPTOR_DEBUG > 2 turtle_parser_debug=1; #endif if(argc > 1) { filename=argv[1]; fh = fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename="<stdin>"; fh = stdin; } memset(string, 0, TURTLE_FILE_BUF_SIZE); rc=fread(string, TURTLE_FILE_BUF_SIZE, 1, fh); if(rc < TURTLE_FILE_BUF_SIZE) { if(ferror(fh)) { fprintf(stderr, "%s: file '%s' read failed - %s\n", argv[0], filename, strerror(errno)); fclose(fh); return(1); } } if(argc>1) fclose(fh); raptor_init(); memset(&rdf_parser, 0, sizeof(raptor_parser)); memset(&turtle_parser, 0, sizeof(raptor_turtle_parser)); locator->line= locator->column = -1; locator->file= filename; turtle_parser.lineno= 1; rdf_parser.world = raptor_world_instance(); rdf_parser.context=&turtle_parser; rdf_parser.base_uri=raptor_new_uri((const unsigned char*)"http://example.org/fake-base-uri/"); raptor_set_statement_handler(&rdf_parser, stdout, turtle_parser_print_statement); raptor_turtle_parse_init(&rdf_parser, "turtle"); turtle_parser.error_count=0; turtle_parse(&rdf_parser, string, strlen(string)); raptor_turtle_parse_terminate(&rdf_parser); raptor_free_uri(rdf_parser.base_uri); raptor_finish(); return (0); } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/turtle_parser.h�������������������������������������������������������������������0000644�0001750�0001750�00000006625�11330672547�013703� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { A = 258, AT = 259, HAT = 260, DOT = 261, COMMA = 262, SEMICOLON = 263, LEFT_SQUARE = 264, RIGHT_SQUARE = 265, LEFT_ROUND = 266, RIGHT_ROUND = 267, LEFT_CURLY = 268, RIGHT_CURLY = 269, COLONMINUS = 270, TRUE_TOKEN = 271, FALSE_TOKEN = 272, STRING_LITERAL = 273, URI_LITERAL = 274, BLANK_LITERAL = 275, QNAME_LITERAL = 276, PREFIX = 277, BASE = 278, IDENTIFIER = 279, INTEGER_LITERAL = 280, FLOATING_LITERAL = 281, DECIMAL_LITERAL = 282, ERROR_TOKEN = 283 }; #endif /* Tokens. */ #define A 258 #define AT 259 #define HAT 260 #define DOT 261 #define COMMA 262 #define SEMICOLON 263 #define LEFT_SQUARE 264 #define RIGHT_SQUARE 265 #define LEFT_ROUND 266 #define RIGHT_ROUND 267 #define LEFT_CURLY 268 #define RIGHT_CURLY 269 #define COLONMINUS 270 #define TRUE_TOKEN 271 #define FALSE_TOKEN 272 #define STRING_LITERAL 273 #define URI_LITERAL 274 #define BLANK_LITERAL 275 #define QNAME_LITERAL 276 #define PREFIX 277 #define BASE 278 #define IDENTIFIER 279 #define INTEGER_LITERAL 280 #define FLOATING_LITERAL 281 #define DECIMAL_LITERAL 282 #define ERROR_TOKEN 283 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 1676 of yacc.c */ #line 122 "./turtle_parser.y" unsigned char *string; raptor_identifier *identifier; raptor_sequence *sequence; raptor_uri *uri; int integer; /* 0+ for a xsd:integer datatyped RDF literal */ /* Line 1676 of yacc.c */ #line 118 "turtle_parser.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif �����������������������������������������������������������������������������������������������������������raptor-1.4.21/src/turtle_parser.y�������������������������������������������������������������������0000644�0001750�0001750�00000130143�11330672502�013704� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_parser.y - Raptor Turtle parser - over tokens from turtle grammar lexer * * Copyright (C) 2003-2007, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * Turtle is defined in http://www.dajobe.org/2004/01/turtle/ * * Made from a subset of the terms in * http://www.w3.org/DesignIssues/Notation3.html * */ %{ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include <raptor.h> #include <raptor_internal.h> #include <turtle_parser.h> #define YY_DECL int turtle_lexer_lex (YYSTYPE *turtle_parser_lval, yyscan_t yyscanner) #define YY_NO_UNISTD_H 1 #include <turtle_lexer.h> #include <turtle_common.h> /* Make verbose error messages for syntax errors */ #ifdef RAPTOR_DEBUG #define YYERROR_VERBOSE 1 #endif /* Slow down the grammar operation and watch it work */ #if RAPTOR_DEBUG > 2 #define YYDEBUG 1 #endif /* the lexer does not seem to track this */ #undef RAPTOR_TURTLE_USE_ERROR_COLUMNS /* Prototypes */ int turtle_parser_error(void* rdf_parser, const char *msg); /* Missing turtle_lexer.c/h prototypes */ int turtle_lexer_get_column(yyscan_t yyscanner); /* Not used here */ /* void turtle_lexer_set_column(int column_no , yyscan_t yyscanner);*/ /* What the lexer wants */ extern int turtle_lexer_lex (YYSTYPE *turtle_parser_lval, yyscan_t scanner); #define YYLEX_PARAM ((raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context))->scanner /* Pure parser argument (a void*) */ #define YYPARSE_PARAM rdf_parser /* Make the yyerror below use the rdf_parser */ #undef yyerror #define yyerror(message) turtle_parser_error(rdf_parser, message) /* Make lex/yacc interface as small as possible */ #undef yylex #define yylex turtle_lexer_lex static raptor_triple* raptor_turtle_new_triple(raptor_identifier *subject, raptor_identifier *predicate, raptor_identifier *object); static void raptor_turtle_free_triple(raptor_triple *triple); #ifdef RAPTOR_DEBUG static void raptor_triple_print(raptor_triple *data, FILE *fh); #endif /* Prototypes for local functions */ static void raptor_turtle_generate_statement(raptor_parser *parser, raptor_triple *triple); %} /* directives */ %pure-parser /* Interface between lexer and parser */ %union { unsigned char *string; raptor_identifier *identifier; raptor_sequence *sequence; raptor_uri *uri; int integer; /* 0+ for a xsd:integer datatyped RDF literal */ } %expect 0 /* others */ %token A "a" %token AT "@" %token HAT "^" %token DOT "." %token COMMA "," %token SEMICOLON ";" %token LEFT_SQUARE "[" %token RIGHT_SQUARE "]" %token LEFT_ROUND "(" %token RIGHT_ROUND ")" %token LEFT_CURLY "{" %token RIGHT_CURLY "}" %token COLONMINUS ":-" %token TRUE_TOKEN "true" %token FALSE_TOKEN "false" /* literals */ %token <string> STRING_LITERAL "string literal" %token <uri> URI_LITERAL "URI literal" %token <string> BLANK_LITERAL "blank node" %token <uri> QNAME_LITERAL "QName" %token <string> PREFIX "@prefix" %token <string> BASE "@base" %token <string> IDENTIFIER "identifier" %token <string> INTEGER_LITERAL "integer literal" %token <string> FLOATING_LITERAL "floating point literal" %token <string> DECIMAL_LITERAL "decimal literal" /* syntax error */ %token ERROR_TOKEN %type <identifier> subject predicate object verb literal resource blank collection graphName %type <sequence> objectList itemList propertyList /* tidy up tokens after errors */ %destructor { if($$) RAPTOR_FREE(cstring, $$); } STRING_LITERAL BLANK_LITERAL INTEGER_LITERAL FLOATING_LITERAL DECIMAL_LITERAL IDENTIFIER %destructor { /* HACK: fix-bison adds rdf_parser param to yydestruct() */ if($$) raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, $$); } URI_LITERAL QNAME_LITERAL %destructor { if($$) raptor_free_identifier($$); } subject predicate object verb literal resource blank collection graphName %destructor { if($$) raptor_free_sequence($$); } objectList itemList propertyList %% Document : statementList ; colonMinusOpt: COLONMINUS { raptor_parser* parser=(raptor_parser *)rdf_parser; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, ":- is not allowed in Turtle"); } | /* empty */ ; graph: graphName colonMinusOpt LEFT_CURLY { /* action in mid-rule so this is run BEFORE the triples in graphBody */ raptor_parser* parser=(raptor_parser *)rdf_parser; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, "{ ... } is not allowed in Turtle"); else raptor_parser_set_graph_name(parser, $1->uri); } graphBody RIGHT_CURLY { /* free graph name in final action */ raptor_free_identifier($1); } | LEFT_CURLY { /* action in mid-rule so this is run BEFORE the triples in graphBody */ raptor_parser* parser=(raptor_parser *)rdf_parser; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, "{ ... } is not allowed in Turtle"); else raptor_parser_set_graph_name(parser, NULL); } graphBody RIGHT_CURLY ; graphName: resource ; graphBody: triplesList | /* empty */ ; triplesList: triples | terminatedTriples triplesList | terminatedTriples ; terminatedTriples: triples DOT ; statementList: statementList statement | /* empty line */ ; statement: directive | graph | terminatedTriples ; triples: subject propertyList { int i; #if RAPTOR_DEBUG > 1 printf("statement 2\n subject="); if($1) raptor_identifier_print(stdout, $1); else fputs("NULL", stdout); if($2) { printf("\n propertyList (reverse order to syntax)="); raptor_sequence_print($2, stdout); printf("\n"); } else printf("\n and empty propertyList\n"); #endif if($1 && $2) { /* have subject and non-empty property list, handle it */ for(i=0; i<raptor_sequence_size($2); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at($2, i); raptor_identifier *i2=(raptor_identifier*)RAPTOR_CALLOC(raptor_identifier, 1, sizeof(raptor_identifier)); if(!i2) { raptor_free_sequence($2); raptor_free_identifier($1); YYERROR; } raptor_copy_identifier(i2, $1); t2->subject=i2; t2->subject->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution propertyList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif for(i=0; i<raptor_sequence_size($2); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at($2, i); raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); } } if($2) raptor_free_sequence($2); if($1) raptor_free_identifier($1); } | error DOT ; objectList: objectList COMMA object { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 1\n"); if($3) { printf(" object=\n"); raptor_identifier_print(stdout, $3); printf("\n"); } else printf(" and empty object\n"); if($1) { printf(" objectList="); raptor_sequence_print($1, stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!$3) $$=NULL; else { triple=raptor_turtle_new_triple(NULL, NULL, $3); if(!triple) { raptor_free_sequence($1); YYERROR; } if(raptor_sequence_push($1, triple)) { raptor_free_sequence($1); YYERROR; } $$=$1; #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } | object { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 2\n"); if($1) { printf(" object=\n"); raptor_identifier_print(stdout, $1); printf("\n"); } else printf(" and empty object\n"); #endif if(!$1) $$=NULL; else { triple=raptor_turtle_new_triple(NULL, NULL, $1); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG $$=raptor_new_sequence((raptor_sequence_free_handler*)raptor_turtle_free_triple, (raptor_sequence_print_handler*)raptor_triple_print); #else $$=raptor_new_sequence((raptor_sequence_free_handler*)raptor_turtle_free_triple, NULL); #endif if(!$$) { raptor_turtle_free_triple(triple); YYERROR; } if(raptor_sequence_push($$, triple)) { raptor_free_sequence($$); $$=NULL; YYERROR; } #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } ; itemList: itemList object { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 1\n"); if($2) { printf(" object=\n"); raptor_identifier_print(stdout, $2); printf("\n"); } else printf(" and empty object\n"); if($1) { printf(" objectList="); raptor_sequence_print($1, stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!$2) $$=NULL; else { triple=raptor_turtle_new_triple(NULL, NULL, $2); if(!triple) { raptor_free_sequence($1); YYERROR; } if(raptor_sequence_push($1, triple)) { raptor_free_sequence($1); YYERROR; } $$=$1; #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } | object { raptor_triple *triple; #if RAPTOR_DEBUG > 1 printf("objectList 2\n"); if($1) { printf(" object=\n"); raptor_identifier_print(stdout, $1); printf("\n"); } else printf(" and empty object\n"); #endif if(!$1) $$=NULL; else { triple=raptor_turtle_new_triple(NULL, NULL, $1); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG $$=raptor_new_sequence((raptor_sequence_free_handler*)raptor_turtle_free_triple, (raptor_sequence_print_handler*)raptor_triple_print); #else $$=raptor_new_sequence((raptor_sequence_free_handler*)raptor_turtle_free_triple, NULL); #endif if(!$$) { raptor_turtle_free_triple(triple); YYERROR; } if(raptor_sequence_push($$, triple)) { raptor_free_sequence($$); $$=NULL; YYERROR; } #if RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } ; verb: predicate { #if RAPTOR_DEBUG > 1 printf("verb predicate="); raptor_identifier_print(stdout, $1); printf("\n"); #endif $$=$1; } | A { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("verb predicate=rdf:type (a)\n"); #endif uri=raptor_new_uri_for_rdf_concept_v2(((raptor_parser*)rdf_parser)->world, "type"); if(!uri) YYERROR; $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, uri, RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!$$) YYERROR; } ; propertyList: propertyList SEMICOLON verb objectList { int i; #if RAPTOR_DEBUG > 1 printf("propertyList 1\n verb="); raptor_identifier_print(stdout, $3); printf("\n objectList="); raptor_sequence_print($4, stdout); printf("\n propertyList="); raptor_sequence_print($1, stdout); printf("\n\n"); #endif if($4 == NULL) { #if RAPTOR_DEBUG > 1 printf(" empty objectList not processed\n"); #endif } else if($3 && $4) { /* non-empty property list, handle it */ for(i=0; i<raptor_sequence_size($4); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at($4, i); raptor_identifier *i2=(raptor_identifier*)RAPTOR_CALLOC(raptor_identifier, 1, sizeof(raptor_identifier)); if(!i2) { if($1) raptor_free_sequence($1); raptor_free_identifier($3); raptor_free_sequence($4); YYERROR; } if(raptor_copy_identifier(i2, $3)) { if($1) raptor_free_sequence($1); raptor_free_identifier($3); raptor_free_sequence($4); YYERROR; } t2->predicate=i2; t2->predicate->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($4, stdout); printf("\n"); #endif } if($1 == NULL) { #if RAPTOR_DEBUG > 1 printf(" empty propertyList not copied\n\n"); #endif } else if ($3 && $4 && $1) { while(raptor_sequence_size($4)) { raptor_triple* t2=(raptor_triple*)raptor_sequence_unshift($4); if(raptor_sequence_push($1, t2)) { raptor_free_sequence($1); raptor_free_identifier($3); raptor_free_sequence($4); YYERROR; } } #if RAPTOR_DEBUG > 1 printf(" after appending objectList (reverse order)="); raptor_sequence_print($1, stdout); printf("\n\n"); #endif raptor_free_sequence($4); } if($3) raptor_free_identifier($3); $$=$1; } | verb objectList { int i; #if RAPTOR_DEBUG > 1 printf("propertyList 2\n verb="); raptor_identifier_print(stdout, $1); if($2) { printf("\n objectList="); raptor_sequence_print($2, stdout); printf("\n"); } else printf("\n and empty objectList\n"); #endif if($1 && $2) { for(i=0; i<raptor_sequence_size($2); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at($2, i); raptor_identifier *i2=(raptor_identifier*)RAPTOR_CALLOC(raptor_identifier, 1, sizeof(raptor_identifier)); if(!i2) { raptor_free_identifier($1); raptor_free_sequence($2); YYERROR; } if(raptor_copy_identifier(i2, $1)) { raptor_free_identifier($1); raptor_free_sequence($2); YYERROR; } t2->predicate=i2; t2->predicate->is_malloced=1; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif } if($1) raptor_free_identifier($1); $$=$2; } | /* empty */ { #if RAPTOR_DEBUG > 1 printf("propertyList 4\n empty returning NULL\n\n"); #endif $$=NULL; } | propertyList SEMICOLON { $$=$1; #if RAPTOR_DEBUG > 1 printf("propertyList 5\n trailing semicolon returning existing list "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } ; directive : prefix | base ; prefix: PREFIX IDENTIFIER URI_LITERAL DOT { unsigned char *prefix=$2; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context); raptor_namespace *ns; #if 0 Get around bison complaining about not using $1 #endif #if RAPTOR_DEBUG > 1 printf("directive @prefix %s %s\n",($2 ? (char*)$2 : "(default)"), raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $3)); #endif if(prefix) { size_t len=strlen((const char*)prefix); if(prefix[len-1] == ':') { if(len == 1) /* declaring default namespace prefix @prefix : ... */ prefix=NULL; else prefix[len-1]='\0'; } } ns=raptor_new_namespace_from_uri(&turtle_parser->namespaces, prefix, $3, 0); if(ns) { raptor_namespaces_start_namespace(&turtle_parser->namespaces, ns); raptor_parser_start_namespace((raptor_parser*)rdf_parser, ns); } if($2) RAPTOR_FREE(cstring, $2); raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, $3); if(!ns) YYERROR; } ; base: BASE URI_LITERAL DOT { raptor_uri *uri=$2; /*raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context);*/ raptor_parser* parser=(raptor_parser*)rdf_parser; if(parser->base_uri) raptor_free_uri_v2(parser->world, parser->base_uri); parser->base_uri=uri; } ; subject: resource { $$=$1; } | blank { $$=$1; } ; predicate: resource { $$=$1; } ; object: resource { $$=$1; } | blank { $$=$1; } | literal { #if RAPTOR_DEBUG > 1 printf("object literal="); raptor_identifier_print(stdout, $1); printf("\n"); #endif $$=$1; } ; literal: STRING_LITERAL AT IDENTIFIER { #if RAPTOR_DEBUG > 1 printf("literal + language string=\"%s\"\n", $1); #endif $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, NULL, $3); if(!$$) YYERROR; } | STRING_LITERAL AT IDENTIFIER HAT URI_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" uri=\"%s\"\n", $1, $3, raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $5)); #endif if($5) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world,RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, $5, $3); if(!$$) YYERROR; } else $$=NULL; } | STRING_LITERAL AT IDENTIFIER HAT QNAME_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" qname URI=<%s>\n", $1, $3, raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $5)); #endif if($5) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, (const unsigned char*)$1, $5, $3); if(!$$) YYERROR; } else $$=NULL; } | STRING_LITERAL HAT URI_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" uri=\"%s\"\n", $1, raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $3)); #endif if($3) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, $3, NULL); if(!$$) YYERROR; } else $$=NULL; } | STRING_LITERAL HAT QNAME_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" qname URI=<%s>\n", $1, raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $3)); #endif if($3) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, $3, NULL); if(!$$) YYERROR; } else $$=NULL; } | STRING_LITERAL { #if RAPTOR_DEBUG > 1 printf("literal string=\"%s\"\n", $1); #endif $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, NULL, NULL); if(!$$) YYERROR; } | INTEGER_LITERAL { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource integer=%s\n", $1); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#integer"); if(!uri) { RAPTOR_FREE(cstring, $1); YYERROR; } $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, uri, NULL); if(!$$) YYERROR; } | FLOATING_LITERAL { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource double=%s\n", $1); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#double"); if(!uri) { RAPTOR_FREE(cstring, $1); YYERROR; } $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, uri, NULL); if(!$$) YYERROR; } | DECIMAL_LITERAL { raptor_uri *uri; #if RAPTOR_DEBUG > 1 printf("resource decimal=%s\n", $1); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#decimal"); if(!uri) { RAPTOR_FREE(cstring, $1); YYERROR; } $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, $1, uri, NULL); if(!$$) YYERROR; } | TRUE_TOKEN { unsigned char *string; raptor_uri *uri; #if RAPTOR_DEBUG > 1 fputs("resource boolean true\n", stderr); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#boolean"); if(!uri) YYERROR; string=(unsigned char*)RAPTOR_MALLOC(cstring, 5); if(!string) { raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, uri); YYERROR; } strncpy((char*)string, "true", 5); $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, string, uri, NULL); if(!$$) YYERROR; } | FALSE_TOKEN { unsigned char *string; raptor_uri *uri; #if RAPTOR_DEBUG > 1 fputs("resource boolean false\n", stderr); #endif uri=raptor_new_uri_v2(((raptor_parser*)rdf_parser)->world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#boolean"); if(!uri) YYERROR; string=(unsigned char*)RAPTOR_MALLOC(cstring, 6); if(!string) { raptor_free_uri_v2(((raptor_parser*)rdf_parser)->world, uri); YYERROR; } strncpy((char*)string, "false", 6); $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, string, uri, NULL); if(!$$) YYERROR; } ; resource: URI_LITERAL { #if RAPTOR_DEBUG > 1 printf("resource URI=<%s>\n", raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $1)); #endif if($1) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, $1, RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!$$) YYERROR; } else $$=NULL; } | QNAME_LITERAL { #if RAPTOR_DEBUG > 1 printf("resource qname URI=<%s>\n", raptor_uri_as_string_v2(((raptor_parser*)rdf_parser)->world, $1)); #endif if($1) { $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, $1, RAPTOR_URI_SOURCE_ELEMENT, NULL, NULL, NULL, NULL); if(!$$) YYERROR; } else $$=NULL; } ; blank: BLANK_LITERAL { const unsigned char *id; #if RAPTOR_DEBUG > 1 printf("subject blank=\"%s\"\n", $1); #endif id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, $1); if(!id) YYERROR; $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_BLANK_ID, id, NULL, NULL, NULL); if(!$$) YYERROR; } | LEFT_SQUARE propertyList RIGHT_SQUARE { int i; const unsigned char *id; id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!id) { if($2) raptor_free_sequence($2); YYERROR; } $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_GENERATED, id, NULL, NULL, NULL); if(!$$) { if($2) raptor_free_sequence($2); YYERROR; } if($2 == NULL) { #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_identifier_print(stdout, $$); printf("\n"); #endif } else { /* non-empty property list, handle it */ #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_sequence_print($2, stdout); printf("\n"); #endif for(i=0; i<raptor_sequence_size($2); i++) { raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at($2, i); raptor_identifier *i2=(raptor_identifier*)RAPTOR_CALLOC(raptor_identifier, 1, sizeof(raptor_identifier)); if(!i2) { raptor_free_sequence($2); raptor_free_identifier($$); $$=NULL; YYERROR; } if(raptor_copy_identifier(i2, $$)) { RAPTOR_FREE(raptor_identifier, i2); raptor_free_sequence($2); raptor_free_identifier($$); $$=NULL; YYERROR; } t2->subject=i2; t2->subject->is_malloced=1; raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif raptor_free_sequence($2); } } | collection { $$=$1; } ; collection: LEFT_ROUND itemList RIGHT_ROUND { int i; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context); raptor_identifier* first_identifier=NULL; raptor_identifier* rest_identifier=NULL; raptor_identifier* object=NULL; raptor_identifier* blank=NULL; #if RAPTOR_DEBUG > 1 printf("collection\n objectList="); raptor_sequence_print($2, stdout); printf("\n"); #endif first_identifier=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, turtle_parser->first_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!first_identifier) goto err_collection; rest_identifier=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, turtle_parser->rest_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!rest_identifier) goto err_collection; /* non-empty property list, handle it */ #if RAPTOR_DEBUG > 1 printf("resource\n propertyList="); raptor_sequence_print($2, stdout); printf("\n"); #endif object=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, turtle_parser->nil_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!object) goto err_collection; for(i=raptor_sequence_size($2)-1; i>=0; i--) { raptor_identifier* temp; raptor_triple* t2=(raptor_triple*)raptor_sequence_get_at($2, i); const unsigned char *blank_id; blank_id=raptor_parser_internal_generate_id((raptor_parser*)rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!blank_id) goto err_collection; blank=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_GENERATED, blank_id, NULL, NULL, NULL); if(!blank) goto err_collection; t2->subject=blank; t2->predicate=first_identifier; /* t2->object already set to the value we want */ raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); temp=t2->object; t2->subject=blank; t2->predicate=rest_identifier; t2->object=object; raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); t2->subject=NULL; t2->predicate=NULL; t2->object=temp; raptor_free_identifier(object); object=blank; blank=NULL; } #if RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif raptor_free_sequence($2); raptor_free_identifier(first_identifier); raptor_free_identifier(rest_identifier); $$=object; break; /* success */ err_collection: if(blank) raptor_free_identifier(blank); if(object) raptor_free_identifier(object); if(rest_identifier) raptor_free_identifier(rest_identifier); if(first_identifier) raptor_free_identifier(first_identifier); raptor_free_sequence($2); YYERROR; } | LEFT_ROUND RIGHT_ROUND { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)(((raptor_parser*)rdf_parser)->context); #if RAPTOR_DEBUG > 1 printf("collection\n empty\n"); #endif $$=raptor_new_identifier_v2(((raptor_parser*)rdf_parser)->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, raptor_uri_copy_v2(((raptor_parser*)rdf_parser)->world, turtle_parser->nil_uri), RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL, NULL); if(!$$) YYERROR; } ; %% /* Support functions */ /* This is declared in turtle_lexer.h but never used, so we always get * a warning unless this dummy code is here. Used once below as a return. */ static int yy_init_globals (yyscan_t yyscanner ) { return 0; }; /* helper - everything passed in is now owned by triple */ static raptor_triple* raptor_turtle_new_triple(raptor_identifier *subject, raptor_identifier *predicate, raptor_identifier *object) { raptor_triple* t; t=(raptor_triple*)RAPTOR_MALLOC(raptor_triple, sizeof(raptor_triple)); if(!t) { if(subject) raptor_free_identifier(subject); if(predicate) raptor_free_identifier(predicate); if(object) raptor_free_identifier(object); return NULL; } t->subject=subject; t->predicate=predicate; t->object=object; return t; } static void raptor_turtle_free_triple(raptor_triple *t) { if(t->subject) raptor_free_identifier(t->subject); if(t->predicate) raptor_free_identifier(t->predicate); if(t->object) raptor_free_identifier(t->object); RAPTOR_FREE(raptor_triple, t); } #ifdef RAPTOR_DEBUG static void raptor_triple_print(raptor_triple *t, FILE *fh) { fputs("triple(", fh); raptor_identifier_print(fh, t->subject); fputs(", ", fh); raptor_identifier_print(fh, t->predicate); fputs(", ", fh); raptor_identifier_print(fh, t->object); fputc(')', fh); } #endif int turtle_parser_error(void* ctx, const char *msg) { raptor_parser* rdf_parser=(raptor_parser *)ctx; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->error_count++) return 0; rdf_parser->locator.line=turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column=turtle_lexer_get_column(yyscanner); #endif raptor_parser_simple_error(rdf_parser, "%s", msg); return yy_init_globals(NULL); /* 0 but a way to use yy_init_globals */ } int turtle_syntax_error(raptor_parser *rdf_parser, const char *message, ...) { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; va_list arguments; if(turtle_parser->error_count++) return 0; rdf_parser->locator.line=turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column=turtle_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_error_varargs(((raptor_parser*)rdf_parser), message, arguments); va_end(arguments); return 0; } raptor_uri* turtle_qname_to_uri(raptor_parser *rdf_parser, unsigned char *name, size_t name_len) { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; rdf_parser->locator.line=turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column=turtle_lexer_get_column(yyscanner); #endif return raptor_qname_string_to_uri(&turtle_parser->namespaces, name, name_len, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser); } static int turtle_parse(raptor_parser *rdf_parser, const char *string, size_t length) { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; void *buffer; if(!string || !*string) return 0; if(turtle_lexer_lex_init(&turtle_parser->scanner)) return 1; turtle_parser->scanner_set=1; turtle_lexer_set_extra(rdf_parser, turtle_parser->scanner); buffer = turtle_lexer__scan_bytes(string, length, turtle_parser->scanner); turtle_parser_parse(rdf_parser); turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set=0; return 0; } /** * raptor_turtle_parse_init - Initialise the Raptor Turtle parser * * Return value: non 0 on failure **/ static int raptor_turtle_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; if(raptor_namespaces_init_v2(rdf_parser->world, &turtle_parser->namespaces, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser, 0)) return 1; turtle_parser->nil_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "nil"); turtle_parser->first_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "first"); turtle_parser->rest_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, "rest"); if(!turtle_parser->nil_uri || !turtle_parser->first_uri || !turtle_parser->rest_uri) return 1; turtle_parser->trig=!strcmp(name, "trig"); return 0; } /* PUBLIC FUNCTIONS */ /* * raptor_turtle_parse_terminate - Free the Raptor Turtle parser * @rdf_parser: parser object * **/ static void raptor_turtle_parse_terminate(raptor_parser *rdf_parser) { raptor_turtle_parser *turtle_parser=(raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->nil_uri) raptor_free_uri_v2(rdf_parser->world, turtle_parser->nil_uri); if(turtle_parser->first_uri) raptor_free_uri_v2(rdf_parser->world, turtle_parser->first_uri); if(turtle_parser->rest_uri) raptor_free_uri_v2(rdf_parser->world, turtle_parser->rest_uri); raptor_namespaces_clear(&turtle_parser->namespaces); if(turtle_parser->scanner_set) { turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set=0; } if(turtle_parser->buffer) RAPTOR_FREE(cdata, turtle_parser->buffer); } static void raptor_turtle_generate_statement(raptor_parser *parser, raptor_triple *t) { /* raptor_turtle_parser *turtle_parser=(raptor_turtle_parser*)parser->context; */ raptor_statement *statement=&parser->statement; if(!t->subject || !t->predicate || !t->object) return; /* Two choices for subject for Turtle */ statement->subject_type=t->subject->type; if(t->subject->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { statement->subject=t->subject->id; } else { /* RAPTOR_IDENTIFIER_TYPE_RESOURCE */ RAPTOR_ASSERT(t->subject->type != RAPTOR_IDENTIFIER_TYPE_RESOURCE, "subject type is not resource"); statement->subject=t->subject->uri; } /* Predicates are URIs but check for bad ordinals */ if(!strncmp((const char*)raptor_uri_as_string_v2(parser->world, t->predicate->uri), "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) { unsigned char* predicate_uri_string=raptor_uri_as_string_v2(parser->world, t->predicate->uri); int predicate_ordinal=raptor_check_ordinal(predicate_uri_string+44); if(predicate_ordinal <= 0) raptor_parser_error(parser, "Illegal ordinal value %d in property '%s'.", predicate_ordinal, predicate_uri_string); } statement->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; statement->predicate=t->predicate->uri; /* Three choices for object for Turtle */ statement->object_type=t->object->type; statement->object_literal_language=NULL; statement->object_literal_datatype=NULL; if(t->object->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { statement->object=t->object->uri; } else if(t->object->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { statement->object=t->object->id; } else { /* RAPTOR_IDENTIFIER_TYPE_LITERAL */ RAPTOR_ASSERT(t->object->type != RAPTOR_IDENTIFIER_TYPE_LITERAL, "object type is not literal"); statement->object=t->object->literal; statement->object_literal_language=t->object->literal_language; statement->object_literal_datatype=t->object->literal_datatype; if(statement->object_literal_datatype) statement->object_literal_language=NULL; } if(!parser->statement_handler) return; /* Generate the statement */ (*parser->statement_handler)(parser->user_data, statement); } static int raptor_turtle_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { char *ptr; raptor_turtle_parser *turtle_parser=(raptor_turtle_parser*)rdf_parser->context; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("adding %d bytes to line buffer\n", (int)len); #endif if(len) { turtle_parser->buffer=(char*)RAPTOR_REALLOC(cstring, turtle_parser->buffer, turtle_parser->buffer_length + len + 1); if(!turtle_parser->buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } /* move pointer to end of cdata buffer */ ptr=turtle_parser->buffer+turtle_parser->buffer_length; /* adjust stored length */ turtle_parser->buffer_length += len; /* now write new stuff at end of cdata buffer */ strncpy(ptr, (char*)s, len); ptr += len; *ptr = '\0'; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("buffer buffer now '%s' (%d bytes)\n", turtle_parser->buffer, turtle_parser->buffer_length); #endif } /* if not end, wait for rest of input */ if(!is_end) return 0; /* Nothing to do */ if(!turtle_parser->buffer_length) return 0; turtle_parse(rdf_parser, turtle_parser->buffer, turtle_parser->buffer_length); return 0; } static int raptor_turtle_parse_start(raptor_parser *rdf_parser) { raptor_locator *locator=&rdf_parser->locator; raptor_turtle_parser *turtle_parser=(raptor_turtle_parser*)rdf_parser->context; /* base URI required for Turtle */ if(!rdf_parser->base_uri) return 1; locator->line=1; locator->column= -1; /* No column info */ locator->byte= -1; /* No bytes info */ if(turtle_parser->buffer_length) { RAPTOR_FREE(cdata, turtle_parser->buffer); turtle_parser->buffer=NULL; turtle_parser->buffer_length=0; } turtle_parser->lineno=1; return 0; } static int raptor_turtle_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "ttl")) score=8; if(!strcmp((const char*)suffix, "n3")) score=3; } if(mime_type) { if(strstr((const char*)mime_type, "turtle")) score+=6; #ifndef RAPTOR_PARSER_N3 if(strstr((const char*)mime_type, "n3")) score+=3; #endif } /* FIXME: Should do this as long as N3 is not also present since * shares the same syntax */ if(buffer && len) { #define HAS_TURTLE_PREFIX (raptor_memstr((const char*)buffer, len, "@prefix ") != NULL) /* The following could also be found with N-Triples but not with @prefix */ #define HAS_TURTLE_RDF_URI (raptor_memstr((const char*)buffer, len, ": <http://www.w3.org/1999/02/22-rdf-syntax-ns#>") != NULL) if(HAS_TURTLE_PREFIX) { score=6; if(HAS_TURTLE_RDF_URI) score+=2; } } return score; } #ifdef RAPTOR_PARSER_TRIG static int raptor_trig_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "trig")) score=9; #ifndef RAPTOR_PARSER_TURTLE if(!strcmp((const char*)suffix, "ttl")) score=8; #endif if(!strcmp((const char*)suffix, "n3")) score=3; } if(mime_type) { #ifndef RAPTOR_PARSER_TURTLE if(strstr((const char*)mime_type, "turtle")) score+=6; #endif #ifndef RAPTOR_PARSER_N3 if(strstr((const char*)mime_type, "n3")) score+=3; #endif } #ifndef RAPTOR_PARSER_TURTLE /* FIXME: Should do this as long as N3 is not also present since * shares the same syntax */ if(buffer && len) { #define HAS_TRIG_PREFIX (raptor_memstr((const char*)buffer, len, "@prefix ") != NULL) /* The following could also be found with N-Triples but not with @prefix */ #define HAS_TRIG_RDF_URI (raptor_memstr((const char*)buffer, len, ": <http://www.w3.org/1999/02/22-rdf-syntax-ns#>") != NULL) if(HAS_TRIG_PREFIX) { score=6; if(HAS_TRIG_RDF_URI) score+=2; } } #endif return score; } #endif #ifdef RAPTOR_PARSER_TURTLE static int raptor_turtle_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_turtle_parser); factory->need_base_uri = 1; factory->init = raptor_turtle_parse_init; factory->terminate = raptor_turtle_parse_terminate; factory->start = raptor_turtle_parse_start; factory->chunk = raptor_turtle_parse_chunk; factory->recognise_syntax = raptor_turtle_parse_recognise_syntax; rc+= raptor_parser_factory_add_alias(factory, "ntriples-plus") != 0; rc+= raptor_parser_factory_add_uri(factory, (const unsigned char*)"http://www.dajobe.org/2004/01/turtle/") != 0; /* first one is the default */ rc+= raptor_parser_factory_add_mime_type(factory, "application/x-turtle", 10) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/turtle", 10) != 0; #ifndef RAPTOR_PARSER_N3 rc+= raptor_parser_factory_add_mime_type(factory, "text/n3", 3) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "text/rdf+n3", 3) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/rdf+n3", 3) != 0; #endif return rc; } #endif #ifdef RAPTOR_PARSER_TRIG static int raptor_trig_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_turtle_parser); factory->need_base_uri = 1; factory->init = raptor_turtle_parse_init; factory->terminate = raptor_turtle_parse_terminate; factory->start = raptor_turtle_parse_start; factory->chunk = raptor_turtle_parse_chunk; factory->recognise_syntax = raptor_trig_parse_recognise_syntax; rc+= raptor_parser_factory_add_uri(factory, (const unsigned char*)"http://www.wiwiss.fu-berlin.de/suhl/bizer/TriG/Spec/") != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/x-trig", 10) != 0; return rc; } #endif #ifdef RAPTOR_PARSER_TURTLE int raptor_init_parser_turtle(raptor_world* world) { return !raptor_parser_register_factory(world, "turtle", "Turtle Terse RDF Triple Language", &raptor_turtle_parser_register_factory); } #endif #ifdef RAPTOR_PARSER_TRIG int raptor_init_parser_trig(raptor_world* world) { return !raptor_parser_register_factory(world, "trig", "TriG - Turtle with Named Graphs", &raptor_trig_parser_register_factory); } #endif #ifdef STANDALONE #include <stdio.h> #include <locale.h> #define TURTLE_FILE_BUF_SIZE 2048 static void turtle_parser_print_statement(void *user, const raptor_statement *statement) { FILE* stream=(FILE*)user; raptor_print_statement(statement, stream); putc('\n', stream); } int main(int argc, char *argv[]) { char string[TURTLE_FILE_BUF_SIZE]; raptor_parser rdf_parser; /* static */ raptor_turtle_parser turtle_parser; /* static */ raptor_locator *locator=&rdf_parser.locator; FILE *fh; const char *filename; int rc; #if RAPTOR_DEBUG > 2 turtle_parser_debug=1; #endif if(argc > 1) { filename=argv[1]; fh = fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename="<stdin>"; fh = stdin; } memset(string, 0, TURTLE_FILE_BUF_SIZE); rc=fread(string, TURTLE_FILE_BUF_SIZE, 1, fh); if(rc < TURTLE_FILE_BUF_SIZE) { if(ferror(fh)) { fprintf(stderr, "%s: file '%s' read failed - %s\n", argv[0], filename, strerror(errno)); fclose(fh); return(1); } } if(argc>1) fclose(fh); raptor_init(); memset(&rdf_parser, 0, sizeof(raptor_parser)); memset(&turtle_parser, 0, sizeof(raptor_turtle_parser)); locator->line= locator->column = -1; locator->file= filename; turtle_parser.lineno= 1; rdf_parser.world = raptor_world_instance(); rdf_parser.context=&turtle_parser; rdf_parser.base_uri=raptor_new_uri((const unsigned char*)"http://example.org/fake-base-uri/"); raptor_set_statement_handler(&rdf_parser, stdout, turtle_parser_print_statement); raptor_turtle_parse_init(&rdf_parser, "turtle"); turtle_parser.error_count=0; turtle_parse(&rdf_parser, string, strlen(string)); raptor_turtle_parse_terminate(&rdf_parser); raptor_free_uri(rdf_parser.base_uri); raptor_finish(); return (0); } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_www_test.c�����������������������������������������������������������������0000644�0001750�0001750�00000004740�11330672502�014240� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www_test.c - Raptor WWW retrieval test code * * Copyright (C) 2003-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <stdarg.h> /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" static void write_content_type(raptor_www* www, void *userdata, const char *content_type) { fprintf((FILE*)userdata, "Content Type: %s\n", content_type); } int main (int argc, char *argv[]) { raptor_world *world; const char *uri_string; raptor_www *www; const char *user_agent="raptor-www-test"; raptor_uri *uri; void *string=NULL; size_t string_length=0; if(argc>1) uri_string=argv[1]; else uri_string="http://librdf.org/"; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); uri=raptor_new_uri_v2(world, (const unsigned char*)uri_string); if(!uri) { fprintf(stderr, "Failed to create Raptor URI for %s\n", uri_string); exit(1); } www=raptor_www_new_v2(world); raptor_www_set_content_type_handler(www, write_content_type, (void*)stderr); raptor_www_set_user_agent(www, user_agent); /* start retrieval (always a GET) */ if(raptor_www_fetch_to_string(www, uri, &string, &string_length, malloc)) { printf("WWW fetch failed\n"); } else { printf("HTTP response status %d\n", www->status_code); printf("Returned %d bytes of content\n", (int)string_length); } if(string) free(string); raptor_www_free(www); raptor_free_uri_v2(world, uri); raptor_free_world(world); return 0; } ��������������������������������raptor-1.4.21/src/raptor_general.c������������������������������������������������������������������0000644�0001750�0001750�00000050604�11330672502�013772� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_general.c - Raptor general routines * * Copyright (C) 2000-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* statics */ #ifndef RAPTOR_DISABLE_V1 static raptor_world* Raptor_World=NULL; #endif const char * const raptor_short_copyright_string = "Copyright 2000-2010 David Beckett. Copyright 2000-2005 University of Bristol"; const char * const raptor_copyright_string = "Copyright (C) 2000-2010 David Beckett - http://www.dajobe.org/\nCopyright (C) 2000-2005 University of Bristol - http://www.bristol.ac.uk/"; const char * const raptor_license_string = "LGPL 2.1 or newer, GPL 2 or newer, Apache 2.0 or newer.\nSee http://librdf.org/raptor/LICENSE.html for full terms."; const char * const raptor_home_url_string = "http://librdf.org/raptor/"; /** * raptor_version_string: * * Library full version as a string. * * See also #raptor_version_decimal. */ const char * const raptor_version_string = VERSION; /** * raptor_version_major: * * Library major version number as a decimal integer. */ const unsigned int raptor_version_major = RAPTOR_VERSION_MAJOR; /** * raptor_version_minor: * * Library minor version number as a decimal integer. */ const unsigned int raptor_version_minor = RAPTOR_VERSION_MINOR; /** * raptor_version_release: * * Library release version number as a decimal integer. */ const unsigned int raptor_version_release = RAPTOR_VERSION_RELEASE; /** * raptor_version_decimal: * * Library full version as a decimal integer. * * See also #raptor_version_string. */ const unsigned int raptor_version_decimal = RAPTOR_VERSION_DECIMAL; /** * raptor_new_world: * * Allocate a new raptor_world object. * * The raptor_world is initialized with raptor_world_open(). * Allocation and initialization are decoupled to allow * changing settings on the world object before init. * * Return value: uninitialized raptor_world object or NULL on failure */ raptor_world * raptor_new_world(void) { raptor_world *world; world = (raptor_world*)RAPTOR_CALLOC(raptor_world, sizeof(raptor_world), 1); if(world) { /* set default libxml flags - can be updated by * raptor_world_set_libxml_flags() and raptor_set_libxml_flags() */ /* unset: RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE * unset: RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE */ world->libxml_flags = 0; } return world; } /** * raptor_world_open: * @world: raptor_world object * * Initialise the raptor library. * * Initializes a #raptor_world object created by raptor_new_world(). * Allocation and initialization are decoupled to allow * changing settings on the world object before init. * * The initialized world object is used with subsequent raptor API calls. * * Return value: non-0 on failure */ int raptor_world_open(raptor_world* world) { int rc; if(!world) return -1; if(world->opened) return 0; /* not an error */ rc = raptor_parsers_init(world); if(rc) return rc; rc = raptor_serializers_init(world); if(rc) return rc; rc = raptor_uri_init(world); if(rc) return rc; rc = raptor_sax2_init(world); if(rc) return rc; rc = raptor_www_init_v2(world); if(rc) return rc; world->opened = 1; return 0; } /** * raptor_free_world: * @world: raptor_world object * * Terminate the raptor library. * * Destroys the raptor_world object and all related information. */ void raptor_free_world(raptor_world* world) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(world, raptor_world); raptor_www_finish_v2(world); raptor_sax2_finish(world); raptor_serializers_finish(world); raptor_parsers_finish(world); RAPTOR_FREE(raptor_world, world); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_init: * * Initialise the raptor library. * * This function MUST be called before using any of the raptor APIs. **/ void raptor_init(void) { if(Raptor_World) { Raptor_World->static_usage++; return; } Raptor_World=raptor_new_world(); if(!Raptor_World) goto failure; if(raptor_world_open(Raptor_World)) goto failure; Raptor_World->static_usage=1; return; failure: raptor_finish(); RAPTOR_FATAL1("raptor_init() failed"); } /** * raptor_finish: * * Terminate the raptor library. * * Cleans up state of the library. If called, must be used after * all other objects are destroyed with their destructor. **/ void raptor_finish(void) { if(!Raptor_World || --Raptor_World->static_usage) return; raptor_free_world(Raptor_World); Raptor_World=NULL; } /* * raptor_world_instance: * Accessor for static raptor_world object. * * INTERNAL * * Return value: raptor_world object or NULL if not initialized */ raptor_world* raptor_world_instance(void) { return Raptor_World; } #endif /** * raptor_world_set_libxslt_security_preferences: * @world: world * @security_preferences: security preferences (an #xsltSecurityPrefsPtr) * * Set libxslt security preferences policy object * * The @security_preferences object will NOT become owned by * #raptor_world * * If libxslt is compiled into the library, @security_preferences * should be an #xsltSecurityPrefsPtr and will be used to call * xsltSetCtxtSecurityPrefs() when an XSLT engine is initialised. * * If libxslt is not compiled in, the object set here is not used. */ void raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(world, raptor_world); world->xslt_security_preferences = security_preferences; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_set_libxslt_security_preferences: * @security_preferences: security preferences (an #xsltSecurityPrefsPtr) * * Set libxslt security preferences policy object * * The @security_preferences object will NOT become owned by Raptor * * If libxslt is compiled into the library, @security_preferences * should be an #xsltSecurityPrefsPtr and will be used to call * xsltSetCtxtSecurityPrefs() when an XSLT engine is initialised. * * If libxslt is not compiled in, the object set here is not used. */ void raptor_set_libxslt_security_preferences(void *security_preferences) { raptor_world* world = raptor_world_instance(); if(world) raptor_world_set_libxslt_security_preferences(world, security_preferences); } #endif /** * raptor_world_set_libxml_flags: * @world: world * @flags: libxml flags * * Set common libxml library flags * * If libxml is compiled into the library, @flags is a bitmask * taking an OR of values defined in #raptor_libxml_flags * * See the #raptor_libxml_flags documentation for full details of * what the flags mean. * */ void raptor_world_set_libxml_flags(raptor_world *world, int flags) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(world, raptor_world); world->libxml_flags = flags; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_set_libxml_flags: * @flags: flags * * Set common libxml library flags * * If libxml is compiled into the library, @flags is a bitmask * taking an OR of values defined in #raptor_libxml_flags * * See the #raptor_libxml_flags documentation for full details of * what the flags mean. * */ void raptor_set_libxml_flags(int flags) { raptor_world* world = raptor_world_instance(); if(world) raptor_world_set_libxml_flags(world, flags); } #endif /* * Thanks to the patch in this Debian bug for the solution * to the crash inside vsnprintf on some architectures. * * "reuse of args inside the while(1) loop is in violation of the * specs and only happens to work by accident on other systems." * * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=104325 */ #ifndef va_copy #ifdef __va_copy #define va_copy(dest,src) __va_copy(dest,src) #else #define va_copy(dest,src) (dest) = (src) #endif #endif #ifdef CHECK_VSNPRINTF_RUNTIME static int vsnprintf_checked = -1; static int vsnprint_check_is_c99(const char *s, ...) { char buffer[32]; va_list args; int r; va_start(args, s); r = vsnprintf(buffer, 5, s, args); va_end(args); return (r == 7); } static int vsnprintf_is_c99(void) { if(vsnprintf_checked < 0) vsnprintf_checked = vsnprint_check_is_c99("1234567"); return vsnprintf_checked; } #endif #define VSNPRINTF_C99_BLOCK \ do { \ /* copy for re-use */ \ va_copy(args_copy, arguments); \ len = vsnprintf(empty_buffer, 1, message, args_copy)+1; \ va_end(args_copy); \ \ if(len <= 0) \ return NULL; \ \ buffer = (char*)RAPTOR_MALLOC(cstring, len); \ if(buffer) { \ /* copy for re-use */ \ va_copy(args_copy, arguments); \ vsnprintf(buffer, len, message, args_copy); \ va_end(args_copy); \ } \ } while(0) #define VSNPRINTF_NOT_C99_BLOCK \ do { \ /* This vsnprintf doesn't return number of bytes required */ \ int size = 2; \ \ while(1) { \ buffer = (char*)RAPTOR_MALLOC(cstring, size+1); \ if(!buffer) \ break; \ \ /* copy for re-use */ \ va_copy(args_copy, arguments); \ len = vsnprintf(buffer, size, message, args_copy); \ va_end(args_copy); \ \ /* On windows, vsnprintf() returns -1 if the buffer does not fit. \ * If the buffer exactly fits the string without a NULL \ * terminator, it returns the string length and it ends up with \ * an unterminated string. The added check makes sure the string \ * returned is terminated - otherwise more buffer space is \ * allocated and the while() loop retries. \ */ \ if((len >= 0) && (buffer[len] == '\0')) \ break; \ RAPTOR_FREE(cstring, buffer); \ size += 4; \ } \ } while(0) /** * raptor_vsnprintf: * @message: printf-style format string * @arguments: variable arguments list * * Format output for a variable arguments list. * * This is a wrapper around system versions of vsnprintf with * different call and return conventions. * * Return value: a newly allocated string as the format result or NULL on failure **/ char* raptor_vsnprintf(const char *message, va_list arguments) { char empty_buffer[1]; int len; char *buffer = NULL; va_list args_copy; #ifdef CHECK_VSNPRINTF_RUNTIME if(vsnprintf_is_c99()) VSNPRINTF_C99_BLOCK ; else VSNPRINTF_NOT_C99_BLOCK ; #else #ifdef HAVE_C99_VSNPRINTF VSNPRINTF_C99_BLOCK ; #else VSNPRINTF_NOT_C99_BLOCK ; #endif #endif return buffer; } /** * raptor_basename: * @name: path * * Get the basename of a path * * Return value: filename part of a pathname **/ const char* raptor_basename(const char *name) { char *p; if((p=strrchr(name, '/'))) name=p+1; else if((p=strrchr(name, '\\'))) name=p+1; return name; } const unsigned char * const raptor_xml_literal_datatype_uri_string=(const unsigned char *)"http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"; const unsigned int raptor_xml_literal_datatype_uri_string_len=53; /** * raptor_print_ntriples_string: * @stream: FILE* stream to print to * @string: UTF-8 string to print * @delim: Delimiter character for string (such as ") or \0 for no delim * escaping. * * Print an UTF-8 string using N-Triples escapes. * * Return value: non-0 on failure such as bad UTF-8 encoding. **/ int raptor_print_ntriples_string(FILE *stream, const unsigned char *string, const char delim) { unsigned char c; size_t len=strlen((const char*)string); int unichar_len; raptor_unichar unichar; for(; (c=*string); string++, len--) { if((delim && c == delim) || c == '\\') { fprintf(stream, "\\%c", c); continue; } /* Note: NTriples is ASCII */ if(c == 0x09) { fputs("\\t", stream); continue; } else if(c == 0x0a) { fputs("\\n", stream); continue; } else if(c == 0x0d) { fputs("\\r", stream); continue; } else if(c < 0x20|| c == 0x7f) { fprintf(stream, "\\u%04X", c); continue; } else if(c < 0x80) { fputc(c, stream); continue; } /* It is unicode */ unichar_len=raptor_utf8_to_unicode_char(NULL, string, len); if(unichar_len < 0 || unichar_len > (int)len) /* UTF-8 encoding had an error or ended in the middle of a string */ return 1; unichar_len=raptor_utf8_to_unicode_char(&unichar, string, len); if(unichar < 0x10000) fprintf(stream, "\\u%04lX", unichar); else fprintf(stream, "\\U%08lX", unichar); unichar_len--; /* since loop does len-- */ string += unichar_len; len -= unichar_len; } return 0; } /** * raptor_check_ordinal: * @name: ordinal string * * Check an RDF property ordinal, the n in rdf:_n * * Return value: ordinal integer or <0 if string is not a valid ordinal */ int raptor_check_ordinal(const unsigned char *name) { int ordinal= -1; unsigned char c; while((c=*name++)) { if(c < '0' || c > '9') return -1; if(ordinal <0) ordinal=0; ordinal *= 10; ordinal += (c - '0'); } return ordinal; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_error_handlers_init: * @error_handlers: error handlers object * * Initialize #raptor_error_handlers object statically. * * raptor_init() MUST have been called before calling this function. * Use raptor_error_handlers_init_v2() if using raptor_world APIs. */ void raptor_error_handlers_init(raptor_error_handlers* error_handlers) { raptor_error_handlers_init_v2(raptor_world_instance(), error_handlers); } #endif /** * raptor_error_handlers_init_v2: * @world: raptor_world object * @error_handlers: error handlers object * * Initialize #raptor_error_handlers object statically. * */ void raptor_error_handlers_init_v2(raptor_world *world, raptor_error_handlers* error_handlers) { error_handlers->magic=RAPTOR_ERROR_HANDLER_MAGIC; error_handlers->world=world; } static const char* const raptor_log_level_labels[RAPTOR_LOG_LEVEL_LAST+1]={ "none", "fatal error", "error", "warning" }; /* internal */ void raptor_log_error_to_handlers(raptor_world* world, raptor_error_handlers* error_handlers, raptor_log_level level, raptor_locator* locator, const char* message) { if(level == RAPTOR_LOG_LEVEL_NONE) return; raptor_log_error(world, level, error_handlers->handlers[level].handler, error_handlers->handlers[level].user_data, locator, message); } void raptor_log_error_varargs(raptor_world* world, raptor_log_level level, raptor_message_handler handler, void* handler_data, raptor_locator* locator, const char* message, va_list arguments) { char *buffer; size_t length; if(level == RAPTOR_LOG_LEVEL_NONE) return; buffer=raptor_vsnprintf(message, arguments); if(!buffer) { if(locator && world) { raptor_print_locator_v2(world, stderr, locator); fputc(' ', stderr); } fputs("raptor ", stderr); fputs(raptor_log_level_labels[level], stderr); fputs(" - ", stderr); vfprintf(stderr, message, arguments); fputc('\n', stderr); return; } length=strlen(buffer); if(buffer[length-1]=='\n') buffer[length-1]='\0'; raptor_log_error(world, level, handler, handler_data, locator, buffer); RAPTOR_FREE(cstring, buffer); } /* internal */ void raptor_log_error(raptor_world* world, raptor_log_level level, raptor_message_handler handler, void* handler_data, raptor_locator* locator, const char* message) { if(level == RAPTOR_LOG_LEVEL_NONE) return; if(handler) /* This is the place in raptor that MOST of the user error handler * functions are called. Not all, since things that use * raptor_simple_message_handler are called in their respective codes. * * FIXME: In future, this should be the only place but it requires * a public API change such as e.g. raptor_new_qname() */ handler(handler_data, locator, message); else { if(locator && world) { raptor_print_locator_v2(world, stderr, locator); fputc(' ', stderr); } fputs("raptor ", stderr); fputs(raptor_log_level_labels[level], stderr); fputs(" - ", stderr); fputs(message, stderr); fputc('\n', stderr); } } /** * raptor_free_memory: * @ptr: memory pointer * * Free memory allocated inside raptor. * * Some systems require memory allocated in a library to * be deallocated in that library. This function allows * memory allocated by raptor to be freed. * * Examples include the result of the '_to_' methods that returns * allocated memory such as raptor_uri_filename_to_uri_string, * raptor_uri_filename_to_uri_string * and raptor_uri_uri_string_to_filename_fragment * **/ void raptor_free_memory(void *ptr) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(ptr, memory); RAPTOR_FREE(void, ptr); } /** * raptor_alloc_memory: * @size: size of memory to allocate * * Allocate memory inside raptor. * * Some systems require memory allocated in a library to * be deallocated in that library. This function allows * memory to be allocated inside the raptor shared library * that can be freed inside raptor either internally or via * raptor_free_memory. * * Examples include using this in the raptor_parser_generate_id() handler * code to create new strings that will be used internally * as short identifiers and freed later on by the parsers. * * Return value: the address of the allocated memory or NULL on failure * **/ void* raptor_alloc_memory(size_t size) { return RAPTOR_MALLOC(void, size); } /** * raptor_calloc_memory: * @nmemb: number of members * @size: size of item * * Allocate zeroed array of items inside raptor. * * Some systems require memory allocated in a library to * be deallocated in that library. This function allows * memory to be allocated inside the raptor shared library * that can be freed inside raptor either internally or via * raptor_free_memory. * * Examples include using this in the raptor_parser_generate_id() handler * code to create new strings that will be used internally * as short identifiers and freed later on by the parsers. * * Return value: the address of the allocated memory or NULL on failure * **/ void* raptor_calloc_memory(size_t nmemb, size_t size) { return RAPTOR_CALLOC(void, nmemb, size); } #if defined (RAPTOR_DEBUG) && defined(RAPTOR_MEMORY_SIGN) void* raptor_sign_malloc(size_t size) { int *p; size += sizeof(int); p=(int*)malloc(size); *p++ = RAPTOR_SIGN_KEY; return p; } void* raptor_sign_calloc(size_t nmemb, size_t size) { int *p; /* turn into bytes */ size = nmemb*size + sizeof(int); p=(int*)calloc(1, size); *p++ = RAPTOR_SIGN_KEY; return p; } void* raptor_sign_realloc(void *ptr, size_t size) { int *p; if(!ptr) return raptor_sign_malloc(size); p=(int*)ptr; p--; if(*p != RAPTOR_SIGN_KEY) RAPTOR_FATAL3("memory signature %08X != %08X", *p, RAPTOR_SIGN_KEY); size += sizeof(int); p=(int*)realloc(p, size); *p++= RAPTOR_SIGN_KEY; return p; } void raptor_sign_free(void *ptr) { int *p; if(!ptr) return; p=(int*)ptr; p--; if(*p != RAPTOR_SIGN_KEY) RAPTOR_FATAL3("memory signature %08X != %08X", *p, RAPTOR_SIGN_KEY); free(p); } #endif #if defined (RAPTOR_DEBUG) && defined(HAVE_DMALLOC_H) && defined(RAPTOR_MEMORY_DEBUG_DMALLOC) #undef malloc void* raptor_system_malloc(size_t size) { return malloc(size); } #undef free void raptor_system_free(void *ptr) { free(ptr); } #endif ����������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/turtle_lexer.c��������������������������������������������������������������������0000644�0001750�0001750�00000246100�11330672547�013513� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #line 10 "turtle_lexer.c" #line 12 "turtle_lexer.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE turtle_lexer_restart(yyin ,yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = yyg->yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via turtle_lexer_restart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] void turtle_lexer_restart (FILE *input_file ,yyscan_t yyscanner ); void turtle_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void turtle_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void turtle_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void turtle_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void turtle_lexer_pop_buffer_state (yyscan_t yyscanner ); static void turtle_lexer_ensure_buffer_stack (yyscan_t yyscanner ); static void turtle_lexer__load_buffer_state (yyscan_t yyscanner ); static void turtle_lexer__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); #define YY_FLUSH_BUFFER turtle_lexer__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) YY_BUFFER_STATE turtle_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *turtle_lexer_alloc (yy_size_t ,yyscan_t yyscanner ); void *turtle_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void turtle_lexer_free (void * ,yyscan_t yyscanner ); #define yy_new_buffer turtle_lexer__create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ turtle_lexer_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ turtle_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ turtle_lexer_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ turtle_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef unsigned char YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 39 #define YY_END_OF_BUFFER 40 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[105] = { 0, 0, 0, 0, 0, 23, 23, 40, 38, 2, 1, 1, 38, 37, 13, 14, 38, 5, 4, 29, 26, 6, 38, 11, 35, 7, 38, 8, 38, 38, 3, 35, 35, 15, 16, 33, 30, 32, 33, 23, 23, 23, 24, 2, 1, 0, 20, 0, 37, 36, 36, 0, 29, 27, 27, 0, 17, 26, 0, 34, 0, 0, 35, 26, 0, 12, 0, 35, 35, 30, 0, 31, 23, 23, 0, 0, 20, 21, 0, 27, 0, 0, 28, 26, 0, 0, 25, 35, 35, 22, 0, 28, 0, 28, 0, 0, 25, 35, 18, 10, 0, 19, 0, 9, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 5, 6, 1, 1, 1, 1, 7, 8, 1, 9, 10, 11, 12, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, 1, 17, 1, 18, 19, 19, 19, 19, 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 21, 22, 23, 24, 25, 1, 26, 27, 19, 19, 28, 29, 19, 19, 30, 19, 19, 31, 19, 19, 19, 32, 19, 33, 34, 35, 36, 19, 19, 37, 19, 19, 38, 1, 39, 1, 1, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40 } ; static yyconst flex_int32_t yy_meta[41] = { 0, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 4, 1, 5, 6, 1, 1, 1, 1, 7, 7, 1, 7, 1, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, 7 } ; static yyconst flex_int16_t yy_base[117] = { 0, 0, 0, 40, 0, 78, 79, 251, 252, 248, 252, 246, 80, 83, 252, 252, 76, 252, 235, 78, 236, 252, 229, 65, 81, 252, 231, 252, 220, 229, 82, 85, 79, 252, 252, 252, 240, 252, 227, 91, 105, 235, 111, 237, 252, 88, 233, 0, 114, 252, 234, 223, 111, 106, 115, 127, 252, 0, 218, 252, 208, 200, 206, 220, 216, 252, 0, 89, 106, 227, 214, 252, 126, 127, 141, 222, 252, 252, 141, 138, 144, 213, 211, 0, 186, 185, 0, 107, 119, 252, 177, 176, 162, 152, 136, 134, 0, 133, 136, 252, 130, 130, 100, 252, 252, 166, 173, 180, 184, 191, 195, 199, 203, 210, 214, 102, 218 } ; static yyconst flex_int16_t yy_def[117] = { 0, 104, 1, 104, 3, 105, 105, 104, 104, 104, 104, 104, 106, 107, 104, 104, 104, 104, 104, 104, 108, 104, 109, 104, 110, 104, 111, 104, 104, 104, 110, 110, 31, 104, 104, 104, 104, 104, 112, 113, 113, 104, 113, 104, 104, 106, 104, 106, 107, 104, 104, 104, 104, 104, 104, 104, 104, 114, 109, 104, 104, 104, 31, 108, 111, 104, 115, 31, 31, 104, 112, 104, 113, 113, 113, 104, 104, 104, 104, 104, 104, 104, 104, 114, 104, 104, 116, 31, 31, 104, 104, 104, 104, 104, 104, 104, 116, 31, 31, 104, 104, 31, 104, 104, 0, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104 } ; static yyconst flex_int16_t yy_nxt[293] = { 0, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 18, 19, 20, 21, 22, 8, 23, 24, 24, 25, 26, 27, 28, 29, 30, 24, 24, 31, 24, 24, 24, 24, 24, 32, 24, 24, 33, 34, 26, 35, 36, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 37, 35, 35, 35, 35, 38, 38, 35, 38, 35, 35, 35, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 35, 35, 38, 40, 40, 41, 41, 46, 49, 50, 51, 52, 54, 52, 60, 76, 73, 63, 63, 61, 55, 63, 42, 42, 47, 64, 64, 62, 55, 64, 73, 86, 47, 67, 68, 74, 104, 62, 72, 49, 50, 53, 87, 64, 64, 54, 52, 64, 78, 74, 79, 73, 73, 55, 62, 62, 78, 80, 81, 103, 81, 55, 82, 97, 88, 80, 104, 62, 72, 98, 74, 74, 90, 79, 90, 92, 91, 92, 62, 93, 80, 62, 102, 101, 62, 100, 99, 93, 80, 39, 39, 39, 39, 39, 39, 39, 45, 93, 45, 45, 45, 45, 45, 48, 48, 48, 48, 48, 48, 48, 57, 91, 91, 57, 58, 58, 58, 58, 58, 58, 58, 62, 62, 62, 62, 64, 64, 64, 64, 70, 70, 70, 70, 72, 72, 95, 72, 72, 72, 72, 83, 83, 94, 83, 96, 96, 82, 96, 82, 89, 71, 69, 63, 104, 62, 85, 84, 59, 53, 49, 77, 43, 75, 71, 69, 66, 65, 63, 59, 56, 53, 44, 43, 104, 7, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104 } ; static yyconst flex_int16_t yy_chk[293] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, 5, 6, 12, 13, 13, 16, 16, 19, 19, 23, 45, 39, 24, 30, 23, 19, 31, 5, 6, 12, 24, 30, 32, 19, 31, 40, 115, 45, 31, 32, 39, 42, 67, 42, 48, 48, 53, 67, 24, 30, 52, 52, 31, 53, 40, 54, 72, 73, 52, 68, 87, 53, 54, 55, 102, 55, 52, 55, 87, 68, 54, 74, 88, 74, 88, 72, 73, 78, 79, 78, 80, 78, 80, 101, 80, 79, 97, 100, 97, 98, 95, 94, 93, 79, 105, 105, 105, 105, 105, 105, 105, 106, 92, 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, 107, 107, 108, 91, 90, 108, 109, 109, 109, 109, 109, 109, 109, 110, 110, 110, 110, 111, 111, 111, 111, 112, 112, 112, 112, 113, 113, 85, 113, 113, 113, 113, 114, 114, 84, 114, 116, 116, 82, 116, 81, 75, 70, 69, 64, 63, 62, 61, 60, 58, 51, 50, 46, 43, 41, 38, 36, 29, 28, 26, 22, 20, 18, 11, 9, 7, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104 } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET #line 1 "./turtle_lexer.l" /* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_lexer.l - Raptor Turtle lexer - making tokens for turtle grammar generator * * Copyright (C) 2003-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * Turtle is defined in http://www.dajobe.org/2004/01/turtle/ * * To generate the C files from this source, rather than use the * shipped turtle_lexer.c/.h needs a patched version of flex 2.5.31 such * as the one available in Debian GNU/Linux. Details below * near the %option descriptions. * */ /* recognise 8-bits */ /* all symbols prefixed by this */ /* This is not needed, flex is invoked -oturtle_lexer.c */ /* %option outfile="turtle_lexer.c" */ /* Emit a C header file for prototypes * Only available in flex 2.5.13 or newer. * It was renamed to header-file in flex 2.5.19 */ /* Do not emit #include <unistd.h> * Only available in flex 2.5.7 or newer. * Broken in flex 2.5.31 without patches. */ #define YY_NO_UNISTD_H 1 /* Never interactive */ /* No isatty() check */ /* Batch scanner */ /* Never use yyunput */ /* Supply our own alloc/realloc/free functions */ /* Re-entrant scanner */ /* definitions */ #line 75 "./turtle_lexer.l" /* NOTE: These headers are NOT included here but are inserted by * fix-flex since otherwise it appears far too late in the generated C */ /* #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif */ #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_SETJMP_H #include <setjmp.h> #endif #include <raptor.h> #include <raptor_internal.h> #include <turtle_parser.h> #include <turtle_common.h> /* Prototypes */ static unsigned char *turtle_copy_token(unsigned char *text, size_t len); static unsigned char *turtle_copy_string_token(raptor_parser* rdf_parser, unsigned char *text, size_t len, int delim); void turtle_lexer_syntax_error(void* ctx, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval); #endif int turtle_lexer_lex (YYSTYPE *turtle_parser_lval, yyscan_t yyscanner); #define YY_DECL int turtle_lexer_lex (YYSTYPE *turtle_parser_lval, yyscan_t yyscanner) #ifdef __cplusplus #define INPUT_FN yyinput #else #define INPUT_FN input #endif /* Missing turtle_lexer.c/h prototypes */ int turtle_lexer_get_column(yyscan_t yyscanner); void turtle_lexer_set_column(int column_no , yyscan_t yyscanner); static void turtle_lexer_cleanup(yyscan_t yyscanner); #ifdef HAVE_SETJMP static jmp_buf turtle_lexer_fatal_error_longjmp_env; /* fatal error handler declaration */ #define YY_FATAL_ERROR(msg) do { \ turtle_lexer_fatal_error(msg, yyscanner); \ longjmp(turtle_lexer_fatal_error_longjmp_env, 1); \ } while(0) #else #define YY_FATAL_ERROR(msg) do { \ turtle_lexer_fatal_error(msg, yyscanner); \ abort(); \ } while(0) #endif static void turtle_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner); /* Fatal error handler that returns EOF instead of abort()/longjmp() * so that parser can clean up properly */ #define YY_FATAL_ERROR_EOF(msg) do { \ turtle_lexer_fatal_error(msg, yyscanner); \ yyterminate(); \ } while(0) /* Out-of-memory reporting macro */ #define TURTLE_LEXER_OOM() YY_FATAL_ERROR_EOF(turtle_lexer_oom_text) static const char turtle_lexer_oom_text[]="turtle_lexer: Out of memory"; /* Tokens from SPARQL spec, adjusted for Turtle */ /* SPARQL allows . in prefix after first position. Would be: NCNAME_PREFIX {NCCHAR1}(({NCCHAR}|".")*{NCCHAR})? */ /* SPARQL allows . in name after first position. Would be: NCNAME ("_"|{NCCHAR1})(({NCCHAR}|".")*{NCCHAR})? */ /* similar to SPARQL but no need for <= check here */ #line 697 "turtle_lexer.c" #define INITIAL 0 #define PREF 1 #define LITERAL 2 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #ifndef YY_NO_UNISTD_H #include <unistd.h> #endif #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif /* Holds the entire state of the reentrant scanner. */ struct yyguts_t { /* User-defined. Not touched by flex. */ YY_EXTRA_TYPE yyextra_r; /* The rest are the same as the globals declared in the non-reentrant scanner. */ FILE *yyin_r, *yyout_r; size_t yy_buffer_stack_top; /**< index of top of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; int yy_n_chars; int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; int yy_did_buffer_switch_on_eof; int yy_start_stack_ptr; int yy_start_stack_depth; int *yy_start_stack; yy_state_type yy_last_accepting_state; char* yy_last_accepting_cpos; int yylineno_r; int yy_flex_debug_r; char *yytext_r; int yy_more_flag; int yy_more_len; }; /* end struct yyguts_t */ static int yy_init_globals (yyscan_t yyscanner ); int turtle_lexer_lex_init (yyscan_t* scanner); int turtle_lexer_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int turtle_lexer_lex_destroy (yyscan_t yyscanner ); int turtle_lexer_get_debug (yyscan_t yyscanner ); void turtle_lexer_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE turtle_lexer_get_extra (yyscan_t yyscanner ); void turtle_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *turtle_lexer_get_in (yyscan_t yyscanner ); void turtle_lexer_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *turtle_lexer_get_out (yyscan_t yyscanner ); void turtle_lexer_set_out (FILE * out_str ,yyscan_t yyscanner ); int turtle_lexer_get_leng (yyscan_t yyscanner ); char *turtle_lexer_get_text (yyscan_t yyscanner ); int turtle_lexer_get_lineno (yyscan_t yyscanner ); void turtle_lexer_set_lineno (int line_number ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int turtle_lexer_wrap (yyscan_t yyscanner ); #else extern int turtle_lexer_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner ); #else static int input (yyscan_t yyscanner ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int turtle_lexer_lex (yyscan_t yyscanner); #define YY_DECL int turtle_lexer_lex (yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; #line 193 "./turtle_lexer.l" /* rules */ raptor_parser *rdf_parser=(raptor_parser*)yyextra; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; #ifdef HAVE_SETJMP if(setjmp(turtle_lexer_fatal_error_longjmp_env)) return 1; #endif #line 940 "turtle_lexer.c" if ( !yyg->yy_init ) { yyg->yy_init = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yyg->yy_start ) yyg->yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { turtle_lexer_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = turtle_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } turtle_lexer__load_buffer_state(yyscanner ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; /* Support of yytext. */ *yy_cp = yyg->yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yyg->yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 105 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 104 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yyg->yy_hold_char; yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 207 "./turtle_lexer.l" { turtle_parser->lineno++; } YY_BREAK case 2: YY_RULE_SETUP #line 209 "./turtle_lexer.l" { /* empty */ } YY_BREAK case 3: YY_RULE_SETUP #line 212 "./turtle_lexer.l" { return A; } YY_BREAK case 4: YY_RULE_SETUP #line 214 "./turtle_lexer.l" { return DOT; } YY_BREAK case 5: YY_RULE_SETUP #line 215 "./turtle_lexer.l" { return COMMA; } YY_BREAK case 6: YY_RULE_SETUP #line 216 "./turtle_lexer.l" { return SEMICOLON; } YY_BREAK case 7: YY_RULE_SETUP #line 217 "./turtle_lexer.l" { return LEFT_SQUARE; } YY_BREAK case 8: YY_RULE_SETUP #line 218 "./turtle_lexer.l" { return RIGHT_SQUARE; } YY_BREAK case 9: YY_RULE_SETUP #line 219 "./turtle_lexer.l" { BEGIN(PREF); return PREFIX; } YY_BREAK case 10: YY_RULE_SETUP #line 220 "./turtle_lexer.l" { return BASE; } YY_BREAK case 11: YY_RULE_SETUP #line 221 "./turtle_lexer.l" { return AT; } YY_BREAK case 12: YY_RULE_SETUP #line 222 "./turtle_lexer.l" { return HAT; } YY_BREAK case 13: YY_RULE_SETUP #line 223 "./turtle_lexer.l" { return LEFT_ROUND; } YY_BREAK case 14: YY_RULE_SETUP #line 224 "./turtle_lexer.l" { return RIGHT_ROUND; } YY_BREAK case 15: YY_RULE_SETUP #line 225 "./turtle_lexer.l" { return LEFT_CURLY; } YY_BREAK case 16: YY_RULE_SETUP #line 226 "./turtle_lexer.l" { return RIGHT_CURLY; } YY_BREAK case 17: YY_RULE_SETUP #line 227 "./turtle_lexer.l" { return COLONMINUS; } YY_BREAK case 18: YY_RULE_SETUP #line 228 "./turtle_lexer.l" { return TRUE_TOKEN; } YY_BREAK case 19: YY_RULE_SETUP #line 229 "./turtle_lexer.l" { return FALSE_TOKEN; } YY_BREAK case 20: YY_RULE_SETUP #line 232 "./turtle_lexer.l" { turtle_parser_lval->string=turtle_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '"'); /* ' */ if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_string_token failed"); return STRING_LITERAL; } YY_BREAK case 21: YY_RULE_SETUP #line 237 "./turtle_lexer.l" { BEGIN(LITERAL); turtle_parser->sb=raptor_new_stringbuffer(); if(!turtle_parser->sb) TURTLE_LEXER_OOM(); } YY_BREAK case 22: YY_RULE_SETUP #line 243 "./turtle_lexer.l" { size_t len; BEGIN(INITIAL); len=raptor_stringbuffer_length(turtle_parser->sb); turtle_parser_lval->string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(!turtle_parser_lval->string) TURTLE_LEXER_OOM(); raptor_stringbuffer_copy_to_string(turtle_parser->sb, (unsigned char*)turtle_parser_lval->string, len); turtle_parser_lval->string[len]='\0'; raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb=NULL; return STRING_LITERAL; } YY_BREAK case 23: /* rule 23 can match eol */ YY_RULE_SETUP #line 258 "./turtle_lexer.l" { char *p; if (*yytext == EOF) { BEGIN(INITIAL); turtle_syntax_error(rdf_parser, "End of file in middle of literal"); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb=NULL; return EOF; } for(p = yytext; *p; p++) { if(*p == '\n') turtle_parser->lineno++; } if(raptor_stringbuffer_append_turtle_string(turtle_parser->sb, (unsigned char*)yytext, yyleng, '"', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser)) { /* " */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb=NULL; YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } } YY_BREAK case 24: YY_RULE_SETUP #line 283 "./turtle_lexer.l" { /* this should only happen if \ is at the end of the file so the Turtle doc is illegal anyway */ turtle_syntax_error(rdf_parser, "End of file in middle of literal"); } YY_BREAK case 25: YY_RULE_SETUP #line 288 "./turtle_lexer.l" { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext+2, yyleng-2); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return BLANK_LITERAL; } YY_BREAK case 26: YY_RULE_SETUP #line 293 "./turtle_lexer.l" { turtle_parser_lval->uri=turtle_qname_to_uri(rdf_parser, (unsigned char*)yytext, yyleng); if(!turtle_parser_lval->uri) YY_FATAL_ERROR_EOF("turtle_qname_to_uri failed"); return QNAME_LITERAL; } YY_BREAK case 27: YY_RULE_SETUP #line 298 "./turtle_lexer.l" { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return DECIMAL_LITERAL; } YY_BREAK case 28: YY_RULE_SETUP #line 304 "./turtle_lexer.l" { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return FLOATING_LITERAL; } YY_BREAK case 29: YY_RULE_SETUP #line 310 "./turtle_lexer.l" { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return INTEGER_LITERAL; } YY_BREAK case 30: YY_RULE_SETUP #line 315 "./turtle_lexer.l" { /* eat up leading whitespace */ } YY_BREAK case 31: YY_RULE_SETUP #line 316 "./turtle_lexer.l" { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); BEGIN(INITIAL); return IDENTIFIER; } YY_BREAK case 32: YY_RULE_SETUP #line 321 "./turtle_lexer.l" { BEGIN(INITIAL); turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, 0); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return IDENTIFIER; } YY_BREAK case 33: /* rule 33 can match eol */ YY_RULE_SETUP #line 327 "./turtle_lexer.l" { BEGIN(INITIAL); if (*yytext == EOF) return EOF; turtle_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } YY_BREAK case 34: /* rule 34 can match eol */ YY_RULE_SETUP #line 335 "./turtle_lexer.l" { if(yyleng == 2) turtle_parser_lval->uri=raptor_uri_copy_v2(rdf_parser->world, rdf_parser->base_uri); else { raptor_stringbuffer* sb; unsigned char* uri_string; yytext[yyleng-1]='\0'; sb=raptor_new_stringbuffer(); if(!sb) TURTLE_LEXER_OOM(); if(raptor_stringbuffer_append_turtle_string(sb, (unsigned char*)yytext+1, yyleng-1, '>', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser)) { raptor_free_stringbuffer(sb); YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } uri_string=raptor_stringbuffer_as_string(sb); turtle_parser_lval->uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, rdf_parser->base_uri, uri_string); if(!turtle_parser_lval->uri) { raptor_free_stringbuffer(sb); TURTLE_LEXER_OOM(); } raptor_free_stringbuffer(sb); } return URI_LITERAL; } YY_BREAK case 35: YY_RULE_SETUP #line 359 "./turtle_lexer.l" { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return IDENTIFIER; } YY_BREAK case 36: /* rule 36 can match eol */ YY_RULE_SETUP #line 364 "./turtle_lexer.l" { /* # comment */ turtle_parser->lineno++; } YY_BREAK case 37: YY_RULE_SETUP #line 368 "./turtle_lexer.l" { /* # comment on the last line with no terminating newline */ } YY_BREAK case 38: YY_RULE_SETUP #line 371 "./turtle_lexer.l" { if (*yytext == EOF) return EOF; turtle_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } YY_BREAK case 39: YY_RULE_SETUP #line 378 "./turtle_lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 1328 "turtle_lexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PREF): case YY_STATE_EOF(LITERAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yyg->yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * turtle_lexer_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yyg->yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_END_OF_FILE: { yyg->yy_did_buffer_switch_on_eof = 0; if ( turtle_lexer_wrap(yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of turtle_lexer_lex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = yyg->yytext_ptr; register int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ turtle_lexer_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } if ( yyg->yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; turtle_lexer_restart(yyin ,yyscanner); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) turtle_lexer_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } yyg->yy_n_chars += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { register yy_state_type yy_current_state; register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 105 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { register int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ register char *yy_cp = yyg->yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 105 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 104); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) #else static int input (yyscan_t yyscanner) #endif { int c; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; *yyg->yy_c_buf_p = yyg->yy_hold_char; if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) /* This was really a NUL. */ *yyg->yy_c_buf_p = '\0'; else { /* need more input */ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ turtle_lexer_restart(yyin ,yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( turtle_lexer_wrap(yyscanner ) ) return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(yyscanner); #else return input(yyscanner); #endif } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; } } } c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ yyg->yy_hold_char = *++yyg->yy_c_buf_p; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ void turtle_lexer_restart (FILE * input_file , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! YY_CURRENT_BUFFER ){ turtle_lexer_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = turtle_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } turtle_lexer__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); turtle_lexer__load_buffer_state(yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ void turtle_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* TODO. We should be able to replace this entire function body * with * turtle_lexer_pop_buffer_state(); * turtle_lexer_push_buffer_state(new_buffer); */ turtle_lexer_ensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } YY_CURRENT_BUFFER_LVALUE = new_buffer; turtle_lexer__load_buffer_state(yyscanner ); /* We don't actually know whether we did this switch during * EOF (turtle_lexer_wrap()) processing, but the only time this flag * is looked at is after turtle_lexer_wrap() is called, so it's safe * to go ahead and always set it. */ yyg->yy_did_buffer_switch_on_eof = 1; } static void turtle_lexer__load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * @param yyscanner The scanner object. * @return the allocated buffer state. */ YY_BUFFER_STATE turtle_lexer__create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) turtle_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) turtle_lexer_alloc(b->yy_buf_size + 2 ,yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer__create_buffer()" ); b->yy_is_our_buffer = 1; turtle_lexer__init_buffer(b,file ,yyscanner); return b; } /** Destroy the buffer. * @param b a buffer created with turtle_lexer__create_buffer() * @param yyscanner The scanner object. */ void turtle_lexer__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) turtle_lexer_free((void *) b->yy_ch_buf ,yyscanner ); turtle_lexer_free((void *) b ,yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a turtle_lexer_restart() or at EOF. */ static void turtle_lexer__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; turtle_lexer__flush_buffer(b ,yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then turtle_lexer__init_buffer was _probably_ * called from turtle_lexer_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ void turtle_lexer__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) turtle_lexer__load_buffer_state(yyscanner ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * @param yyscanner The scanner object. */ void turtle_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (new_buffer == NULL) return; turtle_lexer_ensure_buffer_stack(yyscanner); /* This block is copied from turtle_lexer__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) yyg->yy_buffer_stack_top++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from turtle_lexer__switch_to_buffer. */ turtle_lexer__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ void turtle_lexer_pop_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!YY_CURRENT_BUFFER) return; turtle_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { turtle_lexer__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void turtle_lexer_ensure_buffer_stack (yyscan_t yyscanner) { int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; yyg->yy_buffer_stack = (struct yy_buffer_state**)turtle_lexer_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer_ensure_buffer_stack()" ); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; } if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)turtle_lexer_realloc (yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE turtle_lexer__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) turtle_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer__scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; turtle_lexer__switch_to_buffer(b ,yyscanner ); return b; } /** Setup the input buffer state to scan a string. The next call to turtle_lexer_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * turtle_lexer__scan_bytes() instead. */ YY_BUFFER_STATE turtle_lexer__scan_string (yyconst char * yystr , yyscan_t yyscanner) { return turtle_lexer__scan_bytes(yystr,strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to turtle_lexer_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE turtle_lexer__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) turtle_lexer_alloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = turtle_lexer__scan_buffer(buf,n ,yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in turtle_lexer__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ yyg->yy_hold_char = *yyg->yy_c_buf_p; \ *yyg->yy_c_buf_p = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ YY_EXTRA_TYPE turtle_lexer_get_extra (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ int turtle_lexer_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ int turtle_lexer_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ FILE *turtle_lexer_get_in (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ FILE *turtle_lexer_get_out (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ int turtle_lexer_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ char *turtle_lexer_get_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ void turtle_lexer_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ; } /** Set the current line number. * @param line_number * @param yyscanner The scanner object. */ void turtle_lexer_set_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR("turtle_lexer_set_lineno called with no buffer"); yylineno = line_number; } /** Set the current column. * @param line_number * @param yyscanner The scanner object. */ void turtle_lexer_set_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR("turtle_lexer_set_column called with no buffer"); yycolumn = column_no; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * @param yyscanner The scanner object. * @see turtle_lexer__switch_to_buffer */ void turtle_lexer_set_in (FILE * in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyin = in_str ; } void turtle_lexer_set_out (FILE * out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyout = out_str ; } int turtle_lexer_get_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; } void turtle_lexer_set_debug (int bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_flex_debug = bdebug ; } /* Accessor methods for yylval and yylloc */ /* User-visible API */ /* turtle_lexer_lex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ int turtle_lexer_lex_init(yyscan_t* ptr_yy_globals) { if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) turtle_lexer_alloc ( sizeof( struct yyguts_t ), NULL ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); return yy_init_globals ( *ptr_yy_globals ); } /* turtle_lexer_lex_init_extra has the same functionality as turtle_lexer_lex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and * is the reason, too, why this function also must handle its own declaration). * The user defined value in the first argument will be available to turtle_lexer_alloc in * the yyextra field. */ int turtle_lexer_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; turtle_lexer_set_extra (yy_user_defined, &dummy_yyguts); if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) turtle_lexer_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); turtle_lexer_set_extra (yy_user_defined, *ptr_yy_globals); return yy_init_globals ( *ptr_yy_globals ); } static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Initialization is the same as for the non-reentrant scanner. * This function is called from turtle_lexer_lex_destroy(), so don't allocate here. */ yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; yyg->yy_c_buf_p = (char *) 0; yyg->yy_init = 0; yyg->yy_start = 0; yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_depth = 0; yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * turtle_lexer_lex_init() */ return 0; } /* turtle_lexer_lex_destroy is for both reentrant and non-reentrant scanners. */ int turtle_lexer_lex_destroy (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ turtle_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; turtle_lexer_pop_buffer_state(yyscanner); } /* Destroy the stack itself. */ turtle_lexer_free(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ turtle_lexer_free(yyg->yy_start_stack ,yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * turtle_lexer_lex() is called, initialization will occur. */ yy_init_globals( yyscanner); /* Destroy the main struct (reentrant only). */ /* clean up leaks if any before freeing yyscanner */ turtle_lexer_cleanup(yyscanner); turtle_lexer_free ( yyscanner , yyscanner ); yyscanner = NULL; return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #define YYTABLES_NAME "yytables" #line 378 "./turtle_lexer.l" /* user code */ int turtle_lexer_wrap (yyscan_t yyscanner) { return 1; } static unsigned char * turtle_copy_token(unsigned char *text, size_t len) { unsigned char *s; if(!len) len=strlen((const char*)text); s=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(s) { strncpy((char*)s, (const char*)text, len); s[len] = '\0'; } return s; } static unsigned char * turtle_copy_string_token(raptor_parser* rdf_parser, unsigned char *string, size_t len, int delim) { raptor_stringbuffer* sb=NULL; int rc; if(len) { sb=raptor_new_stringbuffer(); if(!sb) return NULL; rc=raptor_stringbuffer_append_turtle_string(sb, string, len, delim, (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser); if(rc) { raptor_free_stringbuffer(sb); return NULL; } len=raptor_stringbuffer_length(sb); } string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(string) { if(sb) raptor_stringbuffer_copy_to_string(sb, string, len+1); string[len]='\0'; } if(sb) raptor_free_stringbuffer(sb); return string; } void turtle_lexer_syntax_error(void* ctx, const char *message, ...) { raptor_parser* rdf_parser=(raptor_parser *)ctx; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; va_list arguments; rdf_parser->locator.line=turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column=turtle_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_error_varargs(((raptor_parser*)rdf_parser), message, arguments); va_end(arguments); } /* * turtle_lexer_fatal_error: * @msg: * @yyscanner: * * INTERNAL - replacement for the generated error handler. */ static void turtle_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner) { raptor_parser *rdf_parser=NULL; if(yyscanner) rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(rdf_parser) /* avoid "format not a string literal and no format arguments" warning with %s */ raptor_parser_fatal_error(rdf_parser, "%s", msg); else { fputs(msg, stderr); fputc('\n', stderr); } } /* Define LEXER_ALLOC_TRACKING to enable allocated memory tracking * - fixes lexer memory leak when ensure_buffer_stack fails */ #ifdef LEXER_ALLOC_TRACKING typedef struct { /* Number of void* slots allocated */ int lexer_allocs_size; /* Allocted void* slots follow in memory after this header */ } lexer_alloc_tracker_header; /* Initial alloc tracker slot array size - 2 seems to be enough for almost all cases */ static const int initial_lexer_allocs_size=2; #endif /* * turtle_lexer_cleanup: * @yyscanner: * * INTERNAL - Clean up unfreed lexer allocs if LEXER_ALLOC_TRACKING is enabled. */ static void turtle_lexer_cleanup(yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; if(!yyscanner) return; rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs=(void**)&tracker[1]; for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]) free(lexer_allocs[i]); lexer_allocs[i]=NULL; } free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data=NULL; #endif } /* * turtle_lexer_alloc: * @size * @yyscanner * * INTERNAL - alloc replacement. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *turtle_lexer_alloc(yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *ptr; /* yyscanner not initialized -> probably initializing yyscanner itself * -> just malloc without tracking */ if(!yyscanner) return malloc(size); rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_alloc: yyscanner extra not initialized"); /* try to allocate tracker if it does not exist */ tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) { /* allocate tracker header + array of void* slots */ tracker=(lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+initial_lexer_allocs_size*sizeof(void*)); if(!tracker) YY_FATAL_ERROR("lexer_alloc: cannot allocate tracker"); tracker->lexer_allocs_size=initial_lexer_allocs_size; rdf_parser->lexer_user_data=(void *)tracker; } lexer_allocs=(void**)&tracker[1]; /* allocate memory */ ptr=malloc(size); /* find a free slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(!lexer_allocs[i]) { lexer_allocs[i]=ptr; break; } } /* no free slots -> grow tracker slot array */ if(i>=tracker->lexer_allocs_size) { int j; void **dest; tracker=(lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+i*2*sizeof(void*)); if(!tracker) { if(ptr) free(ptr); YY_FATAL_ERROR("lexer_alloc: cannot grow tracker"); } tracker->lexer_allocs_size=i*2; /* copy data from old tracker */ dest=(void**)&tracker[1]; for(j=0; j<i; ++j) { dest[j]=lexer_allocs[j]; } /* set new item to first free slot */ dest[j]=ptr; /* free old tracker and replace with new one */ free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data=tracker; } return ptr; #else return malloc(size); #endif } /* * turtle_lexer_realloc: * * INTERNAL - realloc replacement * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *turtle_lexer_realloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *newptr; if(!yyscanner) YY_FATAL_ERROR("lexer_realloc: yyscanner not initialized"); rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_realloc: yyscanner extra not initialized"); tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) YY_FATAL_ERROR("lexer_realloc: no alloc tracker"); lexer_allocs=(void**)&tracker[1]; /* find the old slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]==ptr) break; } /* no old slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_realloc: cell not in tracker"); /* realloc */ newptr=realloc((char*)ptr, size); /* replace entry in tracker */ lexer_allocs[i]=newptr; return newptr; #else return realloc((char*)ptr, size); #endif } /* * turtle_lexer_free: * * INTERNAL - free replacement. * Checks for NULL pointer to be freed unlike the default lexer free function. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void turtle_lexer_free(void *ptr, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; /* do not free NULL */ if(!ptr) return; /* free ptr even if we would encounter an error */ free(ptr); /* yyscanner is allocated with turtle_lexer_alloc() but it's never stored in the tracker * - we need yyscanner to access the tracker */ if(!yyscanner || ptr==yyscanner) return; rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs=(void**)&tracker[1]; /* find the slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]==ptr) break; } /* no slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_free: cell not in tracker"); /* remove entry from tracker */ lexer_allocs[i]=NULL; #else if(ptr) free(ptr); #endif } #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval) { static char buffer[2048]; if(!token) return "<<EOF>>"; switch(token) { case PREFIX: return "PREFIX"; case BASE: return "BASE"; case A: return "A"; case DOT: return "DOT"; case COMMA: return "COMMA"; case SEMICOLON: return "SEMICOLON"; case LEFT_SQUARE: return "LEFT_SQUARE"; case RIGHT_SQUARE: return "RIGHT_SQUARE"; case AT: return "AT"; case HAT: return "HAT"; case STRING_LITERAL: sprintf(buffer, "STRING_LITERAL(%s)", lval->string); return buffer; case URI_LITERAL: sprintf(buffer, "URI_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string_v2(world, lval->uri) : "")); return buffer; case BLANK_LITERAL: sprintf(buffer, "BLANK_LITERAL(%s)", lval->string); return buffer; case QNAME_LITERAL: sprintf(buffer, "QNAME_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string_v2(world, lval->uri) : "")); return buffer; case INTEGER_LITERAL: sprintf(buffer, "INTEGER_LITERAL(%d)", lval->integer); return buffer; case FLOATING_LITERAL: sprintf(buffer, "FLOATING_LITERAL(%s)", lval->string); return buffer; case IDENTIFIER: sprintf(buffer, "IDENTIFIER(%s)", (lval->string ? (char*)lval->string : "")); return buffer; case DECIMAL_LITERAL: sprintf(buffer, "DECIMAL_LITERAL(%s)", lval->string); return buffer; case ERROR_TOKEN: return "ERROR"; default: RAPTOR_DEBUG2("UNKNOWN token %d - add a new case\n", token); return "(UNKNOWN)"; } } #endif #ifdef STANDALONE static void turtle_token_free(raptor_world* world, int token, YYSTYPE *lval) { if(!token) return; switch(token) { case STRING_LITERAL: case BLANK_LITERAL: case IDENTIFIER: if(lval->string) RAPTOR_FREE(cstring, lval->string); break; case URI_LITERAL: case QNAME_LITERAL: if(lval->uri) raptor_free_uri_v2(world, lval->uri); break; default: break; } } static void turtle_lexer_discard_error(void* user_data, const char *message, ...) { return; } int main(int argc, char *argv[]) { raptor_parser rdf_parser; raptor_turtle_parser turtle_parser; yyscan_t scanner; int token=EOF; FILE *fh; YYSTYPE lval; const unsigned char *uri_string; const char *filename=NULL; raptor_init(); if(argc > 1) { filename=argv[1]; fh=fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename="<stdin>"; fh = (FILE*)stdin; } memset(&rdf_parser, 0, sizeof(raptor_parser)); memset(&turtle_parser, 0, sizeof(raptor_turtle_parser)); rdf_parser.world = raptor_world_instance(); /* discard namespace errors - caused by not interpreting @prefix * and hence causing failed qname construction */ raptor_namespaces_init_v2(rdf_parser.world, &turtle_parser.namespaces, turtle_lexer_discard_error, NULL, 0); turtle_lexer_lex_init(&turtle_parser.scanner); scanner=turtle_parser.scanner; turtle_lexer_set_in(fh, scanner); turtle_lexer_set_extra(&rdf_parser, scanner); /* Initialise enough of the parser and locator to get error messages */ rdf_parser.context=&turtle_parser; turtle_parser.lineno=1; rdf_parser.locator.file=filename; rdf_parser.locator.column= -1; uri_string=raptor_uri_filename_to_uri_string(filename); rdf_parser.base_uri=raptor_new_uri(uri_string); RAPTOR_FREE(cstring, (void*)uri_string); while(1) { memset(&lval, 0, sizeof(YYSTYPE)); if(turtle_lexer_get_text(scanner) != NULL) printf("yyinput '%s'\n", turtle_lexer_get_text(scanner)); token=turtle_lexer_lex(&lval,scanner); #ifdef RAPTOR_DEBUG printf("token %s\n", turtle_token_print(raptor_world_instance(), token, &lval)); /* FIXME */ #else printf("token %d\n", token); #endif turtle_token_free(raptor_world_instance(), token, &lval); /* FIXME */ if(!token || token == EOF || token == ERROR_TOKEN) break; } turtle_lexer_lex_destroy(scanner); raptor_namespaces_clear(&turtle_parser.namespaces); raptor_free_uri(rdf_parser.base_uri); raptor_finish(); if(token == ERROR_TOKEN) return 1; return 0; } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/turtle_lexer.h��������������������������������������������������������������������0000644�0001750�0001750�00000021144�11330672547�013517� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef turtle_lexer_HEADER_H #define turtle_lexer_HEADER_H 1 #define turtle_lexer_IN_HEADER 1 #line 6 "turtle_lexer.h" #line 8 "turtle_lexer.h" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ void turtle_lexer_restart (FILE *input_file ,yyscan_t yyscanner ); void turtle_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void turtle_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void turtle_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void turtle_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void turtle_lexer_pop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *turtle_lexer_alloc (yy_size_t ,yyscan_t yyscanner ); void *turtle_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void turtle_lexer_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ #define yytext_ptr yytext_r #ifdef YY_HEADER_EXPORT_START_CONDITIONS #define INITIAL 0 #define PREF 1 #define LITERAL 2 #endif #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include <unistd.h> #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif int turtle_lexer_lex_init (yyscan_t* scanner); int turtle_lexer_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int turtle_lexer_lex_destroy (yyscan_t yyscanner ); int turtle_lexer_get_debug (yyscan_t yyscanner ); void turtle_lexer_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE turtle_lexer_get_extra (yyscan_t yyscanner ); void turtle_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *turtle_lexer_get_in (yyscan_t yyscanner ); void turtle_lexer_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *turtle_lexer_get_out (yyscan_t yyscanner ); void turtle_lexer_set_out (FILE * out_str ,yyscan_t yyscanner ); int turtle_lexer_get_leng (yyscan_t yyscanner ); char *turtle_lexer_get_text (yyscan_t yyscanner ); int turtle_lexer_get_lineno (yyscan_t yyscanner ); void turtle_lexer_set_lineno (int line_number ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int turtle_lexer_wrap (yyscan_t yyscanner ); #else extern int turtle_lexer_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int turtle_lexer_lex (yyscan_t yyscanner); #define YY_DECL int turtle_lexer_lex (yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ #undef YY_NEW_FILE #undef YY_FLUSH_BUFFER #undef yy_set_bol #undef yy_new_buffer #undef yy_set_interactive #undef YY_DO_BEFORE_ACTION #ifdef YY_DECL_IS_OURS #undef YY_DECL_IS_OURS #undef YY_DECL #endif #line 378 "./turtle_lexer.l" #line 347 "turtle_lexer.h" #undef turtle_lexer_IN_HEADER #endif /* turtle_lexer_HEADER_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/turtle_lexer.l��������������������������������������������������������������������0000644�0001750�0001750�00000061252�11330672502�013516� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_lexer.l - Raptor Turtle lexer - making tokens for turtle grammar generator * * Copyright (C) 2003-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * Turtle is defined in http://www.dajobe.org/2004/01/turtle/ * * To generate the C files from this source, rather than use the * shipped turtle_lexer.c/.h needs a patched version of flex 2.5.31 such * as the one available in Debian GNU/Linux. Details below * near the %option descriptions. * */ /* recognise 8-bits */ %option 8bit %option warn nodefault /* all symbols prefixed by this */ %option prefix="turtle_lexer_" /* This is not needed, flex is invoked -oturtle_lexer.c */ /* %option outfile="turtle_lexer.c" */ /* Emit a C header file for prototypes * Only available in flex 2.5.13 or newer. * It was renamed to header-file in flex 2.5.19 */ %option header-file="turtle_lexer.h" /* Do not emit #include <unistd.h> * Only available in flex 2.5.7 or newer. * Broken in flex 2.5.31 without patches. */ %option nounistd /* Never interactive */ /* No isatty() check */ %option never-interactive /* Batch scanner */ %option batch /* Never use yyunput */ %option nounput /* Supply our own alloc/realloc/free functions */ %option noyyalloc noyyrealloc noyyfree /* Re-entrant scanner */ %option reentrant /* definitions */ %{ /* NOTE: These headers are NOT included here but are inserted by * fix-flex since otherwise it appears far too late in the generated C */ /* #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif */ #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_SETJMP_H #include <setjmp.h> #endif #include <raptor.h> #include <raptor_internal.h> #include <turtle_parser.h> #include <turtle_common.h> /* Prototypes */ static unsigned char *turtle_copy_token(unsigned char *text, size_t len); static unsigned char *turtle_copy_string_token(raptor_parser* rdf_parser, unsigned char *text, size_t len, int delim); void turtle_lexer_syntax_error(void* ctx, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval); #endif int turtle_lexer_lex (YYSTYPE *turtle_parser_lval, yyscan_t yyscanner); #define YY_DECL int turtle_lexer_lex (YYSTYPE *turtle_parser_lval, yyscan_t yyscanner) #ifdef __cplusplus #define INPUT_FN yyinput #else #define INPUT_FN input #endif /* Missing turtle_lexer.c/h prototypes */ int turtle_lexer_get_column(yyscan_t yyscanner); void turtle_lexer_set_column(int column_no , yyscan_t yyscanner); static void turtle_lexer_cleanup(yyscan_t yyscanner); #ifdef HAVE_SETJMP static jmp_buf turtle_lexer_fatal_error_longjmp_env; /* fatal error handler declaration */ #define YY_FATAL_ERROR(msg) do { \ turtle_lexer_fatal_error(msg, yyscanner); \ longjmp(turtle_lexer_fatal_error_longjmp_env, 1); \ } while(0) #else #define YY_FATAL_ERROR(msg) do { \ turtle_lexer_fatal_error(msg, yyscanner); \ abort(); \ } while(0) #endif static void turtle_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner); /* Fatal error handler that returns EOF instead of abort()/longjmp() * so that parser can clean up properly */ #define YY_FATAL_ERROR_EOF(msg) do { \ turtle_lexer_fatal_error(msg, yyscanner); \ yyterminate(); \ } while(0) /* Out-of-memory reporting macro */ #define TURTLE_LEXER_OOM() YY_FATAL_ERROR_EOF(turtle_lexer_oom_text) static const char turtle_lexer_oom_text[]="turtle_lexer: Out of memory"; %} /* Tokens from SPARQL spec, adjusted for Turtle */ LANGUAGETOKEN [A-Za-z][-A-Z_a-z0-9]* NCCHAR1 [A-Za-z\\\x80-\xff] NCCHAR {NCCHAR1}|"-"|"_"|[0-9] /* SPARQL allows . in prefix after first position. Would be: NCNAME_PREFIX {NCCHAR1}(({NCCHAR}|".")*{NCCHAR})? */ NCNAME_PREFIX {NCCHAR1}{NCCHAR}* /* SPARQL allows . in name after first position. Would be: NCNAME ("_"|{NCCHAR1})(({NCCHAR}|".")*{NCCHAR})? */ NCNAME ("_"|{NCCHAR1}){NCCHAR}* QNAME {NCNAME_PREFIX}?":"{NCNAME}? BNAME "_:"{NCNAME} /* similar to SPARQL but no need for <= check here */ QUOTEDURI \<[^\>]*\> DECIMAL [0-9]+"."[0-9]*|"."[0-9]+ DOUBLE [0-9]+"."[0-9]*{EXPONENT}|"."([0-9])+{EXPONENT}|([0-9])+{EXPONENT} EXPONENT [eE][+-]?[0-9]+ %x PREF LITERAL %% /* rules */ %{ raptor_parser *rdf_parser=(raptor_parser*)yyextra; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; #ifdef HAVE_SETJMP if(setjmp(turtle_lexer_fatal_error_longjmp_env)) return 1; #endif %} \r\n|\r|\n { turtle_parser->lineno++; } [\ \t\v]+ { /* empty */ } "a" { return A; } "." { return DOT; } "," { return COMMA; } ";" { return SEMICOLON; } "[" { return LEFT_SQUARE; } "]" { return RIGHT_SQUARE; } "@prefix" { BEGIN(PREF); return PREFIX; } "@base" { return BASE; } "@" { return AT; } "^^" { return HAT; } "(" { return LEFT_ROUND; } ")" { return RIGHT_ROUND; } "{" { return LEFT_CURLY; } "}" { return RIGHT_CURLY; } ":-" { return COLONMINUS; } "true" { return TRUE_TOKEN; } "false" { return FALSE_TOKEN; } \"([^"\\\n\r]|\\[^\n\r])*\" { turtle_parser_lval->string=turtle_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '"'); /* ' */ if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_string_token failed"); return STRING_LITERAL; } \"\"\" { BEGIN(LITERAL); turtle_parser->sb=raptor_new_stringbuffer(); if(!turtle_parser->sb) TURTLE_LEXER_OOM(); } <LITERAL>\"\"\" { size_t len; BEGIN(INITIAL); len=raptor_stringbuffer_length(turtle_parser->sb); turtle_parser_lval->string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(!turtle_parser_lval->string) TURTLE_LEXER_OOM(); raptor_stringbuffer_copy_to_string(turtle_parser->sb, (unsigned char*)turtle_parser_lval->string, len); turtle_parser_lval->string[len]='\0'; raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb=NULL; return STRING_LITERAL; } <LITERAL>\"|(\\.|[^\"\\]|\n)* { char *p; if (*yytext == EOF) { BEGIN(INITIAL); turtle_syntax_error(rdf_parser, "End of file in middle of literal"); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb=NULL; return EOF; } for(p = yytext; *p; p++) { if(*p == '\n') turtle_parser->lineno++; } if(raptor_stringbuffer_append_turtle_string(turtle_parser->sb, (unsigned char*)yytext, yyleng, '"', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser)) { /* " */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb=NULL; YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } } <LITERAL>\\ { /* this should only happen if \ is at the end of the file so the Turtle doc is illegal anyway */ turtle_syntax_error(rdf_parser, "End of file in middle of literal"); } {BNAME} { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext+2, yyleng-2); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return BLANK_LITERAL; } {QNAME} { turtle_parser_lval->uri=turtle_qname_to_uri(rdf_parser, (unsigned char*)yytext, yyleng); if(!turtle_parser_lval->uri) YY_FATAL_ERROR_EOF("turtle_qname_to_uri failed"); return QNAME_LITERAL; } [-+]?{DECIMAL} { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return DECIMAL_LITERAL; } [-+]?{DOUBLE} { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return FLOATING_LITERAL; } [-+]?[0-9]+ { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return INTEGER_LITERAL; } <PREF>[\ \t\v]+ { /* eat up leading whitespace */ } <PREF>{NCNAME_PREFIX}":" { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); BEGIN(INITIAL); return IDENTIFIER; } <PREF>":" { BEGIN(INITIAL); turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, 0); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return IDENTIFIER; } <PREF>(.|\n) { BEGIN(INITIAL); if (*yytext == EOF) return EOF; turtle_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } {QUOTEDURI} { if(yyleng == 2) turtle_parser_lval->uri=raptor_uri_copy_v2(rdf_parser->world, rdf_parser->base_uri); else { raptor_stringbuffer* sb; unsigned char* uri_string; yytext[yyleng-1]='\0'; sb=raptor_new_stringbuffer(); if(!sb) TURTLE_LEXER_OOM(); if(raptor_stringbuffer_append_turtle_string(sb, (unsigned char*)yytext+1, yyleng-1, '>', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser)) { raptor_free_stringbuffer(sb); YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } uri_string=raptor_stringbuffer_as_string(sb); turtle_parser_lval->uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, rdf_parser->base_uri, uri_string); if(!turtle_parser_lval->uri) { raptor_free_stringbuffer(sb); TURTLE_LEXER_OOM(); } raptor_free_stringbuffer(sb); } return URI_LITERAL; } {LANGUAGETOKEN} { turtle_parser_lval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!turtle_parser_lval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return IDENTIFIER; } \#[^\r\n]*(\r\n|\r|\n) { /* # comment */ turtle_parser->lineno++; } \#[^\r\n]* { /* # comment on the last line with no terminating newline */ } . { if (*yytext == EOF) return EOF; turtle_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } %% /* user code */ int yywrap (yyscan_t yyscanner) { return 1; } static unsigned char * turtle_copy_token(unsigned char *text, size_t len) { unsigned char *s; if(!len) len=strlen((const char*)text); s=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(s) { strncpy((char*)s, (const char*)text, len); s[len] = '\0'; } return s; } static unsigned char * turtle_copy_string_token(raptor_parser* rdf_parser, unsigned char *string, size_t len, int delim) { raptor_stringbuffer* sb=NULL; int rc; if(len) { sb=raptor_new_stringbuffer(); if(!sb) return NULL; rc=raptor_stringbuffer_append_turtle_string(sb, string, len, delim, (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser); if(rc) { raptor_free_stringbuffer(sb); return NULL; } len=raptor_stringbuffer_length(sb); } string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(string) { if(sb) raptor_stringbuffer_copy_to_string(sb, string, len+1); string[len]='\0'; } if(sb) raptor_free_stringbuffer(sb); return string; } void turtle_lexer_syntax_error(void* ctx, const char *message, ...) { raptor_parser* rdf_parser=(raptor_parser *)ctx; raptor_turtle_parser* turtle_parser=(raptor_turtle_parser*)rdf_parser->context; va_list arguments; rdf_parser->locator.line=turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column=turtle_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_error_varargs(((raptor_parser*)rdf_parser), message, arguments); va_end(arguments); } /* * turtle_lexer_fatal_error: * @msg: * @yyscanner: * * INTERNAL - replacement for the generated error handler. */ static void turtle_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner) { raptor_parser *rdf_parser=NULL; if(yyscanner) rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(rdf_parser) /* avoid "format not a string literal and no format arguments" warning with %s */ raptor_parser_fatal_error(rdf_parser, "%s", msg); else { fputs(msg, stderr); fputc('\n', stderr); } } /* Define LEXER_ALLOC_TRACKING to enable allocated memory tracking * - fixes lexer memory leak when ensure_buffer_stack fails */ #ifdef LEXER_ALLOC_TRACKING typedef struct { /* Number of void* slots allocated */ int lexer_allocs_size; /* Allocted void* slots follow in memory after this header */ } lexer_alloc_tracker_header; /* Initial alloc tracker slot array size - 2 seems to be enough for almost all cases */ static const int initial_lexer_allocs_size=2; #endif /* * turtle_lexer_cleanup: * @yyscanner: * * INTERNAL - Clean up unfreed lexer allocs if LEXER_ALLOC_TRACKING is enabled. */ static void turtle_lexer_cleanup(yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; if(!yyscanner) return; rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs=(void**)&tracker[1]; for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]) free(lexer_allocs[i]); lexer_allocs[i]=NULL; } free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data=NULL; #endif } /* * turtle_lexer_alloc: * @size * @yyscanner * * INTERNAL - alloc replacement. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *turtle_lexer_alloc(yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *ptr; /* yyscanner not initialized -> probably initializing yyscanner itself * -> just malloc without tracking */ if(!yyscanner) return malloc(size); rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_alloc: yyscanner extra not initialized"); /* try to allocate tracker if it does not exist */ tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) { /* allocate tracker header + array of void* slots */ tracker=(lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+initial_lexer_allocs_size*sizeof(void*)); if(!tracker) YY_FATAL_ERROR("lexer_alloc: cannot allocate tracker"); tracker->lexer_allocs_size=initial_lexer_allocs_size; rdf_parser->lexer_user_data=(void *)tracker; } lexer_allocs=(void**)&tracker[1]; /* allocate memory */ ptr=malloc(size); /* find a free slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(!lexer_allocs[i]) { lexer_allocs[i]=ptr; break; } } /* no free slots -> grow tracker slot array */ if(i>=tracker->lexer_allocs_size) { int j; void **dest; tracker=(lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+i*2*sizeof(void*)); if(!tracker) { if(ptr) free(ptr); YY_FATAL_ERROR("lexer_alloc: cannot grow tracker"); } tracker->lexer_allocs_size=i*2; /* copy data from old tracker */ dest=(void**)&tracker[1]; for(j=0; j<i; ++j) { dest[j]=lexer_allocs[j]; } /* set new item to first free slot */ dest[j]=ptr; /* free old tracker and replace with new one */ free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data=tracker; } return ptr; #else return malloc(size); #endif } /* * turtle_lexer_realloc: * * INTERNAL - realloc replacement * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *turtle_lexer_realloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *newptr; if(!yyscanner) YY_FATAL_ERROR("lexer_realloc: yyscanner not initialized"); rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_realloc: yyscanner extra not initialized"); tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) YY_FATAL_ERROR("lexer_realloc: no alloc tracker"); lexer_allocs=(void**)&tracker[1]; /* find the old slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]==ptr) break; } /* no old slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_realloc: cell not in tracker"); /* realloc */ newptr=realloc((char*)ptr, size); /* replace entry in tracker */ lexer_allocs[i]=newptr; return newptr; #else return realloc((char*)ptr, size); #endif } /* * turtle_lexer_free: * * INTERNAL - free replacement. * Checks for NULL pointer to be freed unlike the default lexer free function. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void turtle_lexer_free(void *ptr, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; /* do not free NULL */ if(!ptr) return; /* free ptr even if we would encounter an error */ free(ptr); /* yyscanner is allocated with turtle_lexer_alloc() but it's never stored in the tracker * - we need yyscanner to access the tracker */ if(!yyscanner || ptr==yyscanner) return; rdf_parser=(raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs=(void**)&tracker[1]; /* find the slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]==ptr) break; } /* no slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_free: cell not in tracker"); /* remove entry from tracker */ lexer_allocs[i]=NULL; #else if(ptr) free(ptr); #endif } #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval) { static char buffer[2048]; if(!token) return "<<EOF>>"; switch(token) { case PREFIX: return "PREFIX"; case BASE: return "BASE"; case A: return "A"; case DOT: return "DOT"; case COMMA: return "COMMA"; case SEMICOLON: return "SEMICOLON"; case LEFT_SQUARE: return "LEFT_SQUARE"; case RIGHT_SQUARE: return "RIGHT_SQUARE"; case AT: return "AT"; case HAT: return "HAT"; case STRING_LITERAL: sprintf(buffer, "STRING_LITERAL(%s)", lval->string); return buffer; case URI_LITERAL: sprintf(buffer, "URI_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string_v2(world, lval->uri) : "")); return buffer; case BLANK_LITERAL: sprintf(buffer, "BLANK_LITERAL(%s)", lval->string); return buffer; case QNAME_LITERAL: sprintf(buffer, "QNAME_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string_v2(world, lval->uri) : "")); return buffer; case INTEGER_LITERAL: sprintf(buffer, "INTEGER_LITERAL(%d)", lval->integer); return buffer; case FLOATING_LITERAL: sprintf(buffer, "FLOATING_LITERAL(%s)", lval->string); return buffer; case IDENTIFIER: sprintf(buffer, "IDENTIFIER(%s)", (lval->string ? (char*)lval->string : "")); return buffer; case DECIMAL_LITERAL: sprintf(buffer, "DECIMAL_LITERAL(%s)", lval->string); return buffer; case ERROR_TOKEN: return "ERROR"; default: RAPTOR_DEBUG2("UNKNOWN token %d - add a new case\n", token); return "(UNKNOWN)"; } } #endif #ifdef STANDALONE static void turtle_token_free(raptor_world* world, int token, YYSTYPE *lval) { if(!token) return; switch(token) { case STRING_LITERAL: case BLANK_LITERAL: case IDENTIFIER: if(lval->string) RAPTOR_FREE(cstring, lval->string); break; case URI_LITERAL: case QNAME_LITERAL: if(lval->uri) raptor_free_uri_v2(world, lval->uri); break; default: break; } } static void turtle_lexer_discard_error(void* user_data, const char *message, ...) { return; } int main(int argc, char *argv[]) { raptor_parser rdf_parser; raptor_turtle_parser turtle_parser; yyscan_t scanner; int token=EOF; FILE *fh; YYSTYPE lval; const unsigned char *uri_string; const char *filename=NULL; raptor_init(); if(argc > 1) { filename=argv[1]; fh=fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename="<stdin>"; fh = (FILE*)stdin; } memset(&rdf_parser, 0, sizeof(raptor_parser)); memset(&turtle_parser, 0, sizeof(raptor_turtle_parser)); rdf_parser.world = raptor_world_instance(); /* discard namespace errors - caused by not interpreting @prefix * and hence causing failed qname construction */ raptor_namespaces_init_v2(rdf_parser.world, &turtle_parser.namespaces, turtle_lexer_discard_error, NULL, 0); yylex_init(&turtle_parser.scanner); scanner=turtle_parser.scanner; turtle_lexer_set_in(fh, scanner); turtle_lexer_set_extra(&rdf_parser, scanner); /* Initialise enough of the parser and locator to get error messages */ rdf_parser.context=&turtle_parser; turtle_parser.lineno=1; rdf_parser.locator.file=filename; rdf_parser.locator.column= -1; uri_string=raptor_uri_filename_to_uri_string(filename); rdf_parser.base_uri=raptor_new_uri(uri_string); RAPTOR_FREE(cstring, (void*)uri_string); while(1) { memset(&lval, 0, sizeof(YYSTYPE)); if(turtle_lexer_get_text(scanner) != NULL) printf("yyinput '%s'\n", turtle_lexer_get_text(scanner)); token=yylex(&lval, scanner); #ifdef RAPTOR_DEBUG printf("token %s\n", turtle_token_print(raptor_world_instance(), token, &lval)); /* FIXME */ #else printf("token %d\n", token); #endif turtle_token_free(raptor_world_instance(), token, &lval); /* FIXME */ if(!token || token == EOF || token == ERROR_TOKEN) break; } yylex_destroy(scanner); raptor_namespaces_clear(&turtle_parser.namespaces); raptor_free_uri(rdf_parser.base_uri); raptor_finish(); if(token == ERROR_TOKEN) return 1; return 0; } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor-config.in������������������������������������������������������������������0000644�0001750�0001750�00000006121�11227654651�013731� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # # Copyright (C) 2002-2007, David Beckett http://www.dajobe.org/ # Copyright (C) 2002-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # # prefix=@prefix@ exec_prefix=@exec_prefix@ if test "@includedir@" != /usr/include ; then includes="-I@includedir@" else includes= fi usage() { cat<<EOF Usage: raptor-config [OPTION] known values for OPTION are: --prefix[=DIR] change raptor prefix [default $prefix] --libs print library linking information --libtool-libs print linking information for use with libtool --private-libs print library private/static linking information --cflags print pre-processor and compiler flags --options print raptor library compiled options --help display this help and exit --version output version information --version-decimal output version as a decimal integer EOF exit $1 } if test $# -eq 0; then usage 1 1>&2 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg ;; --prefix) echo_prefix=yes ;; --version) echo @VERSION@ exit 0 ;; --version-decimal) echo @RAPTOR_VERSION_DECIMAL@ exit 0 ;; --cflags) echo_cflags=yes ;; --options) echo_options=yes ;; --libs) echo_libs=yes ;; --libtool-libs) echo_libtool_libs=yes ;; --private-libs) echo_private_libs=yes ;; --help|--usage) usage 0 ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_prefix" = "yes"; then echo $prefix fi if test "$echo_cflags" = "yes"; then echo $includes fi if test "$echo_options" = "yes"; then if test @RAPTOR_WWW_LIBRARY@ != none; then echo "www-library: @RAPTOR_WWW_LIBRARY@" fi if test @RAPTOR_XML_PARSER@ != none; then echo "xml-parser: @RAPTOR_XML_PARSER@" fi for parser in @RAPTOR_PARSERS@ none; do if test $parser != none; then echo "parser: $parser" fi done for serializer in @RAPTOR_SERIALIZERS@ none; do if test $serializer != none; then echo "serializer: $serializer" fi done fi if test "$echo_libs" = "yes"; then echo -L@libdir@ -lraptor fi if test "$echo_libtool_libs" = "yes"; then echo @libdir@/@RAPTOR_LIBTOOLLIBS@ fi if test "$echo_private_libs" = "yes"; then echo @LIBS@ fi �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_turtle_writer.c������������������������������������������������������������0000644�0001750�0001750�00000076264�11330672502�015302� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_turtle_writer.c - Raptor Turtle Writer * * Copyright (C) 2006, Dave Robillard * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_LIMITS_H #include <limits.h> #endif #include <math.h> /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE typedef enum { TURTLE_WRITER_AUTO_INDENT = 1, } raptor_turtle_writer_flags; #define TURTLE_WRITER_AUTO_INDENT(turtle_writer) ((turtle_writer->flags & TURTLE_WRITER_AUTO_INDENT) != 0) struct raptor_turtle_writer_s { raptor_world* world; int depth; raptor_uri* base_uri; int my_nstack; raptor_namespace_stack *nstack; int nstack_depth; raptor_simple_message_handler error_handler; void *error_data; /* outputting to this iostream */ raptor_iostream *iostr; /* Turtle Writer flags - bits defined in enum raptor_turtle_writer_flags */ int flags; /* indentation per level if formatting */ int indent; raptor_uri* xsd_boolean_uri; raptor_uri* xsd_decimal_uri; raptor_uri* xsd_double_uri; raptor_uri* xsd_integer_uri; }; /* 16 spaces */ #define SPACES_BUFFER_SIZE sizeof(spaces_buffer) static const unsigned char spaces_buffer[] = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' }; void raptor_turtle_writer_increase_indent(raptor_turtle_writer *turtle_writer) { turtle_writer->depth += turtle_writer->indent; } void raptor_turtle_writer_decrease_indent(raptor_turtle_writer *turtle_writer) { turtle_writer->depth -= turtle_writer->indent; } void raptor_turtle_writer_newline(raptor_turtle_writer *turtle_writer) { int num_spaces; raptor_iostream_write_byte(turtle_writer->iostr, '\n'); if(!TURTLE_WRITER_AUTO_INDENT(turtle_writer)) return; num_spaces = turtle_writer->depth * turtle_writer->indent; while(num_spaces > 0) { int count; count = (num_spaces > (int)SPACES_BUFFER_SIZE) ? (int)SPACES_BUFFER_SIZE : num_spaces; raptor_iostream_write_counted_string(turtle_writer->iostr, spaces_buffer, count); num_spaces -= count; } return; } /** * raptor_new_turtle_writer: * @world: raptor_world object * @base_uri: Base URI for the writer * @write_base_uri: non-0 to write '@base' directive to output * @nstack: Namespace stack for the writer to start with (or NULL) * @iostr: I/O stream to write to * @error_handler: error handler function * @error_data: error handler data * * Constructor - Create a new Turtle Writer writing Turtle to a raptor_iostream * * Return value: a new #raptor_turtle_writer object or NULL on failure **/ raptor_turtle_writer* raptor_new_turtle_writer(raptor_world* world, raptor_uri* base_uri, int write_base_uri, raptor_namespace_stack *nstack, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data) { raptor_turtle_writer* turtle_writer=(raptor_turtle_writer*)RAPTOR_CALLOC(raptor_turtle_writer, 1, sizeof(raptor_turtle_writer)+1); if(!turtle_writer) return NULL; turtle_writer->world=world; turtle_writer->nstack_depth=0; turtle_writer->error_handler=error_handler; turtle_writer->error_data=error_data; turtle_writer->nstack=nstack; if(!turtle_writer->nstack) { turtle_writer->nstack=nstack=raptor_new_namespaces_v2(world, error_handler, error_data, 1); turtle_writer->my_nstack=1; } turtle_writer->iostr=iostr; turtle_writer->flags = 0; turtle_writer->indent = 2; turtle_writer->base_uri = NULL; /* Ensure any initial base URI is not written relative */ if(base_uri && write_base_uri) raptor_turtle_writer_base(turtle_writer, base_uri); turtle_writer->base_uri = base_uri; turtle_writer->xsd_boolean_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#boolean"); turtle_writer->xsd_decimal_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#decimal"); turtle_writer->xsd_double_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#double"); turtle_writer->xsd_integer_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#integer"); return turtle_writer; } /** * raptor_free_turtle_writer: * @turtle_writer: Turtle writer object * * Destructor - Free Turtle Writer * **/ void raptor_free_turtle_writer(raptor_turtle_writer* turtle_writer) { if(turtle_writer->nstack && turtle_writer->my_nstack) raptor_free_namespaces(turtle_writer->nstack); if(turtle_writer->xsd_boolean_uri) raptor_free_uri_v2(turtle_writer->world, turtle_writer->xsd_boolean_uri); if(turtle_writer->xsd_decimal_uri) raptor_free_uri_v2(turtle_writer->world, turtle_writer->xsd_decimal_uri); if(turtle_writer->xsd_double_uri) raptor_free_uri_v2(turtle_writer->world, turtle_writer->xsd_double_uri); if(turtle_writer->xsd_integer_uri) raptor_free_uri_v2(turtle_writer->world, turtle_writer->xsd_integer_uri); RAPTOR_FREE(raptor_turtle_writer, turtle_writer); } static int raptor_turtle_writer_contains_newline(const unsigned char *s) { size_t i=0; for( ; i < strlen((char*)s); i++) if(s[i] == '\n') return 1; return 0; } /** * raptor_turtle_writer_raw: * @turtle_writer: Turtle writer object * @s: raw string to write * * Write a raw string to the Turtle writer verbatim. * **/ void raptor_turtle_writer_raw(raptor_turtle_writer* turtle_writer, const unsigned char *s) { raptor_iostream_write_string(turtle_writer->iostr, s); } /** * raptor_turtle_writer_raw_counted: * @turtle_writer: Turtle writer object * @s: raw string to write * @len: length of string * * Write a counted string to the Turtle writer verbatim. * **/ void raptor_turtle_writer_raw_counted(raptor_turtle_writer* turtle_writer, const unsigned char *s, unsigned int len) { raptor_iostream_write_counted_string(turtle_writer->iostr, s, len); } /** * raptor_turtle_writer_namespace_prefix: * @turtle_writer: Turtle writer object * @ns: Namespace to write prefix declaration for * * Write a namespace prefix declaration (@prefix) * * Must only be used at the beginning of a document. */ void raptor_turtle_writer_namespace_prefix(raptor_turtle_writer* turtle_writer, raptor_namespace* ns) { raptor_iostream_write_string(turtle_writer->iostr, "@prefix "); if(ns->prefix) raptor_iostream_write_string(turtle_writer->iostr, raptor_namespace_get_prefix(ns)); raptor_iostream_write_counted_string(turtle_writer->iostr, ": ", 2); raptor_turtle_writer_reference(turtle_writer, raptor_namespace_get_uri(ns)); raptor_iostream_write_counted_string(turtle_writer->iostr, " .\n", 3); } /** * raptor_turtle_writer_base: * @turtle_writer: Turtle writer object * @base_uri: New base URI or NULL * * Write a base URI directive (@base) to set the in-scope base URI */ void raptor_turtle_writer_base(raptor_turtle_writer* turtle_writer, raptor_uri* base_uri) { if(base_uri) { raptor_iostream_write_counted_string(turtle_writer->iostr, "@base ", 6); raptor_turtle_writer_reference(turtle_writer, base_uri); raptor_iostream_write_counted_string(turtle_writer->iostr, " .\n", 3); } } /** * raptor_turtle_writer_reference: * @turtle_writer: Turtle writer object * @uri: URI to write * * Write a URI to the Turtle writer. * **/ void raptor_turtle_writer_reference(raptor_turtle_writer* turtle_writer, raptor_uri* uri) { unsigned char* uri_str; size_t length; uri_str = raptor_uri_to_relative_counted_uri_string_v2(turtle_writer->world, turtle_writer->base_uri, uri, &length); raptor_iostream_write_byte(turtle_writer->iostr, '<'); if(uri_str) raptor_iostream_write_string_ntriples(turtle_writer->iostr, uri_str, length, '>'); raptor_iostream_write_byte(turtle_writer->iostr, '>'); RAPTOR_FREE(cstring, uri_str); } /** * raptor_turtle_writer_qname: * @turtle_writer: Turtle writer object * @qname: qname to write * * Write a QName to the Turtle writer. * **/ void raptor_turtle_writer_qname(raptor_turtle_writer* turtle_writer, raptor_qname* qname) { raptor_iostream* iostr=turtle_writer->iostr; if(qname->nspace && qname->nspace->prefix_length > 0) raptor_iostream_write_counted_string(iostr, qname->nspace->prefix, qname->nspace->prefix_length); raptor_iostream_write_byte(iostr, ':'); raptor_iostream_write_counted_string(iostr, qname->local_name, qname->local_name_length); return; } /** * raptor_iostream_write_string_python: * @iostr: #raptor_iostream to write to * @string: UTF-8 string to write * @len: length of UTF-8 string * @delim: Terminating delimiter character for string (such as " or >) * or \0 for no escaping. * @flags: flags 0=N-Triples mode, 1=Turtle (allow raw UTF-8), 2=Turtle long string (allow raw UTF-8), 3=JSON * * Write a UTF-8 string using Python-style escapes (N-Triples, Turtle, JSON) to an iostream. * * Return value: non-0 on failure such as bad UTF-8 encoding. **/ int raptor_iostream_write_string_python(raptor_iostream *iostr, const unsigned char *string, size_t len, const char delim, int flags) { unsigned char c; int unichar_len; raptor_unichar unichar; if(flags < 0 || flags > 3) return 1; for(; (c=*string); string++, len--) { if((delim && c == delim && (delim=='\'' || delim == '"')) || c == '\\') { raptor_iostream_write_byte(iostr, '\\'); raptor_iostream_write_byte(iostr, c); continue; } if(delim && c == delim) { raptor_iostream_write_counted_string(iostr, "\\u", 2); raptor_iostream_format_hexadecimal(iostr, c, 4); continue; } if(flags != 2) { /* N-Triples, Turtle or JSON */ /* Note: NTriples is ASCII */ if(c == 0x09) { raptor_iostream_write_counted_string(iostr, "\\t", 2); continue; } else if((flags == 3) && c == 0x08) { /* JSON has \b for backspace */ raptor_iostream_write_counted_string(iostr, "\\b", 2); continue; } else if(c == 0x0a) { raptor_iostream_write_counted_string(iostr, "\\n", 2); continue; } else if((flags == 3) && c == 0x0b) { /* JSON has \f for formfeed */ raptor_iostream_write_counted_string(iostr, "\\f", 2); continue; } else if(c == 0x0d) { raptor_iostream_write_counted_string(iostr, "\\r", 2); continue; } else if(c < 0x20|| c == 0x7f) { raptor_iostream_write_counted_string(iostr, "\\u", 2); raptor_iostream_format_hexadecimal(iostr, c, 4); continue; } else if(c < 0x80) { raptor_iostream_write_byte(iostr, c); continue; } } else if(c < 0x80) { /* Turtle long string has no escapes except delim */ raptor_iostream_write_byte(iostr, c); continue; } /* It is unicode */ unichar_len=raptor_utf8_to_unicode_char(NULL, string, len); if(unichar_len < 0 || unichar_len > (int)len) /* UTF-8 encoding had an error or ended in the middle of a string */ return 1; if(flags >= 1 && flags <= 3) { /* Turtle and JSON are UTF-8 - no need to escape */ raptor_iostream_write_counted_string(iostr, string, unichar_len); } else { unichar_len=raptor_utf8_to_unicode_char(&unichar, string, len); if(unichar < 0x10000) { raptor_iostream_write_counted_string(iostr, "\\u", 2); raptor_iostream_format_hexadecimal(iostr, unichar, 4); } else { raptor_iostream_write_counted_string(iostr, "\\U", 2); raptor_iostream_format_hexadecimal(iostr, unichar, 8); } } unichar_len--; /* since loop does len-- */ string += unichar_len; len -= unichar_len; } return 0; } #ifndef RAPTOR_DISABLE_DEPRECATED /** * raptor_iostream_write_string_turtle: * @iostr: #raptor_iostream to write to * @string: UTF-8 string to write * @len: length of UTF-8 string * * Write an UTF-8 string using Turtle "longString" triple quoting to * an iostream. * * @deprecated: use raptor_iostream_write_string_python() instead **/ void raptor_iostream_write_string_turtle(raptor_iostream *iostr, const unsigned char *string, size_t len) { raptor_iostream_write_string_python(iostr, string, len, '"', 1); } #endif /** * raptor_turtle_writer_quoted_counted_string: * @turtle_writer: Turtle writer object * @s: string to write * @len: string length * * Write a Turtle escaped-string inside double quotes to the writer. * * Return value: non-0 on failure **/ int raptor_turtle_writer_quoted_counted_string(raptor_turtle_writer* turtle_writer, const unsigned char *s, size_t len) { const unsigned char *quotes=(const unsigned char *)"\"\"\"\""; const unsigned char *q; size_t q_len; int flags; if(!s) return 1; /* Turtle """longstring""" (2) or "string" (1) */ flags=raptor_turtle_writer_contains_newline(s) ? 2 : 1; q=(flags == 2) ? quotes : quotes+2; q_len=(q == quotes) ? 3 : 1; raptor_iostream_write_counted_string(turtle_writer->iostr, q, q_len); raptor_iostream_write_string_python(turtle_writer->iostr, s, strlen((const char*)s), '"', flags); raptor_iostream_write_counted_string(turtle_writer->iostr, q, q_len); return 0; } /** * raptor_turtle_writer_literal: * @turtle_writer: Turtle writer object * @nstack: Namespace stack for making a QName for datatype URI * @s: literal string to write (SHARED) * @lang: language tag (may be NULL) * @datatype: datatype URI (may be NULL) * * Write a literal (possibly with lang and datatype) to the Turtle writer. * * Return value: non-0 on failure **/ int raptor_turtle_writer_literal(raptor_turtle_writer* turtle_writer, raptor_namespace_stack *nstack, const unsigned char* s, const unsigned char* lang, raptor_uri* datatype) { /* DBL_MAX = 309 decimal digits */ #define INT_MAX_LEN 309 /* DBL_EPSILON = 52 digits */ #define FRAC_MAX_LEN 52 char* endptr = (char *)s; int written = 0; /* typed literal special cases */ if(datatype) { /* integer */ if(raptor_uri_equals_v2(turtle_writer->world, datatype, turtle_writer->xsd_integer_uri)) { /* FIXME. Work around that gcc < 4.5 cannot disable warn_unused_result */ long gcc_is_stupid = strtol((const char*)s, &endptr, 10); if(endptr != (char*)s && !*endptr) { raptor_iostream_write_string(turtle_writer->iostr, s); /* More gcc madness to 'use' the variable I didn't want */ written = 1 + 0 * (int)gcc_is_stupid; } else { turtle_writer->error_handler(turtle_writer->error_data, "Illegal value for xsd:integer literal."); } /* double, decimal */ } else if(raptor_uri_equals_v2(turtle_writer->world, datatype, turtle_writer->xsd_double_uri) || raptor_uri_equals_v2(turtle_writer->world, datatype, turtle_writer->xsd_decimal_uri)) { /* FIXME. Work around that gcc < 4.5 cannot disable warn_unused_result */ double gcc_is_doubly_stupid = strtod((const char*)s, &endptr); if(endptr != (char*)s && !*endptr) { raptor_iostream_write_string(turtle_writer->iostr, s); /* More gcc madness to 'use' the variable I didn't want */ written = 1 + 0 * (int)gcc_is_doubly_stupid; } else { turtle_writer->error_handler(turtle_writer->error_data, "Illegal value for xsd:double or xsd:decimal literal."); } /* boolean */ } else if(raptor_uri_equals_v2(turtle_writer->world, datatype, turtle_writer->xsd_boolean_uri)) { if(!strcmp((const char*)s, "0") || !strcmp((const char*)s, "false")) { raptor_iostream_write_string(turtle_writer->iostr, "false"); written = 1; } else if(!strcmp((const char*)s, "1") || !strcmp((const char*)s, "true")) { raptor_iostream_write_string(turtle_writer->iostr, "true"); written = 1; } else { turtle_writer->error_handler(turtle_writer->error_data, "Illegal value for xsd:boolean literal."); } } } if(written) return 0; if(raptor_turtle_writer_quoted_counted_string(turtle_writer, s, strlen((const char*)s))) return 1; /* typed literal, not a special case */ if(datatype) { raptor_qname* qname; raptor_iostream_write_string(turtle_writer->iostr, "^^"); qname = raptor_namespaces_qname_from_uri(nstack, datatype, 10); if(qname) { raptor_turtle_writer_qname(turtle_writer, qname); raptor_free_qname(qname); } else raptor_turtle_writer_reference(turtle_writer, datatype); } else if(lang) { /* literal with language tag */ raptor_iostream_write_byte(turtle_writer->iostr, '@'); raptor_iostream_write_string(turtle_writer->iostr, lang); } return 0; } /** * raptor_turtle_writer_comment: * @turtle_writer: Turtle writer object * @s: comment string to write * * Write a Turtle comment to the Turtle writer. * **/ void raptor_turtle_writer_comment(raptor_turtle_writer* turtle_writer, const unsigned char *string) { unsigned char c; size_t len = strlen((const char*)string); raptor_iostream_write_counted_string(turtle_writer->iostr, (const unsigned char*)"# ", 2); for(; (c=*string); string++, len--) { if(c == '\n') { raptor_turtle_writer_newline(turtle_writer); raptor_iostream_write_counted_string(turtle_writer->iostr, (const unsigned char*)"# ", 2); } else if(c != '\r') { /* skip carriage returns (windows... *sigh*) */ raptor_iostream_write_byte(turtle_writer->iostr, c); } } raptor_turtle_writer_newline(turtle_writer); } /** * raptor_turtle_writer_features_enumerate: * @world: raptor_world object * @feature: feature enumeration (0+) * @name: pointer to store feature short name (or NULL) * @uri: pointer to store feature URI (or NULL) * @label: pointer to feature label (or NULL) * * Get list of turtle_writer features. * * If uri is not NULL, a pointer to a new raptor_uri is returned * that must be freed by the caller with raptor_free_uri_v2(). * * Return value: 0 on success, <0 on failure, >0 if feature is unknown **/ int raptor_turtle_writer_features_enumerate(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label) { return raptor_features_enumerate_common(world, feature, name, uri, label, 8); } /** * raptor_turtle_writer_set_feature: * @turtle_writer: #raptor_turtle_writer turtle_writer object * @feature: feature to set from enumerated #raptor_feature values * @value: integer feature value (0 or larger) * * Set turtle_writer features with integer values. * * The allowed features are available via raptor_features_enumerate(). * * Return value: non 0 on failure or if the feature is unknown **/ int raptor_turtle_writer_set_feature(raptor_turtle_writer *turtle_writer, raptor_feature feature, int value) { if(value < 0) return -1; switch(feature) { case RAPTOR_FEATURE_WRITER_AUTO_INDENT: if(value) turtle_writer->flags |= TURTLE_WRITER_AUTO_INDENT; else turtle_writer->flags &= ~TURTLE_WRITER_AUTO_INDENT; break; case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: turtle_writer->indent = value; break; case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: case RAPTOR_FEATURE_WRITER_XML_VERSION: case RAPTOR_FEATURE_WRITER_XML_DECLARATION: break; /* parser features */ case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ASSUME_IS_RDF: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: /* Shared */ case RAPTOR_FEATURE_NO_NET: /* XML writer features */ case RAPTOR_FEATURE_RELATIVE_URIS: case RAPTOR_FEATURE_START_URI: /* DOT serializer features */ case RAPTOR_FEATURE_RESOURCE_BORDER: case RAPTOR_FEATURE_LITERAL_BORDER: case RAPTOR_FEATURE_BNODE_BORDER: case RAPTOR_FEATURE_RESOURCE_FILL: case RAPTOR_FEATURE_LITERAL_FILL: case RAPTOR_FEATURE_BNODE_FILL: /* JSON serializer features */ case RAPTOR_FEATURE_JSON_CALLBACK: case RAPTOR_FEATURE_JSON_EXTRA_DATA: case RAPTOR_FEATURE_RSS_TRIPLES: case RAPTOR_FEATURE_ATOM_ENTRY_URI: case RAPTOR_FEATURE_PREFIX_ELEMENTS: /* Turtle serializer feature */ case RAPTOR_FEATURE_WRITE_BASE_URI: /* WWW feature */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: return -1; break; } return 0; } /** * raptor_turtle_writer_set_feature_string: * @turtle_writer: #raptor_turtle_writer turtle_writer object * @feature: feature to set from enumerated #raptor_feature values * @value: feature value * * Set turtle_writer features with string values. * * The allowed features are available via raptor_turtle_writer_features_enumerate(). * If the feature type is integer, the value is interpreted as an integer. * * Return value: non 0 on failure or if the feature is unknown **/ int raptor_turtle_writer_set_feature_string(raptor_turtle_writer *turtle_writer, raptor_feature feature, const unsigned char *value) { int value_is_string=(raptor_feature_value_type(feature) == 1); if(!value_is_string) return raptor_turtle_writer_set_feature(turtle_writer, feature, atoi((const char*)value)); else return -1; } /** * raptor_turtle_writer_get_feature: * @turtle_writer: #raptor_turtle_writer serializer object * @feature: feature to get value * * Get various turtle_writer features. * * The allowed features are available via raptor_features_enumerate(). * * Note: no feature value is negative * * Return value: feature value or < 0 for an illegal feature **/ int raptor_turtle_writer_get_feature(raptor_turtle_writer *turtle_writer, raptor_feature feature) { int result= -1; switch(feature) { case RAPTOR_FEATURE_WRITER_AUTO_INDENT: result=TURTLE_WRITER_AUTO_INDENT(turtle_writer); break; case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: result=turtle_writer->indent; break; /* writer features */ case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: case RAPTOR_FEATURE_WRITER_XML_VERSION: case RAPTOR_FEATURE_WRITER_XML_DECLARATION: /* parser features */ case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ASSUME_IS_RDF: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: /* Shared */ case RAPTOR_FEATURE_NO_NET: /* XML writer features */ case RAPTOR_FEATURE_RELATIVE_URIS: case RAPTOR_FEATURE_START_URI: /* DOT serializer features */ case RAPTOR_FEATURE_RESOURCE_BORDER: case RAPTOR_FEATURE_LITERAL_BORDER: case RAPTOR_FEATURE_BNODE_BORDER: case RAPTOR_FEATURE_RESOURCE_FILL: case RAPTOR_FEATURE_LITERAL_FILL: case RAPTOR_FEATURE_BNODE_FILL: /* JSON serializer features */ case RAPTOR_FEATURE_JSON_CALLBACK: case RAPTOR_FEATURE_JSON_EXTRA_DATA: case RAPTOR_FEATURE_RSS_TRIPLES: case RAPTOR_FEATURE_ATOM_ENTRY_URI: case RAPTOR_FEATURE_PREFIX_ELEMENTS: /* Turtle serializer feature */ case RAPTOR_FEATURE_WRITE_BASE_URI: /* WWW feature */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: break; } return result; } /** * raptor_turtle_writer_get_feature_string: * @turtle_writer: #raptor_turtle_writer serializer object * @feature: feature to get value * * Get turtle_writer features with string values. * * The allowed features are available via raptor_features_enumerate(). * * Return value: feature value or NULL for an illegal feature or no value **/ const unsigned char * raptor_turtle_writer_get_feature_string(raptor_turtle_writer *turtle_writer, raptor_feature feature) { return NULL; } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); const unsigned char *base_uri_string=(const unsigned char*)"http://example.org/base#"; const unsigned char* longstr=(const unsigned char*)"it's quoted\nand has newlines, \"s <> and\n\ttabbing"; #define OUT_BYTES_COUNT 149 int main(int argc, char *argv[]) { raptor_world *world; const char *program=raptor_basename(argv[0]); raptor_iostream *iostr; raptor_namespace_stack *nstack; raptor_namespace* ex_ns; raptor_turtle_writer* turtle_writer; raptor_uri* base_uri; raptor_qname* el_name; unsigned long count; raptor_uri* datatype; /* for raptor_new_iostream_to_string */ void *string=NULL; size_t string_len=0; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); iostr=raptor_new_iostream_to_string(&string, &string_len, NULL); if(!iostr) { fprintf(stderr, "%s: Failed to create iostream to string\n", program); exit(1); } nstack=raptor_new_namespaces_v2(world, NULL, NULL, /* errors */ 1); base_uri=raptor_new_uri_v2(world, base_uri_string); turtle_writer=raptor_new_turtle_writer(world, base_uri, 1, nstack, iostr, NULL, NULL /* errors */ ); if(!turtle_writer) { fprintf(stderr, "%s: Failed to create turtle_writer to iostream\n", program); exit(1); } raptor_turtle_writer_set_feature(turtle_writer, RAPTOR_FEATURE_WRITER_AUTO_INDENT, 1); ex_ns=raptor_new_namespace(nstack, (const unsigned char*)"ex", (const unsigned char*)"http://example.org/ns#", 0); raptor_turtle_writer_namespace_prefix(turtle_writer, ex_ns); raptor_turtle_writer_reference(turtle_writer, base_uri); raptor_turtle_writer_increase_indent(turtle_writer); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)"ex:foo "); raptor_turtle_writer_quoted_counted_string(turtle_writer, longstr, strlen((const char*)longstr)); raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)" ;", 2); raptor_turtle_writer_newline(turtle_writer); el_name=raptor_new_qname_from_namespace_local_name_v2(world, ex_ns, (const unsigned char*)"bar", NULL); raptor_turtle_writer_qname(turtle_writer, el_name); raptor_free_qname(el_name); raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)" ", 1); datatype=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#decimal"); raptor_turtle_writer_literal(turtle_writer, nstack, (const unsigned char*)"10.0", NULL, datatype); raptor_free_uri_v2(world, datatype); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_decrease_indent(turtle_writer); raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)".", 1); raptor_turtle_writer_newline(turtle_writer); raptor_free_turtle_writer(turtle_writer); raptor_free_namespace(ex_ns); raptor_free_namespaces(nstack); raptor_free_uri_v2(world, base_uri); count=raptor_iostream_tell(iostr); #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing iostream\n", program); #endif raptor_free_iostream(iostr); if(count != OUT_BYTES_COUNT) { fprintf(stderr, "%s: I/O stream wrote %d bytes, expected %d\n", program, (int)count, (int)OUT_BYTES_COUNT); fputs("[[", stderr); (void)fwrite(string, 1, string_len, stderr); fputs("]]\n", stderr); return 1; } if(!string) { fprintf(stderr, "%s: I/O stream failed to create a string\n", program); return 1; } string_len=strlen((const char*)string); if(string_len != count) { fprintf(stderr, "%s: I/O stream created a string length %d, expected %d\n", program, (int)string_len, (int)count); return 1; } #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Made Turtle string of %d bytes\n", program, (int)string_len); fputs("[[", stderr); (void)fwrite(string, 1, string_len, stderr); fputs("]]\n", stderr); #endif raptor_free_memory(string); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_serialize_simple.c���������������������������������������������������������0000644�0001750�0001750�00000012710�11330672502�015711� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_simple.c - Simple serializer * * Copyright (C) 2004-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * Raptor 'Simple' serializer object */ typedef struct { int dummy; } raptor_simple_serializer_context; /* create a new serializer */ static int raptor_simple_serialize_init(raptor_serializer* serializer, const char *name) { return 0; } /* destroy a serializer */ static void raptor_simple_serialize_terminate(raptor_serializer* serializer) { } /* serialize a statement */ static int raptor_simple_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement) { raptor_iostream *iostr=serializer->iostream; /* was: fprintf(stdout, "%s: Statement: ", program); */ raptor_iostream_write_string(iostr, "Statement: "); /* from raptor_print_statement */ raptor_iostream_write_byte(iostr, '['); if(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { raptor_iostream_write_string(iostr, statement->subject); } else { #ifdef RAPTOR_DEBUG if(!statement->subject) RAPTOR_FATAL1("Statement has NULL subject URI\n"); #endif raptor_iostream_write_uri_v2(serializer->world, iostr, (raptor_uri*)statement->subject); } raptor_iostream_write_counted_string(iostr, ", ", 2); if(statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { raptor_iostream_write_counted_string(iostr, "[rdf:_", 6); raptor_iostream_write_decimal(iostr, *((int*)statement->predicate)); raptor_iostream_write_byte(iostr, ']'); } else { #ifdef RAPTOR_DEBUG if(!statement->predicate) RAPTOR_FATAL1("Statement has NULL predicate URI\n"); #endif raptor_iostream_write_uri_v2(serializer->world, iostr, (raptor_uri*)statement->predicate); } raptor_iostream_write_counted_string(iostr, ", ", 2); if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL || statement->object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { raptor_iostream_write_byte(iostr, '<'); raptor_iostream_write_string(iostr, raptor_xml_literal_datatype_uri_string); raptor_iostream_write_byte(iostr, '>'); } else if(statement->object_literal_datatype) { raptor_iostream_write_byte(iostr, '<'); raptor_iostream_write_uri_v2(serializer->world, iostr, (raptor_uri*)statement->object_literal_datatype); raptor_iostream_write_byte(iostr, '>'); } raptor_iostream_write_byte(iostr, '"'); raptor_iostream_write_string(iostr, statement->object); raptor_iostream_write_byte(iostr, '"'); } else if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) raptor_iostream_write_string(iostr, statement->object); else if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { raptor_iostream_write_counted_string(iostr, "[rdf:_", 6); raptor_iostream_write_decimal(iostr, *((int*)statement->object)); raptor_iostream_write_byte(iostr, ']'); } else { #ifdef RAPTOR_DEBUG if(!statement->object) RAPTOR_FATAL1("Statement has NULL object URI\n"); #endif raptor_iostream_write_uri_v2(serializer->world, iostr, (raptor_uri*)statement->object); } raptor_iostream_write_counted_string(iostr, "]\n", 2); return 0; } /* finish the serializer factory */ static void raptor_simple_serialize_finish_factory(raptor_serializer_factory* factory) { } static int raptor_simple_serializer_register_factory(raptor_serializer_factory *factory) { factory->context_length = sizeof(raptor_simple_serializer_context); factory->init = raptor_simple_serialize_init; factory->terminate = raptor_simple_serialize_terminate; factory->declare_namespace = NULL; factory->serialize_start = NULL; factory->serialize_statement = raptor_simple_serialize_statement; factory->serialize_end = NULL; factory->finish_factory = raptor_simple_serialize_finish_factory; return 0; } int raptor_init_serializer_simple(raptor_world* world) { return raptor_serializer_register_factory(world, "simple", "A simple format", NULL, NULL, NULL, &raptor_simple_serializer_register_factory); } ��������������������������������������������������������raptor-1.4.21/src/raptor_serialize_rdfxmla.c��������������������������������������������������������0000644�0001750�0001750�00000154631�11330672502�016066� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_rdfxmla.c - RDF/XML with abbreviations serializer * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * Copyright (C) 2005, Steve Shepard steveshep@gmail.com * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * FIXME Duplicate code * * Parts of this is taken from redland librdf_node.h and librdf_node.c */ /* * Raptor rdfxml-abbrev serializer object */ typedef struct { raptor_namespace_stack *nstack; /* Namespace stack */ raptor_namespace *xml_nspace; /* the xml: namespace */ raptor_namespace *rdf_nspace; /* the rdf: namespace */ raptor_xml_element* rdf_RDF_element; /* the rdf:RDF element */ raptor_xml_writer *xml_writer; /* where the xml is being written */ raptor_sequence *namespaces; /* User declared namespaces */ raptor_avltree *subjects; /* subject items */ raptor_avltree *blanks; /* blank subject items */ raptor_avltree *nodes; /* nodes */ raptor_abbrev_node *rdf_type; /* rdf:type uri */ /* URI of rdf:XMLLiteral */ raptor_uri* rdf_xml_literal_uri; /* non-zero if is Adobe XMP abbreviated form */ int is_xmp; /* non zero if rdf:RDF has been written (and thus no new namespaces * can be declared). */ int written_header; /* for labeling namespaces */ int namespace_count; /* xml_writer was passed in and not owned by us */ int external_xml_writer; /* true if should write rdf:RDF */ int write_rdf_RDF; /* starting namespace stack depth */ int starting_depth; /* namespaces stack was passed in andn not owned by us */ int external_nstack; /* If not NULL, the URI of the single node to serialize - starting * from property elements */ raptor_uri* single_node; /* If non-0, emit typed nodes */ int write_typed_nodes; } raptor_rdfxmla_context; /* prototypes for functions */ static int raptor_rdfxmla_emit_resource(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node *node, int depth); static int raptor_rdfxmla_emit_literal(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node *node, int depth); static int raptor_rdfxmla_emit_xml_literal(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth); static int raptor_rdfxmla_emit_blank(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth); static int raptor_rdfxmla_emit_subject_list_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth); static int raptor_rdfxmla_emit_subject_properties(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth); static int raptor_rdfxmla_emit_subject(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth); static int raptor_rdfxmla_emit(raptor_serializer *serializer); static int raptor_rdfxmla_serialize_init(raptor_serializer* serializer, const char *name); static void raptor_rdfxmla_serialize_terminate(raptor_serializer* serializer); static int raptor_rdfxmla_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix); static int raptor_rdfxmla_serialize_start(raptor_serializer* serializer); static int raptor_rdfxmla_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement); static int raptor_rdfxmla_serialize_end(raptor_serializer* serializer); static void raptor_rdfxmla_serialize_finish_factory(raptor_serializer_factory* factory); /* helper functions */ /* * raptor_rdfxmla_emit_resource_uri: * @serializer: #raptor_serializer object * @element: XML Element * @uri: URI object * @depth: depth into tree * * Emit a description of a resource using an XML Element * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_resource_uri(raptor_serializer *serializer, raptor_xml_element *element, raptor_uri* uri, int depth) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; raptor_xml_writer *xml_writer = context->xml_writer; raptor_qname **attrs; unsigned char *attr_name; unsigned char *attr_value; RAPTOR_DEBUG2("Emitting resource predicate URI %s\n", raptor_uri_as_string_v2(serializer->world, uri)); attrs = (raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname *)); if(!attrs) return 1; attr_name = (unsigned char *)"resource"; if(serializer->feature_relative_uris) /* newly allocated string */ attr_value = raptor_uri_to_relative_uri_string_v2(serializer->world, serializer->base_uri, uri); else attr_value = raptor_uri_as_string_v2(serializer->world, uri); attrs[0] = raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, attr_name, attr_value); if(serializer->feature_relative_uris) RAPTOR_FREE(cstring, attr_value); if(!attrs[0]) { RAPTOR_FREE(qnamearray, attrs); return 1; } raptor_xml_element_set_attributes(element, attrs, 1); raptor_xml_writer_start_element(xml_writer, element); raptor_xml_writer_end_element(context->xml_writer, element); RAPTOR_DEBUG2("Emitted resource predicate URI %s\n", raptor_uri_as_string_v2(serializer->world, uri)); return 0; } /* * raptor_rdfxmla_emit_resource: * @serializer: #raptor_serializer object * @element: XML Element * @node: resource node * @depth: depth into tree * * Emit a description of a resource using an XML Element * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_resource(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth) { int rc; RAPTOR_DEBUG5("Emitting resource node %p refcount %d subject %d object %d\n", node, node->ref_count, node->count_as_subject, node->count_as_object); if(node->type != RAPTOR_IDENTIFIER_TYPE_RESOURCE) return 1; rc = raptor_rdfxmla_emit_resource_uri(serializer, element, node->value.resource.uri, depth); RAPTOR_DEBUG2("Emitted resource node %p\n", node); return rc; } /* * raptor_rdfxmla_emit_literal: * @serializer: #raptor_serializer object * @element: XML Element * @node: literal node * @depth: depth into tree * * Emit a description of a literal using an XML Element * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_literal(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; raptor_xml_writer *xml_writer = context->xml_writer; raptor_qname **attrs; int attrs_count; RAPTOR_DEBUG5("Emitting literal node %p refcount %d subject %d object %d\n", node, node->ref_count, node->count_as_subject, node->count_as_object); if(node->type != RAPTOR_IDENTIFIER_TYPE_LITERAL) return 1; if(node->value.literal.language || node->value.literal.datatype) { attrs_count = 0; attrs = (raptor_qname **)RAPTOR_CALLOC(qnamearray,2,sizeof(raptor_qname *)); if(!attrs) return 1; if(node->value.literal.language) { attrs[attrs_count] = raptor_new_qname(context->nstack, (unsigned char*)"xml:lang", (unsigned char*)node->value.literal.language, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer); if(!attrs[attrs_count]) goto attrs_oom; attrs_count++; } if(node->value.literal.datatype) { unsigned char *datatype_value; datatype_value = raptor_uri_as_string_v2(serializer->world, node->value.literal.datatype); attrs[attrs_count] = raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (const unsigned char*)"datatype", datatype_value); if(!attrs[attrs_count]) goto attrs_oom; attrs_count++; /* SJS Note: raptor_default_uri_as_string simply returns a * pointer to the string. Hope this is also true of alternate * uri implementations. */ /* RAPTOR_FREE(cstring, datatype_value); */ } raptor_xml_element_set_attributes(element, attrs, attrs_count); } raptor_xml_writer_start_element(xml_writer, element); raptor_xml_writer_cdata(xml_writer, node->value.literal.string); raptor_xml_writer_end_element(xml_writer, element); RAPTOR_DEBUG2("Emitted %p\n", node); return 0; attrs_oom: raptor_serializer_error(serializer, "Out of memory"); /* attrs_count has not been incremented yet * and it points to the qname the allocation of which failed */ attrs_count--; while(attrs_count>=0) raptor_free_qname(attrs[attrs_count--]); RAPTOR_FREE(qnamearray, attrs); return 1; } /* * raptor_rdfxmla_emit_xml_literal: * @serializer: #raptor_serializer object * @element: XML Element * @node: XML literal node * @depth: depth into tree * * Emit a description of a literal using an XML Element * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_xml_literal(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; raptor_xml_writer *xml_writer = context->xml_writer; raptor_qname **attrs; RAPTOR_DEBUG5("Emitting XML literal node %p refcount %d subject %d object %d\n", node, node->ref_count, node->count_as_subject, node->count_as_object); if(node->type != RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) return 1; attrs = (raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname *)); if(!attrs) return 1; attrs[0] = raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (const unsigned char*)"parseType", (const unsigned char*)"Literal"); raptor_xml_element_set_attributes(element, attrs, 1); raptor_xml_writer_start_element(xml_writer, element); raptor_xml_writer_raw(xml_writer, node->value.literal.string); raptor_xml_writer_end_element(xml_writer, element); return 0; } /* * raptor_rdfxmla_emit_blank: * @serializer: #raptor_serializer object * @element: XML Element * @node: blank node * @depth: depth into tree * * Emit a description of a blank node using an XML Element * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_blank(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; RAPTOR_DEBUG5("Emitting blank node %p refcount %d subject %d object %d\n", node, node->ref_count, node->count_as_subject, node->count_as_object); if(node->type != RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) return 1; if((node->count_as_subject == 1 && node->count_as_object == 1)) { /* If this is only used as a 1 subject and object or never * used as a subject or never used as an object, it never need * be referenced with an explicit name */ raptor_abbrev_subject* blank; raptor_xml_writer_start_element(context->xml_writer, element); blank = raptor_abbrev_subject_find(context->blanks, node->type, node->value.blank.string); if(blank) { raptor_rdfxmla_emit_subject(serializer, blank, depth+1); raptor_abbrev_subject_invalidate(blank); } } else { unsigned char *attr_name = (unsigned char*)"nodeID"; unsigned char *attr_value = node->value.blank.string; raptor_qname **attrs; attrs = (raptor_qname **)RAPTOR_CALLOC(qnamearray,1,sizeof(raptor_qname *)); if(!attrs) return 1; attrs[0] = raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, attr_name, attr_value); raptor_xml_element_set_attributes(element, attrs, 1); raptor_xml_writer_start_element(context->xml_writer, element); } raptor_xml_writer_end_element(context->xml_writer, element); RAPTOR_DEBUG2("Emitted %p\n", node); return 0; } /* * raptor_rdfxmla_emit_subject_list_items: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit an rdf list of items (rdf:li) about a subject node. * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_subject_list_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; int rv = 0; int i=0; raptor_uri* base_uri=NULL; RAPTOR_DEBUG5("Emitting subject list items for node %p refcount %d subject %d object %d\n", subject->node, subject->node->ref_count, subject->node->count_as_subject, subject->node->count_as_object); while (!rv && i < raptor_sequence_size(subject->list_items)) { raptor_abbrev_node* object; raptor_qname *qname; raptor_xml_element *element; object = (raptor_abbrev_node* )raptor_sequence_get_at(subject->list_items, i++); if(!object) continue; qname = raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (unsigned char *)"li", NULL); if(serializer->base_uri) base_uri=raptor_uri_copy_v2(serializer->world, serializer->base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); if(!element) { raptor_serializer_error(serializer, "Out of memory"); raptor_free_qname(qname); rv=1; /* error */ break; } switch (object->type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: rv = raptor_rdfxmla_emit_resource(serializer, element, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: rv = raptor_rdfxmla_emit_literal(serializer, element, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: rv = raptor_rdfxmla_emit_xml_literal(serializer, element, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: rv = raptor_rdfxmla_emit_blank(serializer, element, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: /* ordinals should never appear as an object with current parsers */ case RAPTOR_IDENTIFIER_TYPE_PREDICATE: /* predicates should never appear as an object */ case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL1("Unsupported identifier type\n"); break; } raptor_free_xml_element(element); } return rv; } /* * raptor_rdfxmla_emit_subject_properties: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit the properties about a subject node. * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_subject_properties(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; int rv = 0; int i; raptor_avltree_iterator* iter=NULL; RAPTOR_DEBUG5("Emitting subject properties for node %p refcount %d subject %d object %d\n", subject->node, subject->node->ref_count, subject->node->count_as_subject, subject->node->count_as_object); /* Emit any rdf:_n properties collected */ if(raptor_sequence_size(subject->list_items) > 0) { rv = raptor_rdfxmla_emit_subject_list_items(serializer, subject, depth+1); if(rv) return rv; } if(subject->node_type && !context->write_typed_nodes) { raptor_uri *base_uri=NULL; raptor_qname *qname=NULL; raptor_xml_element *element=NULL; /* if rdf:type was associated with this subject and do not want * a typed node, emit it as a property element */ qname = raptor_new_qname_from_resource(context->namespaces, context->nstack, &context->namespace_count, context->rdf_type); if(!qname) goto oom; if(serializer->base_uri) base_uri=raptor_uri_copy_v2(serializer->world, serializer->base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); if(!element) { if(base_uri) raptor_free_uri_v2(serializer->world, base_uri); raptor_free_qname(qname); goto oom; } rv=raptor_rdfxmla_emit_resource_uri(serializer, element, subject->node_type->value.resource.uri, depth+1); raptor_free_xml_element(element); } for(i=0, iter=raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1); iter && !rv; i++, (rv=raptor_avltree_iterator_next(iter))) { raptor_uri *base_uri=NULL; raptor_qname *qname; raptor_xml_element *element; raptor_abbrev_node** nodes; raptor_abbrev_node* predicate; raptor_abbrev_node* object; nodes=(raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; predicate= nodes[0]; object= nodes[1]; if(predicate->type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { /* we should only get here in rare cases -- usually when there * are multiple ordinals with the same value. */ unsigned char uri_string[MAX_ASCII_INT_SIZE + 2]; sprintf((char*)uri_string, "_%d", predicate->value.ordinal.ordinal); qname = raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, uri_string, NULL); if(!qname) goto oom; } else { qname = raptor_new_qname_from_resource(context->namespaces, context->nstack, &context->namespace_count, predicate); if(!qname) { raptor_serializer_error(serializer, "Cannot split URI '%s' into an XML qname", raptor_uri_as_string_v2(serializer->world, predicate->value.resource.uri)); continue; } } if(serializer->base_uri) base_uri=raptor_uri_copy_v2(serializer->world, serializer->base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); if(!element) { if(base_uri) raptor_free_uri_v2(serializer->world, base_uri); raptor_free_qname(qname); goto oom; } switch (object->type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: rv = raptor_rdfxmla_emit_resource(serializer, element, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: rv = raptor_rdfxmla_emit_literal(serializer, element, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: rv = raptor_rdfxmla_emit_blank(serializer, element, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: rv = raptor_rdfxmla_emit_xml_literal(serializer, element, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: /* ordinals should never appear as an object with current parsers */ case RAPTOR_IDENTIFIER_TYPE_PREDICATE: /* predicates should never appear as an object */ case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL1("Unsupported identifier type\n"); break; } raptor_free_xml_element(element); } if(iter) raptor_free_avltree_iterator(iter); return rv; oom: if(iter) raptor_free_avltree_iterator(iter); raptor_serializer_error(serializer, "Out of memory"); return 1; } /* * raptor_rdfxmla_emit_subject: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit a subject node * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_subject(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; raptor_qname *qname = NULL; raptor_xml_element *element=NULL; raptor_qname **attrs; unsigned char *attr_name; unsigned char *attr_value; raptor_uri *base_uri=NULL; int subject_is_single_node; if (!raptor_abbrev_subject_valid(subject)) return 0; subject_is_single_node=(context->single_node && subject->node->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE && raptor_uri_equals_v2(serializer->world, subject->node->value.resource.uri, context->single_node)); RAPTOR_DEBUG5("Emitting subject node %p refcount %d subject %d object %d\n", subject->node, subject->node->ref_count, subject->node->count_as_subject, subject->node->count_as_object); if(!depth && subject->node->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS && subject->node->count_as_subject == 1 && subject->node->count_as_object == 1) { RAPTOR_DEBUG2("Skipping subject node %p\n", subject->node); return 0; } if(subject->node_type && context->write_typed_nodes) { /* if rdf:type was associated with this subject */ qname = raptor_new_qname_from_resource(context->namespaces, context->nstack, &context->namespace_count, subject->node_type); if(!qname) { raptor_serializer_error(serializer, "Cannot split URI '%s' into an XML qname", raptor_uri_as_string_v2(serializer->world, subject->node_type->value.resource.uri)); return 1; } } else { qname = raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (unsigned const char*)"Description", NULL); if(!qname) goto oom; } if(serializer->base_uri) base_uri=raptor_uri_copy_v2(serializer->world, serializer->base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); if(!element) { if(base_uri) raptor_free_uri_v2(serializer->world, base_uri); raptor_free_qname(qname); goto oom; } attrs = (raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname *)); if(!attrs) goto oom; attr_name = NULL; attr_value = NULL; /* emit the subject node */ if(subject->node->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { attr_name = (unsigned char*)"about"; if(context->is_xmp) { /* XML rdf:about value is always "" */ attr_value = (unsigned char *)RAPTOR_CALLOC(string, 1, sizeof(unsigned char*)); } else if(serializer->feature_relative_uris) attr_value = raptor_uri_to_relative_uri_string_v2(serializer->world, serializer->base_uri, subject->node->value.resource.uri); else attr_value = raptor_uri_to_string_v2(serializer->world, subject->node->value.resource.uri); } else if(subject->node->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { if(subject->node->count_as_subject && subject->node->count_as_object && !(subject->node->count_as_subject == 1 && subject->node->count_as_object == 1)) { /* No need for nodeID if this node is never used as a subject * or object OR if it is used exactly once as subject and object. */ attr_name = (unsigned char*)"nodeID"; attr_value = subject->node->value.blank.string; } } else if(subject->node->type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { attr_name = (unsigned char*)"about"; attr_value = (unsigned char *)RAPTOR_MALLOC(string, raptor_rdf_namespace_uri_len + MAX_ASCII_INT_SIZE + 2); if(!attr_value) { RAPTOR_FREE(qnamearray, attrs); goto oom; } sprintf((char*)attr_value, "%s_%d", raptor_rdf_namespace_uri, subject->node->value.ordinal.ordinal); } if(attr_name) { attrs[0] = raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, attr_name, attr_value); if(subject->node->type != RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) RAPTOR_FREE(cstring, attr_value); if(!attrs[0]) { RAPTOR_FREE(qnamearray, attrs); goto oom; } /* Note: if we were willing to track the in-scope rdf:lang, we * could do the "2.5 Property Attributes" abbreviation here */ raptor_xml_element_set_attributes(element, attrs, 1); } else { RAPTOR_FREE(qnamearray, attrs); } if(!subject_is_single_node) { raptor_xml_writer_start_element(context->xml_writer, element); raptor_rdfxmla_emit_subject_properties(serializer, subject, depth+1); raptor_xml_writer_end_element(context->xml_writer, element); } else raptor_rdfxmla_emit_subject_properties(serializer, subject, depth); raptor_free_xml_element(element); return 0; oom: if(element) raptor_free_xml_element(element); raptor_serializer_error(serializer, "Out of memory"); return 1; } /* * raptor_rdfxmla_emit - * @serializer: #raptor_serializer object * * Emit RDF/XML for all stored triples. * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit(raptor_serializer *serializer) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; raptor_abbrev_subject* subject; raptor_abbrev_subject* blank; raptor_avltree_iterator* iter=NULL; iter = raptor_new_avltree_iterator(context->subjects, NULL, NULL, 1); while (iter) { subject = (raptor_abbrev_subject*)raptor_avltree_iterator_get(iter); if (subject) { raptor_rdfxmla_emit_subject(serializer, subject, context->starting_depth); } if (raptor_avltree_iterator_next(iter)) break; } if (iter) raptor_free_avltree_iterator(iter); if (!context->single_node) { /* Emit any remaining blank nodes */ iter = raptor_new_avltree_iterator(context->blanks, NULL, NULL, 1); while (iter) { blank = (raptor_abbrev_subject*)raptor_avltree_iterator_get(iter); if (blank) { raptor_rdfxmla_emit_subject(serializer, blank, context->starting_depth); } if (raptor_avltree_iterator_next(iter)) break; } if (iter) raptor_free_avltree_iterator(iter); } return 0; } /* * raptor serializer rdfxml-abbrev implementation */ static void raptor_rdfxmla_serialize_init_nstack(raptor_serializer* serializer, raptor_namespace_stack *nstack) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; context->xml_nspace=raptor_new_namespace(context->nstack, (const unsigned char*)"xml", (const unsigned char*)raptor_xml_namespace_uri, context->starting_depth); context->rdf_nspace=raptor_new_namespace(context->nstack, (const unsigned char*)"rdf", (const unsigned char*)raptor_rdf_namespace_uri, context->starting_depth); } /* create a new serializer */ static int raptor_rdfxmla_serialize_init(raptor_serializer* serializer, const char *name) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; raptor_uri *rdf_type_uri; context->nstack=raptor_new_namespaces_v2(serializer->world, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer, 1); if(!context->nstack) return 1; raptor_rdfxmla_serialize_init_nstack(serializer, context->nstack); context->namespaces=raptor_new_sequence(NULL, NULL); context->subjects = raptor_new_avltree(serializer->world, (raptor_data_compare_function)raptor_abbrev_subject_cmp, (raptor_data_free_function)raptor_free_abbrev_subject, 0); context->blanks = raptor_new_avltree(serializer->world, (raptor_data_compare_function)raptor_abbrev_subject_cmp, (raptor_data_free_function)raptor_free_abbrev_subject, 0); context->nodes = raptor_new_avltree(serializer->world, (raptor_data_compare_function)raptor_abbrev_node_cmp, (raptor_data_free_function)raptor_free_abbrev_node, 0); rdf_type_uri = raptor_new_uri_for_rdf_concept_v2(serializer->world, "type"); if(rdf_type_uri) { context->rdf_type = raptor_new_abbrev_node(serializer->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, rdf_type_uri, NULL, NULL); raptor_free_uri_v2(serializer->world, rdf_type_uri); } context->rdf_xml_literal_uri=raptor_new_uri_v2(serializer->world, raptor_xml_literal_datatype_uri_string); if(!context->xml_nspace || !context->rdf_nspace || !context->namespaces || !context->subjects || !context->blanks || !context->nodes || !context->rdf_type || !context->rdf_xml_literal_uri) { raptor_rdfxmla_serialize_terminate(serializer); return 1; } context->is_xmp=!strncmp(name, "rdfxml-xmp", 10); if(context->is_xmp) serializer->feature_write_xml_declaration=0; /* Note: item 0 in the list is rdf:RDF's namespace */ if(raptor_sequence_push(context->namespaces, context->rdf_nspace)) { raptor_rdfxmla_serialize_terminate(serializer); return 1; } context->write_rdf_RDF=1; context->starting_depth=0; context->single_node=NULL; context->write_typed_nodes=1; return 0; } /* destroy a serializer */ static void raptor_rdfxmla_serialize_terminate(raptor_serializer* serializer) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; if(context->xml_writer) { if(!context->external_xml_writer) raptor_free_xml_writer(context->xml_writer); context->xml_writer=NULL; context->external_xml_writer=0; } if(context->rdf_RDF_element) { raptor_free_xml_element(context->rdf_RDF_element); context->rdf_RDF_element=NULL; } if(context->rdf_nspace) { raptor_free_namespace(context->rdf_nspace); context->rdf_nspace=NULL; } if(context->xml_nspace) { raptor_free_namespace(context->xml_nspace); context->xml_nspace=NULL; } if(context->namespaces) { int i; /* Note: item 0 in the list is rdf:RDF's namespace and freed above */ for(i=1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns =(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); if(ns) raptor_free_namespace(ns); } raptor_free_sequence(context->namespaces); context->namespaces=NULL; } if(context->subjects) { raptor_free_avltree(context->subjects); context->subjects=NULL; } if(context->blanks) { raptor_free_avltree(context->blanks); context->blanks=NULL; } if(context->nodes) { raptor_free_avltree(context->nodes); context->nodes=NULL; } /* always free raptor_namespace* before stack */ if(context->nstack) { if(!context->external_nstack) raptor_free_namespaces(context->nstack); context->nstack=NULL; } if(context->rdf_type) { raptor_free_abbrev_node(context->rdf_type); context->rdf_type=NULL; } if(context->rdf_xml_literal_uri) { raptor_free_uri_v2(serializer->world, context->rdf_xml_literal_uri); context->rdf_xml_literal_uri=NULL; } } #define RDFXMLA_NAMESPACE_DEPTH 0 /* add a namespace */ static int raptor_rdfxmla_serialize_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; int i; if(context->written_header) return 1; for(i=0; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns=(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); /* If prefix is already declared, ignore it */ if(!ns->prefix && !nspace->prefix) return 1; if(ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) return 1; if(ns->uri && nspace->uri && raptor_uri_equals_v2(serializer->world, ns->uri, nspace->uri)) return 1; } nspace=raptor_new_namespace_from_uri(context->nstack, nspace->prefix, nspace->uri, context->starting_depth + RDFXMLA_NAMESPACE_DEPTH); if(!nspace) return 1; raptor_sequence_push(context->namespaces, nspace); return 0; } /* add a namespace */ static int raptor_rdfxmla_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; raptor_namespace *ns; int rc; ns=raptor_new_namespace_from_uri(context->nstack, prefix, uri, context->starting_depth + RDFXMLA_NAMESPACE_DEPTH); rc=raptor_rdfxmla_serialize_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /* * raptor_rdfxmla_serialize_set_write_rdf_RDF: * @serializer: serializer object * @value: value * * INTERNAL - Set flag to write rdf:RDF root element * * Return value: non-0 on failure */ int raptor_rdfxmla_serialize_set_write_rdf_RDF(raptor_serializer* serializer, int value) { raptor_rdfxmla_context* context; if(strcmp(serializer->factory->name, "rdfxml-abbrev")) return 1; context=(raptor_rdfxmla_context*)serializer->context; context->write_rdf_RDF=value; return 0; } /* * raptor_rdfxmla_serialize_set_xml_writer: * @serializer: serializer object * @xml_writer: XML writer * @nstack: namespace stack * * INTERNAL - Set an existing created XML writer to write the serializing to * * Return value: non-0 on failure */ int raptor_rdfxmla_serialize_set_xml_writer(raptor_serializer* serializer, raptor_xml_writer* xml_writer, raptor_namespace_stack *nstack) { raptor_rdfxmla_context* context; if(strcmp(serializer->factory->name, "rdfxml-abbrev")) return 1; context=(raptor_rdfxmla_context*)serializer->context; context->xml_writer=xml_writer; context->starting_depth= raptor_xml_writer_get_depth(xml_writer) + 1; context->external_xml_writer= (xml_writer != NULL); if(context->xml_nspace) raptor_free_namespace(context->xml_nspace); if(context->rdf_nspace) raptor_free_namespace(context->rdf_nspace); /* always free raptor_namespace* before stack */ if(context->nstack) raptor_free_namespaces(context->nstack); context->nstack=nstack; context->external_nstack=1; raptor_rdfxmla_serialize_init_nstack(serializer, context->nstack); return 0; } /* * raptor_rdfxmla_serialize_set_single_node: * @serializer: * @uri: * * INTERNAL - Set a single node to serialize the contents * * The outer node element with this URI is not serialized, the inner * property elements are written. @uri is copied * * Return value: non-0 on failure */ int raptor_rdfxmla_serialize_set_single_node(raptor_serializer* serializer, raptor_uri* uri) { raptor_rdfxmla_context* context; if(strcmp(serializer->factory->name, "rdfxml-abbrev")) return 1; context=(raptor_rdfxmla_context*)serializer->context; if(context->single_node) raptor_free_uri_v2(serializer->world, context->single_node); context->single_node=raptor_uri_copy_v2(serializer->world, uri); return 0; } /* * raptor_rdfxmla_serialize_set_write_typed_nodes: * @serializer: * @value: * * INTERNAL - Set flag to write typed node elements * * Return value: non-0 on failure */ int raptor_rdfxmla_serialize_set_write_typed_nodes(raptor_serializer* serializer, int value) { raptor_rdfxmla_context* context; if(strcmp(serializer->factory->name, "rdfxml-abbrev")) return 1; context=(raptor_rdfxmla_context*)serializer->context; context->write_typed_nodes=value; return 0; } /* start a serialize */ static int raptor_rdfxmla_serialize_start(raptor_serializer* serializer) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; if(!context->external_xml_writer) { raptor_xml_writer* xml_writer; if(context->xml_writer) raptor_free_xml_writer(context->xml_writer); xml_writer=raptor_new_xml_writer_v2(serializer->world, context->nstack, serializer->iostream, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer, 1); if(!xml_writer) return 1; raptor_xml_writer_set_feature(xml_writer, RAPTOR_FEATURE_WRITER_AUTO_INDENT, 1); raptor_xml_writer_set_feature(xml_writer, RAPTOR_FEATURE_WRITER_AUTO_EMPTY, 1); raptor_xml_writer_set_feature(xml_writer, RAPTOR_FEATURE_WRITER_INDENT_WIDTH,2); raptor_xml_writer_set_feature(xml_writer, RAPTOR_FEATURE_WRITER_XML_VERSION, serializer->xml_version); raptor_xml_writer_set_feature(xml_writer, RAPTOR_FEATURE_WRITER_XML_DECLARATION, serializer->feature_write_xml_declaration); context->xml_writer=xml_writer; } return 0; } static int raptor_rdfxmla_ensure_writen_header(raptor_serializer* serializer, raptor_rdfxmla_context* context) { raptor_xml_writer* xml_writer; raptor_qname *qname; raptor_uri *base_uri; int i; raptor_qname **attrs=NULL; int attrs_count=0; if(context->written_header) return 0; /* already succeeded */ if(!context->write_rdf_RDF) { context->written_header=1; return 0; } xml_writer=context->xml_writer; if(context->is_xmp) raptor_xml_writer_raw(xml_writer, (const unsigned char*)"<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>\n<x:xmpmeta xmlns:x='adobe:ns:meta/'>\n"); qname=raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, (const unsigned char*)"RDF", NULL); if(!qname) goto oom; base_uri=serializer->base_uri; if(base_uri) base_uri=raptor_uri_copy_v2(serializer->world, base_uri); context->rdf_RDF_element=raptor_new_xml_element(qname, NULL, base_uri); if(!context->rdf_RDF_element) { if(base_uri) raptor_free_uri_v2(serializer->world, base_uri); raptor_free_qname(qname); goto oom; } /* NOTE: Starts at item 1 as item 0 is the element's namespace (rdf) * and does not need to be declared */ for(i=1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns=(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); raptor_xml_element_declare_namespace(context->rdf_RDF_element, ns); } if(base_uri && serializer->feature_write_base_uri) { const unsigned char* base_uri_string; attrs=(raptor_qname **)RAPTOR_CALLOC(qnamearray, 1, sizeof(raptor_qname*)); if(!attrs) goto oom; base_uri_string=raptor_uri_as_string_v2(serializer->world, base_uri); attrs[attrs_count]=raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->xml_nspace, (const unsigned char*)"base", base_uri_string); if(!attrs[attrs_count]) { RAPTOR_FREE(qnamearray, attrs); goto oom; } attrs_count++; } if(attrs_count) raptor_xml_element_set_attributes(context->rdf_RDF_element, attrs, attrs_count); else raptor_xml_element_set_attributes(context->rdf_RDF_element, NULL, 0); raptor_xml_writer_start_element(xml_writer, context->rdf_RDF_element); context->written_header=1; return 0; oom: raptor_serializer_error(serializer, "Out of memory"); return 1; } /* serialize a statement */ static int raptor_rdfxmla_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; raptor_abbrev_subject* subject = NULL; raptor_abbrev_node* predicate = NULL; raptor_abbrev_node* object = NULL; int rv = 0; raptor_identifier_type object_type; int subject_created = 0; int predicate_created = 0; int object_created = 0; if(!(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS || statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL)) { raptor_serializer_error(serializer, "Cannot serialize a triple with subject node type %d\n", statement->subject_type); return 1; } subject = raptor_abbrev_subject_lookup(context->nodes, context->subjects, context->blanks, statement->subject_type, statement->subject, &subject_created); if(!subject) return 1; object_type=statement->object_type; if(object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL) { if(statement->object_literal_datatype && raptor_uri_equals_v2(serializer->world, statement->object_literal_datatype, context->rdf_xml_literal_uri)) object_type = RAPTOR_IDENTIFIER_TYPE_XML_LITERAL; } if(!(object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS || object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL || object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL || object_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL)) { raptor_serializer_error(serializer, "Cannot serialize a triple with object node type %d\n", object_type); return 1; } object = raptor_abbrev_node_lookup(context->nodes, object_type, statement->object, statement->object_literal_datatype, statement->object_literal_language, &object_created); if(!object) return 1; if((statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_PREDICATE) || (statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE)) { predicate = raptor_abbrev_node_lookup(context->nodes, statement->predicate_type, statement->predicate, NULL, NULL, &predicate_created); if(!predicate) return 1; if(!subject->node_type && raptor_abbrev_node_equals(predicate, context->rdf_type) && statement->object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { /* Store the first one as the type for abbreviation 2.14 * purposes. Note that it is perfectly legal to have * multiple type definitions. All definitions after the * first go in the property list */ subject->node_type = raptor_abbrev_node_lookup(context->nodes, object_type, statement->object, NULL, NULL, NULL); if(!subject->node_type) return 1; subject->node_type->ref_count++; return 0; } else { int add_property=1; if(context->is_xmp && predicate->ref_count > 1) { raptor_avltree_iterator* iter=NULL; int i; for(i=0, (iter=raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1)); iter && !rv; i++, (rv=raptor_avltree_iterator_next(iter))) { raptor_abbrev_node** nodes; raptor_abbrev_node* node; nodes=(raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; node= nodes[0]; if(node == predicate) { add_property=0; if(object->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { /* look for any generated blank node associated with this * statement and free it */ raptor_abbrev_subject *blank = raptor_abbrev_subject_find(context->blanks, object_type, statement->object); if (subject) raptor_avltree_delete(context->blanks, blank); } break; } } if(iter) raptor_free_avltree_iterator(iter); } if(add_property) { rv = raptor_abbrev_subject_add_property(subject, predicate, object); if(rv < 0) { raptor_serializer_error(serializer, "Unable to add properties to subject %p\n", subject); return rv; } } } } else if(statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { int idx = *(int*)statement->predicate; rv = raptor_abbrev_subject_add_list_element(subject, idx, object); if(rv) { /* An ordinal might already exist at that location, the fallback * is to just put in the properties list */ predicate = raptor_abbrev_node_lookup(context->nodes, statement->predicate_type, statement->predicate, NULL, NULL, &predicate_created); if(!predicate) return 1; rv = raptor_abbrev_subject_add_property(subject, predicate, object); if(rv < 0) { raptor_serializer_error(serializer, "Unable to add properties to subject %p\n", subject); return rv; } } } else { raptor_serializer_error(serializer, "Cannot serialize a triple with predicate node type %d\n", statement->predicate_type); return 1; } if(object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) object->count_as_object++; return 0; } /* end a serialize */ static int raptor_rdfxmla_serialize_end(raptor_serializer* serializer) { raptor_rdfxmla_context* context=(raptor_rdfxmla_context*)serializer->context; raptor_xml_writer* xml_writer=context->xml_writer; if(xml_writer) { if(!raptor_rdfxmla_ensure_writen_header(serializer, context)) { raptor_rdfxmla_emit(serializer); if(context->write_rdf_RDF) { /* ensure_writen_header() returned success, can assume context->rdf_RDF_element is non-NULL */ raptor_xml_writer_end_element(xml_writer, context->rdf_RDF_element); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); } } } if(context->rdf_RDF_element) { raptor_free_xml_element(context->rdf_RDF_element); context->rdf_RDF_element=NULL; } if(context->is_xmp && xml_writer) raptor_xml_writer_raw(xml_writer, (const unsigned char*)"</x:xmpmeta>\n<?xpacket end='r'?>\n"); if(xml_writer) raptor_xml_writer_flush(xml_writer); if(context->single_node) raptor_free_uri_v2(serializer->world, context->single_node); context->written_header=0; return 0; } /* finish the serializer factory */ static void raptor_rdfxmla_serialize_finish_factory(raptor_serializer_factory* factory) { /* NOP */ } static int raptor_rdfxmla_serializer_register_factory(raptor_serializer_factory *factory) { factory->context_length = sizeof(raptor_rdfxmla_context); factory->init = raptor_rdfxmla_serialize_init; factory->terminate = raptor_rdfxmla_serialize_terminate; factory->declare_namespace = raptor_rdfxmla_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_rdfxmla_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_rdfxmla_serialize_start; factory->serialize_statement = raptor_rdfxmla_serialize_statement; factory->serialize_end = raptor_rdfxmla_serialize_end; factory->finish_factory = raptor_rdfxmla_serialize_finish_factory; return 0; } int raptor_init_serializer_rdfxmla(raptor_world* world) { return raptor_serializer_register_factory(world, "rdfxml-xmp", "RDF/XML (XMP Profile)", "application/rdf+xml", NULL, (const unsigned char*)"http://www.w3.org/TR/rdf-syntax-grammar", &raptor_rdfxmla_serializer_register_factory) || raptor_serializer_register_factory(world, "rdfxml-abbrev", "RDF/XML (Abbreviated)", "application/rdf+xml", NULL, (const unsigned char*)"http://www.w3.org/TR/rdf-syntax-grammar", &raptor_rdfxmla_serializer_register_factory); } �������������������������������������������������������������������������������������������������������raptor-1.4.21/src/fix-flex��������������������������������������������������������������������������0000755�0001750�0001750�00000004221�11330672502�012264� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/perl # # Format output generated by flex 2.5.31 # # Usage: # flex -o$output $input # perl fix-flex $output > $tmp # mv $tmp $output # # (C) Copyright 2004 Dave Beckett http://www.dajobe.org/ # (C) Copyright 2004 University of Bristol # my $line_offset=1; # #line directives always refer to the NEXT line print <<'EOT'; #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif EOT $line_offset+=8; # added 8 lines to output my $prefix=undef; while(<>) { # Remove generated yy_fatal_error declaration and definition to avoid warnings about unused/non-defined static function # declaration if(/^static void yy_fatal_error\s*\(.*\)\s*\;\s*$/) { $line_offset--; # skipped 1 line next; } # definition if(/^static void yy_fatal_error\s*\(.*\)\s*[^\;]\s*$/) { do { $_=<>; $line_offset--; # skipped 1 line } while(!/^}/); $line_offset--; # skipped 1 line next; } # Replace calls to yy_fatal_error("msg", yyscanner) to YY_FATAL_ERROR("msg") macro s/(^\s*)yy_fatal_error\s*\(\s*(\".*\")\s*,\s*yyscanner\s*\)/$1YY_FATAL_ERROR($2)/; # flex has %option nounistd however it does not work in 2.5.31 # It is safe to add yet another wrapper. if(m%^(\#include \<unistd.h\>)$%) { $_=<<"EOT"; #ifndef YY_NO_UNISTD_H $1 #endif EOT $line_offset+=2; # added 2 lines to output } # Add $prefix_cleanup() call at the end of $prefix_lex_destroy() # find the start of lex_destroy function definition and capture prefix if(/^int\s+(\S+)_lex_destroy\s*\(.*\)\s*[^\;]\s*$/) { $prefix=$1; } # look for lexer_free(yyscanner, yyscanner) statement within the function and place the cleanup call before it if($prefix) { if(/(^\s*)(${prefix}_free\s*\(\s*yyscanner\s*,\s*yyscanner\s*\)\s*\;)\s*$/) { $_=<<"EOT"; $1/* clean up leaks if any before freeing yyscanner */ $1${prefix}_cleanup(yyscanner); $1$2 EOT $line_offset+=2; # added 2 lines to output $prefix=undef; # lex_destroy() patched } } # Fix .[ch] line references because we have added lines to it my $line = $. +$line_offset; s/^#line \d+ (\".*\.[ch]\")/#line $line $1/; print; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/turtle_common.c�������������������������������������������������������������������0000644�0001750�0001750�00000010370�11330672502�013651� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_common.c - Raptor Turtle common code * * Copyright (C) 2003-2007, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /** * raptor_stringbuffer_append_turtle_string: * @stringbuffer: String buffer to add to * @text: turtle string to decode * @len: length of string * @delim: terminating delimiter for string - only ', " or > are allowed * @error_handler: error handling function * @error_data: error handler data * * Append to a stringbuffer a Turtle-escaped string. * * The passed in string is handled according to the Turtle string * escape rules giving a UTF-8 encoded output of the Unicode codepoints. * * The Turtle escapes are \n \r \t \\ * \uXXXX \UXXXXXXXX where X is [A-F0-9] * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_turtle_string(raptor_stringbuffer* stringbuffer, const unsigned char *text, size_t len, int delim, raptor_simple_message_handler error_handler, void *error_data) { size_t i; const unsigned char *s; unsigned char *d; unsigned char *string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(!string) return -1; for(s=text, d=string, i=0; i<len; s++, i++) { unsigned char c=*s; if(c == '\\' ) { s++; i++; c=*s; if(c == 'n') *d++= '\n'; else if(c == 'r') *d++= '\r'; else if(c == 't') *d++= '\t'; else if(c == '\\' || c == delim) *d++=c; else if (c == 'u' || c == 'U') { size_t ulen=(c == 'u') ? 4 : 8; unsigned long unichar=0; int n; s++; i++; if(i+ulen > len) { error_handler(error_data, "Turtle string error - \\%c over end of line", c); RAPTOR_FREE(cstring, string); return 1; } n=sscanf((const char*)s, ((ulen == 4) ? "%04lx" : "%08lx"), &unichar); if(n != 1) { error_handler(error_data, "Turtle string error - illegal Uncode escape '%c%s...'", c, s); RAPTOR_FREE(cstring, string); return 1; } s+= ulen-1; i+= ulen-1; if(unichar > 0x10ffff) { error_handler(error_data, "Turtle string error - illegal Unicode character with code point #x%lX.", unichar); RAPTOR_FREE(cstring, string); return 1; } d+=raptor_unicode_char_to_utf8(unichar, d); } else { /* don't handle \x where x isn't one of: \t \n \r \\ (delim) */ error_handler(error_data, "Turtle string error - illegal escape \\%c (#x%02X) in \"%s\"", c, c, text); } } else *d++=c; } *d='\0'; /* calculate output string size */ len = d-string; /* string gets owned by the stringbuffer after this */ return raptor_stringbuffer_append_counted_string(stringbuffer, string, len, 0); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/turtle_common.h�������������������������������������������������������������������0000644�0001750�0001750�00000003575�11330672502�013667� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_common.h - Turtle lexer/parser shared internals * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef TURTLE_COMMON_H #define TURTLE_COMMON_H #ifdef __cplusplus extern "C" { #endif /* turtle_parser.y */ int turtle_syntax_error(raptor_parser *rdf_parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); raptor_uri* turtle_qname_to_uri(raptor_parser *rdf_parser, unsigned char *name, size_t name_len); /* * Turtle parser object */ struct raptor_turtle_parser_s { /* buffer */ char *buffer; /* buffer length */ int buffer_length; /* static statement for use in passing to user code */ raptor_statement statement; raptor_namespace_stack namespaces; /* for lexer to store result in */ YYSTYPE lval; /* STATIC lexer */ yyscan_t scanner; int scanner_set; int lineno; raptor_uri* nil_uri; raptor_uri* first_uri; raptor_uri* rest_uri; /* for creating long literals */ raptor_stringbuffer* sb; /* Allow TRIG extensions */ int trig; /* count of errors in current parse */ int error_count; }; #ifdef __cplusplus } #endif #endif �����������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_grddl.c��������������������������������������������������������������������0000644�0001750�0001750�00000201546�11330672502�013454� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_grddl.c - Raptor GRDDL (+microformats) Parser implementation * * Copyright (C) 2005-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ /* * Specifications: * Gleaning Resource Descriptions from Dialects of Languages (GRDDL) * W3C Proposed Recommendation 16 July 2007 * http://www.w3.org/TR/2007/PR-grddl-20070716/ * http://www.w3.org/TR/grddl/ * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #include <libxml/xpath.h> /* for xmlXPathRegisterNs() */ #include <libxml/xpathInternals.h> #include <libxml/xinclude.h> #include <libxml/HTMLparser.h> #include <libxslt/xslt.h> #include <libxslt/transform.h> #include <libxslt/xsltutils.h> #include <libxslt/security.h> /* * libxslt API notes * * Inputs to an XSLT transformation process with libxslt are: * 1. A set of (key:value) parameters. * 2. An xsltStylesheetPtr for the XSLT sheet * Which could be made from a file or an xmlDoc; and the xmlDoc. * made from a file or memory buffer. * 3. An xmlDoc for the XML source * Which could be made from a file or a memory buffer. * */ static void raptor_grddl_filter_triples(void *user_data, const raptor_statement *statement); static void raptor_libxslt_error_common(raptor_parser* rdf_parser, const char *msg, va_list args, const char *prefix) RAPTOR_PRINTF_FORMAT(2, 0); static void raptor_grddl_xsltGenericError_handler(void *user_data, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 0); typedef struct { /* transformation (XSLT) or profile URI */ raptor_uri* uri; /* base URI in effect when the above was found */ raptor_uri* base_uri; } grddl_xml_context; /* * XSLT parser object */ struct raptor_grddl_parser_context_s { raptor_world* world; raptor_parser* rdf_parser; xmlSAXHandler sax; /* HTML document ctxt */ htmlParserCtxtPtr html_ctxt; /* XML document ctxt */ xmlParserCtxtPtr xml_ctxt; /* Create xpath evaluation context */ xmlXPathContextPtr xpathCtx; /* parser for dealing with the result */ raptor_parser* internal_parser; /* ... constructed with this name */ const char* internal_parser_name; /* sax2 structure - only for recording error pointers */ raptor_sax2* sax2; /* URI of root namespace of document */ raptor_uri* root_ns_uri; /* List of transformation URIs for document */ raptor_sequence* doc_transform_uris; /* Copy of the user data statement_handler overwritten to point to * raptor_grddl_filter_triples() */ void* saved_user_data; raptor_statement_handler saved_statement_handler; /* URI data-view:namespaceTransformation */ raptor_uri* namespace_transformation_uri; /* URI data-view:profileTransformation */ raptor_uri* profile_transformation_uri; /* List of namespace / <head profile> URIs */ raptor_sequence* profile_uris; /* List of visited URIs */ raptor_sequence* visited_uris; /* Depth of GRDDL parsers - 0 means that the lists above * are owned by this parser: visited_uris * */ int grddl_depth; /* Content-Type of top-level document */ char* content_type; /* Check content type once */ int content_type_check; /* stringbuffer to use to store retrieved document */ raptor_stringbuffer* sb; /* non-0 to perform an additional RDF/XML parse on a retrieved document * because it has been identified as RDF/XML. */ int process_this_as_rdfxml; /* non-0 to perform GRDL processing on document */ int grddl_processing; /* non-0 to perform XML Include processing on document */ int xinclude_processing; /* non-0 to perform HTML Base processing on document */ int html_base_processing; /* non-0 to perform HTML <link> processing on document */ int html_link_processing; }; typedef struct raptor_grddl_parser_context_s raptor_grddl_parser_context; static void raptor_libxslt_error_common(raptor_parser* rdf_parser, const char *msg, va_list args, const char *prefix) { int prefix_length=strlen(prefix); int length; char *nmsg; length=prefix_length+strlen(msg)+1; nmsg=(char*)RAPTOR_MALLOC(cstring, length); if(nmsg) { strcpy(nmsg, prefix); strcpy(nmsg+prefix_length, msg); if(nmsg[length-1]=='\n') nmsg[length-1]='\0'; } raptor_parser_error_varargs(rdf_parser, nmsg ? nmsg : msg, args); if(nmsg) RAPTOR_FREE(cstring,nmsg); } static void raptor_grddl_xsltGenericError_handler(void *user_data, const char *msg, ...) { raptor_parser* rdf_parser=(raptor_parser*)user_data; va_list arguments; if(!msg || *msg == '\n') return; va_start(arguments, msg); raptor_libxslt_error_common(rdf_parser, msg, arguments, "libxslt error: "); va_end(arguments); } static grddl_xml_context* raptor_new_xml_context(raptor_world* world, raptor_uri* uri, raptor_uri* base_uri) { grddl_xml_context* xml_context; xml_context=(grddl_xml_context*)RAPTOR_MALLOC(xml_context, sizeof(grddl_xml_context)); if(uri) uri=raptor_uri_copy_v2(world, uri); if(base_uri) base_uri=raptor_uri_copy_v2(world, base_uri); xml_context->uri=uri; xml_context->base_uri=base_uri; return xml_context; } static void grddl_free_xml_context(void *context, void* userdata) { raptor_world* world=(raptor_world*)context; grddl_xml_context* xml_context=(grddl_xml_context*)userdata; if(xml_context->uri) raptor_free_uri_v2(world, xml_context->uri); if(xml_context->base_uri) raptor_free_uri_v2(world, xml_context->base_uri); RAPTOR_FREE(grddl_xml_context, xml_context); } static int raptor_grddl_parse_init_common(raptor_parser* rdf_parser, const char *name) { raptor_grddl_parser_context* grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; grddl_parser->world=rdf_parser->world; grddl_parser->rdf_parser=rdf_parser; /* sax2 structure - only for recording error pointers */ grddl_parser->sax2=raptor_new_sax2(rdf_parser, &rdf_parser->error_handlers); /* The following error fields are normally initialised by * raptor_libxml_init() via raptor_sax2_parse_start() which is * not used here as we go to libxml calls direct. */ raptor_libxml_init_sax_error_handlers(&grddl_parser->sax); /* Sequence of URIs of XSLT sheets to transform the document */ grddl_parser->doc_transform_uris = raptor_new_sequence_v2((raptor_sequence_free_handler_v2*)grddl_free_xml_context, NULL, rdf_parser->world); grddl_parser->grddl_processing=1; grddl_parser->xinclude_processing=1; grddl_parser->html_base_processing=0; grddl_parser->html_link_processing=1; return 0; } static int raptor_grddl_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_grddl_parser_context* grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; raptor_world* world=rdf_parser->world; raptor_grddl_parse_init_common(rdf_parser, name); /* Sequence of URIs from <head profile> */ grddl_parser->profile_uris = raptor_new_sequence_v2((raptor_sequence_free_handler_v2*)grddl_free_xml_context, NULL, (void*)world); grddl_parser->namespace_transformation_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2003/g/data-view#namespaceTransformation"); grddl_parser->profile_transformation_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2003/g/data-view#profileTransformation"); /* Sequence of URIs visited - may be overwritten if this is not * the depth 0 grddl parser */ grddl_parser->visited_uris = raptor_new_sequence_v2((raptor_sequence_free_handler_v2*)raptor_free_uri_v2, (raptor_sequence_print_handler_v2*)raptor_uri_print_v2, (void*)world); return 0; } static void raptor_grddl_parse_terminate(raptor_parser *rdf_parser) { raptor_grddl_parser_context *grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; if(grddl_parser->xml_ctxt) { if(grddl_parser->xml_ctxt->myDoc) { xmlFreeDoc(grddl_parser->xml_ctxt->myDoc); grddl_parser->xml_ctxt->myDoc=NULL; } xmlFreeParserCtxt(grddl_parser->xml_ctxt); } if(grddl_parser->html_ctxt) { if(grddl_parser->html_ctxt->myDoc) { xmlFreeDoc(grddl_parser->html_ctxt->myDoc); grddl_parser->html_ctxt->myDoc=NULL; } htmlFreeParserCtxt(grddl_parser->html_ctxt); } if(grddl_parser->xpathCtx) xmlXPathFreeContext(grddl_parser->xpathCtx); if(grddl_parser->internal_parser) raptor_free_parser(grddl_parser->internal_parser); if(grddl_parser->sax2) raptor_free_sax2(grddl_parser->sax2); if(grddl_parser->root_ns_uri) raptor_free_uri_v2(rdf_parser->world, grddl_parser->root_ns_uri); if(grddl_parser->doc_transform_uris) raptor_free_sequence(grddl_parser->doc_transform_uris); if(grddl_parser->profile_uris) raptor_free_sequence(grddl_parser->profile_uris); if(grddl_parser->namespace_transformation_uri) raptor_free_uri_v2(rdf_parser->world, grddl_parser->namespace_transformation_uri); if(grddl_parser->profile_transformation_uri) raptor_free_uri_v2(rdf_parser->world, grddl_parser->profile_transformation_uri); if(!grddl_parser->grddl_depth) { if(grddl_parser->visited_uris) raptor_free_sequence(grddl_parser->visited_uris); } if(grddl_parser->content_type) RAPTOR_FREE(cstring, grddl_parser->content_type); if(grddl_parser->sb) raptor_free_stringbuffer(grddl_parser->sb); } static void raptor_grddl_parser_add_parent(raptor_parser *rdf_parser, raptor_grddl_parser_context* parent_grddl_parser) { raptor_grddl_parser_context* grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; /* Do not set parent twice */ if(grddl_parser->visited_uris == parent_grddl_parser->visited_uris) return; /* free any sequence here */ if(grddl_parser->visited_uris) raptor_free_sequence(grddl_parser->visited_uris); /* share parent's list and do not free it here */ grddl_parser->visited_uris= parent_grddl_parser->visited_uris; grddl_parser->grddl_depth= parent_grddl_parser->grddl_depth+1; grddl_parser->saved_user_data= parent_grddl_parser->rdf_parser; grddl_parser->saved_statement_handler= raptor_grddl_filter_triples; } static int raptor_grddl_parse_start(raptor_parser *rdf_parser) { raptor_grddl_parser_context* grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; raptor_locator *locator=&rdf_parser->locator; locator->line=1; grddl_parser->content_type_check=0; grddl_parser->process_this_as_rdfxml=0; return 0; } #define MATCH_IS_VALUE_LIST 1 #define MATCH_IS_PROFILE 2 #define MATCH_IS_HARDCODED 4 /* stop looking for other hardcoded matches */ #define MATCH_LAST 8 static struct { const xmlChar* xpath; int flags; const xmlChar* xslt_sheet_uri; } match_table[]={ /* XHTML document where the GRDDL profile is in * <link ref='transform' href='url'> inside the html <head> * Value of @rel is a space-separated list of link types. */ { (const xmlChar*)"/html:html/html:head[contains(@profile,\"http://www.w3.org/2003/g/data-view\")]/html:link[contains(@rel,\"transformation\")]/@href", 0, NULL } , /* XHTML document where the GRDDL profile is in * <a rel='transform' href='url'> inside the html <body> * Value of @rel is a space-separated list of link types. */ { (const xmlChar*)"/html:html/html:head[contains(@profile,\"http://www.w3.org/2003/g/data-view\")]/../..//html:a[contains(@rel,\"transformation\")]/@href", 0, NULL } , /* XML document linking to transform via attribute dataview:transformation * on the root element. * Example: http://www.w3.org/2004/01/rdxh/grddl-p3p-example **/ { (const xmlChar*)"/*/@dataview:transformation", MATCH_IS_VALUE_LIST, NULL } , /* hCalendar microformat http://microformats.org/wiki/hcalendar */ { (const xmlChar*)"//*[contains(concat(' ', concat(normalize-space(@class),' ')),' vevent ')]", MATCH_IS_HARDCODED, (const xmlChar*)"http://www.w3.org/2002/12/cal/glean-hcal.xsl" } , /* hReview microformat http://microformats.org/wiki/review */ { (const xmlChar*)"//*[contains(concat(' ', concat(normalize-space(@class),' ')),' hreview ')]", MATCH_IS_HARDCODED | MATCH_LAST, /* stop here since hCard is inside hReview */ (const xmlChar*)"http://www.w3.org/2001/sw/grddl-wg/doc29/hreview2rdfxml.xsl" } , /* hCard microformat http://microformats.org/wiki/hcard */ { (const xmlChar*)"//*[contains(concat(' ', concat(normalize-space(@class),' ')),' vcard ')]", MATCH_IS_HARDCODED, (const xmlChar*)"http://www.w3.org/2006/vcard/hcard2rdf.xsl" } , { NULL, 0, NULL } }; static const char* grddl_namespace_uris_ignore_list[]={ "http://www.w3.org/1999/xhtml", "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "http://www.w3.org/2001/XMLSchema", NULL }; /* add URI to XSLT transformation URI list */ static void raptor_grddl_add_transform_xml_context(raptor_grddl_parser_context* grddl_parser, grddl_xml_context* xml_context) { int i; raptor_uri* uri=xml_context->uri; #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Found document transformation URI '%s'\n", raptor_uri_as_string_v2(grddl_parser->world, uri)); #endif for(i=0; i < raptor_sequence_size(grddl_parser->doc_transform_uris); i++) { grddl_xml_context* xc=(grddl_xml_context*)raptor_sequence_get_at(grddl_parser->doc_transform_uris, i); if(raptor_uri_equals_v2(grddl_parser->world, uri, xc->uri)) { #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Already seen XSLT URI '%s'\n", raptor_uri_as_string_v2(grddl_parser->world, uri)); #endif grddl_free_xml_context(grddl_parser->world, xml_context); return; } } RAPTOR_DEBUG3("Adding new document transformation XSLT URI %s with base URI %s\n", (uri ? (const char*)raptor_uri_as_string_v2(grddl_parser->world, uri): "(NONE)"), (xml_context->base_uri ? (const char*)raptor_uri_as_string_v2(grddl_parser->world, xml_context->base_uri) : "(NONE)")); raptor_sequence_push(grddl_parser->doc_transform_uris, xml_context); } static void raptor_grddl_filter_triples(void *user_data, const raptor_statement *statement) { raptor_parser* rdf_parser=(raptor_parser*)user_data; raptor_grddl_parser_context* grddl_parser; int i; raptor_uri* predicate_uri; grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; /* Look for a triple <uri> <uri> <uri> */ if(!statement->subject_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || !statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || !statement->object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) return; #if RAPTOR_DEBUG > 2 RAPTOR_DEBUG2("Parser %p: Relaying statement: ", rdf_parser); raptor_print_statement(statement, stderr); fputc('\n', stderr); #endif #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("Parser %p: Checking against %d profile URIs\n", rdf_parser, raptor_sequence_size(grddl_parser->profile_uris)); #endif /* Look for (i=0, root namespace URI) * <document-root-element-namespace-URI> data-view:namespaceTransformation ?tr * or (i>0, profile URIs) * <document-root-element-namespace-URI> data-view:profileTransformation ?tr * and then ?tr becomes a new document transformation URI */ predicate_uri=grddl_parser->namespace_transformation_uri; for(i=0; i < raptor_sequence_size(grddl_parser->profile_uris); i++) { grddl_xml_context* xml_context=(grddl_xml_context*)raptor_sequence_get_at(grddl_parser->profile_uris, i); raptor_uri* profile_uri=xml_context->uri; grddl_xml_context* new_xml_context; if(i==1) predicate_uri=grddl_parser->profile_transformation_uri; if(!profile_uri) continue; if(raptor_uri_equals_v2(rdf_parser->world, (raptor_uri*)statement->subject, profile_uri) && raptor_uri_equals_v2(rdf_parser->world, (raptor_uri*)statement->predicate, predicate_uri)) { raptor_uri* uri=(raptor_uri*)statement->object; #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG4("Parser %p: Matches profile URI #%d '%s'\n", rdf_parser, i, raptor_uri_as_string_v2(rdf_parser->world, profile_uri)); #endif new_xml_context=raptor_new_xml_context(rdf_parser->world, uri, rdf_parser->base_uri); raptor_grddl_add_transform_xml_context(grddl_parser, new_xml_context); } else { #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG4("Parser %p: Failed to match profile URI #%d '%s'\n", rdf_parser, i, raptor_uri_as_string_v2(rdf_parser->world, profile_uri)); #endif } } } static int raptor_grddl_ensure_internal_parser(raptor_parser* rdf_parser, const char* parser_name, int filter) { raptor_grddl_parser_context* grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; if(!grddl_parser->internal_parser_name || !strcmp(parser_name, "guess") || strcmp(grddl_parser->internal_parser_name, parser_name)) { /* construct a new parser if none in use or not what is required */ if(grddl_parser->internal_parser) { RAPTOR_DEBUG3("Parser %p: Freeing internal %s parser.\n", rdf_parser, grddl_parser->internal_parser_name); raptor_free_parser(grddl_parser->internal_parser); grddl_parser->internal_parser=NULL; grddl_parser->internal_parser_name=NULL; } RAPTOR_DEBUG3("Parser %p: Allocating new internal %s parser.\n", rdf_parser, parser_name); grddl_parser->internal_parser=raptor_new_parser_v2(rdf_parser->world, parser_name); if(!grddl_parser->internal_parser) { raptor_parser_error(rdf_parser, "Failed to create %s parser", parser_name); return 1; } /* initialise the new parser with the outer state */ grddl_parser->internal_parser_name=parser_name; if(raptor_parser_copy_user_state(grddl_parser->internal_parser, rdf_parser)) return 1; grddl_parser->saved_user_data=rdf_parser->user_data; grddl_parser->saved_statement_handler=rdf_parser->statement_handler; } /* Filter the triples for profile/namespace URIs */ if(filter) { grddl_parser->internal_parser->user_data= rdf_parser; grddl_parser->internal_parser->statement_handler= raptor_grddl_filter_triples; } else { grddl_parser->internal_parser->user_data= grddl_parser->saved_user_data; grddl_parser->internal_parser->statement_handler= grddl_parser->saved_statement_handler; } return 0; } /* Run a GRDDL transform using a pre-parsed XSLT stylesheet already * formed into a libxml document (with URI) */ static int raptor_grddl_run_grddl_transform_doc(raptor_parser* rdf_parser, grddl_xml_context* xml_context, xmlDocPtr xslt_doc, xmlDocPtr doc) { raptor_world* world = rdf_parser->world; raptor_grddl_parser_context* grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; int ret=0; xsltStylesheetPtr sheet=NULL; xmlDocPtr res=NULL; xmlChar *doc_txt=NULL; int doc_txt_len=0; const char* parser_name; const char* params[7]; const unsigned char* base_uri_string; size_t base_uri_len; raptor_uri* xslt_uri; raptor_uri* base_uri; char *quoted_base_uri=NULL; xmlGenericErrorFunc saved_xsltGenericError; void *saved_xsltGenericErrorContext; xsltTransformContextPtr userCtxt; xslt_uri=xml_context->uri; base_uri=xml_context->base_uri ? xml_context->base_uri : xml_context->uri; base_uri_string=raptor_uri_as_counted_string_v2(rdf_parser->world, base_uri, &base_uri_len); RAPTOR_DEBUG3("Running GRDDL transform with XSLT URI '%s' with doc base URI '%s'\n", raptor_uri_as_string_v2(rdf_parser->world, xslt_uri), base_uri_string); sheet = xsltParseStylesheetDoc(xslt_doc); if(!sheet) { raptor_parser_error(rdf_parser, "Failed to parse stylesheet in '%s'", raptor_uri_as_string_v2(rdf_parser->world, xslt_uri)); ret=1; goto cleanup_xslt; } userCtxt = xsltNewTransformContext(sheet, doc); if(world->xslt_security_preferences) xsltSetCtxtSecurityPrefs((xsltSecurityPrefs*)world->xslt_security_preferences, userCtxt); saved_xsltGenericError = xsltGenericError; saved_xsltGenericErrorContext = xsltGenericErrorContext; xsltSetGenericErrorFunc(rdf_parser, raptor_grddl_xsltGenericError_handler); #if 1 /* FIXME: * Define 'base', 'Base' and 'url' params to allow some XSLT sheets to work: * base: * http://www.w3.org/2000/07/uri43/uri.xsl * Base: * http://www.w3.org/2000/08/w3c-synd/home2rss.xsl * url: (optional) * http://www.w3.org/2001/sw/grddl-wg/td/RDFa2RDFXML.xsl */ quoted_base_uri=(char*)RAPTOR_MALLOC(cstring, base_uri_len+3); quoted_base_uri[0]='\''; strncpy(quoted_base_uri+1, (const char*)base_uri_string, base_uri_len); quoted_base_uri[base_uri_len+1]='\''; quoted_base_uri[base_uri_len+2]='\0'; params[0]="base"; params[1]=(const char*)quoted_base_uri; params[2]="Base"; params[3]=(const char*)quoted_base_uri; params[4]="url"; params[5]=(const char*)quoted_base_uri; params[6]=NULL; res = xsltApplyStylesheetUser(sheet, doc, params, NULL, NULL, userCtxt); #else /* No params */ res = xsltApplyStylesheetUser(sheet, doc, NULL, NULL, NULL, userCtxt); #endif if(!res) { raptor_parser_error(rdf_parser, "Failed to apply stylesheet in '%s'", raptor_uri_as_string_v2(rdf_parser->world, xslt_uri)); ret=1; goto cleanup_xslt; } if(res->type == XML_HTML_DOCUMENT_NODE) { if(sheet->method != NULL) xmlFree(sheet->method); sheet->method = (xmlChar*)xmlMalloc(5); strncpy((char*)sheet->method, "html", 5); } /* write the resulting XML to a string */ xsltSaveResultToString(&doc_txt, &doc_txt_len, res, sheet); if(!doc_txt || !doc_txt_len) { /* FIXME: continue with an empty document? */ raptor_parser_warning(rdf_parser, "XSLT returned an empty document"); goto cleanup_xslt; } RAPTOR_DEBUG4("XSLT returned %d bytes document method %s media type %s\n", doc_txt_len, (sheet->method ? (const char*)sheet->method : "NULL"), (sheet->mediaType ? (const char*)sheet->mediaType : "NULL")); /* FIXME: Assumes mime types for XSLT <xsl:output method> */ if(sheet->mediaType == NULL && sheet->method) { if(!(strcmp((const char*)sheet->method, "text"))) { sheet->mediaType = (xmlChar*)xmlMalloc(11); strncpy((char*)sheet->mediaType, "text/plain",11); } else if(!(strcmp((const char*)sheet->method, "xml"))) { sheet->mediaType = (xmlChar*)xmlMalloc(16); strncpy((char*)sheet->mediaType, "application/xml",16); } else if(!(strcmp((const char*)sheet->method, "html"))) { sheet->mediaType = (xmlChar*)xmlMalloc(10); /* FIXME: use xhtml mime type? */ strncpy((char*)sheet->mediaType, "text/html",10); } } /* FIXME: Assume all that all media XML is RDF/XML and also that * with no information at all we have RDF/XML */ if(!sheet->mediaType || (sheet->mediaType && !strcmp((const char*)sheet->mediaType, "application/xml"))) { if(sheet->mediaType) xmlFree(sheet->mediaType); sheet->mediaType = (xmlChar*)xmlMalloc(20); strncpy((char*)sheet->mediaType, "application/rdf+xml",20); } parser_name=raptor_guess_parser_name_v2(rdf_parser->world, NULL, (const char*)sheet->mediaType, doc_txt, doc_txt_len, NULL); if(!parser_name) { RAPTOR_DEBUG3("Parser %p: Guessed no parser from mime type '%s' and content - ending", rdf_parser, sheet->mediaType); goto cleanup_xslt; } RAPTOR_DEBUG4("Parser %p: Guessed parser %s from mime type '%s' and content\n", rdf_parser, parser_name, sheet->mediaType); if(!strcmp((const char*)parser_name, "grddl")) { RAPTOR_DEBUG2("Parser %p: Ignoring guess to run grddl parser - ending", rdf_parser); goto cleanup_xslt; } ret=raptor_grddl_ensure_internal_parser(rdf_parser, parser_name, 0); if(ret) goto cleanup_xslt; if(grddl_parser->internal_parser) { grddl_parser->internal_parser->default_generate_id_handler_base= raptor_parser_get_current_base_id(rdf_parser); /* generate the triples */ raptor_start_parse(grddl_parser->internal_parser, base_uri); raptor_parse_chunk(grddl_parser->internal_parser, doc_txt, doc_txt_len, 1); rdf_parser->default_generate_id_handler_base= raptor_parser_get_current_base_id(grddl_parser->internal_parser); } cleanup_xslt: if(userCtxt) xsltFreeTransformContext(userCtxt); if(quoted_base_uri) RAPTOR_FREE(cstring, quoted_base_uri); if(doc_txt) xmlFree(doc_txt); if(res) xmlFreeDoc(res); if(sheet) xsltFreeStylesheet(sheet); xsltSetGenericErrorFunc(saved_xsltGenericErrorContext, saved_xsltGenericError); return ret; } typedef struct { raptor_parser* rdf_parser; xmlParserCtxtPtr xc; raptor_uri* base_uri; } raptor_grddl_xml_parse_bytes_context; static void raptor_grddl_uri_xml_parse_bytes(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb) { raptor_grddl_xml_parse_bytes_context* xpbc=(raptor_grddl_xml_parse_bytes_context*)userdata; int len=size*nmemb; int rc=0; if(!xpbc->xc) { xmlParserCtxtPtr xc; xc = xmlCreatePushParserCtxt(NULL, NULL, (const char*)ptr, len, (const char*)raptor_uri_as_string_v2(www->world, xpbc->base_uri)); if(!xc) rc=1; else { int libxml_options = 0; #ifdef RAPTOR_LIBXML_XML_PARSE_NONET if(xpbc->rdf_parser->features[RAPTOR_FEATURE_NO_NET]) libxml_options |= XML_PARSE_NONET; #endif #ifdef HAVE_XMLCTXTUSEOPTIONS xmlCtxtUseOptions(xc, libxml_options); #endif xc->replaceEntities = 1; xc->loadsubset = 1; } xpbc->xc=xc; } else rc=xmlParseChunk(xpbc->xc, (const char*)ptr, len, 0); if(rc) raptor_parser_error(xpbc->rdf_parser, "XML Parsing failed"); } static void raptor_grddl_discard_message(void *user_data, raptor_locator* locator, const char *message) { #ifdef RAPTOR_DEBUG raptor_world* world=(raptor_world*)user_data; RAPTOR_DEBUG3("%s: Discarded error message: %s\n", raptor_uri_as_string_v2(world, locator->uri), message); #endif return; } #define FETCH_IGNORE_ERRORS 1 #define FETCH_ACCEPT_XSLT 2 static int raptor_grddl_fetch_uri(raptor_parser* rdf_parser, raptor_uri* uri, raptor_www_write_bytes_handler write_bytes_handler, void* write_bytes_user_data, raptor_www_content_type_handler content_type_handler, void* content_type_user_data, int flags) { raptor_www *www; const char *accept_h; int ret=0; int ignore_errors=(flags & FETCH_IGNORE_ERRORS); if(rdf_parser->features[RAPTOR_FEATURE_NO_NET]) { if(!raptor_uri_uri_string_is_file_uri(raptor_uri_as_string_v2(rdf_parser->world, uri))) return 1; } www=raptor_www_new_v2(rdf_parser->world); if(!www) return 1; raptor_www_set_user_agent(www, "grddl/0.1"); if(flags & FETCH_ACCEPT_XSLT) { raptor_www_set_http_accept(www, "application/xml"); } else { accept_h=raptor_parser_get_accept_header(rdf_parser); if(accept_h) { raptor_www_set_http_accept(www, accept_h); RAPTOR_FREE(cstring, accept_h); } } if(rdf_parser->uri_filter) raptor_www_set_uri_filter(www, rdf_parser->uri_filter, rdf_parser->uri_filter_user_data); if(ignore_errors) raptor_www_set_error_handler(www, raptor_grddl_discard_message, rdf_parser->world); else raptor_www_set_error_handler(www, rdf_parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].handler, rdf_parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].user_data); raptor_www_set_write_bytes_handler(www, write_bytes_handler, write_bytes_user_data); raptor_www_set_content_type_handler(www, content_type_handler, content_type_user_data); if(rdf_parser->features[RAPTOR_FEATURE_WWW_TIMEOUT] > 0) raptor_www_set_connection_timeout(www, rdf_parser->features[RAPTOR_FEATURE_WWW_TIMEOUT]); ret=raptor_www_fetch(www, uri); raptor_www_free(www); return ret; } /* Run a GRDDL transform using a XSLT stylesheet at a given URI */ static int raptor_grddl_run_grddl_transform_uri(raptor_parser* rdf_parser, grddl_xml_context* xml_context, xmlDocPtr doc) { raptor_grddl_parser_context* grddl_parser; xmlParserCtxtPtr xslt_ctxt=NULL; raptor_grddl_xml_parse_bytes_context xpbc; int ret=0; raptor_uri* xslt_uri; raptor_uri* base_uri; raptor_uri* old_locator_uri; raptor_locator *locator=&rdf_parser->locator; xslt_uri=xml_context->uri; base_uri=xml_context->base_uri ? xml_context->base_uri : xml_context->uri; grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; RAPTOR_DEBUG3("Running GRDDL transform with XSLT URI %s and base URI %s\n", raptor_uri_as_string_v2(rdf_parser->world, xslt_uri), raptor_uri_as_string_v2(rdf_parser->world, base_uri)); /* make an xsltStylesheetPtr via the raptor_grddl_uri_xml_parse_bytes * callback as bytes are returned */ xpbc.xc=NULL; xpbc.rdf_parser=rdf_parser; xpbc.base_uri=xslt_uri; old_locator_uri=locator->uri; locator->uri=xslt_uri; ret=raptor_grddl_fetch_uri(rdf_parser, xslt_uri, raptor_grddl_uri_xml_parse_bytes, &xpbc, NULL, NULL, FETCH_ACCEPT_XSLT); xslt_ctxt = xpbc.xc; if(ret) { locator->uri=old_locator_uri; raptor_parser_warning(rdf_parser, "Fetching XSLT document URI '%s' failed", raptor_uri_as_string_v2(rdf_parser->world, xslt_uri)); ret=0; } else { xmlParseChunk(xpbc.xc, NULL, 0, 1); ret=raptor_grddl_run_grddl_transform_doc(rdf_parser, xml_context, xslt_ctxt->myDoc, doc); locator->uri=old_locator_uri; } if(xslt_ctxt) xmlFreeParserCtxt(xslt_ctxt); return ret; } static int raptor_grddl_seen_uri(raptor_grddl_parser_context* grddl_parser, raptor_uri* uri) { int i; int seen=0; raptor_sequence* seq=grddl_parser->visited_uris; for(i=0; i < raptor_sequence_size(seq); i++) { raptor_uri* vuri=(raptor_uri*)raptor_sequence_get_at(seq, i); if(raptor_uri_equals_v2(grddl_parser->world, uri, vuri)) { seen=1; break; } } if(seen) RAPTOR_DEBUG2("Already seen URI '%s'\n", raptor_uri_as_string_v2(grddl_parser->world, uri)); return seen; } static void raptor_grddl_done_uri(raptor_grddl_parser_context* grddl_parser, raptor_uri* uri) { if(!grddl_parser->visited_uris) return; if(!raptor_grddl_seen_uri(grddl_parser, uri)) { raptor_sequence* seq=grddl_parser->visited_uris; raptor_sequence_push(seq, raptor_uri_copy_v2(grddl_parser->world, uri)); } } static raptor_sequence* raptor_grddl_run_xpath_match(raptor_parser* rdf_parser, xmlDocPtr doc, const xmlChar* xpathExpr, int flags) { raptor_grddl_parser_context* grddl_parser; /* Evaluate xpath expression */ xmlXPathObjectPtr xpathObj=NULL; raptor_sequence* seq=NULL; xmlNodeSetPtr nodes; int i; grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; seq=raptor_new_sequence((raptor_sequence_free_handler*)grddl_free_xml_context, NULL); /* Evaluate xpath expression */ xpathObj = xmlXPathEvalExpression(xpathExpr, grddl_parser->xpathCtx); if(!xpathObj) { raptor_parser_error(rdf_parser, "Unable to evaluate XPath expression \"%s\"", xpathExpr); raptor_free_sequence(seq); seq=NULL; goto cleanup_xpath_match; } nodes=xpathObj->nodesetval; if(!nodes || xmlXPathNodeSetIsEmpty(nodes)) { #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("No match found with XPath expression \"%s\" over '%s'\n", xpathExpr, raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri)); #endif raptor_free_sequence(seq); seq=NULL; goto cleanup_xpath_match; } #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("Found match with XPath expression \"%s\" over '%s'\n", xpathExpr, raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri)); #endif for(i=0; i < xmlXPathNodeSetGetLength(nodes); i++) { xmlNodePtr node=nodes->nodeTab[i]; const unsigned char* uri_string=NULL; xmlChar *base_uri_string; raptor_uri* base_uri=NULL; raptor_uri* uri=NULL; if(node->type != XML_ATTRIBUTE_NODE && node->type != XML_ELEMENT_NODE) { raptor_parser_error(rdf_parser, "Got unexpected node type %d", node->type); continue; } /* xmlNodeGetBase() returns base URI or NULL and must be freed * with xmlFree() */ if(grddl_parser->html_base_processing) { xmlElementType savedType=doc->type; doc->type=XML_HTML_DOCUMENT_NODE; base_uri_string=xmlNodeGetBase(doc, node); doc->type=savedType; } else base_uri_string=xmlNodeGetBase(doc, node); if(node->type == XML_ATTRIBUTE_NODE) uri_string=(const unsigned char*)node->children->content; else { /* XML_ELEMENT_NODE */ if(node->ns) uri_string=(const unsigned char*)node->ns->href; } if(base_uri_string) { base_uri=raptor_new_uri_v2(rdf_parser->world, base_uri_string); xmlFree(base_uri_string); #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("XML base URI of match is '%s'\n", raptor_uri_as_string_v2(rdf_parser->world, base_uri)); #endif } else if(rdf_parser->base_uri) base_uri=raptor_uri_copy_v2(rdf_parser->world, rdf_parser->base_uri); else base_uri=NULL; if(flags & MATCH_IS_VALUE_LIST) { char *start; char *end; char* buffer; size_t list_len=strlen((const char*)uri_string); buffer=(char*)RAPTOR_MALLOC(cstring, list_len+1); strncpy(buffer, (const char*)uri_string, list_len+1); for(start=end=buffer; end; start=end+1) { grddl_xml_context* xml_context; end=strchr(start, ' '); if(end) *end='\0'; if(start == end) continue; #if RAPTOR_DEBUG RAPTOR_DEBUG2("Got list match URI '%s'\n", start); #endif uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, base_uri, (const unsigned char*)start); if(flags & MATCH_IS_PROFILE && !strcmp((const char*)raptor_uri_as_string_v2(rdf_parser->world, uri), "http://www.w3.org/2003/g/data-view'")) { raptor_free_uri_v2(rdf_parser->world, uri); continue; } xml_context=raptor_new_xml_context(rdf_parser->world, uri, base_uri); raptor_sequence_push(seq, xml_context); } RAPTOR_FREE(cstring, buffer); } else if (flags & MATCH_IS_HARDCODED) { #if RAPTOR_DEBUG RAPTOR_DEBUG2("Got hardcoded XSLT match for %s\n", xpathExpr); #endif /* return at first match, that's enough */ break; } else { grddl_xml_context* xml_context; #if RAPTOR_DEBUG RAPTOR_DEBUG2("Got single match URI '%s'\n", uri_string); #endif uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, base_uri, uri_string); xml_context=raptor_new_xml_context(rdf_parser->world, uri, base_uri); raptor_sequence_push(seq, xml_context); raptor_free_uri_v2(rdf_parser->world, uri); } if(base_uri) raptor_free_uri_v2(rdf_parser->world, base_uri); } cleanup_xpath_match: if(xpathObj) xmlXPathFreeObject(xpathObj); return seq; } static void raptor_grddl_check_recursive_content_type_handler(raptor_www* www, void* userdata, const char* content_type) { raptor_parser* rdf_parser=(raptor_parser*)userdata; raptor_grddl_parser_context* grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; size_t len; if(!content_type) return; len=strlen(content_type)+1; if(grddl_parser->content_type) RAPTOR_FREE(cstring,grddl_parser->content_type); grddl_parser->content_type=(char*)RAPTOR_MALLOC(cstring, len+1); strncpy(grddl_parser->content_type, content_type, len+1); if(!strncmp(content_type, "application/rdf+xml", 19)) { grddl_parser->process_this_as_rdfxml=1; RAPTOR_DEBUG2("Parser %p: Found RDF/XML content type\n", rdf_parser); raptor_parser_save_content(rdf_parser, 1); } if(!strncmp(content_type, "text/html", 9) || !strncmp(content_type, "application/html+xml", 20)) { RAPTOR_DEBUG3("Parser %p: Found HTML content type '%s'\n", rdf_parser, content_type); grddl_parser->html_base_processing=1; } } #define RECURSIVE_FLAGS_IGNORE_ERRORS 1 #define RECURSIVE_FLAGS_FILTER 2 static int raptor_grddl_run_recursive(raptor_parser* rdf_parser, raptor_uri* uri, const char *parser_name, int flags) { raptor_grddl_parser_context* grddl_parser; raptor_www_content_type_handler content_type_handler=NULL; int ret=0; const unsigned char* ibuffer=NULL; size_t ibuffer_len=0; raptor_parse_bytes_context rpbc; int ignore_errors=(flags & RECURSIVE_FLAGS_IGNORE_ERRORS) > 0; int filter=(flags & RECURSIVE_FLAGS_FILTER) > 0; int fetch_uri_flags=0; int is_grddl=!strcmp(parser_name, "grddl"); grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; if(raptor_grddl_seen_uri(grddl_parser, uri)) return 0; if(is_grddl) content_type_handler=raptor_grddl_check_recursive_content_type_handler; if(raptor_grddl_ensure_internal_parser(rdf_parser, parser_name, filter)) return !ignore_errors; RAPTOR_DEBUG3("Running recursive %s operation on URI '%s'\n", parser_name, raptor_uri_as_string_v2(rdf_parser->world, uri)); grddl_parser->internal_parser->default_generate_id_handler_base= raptor_parser_get_current_base_id(rdf_parser); if(is_grddl) raptor_grddl_parser_add_parent(grddl_parser->internal_parser, grddl_parser); rpbc.rdf_parser=grddl_parser->internal_parser; rpbc.base_uri=NULL; rpbc.final_uri=NULL; rpbc.started=0; if(ignore_errors) fetch_uri_flags |=FETCH_IGNORE_ERRORS; if(raptor_grddl_fetch_uri(grddl_parser->internal_parser, uri, raptor_parse_uri_write_bytes, &rpbc, content_type_handler, grddl_parser->internal_parser, fetch_uri_flags)) { if(!ignore_errors) raptor_parser_warning(rdf_parser, "Fetching GRDDL document URI '%s' failed\n", raptor_uri_as_string_v2(rdf_parser->world, uri)); ret=0; goto tidy; } if(ignore_errors) { raptor_error_handlers* eh=&grddl_parser->internal_parser->error_handlers; int i; /* NOTE not setting RAPTOR_LOG_LEVEL_NONE handler */ for(i=1; i <= (int)eh->last_log_level; i++) { eh->handlers[i].handler=raptor_grddl_discard_message; eh->handlers[i].user_data=rdf_parser->world; } } raptor_parse_chunk(grddl_parser->internal_parser, NULL, 0, 1); rdf_parser->default_generate_id_handler_base= raptor_parser_get_current_base_id(grddl_parser->internal_parser); /* If content was saved, process it as RDF/XML */ ibuffer=raptor_parser_get_content(grddl_parser->internal_parser, &ibuffer_len); if(ibuffer && strcmp(parser_name, "rdfxml")) { RAPTOR_DEBUG2("Running additional RDF/XML parse on URI '%s' content\n", raptor_uri_as_string_v2(rdf_parser->world, uri)); if(raptor_grddl_ensure_internal_parser(rdf_parser, "rdfxml", 1)) ret=1; else { grddl_parser->internal_parser->default_generate_id_handler_base= raptor_parser_get_current_base_id(rdf_parser); if(raptor_start_parse(grddl_parser->internal_parser, uri)) ret=1; else { ret=raptor_parse_chunk(grddl_parser->internal_parser, ibuffer, ibuffer_len, 1); rdf_parser->default_generate_id_handler_base= raptor_parser_get_current_base_id(grddl_parser->internal_parser); } } RAPTOR_FREE(cstring, ibuffer); raptor_parser_save_content(grddl_parser->internal_parser, 0); } if(rpbc.final_uri) raptor_free_uri_v2(rdf_parser->world, rpbc.final_uri); if(ignore_errors) ret=0; tidy: return ret; } static void raptor_grddl_libxml_discard_error(void* user_data, const char *msg, ...) { return; } static int raptor_grddl_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { raptor_grddl_parser_context* grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; int i; int ret=0; const unsigned char* uri_string; raptor_uri* uri; /* XML document DOM */ xmlDocPtr doc; int expri; const unsigned char* buffer=NULL; size_t buffer_len=0; int buffer_is_libxml=0; int loop; raptor_error_handlers eh; if(grddl_parser->content_type && !grddl_parser->content_type_check) { grddl_parser->content_type_check++; if(!strncmp(grddl_parser->content_type, "application/rdf+xml", 19)) { RAPTOR_DEBUG3("Parser %p: Found document with type '%s' is RDF/XML\n", rdf_parser, grddl_parser->content_type); grddl_parser->process_this_as_rdfxml=1; } if(!strncmp(grddl_parser->content_type, "text/html", 9) || !strncmp(grddl_parser->content_type, "application/html+xml", 20)) { RAPTOR_DEBUG3("Parser %p: Found document with type '%s' is HTML\n", rdf_parser, grddl_parser->content_type); grddl_parser->html_base_processing=1; } } if(!grddl_parser->sb) grddl_parser->sb=raptor_new_stringbuffer(); raptor_stringbuffer_append_counted_string(grddl_parser->sb, s, len, 1); if(!is_end) return 0; buffer_len=raptor_stringbuffer_length(grddl_parser->sb); buffer=(const unsigned char*)RAPTOR_MALLOC(cstring, buffer_len+1); if(buffer) raptor_stringbuffer_copy_to_string(grddl_parser->sb, (unsigned char*)buffer, buffer_len); uri_string=raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri); if(1) { raptor_error_handlers_init_v2(rdf_parser->world, &eh); eh.last_log_level=rdf_parser->error_handlers.last_log_level; /* Save error handlers and discard parsing errors * NOTE not setting RAPTOR_LOG_LEVEL_NONE handler */ for(i = RAPTOR_LOG_LEVEL_NONE; i <= (int)eh.last_log_level; i++) { eh.handlers[i].handler = rdf_parser->error_handlers.handlers[i].handler; eh.handlers[i].user_data = rdf_parser->error_handlers.handlers[i].user_data; if(i > RAPTOR_LOG_LEVEL_NONE) { rdf_parser->error_handlers.handlers[i].handler = raptor_grddl_discard_message; rdf_parser->error_handlers.handlers[i].user_data = rdf_parser->world; } } } RAPTOR_DEBUG4("Parser %p: URI %s: processing %d bytes of content\n", rdf_parser, uri_string, (int)buffer_len); for(loop=0; loop<2; loop++) { int rc; if(loop == 0) { int libxml_options = 0; RAPTOR_DEBUG2("Parser %p: Creating an XML parser\n", rdf_parser); /* try to create an XML parser context */ grddl_parser->xml_ctxt = xmlCreatePushParserCtxt(NULL, NULL, (const char*)buffer, buffer_len, (const char*)uri_string); if(!grddl_parser->xml_ctxt) { RAPTOR_DEBUG2("Parser %p: Creating an XML parser failed\n", rdf_parser); continue; } #ifdef RAPTOR_LIBXML_XML_PARSE_NONET if(rdf_parser->features[RAPTOR_FEATURE_NO_NET]) libxml_options |= XML_PARSE_NONET; #endif #ifdef HAVE_XMLCTXTUSEOPTIONS xmlCtxtUseOptions(grddl_parser->xml_ctxt, libxml_options); #endif grddl_parser->xml_ctxt->vctxt.warning = raptor_grddl_libxml_discard_error; grddl_parser->xml_ctxt->vctxt.error = raptor_grddl_libxml_discard_error; grddl_parser->xml_ctxt->replaceEntities = 1; grddl_parser->xml_ctxt->loadsubset = 1; } else if (loop == 1) { /* try to create an HTML parser context */ if(rdf_parser->features[RAPTOR_FEATURE_HTML_TAG_SOUP]) { xmlCharEncoding enc; int options; RAPTOR_DEBUG2("Parser %p: Creating an HTML parser\n", rdf_parser); enc = xmlDetectCharEncoding((const unsigned char*)buffer, buffer_len); grddl_parser->html_ctxt = htmlCreatePushParserCtxt(/*sax*/ NULL, /*user_data*/ NULL, (const char *)buffer, buffer_len, (const char *)uri_string, enc); if(!grddl_parser->html_ctxt) { RAPTOR_DEBUG2("Parser %p: Creating an HTML parser failed\n", rdf_parser); continue; } /* HTML parser */ grddl_parser->html_ctxt->replaceEntities = 1; grddl_parser->html_ctxt->loadsubset = 1; grddl_parser->html_ctxt->vctxt.error = raptor_grddl_libxml_discard_error; /* HTML_PARSE_NOWARNING disables sax->warning, vxtxt.warning */ /* HTML_PARSE_NOERROR disables sax->error, vctxt.error */ options = HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING; #ifdef HTML_PARSE_RECOVER options |= HTML_PARSE_RECOVER; #endif #ifdef RAPTOR_LIBXML_HTML_PARSE_NONET if(rdf_parser->features[RAPTOR_FEATURE_NO_NET]) options |= HTML_PARSE_NONET; #endif htmlCtxtUseOptions(grddl_parser->html_ctxt, options); } else continue; } else continue; xmlSetStructuredErrorFunc(&rdf_parser->error_handlers, raptor_libxml_xmlStructuredErrorFunc); rc=0; if(grddl_parser->html_ctxt) { RAPTOR_DEBUG2("Parser %p: Parsing as HTML\n", rdf_parser); rc=htmlParseChunk(grddl_parser->html_ctxt, (const char*)s, 0, 1); RAPTOR_DEBUG3("Parser %p: Parsing as HTML %s\n", rdf_parser, (rc ? "failed" : "succeeded")); if(rc) { if(grddl_parser->html_ctxt->myDoc) { xmlFreeDoc(grddl_parser->html_ctxt->myDoc); grddl_parser->html_ctxt->myDoc=NULL; } htmlFreeParserCtxt(grddl_parser->html_ctxt); grddl_parser->html_ctxt=NULL; } } else { RAPTOR_DEBUG2("Parser %p: Parsing as XML\n", rdf_parser); rc=xmlParseChunk(grddl_parser->xml_ctxt, (const char*)s, 0, 1); RAPTOR_DEBUG3("Parser %p: Parsing as XML %s\n", rdf_parser, (rc ? "failed" : "succeeded")); if(rc) { if(grddl_parser->xml_ctxt->myDoc) { xmlFreeDoc(grddl_parser->xml_ctxt->myDoc); grddl_parser->xml_ctxt->myDoc=NULL; } xmlFreeParserCtxt(grddl_parser->xml_ctxt); grddl_parser->xml_ctxt=NULL; } } if(!rc) break; } if(1) { /* Restore error handlers */ for(i = RAPTOR_LOG_LEVEL_NONE + 1; i<= (int)eh.last_log_level; i++) { rdf_parser->error_handlers.handlers[i].handler = eh.handlers[i].handler; rdf_parser->error_handlers.handlers[i].user_data = eh.handlers[i].user_data; } } if(!grddl_parser->html_ctxt && !grddl_parser->xml_ctxt) { raptor_parser_error(rdf_parser, "Failed to create HTML or XML parsers"); ret=1; goto tidy; } raptor_grddl_done_uri(grddl_parser, rdf_parser->base_uri); if(grddl_parser->html_ctxt) doc=grddl_parser->html_ctxt->myDoc; else doc=grddl_parser->xml_ctxt->myDoc; if(!doc) { raptor_parser_error(rdf_parser, "Failed to create XML DOM for GRDDL document"); ret=1; goto tidy; } if(!grddl_parser->grddl_processing) goto transform; if(grddl_parser->xinclude_processing) { RAPTOR_DEBUG3("Parser %p: Running XInclude processing on URI '%s'\n", rdf_parser, raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri)); if(xmlXIncludeProcess(doc) < 0) { raptor_parser_error(rdf_parser, "XInclude processing failed for GRDDL document"); ret=1; goto tidy; } else { int blen; /* write the result of XML Include to buffer */ RAPTOR_FREE(cstring, buffer); xmlDocDumpFormatMemory(doc, (xmlChar**)&buffer, &blen, 1 /* indent the result */); buffer_len=blen; buffer_is_libxml=1; RAPTOR_DEBUG3("Parser %p: XML Include processing returned %d bytes document\n", rdf_parser, (int)buffer_len); } } RAPTOR_DEBUG3("Parser %p: Running top-level GRDDL on URI '%s'\n", rdf_parser, raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri)); /* Work out if there is a root namespace URI */ if(1) { xmlNodePtr xnp; xmlNsPtr rootNs = NULL; const unsigned char* ns_uri_string=NULL; xnp = xmlDocGetRootElement(doc); if(xnp) { rootNs = xnp->ns; if(rootNs) ns_uri_string = (const unsigned char*)(rootNs->href); } if(ns_uri_string) { int n; RAPTOR_DEBUG3("Parser %p: Root namespace URI is %s\n", rdf_parser, ns_uri_string); if(!strcmp((const char*)ns_uri_string, (const char*)raptor_rdf_namespace_uri) && !strcmp((const char*)xnp->name, "RDF")) { RAPTOR_DEBUG3("Parser %p: Root element of %s is rdf:RDF - process this as RDF/XML later\n", rdf_parser, raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri)); grddl_parser->process_this_as_rdfxml=1; } for(n=0; grddl_namespace_uris_ignore_list[n]; n++) { if(!strcmp(grddl_namespace_uris_ignore_list[n], (const char*)ns_uri_string)) { /* ignore this namespace */ RAPTOR_DEBUG3("Parser %p: Ignoring GRDDL for namespace URI '%s'\n", rdf_parser, ns_uri_string); ns_uri_string=NULL; break; } } if(ns_uri_string) { grddl_xml_context* xml_context; grddl_parser->root_ns_uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, rdf_parser->base_uri, ns_uri_string); xml_context=raptor_new_xml_context(rdf_parser->world, grddl_parser->root_ns_uri, rdf_parser->base_uri); raptor_sequence_push(grddl_parser->profile_uris, xml_context); RAPTOR_DEBUG3("Parser %p: Processing GRDDL namespace URI '%s'\n", rdf_parser, raptor_uri_as_string_v2(rdf_parser->world, grddl_parser->root_ns_uri)); raptor_grddl_run_recursive(rdf_parser, grddl_parser->root_ns_uri, "grddl", RECURSIVE_FLAGS_IGNORE_ERRORS | RECURSIVE_FLAGS_FILTER); } } } /* Always put something at the start of the list even if NULL * so later it can be searched for in output triples */ if(!grddl_parser->root_ns_uri) { grddl_xml_context* xml_context; xml_context=raptor_new_xml_context(rdf_parser->world, NULL, NULL); raptor_sequence_push(grddl_parser->profile_uris, xml_context); } /* Create the XPath evaluation context */ if(!grddl_parser->xpathCtx) { grddl_parser->xpathCtx = xmlXPathNewContext(doc); if(!grddl_parser->xpathCtx) { raptor_parser_error(rdf_parser, "Failed to create XPath context for GRDDL document"); ret=1; goto tidy; } xmlXPathRegisterNs(grddl_parser->xpathCtx, (const xmlChar*)"html", (const xmlChar*)"http://www.w3.org/1999/xhtml"); xmlXPathRegisterNs(grddl_parser->xpathCtx, (const xmlChar*)"dataview", (const xmlChar*)"http://www.w3.org/2003/g/data-view#"); } /* Try <head profile> URIs */ if(1) { raptor_sequence* result; result=raptor_grddl_run_xpath_match(rdf_parser, doc, (const xmlChar*)"/html:html/html:head/@profile", MATCH_IS_VALUE_LIST | MATCH_IS_PROFILE); if(result) { RAPTOR_DEBUG4("Parser %p: Found %d <head profile> URIs in URI '%s'\n", rdf_parser, raptor_sequence_size(result), raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri)); /* Store profile URIs, skipping NULLs or the GRDDL profile itself */ while(raptor_sequence_size(result)) { grddl_xml_context* xml_context; xml_context=(grddl_xml_context*)raptor_sequence_unshift(result); if(!xml_context) continue; uri=xml_context->uri; if(!strcmp("http://www.w3.org/2003/g/data-view", (const char*)raptor_uri_as_string_v2(rdf_parser->world, uri))) { RAPTOR_DEBUG3("Ignoring <head profile> of URI %s: URI %s\n", raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri), raptor_uri_as_string_v2(rdf_parser->world, uri)); grddl_free_xml_context(rdf_parser->world, xml_context); continue; } raptor_sequence_push(grddl_parser->profile_uris, xml_context); } raptor_free_sequence(result); /* Recursive GRDDL through all the <head profile> URIs */ for(i=1; i < raptor_sequence_size(grddl_parser->profile_uris); i++) { grddl_xml_context* xml_context=(grddl_xml_context*)raptor_sequence_get_at(grddl_parser->profile_uris, i); uri=xml_context->uri; if(!uri) continue; RAPTOR_DEBUG4("Processing <head profile> #%d of URI %s: URI %s\n", i, raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri), raptor_uri_as_string_v2(rdf_parser->world, uri)); ret=raptor_grddl_run_recursive(rdf_parser, uri, "grddl", RECURSIVE_FLAGS_IGNORE_ERRORS| RECURSIVE_FLAGS_FILTER); } } } /* end head profile URIs */ /* Try XHTML document with alternate forms * <link type="application/rdf+xml" href="URI" /> * Value of @href is a URI */ if(grddl_parser->html_link_processing && rdf_parser->features[RAPTOR_FEATURE_HTML_LINK]) { raptor_sequence* result; result=raptor_grddl_run_xpath_match(rdf_parser, doc, (const xmlChar*)"/html:html/html:head/html:link[@type=\"application/rdf+xml\"]/@href", 0); if(result) { RAPTOR_DEBUG4("Parser %p: Found %d <link> URIs in URI '%s'\n", rdf_parser, raptor_sequence_size(result), raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri)); /* Recursively parse all the <link> URIs, skipping NULLs */ i=0; while(raptor_sequence_size(result)) { grddl_xml_context* xml_context; xml_context=(grddl_xml_context*)raptor_sequence_unshift(result); if(!xml_context) continue; uri=xml_context->uri; if(uri) { RAPTOR_DEBUG4("Processing <link> #%d of URI %s: URI %s\n", i, raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri), raptor_uri_as_string_v2(rdf_parser->world, uri)); i++; ret=raptor_grddl_run_recursive(rdf_parser, uri, "guess", RECURSIVE_FLAGS_IGNORE_ERRORS); } grddl_free_xml_context(rdf_parser->world, xml_context); } raptor_free_sequence(result); } } /* Try all XPaths */ for(expri=0; match_table[expri].xpath; expri++) { raptor_sequence* result; int flags=match_table[expri].flags; if((flags & MATCH_IS_HARDCODED) && !rdf_parser->features[RAPTOR_FEATURE_MICROFORMATS]) continue; result=raptor_grddl_run_xpath_match(rdf_parser, doc, match_table[expri].xpath, flags); if(result) { if(match_table[expri].xslt_sheet_uri) { grddl_xml_context* xml_context; /* Ignore what matched, use a hardcoded XSLT URI */ uri_string=match_table[expri].xslt_sheet_uri; RAPTOR_DEBUG3("Parser %p: Using hard-coded XSLT URI '%s'\n", rdf_parser, uri_string); raptor_free_sequence(result); result=raptor_new_sequence((raptor_sequence_free_handler*)grddl_free_xml_context, NULL); uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, rdf_parser->base_uri, uri_string); xml_context=raptor_new_xml_context(rdf_parser->world, uri, rdf_parser->base_uri); raptor_sequence_push(result, xml_context); raptor_free_uri_v2(rdf_parser->world, uri); } while(raptor_sequence_size(result)) { grddl_xml_context* xml_context=(grddl_xml_context*)raptor_sequence_unshift(result); if(!xml_context) break; raptor_grddl_add_transform_xml_context(grddl_parser, xml_context); } raptor_free_sequence(result); if(flags & MATCH_LAST) break; } if(rdf_parser->failed) break; } /* end XPath expression loop */ if(rdf_parser->failed) { ret=1; goto tidy; } /* Process this document's content buffer as RDF/XML */ if(grddl_parser->process_this_as_rdfxml && buffer) { RAPTOR_DEBUG3("Parser %p: Running additional RDF/XML parse on root document URI '%s' content\n", rdf_parser, raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri)); if(raptor_grddl_ensure_internal_parser(rdf_parser, "rdfxml", 0)) ret=1; else { grddl_parser->internal_parser->default_generate_id_handler_base= raptor_parser_get_current_base_id(rdf_parser); if(raptor_start_parse(grddl_parser->internal_parser, rdf_parser->base_uri)) ret=1; else { ret=raptor_parse_chunk(grddl_parser->internal_parser, buffer, buffer_len, 1); rdf_parser->default_generate_id_handler_base= raptor_parser_get_current_base_id(grddl_parser->internal_parser); } } } /* Apply all transformation URIs seen */ transform: while(raptor_sequence_size(grddl_parser->doc_transform_uris)) { grddl_xml_context* xml_context=(grddl_xml_context*)raptor_sequence_unshift(grddl_parser->doc_transform_uris); ret=raptor_grddl_run_grddl_transform_uri(rdf_parser, xml_context, doc); grddl_free_xml_context(rdf_parser->world, xml_context); if(ret) break; } tidy: if(buffer) { if(buffer_is_libxml) xmlFree((xmlChar*)buffer); else RAPTOR_FREE(cstring, buffer); } if(grddl_parser->sb) { raptor_free_stringbuffer(grddl_parser->sb); grddl_parser->sb=NULL; } if(grddl_parser->xml_ctxt) { if(grddl_parser->xml_ctxt->myDoc) { xmlFreeDoc(grddl_parser->xml_ctxt->myDoc); grddl_parser->xml_ctxt->myDoc=NULL; } xmlFreeParserCtxt(grddl_parser->xml_ctxt); grddl_parser->xml_ctxt=NULL; } if(grddl_parser->html_ctxt) { if(grddl_parser->html_ctxt->myDoc) { xmlFreeDoc(grddl_parser->html_ctxt->myDoc); grddl_parser->html_ctxt->myDoc=NULL; } xmlFreeParserCtxt(grddl_parser->html_ctxt); grddl_parser->html_ctxt=NULL; } if(grddl_parser->xpathCtx) { xmlXPathFreeContext(grddl_parser->xpathCtx); grddl_parser->xpathCtx=NULL; } return (ret != 0); } static int raptor_grddl_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "xhtml")) score=4; if(!strcmp((const char*)suffix, "html")) score=2; } else if(identifier) { if(strstr((const char*)identifier, "xhtml")) score=4; } return score; } static void raptor_grddl_parse_content_type_handler(raptor_parser* rdf_parser, const char* content_type) { raptor_grddl_parser_context* grddl_parser=(raptor_grddl_parser_context*)rdf_parser->context; if(content_type) { size_t len=strlen(content_type)+1; if(grddl_parser->content_type) RAPTOR_FREE(cstring,grddl_parser->content_type); grddl_parser->content_type=(char*)RAPTOR_MALLOC(cstring, len+1); strncpy(grddl_parser->content_type, content_type, len+1); } } static int raptor_grddl_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_grddl_parser_context); factory->need_base_uri = 1; factory->init = raptor_grddl_parse_init; factory->terminate = raptor_grddl_parse_terminate; factory->start = raptor_grddl_parse_start; factory->chunk = raptor_grddl_parse_chunk; factory->recognise_syntax = raptor_grddl_parse_recognise_syntax; factory->content_type_handler= raptor_grddl_parse_content_type_handler; rc+= raptor_parser_factory_add_mime_type(factory, "text/html", 2) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/xhtml+xml", 4) != 0; return rc; } int raptor_init_parser_grddl_common(raptor_world* world) { #ifdef HAVE_XSLTINIT xsltInit(); #endif if(world->xslt_security_preferences == NULL) { xsltSecurityPrefsPtr raptor_xslt_sec = NULL; raptor_xslt_sec = xsltNewSecurityPrefs(); xsltSetDefaultSecurityPrefs(raptor_xslt_sec); /* no read from file (read from URI with scheme = file) */ xsltSetSecurityPrefs(raptor_xslt_sec, XSLT_SECPREF_READ_FILE, xsltSecurityForbid); /* no create/write to file */ xsltSetSecurityPrefs(raptor_xslt_sec, XSLT_SECPREF_WRITE_FILE, xsltSecurityForbid); /* no create directory */ xsltSetSecurityPrefs(raptor_xslt_sec, XSLT_SECPREF_CREATE_DIRECTORY, xsltSecurityForbid); /* yes read from URI with scheme != file (XSLT_SECPREF_READ_NETWORK) */ /* no write to network (you can 'write' with GET params anyway) */ xsltSetSecurityPrefs(raptor_xslt_sec, XSLT_SECPREF_WRITE_NETWORK, xsltSecurityForbid); world->xslt_security_preferences = (void*)raptor_xslt_sec; world->free_xslt_security_preferences = 1; } return 0; } int raptor_init_parser_grddl(raptor_world* world) { return !raptor_parser_register_factory(world, "grddl", "Gleaning Resource Descriptions from Dialects of Languages", &raptor_grddl_parser_register_factory); } void raptor_terminate_parser_grddl_common(raptor_world *world) { xsltCleanupGlobals(); if(world->xslt_security_preferences && world->free_xslt_security_preferences) xsltFreeSecurityPrefs((xsltSecurityPrefsPtr)world->xslt_security_preferences); } ����������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/win32_raptor_config.h�������������������������������������������������������������0000644�0001750�0001750�00000007723�11330672502�014655� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * win32_config.h - Raptor WIN32 hard-coded config * * Copyright (C) 2002-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef WIN32_CONFIG_H #define WIN32_CONFIG_H #ifdef __cplusplus extern "C" { #endif #define WIN32_LEAN_AND_MEAN 1 /* getopt is not in standard win32 C library - define if we have it */ /* #define HAVE_GETOPT_H 1 */ #define HAVE_STDLIB_H 1 #if 0 /* For using expat on win32 */ #define RAPTOR_XML_EXPAT 1 #define HAVE_EXPAT_H 1 #else /* For using libxml2 on win32 */ #define RAPTOR_XML_LIBXML #define HAVE_LIBXML_XMLREADER_H /* does libxml struct xmlEntity have a field etype */ /*#define RAPTOR_LIBXML_ENTITY_ETYPE*/ /* does libxml struct xmlEntity have a field name_length */ /*#define RAPTOR_LIBXML_ENTITY_NAME_LENGTH*/ /* Define to 1 if you have the `xmlCtxtUseOptions' function. */ #define HAVE_XMLCTXTUSEOPTIONS 1 /* Define to 1 if you have the `xmlSAX2InternalSubset' function. */ #define HAVE_XMLSAX2INTERNALSUBSET 1 /* does libxml xmlSAXHandler have externalSubset field */ /*#define RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET*/ /* does libxml xmlSAXHandler have initialized field */ /*#define RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED*/ #endif #define HAVE_STRICMP 1 /* MS names for these functions */ #define vsnprintf _vsnprintf #define snprintf _snprintf #define access _access #define stricmp _stricmp #define strnicmp _strnicmp /*#define HAVE_C99_VSNPRINTF */ /* for access() which is POSIX but doesn't seem to have the defines in VC */ #ifndef R_OK #define R_OK 4 #endif /* __func__ doesn't exist in Visual Studio 6 */ #define __func__ "" /* * Defines that come from config.h */ /* Release version as a decimal */ #define RAPTOR_VERSION_DECIMAL 10421 /* Major version number */ #define RAPTOR_VERSION_MAJOR 1 /* Minor version number */ #define RAPTOR_VERSION_MINOR 4 /* Release version number */ #define RAPTOR_VERSION_RELEASE 21 /* Version number of package */ #define VERSION "1.4.21" #ifdef RAPTOR_XML_LIBXML /* RSS parser needs libxml 2.5.x+ */ #define RAPTOR_PARSER_RSS 1 #else #undef RAPTOR_PARSER_RSS #endif #define RAPTOR_PARSER_GUESS 1 #define RAPTOR_PARSER_GRDDL 1 #define RAPTOR_PARSER_N3 1 #define RAPTOR_PARSER_TURTLE 1 #define RAPTOR_PARSER_NTRIPLES 1 #define RAPTOR_PARSER_RDFXML 1 #define RAPTOR_SERIALIZER_ATOM 1 #define RAPTOR_SERIALIZER_RSS_1_0 1 #define RAPTOR_SERIALIZER_RDFXML 1 #define RAPTOR_SERIALIZER_RDFXML_ABBREV 1 #define RAPTOR_SERIALIZER_NTRIPLES 1 #define RAPTOR_WWW_LIBCURL 1 #include <windows.h> #include <io.h> #include <memory.h> /* bison: output uses ERROR in an enum which breaks if this is defined */ #ifdef ERROR #undef ERROR #endif /* flex: const is available */ #define YY_USE_CONST #undef RAPTOR_INLINE #define RAPTOR_INLINE __inline /* The size of a `unsigned char', as computed by sizeof. */ #define SIZEOF_UNSIGNED_CHAR 1 /* The size of a `unsigned short', as computed by sizeof. */ #define SIZEOF_UNSIGNED_SHORT 2 /* The size of a `unsigned int', as computed by sizeof. */ #define SIZEOF_UNSIGNED_INT 4 /* The size of a `unsigned long', as computed by sizeof. */ #define SIZEOF_UNSIGNED_LONG 4 /* The size of a `unsigned long long', as computed by sizeof. */ #define SIZEOF_UNSIGNED_LONG_LONG 8 #ifdef __cplusplus } #endif #endif ���������������������������������������������raptor-1.4.21/src/Makefile.am�����������������������������������������������������������������������0000644�0001750�0001750�00000023041�11330672502�012651� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor libraptor # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # bin_SCRIPTS = raptor-config lib_LTLIBRARIES = libraptor.la include_HEADERS = raptor.h noinst_HEADERS = raptor_internal.h win32_raptor_config.h man_MANS = raptor-config.1 TESTS=raptor_parse_test raptor_rfc2396_test raptor_uri_test \ raptor_namespace_test strcasecmp_test raptor_www_test \ raptor_sequence_test raptor_stringbuffer_test \ raptor_uri_win32_test raptor_iostream_test raptor_xml_writer_test \ raptor_turtle_writer_test raptor_avltree_test if RAPTOR_PARSER_RDFXML TESTS += raptor_set_test raptor_xml_test endif CLEANFILES=$(TESTS) \ turtle_lexer_test turtle_parser_test \ n3_lexer_test n3_parser_test \ rdfdiff MAINTAINERCLEANFILES=turtle_lexer.c turtle_lexer.h \ turtle_parser.c turtle_parser.h turtle_parser.output \ n3_lexer.c n3_lexer.h \ n3_parser.c n3_parser.h n3_parser.output # Memory debugging MEM=@MEM@ MEM_LIBS=@MEM_LIBS@ AM_CPPFLAGS = $(MEM) libraptor_la_SOURCES = raptor_parse.c raptor_serialize.c \ raptor_rfc2396.c raptor_uri.c raptor_locator.c \ raptor_namespace.c raptor_qname.c \ raptor_feature.c raptor_general.c raptor_utf8.c \ raptor_www.c \ raptor_identifier.c raptor_statement.c \ raptor_sequence.c raptor_stringbuffer.c raptor_iostream.c \ raptor_xml.c raptor_xml_writer.c raptor_set.c turtle_common.c \ raptor_turtle_writer.c raptor_xsd.c raptor_avltree.c snprintf.c \ raptor_json_writer.c raptor_memstr.c if RAPTOR_PARSER_RDFXML if RAPTOR_XML_LIBXML libraptor_la_SOURCES += raptor_libxml.c endif if RAPTOR_XML_EXPAT libraptor_la_SOURCES += raptor_expat.c endif libraptor_la_SOURCES += raptor_rdfxml.c raptor_sax2.c endif if RAPTOR_PARSER_TURTLE libraptor_la_SOURCES += turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h turtle_common.h else if RAPTOR_PARSER_TRIG libraptor_la_SOURCES += turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h turtle_common.h endif endif if RAPTOR_PARSER_N3 libraptor_la_SOURCES += n3_lexer.c n3_lexer.h n3_parser.c n3_parser.h n3_common.h endif if RAPTOR_PARSER_NTRIPLES libraptor_la_SOURCES += ntriples_parse.c endif if RAPTOR_RSS_COMMON libraptor_la_SOURCES += raptor_rss_common.c raptor_rss.h endif if RAPTOR_PARSER_RSS libraptor_la_SOURCES += raptor_rss.c endif if RAPTOR_PARSER_GRDDL libraptor_la_SOURCES += raptor_grddl.c endif if RAPTOR_PARSER_GUESS libraptor_la_SOURCES += raptor_guess.c endif if RAPTOR_PARSER_RDFA libraptor_la_SOURCES += raptor_librdfa.c endif # Always available libraptor_la_SOURCES += raptor_serialize_simple.c if RAPTOR_SERIALIZER_RDFXML libraptor_la_SOURCES += raptor_serialize_rdfxml.c endif if RAPTOR_SERIALIZER_NTRIPLES libraptor_la_SOURCES += raptor_serialize_ntriples.c endif #raptor_abbrev.c required by both turtle and xml-abbrev if RAPTOR_SERIALIZER_RDFXML_ABBREV libraptor_la_SOURCES += raptor_abbrev.c else if RAPTOR_SERIALIZER_TURTLE libraptor_la_SOURCES += raptor_abbrev.c endif endif if RAPTOR_SERIALIZER_RDFXML_ABBREV libraptor_la_SOURCES += raptor_serialize_rdfxmla.c endif if RAPTOR_SERIALIZER_TURTLE libraptor_la_SOURCES += raptor_serialize_turtle.c endif if RAPTOR_SERIALIZER_RSS_1_0 libraptor_la_SOURCES += raptor_serialize_rss.c endif if RAPTOR_SERIALIZER_DOT libraptor_la_SOURCES += raptor_serialize_dot.c endif if RAPTOR_SERIALIZER_JSON libraptor_la_SOURCES += raptor_serialize_json.c endif if RAPTOR_NFC_CHECK libraptor_la_SOURCES += raptor_nfc_data.c raptor_nfc.c raptor_nfc.h endif if STRCASECMP libraptor_la_SOURCES += strcasecmp.c endif if PARSEDATE libraptor_la_SOURCES += parsedate.c endif if LIBRDFA libraptor_la_SOURCES += \ $(top_srcdir)/librdfa/curie.c \ $(top_srcdir)/librdfa/iri.c \ $(top_srcdir)/librdfa/language.c\ $(top_srcdir)/librdfa/rdfa.c \ $(top_srcdir)/librdfa/rdfa_utils.c \ $(top_srcdir)/librdfa/subject.c \ $(top_srcdir)/librdfa/triple.c \ $(top_srcdir)/librdfa/rdfa.h \ $(top_srcdir)/librdfa/rdfa_utils.h AM_CPPFLAGS += -DLIBRDFA_IN_RAPTOR -I$(top_srcdir)/librdfa endif libraptor_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \ @RAPTOR_LDFLAGS@ $(MEM_LIBS) libraptor_la_LIBADD = @LTLIBOBJS@ EXTRA_DIST=\ raptor-config.in \ raptor_www_test.c \ raptor_nfc_test.c \ raptor_win32.c \ $(man_MANS) \ turtle_lexer.l turtle_parser.y \ n3_lexer.l n3_parser.y \ parsedate.y \ fix-flex fix-bison LEX=@LEX@ YACC=@YACC@ if MAINTAINER_MODE # Actually it needs turtle_parser.h but nevermind turtle_lexer.c: $(srcdir)/turtle_lexer.l turtle_parser.c $(srcdir)/fix-flex $(LEX) -o$@ $(srcdir)/turtle_lexer.l $(PERL) $(srcdir)/fix-flex $@ > turtle_lexer.t mv turtle_lexer.t $@ turtle_parser.c: $(srcdir)/turtle_parser.y $(srcdir)/fix-bison $(YACC) -b turtle_parser -p turtle_parser_ -d -v $(srcdir)/turtle_parser.y $(PERL) $(srcdir)/fix-bison turtle_parser.tab.c > $@ mv turtle_parser.tab.h turtle_parser.h rm -f turtle_parser.tab.c # Actually it needs n3_parser.h but nevermind n3_lexer.c: $(srcdir)/n3_lexer.l n3_parser.c $(srcdir)/fix-flex $(LEX) -o$@ $(srcdir)/n3_lexer.l $(PERL) $(srcdir)/fix-flex $@ > n3_lexer.t mv n3_lexer.t $@ n3_parser.c: $(srcdir)/n3_parser.y $(srcdir)/fix-bison $(YACC) -b n3_parser -p n3_parser_ -d -v $(srcdir)/n3_parser.y $(PERL) $(srcdir)/fix-bison n3_parser.tab.c > $@ mv n3_parser.tab.h n3_parser.h rm -f n3_parser.tab.c endif # Actually it needs turtle_parser.h but nevermind turtle_lexer_test: $(srcdir)/turtle_lexer.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/turtle_lexer.c libraptor.la $(LIBS) turtle_parser_test: $(srcdir)/turtle_parser.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/turtle_parser.c libraptor.la $(LIBS) if MAINTAINER_MODE n3_lexer_test: $(srcdir)/n3_lexer.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/n3_lexer.c libraptor.la $(LIBS) n3_parser_test: $(srcdir)/n3_parser.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/n3_parser.c libraptor.la $(LIBS) endif parsedate.c: $(srcdir)/parsedate.y $(YACC) -b parsedate -p raptor_parsedate_ -d -v $(srcdir)/parsedate.y sed -e '/Suppress GCC warning that yyerrlab1/,/^\#endif/d' -e "s/parsedate.tab.c/$@/" parsedate.tab.c > $@ mv parsedate.tab.h parsedate.h rm -f parsedate.tab.c # Some people need a little help ;-) test: check raptor_parse_test: $(srcdir)/raptor_general.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_parse.c libraptor.la $(LIBS) raptor_rfc2396_test: $(srcdir)/raptor_rfc2396.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_rfc2396.c libraptor.la $(LIBS) raptor_uri_test: $(srcdir)/raptor_uri.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_uri.c libraptor.la $(LIBS) raptor_uri_win32_test: $(srcdir)/raptor_uri.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE -DWIN32_URI_TEST $(srcdir)/raptor_uri.c libraptor.la $(LIBS) raptor_namespace_test: $(srcdir)/raptor_namespace.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_namespace.c libraptor.la $(LIBS) strcasecmp_test: $(srcdir)/strcasecmp.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/strcasecmp.c libraptor.la $(LIBS) raptor_www_test: $(srcdir)/raptor_www_test.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_www_test.c libraptor.la $(LIBS) raptor_set_test: $(srcdir)/raptor_set.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_set.c libraptor.la $(LIBS) raptor_xml_test: $(srcdir)/raptor_xml.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_xml.c libraptor.la $(LIBS) raptor_sequence_test: $(srcdir)/raptor_sequence.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_sequence.c libraptor.la $(LIBS) raptor_stringbuffer_test: $(srcdir)/raptor_stringbuffer.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_stringbuffer.c libraptor.la $(LIBS) raptor_nfc_test: $(srcdir)/raptor_nfc_test.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_nfc_test.c libraptor.la $(LIBS) raptor_iostream_test: $(srcdir)/raptor_iostream.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_iostream.c libraptor.la $(LIBS) raptor_xml_writer_test: $(srcdir)/raptor_xml_writer.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_xml_writer.c libraptor.la $(LIBS) raptor_turtle_writer_test: $(srcdir)/raptor_turtle_writer.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_turtle_writer.c libraptor.la $(LIBS) raptor_avltree_test: $(srcdir)/raptor_avltree.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_avltree.c libraptor.la $(LIBS) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/Makefile.in�����������������������������������������������������������������������0000644�0001750�0001750�00000153553�11330704764�012704� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor libraptor # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @RAPTOR_PARSER_RDFXML_TRUE@am__append_1 = raptor_set_test raptor_xml_test @RAPTOR_PARSER_RDFXML_TRUE@@RAPTOR_XML_LIBXML_TRUE@am__append_2 = raptor_libxml.c @RAPTOR_PARSER_RDFXML_TRUE@@RAPTOR_XML_EXPAT_TRUE@am__append_3 = raptor_expat.c @RAPTOR_PARSER_RDFXML_TRUE@am__append_4 = raptor_rdfxml.c raptor_sax2.c @RAPTOR_PARSER_TURTLE_TRUE@am__append_5 = turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h turtle_common.h @RAPTOR_PARSER_TRIG_TRUE@@RAPTOR_PARSER_TURTLE_FALSE@am__append_6 = turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h turtle_common.h @RAPTOR_PARSER_N3_TRUE@am__append_7 = n3_lexer.c n3_lexer.h n3_parser.c n3_parser.h n3_common.h @RAPTOR_PARSER_NTRIPLES_TRUE@am__append_8 = ntriples_parse.c @RAPTOR_RSS_COMMON_TRUE@am__append_9 = raptor_rss_common.c raptor_rss.h @RAPTOR_PARSER_RSS_TRUE@am__append_10 = raptor_rss.c @RAPTOR_PARSER_GRDDL_TRUE@am__append_11 = raptor_grddl.c @RAPTOR_PARSER_GUESS_TRUE@am__append_12 = raptor_guess.c @RAPTOR_PARSER_RDFA_TRUE@am__append_13 = raptor_librdfa.c @RAPTOR_SERIALIZER_RDFXML_TRUE@am__append_14 = raptor_serialize_rdfxml.c @RAPTOR_SERIALIZER_NTRIPLES_TRUE@am__append_15 = raptor_serialize_ntriples.c #raptor_abbrev.c required by both turtle and xml-abbrev @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@am__append_16 = raptor_abbrev.c @RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE@@RAPTOR_SERIALIZER_TURTLE_TRUE@am__append_17 = raptor_abbrev.c @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@am__append_18 = raptor_serialize_rdfxmla.c @RAPTOR_SERIALIZER_TURTLE_TRUE@am__append_19 = raptor_serialize_turtle.c @RAPTOR_SERIALIZER_RSS_1_0_TRUE@am__append_20 = raptor_serialize_rss.c @RAPTOR_SERIALIZER_DOT_TRUE@am__append_21 = raptor_serialize_dot.c @RAPTOR_SERIALIZER_JSON_TRUE@am__append_22 = raptor_serialize_json.c @RAPTOR_NFC_CHECK_TRUE@am__append_23 = raptor_nfc_data.c raptor_nfc.c raptor_nfc.h @STRCASECMP_TRUE@am__append_24 = strcasecmp.c @PARSEDATE_TRUE@am__append_25 = parsedate.c @LIBRDFA_TRUE@am__append_26 = \ @LIBRDFA_TRUE@$(top_srcdir)/librdfa/curie.c \ @LIBRDFA_TRUE@$(top_srcdir)/librdfa/iri.c \ @LIBRDFA_TRUE@$(top_srcdir)/librdfa/language.c\ @LIBRDFA_TRUE@$(top_srcdir)/librdfa/rdfa.c \ @LIBRDFA_TRUE@$(top_srcdir)/librdfa/rdfa_utils.c \ @LIBRDFA_TRUE@$(top_srcdir)/librdfa/subject.c \ @LIBRDFA_TRUE@$(top_srcdir)/librdfa/triple.c \ @LIBRDFA_TRUE@$(top_srcdir)/librdfa/rdfa.h \ @LIBRDFA_TRUE@$(top_srcdir)/librdfa/rdfa_utils.h @LIBRDFA_TRUE@am__append_27 = -DLIBRDFA_IN_RAPTOR -I$(top_srcdir)/librdfa subdir = src DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/raptor-config.in $(srcdir)/raptor_config.h.in \ raptor_www_curl.c raptor_www_libfetch.c raptor_www_libxml.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = raptor_config.h CONFIG_CLEAN_FILES = raptor-config CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libraptor_la_DEPENDENCIES = @LTLIBOBJS@ am__libraptor_la_SOURCES_DIST = raptor_parse.c raptor_serialize.c \ raptor_rfc2396.c raptor_uri.c raptor_locator.c \ raptor_namespace.c raptor_qname.c raptor_feature.c \ raptor_general.c raptor_utf8.c raptor_www.c \ raptor_identifier.c raptor_statement.c raptor_sequence.c \ raptor_stringbuffer.c raptor_iostream.c raptor_xml.c \ raptor_xml_writer.c raptor_set.c turtle_common.c \ raptor_turtle_writer.c raptor_xsd.c raptor_avltree.c \ snprintf.c raptor_json_writer.c raptor_memstr.c \ raptor_libxml.c raptor_expat.c raptor_rdfxml.c raptor_sax2.c \ turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h \ turtle_common.h n3_lexer.c n3_lexer.h n3_parser.c n3_parser.h \ n3_common.h ntriples_parse.c raptor_rss_common.c raptor_rss.h \ raptor_rss.c raptor_grddl.c raptor_guess.c raptor_librdfa.c \ raptor_serialize_simple.c raptor_serialize_rdfxml.c \ raptor_serialize_ntriples.c raptor_abbrev.c \ raptor_serialize_rdfxmla.c raptor_serialize_turtle.c \ raptor_serialize_rss.c raptor_serialize_dot.c \ raptor_serialize_json.c raptor_nfc_data.c raptor_nfc.c \ raptor_nfc.h strcasecmp.c parsedate.c \ $(top_srcdir)/librdfa/curie.c $(top_srcdir)/librdfa/iri.c \ $(top_srcdir)/librdfa/language.c $(top_srcdir)/librdfa/rdfa.c \ $(top_srcdir)/librdfa/rdfa_utils.c \ $(top_srcdir)/librdfa/subject.c $(top_srcdir)/librdfa/triple.c \ $(top_srcdir)/librdfa/rdfa.h \ $(top_srcdir)/librdfa/rdfa_utils.h @RAPTOR_PARSER_RDFXML_TRUE@@RAPTOR_XML_LIBXML_TRUE@am__objects_1 = raptor_libxml.lo @RAPTOR_PARSER_RDFXML_TRUE@@RAPTOR_XML_EXPAT_TRUE@am__objects_2 = raptor_expat.lo @RAPTOR_PARSER_RDFXML_TRUE@am__objects_3 = raptor_rdfxml.lo \ @RAPTOR_PARSER_RDFXML_TRUE@ raptor_sax2.lo @RAPTOR_PARSER_TURTLE_TRUE@am__objects_4 = turtle_lexer.lo \ @RAPTOR_PARSER_TURTLE_TRUE@ turtle_parser.lo @RAPTOR_PARSER_TRIG_TRUE@@RAPTOR_PARSER_TURTLE_FALSE@am__objects_5 = turtle_lexer.lo \ @RAPTOR_PARSER_TRIG_TRUE@@RAPTOR_PARSER_TURTLE_FALSE@ turtle_parser.lo @RAPTOR_PARSER_N3_TRUE@am__objects_6 = n3_lexer.lo n3_parser.lo @RAPTOR_PARSER_NTRIPLES_TRUE@am__objects_7 = ntriples_parse.lo @RAPTOR_RSS_COMMON_TRUE@am__objects_8 = raptor_rss_common.lo @RAPTOR_PARSER_RSS_TRUE@am__objects_9 = raptor_rss.lo @RAPTOR_PARSER_GRDDL_TRUE@am__objects_10 = raptor_grddl.lo @RAPTOR_PARSER_GUESS_TRUE@am__objects_11 = raptor_guess.lo @RAPTOR_PARSER_RDFA_TRUE@am__objects_12 = raptor_librdfa.lo @RAPTOR_SERIALIZER_RDFXML_TRUE@am__objects_13 = \ @RAPTOR_SERIALIZER_RDFXML_TRUE@ raptor_serialize_rdfxml.lo @RAPTOR_SERIALIZER_NTRIPLES_TRUE@am__objects_14 = \ @RAPTOR_SERIALIZER_NTRIPLES_TRUE@ raptor_serialize_ntriples.lo @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@am__objects_15 = \ @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@ raptor_abbrev.lo @RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE@@RAPTOR_SERIALIZER_TURTLE_TRUE@am__objects_16 = raptor_abbrev.lo @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@am__objects_17 = raptor_serialize_rdfxmla.lo @RAPTOR_SERIALIZER_TURTLE_TRUE@am__objects_18 = \ @RAPTOR_SERIALIZER_TURTLE_TRUE@ raptor_serialize_turtle.lo @RAPTOR_SERIALIZER_RSS_1_0_TRUE@am__objects_19 = \ @RAPTOR_SERIALIZER_RSS_1_0_TRUE@ raptor_serialize_rss.lo @RAPTOR_SERIALIZER_DOT_TRUE@am__objects_20 = raptor_serialize_dot.lo @RAPTOR_SERIALIZER_JSON_TRUE@am__objects_21 = \ @RAPTOR_SERIALIZER_JSON_TRUE@ raptor_serialize_json.lo @RAPTOR_NFC_CHECK_TRUE@am__objects_22 = raptor_nfc_data.lo \ @RAPTOR_NFC_CHECK_TRUE@ raptor_nfc.lo @STRCASECMP_TRUE@am__objects_23 = strcasecmp.lo @PARSEDATE_TRUE@am__objects_24 = parsedate.lo @LIBRDFA_TRUE@am__objects_25 = curie.lo iri.lo language.lo rdfa.lo \ @LIBRDFA_TRUE@ rdfa_utils.lo subject.lo triple.lo am_libraptor_la_OBJECTS = raptor_parse.lo raptor_serialize.lo \ raptor_rfc2396.lo raptor_uri.lo raptor_locator.lo \ raptor_namespace.lo raptor_qname.lo raptor_feature.lo \ raptor_general.lo raptor_utf8.lo raptor_www.lo \ raptor_identifier.lo raptor_statement.lo raptor_sequence.lo \ raptor_stringbuffer.lo raptor_iostream.lo raptor_xml.lo \ raptor_xml_writer.lo raptor_set.lo turtle_common.lo \ raptor_turtle_writer.lo raptor_xsd.lo raptor_avltree.lo \ snprintf.lo raptor_json_writer.lo raptor_memstr.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) $(am__objects_6) \ $(am__objects_7) $(am__objects_8) $(am__objects_9) \ $(am__objects_10) $(am__objects_11) $(am__objects_12) \ raptor_serialize_simple.lo $(am__objects_13) $(am__objects_14) \ $(am__objects_15) $(am__objects_16) $(am__objects_17) \ $(am__objects_18) $(am__objects_19) $(am__objects_20) \ $(am__objects_21) $(am__objects_22) $(am__objects_23) \ $(am__objects_24) $(am__objects_25) libraptor_la_OBJECTS = $(am_libraptor_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent libraptor_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libraptor_la_LDFLAGS) $(LDFLAGS) -o $@ SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libraptor_la_SOURCES) DIST_SOURCES = $(am__libraptor_la_SOURCES_DIST) man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) HEADERS = $(include_HEADERS) $(noinst_HEADERS) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ # Memory debugging MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bin_SCRIPTS = raptor-config lib_LTLIBRARIES = libraptor.la include_HEADERS = raptor.h noinst_HEADERS = raptor_internal.h win32_raptor_config.h man_MANS = raptor-config.1 TESTS = raptor_parse_test raptor_rfc2396_test raptor_uri_test \ raptor_namespace_test strcasecmp_test raptor_www_test \ raptor_sequence_test raptor_stringbuffer_test \ raptor_uri_win32_test raptor_iostream_test \ raptor_xml_writer_test raptor_turtle_writer_test \ raptor_avltree_test $(am__append_1) CLEANFILES = $(TESTS) \ turtle_lexer_test turtle_parser_test \ n3_lexer_test n3_parser_test \ rdfdiff MAINTAINERCLEANFILES = turtle_lexer.c turtle_lexer.h \ turtle_parser.c turtle_parser.h turtle_parser.output \ n3_lexer.c n3_lexer.h \ n3_parser.c n3_parser.h n3_parser.output AM_CPPFLAGS = $(MEM) $(am__append_27) # Always available libraptor_la_SOURCES = raptor_parse.c raptor_serialize.c \ raptor_rfc2396.c raptor_uri.c raptor_locator.c \ raptor_namespace.c raptor_qname.c raptor_feature.c \ raptor_general.c raptor_utf8.c raptor_www.c \ raptor_identifier.c raptor_statement.c raptor_sequence.c \ raptor_stringbuffer.c raptor_iostream.c raptor_xml.c \ raptor_xml_writer.c raptor_set.c turtle_common.c \ raptor_turtle_writer.c raptor_xsd.c raptor_avltree.c \ snprintf.c raptor_json_writer.c raptor_memstr.c \ $(am__append_2) $(am__append_3) $(am__append_4) \ $(am__append_5) $(am__append_6) $(am__append_7) \ $(am__append_8) $(am__append_9) $(am__append_10) \ $(am__append_11) $(am__append_12) $(am__append_13) \ raptor_serialize_simple.c $(am__append_14) $(am__append_15) \ $(am__append_16) $(am__append_17) $(am__append_18) \ $(am__append_19) $(am__append_20) $(am__append_21) \ $(am__append_22) $(am__append_23) $(am__append_24) \ $(am__append_25) $(am__append_26) libraptor_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \ @RAPTOR_LDFLAGS@ $(MEM_LIBS) libraptor_la_LIBADD = @LTLIBOBJS@ EXTRA_DIST = \ raptor-config.in \ raptor_www_test.c \ raptor_nfc_test.c \ raptor_win32.c \ $(man_MANS) \ turtle_lexer.l turtle_parser.y \ n3_lexer.l n3_parser.y \ parsedate.y \ fix-flex fix-bison all: raptor_config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): raptor_config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/raptor_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/raptor_config.h $(srcdir)/raptor_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f raptor_config.h stamp-h1 raptor-config: $(top_builddir)/config.status $(srcdir)/raptor-config.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libraptor.la: $(libraptor_la_OBJECTS) $(libraptor_la_DEPENDENCIES) $(AM_V_CCLD)$(libraptor_la_LINK) -rpath $(libdir) $(libraptor_la_OBJECTS) $(libraptor_la_LIBADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files installcheck-binSCRIPTS: $(bin_SCRIPTS) bad=0; pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err </dev/null \ && test -n "`cat c$${pid}_.out`" \ && test -z "`cat c$${pid}_.err`"; then :; \ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raptor_www_curl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raptor_www_libfetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raptor_www_libxml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iri.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/language.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/n3_lexer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/n3_parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntriples_parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsedate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_abbrev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_avltree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_expat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_feature.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_general.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_grddl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_guess.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_iostream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_json_writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_librdfa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_libxml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_locator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_memstr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_namespace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_nfc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_nfc_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_qname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_rdfxml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_rfc2396.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_rss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_rss_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_sax2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_sequence.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_dot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_json.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_ntriples.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_rdfxml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_rdfxmla.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_rss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_simple.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_turtle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_statement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_stringbuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_turtle_writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_uri.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_utf8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_www.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_xml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_xml_writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_xsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfa_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/triple.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/turtle_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/turtle_lexer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/turtle_parser.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< curie.lo: $(top_srcdir)/librdfa/curie.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curie.lo -MD -MP -MF $(DEPDIR)/curie.Tpo -c -o curie.lo `test -f '$(top_srcdir)/librdfa/curie.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/curie.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curie.Tpo $(DEPDIR)/curie.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/librdfa/curie.c' object='curie.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curie.lo `test -f '$(top_srcdir)/librdfa/curie.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/curie.c iri.lo: $(top_srcdir)/librdfa/iri.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iri.lo -MD -MP -MF $(DEPDIR)/iri.Tpo -c -o iri.lo `test -f '$(top_srcdir)/librdfa/iri.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/iri.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iri.Tpo $(DEPDIR)/iri.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/librdfa/iri.c' object='iri.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iri.lo `test -f '$(top_srcdir)/librdfa/iri.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/iri.c language.lo: $(top_srcdir)/librdfa/language.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT language.lo -MD -MP -MF $(DEPDIR)/language.Tpo -c -o language.lo `test -f '$(top_srcdir)/librdfa/language.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/language.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/language.Tpo $(DEPDIR)/language.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/librdfa/language.c' object='language.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o language.lo `test -f '$(top_srcdir)/librdfa/language.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/language.c rdfa.lo: $(top_srcdir)/librdfa/rdfa.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rdfa.lo -MD -MP -MF $(DEPDIR)/rdfa.Tpo -c -o rdfa.lo `test -f '$(top_srcdir)/librdfa/rdfa.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/rdfa.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rdfa.Tpo $(DEPDIR)/rdfa.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/librdfa/rdfa.c' object='rdfa.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rdfa.lo `test -f '$(top_srcdir)/librdfa/rdfa.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/rdfa.c rdfa_utils.lo: $(top_srcdir)/librdfa/rdfa_utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rdfa_utils.lo -MD -MP -MF $(DEPDIR)/rdfa_utils.Tpo -c -o rdfa_utils.lo `test -f '$(top_srcdir)/librdfa/rdfa_utils.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/rdfa_utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rdfa_utils.Tpo $(DEPDIR)/rdfa_utils.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/librdfa/rdfa_utils.c' object='rdfa_utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rdfa_utils.lo `test -f '$(top_srcdir)/librdfa/rdfa_utils.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/rdfa_utils.c subject.lo: $(top_srcdir)/librdfa/subject.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT subject.lo -MD -MP -MF $(DEPDIR)/subject.Tpo -c -o subject.lo `test -f '$(top_srcdir)/librdfa/subject.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/subject.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/subject.Tpo $(DEPDIR)/subject.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/librdfa/subject.c' object='subject.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o subject.lo `test -f '$(top_srcdir)/librdfa/subject.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/subject.c triple.lo: $(top_srcdir)/librdfa/triple.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT triple.lo -MD -MP -MF $(DEPDIR)/triple.Tpo -c -o triple.lo `test -f '$(top_srcdir)/librdfa/triple.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/triple.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/triple.Tpo $(DEPDIR)/triple.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/librdfa/triple.c' object='triple.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o triple.lo `test -f '$(top_srcdir)/librdfa/triple.c' || echo '$(srcdir)/'`$(top_srcdir)/librdfa/triple.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) raptor_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) raptor_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) raptor_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) raptor_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(HEADERS) \ raptor_config.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: installcheck-binSCRIPTS maintainer-clean: maintainer-clean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-man uninstall-man: uninstall-man1 .MAKE: all check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool ctags \ distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binSCRIPTS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installcheck-binSCRIPTS \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binSCRIPTS uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-man uninstall-man1 # Actually it needs turtle_parser.h but nevermind @MAINTAINER_MODE_TRUE@turtle_lexer.c: $(srcdir)/turtle_lexer.l turtle_parser.c $(srcdir)/fix-flex @MAINTAINER_MODE_TRUE@ $(LEX) -o$@ $(srcdir)/turtle_lexer.l @MAINTAINER_MODE_TRUE@ $(PERL) $(srcdir)/fix-flex $@ > turtle_lexer.t @MAINTAINER_MODE_TRUE@ mv turtle_lexer.t $@ @MAINTAINER_MODE_TRUE@turtle_parser.c: $(srcdir)/turtle_parser.y $(srcdir)/fix-bison @MAINTAINER_MODE_TRUE@ $(YACC) -b turtle_parser -p turtle_parser_ -d -v $(srcdir)/turtle_parser.y @MAINTAINER_MODE_TRUE@ $(PERL) $(srcdir)/fix-bison turtle_parser.tab.c > $@ @MAINTAINER_MODE_TRUE@ mv turtle_parser.tab.h turtle_parser.h @MAINTAINER_MODE_TRUE@ rm -f turtle_parser.tab.c # Actually it needs n3_parser.h but nevermind @MAINTAINER_MODE_TRUE@n3_lexer.c: $(srcdir)/n3_lexer.l n3_parser.c $(srcdir)/fix-flex @MAINTAINER_MODE_TRUE@ $(LEX) -o$@ $(srcdir)/n3_lexer.l @MAINTAINER_MODE_TRUE@ $(PERL) $(srcdir)/fix-flex $@ > n3_lexer.t @MAINTAINER_MODE_TRUE@ mv n3_lexer.t $@ @MAINTAINER_MODE_TRUE@n3_parser.c: $(srcdir)/n3_parser.y $(srcdir)/fix-bison @MAINTAINER_MODE_TRUE@ $(YACC) -b n3_parser -p n3_parser_ -d -v $(srcdir)/n3_parser.y @MAINTAINER_MODE_TRUE@ $(PERL) $(srcdir)/fix-bison n3_parser.tab.c > $@ @MAINTAINER_MODE_TRUE@ mv n3_parser.tab.h n3_parser.h @MAINTAINER_MODE_TRUE@ rm -f n3_parser.tab.c # Actually it needs turtle_parser.h but nevermind turtle_lexer_test: $(srcdir)/turtle_lexer.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/turtle_lexer.c libraptor.la $(LIBS) turtle_parser_test: $(srcdir)/turtle_parser.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/turtle_parser.c libraptor.la $(LIBS) @MAINTAINER_MODE_TRUE@n3_lexer_test: $(srcdir)/n3_lexer.c libraptor.la @MAINTAINER_MODE_TRUE@ $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/n3_lexer.c libraptor.la $(LIBS) @MAINTAINER_MODE_TRUE@n3_parser_test: $(srcdir)/n3_parser.c libraptor.la @MAINTAINER_MODE_TRUE@ $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/n3_parser.c libraptor.la $(LIBS) parsedate.c: $(srcdir)/parsedate.y $(YACC) -b parsedate -p raptor_parsedate_ -d -v $(srcdir)/parsedate.y sed -e '/Suppress GCC warning that yyerrlab1/,/^\#endif/d' -e "s/parsedate.tab.c/$@/" parsedate.tab.c > $@ mv parsedate.tab.h parsedate.h rm -f parsedate.tab.c # Some people need a little help ;-) test: check raptor_parse_test: $(srcdir)/raptor_general.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_parse.c libraptor.la $(LIBS) raptor_rfc2396_test: $(srcdir)/raptor_rfc2396.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_rfc2396.c libraptor.la $(LIBS) raptor_uri_test: $(srcdir)/raptor_uri.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_uri.c libraptor.la $(LIBS) raptor_uri_win32_test: $(srcdir)/raptor_uri.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE -DWIN32_URI_TEST $(srcdir)/raptor_uri.c libraptor.la $(LIBS) raptor_namespace_test: $(srcdir)/raptor_namespace.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_namespace.c libraptor.la $(LIBS) strcasecmp_test: $(srcdir)/strcasecmp.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/strcasecmp.c libraptor.la $(LIBS) raptor_www_test: $(srcdir)/raptor_www_test.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_www_test.c libraptor.la $(LIBS) raptor_set_test: $(srcdir)/raptor_set.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_set.c libraptor.la $(LIBS) raptor_xml_test: $(srcdir)/raptor_xml.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_xml.c libraptor.la $(LIBS) raptor_sequence_test: $(srcdir)/raptor_sequence.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_sequence.c libraptor.la $(LIBS) raptor_stringbuffer_test: $(srcdir)/raptor_stringbuffer.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_stringbuffer.c libraptor.la $(LIBS) raptor_nfc_test: $(srcdir)/raptor_nfc_test.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_nfc_test.c libraptor.la $(LIBS) raptor_iostream_test: $(srcdir)/raptor_iostream.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_iostream.c libraptor.la $(LIBS) raptor_xml_writer_test: $(srcdir)/raptor_xml_writer.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_xml_writer.c libraptor.la $(LIBS) raptor_turtle_writer_test: $(srcdir)/raptor_turtle_writer.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_turtle_writer.c libraptor.la $(LIBS) raptor_avltree_test: $(srcdir)/raptor_avltree.c libraptor.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_avltree.c libraptor.la $(LIBS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_sequence.c�����������������������������������������������������������������0000644�0001750�0001750�00000047373�11330672502�014176� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_sequence.c - Raptor sequence support * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE /* * Sequence of maximum capacity C containing N data items * * array: * 0 <-- N consecutive items --> C - 1 * ----------------------------------------------------------- * | | | data1 | ..... data N | ... | | * ----------------------------------------------------------- * ------ O -----> offset of first data item * * start = O * size = N * capacity = C * */ struct raptor_sequence_s { /* how many items are in the sequence 0..capacity */ int size; /* length of the 'sequence' array below */ int capacity; /* offset of the first data item in the sequence: 0..capacity-1 */ int start; /* array of size 'capacity' pointing to the data */ void **sequence; /* handler to call to free a data item (or NULL) */ raptor_sequence_free_handler *free_handler; raptor_sequence_free_handler_v2 *free_handler_v2; /* handler to call to print a data item (or NULL) */ raptor_sequence_print_handler *print_handler; raptor_sequence_print_handler_v2 *print_handler_v2; /* free/print handler context data */ void *handler_context; }; static int raptor_sequence_ensure(raptor_sequence *seq, int capacity, int grow_at_front); /** * raptor_new_sequence: * @free_handler: handler to free a sequence item * @print_handler: handler to print a sequence item to a FILE* * * Constructor - create a new sequence with the given handlers. * * Return value: a new #raptor_sequence or NULL on failure **/ raptor_sequence* raptor_new_sequence(raptor_sequence_free_handler *free_handler, raptor_sequence_print_handler *print_handler) { raptor_sequence* seq=(raptor_sequence*)RAPTOR_CALLOC(raptor_sequence, 1, sizeof(raptor_sequence)); if(!seq) return NULL; seq->free_handler=free_handler; seq->print_handler=print_handler; return seq; } /** * raptor_new_sequence_v2: * @free_handler: handler to free a sequence item * @print_handler: handler to print a sequence item to a FILE* * @handler_context: context information to pass to free/print handlers * * Constructor - create a new sequence with the given handlers and handler context. * * Return value: a new #raptor_sequence or NULL on failure **/ raptor_sequence* raptor_new_sequence_v2(raptor_sequence_free_handler_v2 *free_handler, raptor_sequence_print_handler_v2 *print_handler, void *handler_context) { raptor_sequence* seq=(raptor_sequence*)RAPTOR_CALLOC(raptor_sequence, 1, sizeof(raptor_sequence)); if(!seq) return NULL; seq->free_handler_v2=free_handler; seq->print_handler_v2=print_handler; seq->handler_context=handler_context; return seq; } /** * raptor_free_sequence: * @seq: sequence to destroy * * Destructor - free a #raptor_sequence **/ void raptor_free_sequence(raptor_sequence* seq) { int i; int j; RAPTOR_ASSERT_OBJECT_POINTER_RETURN(seq, raptor_sequence); if(seq->free_handler) { for(i=seq->start, j=seq->start+seq->size; i<j; i++) if(seq->sequence[i]) seq->free_handler(seq->sequence[i]); } else if(seq->free_handler_v2) { for(i=seq->start, j=seq->start+seq->size; i<j; i++) if(seq->sequence[i]) seq->free_handler_v2(seq->handler_context, seq->sequence[i]); } if(seq->sequence) RAPTOR_FREE(ptrarray, seq->sequence); RAPTOR_FREE(raptor_sequence, seq); } static int raptor_sequence_ensure(raptor_sequence *seq, int capacity, int grow_at_front) { void **new_sequence; int offset; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); if(capacity && seq->capacity >= capacity) return 0; /* POLICY - minimum size */ if(capacity < 8) capacity=8; new_sequence=(void**)RAPTOR_CALLOC(ptrarray, capacity, sizeof(void*)); if(!new_sequence) return 1; offset=(grow_at_front ? (capacity-seq->capacity) : 0)+seq->start; if(seq->size) { memcpy(&new_sequence[offset], &seq->sequence[seq->start], sizeof(void*)*seq->size); RAPTOR_FREE(ptrarray, seq->sequence); } seq->start=offset; seq->sequence=new_sequence; seq->capacity=capacity; return 0; } /** * raptor_sequence_size: * @seq: sequence object * * Get the number of items in a sequence. * * Return value: the sequence size (>=0) **/ int raptor_sequence_size(raptor_sequence* seq) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, -1); return seq->size; } /* Store methods */ /** * raptor_sequence_set_at: * @seq: sequence object * @idx: index into sequence to operate at * @data: new data item. * * Replace/set an item in a sequence. * * The item at the offset @idx in the sequence is replaced with the * new item @data (which may be NULL). Any existing item is freed * with the sequence's free_handler. If necessary the sequence * is extended (with NULLs) to handle a larger offset. * * The sequence takes ownership of the new data item. On failure, the * item is freed immediately. * * Return value: non-0 on failure **/ int raptor_sequence_set_at(raptor_sequence* seq, int idx, void *data) { int need_capacity; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); /* Cannot provide a negative index */ if(idx < 0) { if(data) { if(seq->free_handler) seq->free_handler(data); else if(seq->free_handler_v2) seq->free_handler_v2(seq->handler_context, data); } return 1; } need_capacity=seq->start+idx+1; if(need_capacity > seq->capacity) { if(seq->capacity*2 > need_capacity) need_capacity = seq->capacity*2; if(raptor_sequence_ensure(seq, need_capacity, 0)) { if(data) { if(seq->free_handler) seq->free_handler(data); else if(seq->free_handler_v2) seq->free_handler_v2(seq->handler_context, data); } return 1; } } if(idx < seq->size) { /* if there is old data, delete it if there is a free handler */ if(seq->sequence[seq->start+idx]) { if(seq->free_handler) seq->free_handler(seq->sequence[seq->start+idx]); else if(seq->free_handler_v2) seq->free_handler_v2(seq->handler_context, seq->sequence[seq->start+idx]); } /* size remains the same */ } else { /* if there is no old data, size is increasing */ /* make sure there are seq->size items starting from seq->start */ seq->size=idx+1; } seq->sequence[seq->start+idx]=data; return 0; } /** * raptor_sequence_push: * @seq: sequence to add to * @data: item to add * * Add an item to the end of the sequence. * * The sequence takes ownership of the pushed item and frees it with the * free_handler. On failure, the item is freed immediately. * * Return value: non-0 on failure **/ int raptor_sequence_push(raptor_sequence* seq, void *data) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); if(seq->start+seq->size == seq->capacity) { if(raptor_sequence_ensure(seq, seq->capacity*2, 0)) { if(data) { if(seq->free_handler) seq->free_handler(data); else if(seq->free_handler_v2) seq->free_handler_v2(seq->handler_context, data); } return 1; } } seq->sequence[seq->start+seq->size]=data; seq->size++; return 0; } /** * raptor_sequence_shift: * @seq: sequence to add to * @data: item to add * * Add an item to the start of the sequence. * * The sequence takes ownership of the shifted item and frees it with the * free_handler. On failure, the item is freed immediately. * * Return value: non-0 on failure **/ int raptor_sequence_shift(raptor_sequence* seq, void *data) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); if(!seq->start) { if(raptor_sequence_ensure(seq, seq->capacity*2, 1)) { if(data) { if(seq->free_handler) seq->free_handler(data); else if(seq->free_handler_v2) seq->free_handler_v2(seq->handler_context, data); } return 1; } } seq->sequence[--seq->start]=data; seq->size++; return 0; } /** * raptor_sequence_get_at: * @seq: sequence to use * @idx: index of item to get * * Retrieve an item at offset @index in the sequence. * * This is efficient to perform. #raptor_sequence is optimised * to append/remove from the end of the sequence. * * After this call the item is still owned by the sequence. * * Return value: the object or NULL if @index is out of range (0... sequence size-1) **/ void* raptor_sequence_get_at(raptor_sequence* seq, int idx) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, NULL); if(idx < 0 || idx > seq->size-1) return NULL; return seq->sequence[seq->start+idx]; } /** * raptor_sequence_delete_at: * @seq: sequence object * @idx: index into sequence to operate at * * Remove an item from a position a sequence, returning it * * The item at the offset @idx in the sequence is replaced with a * NULL pointer and any existing item is returned. The caller * owns the resulting item. * * Return value: NULL on failure **/ void* raptor_sequence_delete_at(raptor_sequence* seq, int idx) { void* data; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, NULL); if(idx < 0 || idx > seq->size-1) return NULL; data=seq->sequence[seq->start+idx]; seq->sequence[seq->start+idx]=NULL; return data; } /** * raptor_sequence_pop: * @seq: sequence to use * * Retrieve the item at the end of the sequence. * * Ownership of the item is transferred to the caller, * i.e. caller is responsible of freeing the item. * * Return value: the object or NULL if the sequence is empty **/ void* raptor_sequence_pop(raptor_sequence* seq) { void *data; int i; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, NULL); if(!seq->size) return NULL; seq->size--; i=seq->start+seq->size; data=seq->sequence[i]; seq->sequence[i]=NULL; return data; } /** * raptor_sequence_unshift: * @seq: sequence to use * * Retrieve the item at the start of the sequence. * * Ownership of the item is transferred to the caller, * i.e. caller is responsible of freeing the item. * * Return value: the object or NULL if the sequence is empty **/ void* raptor_sequence_unshift(raptor_sequence* seq) { void *data; int i; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, NULL); if(!seq->size) return NULL; i=seq->start++; data=seq->sequence[i]; seq->size--; seq->sequence[i]=NULL; return data; } /** * raptor_compare_strings: * @a: pointer first string * @b: pointer to second string * * Utility function for raptor_sequence_sort() to compare a sequence of strings. * * Return value: comparison of @a to @b as strings **/ int raptor_compare_strings(const void *a, const void *b) { return strcmp(*(char**)a, *(char**)b); } /** * raptor_sequence_sort: * @seq: sequence to sort * @compare: comparison function * * The comparison function is compatible with that used for qsort() * and provides the addresses of pointers to the data that * must be dereferenced to get to the stored sequence data. * **/ RAPTOR_EXTERN_C void raptor_sequence_sort(raptor_sequence* seq, int(*compare)(const void *, const void *)) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(seq, raptor_sequence); if(seq->size > 1) qsort(&seq->sequence[seq->start], seq->size, sizeof(void*), compare); } /** * raptor_sequence_print_string: * @data: data item (a char*) * @fh: file handle to print to * * Helper function for printing a sequence of strings. * * Intended for use as a #raptor_sequence_print_handler passed into * raptor_new_sequence(). */ void raptor_sequence_print_string(char *data, FILE *fh) { fputs(data, fh); } #if !defined(RAPTOR_DISABLE_DEPRECATED) && !defined(RAPTOR_DISABLE_V1) /** * raptor_sequence_print_uri: * @data: data item (a #raptor_uri) * @fh: file handle to print to * * Helper function for printing a sequence of URIs. * * Intended for use as a #raptor_sequence_print_handler passed into * raptor_new_sequence(). * * raptor_init() MUST have been called before calling this function. * * @deprecated: Use raptor_uri_print() instead. */ void raptor_sequence_print_uri(char *data, FILE *fh) { raptor_uri* uri=(raptor_uri*)data; fputs((const char*)raptor_uri_as_string_v2(raptor_world_instance(), uri), fh); } #endif /** * raptor_sequence_set_print_handler: * @seq: sequence * @print_handler: print handler * * Set the print handler for the sequence. * * This is set in the raptor_new_sequence() constructor and can be * overridden here. */ void raptor_sequence_set_print_handler(raptor_sequence *seq, raptor_sequence_print_handler *print_handler) { if(!seq) return; seq->print_handler=print_handler; } /** * raptor_sequence_set_print_handler_v2: * @seq: sequence * @print_handler: print handler * * Set the print handler for the sequence. * * This is set in the raptor_new_sequence_v2() constructor and can be * overridden here. */ void raptor_sequence_set_print_handler_v2(raptor_sequence *seq, raptor_sequence_print_handler_v2 *print_handler) { if(!seq) return; seq->print_handler_v2=print_handler; } /** * raptor_sequence_print: * @seq: sequence to sort * @fh: file handle * * Print the sequence contents using the print_handler to print the data items. */ void raptor_sequence_print(raptor_sequence* seq, FILE* fh) { int i; RAPTOR_ASSERT_OBJECT_POINTER_RETURN(seq, raptor_sequence); fputc('[', fh); for(i=0; i<seq->size; i++) { if(i) fputs(", ", fh); if(seq->sequence[seq->start+i]) { if(seq->print_handler) seq->print_handler(seq->sequence[seq->start+i], fh); else if(seq->print_handler_v2) seq->print_handler_v2(seq->handler_context, seq->sequence[seq->start+i], fh); } else fputs("(empty)", fh); } fputc(']', fh); } /** * raptor_sequence_join: * @dest: #raptor_sequence destination sequence * @src: #raptor_sequence source sequence * * Join two sequences moving all items from one sequence to the end of another. * * After this operation, sequence src will be empty (zero size) but * will have the same item capacity as before. * * Return value: non-0 on failure */ int raptor_sequence_join(raptor_sequence* dest, raptor_sequence *src) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(dest, raptor_sequence, 1); RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(src, raptor_sequence, 1); if(raptor_sequence_ensure(dest, dest->size + src->size, 0)) return 1; memcpy(&dest->sequence[dest->start+dest->size], &src->sequence[src->start], sizeof(void*)*src->size); dest->size += src->size; src->size=0; return 0; } #endif #ifdef STANDALONE #include <stdio.h> int main(int argc, char *argv[]); #define assert_match_string(function, expr, string) do { char *result=expr; if(strcmp(result, string)) { fprintf(stderr, "%s:" #function " failed - returned %s, expected %s\n", program, result, string); exit(1); } } while(0) #define assert_match_int(function, expr, value) do { int result=expr; if(result != value) { fprintf(stderr, "%s:" #function " failed - returned %d, expected %d\n", program, result, value); exit(1); } } while(0) int main(int argc, char *argv[]) { const char *program=raptor_basename(argv[0]); raptor_sequence* seq1=raptor_new_sequence(NULL, (raptor_sequence_print_handler*)raptor_sequence_print_string); raptor_sequence* seq2=raptor_new_sequence(NULL, (raptor_sequence_print_handler*)raptor_sequence_print_string); char *s; int i; if(raptor_sequence_pop(seq1) || raptor_sequence_unshift(seq1)) { fprintf(stderr, "%s: should not be able to pop/unshift from an empty sequence\n", program); exit(1); } raptor_sequence_set_at(seq1, 0, (void*)"first"); raptor_sequence_push(seq1, (void*)"third"); raptor_sequence_shift(seq1, (void*)"second"); s=(char*)raptor_sequence_get_at(seq1, 0); assert_match_string(raptor_sequence_get_at, s, "second"); s=(char*)raptor_sequence_get_at(seq1, 1); assert_match_string(raptor_sequence_get_at, s, "first"); s=(char*)raptor_sequence_get_at(seq1, 2); assert_match_string(raptor_sequence_get_at, s, "third"); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 3); fprintf(stderr, "%s: sequence after additions: ", program); raptor_sequence_print(seq1, stderr); fputc('\n', stderr); /* now made alphabetical i.e. first, second, third */ raptor_sequence_sort(seq1, raptor_compare_strings); fprintf(stderr, "%s: sequence after sort: ", program); raptor_sequence_print(seq1, stderr); fputc('\n', stderr); s=(char*)raptor_sequence_pop(seq1); assert_match_string(raptor_sequence_get_at, s, "third"); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 2); fprintf(stderr, "%s: sequence after pop: ", program); raptor_sequence_print(seq1, stderr); fputc('\n', stderr); s=(char*)raptor_sequence_unshift(seq1); assert_match_string(raptor_sequence_get_at, s, "first"); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 1); fprintf(stderr, "%s: sequence after unshift: ", program); raptor_sequence_print(seq1, stderr); fputc('\n', stderr); s=(char*)raptor_sequence_get_at(seq1, 0); assert_match_string(raptor_sequence_get_at, s, "second"); raptor_sequence_push(seq2, (void*)"first.2"); if(raptor_sequence_join(seq2, seq1)) { fprintf(stderr, "%s: raptor_sequence_join failed\n", program); exit(1); } assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 0); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq2), 2); raptor_free_sequence(seq1); raptor_free_sequence(seq2); /* test sequence growing */ seq1=raptor_new_sequence(NULL, (raptor_sequence_print_handler*)raptor_sequence_print_string); for(i=0; i<100; i++) if(raptor_sequence_shift(seq1, (void*)"foo")) { fprintf(stderr, "%s: raptor_sequence_shift failed\n", program); exit(1); } assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 100); for(i=0; i<100; i++) raptor_sequence_unshift(seq1); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 0); raptor_free_sequence(seq1); seq1=raptor_new_sequence(NULL, (raptor_sequence_print_handler*)raptor_sequence_print_string); for(i=0; i<100; i++) if(raptor_sequence_push(seq1, (void*)"foo")) { fprintf(stderr, "%s: raptor_sequence_push failed\n", program); exit(1); } assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 100); for(i=0; i<100; i++) raptor_sequence_pop(seq1); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 0); raptor_free_sequence(seq1); return (0); } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_guess.c��������������������������������������������������������������������0000644�0001750�0001750�00000015134�11330672502�013502� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_guess.c - Raptor guessing real parser implementation * * Copyright (C) 2005-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * guess parser object */ struct raptor_guess_parser_context_s { /* content type got from URI request */ char* content_type; /* URI from start_parse */ raptor_uri* uri; /* Non-0 when we need to guess */ int do_guess; /* Actual parser to use */ raptor_parser* parser; }; typedef struct raptor_guess_parser_context_s raptor_guess_parser_context; static int raptor_guess_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_guess_parser_context *guess_parser=(raptor_guess_parser_context*)rdf_parser->context; guess_parser->content_type=NULL; guess_parser->do_guess=1; return 0; } static void raptor_guess_parse_terminate(raptor_parser *rdf_parser) { raptor_guess_parser_context *guess_parser=(raptor_guess_parser_context*)rdf_parser->context; if(guess_parser->content_type) RAPTOR_FREE(cstring, guess_parser->content_type); if(guess_parser->parser) raptor_free_parser(guess_parser->parser); } static void raptor_guess_parse_content_type_handler(raptor_parser* rdf_parser, const char* content_type) { raptor_guess_parser_context* guess_parser=(raptor_guess_parser_context*)rdf_parser->context; if(content_type) { const char *p; size_t len; if((p=strchr(content_type,';'))) len=p-content_type; else len=strlen(content_type); guess_parser->content_type=(char*)RAPTOR_MALLOC(cstring, len+1); strncpy(guess_parser->content_type, content_type, len); guess_parser->content_type[len]='\0'; RAPTOR_DEBUG2("Got content type '%s'\n", guess_parser->content_type); } } static int raptor_guess_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end) { raptor_guess_parser_context* guess_parser=(raptor_guess_parser_context*)rdf_parser->context; if(guess_parser->do_guess) { const unsigned char *identifier=NULL; const char *name; guess_parser->do_guess=0; if(rdf_parser->base_uri) identifier=raptor_uri_as_string_v2(rdf_parser->world, rdf_parser->base_uri); name=raptor_guess_parser_name_v2(rdf_parser->world, NULL, guess_parser->content_type, buffer, len, identifier); if(!name) { raptor_parser_error(rdf_parser, "Failed to guess parser from content type '%s'", guess_parser->content_type ? guess_parser->content_type : "(none)"); raptor_parse_abort(rdf_parser); if(guess_parser->parser) { raptor_free_parser(guess_parser->parser); guess_parser->parser=NULL; } return 1; } else { #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Guessed parser name '%s'\n", name); #endif /* If there is an existing guessed parser factory present and * it's different from the wanted parser, free it */ if(guess_parser->parser) { raptor_parser_factory* factory=raptor_get_parser_factory(rdf_parser->world, name); if(guess_parser->parser->factory != factory) { raptor_free_parser(guess_parser->parser); guess_parser->parser=NULL; } } if(!guess_parser->parser) { guess_parser->parser=raptor_new_parser_v2(rdf_parser->world, name); if(!guess_parser->parser) return 1; } /* copy any user data to the grddl parser */ if(raptor_parser_copy_user_state(guess_parser->parser, rdf_parser)) return 1; if(raptor_start_parse(guess_parser->parser, rdf_parser->base_uri)) return 1; } } /* now we can pass on calls to internal guess_parser */ return raptor_parse_chunk(guess_parser->parser, buffer, len, is_end); } static const char* raptor_guess_accept_header(raptor_parser* rdf_parser) { return raptor_parser_get_accept_header_all(rdf_parser->world); } static int raptor_guess_get_current_base_id(raptor_parser* rdf_parser) { raptor_guess_parser_context *guess_parser=(raptor_guess_parser_context*)rdf_parser->context; return raptor_parser_get_current_base_id(guess_parser->parser); } static const char* raptor_guess_guess_get_name(raptor_parser* rdf_parser) { raptor_guess_parser_context *guess_parser; guess_parser = (raptor_guess_parser_context*)rdf_parser->context; if(guess_parser) return raptor_get_name(guess_parser->parser); else return rdf_parser->factory->name; } static int raptor_guess_parser_register_factory(raptor_parser_factory *factory) { factory->context_length = sizeof(raptor_guess_parser_context); factory->need_base_uri = 1; factory->init = raptor_guess_parse_init; factory->terminate = raptor_guess_parse_terminate; factory->chunk = raptor_guess_parse_chunk; factory->content_type_handler = raptor_guess_parse_content_type_handler; factory->accept_header = raptor_guess_accept_header; factory->get_current_base_id = raptor_guess_get_current_base_id; factory->get_name = raptor_guess_guess_get_name; return 0; } int raptor_init_parser_guess(raptor_world* world) { return !raptor_parser_register_factory(world, "guess", "Pick the parser to use using content type and URI", &raptor_guess_parser_register_factory); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor.h��������������������������������������������������������������������������0000644�0001750�0001750�00000225562�11330672502�012311� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor.h - Redland Parser Toolkit for RDF (Raptor) interfaces and definition * * Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef RAPTOR_H #define RAPTOR_H #ifdef __cplusplus extern "C" { #endif #include <stdio.h> /* Required for va_list in raptor_vsnprintf */ #include <stdarg.h> /** * RAPTOR_API: * * Macro for wrapping API function call declarations. * */ #ifndef RAPTOR_API # ifdef WIN32 # ifdef __GNUC__ # undef _declspec # define _declspec(x) __declspec(x) # endif # ifdef RAPTOR_STATIC # define RAPTOR_API # else # ifdef RAPTOR_INTERNAL # define RAPTOR_API _declspec(dllexport) # else # define RAPTOR_API _declspec(dllimport) # endif # endif # else # define RAPTOR_API # endif #endif /* Use gcc 3.1+ feature to allow marking of deprecated API calls. * This gives a warning during compiling. */ #if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3 #ifdef __APPLE_CC__ /* OSX gcc cpp-precomp is broken */ #define RAPTOR_DEPRECATED #else #define RAPTOR_DEPRECATED __attribute__((deprecated)) #endif #else #define RAPTOR_DEPRECATED #endif /** * RAPTOR_V2_EXPERIMENTAL: * * Enable EXPERIMENTAL and UNSUPPORTED API v2 structs and functions * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * The v2 structs and raptor*_v2() functions are NOT supported. * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ #undef RAPTOR_V2_AVAILABLE #ifdef RAPTOR_V2_EXPERIMENTAL #define RAPTOR_V2_AVAILABLE 1 #endif /* Allow to flag V1 functions as deprecated */ #ifndef RAPTOR_V1 #define RAPTOR_V1 #endif /** * RAPTOR_PRINTF_FORMAT: * @string_index: ignore me * @first_to_check_index: ignore me * * Internal macro */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) #define RAPTOR_PRINTF_FORMAT(string_index, first_to_check_index) \ __attribute__((__format__(__printf__, string_index, first_to_check_index))) #else #define RAPTOR_PRINTF_FORMAT(string_index, first_to_check_index) #endif /** * raptor_uri: * * Raptor URI Class. */ typedef void* raptor_uri; /* Public statics */ RAPTOR_API extern const char * const raptor_short_copyright_string; RAPTOR_API extern const char * const raptor_copyright_string; RAPTOR_API extern const char * const raptor_version_string; RAPTOR_API extern const unsigned int raptor_version_major; RAPTOR_API extern const unsigned int raptor_version_minor; RAPTOR_API extern const unsigned int raptor_version_release; RAPTOR_API extern const unsigned int raptor_version_decimal; RAPTOR_API extern const char * const raptor_license_string; RAPTOR_API extern const char * const raptor_home_url_string; RAPTOR_API extern const unsigned char * const raptor_xml_namespace_uri; RAPTOR_API extern const unsigned char * const raptor_rdf_namespace_uri; RAPTOR_API extern const unsigned char * const raptor_rdf_schema_namespace_uri; RAPTOR_API extern const unsigned char * const raptor_xmlschema_datatypes_namespace_uri; RAPTOR_API extern const unsigned char * const raptor_owl_namespace_uri; /** * raptor_rdf_namespace_uri_len: * * Length of #raptor_rdf_namespace_uri string */ RAPTOR_API extern const unsigned int raptor_rdf_namespace_uri_len; RAPTOR_API extern const unsigned char * const raptor_xml_literal_datatype_uri_string; /** * raptor_xml_literal_datatype_uri_string_len: * * Length of #raptor_xml_literal_datatype_uri_string */ RAPTOR_API extern const unsigned int raptor_xml_literal_datatype_uri_string_len; /* Public structure */ #ifndef RAPTOR_WORLD_DECLARED #define RAPTOR_WORLD_DECLARED 1 /** * raptor_world: * * Raptor world class. */ typedef struct raptor_world_s raptor_world; #endif /** * raptor_parser: * * Raptor Parser class */ typedef struct raptor_parser_s raptor_parser; /** * raptor_serializer: * * Raptor Serializer class */ typedef struct raptor_serializer_s raptor_serializer; /** * raptor_www: * * Raptor WWW class */ typedef struct raptor_www_s raptor_www; /** * raptor_iostream: * * Raptor I/O Stream class */ typedef struct raptor_iostream_s raptor_iostream; /** * raptor_xml_element: * * Raptor XML Element class */ typedef struct raptor_xml_element_s raptor_xml_element; /** * raptor_xml_writer: * * Raptor XML Writer class */ typedef struct raptor_xml_writer_s raptor_xml_writer; /** * raptor_qname: * * Raptor XML qname class */ typedef struct raptor_qname_s raptor_qname; /** * raptor_namespace: * * Raptor XML Namespace class */ typedef struct raptor_namespace_s raptor_namespace; /** * raptor_namespace_stack: * * Raptor XML Namespace Stack class */ typedef struct raptor_namespace_stack_s raptor_namespace_stack; /** * raptor_ntriples_parser: * * @Deprecated: use #raptor_parser. * * old structure - use #raptor_parser instead. */ typedef raptor_parser raptor_ntriples_parser; /** * raptor_sax2: * * Raptor SAX2 class */ typedef struct raptor_sax2_s raptor_sax2; /** * raptor_identifier_type: * @RAPTOR_IDENTIFIER_TYPE_RESOURCE: Resource URI (e.g. <literal>rdf:about</literal>) * @RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: <literal>_:foo</literal> N-Triples, or generated * @RAPTOR_IDENTIFIER_TYPE_PREDICATE: predicate URI. WARNING: Will not be generated in in Raptor 1.4.9 or newer. Instead a #RAPTOR_IDENTIFIER_TYPE_RESOURCE will be returned. * @RAPTOR_IDENTIFIER_TYPE_ORDINAL: <literal>rdf:li</literal>, <literal>rdf:_</literal><emphasis>n</emphasis>. No longer generated in any parser in Raptor 1.4.10+, instead a #RAPTOR_IDENTIFIER_TYPE_RESOURCE is returned. * @RAPTOR_IDENTIFIER_TYPE_LITERAL: regular literal * @RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: <literal>rdf:parseType="Literal"</literal>. No longer generated by any parser in Raptor 1.4.8+, instead a #RAPTOR_IDENTIFIER_TYPE_LITERAL is returned with a datatype of <literal>rdf:XMLLiteral</literal>. * @RAPTOR_IDENTIFIER_TYPE_UNKNOWN: Internal * * Type of identifier in a #raptor_statement * */ typedef enum { RAPTOR_IDENTIFIER_TYPE_UNKNOWN, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, RAPTOR_IDENTIFIER_TYPE_PREDICATE, RAPTOR_IDENTIFIER_TYPE_ORDINAL, RAPTOR_IDENTIFIER_TYPE_LITERAL, RAPTOR_IDENTIFIER_TYPE_XML_LITERAL } raptor_identifier_type; /** * raptor_uri_source: * @RAPTOR_URI_SOURCE_UNKNOWN: Internal * @RAPTOR_URI_SOURCE_NOT_URI: Internal * @RAPTOR_URI_SOURCE_ELEMENT: Internal * @RAPTOR_URI_SOURCE_ATTRIBUTE: Internal * @RAPTOR_URI_SOURCE_ID: Internal * @RAPTOR_URI_SOURCE_URI: Internal * @RAPTOR_URI_SOURCE_GENERATED: Internal * @RAPTOR_URI_SOURCE_BLANK_ID: Internal * * Internal: Where a URI or identifier was derived from * * Likely to be deprecated in future releases. */ typedef enum { RAPTOR_URI_SOURCE_UNKNOWN, RAPTOR_URI_SOURCE_NOT_URI, RAPTOR_URI_SOURCE_ELEMENT, RAPTOR_URI_SOURCE_ATTRIBUTE, RAPTOR_URI_SOURCE_ID, RAPTOR_URI_SOURCE_URI, RAPTOR_URI_SOURCE_GENERATED, RAPTOR_URI_SOURCE_BLANK_ID } raptor_uri_source; /** * raptor_ntriples_term_type: * @RAPTOR_NTRIPLES_TERM_TYPE_URI_REF: Internal * @RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE: Internal * @RAPTOR_NTRIPLES_TERM_TYPE_LITERAL: I * * N-Triples term types * * Used for the deprecated function raptor_ntriples_term_as_string() only. * */ typedef enum { RAPTOR_NTRIPLES_TERM_TYPE_URI_REF, RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE, RAPTOR_NTRIPLES_TERM_TYPE_LITERAL } raptor_ntriples_term_type; /** * raptor_locator: * @uri: URI of location (or NULL) * @file: Filename of location (or NULL) * @line: Line number of location (or <0 for no line) * @column: Column number of location (or <0 for no column) * @byte: Byte number of location (or <0 for no byte) * * Location information for an error, warning or information message. */ typedef struct { raptor_uri *uri; const char *file; int line; int column; int byte; } raptor_locator; /** * raptor_feature: * @RAPTOR_FEATURE_SCANNING: If true (default false), the RDF/XML * parser will look for embedded rdf:RDF elements inside the XML * content, and not require that the XML start with an rdf:RDF root * element. * @RAPTOR_FEATURE_ASSUME_IS_RDF: If true (default false) then the * RDF/XML parser will assume the content is RDF/XML, not require * that rdf:RDF root element, and immediately interpret the content * as RDF/XML. * @RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: If true (default true) * then the RDF/XML parser will allow non-XML namespaced attributes * to be accepted as well as rdf: namespaced ones. For example, * 'about' and 'ID' will be interpreted as if they were rdf:about * and rdf:ID respectively. * @RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: If true (default true) * then the RDF/XML parser will allow unknown parsetypes to be * present and will pass them on to the user. Unimplemented at * present. * @RAPTOR_FEATURE_ALLOW_BAGID: If true (default true) then the * RDF/XML parser will support the rdf:bagID attribute that was * removed from the RDF/XML language when it was revised. This * support may be removed in future. * @RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: If true (default false) * then the RDF/XML parser will generate the idList rdf:type * rdf:List triple in the handling of rdf:parseType="Collection". * This triple was removed during the revising of RDF/XML after * collections were initially added. * @RAPTOR_FEATURE_NORMALIZE_LANGUAGE: If true (default true) then * XML language values such as from xml:lang will be normalized to * lowercase. * @RAPTOR_FEATURE_NON_NFC_FATAL: If true (default false) then * illegal Unicode Normal Form C in literals will give a fatal * error, otherwise just a warning. * @RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: If true (default true) then * the RDF/XML parser will warn about unknown rdf:parseType values. * @RAPTOR_FEATURE_CHECK_RDF_ID: If true (default true) then the * RDF/XML will check rdf:ID attribute values for duplicates and * cause an error if any are found. * @RAPTOR_FEATURE_RELATIVE_URIS: If true (default true) then * relative URIs will be used wherever possible when serializing. * @RAPTOR_FEATURE_START_URI: Set the start URI for serlalizing to use. * @RAPTOR_FEATURE_WRITER_AUTO_INDENT: Automatically indent elements when * seriailizing. * @RAPTOR_FEATURE_WRITER_AUTO_EMPTY: Automatically detect and * abbreviate empty elements when serializing. * @RAPTOR_FEATURE_WRITER_INDENT_WIDTH: Integer number of spaces to use * for each indent level when serializing with auto indent. * @RAPTOR_FEATURE_WRITER_XML_VERSION: Integer XML version XML 1.0 (10) or XML 1.1 (11) * @RAPTOR_FEATURE_WRITER_XML_DECLARATION: Write XML 1.0 or 1.1 declaration. * @RAPTOR_FEATURE_NO_NET: Deny network requests. * @RAPTOR_FEATURE_RESOURCE_BORDER: Border color of resource * nodes for GraphViz DOT serializer. * @RAPTOR_FEATURE_LITERAL_BORDER: Border color of literal nodes * for GraphViz DOT serializer. * @RAPTOR_FEATURE_BNODE_BORDER: Border color of blank nodes for * GraphViz DOT serializer. * @RAPTOR_FEATURE_RESOURCE_FILL: Fill color of resource nodes * for GraphViz DOT serializer. * @RAPTOR_FEATURE_LITERAL_FILL: Fill color of literal nodes for * GraphViz DOT serializer. * @RAPTOR_FEATURE_BNODE_FILL: Fill color of blank nodes for * GraphViz DOT serializer. * @RAPTOR_FEATURE_HTML_TAG_SOUP: Use a lax HTML parser if an XML parser * fails when read HTML for GRDDL parser. * @RAPTOR_FEATURE_MICROFORMATS: Look for microformats for GRDDL parser. * @RAPTOR_FEATURE_HTML_LINK: Look for head <link> to type rdf/xml * for GRDDL parser. * @RAPTOR_FEATURE_WWW_TIMEOUT: Set timeout for internal WWW URI requests * for GRDDL parser. * @RAPTOR_FEATURE_WRITE_BASE_URI: Write @base directive for Turtle/N3. * @RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: HTTP Cache-Control: header * @RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: HTTP User-Agent: header * @RAPTOR_FEATURE_JSON_CALLBACK: JSON serializer callback function. * @RAPTOR_FEATURE_JSON_EXTRA_DATA: JSON serializer extra top-level data * @RAPTOR_FEATURE_RSS_TRIPLES: Atom/RSS serializer writes extra RDF triples it finds (none, rdf-xml, atom-triples) * @RAPTOR_FEATURE_ATOM_ENTRY_URI: Atom entry URI. If given, generate an Atom Entry Document with the item having the given URI, otherwise generate an Atom Feed Document with any items found. * @RAPTOR_FEATURE_PREFIX_ELEMENTS: Integer. If set, generate Atom/RSS1.0 documents with prefixed elements, otherwise unprefixed. * @RAPTOR_FEATURE_LAST: Internal * * Raptor parser, serializer or XML writer features. */ typedef enum { RAPTOR_FEATURE_SCANNING, RAPTOR_FEATURE_ASSUME_IS_RDF, RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES, RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES, RAPTOR_FEATURE_ALLOW_BAGID, RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST, RAPTOR_FEATURE_NORMALIZE_LANGUAGE, RAPTOR_FEATURE_NON_NFC_FATAL, RAPTOR_FEATURE_WARN_OTHER_PARSETYPES, RAPTOR_FEATURE_CHECK_RDF_ID, RAPTOR_FEATURE_RELATIVE_URIS, RAPTOR_FEATURE_START_URI, RAPTOR_FEATURE_WRITER_AUTO_INDENT, RAPTOR_FEATURE_WRITER_AUTO_EMPTY, RAPTOR_FEATURE_WRITER_INDENT_WIDTH, RAPTOR_FEATURE_WRITER_XML_VERSION, RAPTOR_FEATURE_WRITER_XML_DECLARATION, RAPTOR_FEATURE_NO_NET, RAPTOR_FEATURE_RESOURCE_BORDER, RAPTOR_FEATURE_LITERAL_BORDER, RAPTOR_FEATURE_BNODE_BORDER, RAPTOR_FEATURE_RESOURCE_FILL, RAPTOR_FEATURE_LITERAL_FILL, RAPTOR_FEATURE_BNODE_FILL, RAPTOR_FEATURE_HTML_TAG_SOUP, RAPTOR_FEATURE_MICROFORMATS, RAPTOR_FEATURE_HTML_LINK, RAPTOR_FEATURE_WWW_TIMEOUT, RAPTOR_FEATURE_WRITE_BASE_URI, RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL, RAPTOR_FEATURE_WWW_HTTP_USER_AGENT, RAPTOR_FEATURE_JSON_CALLBACK, RAPTOR_FEATURE_JSON_EXTRA_DATA, RAPTOR_FEATURE_RSS_TRIPLES, RAPTOR_FEATURE_ATOM_ENTRY_URI, RAPTOR_FEATURE_PREFIX_ELEMENTS, RAPTOR_FEATURE_LAST = RAPTOR_FEATURE_PREFIX_ELEMENTS } raptor_feature; /** * raptor_genid_type: * @RAPTOR_GENID_TYPE_BNODEID: Generated ID is for a blank node * @RAPTOR_GENID_TYPE_BAGID: Generated ID is for rdf:bagID * * Intended type for a generated identifier asked for by the handler * registered with raptor_set_generate_id_handler(). */ typedef enum { RAPTOR_GENID_TYPE_BNODEID, RAPTOR_GENID_TYPE_BAGID } raptor_genid_type; /** * raptor_identifier: * @type: Type of identifier * @uri: URI of identifier for types %RAPTOR_IDENTIFIER_TYPE_RESOURCE and * %RAPTOR_IDENTIFIER_TYPE_PREDICATE * @uri_source: where the identifier (URI or blank node) came from * @id: blank node identifier for type %RAPTOR_IDENTIFIER_TYPE_ANONYMOUS * @ordinal: integer ordinal for type %RAPTOR_IDENTIFIER_TYPE_ORDINAL * @is_malloced: internal * @literal: literal string for types %RAPTOR_IDENTIFIER_TYPE_LITERAL and * %RAPTOR_IDENTIFIER_TYPE_XML_LITERAL * @literal_datatype: RDF literal datatype URI for types * %RAPTOR_IDENTIFIER_TYPE_LITERAL and %RAPTOR_IDENTIFIER_TYPE_XML_LITERAL * @literal_language: RDF literal language for type * %RAPTOR_IDENTIFIER_TYPE_LITERAL * @world: raptor_world object * * Raptor RDF term identifier. */ typedef struct { raptor_identifier_type type; raptor_uri *uri; raptor_uri_source uri_source; const unsigned char *id; int ordinal; int is_malloced; const unsigned char *literal; raptor_uri *literal_datatype; const unsigned char *literal_language; raptor_world *world; } raptor_identifier; /** * raptor_statement: * @subject: triple subject data * @subject_type: triple subject type * @predicate: triple predicate data * @predicate_type: triple predicate type * @object: triple object literal string * @object_type: triple object type * @object_literal_datatype: triple object literal datatype URI (or NULL) * @object_literal_language: triple object literal language string (or NULL) * * An RDF triple * * See #raptor_identifier for a description of how the fields may be used. * As returned by a parser statement_handler. * * See also #raptor_statement_v2. */ typedef struct { const void *subject; raptor_identifier_type subject_type; const void *predicate; raptor_identifier_type predicate_type; const void *object; raptor_identifier_type object_type; raptor_uri *object_literal_datatype; const unsigned char *object_literal_language; } raptor_statement; #ifdef RAPTOR_V2_AVAILABLE /** * raptor_statement_v2: * @world: raptor_world object * @s: #raptor_statement * * An RDF triple wrapper for raptor v2 statement API. * * See #raptor_statement. */ typedef struct { raptor_world* world; raptor_statement *s; } raptor_statement_v2; #endif /** * raptor_new_uri_func: * @context: URI context data * @uri_string: URI string * * Handler function for implementing raptor_new_uri(). * * Return value: new URI object or NULL on failure */ typedef raptor_uri* (*raptor_new_uri_func) (void *context, const unsigned char *uri_string); /** * raptor_new_uri_from_uri_local_name_func: * @context: URI context data * @uri: URI object * @local_name: local name string * * Handler function for implementing raptor_new_uri_from_uri_local_name(). * * Return value: new URI object or NULL on failure */ typedef raptor_uri* (*raptor_new_uri_from_uri_local_name_func) (void *context, raptor_uri *uri, const unsigned char *local_name); /** * raptor_new_uri_relative_to_base_func: * @context: URI context data * @base_uri: base URI object * @uri_string: relative URI string * * Handler function for implementing raptor_new_uri_relative_to_base(). * * Return value: new URI object or NULL on failure */ typedef raptor_uri* (*raptor_new_uri_relative_to_base_func) (void *context, raptor_uri *base_uri, const unsigned char *uri_string); /** * raptor_new_uri_for_rdf_concept_func: * @context: URI context data * @name: RDF term * * Handler function for implementing raptor_new_uri_for_rdf_concept(). * * Return value: new URI object or NULL on failure */ typedef raptor_uri* (*raptor_new_uri_for_rdf_concept_func) (void *context, const char *name); /** * raptor_free_uri_func: * @context: URI context data * @uri: URI object * * Handler function for implementing raptor_free_uri(). */ typedef void (*raptor_free_uri_func) (void *context, raptor_uri *uri); /** * raptor_uri_equals_func: * @context: URI context data * @uri1: URI object 1 * @uri2: URI object 2 * * Handler function for implementing raptor_uri_equals(). * * Return value: non-0 if the URIs are equal */ typedef int (*raptor_uri_equals_func) (void *context, raptor_uri* uri1, raptor_uri* uri2); /** * raptor_uri_compare_func: * @context: URI context data * @uri1: URI object 1 * @uri2: URI object 2 * * Handler function for implementing raptor_uri_equals(). * * Return value: -1 if uri1 < uri2, 0 if equal, 1 if uri1 > uri2 */ typedef int (*raptor_uri_compare_func) (void *context, raptor_uri* uri1, raptor_uri* uri2); /** * raptor_uri_copy_func: * @context: URI context data * @uri: URI object * * Handler function for implementing raptor_uri_copy(). * * Return value: new URI object or NULL on failure */ typedef raptor_uri* (*raptor_uri_copy_func) (void *context, raptor_uri *uri); /** * raptor_uri_as_string_func: * @context: URI context data * @uri: URI object * * Handler function for implementing raptor_uri_as_string(). * * Return value: shared string representation of the URI */ typedef unsigned char* (*raptor_uri_as_string_func)(void *context, raptor_uri *uri); /** * raptor_uri_as_counted_string_func: * @context: URI context data * @uri: URI object * @len_p: length * * Handler function for implementing raptor_uri_as_counted_string(). * * Return value: shared string representation of the URI */ typedef unsigned char* (*raptor_uri_as_counted_string_func)(void *context, raptor_uri *uri, size_t* len_p); /** * raptor_uri_handler: * @new_uri: function for raptor_new_uri() * @new_uri_from_uri_local_name: function for raptor_new_uri_from_uri_local_name() * @new_uri_relative_to_base: function for raptor_new_uri_relative_to_base() * @new_uri_for_rdf_concept: function for raptor_new_uri_for_rdf_concept() * @free_uri: function for raptor_free_uri() * @uri_equals: function for raptor_uri_equals() * @uri_compare: function for raptor_uri_compare() * @uri_copy: function for raptor_uri_copy() * @uri_as_string: function for raptor_uri_as_string() * @uri_as_counted_string: function for raptor_uri_as_counted_string() * @initialised: API version - set to API version implemented: 1..2 * * URI implementation handler structure. */ typedef struct { /* constructors - URI Interface V1 */ raptor_new_uri_func new_uri; raptor_new_uri_from_uri_local_name_func new_uri_from_uri_local_name; raptor_new_uri_relative_to_base_func new_uri_relative_to_base; raptor_new_uri_for_rdf_concept_func new_uri_for_rdf_concept; /* destructor - URI Interface V1 */ raptor_free_uri_func free_uri; /* methods - URI Interface V1 */ raptor_uri_equals_func uri_equals; raptor_uri_copy_func uri_copy; /* well, copy constructor */ raptor_uri_as_string_func uri_as_string; raptor_uri_as_counted_string_func uri_as_counted_string; int initialised; /* methods - URI Interface V2 */ raptor_uri_compare_func uri_compare; } raptor_uri_handler; /** * raptor_simple_message_handler: * @user_data: user data * @message: message to report * @...: arguments for message * * Simple message handler function. * * Used by multiple functions including raptor_xml_escape_string(), * raptor_iostream_write_xml_escaped_string(), raptor_new_qname(), * raptor_qname_string_to_uri(), raptor_new_namespaces(), * raptor_namespaces_init(), raptor_iostream_write_xml_element(), * raptor_new_xml_writer(). */ typedef void (*raptor_simple_message_handler)(void *user_data, const char *message, ...); /** * raptor_message_handler: * @user_data: user data * @locator: location associated with message or NULL * @message: message to report * * Message with location handler function. * * Used during parsing and serializing for errors and warnings that * may include location information. Multiple handlers may be set for * parsers and serializers by raptor_set_fatal_error_handler(), * raptor_set_error_handler(), raptor_set_warning_handler(), * raptor_serializer_set_error_handler() and * raptor_serializer_set_warning_handler(). * * Also used by raptor_www_set_error_handler() for location-based errors * in WWW retrieval. */ typedef void (*raptor_message_handler)(void *user_data, raptor_locator* locator, const char *message); /** * raptor_message_handler_closure: * @user_data: user data for handler invocation * @handler: handler function * * The combination of a message handler and the user data to send to it. */ typedef struct { void *user_data; raptor_message_handler handler; } raptor_message_handler_closure; /** * raptor_statement_handler: * @user_data: user data * @statement: statement to report * * Statement (triple) reporting handler function. */ typedef void (*raptor_statement_handler)(void *user_data, const raptor_statement *statement); /** * raptor_graph_handler: * @user_data: user data * @graph: graph to report, 0 for the default graph * * Named graph reporting handler function. Due to historic reasons the named graph * API is separated from the statement handler. A graph is reported after all its * statements. */ typedef void (*raptor_graph_handler)(void *user_data, raptor_uri *graph); /** * raptor_generate_id_handler: * @user_data: user data * @type: type of ID to create * @user_bnodeid: a user-specified ID or NULL if none available. * * Generate an identifier handler function. * * Return value: new ID to use */ typedef unsigned char* (*raptor_generate_id_handler)(void *user_data, raptor_genid_type type, unsigned char* user_bnodeid); /** * raptor_namespace_handler: * @user_data: user data * @nspace: #raptor_namespace declared * * XML Namespace declaration reporting handler set by * raptor_set_namespace_handler(). */ typedef void (*raptor_namespace_handler)(void* user_data, raptor_namespace *nspace); /** * raptor_www_write_bytes_handler: * @www: WWW object * @userdata: user data * @ptr: data pointer * @size: size of individual item * @nmemb: number of items * * Receiving bytes of data from WWW retrieval handler. * * Set by raptor_www_set_write_bytes_handler(). */ typedef void (*raptor_www_write_bytes_handler)(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb); /** * raptor_www_content_type_handler: * @www: WWW object * @userdata: user data * @content_type: content type seen * * Receiving Content-Type: header from WWW retrieval handler. * * Set by raptor_www_set_content_type_handler(). */ typedef void (*raptor_www_content_type_handler)(raptor_www* www, void *userdata, const char *content_type); /** * raptor_www_final_uri_handler: * @www: WWW object * @userdata: user data * @final_uri: final URI seen * * Receiving the final resolved URI from a WWW retrieval * * Set by raptor_www_set_final_uri_handler(). */ typedef void (*raptor_www_final_uri_handler)(raptor_www* www, void *userdata, raptor_uri *final_uri); /** * raptor_uri_filter_func: * @user_data: user data * @uri: #raptor_uri URI to check * * Callback function for #raptor_www_set_uri_filter * * Return value: non-0 to filter the URI */ typedef int (*raptor_uri_filter_func)(void *user_data, raptor_uri* uri); /** * raptor_libxml_flags: * @RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE: if set - save/restore the libxml generic error handler when parsing (default unset) * @RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE: if set - save/restore the libxml structured error handler when parsing (default unset) * * libxml library flags * * These are used by raptor_world_set_libxml_flags() and * raptor_set_libxml_flags() to control common libxml features. * * If any handler saving/restoring is enabled, any existing handler * and context is saved before parsing and restored afterwards. * Otherwise, no saving/restoring is performed. * */ typedef enum { RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE = 1, RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE = 2 } raptor_libxml_flags; /* Public functions */ RAPTOR_API raptor_world* raptor_new_world(void); RAPTOR_API int raptor_world_open(raptor_world* world); RAPTOR_API void raptor_free_world(raptor_world* world); RAPTOR_API void raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences); RAPTOR_API void raptor_world_set_libxml_flags(raptor_world *world, int flags); #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 void raptor_init(void); RAPTOR_API RAPTOR_V1 void raptor_finish(void); RAPTOR_API RAPTOR_V1 void raptor_set_libxslt_security_preferences(void *security_preferences); void raptor_set_libxml_flags(int flags); #endif /* Get parser names */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 int raptor_parsers_enumerate(const unsigned int counter, const char **name, const char **label); RAPTOR_API RAPTOR_V1 int raptor_syntaxes_enumerate(const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string); RAPTOR_API RAPTOR_V1 int raptor_syntax_name_check(const char *name); RAPTOR_API RAPTOR_V1 const char* raptor_guess_parser_name(raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API int raptor_parsers_enumerate_v2(raptor_world* world, const unsigned int counter, const char **name, const char **label); RAPTOR_API int raptor_syntaxes_enumerate_v2(raptor_world* world, const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string); RAPTOR_API int raptor_syntax_name_check_v2(raptor_world* world, const char *name); RAPTOR_API const char* raptor_guess_parser_name_v2(raptor_world* world, raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier); #endif /* Create */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_parser* raptor_new_parser(const char *name); RAPTOR_API RAPTOR_V1 raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_parser* raptor_new_parser_v2(raptor_world* world, const char *name); RAPTOR_API raptor_parser* raptor_new_parser_for_content_v2(raptor_world* world, raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier); #endif RAPTOR_API int raptor_start_parse(raptor_parser *rdf_parser, raptor_uri *uri); /* Destroy */ RAPTOR_API void raptor_free_parser(raptor_parser* parser); /* Handlers */ RAPTOR_API void raptor_set_fatal_error_handler(raptor_parser* parser, void *user_data, raptor_message_handler handler); RAPTOR_API void raptor_set_error_handler(raptor_parser* parser, void *user_data, raptor_message_handler handler); RAPTOR_API void raptor_set_warning_handler(raptor_parser* parser, void *user_data, raptor_message_handler handler); RAPTOR_API void raptor_set_statement_handler(raptor_parser* parser, void *user_data, raptor_statement_handler handler); RAPTOR_API void raptor_set_graph_handler(raptor_parser* parser, void *user_data, raptor_graph_handler handler); RAPTOR_API void raptor_set_generate_id_handler(raptor_parser* parser, void *user_data, raptor_generate_id_handler handler); RAPTOR_API void raptor_set_namespace_handler(raptor_parser* parser, void *user_data, raptor_namespace_handler handler); RAPTOR_API void raptor_parser_set_uri_filter(raptor_parser* parser, raptor_uri_filter_func filter, void* user_data); #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 void raptor_print_statement(const raptor_statement * statement, FILE *stream); RAPTOR_API RAPTOR_V1 void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API void raptor_print_statement_v2(const raptor_statement_v2 * statement, FILE *stream); RAPTOR_API void raptor_print_statement_as_ntriples_v2(const raptor_statement_v2 * statement, FILE *stream); #endif #if !defined(RAPTOR_DISABLE_DEPRECATED) && !defined(RAPTOR_DISABLE_V1) RAPTOR_API RAPTOR_DEPRECATED void raptor_print_statement_detailed(const raptor_statement * statement, int detailed, FILE *stream); #endif #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 unsigned char* raptor_statement_part_as_counted_string(const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language, size_t* len_p); RAPTOR_API RAPTOR_V1 unsigned char* raptor_statement_part_as_string(const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language); RAPTOR_API RAPTOR_V1 int raptor_statement_compare(const raptor_statement *s1, const raptor_statement *s2); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API unsigned char* raptor_statement_part_as_counted_string_v2(raptor_world* world, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language, size_t* len_p); RAPTOR_API unsigned char* raptor_statement_part_as_string_v2(raptor_world* world, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language); RAPTOR_API int raptor_statement_compare_v2(const raptor_statement_v2 *s1, const raptor_statement_v2 *s2); #endif RAPTOR_API raptor_locator* raptor_get_locator(raptor_parser* rdf_parser); RAPTOR_API void raptor_set_default_generate_id_parameters(raptor_parser* rdf_parser, char *prefix, int base); /* Parsing functions */ RAPTOR_API int raptor_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end); RAPTOR_API int raptor_parse_file_stream(raptor_parser* rdf_parser, FILE *stream, const char *filename, raptor_uri *base_uri); RAPTOR_API int raptor_parse_file(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri); RAPTOR_API int raptor_parse_uri(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri); RAPTOR_API int raptor_parse_uri_with_connection(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection); RAPTOR_API void raptor_parse_abort(raptor_parser* rdf_parser); /* Utility functions */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 void raptor_print_locator(FILE *stream, raptor_locator* locator); RAPTOR_API RAPTOR_V1 int raptor_format_locator(char *buffer, size_t length, raptor_locator* locator); RAPTOR_API RAPTOR_V1 const char * raptor_locator_uri(raptor_locator *locator); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API void raptor_print_locator_v2(raptor_world* world, FILE *stream, raptor_locator* locator); RAPTOR_API int raptor_format_locator_v2(raptor_world* world, char *buffer, size_t length, raptor_locator* locator); #endif RAPTOR_API int raptor_locator_line(raptor_locator *locator); RAPTOR_API int raptor_locator_column(raptor_locator *locator); RAPTOR_API int raptor_locator_byte(raptor_locator *locator); RAPTOR_API const char * raptor_locator_file(raptor_locator *locator); #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API const char * raptor_locator_uri_v2(raptor_world* world, raptor_locator *locator); #endif RAPTOR_API const char* raptor_get_name(raptor_parser *rdf_parser); RAPTOR_API const char* raptor_get_label(raptor_parser *rdf_parser); RAPTOR_API const char* raptor_get_mime_type(raptor_parser *rdf_parser); RAPTOR_API int raptor_get_need_base_uri(raptor_parser *rdf_parser); #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 int raptor_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API int raptor_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); #endif RAPTOR_API int raptor_set_feature(raptor_parser *parser, raptor_feature feature, int value); RAPTOR_API int raptor_parser_set_feature_string(raptor_parser *parser, raptor_feature feature, const unsigned char *value); RAPTOR_API int raptor_get_feature(raptor_parser *parser, raptor_feature feature); RAPTOR_API const unsigned char* raptor_parser_get_feature_string(raptor_parser *parser, raptor_feature feature); RAPTOR_API unsigned int raptor_get_feature_count(void); RAPTOR_API void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_strict); RAPTOR_API const char* raptor_parser_get_accept_header(raptor_parser* rdf_parser); unsigned char* raptor_parser_generate_id(raptor_parser *rdf_parser, raptor_genid_type type); RAPTOR_API raptor_world* raptor_parser_get_world(raptor_parser* rdf_parser); /* Get serializer names */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 int raptor_serializers_enumerate(const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string); RAPTOR_API RAPTOR_V1 int raptor_serializer_syntax_name_check(const char *name); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API int raptor_serializers_enumerate_v2(raptor_world* world, const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string); RAPTOR_API int raptor_serializer_syntax_name_check_v2(raptor_world* world, const char *name); #endif /* Serializing */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_serializer* raptor_new_serializer(const char *name); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_serializer* raptor_new_serializer_v2(raptor_world* world, const char *name); #endif RAPTOR_API void raptor_free_serializer(raptor_serializer* rdf_serializer); RAPTOR_API int raptor_serialize_start(raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream); RAPTOR_API int raptor_serialize_start_to_iostream(raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream); RAPTOR_API int raptor_serialize_start_to_filename(raptor_serializer *rdf_serializer, const char *filename); RAPTOR_API int raptor_serialize_start_to_string(raptor_serializer *rdf_serializer, raptor_uri *uri, void **string_p, size_t *length_p); RAPTOR_API int raptor_serialize_start_to_file_handle(raptor_serializer *rdf_serializer, raptor_uri *uri, FILE *fh); RAPTOR_API int raptor_serialize_set_namespace(raptor_serializer* rdf_serializer, raptor_uri *uri, const unsigned char *prefix); RAPTOR_API int raptor_serialize_set_namespace_from_namespace(raptor_serializer* rdf_serializer, raptor_namespace *nspace); RAPTOR_API int raptor_serialize_statement(raptor_serializer* rdf_serializer, const raptor_statement *statement); RAPTOR_API int raptor_serialize_end(raptor_serializer *rdf_serializer); RAPTOR_API raptor_iostream* raptor_serializer_get_iostream(raptor_serializer *serializer); RAPTOR_API void raptor_serializer_set_error_handler(raptor_serializer* serializer, void *user_data, raptor_message_handler handler); RAPTOR_API void raptor_serializer_set_warning_handler(raptor_serializer* serializer, void *user_data, raptor_message_handler handler); RAPTOR_API raptor_locator* raptor_serializer_get_locator(raptor_serializer *rdf_serializer); #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 int raptor_serializer_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API int raptor_serializer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); #endif RAPTOR_API int raptor_serializer_set_feature(raptor_serializer *serializer, raptor_feature feature, int value); RAPTOR_API int raptor_serializer_set_feature_string(raptor_serializer *serializer, raptor_feature feature, const unsigned char *value); RAPTOR_API int raptor_serializer_get_feature(raptor_serializer *serializer, raptor_feature feature); RAPTOR_API const unsigned char *raptor_serializer_get_feature_string(raptor_serializer *serializer, raptor_feature feature); RAPTOR_API raptor_world* raptor_serializer_get_world(raptor_serializer* rdf_serializer); /* memory functions */ RAPTOR_API void raptor_free_memory(void *ptr); RAPTOR_API void* raptor_alloc_memory(size_t size); RAPTOR_API void* raptor_calloc_memory(size_t nmemb, size_t size); /* URI functions */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_uri* raptor_new_uri(const unsigned char *uri_string); RAPTOR_API RAPTOR_V1 raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsigned char *local_name); RAPTOR_API RAPTOR_V1 raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri, const unsigned char *uri_string); RAPTOR_API RAPTOR_V1 raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const unsigned char *id); RAPTOR_API RAPTOR_V1 raptor_uri* raptor_new_uri_for_rdf_concept(const char *name); RAPTOR_API RAPTOR_V1 void raptor_free_uri(raptor_uri *uri); RAPTOR_API RAPTOR_V1 int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2); RAPTOR_API RAPTOR_V1 int raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2); RAPTOR_API RAPTOR_V1 raptor_uri* raptor_uri_copy(raptor_uri *uri); RAPTOR_API RAPTOR_V1 unsigned char* raptor_uri_as_string(raptor_uri *uri); RAPTOR_API RAPTOR_V1 unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_uri* raptor_new_uri_v2(raptor_world* world, const unsigned char *uri_string); RAPTOR_API raptor_uri* raptor_new_uri_from_uri_local_name_v2(raptor_world* world, raptor_uri *uri, const unsigned char *local_name); RAPTOR_API raptor_uri* raptor_new_uri_relative_to_base_v2(raptor_world* world, raptor_uri *base_uri, const unsigned char *uri_string); RAPTOR_API raptor_uri* raptor_new_uri_from_id_v2(raptor_world* world, raptor_uri *base_uri, const unsigned char *id); RAPTOR_API raptor_uri* raptor_new_uri_for_rdf_concept_v2(raptor_world* world, const char *name); RAPTOR_API void raptor_free_uri_v2(raptor_world* world, raptor_uri *uri); RAPTOR_API int raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2); RAPTOR_API int raptor_uri_compare_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2); RAPTOR_API raptor_uri* raptor_uri_copy_v2(raptor_world* world, raptor_uri *uri); RAPTOR_API unsigned char* raptor_uri_as_string_v2(raptor_world* world, raptor_uri *uri); RAPTOR_API unsigned char* raptor_uri_as_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t* len_p); #endif /* Make an xml:base-compatible URI from an existing one */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* old_uri); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world, raptor_uri* old_uri); #endif /* Make a URI suitable for retrieval (no fragment, has path) from an existing one */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world, raptor_uri* old_uri); #endif /* Identifier functions */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_identifier* raptor_new_identifier(raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char *id, const unsigned char *literal, raptor_uri *literal_datatype, const unsigned char *literal_language); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_identifier* raptor_new_identifier_v2(raptor_world* world, raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char *id, const unsigned char *literal, raptor_uri *literal_datatype, const unsigned char *literal_language); #endif RAPTOR_API int raptor_copy_identifier(raptor_identifier *dest, raptor_identifier *src); RAPTOR_API void raptor_free_identifier(raptor_identifier *identifier); /* Utility functions */ RAPTOR_API int raptor_print_ntriples_string(FILE *stream, const unsigned char *string, const char delim); #ifndef RAPTOR_DISABLE_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED unsigned char* raptor_ntriples_string_as_utf8_string(raptor_parser* rdf_parser, const unsigned char *src, int len, size_t *dest_lenp); #endif #ifndef RAPTOR_DISABLE_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED const char* raptor_ntriples_term_as_string(raptor_ntriples_term_type term); #endif RAPTOR_API int raptor_iostream_write_string_ntriples(raptor_iostream *iostr, const unsigned char *string, size_t len, const char delim); RAPTOR_API int raptor_iostream_write_string_python(raptor_iostream *iostr, const unsigned char *string, size_t len, const char delim, int flags); #ifndef RAPTOR_DISABLE_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED void raptor_iostream_write_string_turtle(raptor_iostream *iostr, const unsigned char *string, size_t len); #endif #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement); RAPTOR_API #endif #ifdef RAPTOR_V2_AVAILABLE void raptor_iostream_write_statement_ntriples_v2(raptor_world* world, raptor_iostream* iostr, const raptor_statement *statement); #endif RAPTOR_API int raptor_xml_any_escape_string(const unsigned char *string, size_t len, unsigned char *buffer, size_t length, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data); RAPTOR_API int raptor_iostream_write_xml_any_escaped_string(raptor_iostream* iostr, const unsigned char *string, size_t len, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data); RAPTOR_API int raptor_xml_escape_string(const unsigned char *string, size_t len, unsigned char *buffer, size_t length, char quote, raptor_simple_message_handler error_handler, void *error_data); RAPTOR_API int raptor_iostream_write_xml_escaped_string(raptor_iostream* iostr, const unsigned char *string, size_t len, char quote, raptor_simple_message_handler error_handler, void *error_data); RAPTOR_API char* raptor_vsnprintf(const char *message, va_list arguments) RAPTOR_PRINTF_FORMAT(1, 0); RAPTOR_API int raptor_xml_name_check(const unsigned char *string, size_t length, int xml_version); /* raptor_rfc2396.c */ RAPTOR_API void raptor_uri_resolve_uri_reference(const unsigned char *base_uri, const unsigned char *reference_uri, unsigned char* buffer, size_t length); /* raptor_uri.c */ RAPTOR_API unsigned char *raptor_uri_filename_to_uri_string(const char *filename); RAPTOR_API char *raptor_uri_uri_string_to_filename(const unsigned char *uri_string); RAPTOR_API char *raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_string, unsigned char **fragment_p); #ifndef RAPTOR_DISABLE_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED int raptor_uri_is_file_uri(const unsigned char* uri_string); #endif RAPTOR_API int raptor_uri_uri_string_is_file_uri(const unsigned char* uri_string); #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p); RAPTOR_API RAPTOR_V1 unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri); RAPTOR_API RAPTOR_V1 void raptor_uri_print(const raptor_uri* uri, FILE *stream); RAPTOR_API RAPTOR_V1 unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p); RAPTOR_API RAPTOR_V1 unsigned char* raptor_uri_to_string(raptor_uri *uri); RAPTOR_API RAPTOR_V1 void raptor_uri_set_handler(const raptor_uri_handler *handler, void *context); RAPTOR_API RAPTOR_V1 void raptor_uri_get_handler(const raptor_uri_handler **handler, void **context); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API unsigned char* raptor_uri_to_relative_counted_uri_string_v2(raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p); RAPTOR_API unsigned char* raptor_uri_to_relative_uri_string_v2(raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri); RAPTOR_API void raptor_uri_print_v2(raptor_world* world, const raptor_uri* uri, FILE *stream); RAPTOR_API unsigned char* raptor_uri_to_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t *len_p); RAPTOR_API unsigned char* raptor_uri_to_string_v2(raptor_world* world, raptor_uri *uri); RAPTOR_API void raptor_uri_set_handler_v2(raptor_world* world, const raptor_uri_handler *handler, void *context); RAPTOR_API void raptor_uri_get_handler_v2(raptor_world* world, const raptor_uri_handler **handler, void **context); #endif /** * RAPTOR_RDF_MS_URI: * * RDF Namespace URI (rdf:). * * Copy with raptor_uri_copy() to use. */ #define RAPTOR_RDF_MS_URI raptor_rdf_namespace_uri /** * RAPTOR_RDF_SCHEMA_URI: * * RDF Schema Namespace URI (rdfs:). * * Copy with raptor_uri_copy() to use. */ #define RAPTOR_RDF_SCHEMA_URI raptor_rdf_schema_namespace_uri /** * RAPTOR_XMLSCHEMA_DATATYPES_URI: * * XML Schema Datatypes URI (xsd:). * * Copy with raptor_uri_copy() to use. */ #define RAPTOR_XMLSCHEMA_DATATYPES_URI raptor_xmlschema_datatypes_namespace_uri /** * RAPTOR_OWL_URI: * * OWL Namespace URI (owl:). * * Copy with raptor_uri_copy() to use. */ #define RAPTOR_OWL_URI raptor_owl_namespace_uri /* raptor_www */ #ifndef RAPOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 void raptor_www_init(void); RAPTOR_API RAPTOR_V1 void raptor_www_finish(void); RAPTOR_API RAPTOR_V1 void raptor_www_no_www_library_init_finish(void); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API int raptor_www_init_v2(raptor_world* world); RAPTOR_API void raptor_www_finish_v2(raptor_world* world); RAPTOR_API void raptor_www_no_www_library_init_finish_v2(raptor_world* world); #endif #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_www *raptor_www_new(void); RAPTOR_API RAPTOR_V1 raptor_www *raptor_www_new_with_connection(void* connection); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_www *raptor_www_new_v2(raptor_world* world); RAPTOR_API raptor_www *raptor_www_new_with_connection_v2(raptor_world* world, void* connection); #endif RAPTOR_API void raptor_www_free(raptor_www *www); RAPTOR_API void raptor_www_set_user_agent(raptor_www *www, const char *user_agent); RAPTOR_API void raptor_www_set_proxy(raptor_www *www, const char *proxy); RAPTOR_API void raptor_www_set_http_accept(raptor_www *www, const char *value); RAPTOR_API void raptor_www_set_write_bytes_handler(raptor_www *www, raptor_www_write_bytes_handler handler, void *user_data); RAPTOR_API void raptor_www_set_content_type_handler(raptor_www *www, raptor_www_content_type_handler handler, void *user_data); RAPTOR_API void raptor_www_set_final_uri_handler(raptor_www* www, raptor_www_final_uri_handler handler, void *user_data); RAPTOR_API void raptor_www_set_error_handler(raptor_www *www, raptor_message_handler error_handler, void *error_data); RAPTOR_API void raptor_www_set_uri_filter(raptor_www* www, raptor_uri_filter_func filter, void* user_data); RAPTOR_API void raptor_www_set_connection_timeout(raptor_www* www, int timeout); RAPTOR_API int raptor_www_set_http_cache_control(raptor_www* www, const char* cache_control); RAPTOR_API int raptor_www_fetch(raptor_www *www, raptor_uri *uri); RAPTOR_API int raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)); RAPTOR_API void* raptor_www_get_connection(raptor_www *www); RAPTOR_API void raptor_www_abort(raptor_www *www, const char *reason); RAPTOR_API raptor_uri* raptor_www_get_final_uri(raptor_www* www); /* raptor_qname - XML qnames */ RAPTOR_API raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsigned char *name, const unsigned char *value, raptor_simple_message_handler error_handler, void *error_data); #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_namespace *ns, const unsigned char *local_name, const unsigned char *value); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_qname* raptor_new_qname_from_namespace_local_name_v2(raptor_world* world, raptor_namespace *ns, const unsigned char *local_name, const unsigned char *value); #endif RAPTOR_API raptor_qname* raptor_qname_copy(raptor_qname *qname); RAPTOR_API void raptor_free_qname(raptor_qname* name); RAPTOR_API int raptor_qname_equal(raptor_qname *name1, raptor_qname *name2); /* utility function */ RAPTOR_API raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, const unsigned char *name, size_t name_len, raptor_simple_message_handler error_handler, void *error_data); RAPTOR_API int raptor_iostream_write_qname(raptor_iostream* iostr, raptor_qname *qname); RAPTOR_API unsigned char* raptor_qname_to_counted_name(raptor_qname *qname, size_t* length_p); RAPTOR_API const raptor_namespace* raptor_qname_get_namespace(raptor_qname* name); RAPTOR_API const unsigned char* raptor_qname_get_local_name(raptor_qname* name); RAPTOR_API const unsigned char* raptor_qname_get_value(raptor_qname* name); RAPTOR_API const unsigned char* raptor_qname_get_counted_value(raptor_qname* name, size_t* length_p); /* raptor_namespace_stack - stack of XML namespaces */ RAPTOR_API raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *nstack, const unsigned char *prefix, raptor_uri* ns_uri, int depth); #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_namespace_stack* raptor_new_namespaces(const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults); RAPTOR_API RAPTOR_V1 int raptor_namespaces_init(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_namespace_stack* raptor_new_namespaces_v2(raptor_world* world, raptor_simple_message_handler error_handler, void *error_data, int defaults); RAPTOR_API int raptor_namespaces_init_v2(raptor_world* world, raptor_namespace_stack *nstack, raptor_simple_message_handler error_handler, void *error_data, int defaults); #endif RAPTOR_API void raptor_namespaces_clear(raptor_namespace_stack *nstack); RAPTOR_API void raptor_free_namespaces(raptor_namespace_stack *nstack); RAPTOR_API void raptor_namespaces_start_namespace(raptor_namespace_stack *nstack, raptor_namespace *nspace); RAPTOR_API int raptor_namespaces_start_namespace_full(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth); RAPTOR_API void raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int depth); RAPTOR_API raptor_namespace* raptor_namespaces_get_default_namespace(raptor_namespace_stack *nstack); RAPTOR_API raptor_namespace *raptor_namespaces_find_namespace(raptor_namespace_stack *nstack, const unsigned char *prefix, int prefix_length); RAPTOR_API raptor_namespace* raptor_namespaces_find_namespace_by_uri(raptor_namespace_stack *nstack, raptor_uri *ns_uri); RAPTOR_API int raptor_namespaces_namespace_in_scope(raptor_namespace_stack *nstack, const raptor_namespace *nspace); RAPTOR_API raptor_qname* raptor_namespaces_qname_from_uri(raptor_namespace_stack *nstack, raptor_uri *uri, int xml_version); /* raptor_namespace - XML namespace */ RAPTOR_API raptor_namespace* raptor_new_namespace(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth); RAPTOR_API void raptor_free_namespace(raptor_namespace *ns); RAPTOR_API int raptor_namespace_copy(raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth); RAPTOR_API raptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns); RAPTOR_API const unsigned char* raptor_namespace_get_prefix(const raptor_namespace *ns); RAPTOR_API const unsigned char* raptor_namespace_get_counted_prefix(const raptor_namespace *ns, size_t *length_p); RAPTOR_API unsigned char *raptor_namespaces_format(const raptor_namespace *ns, size_t *length_p); RAPTOR_API int raptor_iostream_write_namespace(raptor_iostream* iostr, raptor_namespace *ns); RAPTOR_API int raptor_new_namespace_parts_from_string(const unsigned char *string, unsigned char **prefix, unsigned char **uri_string); /** * raptor_stringbuffer: * * Raptor string buffer class */ typedef struct raptor_stringbuffer_s raptor_stringbuffer; /* Sequence class */ /** * raptor_sequence: * * Raptor sequence class */ typedef struct raptor_sequence_s raptor_sequence; /** * raptor_sequence_free_handler: * @object: object to free * * Handler function for freeing a sequence item. * * Set by raptor_new_sequence(). */ typedef void (raptor_sequence_free_handler(void* object)); #ifdef RAPTOR_V2_AVAILABLE /** * raptor_sequence_free_handler_v2: * @context: context data for the free handler * @object: object to free * * Handler function for freeing a sequence item. * * Set by raptor_new_sequence_v2(). */ typedef void (raptor_sequence_free_handler_v2(void* context, void* object)); #endif /** * raptor_sequence_print_handler: * @object: object to print * @fh: FILE* to print to * * Handler function for printing a sequence item. * * Set by raptor_new_sequence() or raptor_sequence_set_print_handler(). */ typedef void (raptor_sequence_print_handler(void *object, FILE *fh)); #ifdef RAPTOR_V2_AVAILABLE /** * raptor_sequence_print_handler_v2: * @context: context data for the print handler * @object: object to print * @fh: FILE* to print to * * Handler function for printing a sequence item. * * Set by raptor_new_sequence_v2() or raptor_sequence_set_print_handler_v2(). */ typedef void (raptor_sequence_print_handler_v2(void *context, void *object, FILE *fh)); #endif /* Create */ RAPTOR_API raptor_sequence* raptor_new_sequence(raptor_sequence_free_handler* free_handler, raptor_sequence_print_handler* print_handler); #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_sequence* raptor_new_sequence_v2(raptor_sequence_free_handler_v2* free_handler, raptor_sequence_print_handler_v2* print_handler, void* handler_context); #endif /* Destroy */ RAPTOR_API void raptor_free_sequence(raptor_sequence* seq); /* Methods */ RAPTOR_API int raptor_sequence_size(raptor_sequence* seq); RAPTOR_API int raptor_sequence_set_at(raptor_sequence* seq, int idx, void *data); RAPTOR_API int raptor_sequence_push(raptor_sequence* seq, void *data); RAPTOR_API int raptor_sequence_shift(raptor_sequence* seq, void *data); RAPTOR_API void* raptor_sequence_get_at(raptor_sequence* seq, int idx); RAPTOR_API void* raptor_sequence_pop(raptor_sequence* seq); RAPTOR_API void* raptor_sequence_unshift(raptor_sequence* seq); RAPTOR_API void* raptor_sequence_delete_at(raptor_sequence* seq, int idx); RAPTOR_API int raptor_compare_strings(const void *a, const void *b); RAPTOR_API void raptor_sequence_sort(raptor_sequence* seq, int(*compare)(const void *, const void *)); /* helper for printing sequences of strings */ RAPTOR_API void raptor_sequence_print_string(char *data, FILE *fh); RAPTOR_API RAPTOR_DEPRECATED void raptor_sequence_print_uri(char *data, FILE *fh); RAPTOR_API void raptor_sequence_set_print_handler(raptor_sequence *seq, raptor_sequence_print_handler *print_handler); #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API void raptor_sequence_set_print_handler_v2(raptor_sequence *seq, raptor_sequence_print_handler_v2 *print_handler); #endif RAPTOR_API void raptor_sequence_print(raptor_sequence* seq, FILE* fh); RAPTOR_API int raptor_sequence_join(raptor_sequence* dest, raptor_sequence *src); /* Unicode and UTF8 */ /** * raptor_unichar: * * raptor Unicode codepoint */ typedef unsigned long raptor_unichar; RAPTOR_API int raptor_unicode_char_to_utf8(raptor_unichar c, unsigned char *output); RAPTOR_API int raptor_utf8_to_unicode_char(raptor_unichar *output, const unsigned char *input, int length); RAPTOR_API int raptor_unicode_is_xml11_namestartchar(raptor_unichar c); RAPTOR_API int raptor_unicode_is_xml10_namestartchar(raptor_unichar c); RAPTOR_API int raptor_unicode_is_xml11_namechar(raptor_unichar c); RAPTOR_API int raptor_unicode_is_xml10_namechar(raptor_unichar c); RAPTOR_API int raptor_utf8_check(const unsigned char *string, size_t length); /* raptor_stringbuffer */ RAPTOR_API raptor_stringbuffer* raptor_new_stringbuffer(void); RAPTOR_API void raptor_free_stringbuffer(raptor_stringbuffer *stringbuffer); RAPTOR_API int raptor_stringbuffer_append_counted_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy); RAPTOR_API int raptor_stringbuffer_append_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, int do_copy); RAPTOR_API int raptor_stringbuffer_append_decimal(raptor_stringbuffer* stringbuffer, int integer); RAPTOR_API int raptor_stringbuffer_append_stringbuffer(raptor_stringbuffer* stringbuffer, raptor_stringbuffer* append); RAPTOR_API int raptor_stringbuffer_prepend_counted_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy); RAPTOR_API int raptor_stringbuffer_prepend_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, int do_copy); RAPTOR_API unsigned char * raptor_stringbuffer_as_string(raptor_stringbuffer* stringbuffer); RAPTOR_API size_t raptor_stringbuffer_length(raptor_stringbuffer* stringbuffer); RAPTOR_API int raptor_stringbuffer_copy_to_string(raptor_stringbuffer* stringbuffer, unsigned char *string, size_t length); /** * raptor_iostream_init_func: * @context: stream context data * * Handler function for #raptor_iostream initialising. * * Return value: non-0 on failure. */ typedef int (*raptor_iostream_init_func) (void *context); /** * raptor_iostream_finish_func: * @context: stream context data * * Handler function for #raptor_iostream terminating. * */ typedef void (*raptor_iostream_finish_func) (void *context); /** * raptor_iostream_write_byte_func * @context: stream context data * @byte: byte to write * * Handler function for implementing raptor_iostream_write_byte(). * * Return value: non-0 on failure. */ typedef int (*raptor_iostream_write_byte_func) (void *context, const int byte); /** * raptor_iostream_write_bytes_func: * @context: stream context data * @ptr: pointer to bytes to write * @size: size of item * @nmemb: number of items * * Handler function for implementing raptor_iostream_write_bytes(). * * Return value: non-0 on failure. */ typedef int (*raptor_iostream_write_bytes_func) (void *context, const void *ptr, size_t size, size_t nmemb); /** * raptor_iostream_write_end_func: * @context: stream context data * * Handler function for implementing raptor_iostream_write_end(). * */ typedef void (*raptor_iostream_write_end_func) (void *context); /** * raptor_iostream_read_bytes_func: * @context: stream context data * @ptr: pointer to buffer to read into * @size: size of buffer * @nmemb: number of items * * Handler function for implementing raptor_iostream_read_bytes(). * * Return value: number of items read, 0 or < @size on EOF, <0 on failure */ typedef int (*raptor_iostream_read_bytes_func) (void *context, void *ptr, size_t size, size_t nmemb); /** * raptor_iostream_read_eof_func: * @context: stream context data * * Handler function for implementing raptor_iostream_read_eof(). * * Return value: non-0 if EOF */ typedef int (*raptor_iostream_read_eof_func) (void *context); #ifndef RAPTOR_DISABLE_DEPRECATED /** * raptor_iostream_handler: * @init: initialisation handler - optional, called at most once * @finish: finishing handler - optional, called at most once * @write_byte: write byte handler - required (for writing) * @write_bytes: write bytes handler - required (for writing) * @write_end: write end handler - optional (for writing), called at most once * * I/O stream implementation handler structure. * * DEPRECATED: Use #raptor_iostream_handler2 */ typedef struct { raptor_iostream_init_func init; raptor_iostream_finish_func finish; raptor_iostream_write_byte_func write_byte; raptor_iostream_write_bytes_func write_bytes; raptor_iostream_write_end_func write_end; } raptor_iostream_handler; #endif /** * raptor_iostream_handler2: * @version: interface version. Presently 1 or 2. * @init: initialisation handler - optional, called at most once (V1) * @finish: finishing handler - optional, called at most once (V1) * @write_byte: write byte handler - required (for writing) (V1) * @write_bytes: write bytes handler - required (for writing) (V1) * @write_end: write end handler - optional (for writing), called at most once (V1) * @read_bytes: read bytes handler - required (for reading) (V2) * @read_eof: read EOF handler - required (for reading) (V2) * * I/O stream implementation handler structure. * */ typedef struct { int version; /* V1 functions */ raptor_iostream_init_func init; raptor_iostream_finish_func finish; raptor_iostream_write_byte_func write_byte; raptor_iostream_write_bytes_func write_bytes; raptor_iostream_write_end_func write_end; /* V2 functions */ raptor_iostream_read_bytes_func read_bytes; raptor_iostream_read_eof_func read_eof; } raptor_iostream_handler2; #ifndef RAPTOR_DISABLE_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED raptor_iostream* raptor_new_iostream_from_handler(void *context, const raptor_iostream_handler *handler); #endif RAPTOR_API raptor_iostream* raptor_new_iostream_from_handler2(void *user_data, const raptor_iostream_handler2* const handler2); RAPTOR_API raptor_iostream* raptor_new_iostream_to_sink(void); RAPTOR_API raptor_iostream* raptor_new_iostream_to_filename(const char *filename); RAPTOR_API raptor_iostream* raptor_new_iostream_to_file_handle(FILE *handle); RAPTOR_API raptor_iostream* raptor_new_iostream_to_string(void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)); RAPTOR_API raptor_iostream* raptor_new_iostream_from_sink(void); RAPTOR_API raptor_iostream* raptor_new_iostream_from_filename(const char *filename); RAPTOR_API raptor_iostream* raptor_new_iostream_from_file_handle(FILE *handle); RAPTOR_API raptor_iostream* raptor_new_iostream_from_string(void *string, size_t length); RAPTOR_API void raptor_free_iostream(raptor_iostream *iostr); RAPTOR_API int raptor_iostream_write_bytes(raptor_iostream *iostr, const void *ptr, size_t size, size_t nmemb); RAPTOR_API int raptor_iostream_write_byte(raptor_iostream *iostr, const int byte); RAPTOR_API void raptor_iostream_write_end(raptor_iostream *iostr); RAPTOR_API int raptor_iostream_write_string(raptor_iostream *iostr, const void *string); RAPTOR_API int raptor_iostream_write_counted_string(raptor_iostream *iostr, const void *string, size_t len); #ifndef RAPTOR_DISABLE_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED size_t raptor_iostream_get_bytes_written_count(raptor_iostream *iostr); #endif RAPTOR_API unsigned long raptor_iostream_tell(raptor_iostream *iostr); RAPTOR_API int raptor_iostream_write_decimal(raptor_iostream* iostr, int integer); RAPTOR_API int raptor_iostream_format_hexadecimal(raptor_iostream* iostr, unsigned int integer, int width); RAPTOR_API int raptor_iostream_write_stringbuffer(raptor_iostream* iostr, raptor_stringbuffer *sb); #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 int raptor_iostream_write_uri(raptor_iostream *iostr, raptor_uri *uri); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API int raptor_iostream_write_uri_v2(raptor_world* world, raptor_iostream *iostr, raptor_uri *uri); #endif RAPTOR_API int raptor_iostream_read_bytes(raptor_iostream* iostr, void *ptr, size_t size, size_t nmemb); RAPTOR_API int raptor_iostream_read_eof(raptor_iostream *iostr); /* Parser and Serializer features */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_feature raptor_feature_from_uri(raptor_uri *uri); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_feature raptor_feature_from_uri_v2(raptor_world* world, raptor_uri *uri); #endif RAPTOR_API int raptor_feature_value_type(const raptor_feature feature); /* SAX2 element Class (raptor_xml_element) */ RAPTOR_API raptor_xml_element* raptor_new_xml_element(raptor_qname* name, const unsigned char* xml_language, raptor_uri* xml_base); RAPTOR_API raptor_xml_element* raptor_new_xml_element_from_namespace_local_name(raptor_namespace *ns, const unsigned char *name, const unsigned char *xml_language, raptor_uri *xml_base); RAPTOR_API void raptor_free_xml_element(raptor_xml_element *element); RAPTOR_API raptor_qname* raptor_xml_element_get_name(raptor_xml_element *xml_element); RAPTOR_API void raptor_xml_element_set_attributes(raptor_xml_element* xml_element, raptor_qname **attributes, int count); RAPTOR_API raptor_qname** raptor_xml_element_get_attributes(raptor_xml_element* xml_element); RAPTOR_API int raptor_xml_element_get_attributes_count(raptor_xml_element* xml_element); RAPTOR_API int raptor_xml_element_declare_namespace(raptor_xml_element* xml_element, raptor_namespace *nspace); RAPTOR_API int raptor_iostream_write_xml_element(raptor_iostream *iostr, raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, raptor_simple_message_handler error_handler, void *error_data, int depth); RAPTOR_API int raptor_xml_element_is_empty(raptor_xml_element* xml_element); RAPTOR_API const unsigned char* raptor_xml_element_get_language(raptor_xml_element* xml_element); /* XML Writer Class (raptor_xml_writer) */ #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 raptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API raptor_xml_writer* raptor_new_xml_writer_v2(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize); #endif RAPTOR_API void raptor_free_xml_writer(raptor_xml_writer* xml_writer); RAPTOR_API void raptor_xml_writer_empty_element(raptor_xml_writer* xml_writer, raptor_xml_element *element); RAPTOR_API void raptor_xml_writer_start_element(raptor_xml_writer* xml_writer, raptor_xml_element *element); RAPTOR_API void raptor_xml_writer_end_element(raptor_xml_writer* xml_writer, raptor_xml_element *element); RAPTOR_API void raptor_xml_writer_newline(raptor_xml_writer* xml_writer); RAPTOR_API void raptor_xml_writer_cdata(raptor_xml_writer* xml_writer, const unsigned char *s); RAPTOR_API void raptor_xml_writer_cdata_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len); RAPTOR_API void raptor_xml_writer_raw(raptor_xml_writer* xml_writer, const unsigned char *s); RAPTOR_API void raptor_xml_writer_raw_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len); RAPTOR_API void raptor_xml_writer_comment(raptor_xml_writer* xml_writer, const unsigned char *s); RAPTOR_API void raptor_xml_writer_comment_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len); RAPTOR_API void raptor_xml_writer_flush(raptor_xml_writer* xml_writer); #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 int raptor_xml_writer_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API int raptor_xml_writer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); #endif RAPTOR_API int raptor_xml_writer_set_feature(raptor_xml_writer *xml_writer, raptor_feature feature, int value); RAPTOR_API int raptor_xml_writer_set_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature, const unsigned char *value); RAPTOR_API int raptor_xml_writer_get_feature(raptor_xml_writer *xml_writer, raptor_feature feature); RAPTOR_API const unsigned char *raptor_xml_writer_get_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature); RAPTOR_API int raptor_xml_writer_get_depth(raptor_xml_writer *xml_writer); /** * raptor_sax2_start_element_handler: * @user_data: user data * @xml_element: XML element * * SAX2 start element handler */ typedef void (*raptor_sax2_start_element_handler)(void *user_data, raptor_xml_element *xml_element); /** * raptor_sax2_end_element_handler: * @user_data: user data * @xml_element: XML element * * SAX2 end element handler */ typedef void (*raptor_sax2_end_element_handler)(void *user_data, raptor_xml_element* xml_element); /** * raptor_sax2_characters_handler: * @user_data: user data * @xml_element: XML element * @s: string * @len: string len * * SAX2 characters handler */ typedef void (*raptor_sax2_characters_handler)(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len); /** * raptor_sax2_cdata_handler: * @user_data: user data * @xml_element: XML element * @s: string * @len: string len * SAX2 CDATA section handler */ typedef void (*raptor_sax2_cdata_handler)(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len); /** * raptor_sax2_comment_handler: * @user_data: user data * @xml_element: XML element * @s: string * * SAX2 XML comment handler */ typedef void (*raptor_sax2_comment_handler)(void *user_data, raptor_xml_element* xml_element, const unsigned char *s); /** * raptor_sax2_unparsed_entity_decl_handler: * @user_data: user data * @entityName: entity name * @base: base URI * @systemId: system ID * @publicId: public ID * @notationName: notation name * * SAX2 unparsed entity (NDATA) handler */ typedef void (*raptor_sax2_unparsed_entity_decl_handler)(void *user_data, const unsigned char* entityName, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId, const unsigned char* notationName); /** * raptor_sax2_external_entity_ref_handler: * @user_data: user data * @context: context * @base: base URI * @systemId: system ID * @publicId: public ID * * SAX2 external entity reference handler * * Return value: 0 if processing should not continue because of a * fatal error in the handling of the external entity. */ typedef int (*raptor_sax2_external_entity_ref_handler)(void *user_data, const unsigned char* context, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId); /** * raptor_log_level: * @RAPTOR_LOG_LEVEL_NONE: Internal * @RAPTOR_LOG_LEVEL_FATAL: Fatal error message * @RAPTOR_LOG_LEVEL_ERROR: Error message * @RAPTOR_LOG_LEVEL_WARNING: Warning message * @RAPTOR_LOG_LEVEL_LAST: Internal * * Log levels */ typedef enum { RAPTOR_LOG_LEVEL_NONE, RAPTOR_LOG_LEVEL_FATAL, RAPTOR_LOG_LEVEL_ERROR, RAPTOR_LOG_LEVEL_WARNING, /* RAPTOR V2 FIXME - this enum list cannot be extended before V2 * API is released else binary compatibility will be broken in the * #raptor_error_handlers structure - it causes an array to grow. */ RAPTOR_LOG_LEVEL_LAST=RAPTOR_LOG_LEVEL_WARNING } raptor_log_level; /** * raptor_error_handlers: * @magic: magic value - must use raptor_error_handlers_init() to set this * @locator: raptor locator of the error * @last_log_level: number of log levels; size of @handlers arrays * @handlers: user handlers per log level * @world: raptor_world object * * Error handlers structure */ typedef struct { unsigned int magic; raptor_locator* locator; /* size of handlers array */ raptor_log_level last_log_level; raptor_message_handler_closure handlers[RAPTOR_LOG_LEVEL_LAST+1]; /* Raptor V2 FIXME - this should NOT be at the end of the structure * since it prevents increasing the size of the @handlers array but * it it is here to preserve Raptor V1 ABI. */ raptor_world *world; } raptor_error_handlers; #ifndef RAPTOR_DISABLE_V1 RAPTOR_API RAPTOR_V1 void raptor_error_handlers_init(raptor_error_handlers* error_handlers); #endif #ifdef RAPTOR_V2_AVAILABLE RAPTOR_API void raptor_error_handlers_init_v2(raptor_world* world, raptor_error_handlers* error_handlers); #endif /* SAX2 API */ RAPTOR_API raptor_sax2* raptor_new_sax2(void *user_data, raptor_error_handlers* error_handlers); RAPTOR_API void raptor_free_sax2(raptor_sax2 *sax2); RAPTOR_API void raptor_sax2_set_start_element_handler(raptor_sax2* sax2, raptor_sax2_start_element_handler handler); RAPTOR_API void raptor_sax2_set_end_element_handler(raptor_sax2* sax2, raptor_sax2_end_element_handler handler); RAPTOR_API void raptor_sax2_set_characters_handler(raptor_sax2* sax2, raptor_sax2_characters_handler handler); RAPTOR_API void raptor_sax2_set_cdata_handler(raptor_sax2* sax2, raptor_sax2_cdata_handler handler); RAPTOR_API void raptor_sax2_set_comment_handler(raptor_sax2* sax2, raptor_sax2_comment_handler handler); RAPTOR_API void raptor_sax2_set_unparsed_entity_decl_handler(raptor_sax2* sax2, raptor_sax2_unparsed_entity_decl_handler handler); RAPTOR_API void raptor_sax2_set_external_entity_ref_handler(raptor_sax2* sax2, raptor_sax2_external_entity_ref_handler handler); RAPTOR_API void raptor_sax2_set_namespace_handler(raptor_sax2* sax2, raptor_namespace_handler handler); RAPTOR_API void raptor_sax2_parse_start(raptor_sax2 *sax2, raptor_uri *base_uri); RAPTOR_API int raptor_sax2_parse_chunk(raptor_sax2* sax2, const unsigned char *buffer, size_t len, int is_end); RAPTOR_API const unsigned char* raptor_sax2_inscope_xml_language(raptor_sax2* sax2); RAPTOR_API raptor_uri* raptor_sax2_inscope_base_uri(raptor_sax2* sax2); #ifdef __cplusplus } #endif #endif ����������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/n3_lexer.c������������������������������������������������������������������������0000644�0001750�0001750�00000464012�11330672550�012512� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #line 10 "n3_lexer.c" #line 12 "n3_lexer.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE n3_lexer_restart(yyin ,yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = yyg->yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via n3_lexer_restart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] void n3_lexer_restart (FILE *input_file ,yyscan_t yyscanner ); void n3_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE n3_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void n3_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void n3_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void n3_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void n3_lexer_pop_buffer_state (yyscan_t yyscanner ); static void n3_lexer_ensure_buffer_stack (yyscan_t yyscanner ); static void n3_lexer__load_buffer_state (yyscan_t yyscanner ); static void n3_lexer__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); #define YY_FLUSH_BUFFER n3_lexer__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) YY_BUFFER_STATE n3_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE n3_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE n3_lexer__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *n3_lexer_alloc (yy_size_t ,yyscan_t yyscanner ); void *n3_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void n3_lexer_free (void * ,yyscan_t yyscanner ); #define yy_new_buffer n3_lexer__create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ n3_lexer_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ n3_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ n3_lexer_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ n3_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef unsigned char YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 33 #define YY_END_OF_BUFFER 34 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[615] = { 0, 0, 0, 0, 0, 18, 18, 34, 32, 2, 1, 1, 32, 31, 32, 12, 13, 32, 5, 4, 23, 20, 6, 32, 10, 29, 7, 32, 8, 32, 32, 3, 27, 24, 26, 27, 18, 18, 18, 18, 2, 1, 0, 15, 0, 31, 30, 30, 0, 14, 0, 0, 23, 21, 21, 0, 20, 0, 28, 0, 29, 0, 20, 0, 11, 0, 24, 0, 0, 25, 18, 18, 18, 0, 18, 18, 18, 18, 15, 16, 0, 21, 0, 0, 22, 20, 0, 0, 19, 17, 18, 0, 18, 18, 0, 18, 0, 22, 0, 22, 0, 19, 0, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 0, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 0, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 9, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 0, 18, 18, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 5, 6, 1, 1, 1, 7, 8, 9, 1, 10, 11, 12, 13, 1, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 17, 1, 18, 1, 19, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 22, 20, 20, 20, 20, 20, 23, 24, 25, 26, 27, 1, 28, 20, 20, 20, 29, 30, 20, 20, 31, 20, 20, 20, 20, 20, 20, 32, 20, 33, 20, 20, 34, 20, 20, 35, 20, 20, 1, 1, 1, 1, 1, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36 } ; static yyconst flex_int32_t yy_meta[37] = { 0, 1, 1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 5, 5, 5, 6, 1, 1, 1, 1, 7, 7, 7, 1, 7, 1, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 } ; static yyconst flex_int16_t yy_base[1023] = { 0, 0, 0, 36, 0, 70, 71, 581, 4932, 578, 4932, 551, 72, 75, 73, 4932, 4932, 68, 4932, 534, 70, 0, 4932, 524, 509, 74, 4932, 73, 4932, 508, 514, 77, 4932, 517, 4932, 87, 82, 90, 501, 100, 498, 4932, 99, 492, 0, 104, 4932, 493, 102, 4932, 0, 477, 98, 104, 107, 125, 470, 447, 4932, 428, 0, 102, 0, 116, 4932, 0, 455, 117, 125, 4932, 117, 139, 140, 449, 141, 143, 144, 147, 4932, 4932, 141, 140, 146, 439, 416, 416, 412, 395, 406, 4932, 167, 0, 170, 174, 0, 177, 404, 401, 393, 379, 360, 376, 375, 178, 0, 181, 182, 185, 190, 205, 213, 0, 214, 217, 218, 222, 223, 342, 227, 0, 228, 240, 250, 254, 255, 258, 0, 262, 263, 0, 267, 152, 266, 268, 230, 280, 275, 290, 295, 358, 300, 303, 352, 307, 319, 308, 0, 313, 312, 318, 335, 325, 340, 0, 341, 347, 0, 348, 353, 0, 357, 363, 371, 375, 380, 381, 0, 389, 393, 397, 398, 403, 407, 411, 423, 431, 434, 435, 438, 439, 443, 447, 446, 461, 470, 471, 474, 4932, 475, 0, 479, 483, 484, 487, 499, 507, 0, 511, 512, 0, 515, 519, 0, 522, 523, 527, 535, 547, 550, 0, 555, 558, 559, 562, 563, 567, 0, 570, 573, 585, 590, 595, 596, 0, 603, 602, 0, 608, 612, 330, 626, 630, 635, 640, 641, 644, 322, 648, 652, 278, 653, 664, 0, 668, 675, 676, 681, 680, 686, 0, 690, 693, 0, 703, 704, 0, 708, 715, 716, 726, 730, 731, 0, 740, 741, 744, 748, 753, 754, 0, 764, 768, 776, 780, 784, 788, 0, 791, 792, 0, 796, 800, 274, 804, 816, 824, 828, 829, 832, 246, 836, 839, 237, 842, 854, 0, 862, 866, 869, 870, 874, 877, 0, 878, 882, 0, 886, 892, 0, 900, 904, 908, 914, 918, 922, 0, 928, 932, 936, 942, 946, 950, 954, 958, 962, 966, 972, 976, 980, 984, 988, 994, 998, 1002, 1006, 1010, 1014, 270, 0, 1005, 302, 1018, 1019, 1028, 1032, 0, 1042, 1043, 0, 1046, 1054, 0, 1055, 1058, 1066, 1069, 1070, 1078, 0, 1082, 1081, 1093, 1096, 1104, 1105, 0, 1109, 1108, 1116, 1120, 1121, 1131, 0, 1134, 1143, 0, 1147, 1146, 236, 1154, 1158, 1159, 1169, 1170, 1174, 204, 1182, 1181, 197, 1187, 1194, 0, 1205, 1209, 1210, 1214, 1217, 1220, 0, 1221, 1225, 0, 1232, 1237, 0, 1247, 1248, 1254, 1255, 1259, 1260, 0, 1270, 1271, 1277, 1283, 1282, 315, 1288, 1291, 1294, 1295, 1305, 1306, 1311, 1317, 1318, 1329, 1323, 1333, 1341, 1345, 1349, 1353, 0, 1356, 1357, 1361, 1365, 1369, 1379, 0, 1383, 1389, 0, 1392, 1395, 0, 1399, 1403, 1406, 1407, 1415, 1419, 0, 1429, 1432, 1433, 1437, 1441, 1442, 0, 1445, 1449, 1457, 1465, 1469, 1472, 0, 1473, 1477, 0, 1480, 1481, 194, 1487, 1495, 1503, 1507, 1510, 1513, 193, 1520, 1519, 186, 1523, 1527, 1535, 1543, 1547, 1550, 1557, 1558, 1561, 343, 1565, 1564, 1570, 1573, 1587, 1596, 1600, 1599, 1603, 1607, 1611, 1612, 1623, 1627, 1634, 1635, 1639, 1643, 1647, 1650, 1657, 1661, 1667, 210, 1670, 1675, 1679, 1683, 1684, 1687, 1693, 1697, 1707, 1711, 1717, 1720, 1723, 1727, 1731, 1734, 1735, 1743, 1747, 1751, 1757, 1761, 1765, 1769, 1773, 1779, 1783, 1787, 1791, 1795, 1799, 1803, 1807, 1811, 1815, 1819, 1825, 1829, 1833, 1837, 1841, 1847, 1851, 1855, 1861, 1865, 1869, 1873, 1877, 1883, 1887, 1891, 1897, 1901, 1905, 1909, 1913, 1919, 1923, 1927, 1933, 1937, 1941, 1945, 1949, 1955, 1959, 1963, 1969, 1973, 1977, 1981, 1985, 1991, 1995, 1999, 2003, 2007, 2011, 2015, 2019, 2023, 2027, 2031, 2037, 2041, 2045, 2049, 2053, 2059, 2063, 2067, 2071, 2075, 2079, 4932, 2109, 2116, 2123, 2130, 152, 2137, 2140, 2143, 2146, 2153, 2160, 2163, 109, 2170, 2177, 2180, 2187, 2194, 2201, 2208, 2215, 2222, 2229, 2236, 2243, 2250, 2257, 2264, 2271, 2278, 2285, 2292, 2299, 2306, 2313, 2320, 2327, 2334, 2341, 2348, 2355, 2362, 2369, 2376, 2383, 2390, 2397, 2404, 2411, 2418, 2425, 2432, 2439, 2446, 2453, 2460, 2467, 2474, 2481, 2488, 2495, 2502, 2509, 2516, 2523, 2530, 2537, 2544, 2551, 2558, 2565, 2572, 2579, 2586, 2593, 2600, 2607, 2614, 2621, 2628, 2635, 2642, 2649, 2656, 2663, 2670, 2677, 2684, 2691, 2698, 2705, 2712, 2719, 2726, 2733, 2740, 2747, 2754, 2761, 2768, 2775, 2782, 2789, 2796, 2803, 2810, 2817, 2824, 2831, 2838, 2845, 2852, 2859, 2866, 2873, 2880, 2887, 2894, 2901, 2908, 2915, 2922, 2929, 2936, 2943, 2950, 2957, 2964, 2971, 2978, 2985, 2992, 2999, 3006, 3013, 3020, 3027, 3034, 3041, 3048, 3055, 3062, 3069, 3076, 3083, 3090, 3097, 3104, 3111, 3118, 3125, 3132, 3139, 3146, 3153, 3160, 3167, 3174, 3181, 3188, 3195, 3202, 3209, 3216, 3223, 3230, 3237, 3244, 3251, 3258, 3265, 3272, 3279, 3286, 3293, 3300, 3307, 3314, 3321, 3328, 3335, 3342, 3349, 3356, 3363, 3370, 3377, 3384, 3391, 3398, 3405, 3412, 3419, 3426, 3433, 3440, 3447, 3454, 3461, 3468, 3475, 3482, 3489, 3496, 3503, 3510, 3517, 3524, 3531, 3538, 3545, 3552, 3559, 3566, 3573, 3580, 3587, 3594, 3601, 3608, 3615, 3622, 3629, 3636, 3643, 3650, 3657, 3664, 3671, 3678, 3685, 3692, 3699, 3706, 3713, 3720, 3727, 3734, 3741, 3748, 3755, 3762, 3769, 3776, 3783, 3790, 3797, 3804, 3811, 3818, 3825, 3832, 3839, 3846, 3853, 3860, 3867, 3874, 3881, 3888, 3895, 3902, 3909, 3916, 3923, 3930, 3937, 3944, 3951, 3958, 3965, 3972, 3979, 3986, 3993, 4000, 4007, 4014, 4021, 4028, 4035, 4042, 4049, 4056, 4063, 4070, 4077, 4084, 4091, 4098, 4105, 4112, 4119, 4126, 4133, 4140, 4147, 4154, 4161, 4168, 4175, 4182, 4189, 4196, 4203, 4210, 4217, 4224, 4231, 4238, 4245, 4252, 4259, 4266, 4273, 4280, 4287, 4294, 4301, 4308, 4315, 4322, 4329, 4336, 4343, 4350, 4357, 4364, 4371, 4378, 4385, 4392, 4399, 4406, 4413, 4420, 4427, 4434, 4441, 4448, 4455, 4462, 4469, 4476, 4483, 4490, 4497, 4504, 4511, 4518, 4525, 4532, 4539, 4546, 4553, 4560, 4567, 4574, 4581, 4588, 4595, 4602, 4609, 4616, 4623, 4630, 4637, 4644, 4651, 4658, 4665, 4672, 4679, 4686, 4693, 4700, 4707, 4714, 4721, 4728, 4735, 4742, 4749, 4756, 4763, 4770, 4777, 4784, 4791, 4798, 4805, 4812, 4819, 4826, 4833, 4840, 4847, 4854, 4861, 4868, 4875, 4882, 4889, 4896, 4903, 4910, 4917, 4924 } ; static yyconst flex_int16_t yy_def[1023] = { 0, 614, 1, 614, 3, 615, 615, 614, 614, 614, 614, 614, 616, 617, 618, 614, 614, 614, 614, 614, 614, 619, 614, 620, 614, 621, 614, 622, 614, 614, 614, 621, 614, 614, 614, 623, 624, 624, 614, 625, 614, 614, 616, 614, 616, 617, 614, 614, 618, 614, 618, 614, 614, 614, 614, 614, 626, 620, 614, 614, 31, 622, 619, 622, 614, 627, 614, 623, 623, 614, 624, 624, 625, 614, 624, 628, 625, 629, 614, 614, 614, 614, 614, 614, 614, 626, 626, 614, 630, 614, 631, 632, 633, 634, 635, 636, 614, 614, 614, 614, 614, 630, 630, 637, 638, 639, 637, 640, 639, 641, 642, 643, 644, 642, 645, 644, 646, 614, 647, 648, 649, 647, 650, 649, 651, 652, 653, 654, 655, 656, 657, 625, 624, 658, 625, 659, 658, 660, 633, 631, 661, 636, 634, 662, 614, 663, 664, 665, 663, 666, 665, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 674, 677, 676, 678, 679, 680, 681, 679, 682, 681, 683, 684, 625, 685, 631, 633, 634, 636, 686, 687, 688, 689, 690, 691, 692, 693, 614, 694, 695, 696, 694, 697, 696, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 705, 708, 707, 709, 710, 711, 712, 710, 713, 712, 714, 715, 716, 717, 715, 718, 717, 719, 720, 721, 722, 723, 724, 725, 696, 694, 726, 696, 727, 726, 728, 701, 699, 729, 704, 702, 730, 731, 732, 733, 731, 734, 733, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 742, 745, 744, 746, 747, 748, 749, 747, 750, 749, 751, 752, 753, 754, 752, 755, 754, 756, 757, 758, 759, 760, 761, 762, 733, 731, 763, 733, 764, 763, 765, 738, 736, 766, 741, 739, 767, 768, 769, 770, 768, 771, 770, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 779, 782, 781, 783, 784, 785, 786, 784, 787, 786, 788, 731, 789, 733, 790, 736, 738, 739, 741, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 799, 802, 801, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 810, 813, 812, 814, 815, 816, 817, 815, 818, 817, 819, 820, 821, 822, 820, 823, 822, 824, 825, 826, 827, 828, 829, 830, 801, 799, 831, 801, 832, 831, 833, 806, 804, 834, 809, 807, 835, 836, 837, 838, 836, 839, 838, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 847, 850, 849, 851, 852, 853, 854, 852, 855, 854, 856, 799, 857, 801, 858, 804, 806, 807, 809, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 867, 870, 869, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 878, 881, 880, 882, 883, 884, 885, 883, 886, 885, 887, 888, 889, 890, 888, 891, 890, 892, 893, 894, 895, 896, 897, 898, 869, 867, 899, 869, 900, 899, 901, 874, 872, 902, 877, 875, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 912, 938, 939, 916, 940, 918, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 951, 973, 974, 975, 954, 976, 956, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 986, 1012, 1013, 990, 1014, 992, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 0, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614 } ; static yyconst flex_int16_t yy_nxt[4969] = { 0, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 17, 19, 20, 21, 22, 23, 8, 24, 25, 25, 25, 26, 27, 28, 29, 30, 31, 25, 25, 25, 25, 25, 25, 25, 27, 32, 33, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 34, 32, 32, 32, 32, 35, 35, 35, 32, 35, 32, 32, 32, 35, 35, 35, 35, 35, 35, 35, 35, 35, 37, 37, 38, 38, 43, 46, 47, 49, 51, 52, 54, 52, 71, 61, 61, 62, 62, 61, 55, 62, 71, 39, 39, 44, 50, 63, 55, 68, 63, 69, 74, 78, 70, 72, 46, 47, 49, 63, 54, 52, 63, 72, 61, 88, 614, 53, 55, 71, 81, 75, 44, 76, 80, 50, 55, 82, 61, 68, 62, 69, 80, 77, 83, 82, 83, 68, 84, 614, 72, 71, 74, 71, 70, 71, 74, 91, 70, 71, 96, 94, 96, 81, 97, 98, 70, 98, 56, 99, 82, 75, 72, 76, 72, 75, 92, 76, 82, 71, 95, 104, 74, 77, 103, 76, 71, 77, 111, 74, 71, 110, 119, 74, 71, 118, 119, 71, 614, 126, 105, 107, 74, 108, 118, 614, 614, 112, 114, 614, 115, 120, 122, 109, 123, 120, 614, 71, 127, 129, 116, 122, 71, 123, 124, 71, 74, 132, 131, 71, 71, 132, 139, 124, 74, 71, 131, 142, 130, 71, 74, 146, 145, 72, 70, 135, 133, 136, 614, 614, 133, 140, 71, 135, 146, 136, 143, 137, 614, 149, 147, 150, 71, 76, 153, 137, 74, 71, 145, 156, 71, 151, 159, 147, 74, 71, 158, 166, 614, 74, 70, 165, 71, 154, 70, 149, 614, 150, 157, 71, 614, 160, 71, 162, 90, 163, 167, 151, 169, 172, 170, 173, 71, 76, 93, 164, 172, 71, 173, 103, 171, 174, 74, 176, 106, 71, 70, 110, 174, 74, 71, 113, 189, 178, 71, 74, 189, 188, 108, 70, 71, 180, 196, 181, 614, 76, 115, 71, 184, 199, 185, 190, 614, 182, 192, 190, 193, 74, 76, 188, 186, 197, 71, 74, 202, 201, 194, 70, 200, 71, 74, 209, 208, 187, 614, 71, 192, 216, 193, 74, 614, 215, 205, 203, 206, 71, 76, 216, 194, 212, 210, 213, 144, 71, 207, 223, 217, 74, 219, 215, 220, 214, 71, 71, 226, 229, 217, 102, 102, 117, 221, 74, 99, 228, 224, 71, 219, 229, 220, 71, 74, 236, 228, 227, 230, 71, 99, 239, 221, 71, 232, 91, 233, 74, 97, 70, 230, 97, 102, 232, 237, 233, 234, 100, 86, 71, 240, 94, 86, 84, 92, 234, 75, 71, 76, 104, 74, 71, 103, 111, 74, 71, 110, 119, 77, 71, 95, 126, 71, 74, 129, 118, 84, 89, 105, 107, 66, 108, 112, 114, 87, 115, 120, 71, 58, 132, 127, 109, 122, 130, 123, 116, 71, 74, 139, 131, 71, 71, 142, 242, 124, 74, 86, 241, 133, 71, 71, 242, 249, 74, 53, 241, 135, 140, 136, 46, 79, 143, 243, 40, 245, 71, 246, 252, 137, 73, 243, 250, 245, 71, 246, 255, 247, 74, 71, 254, 262, 74, 66, 261, 247, 71, 253, 269, 74, 71, 268, 269, 65, 71, 256, 276, 258, 64, 259, 263, 265, 74, 266, 268, 59, 58, 270, 272, 260, 273, 270, 53, 267, 71, 277, 279, 71, 41, 282, 274, 272, 74, 273, 281, 71, 71, 282, 289, 74, 71, 281, 292, 274, 71, 280, 295, 74, 283, 294, 71, 285, 295, 286, 40, 614, 283, 290, 285, 614, 286, 293, 71, 287, 302, 296, 298, 74, 299, 294, 287, 296, 71, 71, 305, 308, 614, 614, 300, 71, 74, 315, 307, 303, 614, 74, 298, 314, 299, 71, 614, 241, 614, 306, 309, 614, 614, 614, 300, 311, 316, 312, 614, 74, 318, 244, 319, 71, 614, 241, 246, 313, 71, 614, 248, 614, 320, 74, 71, 244, 251, 71, 322, 254, 323, 74, 614, 257, 246, 71, 74, 261, 264, 326, 324, 614, 322, 614, 323, 328, 614, 71, 259, 338, 330, 74, 331, 337, 324, 334, 266, 335, 71, 71, 338, 345, 332, 71, 74, 348, 337, 336, 339, 71, 341, 351, 342, 74, 614, 350, 71, 614, 358, 339, 346, 614, 343, 341, 349, 342, 74, 71, 357, 365, 352, 74, 354, 364, 355, 343, 614, 359, 71, 71, 365, 372, 614, 614, 356, 361, 614, 362, 366, 74, 368, 364, 369, 71, 71, 375, 378, 363, 614, 366, 373, 614, 370, 74, 71, 377, 378, 71, 368, 385, 369, 74, 614, 377, 376, 379, 71, 71, 388, 391, 370, 614, 381, 614, 382, 379, 614, 74, 386, 390, 381, 71, 382, 391, 383, 614, 614, 389, 392, 71, 614, 398, 383, 74, 614, 390, 394, 71, 395, 401, 614, 71, 392, 404, 74, 71, 403, 411, 396, 74, 399, 410, 394, 71, 395, 337, 614, 74, 402, 340, 614, 614, 405, 407, 396, 408, 412, 614, 414, 71, 415, 337, 614, 614, 342, 409, 418, 71, 419, 344, 416, 74, 71, 340, 347, 71, 614, 350, 420, 74, 342, 353, 71, 614, 357, 74, 614, 360, 422, 614, 418, 614, 419, 424, 614, 614, 355, 71, 426, 434, 427, 614, 420, 362, 430, 74, 431, 433, 614, 71, 428, 434, 71, 74, 441, 433, 432, 71, 435, 444, 71, 74, 447, 446, 437, 71, 438, 454, 614, 74, 435, 453, 437, 442, 438, 71, 439, 461, 445, 614, 450, 448, 451, 74, 439, 460, 455, 71, 457, 461, 458, 71, 452, 468, 614, 614, 462, 74, 614, 460, 459, 71, 464, 471, 465, 71, 614, 474, 462, 614, 614, 74, 469, 473, 466, 71, 464, 474, 465, 71, 614, 481, 472, 614, 614, 74, 475, 473, 466, 71, 477, 484, 478, 71, 614, 338, 475, 71, 614, 345, 482, 74, 479, 337, 477, 71, 478, 348, 614, 71, 485, 351, 614, 614, 339, 74, 479, 350, 346, 71, 341, 358, 342, 74, 614, 357, 349, 71, 614, 365, 352, 71, 343, 372, 354, 614, 355, 74, 614, 364, 359, 71, 361, 375, 362, 71, 356, 378, 366, 71, 71, 385, 373, 74, 363, 377, 368, 71, 369, 388, 614, 71, 376, 90, 71, 614, 379, 172, 370, 173, 386, 71, 381, 93, 382, 71, 614, 103, 389, 174, 614, 172, 176, 173, 383, 74, 71, 106, 110, 74, 614, 113, 178, 174, 614, 614, 108, 71, 74, 118, 121, 71, 614, 118, 180, 614, 181, 115, 184, 71, 185, 125, 74, 71, 121, 128, 182, 487, 123, 488, 186, 71, 123, 131, 71, 74, 131, 134, 614, 489, 491, 487, 614, 488, 493, 614, 71, 614, 138, 74, 614, 134, 136, 489, 495, 136, 496, 71, 71, 141, 145, 71, 74, 145, 148, 614, 497, 499, 495, 71, 496, 152, 614, 74, 71, 148, 155, 614, 501, 150, 497, 503, 150, 504, 71, 614, 158, 74, 614, 161, 507, 614, 503, 505, 504, 509, 71, 614, 165, 71, 74, 71, 168, 614, 505, 163, 511, 74, 512, 74, 614, 71, 71, 71, 175, 614, 614, 170, 513, 515, 173, 516, 74, 71, 74, 177, 519, 71, 520, 106, 614, 517, 173, 523, 71, 74, 113, 179, 521, 614, 74, 519, 183, 520, 525, 614, 614, 71, 181, 188, 614, 614, 614, 521, 527, 185, 528, 614, 74, 531, 191, 532, 71, 71, 188, 195, 529, 74, 193, 191, 71, 533, 198, 71, 74, 201, 204, 535, 71, 536, 208, 614, 614, 193, 539, 74, 535, 211, 536, 537, 71, 541, 215, 543, 206, 544, 614, 614, 537, 213, 74, 71, 218, 215, 547, 545, 548, 71, 74, 222, 218, 220, 71, 71, 225, 228, 549, 614, 614, 551, 614, 552, 220, 74, 71, 231, 228, 551, 555, 552, 71, 553, 235, 557, 233, 71, 74, 238, 231, 553, 614, 71, 559, 90, 560, 233, 71, 71, 71, 93, 103, 563, 614, 614, 561, 559, 565, 560, 74, 71, 106, 110, 176, 172, 74, 173, 113, 561, 178, 108, 71, 71, 118, 125, 614, 174, 71, 180, 128, 181, 115, 614, 74, 184, 121, 185, 71, 614, 131, 182, 614, 123, 491, 614, 71, 186, 138, 493, 74, 614, 134, 487, 71, 488, 141, 614, 71, 136, 241, 74, 71, 244, 241, 489, 71, 499, 248, 495, 74, 496, 244, 614, 71, 501, 251, 614, 614, 246, 322, 497, 323, 246, 71, 614, 254, 326, 74, 322, 257, 323, 324, 614, 71, 328, 261, 74, 614, 264, 71, 324, 268, 614, 74, 259, 271, 330, 71, 331, 268, 71, 74, 275, 271, 266, 334, 614, 335, 332, 71, 273, 278, 567, 71, 568, 281, 614, 336, 273, 614, 567, 571, 568, 74, 569, 284, 71, 71, 281, 288, 573, 74, 569, 284, 286, 71, 71, 291, 294, 74, 614, 297, 575, 71, 576, 294, 614, 286, 579, 614, 575, 71, 576, 301, 577, 614, 581, 299, 583, 74, 584, 297, 577, 71, 299, 304, 71, 74, 307, 310, 585, 71, 587, 314, 74, 71, 317, 244, 583, 614, 584, 74, 614, 321, 589, 614, 591, 312, 592, 71, 585, 244, 319, 595, 614, 596, 323, 71, 593, 325, 599, 74, 600, 321, 71, 597, 327, 71, 614, 257, 323, 614, 601, 71, 74, 264, 329, 74, 603, 333, 599, 71, 600, 146, 614, 605, 614, 614, 331, 71, 614, 153, 601, 607, 335, 608, 611, 74, 612, 145, 614, 71, 147, 156, 71, 609, 159, 614, 613, 614, 154, 74, 71, 158, 166, 74, 149, 165, 150, 71, 71, 90, 157, 614, 71, 160, 93, 71, 151, 103, 162, 614, 163, 167, 169, 614, 170, 172, 614, 173, 176, 74, 164, 106, 614, 178, 171, 614, 108, 174, 71, 614, 110, 71, 74, 189, 113, 71, 614, 196, 180, 74, 181, 188, 614, 71, 71, 199, 202, 614, 614, 115, 182, 184, 190, 185, 614, 74, 197, 201, 192, 71, 193, 209, 614, 186, 200, 203, 74, 71, 208, 216, 194, 71, 614, 223, 205, 74, 206, 215, 614, 71, 210, 226, 71, 614, 229, 212, 207, 213, 217, 71, 614, 236, 224, 74, 219, 228, 220, 214, 614, 71, 227, 239, 71, 230, 91, 614, 221, 74, 614, 70, 237, 71, 232, 94, 233, 71, 74, 104, 103, 71, 240, 111, 614, 92, 234, 74, 75, 110, 76, 71, 614, 119, 95, 614, 614, 107, 105, 108, 77, 71, 112, 126, 614, 74, 114, 118, 115, 109, 614, 71, 120, 129, 71, 614, 132, 71, 116, 139, 614, 74, 127, 131, 122, 71, 123, 142, 71, 71, 242, 249, 130, 614, 614, 133, 124, 74, 140, 241, 135, 71, 136, 252, 614, 71, 143, 255, 614, 243, 250, 74, 137, 254, 614, 71, 245, 262, 246, 74, 614, 261, 253, 71, 614, 269, 256, 71, 247, 276, 258, 614, 259, 74, 614, 268, 263, 71, 265, 279, 266, 71, 260, 282, 270, 71, 614, 289, 277, 74, 267, 281, 272, 71, 273, 292, 614, 71, 280, 295, 614, 71, 283, 302, 274, 74, 290, 294, 285, 71, 286, 305, 614, 71, 293, 308, 614, 614, 296, 74, 287, 307, 303, 71, 298, 315, 299, 74, 614, 314, 306, 71, 614, 241, 309, 71, 300, 248, 311, 614, 312, 74, 614, 244, 316, 71, 318, 251, 319, 71, 313, 254, 246, 614, 614, 74, 326, 257, 320, 71, 322, 261, 323, 74, 614, 264, 328, 71, 614, 391, 259, 71, 324, 398, 330, 614, 331, 74, 614, 390, 266, 71, 334, 401, 335, 71, 332, 404, 392, 614, 614, 74, 399, 403, 336, 71, 394, 411, 395, 74, 614, 410, 402, 71, 614, 337, 405, 71, 396, 344, 407, 614, 408, 74, 614, 340, 412, 71, 414, 347, 415, 71, 409, 350, 342, 614, 614, 74, 422, 353, 416, 71, 418, 357, 419, 74, 614, 360, 424, 71, 614, 434, 355, 71, 420, 441, 426, 614, 427, 74, 614, 433, 362, 71, 430, 444, 431, 71, 428, 447, 435, 614, 614, 74, 442, 446, 432, 71, 437, 454, 438, 74, 614, 453, 445, 71, 614, 461, 448, 71, 439, 468, 450, 614, 451, 74, 614, 460, 455, 71, 457, 471, 458, 71, 452, 474, 462, 71, 614, 481, 469, 74, 459, 473, 464, 71, 465, 484, 614, 71, 472, 338, 614, 71, 475, 345, 466, 74, 482, 337, 477, 71, 478, 348, 614, 71, 485, 351, 614, 614, 339, 74, 479, 350, 346, 71, 341, 358, 342, 74, 614, 357, 349, 71, 614, 365, 352, 71, 343, 372, 354, 614, 355, 74, 614, 364, 359, 71, 361, 375, 362, 71, 356, 378, 366, 71, 614, 385, 373, 74, 363, 377, 368, 71, 369, 388, 614, 614, 376, 614, 614, 614, 379, 614, 370, 614, 386, 614, 381, 614, 382, 614, 614, 614, 389, 614, 614, 614, 614, 614, 383, 36, 36, 36, 36, 36, 36, 36, 42, 614, 614, 42, 42, 42, 42, 45, 45, 45, 45, 45, 45, 45, 48, 614, 614, 48, 48, 48, 48, 57, 57, 57, 57, 57, 57, 57, 60, 60, 60, 63, 63, 63, 67, 67, 67, 70, 70, 70, 614, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 85, 614, 85, 90, 90, 90, 90, 90, 90, 90, 93, 93, 93, 93, 93, 93, 93, 101, 614, 101, 103, 103, 103, 103, 103, 103, 103, 104, 614, 104, 104, 104, 104, 104, 106, 106, 106, 106, 106, 106, 106, 110, 110, 110, 110, 110, 110, 110, 111, 614, 111, 111, 111, 111, 111, 113, 113, 113, 113, 113, 113, 113, 118, 118, 118, 118, 118, 118, 118, 119, 614, 119, 119, 119, 119, 119, 121, 121, 121, 121, 121, 121, 121, 125, 125, 125, 125, 125, 125, 125, 128, 128, 128, 128, 128, 128, 128, 131, 131, 131, 131, 131, 131, 131, 132, 614, 132, 132, 132, 132, 132, 134, 134, 134, 134, 134, 134, 134, 138, 138, 138, 138, 138, 138, 138, 141, 141, 141, 141, 141, 141, 141, 145, 145, 145, 145, 145, 145, 145, 146, 614, 146, 146, 146, 146, 146, 148, 148, 148, 148, 148, 148, 148, 152, 152, 152, 152, 152, 152, 152, 155, 155, 155, 155, 155, 155, 155, 158, 158, 158, 158, 158, 158, 158, 159, 614, 159, 159, 159, 159, 159, 161, 161, 161, 161, 161, 161, 161, 165, 165, 165, 165, 165, 165, 165, 166, 614, 166, 166, 166, 166, 166, 168, 168, 168, 168, 168, 168, 168, 74, 74, 74, 74, 74, 74, 74, 175, 175, 175, 175, 175, 175, 175, 177, 177, 177, 177, 177, 177, 177, 179, 179, 179, 179, 179, 179, 179, 183, 183, 183, 183, 183, 183, 183, 188, 188, 188, 188, 188, 188, 188, 189, 614, 189, 189, 189, 189, 189, 191, 191, 191, 191, 191, 191, 191, 195, 195, 195, 195, 195, 195, 195, 198, 198, 198, 198, 198, 198, 198, 201, 201, 201, 201, 201, 201, 201, 202, 614, 202, 202, 202, 202, 202, 204, 204, 204, 204, 204, 204, 204, 208, 208, 208, 208, 208, 208, 208, 209, 614, 209, 209, 209, 209, 209, 211, 211, 211, 211, 211, 211, 211, 215, 215, 215, 215, 215, 215, 215, 216, 614, 216, 216, 216, 216, 216, 218, 218, 218, 218, 218, 218, 218, 222, 222, 222, 222, 222, 222, 222, 225, 225, 225, 225, 225, 225, 225, 228, 228, 228, 228, 228, 228, 228, 229, 614, 229, 229, 229, 229, 229, 231, 231, 231, 231, 231, 231, 231, 235, 235, 235, 235, 235, 235, 235, 238, 238, 238, 238, 238, 238, 238, 90, 90, 90, 90, 90, 90, 90, 93, 93, 93, 93, 93, 93, 93, 118, 118, 118, 118, 118, 118, 118, 125, 125, 125, 125, 125, 125, 125, 121, 121, 121, 121, 121, 121, 121, 128, 128, 128, 128, 128, 128, 128, 131, 131, 131, 131, 131, 131, 131, 138, 138, 138, 138, 138, 138, 138, 134, 134, 134, 134, 134, 134, 134, 141, 141, 141, 141, 141, 141, 141, 241, 241, 241, 241, 241, 241, 241, 242, 614, 242, 242, 242, 242, 242, 244, 244, 244, 244, 244, 244, 244, 248, 248, 248, 248, 248, 248, 248, 251, 251, 251, 251, 251, 251, 251, 254, 254, 254, 254, 254, 254, 254, 255, 614, 255, 255, 255, 255, 255, 257, 257, 257, 257, 257, 257, 257, 261, 261, 261, 261, 261, 261, 261, 262, 614, 262, 262, 262, 262, 262, 264, 264, 264, 264, 264, 264, 264, 268, 268, 268, 268, 268, 268, 268, 269, 614, 269, 269, 269, 269, 269, 271, 271, 271, 271, 271, 271, 271, 275, 275, 275, 275, 275, 275, 275, 278, 278, 278, 278, 278, 278, 278, 281, 281, 281, 281, 281, 281, 281, 282, 614, 282, 282, 282, 282, 282, 284, 284, 284, 284, 284, 284, 284, 288, 288, 288, 288, 288, 288, 288, 291, 291, 291, 291, 291, 291, 291, 294, 294, 294, 294, 294, 294, 294, 295, 614, 295, 295, 295, 295, 295, 297, 297, 297, 297, 297, 297, 297, 301, 301, 301, 301, 301, 301, 301, 304, 304, 304, 304, 304, 304, 304, 307, 307, 307, 307, 307, 307, 307, 308, 614, 308, 308, 308, 308, 308, 310, 310, 310, 310, 310, 310, 310, 314, 314, 314, 314, 314, 314, 314, 315, 614, 315, 315, 315, 315, 315, 317, 317, 317, 317, 317, 317, 317, 321, 321, 321, 321, 321, 321, 321, 325, 325, 325, 325, 325, 325, 325, 327, 327, 327, 327, 327, 327, 327, 329, 329, 329, 329, 329, 329, 329, 333, 333, 333, 333, 333, 333, 333, 337, 337, 337, 337, 337, 337, 337, 338, 614, 338, 338, 338, 338, 338, 340, 340, 340, 340, 340, 340, 340, 344, 344, 344, 344, 344, 344, 344, 347, 347, 347, 347, 347, 347, 347, 350, 350, 350, 350, 350, 350, 350, 351, 614, 351, 351, 351, 351, 351, 353, 353, 353, 353, 353, 353, 353, 357, 357, 357, 357, 357, 357, 357, 358, 614, 358, 358, 358, 358, 358, 360, 360, 360, 360, 360, 360, 360, 364, 364, 364, 364, 364, 364, 364, 365, 614, 365, 365, 365, 365, 365, 367, 367, 367, 367, 367, 367, 367, 371, 371, 371, 371, 371, 371, 371, 374, 374, 374, 374, 374, 374, 374, 377, 377, 377, 377, 377, 377, 377, 378, 614, 378, 378, 378, 378, 378, 380, 380, 380, 380, 380, 380, 380, 384, 384, 384, 384, 384, 384, 384, 387, 387, 387, 387, 387, 387, 387, 390, 390, 390, 390, 390, 390, 390, 391, 614, 391, 391, 391, 391, 391, 393, 393, 393, 393, 393, 393, 393, 397, 397, 397, 397, 397, 397, 397, 400, 400, 400, 400, 400, 400, 400, 403, 403, 403, 403, 403, 403, 403, 404, 614, 404, 404, 404, 404, 404, 406, 406, 406, 406, 406, 406, 406, 410, 410, 410, 410, 410, 410, 410, 411, 614, 411, 411, 411, 411, 411, 413, 413, 413, 413, 413, 413, 413, 417, 417, 417, 417, 417, 417, 417, 421, 421, 421, 421, 421, 421, 421, 423, 423, 423, 423, 423, 423, 423, 425, 425, 425, 425, 425, 425, 425, 429, 429, 429, 429, 429, 429, 429, 433, 433, 433, 433, 433, 433, 433, 434, 614, 434, 434, 434, 434, 434, 436, 436, 436, 436, 436, 436, 436, 440, 440, 440, 440, 440, 440, 440, 443, 443, 443, 443, 443, 443, 443, 446, 446, 446, 446, 446, 446, 446, 447, 614, 447, 447, 447, 447, 447, 449, 449, 449, 449, 449, 449, 449, 453, 453, 453, 453, 453, 453, 453, 454, 614, 454, 454, 454, 454, 454, 456, 456, 456, 456, 456, 456, 456, 460, 460, 460, 460, 460, 460, 460, 461, 614, 461, 461, 461, 461, 461, 463, 463, 463, 463, 463, 463, 463, 467, 467, 467, 467, 467, 467, 467, 470, 470, 470, 470, 470, 470, 470, 473, 473, 473, 473, 473, 473, 473, 474, 614, 474, 474, 474, 474, 474, 476, 476, 476, 476, 476, 476, 476, 480, 480, 480, 480, 480, 480, 480, 483, 483, 483, 483, 483, 483, 483, 344, 344, 344, 344, 344, 344, 344, 347, 347, 347, 347, 347, 347, 347, 364, 364, 364, 364, 364, 364, 364, 371, 371, 371, 371, 371, 371, 371, 367, 367, 367, 367, 367, 367, 367, 374, 374, 374, 374, 374, 374, 374, 377, 377, 377, 377, 377, 377, 377, 384, 384, 384, 384, 384, 384, 384, 380, 380, 380, 380, 380, 380, 380, 387, 387, 387, 387, 387, 387, 387, 71, 71, 71, 71, 71, 71, 71, 70, 614, 70, 70, 70, 70, 70, 74, 74, 74, 74, 74, 74, 74, 175, 175, 175, 175, 175, 175, 175, 177, 177, 177, 177, 177, 177, 177, 106, 106, 106, 106, 106, 106, 106, 103, 614, 103, 103, 103, 103, 103, 179, 179, 179, 179, 179, 179, 179, 113, 113, 113, 113, 113, 113, 113, 110, 614, 110, 110, 110, 110, 110, 183, 183, 183, 183, 183, 183, 183, 121, 121, 121, 121, 121, 121, 121, 118, 614, 118, 118, 118, 118, 118, 486, 486, 486, 486, 486, 486, 486, 490, 490, 490, 490, 490, 490, 490, 492, 492, 492, 492, 492, 492, 492, 134, 134, 134, 134, 134, 134, 134, 131, 614, 131, 131, 131, 131, 131, 494, 494, 494, 494, 494, 494, 494, 498, 498, 498, 498, 498, 498, 498, 500, 500, 500, 500, 500, 500, 500, 148, 148, 148, 148, 148, 148, 148, 145, 614, 145, 145, 145, 145, 145, 502, 502, 502, 502, 502, 502, 502, 506, 506, 506, 506, 506, 506, 506, 508, 508, 508, 508, 508, 508, 508, 161, 161, 161, 161, 161, 161, 161, 158, 614, 158, 158, 158, 158, 158, 510, 510, 510, 510, 510, 510, 510, 168, 168, 168, 168, 168, 168, 168, 165, 614, 165, 165, 165, 165, 165, 514, 514, 514, 514, 514, 514, 514, 518, 518, 518, 518, 518, 518, 518, 522, 522, 522, 522, 522, 522, 522, 524, 524, 524, 524, 524, 524, 524, 526, 526, 526, 526, 526, 526, 526, 530, 530, 530, 530, 530, 530, 530, 191, 191, 191, 191, 191, 191, 191, 188, 614, 188, 188, 188, 188, 188, 534, 534, 534, 534, 534, 534, 534, 538, 538, 538, 538, 538, 538, 538, 540, 540, 540, 540, 540, 540, 540, 204, 204, 204, 204, 204, 204, 204, 201, 614, 201, 201, 201, 201, 201, 542, 542, 542, 542, 542, 542, 542, 211, 211, 211, 211, 211, 211, 211, 208, 614, 208, 208, 208, 208, 208, 546, 546, 546, 546, 546, 546, 546, 218, 218, 218, 218, 218, 218, 218, 215, 614, 215, 215, 215, 215, 215, 550, 550, 550, 550, 550, 550, 550, 554, 554, 554, 554, 554, 554, 554, 556, 556, 556, 556, 556, 556, 556, 231, 231, 231, 231, 231, 231, 231, 228, 614, 228, 228, 228, 228, 228, 558, 558, 558, 558, 558, 558, 558, 562, 562, 562, 562, 562, 562, 562, 564, 564, 564, 564, 564, 564, 564, 175, 175, 175, 175, 175, 175, 175, 177, 177, 177, 177, 177, 177, 177, 121, 121, 121, 121, 121, 121, 121, 490, 490, 490, 490, 490, 490, 490, 486, 486, 486, 486, 486, 486, 486, 492, 492, 492, 492, 492, 492, 492, 134, 134, 134, 134, 134, 134, 134, 498, 498, 498, 498, 498, 498, 498, 494, 494, 494, 494, 494, 494, 494, 500, 500, 500, 500, 500, 500, 500, 244, 244, 244, 244, 244, 244, 244, 241, 614, 241, 241, 241, 241, 241, 321, 321, 321, 321, 321, 321, 321, 325, 325, 325, 325, 325, 325, 325, 327, 327, 327, 327, 327, 327, 327, 257, 257, 257, 257, 257, 257, 257, 254, 614, 254, 254, 254, 254, 254, 329, 329, 329, 329, 329, 329, 329, 264, 264, 264, 264, 264, 264, 264, 261, 614, 261, 261, 261, 261, 261, 333, 333, 333, 333, 333, 333, 333, 271, 271, 271, 271, 271, 271, 271, 268, 614, 268, 268, 268, 268, 268, 566, 566, 566, 566, 566, 566, 566, 570, 570, 570, 570, 570, 570, 570, 572, 572, 572, 572, 572, 572, 572, 284, 284, 284, 284, 284, 284, 284, 281, 614, 281, 281, 281, 281, 281, 574, 574, 574, 574, 574, 574, 574, 578, 578, 578, 578, 578, 578, 578, 580, 580, 580, 580, 580, 580, 580, 297, 297, 297, 297, 297, 297, 297, 294, 614, 294, 294, 294, 294, 294, 582, 582, 582, 582, 582, 582, 582, 586, 586, 586, 586, 586, 586, 586, 588, 588, 588, 588, 588, 588, 588, 310, 310, 310, 310, 310, 310, 310, 307, 614, 307, 307, 307, 307, 307, 590, 590, 590, 590, 590, 590, 590, 317, 317, 317, 317, 317, 317, 317, 314, 614, 314, 314, 314, 314, 314, 594, 594, 594, 594, 594, 594, 594, 598, 598, 598, 598, 598, 598, 598, 602, 602, 602, 602, 602, 602, 602, 604, 604, 604, 604, 604, 604, 604, 606, 606, 606, 606, 606, 606, 606, 610, 610, 610, 610, 610, 610, 610, 145, 145, 145, 145, 145, 145, 145, 152, 152, 152, 152, 152, 152, 152, 148, 148, 148, 148, 148, 148, 148, 155, 155, 155, 155, 155, 155, 155, 158, 158, 158, 158, 158, 158, 158, 161, 161, 161, 161, 161, 161, 161, 165, 165, 165, 165, 165, 165, 165, 168, 168, 168, 168, 168, 168, 168, 71, 71, 71, 71, 71, 71, 71, 175, 175, 175, 175, 175, 175, 175, 74, 74, 74, 74, 74, 74, 74, 177, 177, 177, 177, 177, 177, 177, 106, 106, 106, 106, 106, 106, 106, 179, 179, 179, 179, 179, 179, 179, 113, 113, 113, 113, 113, 113, 113, 183, 183, 183, 183, 183, 183, 183, 188, 188, 188, 188, 188, 188, 188, 195, 195, 195, 195, 195, 195, 195, 191, 191, 191, 191, 191, 191, 191, 198, 198, 198, 198, 198, 198, 198, 201, 201, 201, 201, 201, 201, 201, 204, 204, 204, 204, 204, 204, 204, 208, 208, 208, 208, 208, 208, 208, 211, 211, 211, 211, 211, 211, 211, 215, 215, 215, 215, 215, 215, 215, 222, 222, 222, 222, 222, 222, 222, 218, 218, 218, 218, 218, 218, 218, 225, 225, 225, 225, 225, 225, 225, 228, 228, 228, 228, 228, 228, 228, 235, 235, 235, 235, 235, 235, 235, 231, 231, 231, 231, 231, 231, 231, 238, 238, 238, 238, 238, 238, 238, 70, 70, 70, 614, 70, 70, 70, 90, 90, 90, 90, 90, 90, 90, 93, 93, 93, 93, 93, 93, 93, 103, 103, 103, 103, 103, 103, 103, 110, 110, 110, 110, 110, 110, 110, 118, 118, 118, 118, 118, 118, 118, 125, 125, 125, 125, 125, 125, 125, 121, 121, 121, 121, 121, 121, 121, 128, 128, 128, 128, 128, 128, 128, 131, 131, 131, 131, 131, 131, 131, 138, 138, 138, 138, 138, 138, 138, 134, 134, 134, 134, 134, 134, 134, 141, 141, 141, 141, 141, 141, 141, 241, 241, 241, 241, 241, 241, 241, 248, 248, 248, 248, 248, 248, 248, 244, 244, 244, 244, 244, 244, 244, 251, 251, 251, 251, 251, 251, 251, 254, 254, 254, 254, 254, 254, 254, 257, 257, 257, 257, 257, 257, 257, 261, 261, 261, 261, 261, 261, 261, 264, 264, 264, 264, 264, 264, 264, 268, 268, 268, 268, 268, 268, 268, 275, 275, 275, 275, 275, 275, 275, 271, 271, 271, 271, 271, 271, 271, 278, 278, 278, 278, 278, 278, 278, 281, 281, 281, 281, 281, 281, 281, 288, 288, 288, 288, 288, 288, 288, 284, 284, 284, 284, 284, 284, 284, 291, 291, 291, 291, 291, 291, 291, 294, 294, 294, 294, 294, 294, 294, 301, 301, 301, 301, 301, 301, 301, 297, 297, 297, 297, 297, 297, 297, 304, 304, 304, 304, 304, 304, 304, 307, 307, 307, 307, 307, 307, 307, 310, 310, 310, 310, 310, 310, 310, 314, 314, 314, 314, 314, 314, 314, 317, 317, 317, 317, 317, 317, 317, 325, 325, 325, 325, 325, 325, 325, 321, 321, 321, 321, 321, 321, 321, 327, 327, 327, 327, 327, 327, 327, 329, 329, 329, 329, 329, 329, 329, 333, 333, 333, 333, 333, 333, 333, 390, 390, 390, 390, 390, 390, 390, 397, 397, 397, 397, 397, 397, 397, 393, 393, 393, 393, 393, 393, 393, 400, 400, 400, 400, 400, 400, 400, 403, 403, 403, 403, 403, 403, 403, 406, 406, 406, 406, 406, 406, 406, 410, 410, 410, 410, 410, 410, 410, 413, 413, 413, 413, 413, 413, 413, 340, 340, 340, 340, 340, 340, 340, 421, 421, 421, 421, 421, 421, 421, 417, 417, 417, 417, 417, 417, 417, 423, 423, 423, 423, 423, 423, 423, 353, 353, 353, 353, 353, 353, 353, 425, 425, 425, 425, 425, 425, 425, 360, 360, 360, 360, 360, 360, 360, 429, 429, 429, 429, 429, 429, 429, 433, 433, 433, 433, 433, 433, 433, 440, 440, 440, 440, 440, 440, 440, 436, 436, 436, 436, 436, 436, 436, 443, 443, 443, 443, 443, 443, 443, 446, 446, 446, 446, 446, 446, 446, 449, 449, 449, 449, 449, 449, 449, 453, 453, 453, 453, 453, 453, 453, 456, 456, 456, 456, 456, 456, 456, 460, 460, 460, 460, 460, 460, 460, 467, 467, 467, 467, 467, 467, 467, 463, 463, 463, 463, 463, 463, 463, 470, 470, 470, 470, 470, 470, 470, 473, 473, 473, 473, 473, 473, 473, 480, 480, 480, 480, 480, 480, 480, 476, 476, 476, 476, 476, 476, 476, 483, 483, 483, 483, 483, 483, 483, 337, 337, 337, 337, 337, 337, 337, 344, 344, 344, 344, 344, 344, 344, 347, 347, 347, 347, 347, 347, 347, 350, 350, 350, 350, 350, 350, 350, 357, 357, 357, 357, 357, 357, 357, 364, 364, 364, 364, 364, 364, 364, 371, 371, 371, 371, 371, 371, 371, 367, 367, 367, 367, 367, 367, 367, 374, 374, 374, 374, 374, 374, 374, 377, 377, 377, 377, 377, 377, 377, 384, 384, 384, 384, 384, 384, 384, 380, 380, 380, 380, 380, 380, 380, 387, 387, 387, 387, 387, 387, 387, 7, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614 } ; static yyconst flex_int16_t yy_chk[4969] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, 5, 6, 12, 13, 13, 14, 17, 17, 20, 20, 36, 27, 25, 27, 25, 31, 20, 31, 37, 5, 6, 12, 14, 25, 20, 35, 31, 35, 39, 42, 39, 36, 45, 45, 48, 25, 52, 52, 31, 37, 61, 627, 61, 53, 52, 70, 54, 39, 42, 39, 53, 48, 52, 54, 63, 67, 63, 67, 53, 39, 55, 54, 55, 68, 55, 68, 70, 71, 72, 74, 72, 75, 76, 75, 76, 77, 80, 77, 80, 81, 80, 82, 131, 82, 619, 82, 81, 72, 71, 72, 74, 76, 75, 76, 81, 90, 77, 90, 92, 72, 92, 131, 93, 76, 93, 95, 103, 95, 103, 105, 106, 105, 106, 107, 484, 107, 90, 92, 108, 92, 108, 481, 474, 93, 95, 388, 95, 103, 105, 92, 105, 106, 385, 109, 107, 109, 95, 108, 518, 108, 105, 110, 112, 110, 112, 113, 114, 113, 114, 108, 115, 116, 115, 116, 109, 118, 120, 118, 120, 518, 134, 112, 110, 112, 378, 292, 113, 114, 121, 115, 121, 115, 116, 112, 289, 120, 118, 120, 122, 134, 122, 115, 123, 124, 123, 124, 125, 120, 125, 121, 127, 128, 127, 128, 132, 130, 132, 130, 133, 122, 337, 123, 282, 123, 124, 136, 239, 125, 135, 127, 135, 127, 128, 123, 130, 133, 130, 133, 137, 337, 137, 127, 136, 138, 136, 138, 130, 133, 140, 135, 140, 141, 340, 141, 136, 143, 145, 143, 145, 137, 148, 147, 148, 147, 138, 417, 149, 140, 149, 140, 236, 340, 141, 151, 143, 151, 143, 145, 229, 140, 147, 148, 147, 150, 417, 150, 143, 149, 152, 154, 152, 154, 147, 494, 151, 155, 157, 155, 157, 144, 142, 158, 150, 158, 150, 160, 139, 160, 154, 152, 154, 161, 494, 161, 150, 157, 155, 157, 117, 162, 154, 162, 158, 163, 160, 163, 160, 157, 164, 165, 164, 165, 161, 102, 101, 100, 160, 167, 99, 167, 162, 168, 163, 168, 163, 169, 170, 169, 170, 164, 165, 171, 98, 171, 163, 172, 167, 172, 167, 173, 97, 173, 168, 96, 88, 170, 169, 170, 167, 87, 86, 174, 171, 174, 85, 84, 172, 170, 173, 175, 173, 175, 176, 177, 176, 177, 178, 179, 178, 179, 173, 180, 174, 180, 182, 181, 182, 181, 83, 73, 175, 176, 66, 176, 177, 178, 59, 178, 179, 183, 57, 183, 180, 176, 181, 182, 181, 178, 184, 185, 184, 185, 186, 188, 186, 188, 181, 190, 56, 190, 183, 191, 192, 191, 192, 193, 51, 193, 185, 184, 185, 47, 43, 186, 188, 40, 190, 194, 190, 194, 185, 38, 191, 192, 193, 195, 193, 195, 190, 197, 198, 197, 198, 200, 33, 200, 193, 201, 194, 201, 203, 204, 203, 204, 30, 205, 195, 205, 197, 29, 197, 198, 200, 206, 200, 206, 24, 23, 201, 203, 197, 203, 204, 19, 200, 207, 205, 207, 208, 11, 208, 203, 206, 210, 206, 210, 211, 212, 211, 212, 213, 214, 213, 214, 206, 215, 207, 215, 217, 208, 217, 218, 210, 218, 210, 9, 7, 211, 212, 213, 0, 213, 214, 219, 210, 219, 215, 217, 220, 217, 220, 213, 218, 221, 222, 221, 222, 0, 0, 217, 225, 224, 225, 224, 219, 0, 227, 220, 227, 220, 228, 0, 228, 0, 221, 222, 0, 0, 0, 220, 224, 225, 224, 0, 230, 227, 230, 227, 231, 0, 231, 228, 224, 232, 0, 232, 0, 227, 233, 234, 233, 234, 235, 230, 235, 230, 237, 0, 237, 231, 238, 240, 238, 240, 232, 230, 0, 233, 0, 233, 234, 0, 241, 235, 241, 237, 243, 237, 243, 233, 240, 238, 240, 244, 245, 244, 245, 237, 247, 246, 247, 246, 240, 241, 248, 243, 248, 243, 250, 0, 250, 251, 0, 251, 244, 245, 0, 243, 246, 247, 246, 253, 254, 253, 254, 248, 256, 250, 256, 250, 246, 0, 251, 257, 258, 257, 258, 0, 0, 250, 253, 0, 253, 254, 259, 256, 259, 256, 260, 261, 260, 261, 253, 0, 257, 258, 0, 256, 263, 264, 263, 264, 265, 259, 265, 259, 266, 0, 266, 260, 261, 267, 268, 267, 268, 259, 0, 263, 0, 263, 264, 0, 270, 265, 270, 266, 271, 266, 271, 263, 0, 0, 267, 268, 272, 0, 272, 266, 273, 0, 273, 270, 274, 270, 274, 0, 275, 271, 275, 277, 278, 277, 278, 270, 280, 272, 280, 273, 281, 273, 281, 0, 283, 274, 283, 0, 0, 275, 277, 273, 277, 278, 0, 280, 284, 280, 284, 0, 0, 281, 277, 283, 285, 283, 285, 280, 286, 287, 286, 287, 288, 0, 288, 283, 290, 284, 290, 291, 0, 291, 293, 0, 293, 285, 0, 286, 0, 286, 287, 0, 0, 288, 294, 290, 294, 290, 0, 286, 291, 293, 296, 293, 296, 0, 297, 290, 297, 298, 299, 298, 299, 293, 300, 294, 300, 301, 303, 301, 303, 296, 304, 296, 304, 0, 306, 297, 306, 299, 298, 299, 307, 296, 307, 300, 0, 303, 301, 303, 309, 299, 309, 304, 310, 306, 310, 306, 311, 303, 311, 0, 0, 307, 312, 0, 312, 306, 313, 309, 313, 309, 314, 0, 314, 310, 0, 0, 316, 311, 316, 309, 317, 312, 317, 312, 318, 0, 318, 313, 0, 0, 319, 314, 319, 312, 320, 316, 320, 316, 321, 0, 321, 317, 322, 0, 322, 318, 323, 316, 323, 319, 324, 319, 324, 0, 325, 320, 325, 0, 0, 321, 326, 319, 326, 322, 327, 323, 327, 323, 328, 0, 328, 324, 329, 0, 329, 325, 330, 323, 330, 326, 0, 326, 331, 0, 331, 327, 332, 328, 332, 328, 333, 326, 333, 329, 334, 339, 334, 330, 335, 328, 335, 331, 336, 331, 336, 0, 341, 332, 341, 342, 0, 333, 339, 331, 339, 334, 343, 335, 343, 335, 344, 0, 344, 336, 339, 0, 342, 341, 342, 335, 346, 347, 346, 347, 349, 0, 349, 343, 342, 0, 0, 344, 350, 352, 350, 352, 353, 0, 353, 346, 0, 346, 347, 349, 354, 349, 354, 355, 356, 355, 356, 346, 352, 350, 352, 349, 357, 353, 357, 360, 359, 360, 359, 0, 352, 354, 355, 0, 355, 356, 0, 361, 0, 361, 362, 0, 362, 357, 355, 359, 360, 359, 363, 364, 363, 364, 367, 366, 367, 366, 0, 359, 361, 362, 368, 362, 368, 0, 369, 370, 369, 370, 0, 363, 364, 362, 366, 367, 366, 371, 0, 371, 373, 0, 373, 368, 0, 369, 366, 369, 370, 374, 0, 374, 377, 376, 377, 376, 0, 369, 371, 373, 379, 373, 379, 0, 380, 381, 380, 381, 0, 0, 374, 373, 376, 377, 376, 382, 383, 382, 383, 379, 384, 379, 384, 0, 376, 380, 381, 387, 386, 387, 386, 379, 0, 389, 382, 389, 382, 383, 0, 0, 390, 384, 390, 0, 0, 0, 382, 386, 387, 386, 0, 392, 389, 392, 389, 393, 394, 393, 394, 386, 395, 390, 395, 396, 389, 396, 397, 399, 397, 399, 392, 400, 392, 400, 0, 0, 393, 394, 402, 395, 402, 395, 392, 403, 396, 403, 399, 397, 399, 0, 0, 395, 400, 405, 406, 405, 406, 402, 399, 402, 407, 408, 407, 408, 403, 409, 410, 409, 410, 402, 0, 0, 405, 0, 405, 406, 412, 413, 412, 413, 408, 407, 408, 414, 405, 414, 409, 410, 416, 415, 416, 415, 408, 0, 418, 412, 418, 412, 413, 419, 420, 421, 420, 421, 414, 0, 0, 412, 415, 416, 415, 422, 423, 422, 423, 418, 419, 424, 419, 424, 415, 420, 421, 425, 426, 425, 426, 0, 419, 428, 422, 428, 422, 423, 0, 427, 424, 427, 424, 429, 0, 429, 422, 0, 425, 426, 0, 430, 424, 430, 428, 431, 0, 431, 427, 432, 427, 432, 0, 433, 429, 433, 435, 436, 435, 436, 427, 437, 430, 437, 431, 438, 431, 438, 0, 439, 432, 439, 0, 0, 433, 435, 431, 435, 436, 440, 0, 440, 437, 442, 438, 442, 438, 435, 0, 443, 439, 443, 445, 0, 445, 446, 438, 446, 0, 448, 440, 448, 442, 449, 442, 449, 450, 451, 450, 451, 443, 445, 0, 445, 442, 452, 446, 452, 448, 453, 448, 453, 0, 445, 449, 0, 451, 450, 451, 455, 448, 455, 456, 457, 456, 457, 452, 458, 451, 458, 453, 459, 460, 459, 460, 462, 0, 462, 455, 463, 455, 463, 0, 456, 457, 0, 458, 464, 458, 464, 455, 0, 459, 460, 462, 465, 462, 465, 458, 466, 463, 466, 467, 469, 467, 469, 462, 470, 464, 470, 472, 473, 472, 473, 465, 0, 465, 475, 0, 475, 466, 0, 469, 467, 469, 476, 465, 476, 470, 472, 0, 472, 473, 477, 469, 477, 475, 478, 475, 478, 479, 472, 479, 480, 0, 480, 476, 0, 475, 483, 482, 483, 482, 485, 477, 485, 478, 486, 478, 486, 0, 479, 0, 0, 480, 487, 0, 487, 478, 482, 483, 482, 485, 488, 485, 488, 0, 489, 486, 489, 490, 482, 490, 0, 485, 0, 487, 491, 492, 491, 492, 493, 488, 493, 488, 495, 496, 495, 489, 0, 497, 490, 497, 498, 488, 498, 491, 0, 491, 492, 493, 0, 493, 496, 0, 496, 495, 499, 491, 499, 0, 497, 493, 0, 498, 496, 500, 0, 500, 502, 501, 502, 501, 503, 0, 503, 499, 504, 499, 504, 0, 505, 506, 505, 506, 0, 0, 500, 499, 501, 502, 501, 0, 507, 503, 507, 504, 508, 504, 508, 0, 501, 505, 506, 509, 510, 509, 510, 504, 511, 0, 511, 507, 512, 507, 512, 0, 513, 508, 513, 514, 0, 514, 509, 507, 509, 510, 515, 0, 515, 511, 516, 512, 516, 512, 509, 0, 517, 513, 517, 519, 514, 519, 0, 512, 520, 0, 520, 515, 521, 516, 521, 516, 522, 523, 522, 523, 524, 517, 524, 0, 519, 516, 525, 520, 525, 520, 526, 0, 526, 521, 0, 0, 523, 522, 523, 520, 527, 524, 527, 0, 528, 525, 528, 525, 523, 0, 529, 526, 529, 530, 0, 530, 531, 525, 531, 0, 532, 527, 532, 528, 533, 528, 533, 534, 535, 534, 535, 529, 0, 0, 530, 528, 536, 531, 536, 532, 537, 532, 537, 0, 538, 533, 538, 0, 534, 535, 539, 532, 539, 0, 540, 536, 540, 536, 541, 0, 541, 537, 542, 0, 542, 538, 543, 536, 543, 539, 0, 539, 544, 0, 544, 540, 545, 541, 545, 541, 546, 539, 546, 542, 547, 0, 547, 543, 548, 541, 548, 544, 549, 544, 549, 0, 550, 545, 550, 0, 551, 546, 551, 544, 552, 547, 552, 548, 553, 548, 553, 0, 554, 549, 554, 0, 0, 550, 555, 548, 555, 551, 556, 552, 556, 552, 557, 0, 557, 553, 558, 0, 558, 554, 559, 552, 559, 555, 0, 555, 560, 0, 560, 556, 561, 557, 561, 557, 562, 555, 562, 558, 0, 0, 563, 559, 563, 557, 564, 560, 564, 560, 565, 0, 565, 561, 566, 0, 566, 562, 567, 560, 567, 563, 0, 563, 568, 0, 568, 564, 569, 565, 569, 565, 570, 563, 570, 566, 0, 0, 571, 567, 571, 565, 572, 568, 572, 568, 573, 0, 573, 569, 574, 0, 574, 570, 575, 568, 575, 571, 0, 571, 576, 0, 576, 572, 577, 573, 577, 573, 578, 571, 578, 574, 0, 0, 579, 575, 579, 573, 580, 576, 580, 576, 581, 0, 581, 577, 582, 0, 582, 578, 583, 576, 583, 579, 0, 579, 584, 0, 584, 580, 585, 581, 585, 581, 586, 579, 586, 582, 0, 0, 587, 583, 587, 581, 588, 584, 588, 584, 589, 0, 589, 585, 590, 0, 590, 586, 591, 584, 591, 587, 0, 587, 592, 0, 592, 588, 593, 589, 593, 589, 594, 587, 594, 590, 595, 0, 595, 591, 596, 589, 596, 592, 597, 592, 597, 0, 598, 593, 598, 0, 599, 594, 599, 592, 600, 595, 600, 596, 601, 596, 601, 0, 602, 597, 602, 0, 0, 598, 603, 596, 603, 599, 604, 600, 604, 600, 605, 0, 605, 601, 606, 0, 606, 602, 607, 600, 607, 603, 0, 603, 608, 0, 608, 604, 609, 605, 609, 605, 610, 603, 610, 606, 611, 0, 611, 607, 612, 605, 612, 608, 613, 608, 613, 0, 0, 609, 0, 0, 0, 610, 0, 608, 0, 611, 0, 612, 0, 612, 0, 0, 0, 613, 0, 0, 0, 0, 0, 612, 615, 615, 615, 615, 615, 615, 615, 616, 0, 0, 616, 616, 616, 616, 617, 617, 617, 617, 617, 617, 617, 618, 0, 0, 618, 618, 618, 618, 620, 620, 620, 620, 620, 620, 620, 621, 621, 621, 622, 622, 622, 623, 623, 623, 624, 624, 624, 0, 624, 624, 624, 625, 625, 625, 625, 625, 625, 625, 626, 0, 626, 628, 628, 628, 628, 628, 628, 628, 629, 629, 629, 629, 629, 629, 629, 630, 0, 630, 631, 631, 631, 631, 631, 631, 631, 632, 0, 632, 632, 632, 632, 632, 633, 633, 633, 633, 633, 633, 633, 634, 634, 634, 634, 634, 634, 634, 635, 0, 635, 635, 635, 635, 635, 636, 636, 636, 636, 636, 636, 636, 637, 637, 637, 637, 637, 637, 637, 638, 0, 638, 638, 638, 638, 638, 639, 639, 639, 639, 639, 639, 639, 640, 640, 640, 640, 640, 640, 640, 641, 641, 641, 641, 641, 641, 641, 642, 642, 642, 642, 642, 642, 642, 643, 0, 643, 643, 643, 643, 643, 644, 644, 644, 644, 644, 644, 644, 645, 645, 645, 645, 645, 645, 645, 646, 646, 646, 646, 646, 646, 646, 647, 647, 647, 647, 647, 647, 647, 648, 0, 648, 648, 648, 648, 648, 649, 649, 649, 649, 649, 649, 649, 650, 650, 650, 650, 650, 650, 650, 651, 651, 651, 651, 651, 651, 651, 652, 652, 652, 652, 652, 652, 652, 653, 0, 653, 653, 653, 653, 653, 654, 654, 654, 654, 654, 654, 654, 655, 655, 655, 655, 655, 655, 655, 656, 0, 656, 656, 656, 656, 656, 657, 657, 657, 657, 657, 657, 657, 658, 658, 658, 658, 658, 658, 658, 659, 659, 659, 659, 659, 659, 659, 660, 660, 660, 660, 660, 660, 660, 661, 661, 661, 661, 661, 661, 661, 662, 662, 662, 662, 662, 662, 662, 663, 663, 663, 663, 663, 663, 663, 664, 0, 664, 664, 664, 664, 664, 665, 665, 665, 665, 665, 665, 665, 666, 666, 666, 666, 666, 666, 666, 667, 667, 667, 667, 667, 667, 667, 668, 668, 668, 668, 668, 668, 668, 669, 0, 669, 669, 669, 669, 669, 670, 670, 670, 670, 670, 670, 670, 671, 671, 671, 671, 671, 671, 671, 672, 0, 672, 672, 672, 672, 672, 673, 673, 673, 673, 673, 673, 673, 674, 674, 674, 674, 674, 674, 674, 675, 0, 675, 675, 675, 675, 675, 676, 676, 676, 676, 676, 676, 676, 677, 677, 677, 677, 677, 677, 677, 678, 678, 678, 678, 678, 678, 678, 679, 679, 679, 679, 679, 679, 679, 680, 0, 680, 680, 680, 680, 680, 681, 681, 681, 681, 681, 681, 681, 682, 682, 682, 682, 682, 682, 682, 683, 683, 683, 683, 683, 683, 683, 684, 684, 684, 684, 684, 684, 684, 685, 685, 685, 685, 685, 685, 685, 686, 686, 686, 686, 686, 686, 686, 687, 687, 687, 687, 687, 687, 687, 688, 688, 688, 688, 688, 688, 688, 689, 689, 689, 689, 689, 689, 689, 690, 690, 690, 690, 690, 690, 690, 691, 691, 691, 691, 691, 691, 691, 692, 692, 692, 692, 692, 692, 692, 693, 693, 693, 693, 693, 693, 693, 694, 694, 694, 694, 694, 694, 694, 695, 0, 695, 695, 695, 695, 695, 696, 696, 696, 696, 696, 696, 696, 697, 697, 697, 697, 697, 697, 697, 698, 698, 698, 698, 698, 698, 698, 699, 699, 699, 699, 699, 699, 699, 700, 0, 700, 700, 700, 700, 700, 701, 701, 701, 701, 701, 701, 701, 702, 702, 702, 702, 702, 702, 702, 703, 0, 703, 703, 703, 703, 703, 704, 704, 704, 704, 704, 704, 704, 705, 705, 705, 705, 705, 705, 705, 706, 0, 706, 706, 706, 706, 706, 707, 707, 707, 707, 707, 707, 707, 708, 708, 708, 708, 708, 708, 708, 709, 709, 709, 709, 709, 709, 709, 710, 710, 710, 710, 710, 710, 710, 711, 0, 711, 711, 711, 711, 711, 712, 712, 712, 712, 712, 712, 712, 713, 713, 713, 713, 713, 713, 713, 714, 714, 714, 714, 714, 714, 714, 715, 715, 715, 715, 715, 715, 715, 716, 0, 716, 716, 716, 716, 716, 717, 717, 717, 717, 717, 717, 717, 718, 718, 718, 718, 718, 718, 718, 719, 719, 719, 719, 719, 719, 719, 720, 720, 720, 720, 720, 720, 720, 721, 0, 721, 721, 721, 721, 721, 722, 722, 722, 722, 722, 722, 722, 723, 723, 723, 723, 723, 723, 723, 724, 0, 724, 724, 724, 724, 724, 725, 725, 725, 725, 725, 725, 725, 726, 726, 726, 726, 726, 726, 726, 727, 727, 727, 727, 727, 727, 727, 728, 728, 728, 728, 728, 728, 728, 729, 729, 729, 729, 729, 729, 729, 730, 730, 730, 730, 730, 730, 730, 731, 731, 731, 731, 731, 731, 731, 732, 0, 732, 732, 732, 732, 732, 733, 733, 733, 733, 733, 733, 733, 734, 734, 734, 734, 734, 734, 734, 735, 735, 735, 735, 735, 735, 735, 736, 736, 736, 736, 736, 736, 736, 737, 0, 737, 737, 737, 737, 737, 738, 738, 738, 738, 738, 738, 738, 739, 739, 739, 739, 739, 739, 739, 740, 0, 740, 740, 740, 740, 740, 741, 741, 741, 741, 741, 741, 741, 742, 742, 742, 742, 742, 742, 742, 743, 0, 743, 743, 743, 743, 743, 744, 744, 744, 744, 744, 744, 744, 745, 745, 745, 745, 745, 745, 745, 746, 746, 746, 746, 746, 746, 746, 747, 747, 747, 747, 747, 747, 747, 748, 0, 748, 748, 748, 748, 748, 749, 749, 749, 749, 749, 749, 749, 750, 750, 750, 750, 750, 750, 750, 751, 751, 751, 751, 751, 751, 751, 752, 752, 752, 752, 752, 752, 752, 753, 0, 753, 753, 753, 753, 753, 754, 754, 754, 754, 754, 754, 754, 755, 755, 755, 755, 755, 755, 755, 756, 756, 756, 756, 756, 756, 756, 757, 757, 757, 757, 757, 757, 757, 758, 0, 758, 758, 758, 758, 758, 759, 759, 759, 759, 759, 759, 759, 760, 760, 760, 760, 760, 760, 760, 761, 0, 761, 761, 761, 761, 761, 762, 762, 762, 762, 762, 762, 762, 763, 763, 763, 763, 763, 763, 763, 764, 764, 764, 764, 764, 764, 764, 765, 765, 765, 765, 765, 765, 765, 766, 766, 766, 766, 766, 766, 766, 767, 767, 767, 767, 767, 767, 767, 768, 768, 768, 768, 768, 768, 768, 769, 0, 769, 769, 769, 769, 769, 770, 770, 770, 770, 770, 770, 770, 771, 771, 771, 771, 771, 771, 771, 772, 772, 772, 772, 772, 772, 772, 773, 773, 773, 773, 773, 773, 773, 774, 0, 774, 774, 774, 774, 774, 775, 775, 775, 775, 775, 775, 775, 776, 776, 776, 776, 776, 776, 776, 777, 0, 777, 777, 777, 777, 777, 778, 778, 778, 778, 778, 778, 778, 779, 779, 779, 779, 779, 779, 779, 780, 0, 780, 780, 780, 780, 780, 781, 781, 781, 781, 781, 781, 781, 782, 782, 782, 782, 782, 782, 782, 783, 783, 783, 783, 783, 783, 783, 784, 784, 784, 784, 784, 784, 784, 785, 0, 785, 785, 785, 785, 785, 786, 786, 786, 786, 786, 786, 786, 787, 787, 787, 787, 787, 787, 787, 788, 788, 788, 788, 788, 788, 788, 789, 789, 789, 789, 789, 789, 789, 790, 790, 790, 790, 790, 790, 790, 791, 791, 791, 791, 791, 791, 791, 792, 792, 792, 792, 792, 792, 792, 793, 793, 793, 793, 793, 793, 793, 794, 794, 794, 794, 794, 794, 794, 795, 795, 795, 795, 795, 795, 795, 796, 796, 796, 796, 796, 796, 796, 797, 797, 797, 797, 797, 797, 797, 798, 798, 798, 798, 798, 798, 798, 799, 799, 799, 799, 799, 799, 799, 800, 0, 800, 800, 800, 800, 800, 801, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 802, 803, 803, 803, 803, 803, 803, 803, 804, 804, 804, 804, 804, 804, 804, 805, 0, 805, 805, 805, 805, 805, 806, 806, 806, 806, 806, 806, 806, 807, 807, 807, 807, 807, 807, 807, 808, 0, 808, 808, 808, 808, 808, 809, 809, 809, 809, 809, 809, 809, 810, 810, 810, 810, 810, 810, 810, 811, 0, 811, 811, 811, 811, 811, 812, 812, 812, 812, 812, 812, 812, 813, 813, 813, 813, 813, 813, 813, 814, 814, 814, 814, 814, 814, 814, 815, 815, 815, 815, 815, 815, 815, 816, 0, 816, 816, 816, 816, 816, 817, 817, 817, 817, 817, 817, 817, 818, 818, 818, 818, 818, 818, 818, 819, 819, 819, 819, 819, 819, 819, 820, 820, 820, 820, 820, 820, 820, 821, 0, 821, 821, 821, 821, 821, 822, 822, 822, 822, 822, 822, 822, 823, 823, 823, 823, 823, 823, 823, 824, 824, 824, 824, 824, 824, 824, 825, 825, 825, 825, 825, 825, 825, 826, 0, 826, 826, 826, 826, 826, 827, 827, 827, 827, 827, 827, 827, 828, 828, 828, 828, 828, 828, 828, 829, 0, 829, 829, 829, 829, 829, 830, 830, 830, 830, 830, 830, 830, 831, 831, 831, 831, 831, 831, 831, 832, 832, 832, 832, 832, 832, 832, 833, 833, 833, 833, 833, 833, 833, 834, 834, 834, 834, 834, 834, 834, 835, 835, 835, 835, 835, 835, 835, 836, 836, 836, 836, 836, 836, 836, 837, 0, 837, 837, 837, 837, 837, 838, 838, 838, 838, 838, 838, 838, 839, 839, 839, 839, 839, 839, 839, 840, 840, 840, 840, 840, 840, 840, 841, 841, 841, 841, 841, 841, 841, 842, 0, 842, 842, 842, 842, 842, 843, 843, 843, 843, 843, 843, 843, 844, 844, 844, 844, 844, 844, 844, 845, 0, 845, 845, 845, 845, 845, 846, 846, 846, 846, 846, 846, 846, 847, 847, 847, 847, 847, 847, 847, 848, 0, 848, 848, 848, 848, 848, 849, 849, 849, 849, 849, 849, 849, 850, 850, 850, 850, 850, 850, 850, 851, 851, 851, 851, 851, 851, 851, 852, 852, 852, 852, 852, 852, 852, 853, 0, 853, 853, 853, 853, 853, 854, 854, 854, 854, 854, 854, 854, 855, 855, 855, 855, 855, 855, 855, 856, 856, 856, 856, 856, 856, 856, 857, 857, 857, 857, 857, 857, 857, 858, 858, 858, 858, 858, 858, 858, 859, 859, 859, 859, 859, 859, 859, 860, 860, 860, 860, 860, 860, 860, 861, 861, 861, 861, 861, 861, 861, 862, 862, 862, 862, 862, 862, 862, 863, 863, 863, 863, 863, 863, 863, 864, 864, 864, 864, 864, 864, 864, 865, 865, 865, 865, 865, 865, 865, 866, 866, 866, 866, 866, 866, 866, 867, 867, 867, 867, 867, 867, 867, 868, 0, 868, 868, 868, 868, 868, 869, 869, 869, 869, 869, 869, 869, 870, 870, 870, 870, 870, 870, 870, 871, 871, 871, 871, 871, 871, 871, 872, 872, 872, 872, 872, 872, 872, 873, 0, 873, 873, 873, 873, 873, 874, 874, 874, 874, 874, 874, 874, 875, 875, 875, 875, 875, 875, 875, 876, 0, 876, 876, 876, 876, 876, 877, 877, 877, 877, 877, 877, 877, 878, 878, 878, 878, 878, 878, 878, 879, 0, 879, 879, 879, 879, 879, 880, 880, 880, 880, 880, 880, 880, 881, 881, 881, 881, 881, 881, 881, 882, 882, 882, 882, 882, 882, 882, 883, 883, 883, 883, 883, 883, 883, 884, 0, 884, 884, 884, 884, 884, 885, 885, 885, 885, 885, 885, 885, 886, 886, 886, 886, 886, 886, 886, 887, 887, 887, 887, 887, 887, 887, 888, 888, 888, 888, 888, 888, 888, 889, 0, 889, 889, 889, 889, 889, 890, 890, 890, 890, 890, 890, 890, 891, 891, 891, 891, 891, 891, 891, 892, 892, 892, 892, 892, 892, 892, 893, 893, 893, 893, 893, 893, 893, 894, 0, 894, 894, 894, 894, 894, 895, 895, 895, 895, 895, 895, 895, 896, 896, 896, 896, 896, 896, 896, 897, 0, 897, 897, 897, 897, 897, 898, 898, 898, 898, 898, 898, 898, 899, 899, 899, 899, 899, 899, 899, 900, 900, 900, 900, 900, 900, 900, 901, 901, 901, 901, 901, 901, 901, 902, 902, 902, 902, 902, 902, 902, 903, 903, 903, 903, 903, 903, 903, 904, 904, 904, 904, 904, 904, 904, 905, 905, 905, 905, 905, 905, 905, 906, 906, 906, 906, 906, 906, 906, 907, 907, 907, 907, 907, 907, 907, 908, 908, 908, 908, 908, 908, 908, 909, 909, 909, 909, 909, 909, 909, 910, 910, 910, 910, 910, 910, 910, 911, 911, 911, 911, 911, 911, 911, 912, 912, 912, 912, 912, 912, 912, 913, 913, 913, 913, 913, 913, 913, 914, 914, 914, 914, 914, 914, 914, 915, 915, 915, 915, 915, 915, 915, 916, 916, 916, 916, 916, 916, 916, 917, 917, 917, 917, 917, 917, 917, 918, 918, 918, 918, 918, 918, 918, 919, 919, 919, 919, 919, 919, 919, 920, 920, 920, 920, 920, 920, 920, 921, 921, 921, 921, 921, 921, 921, 922, 922, 922, 922, 922, 922, 922, 923, 923, 923, 923, 923, 923, 923, 924, 924, 924, 924, 924, 924, 924, 925, 925, 925, 925, 925, 925, 925, 926, 926, 926, 926, 926, 926, 926, 927, 927, 927, 927, 927, 927, 927, 928, 928, 928, 928, 928, 928, 928, 929, 929, 929, 929, 929, 929, 929, 930, 930, 930, 930, 930, 930, 930, 931, 931, 931, 931, 931, 931, 931, 932, 932, 932, 932, 932, 932, 932, 933, 933, 933, 933, 933, 933, 933, 934, 934, 934, 934, 934, 934, 934, 935, 935, 935, 935, 935, 935, 935, 936, 936, 936, 0, 936, 936, 936, 937, 937, 937, 937, 937, 937, 937, 938, 938, 938, 938, 938, 938, 938, 939, 939, 939, 939, 939, 939, 939, 940, 940, 940, 940, 940, 940, 940, 941, 941, 941, 941, 941, 941, 941, 942, 942, 942, 942, 942, 942, 942, 943, 943, 943, 943, 943, 943, 943, 944, 944, 944, 944, 944, 944, 944, 945, 945, 945, 945, 945, 945, 945, 946, 946, 946, 946, 946, 946, 946, 947, 947, 947, 947, 947, 947, 947, 948, 948, 948, 948, 948, 948, 948, 949, 949, 949, 949, 949, 949, 949, 950, 950, 950, 950, 950, 950, 950, 951, 951, 951, 951, 951, 951, 951, 952, 952, 952, 952, 952, 952, 952, 953, 953, 953, 953, 953, 953, 953, 954, 954, 954, 954, 954, 954, 954, 955, 955, 955, 955, 955, 955, 955, 956, 956, 956, 956, 956, 956, 956, 957, 957, 957, 957, 957, 957, 957, 958, 958, 958, 958, 958, 958, 958, 959, 959, 959, 959, 959, 959, 959, 960, 960, 960, 960, 960, 960, 960, 961, 961, 961, 961, 961, 961, 961, 962, 962, 962, 962, 962, 962, 962, 963, 963, 963, 963, 963, 963, 963, 964, 964, 964, 964, 964, 964, 964, 965, 965, 965, 965, 965, 965, 965, 966, 966, 966, 966, 966, 966, 966, 967, 967, 967, 967, 967, 967, 967, 968, 968, 968, 968, 968, 968, 968, 969, 969, 969, 969, 969, 969, 969, 970, 970, 970, 970, 970, 970, 970, 971, 971, 971, 971, 971, 971, 971, 972, 972, 972, 972, 972, 972, 972, 973, 973, 973, 973, 973, 973, 973, 974, 974, 974, 974, 974, 974, 974, 975, 975, 975, 975, 975, 975, 975, 976, 976, 976, 976, 976, 976, 976, 977, 977, 977, 977, 977, 977, 977, 978, 978, 978, 978, 978, 978, 978, 979, 979, 979, 979, 979, 979, 979, 980, 980, 980, 980, 980, 980, 980, 981, 981, 981, 981, 981, 981, 981, 982, 982, 982, 982, 982, 982, 982, 983, 983, 983, 983, 983, 983, 983, 984, 984, 984, 984, 984, 984, 984, 985, 985, 985, 985, 985, 985, 985, 986, 986, 986, 986, 986, 986, 986, 987, 987, 987, 987, 987, 987, 987, 988, 988, 988, 988, 988, 988, 988, 989, 989, 989, 989, 989, 989, 989, 990, 990, 990, 990, 990, 990, 990, 991, 991, 991, 991, 991, 991, 991, 992, 992, 992, 992, 992, 992, 992, 993, 993, 993, 993, 993, 993, 993, 994, 994, 994, 994, 994, 994, 994, 995, 995, 995, 995, 995, 995, 995, 996, 996, 996, 996, 996, 996, 996, 997, 997, 997, 997, 997, 997, 997, 998, 998, 998, 998, 998, 998, 998, 999, 999, 999, 999, 999, 999, 999, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1004, 1004, 1004, 1004, 1004, 1004, 1004, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614 } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET #line 1 "./n3_lexer.l" /* -*- Mode: c; c-basic-offset: 2 -*- * * n3_lexer.l - Raptor Notation 3 lexer - making tokens for grammar generator * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * This is an incomplete Notation 3 parser. * * To generate the C files from this source, rather than use the * shipped n3_lexer.c/.h needs a patched version of flex 2.5.31 such * as the one available in Debian GNU/Linux. Details below * near the %option descriptions. * */ /* recognise 8-bits */ /* all symbols prefixed by this */ /* This is not needed, flex is invoked -on3_lexer.c */ /* %option outfile="n3_lexer.c" */ /* Emit a C header file for prototypes * Only available in flex 2.5.13 or newer. * It was renamed to header-file in flex 2.5.19 */ /* Do not emit #include <unistd.h> * Only available in flex 2.5.7 or newer. * Broken in flex 2.5.31 without patches. */ #define YY_NO_UNISTD_H 1 /* Never interactive */ /* No isatty() check */ /* Batch scanner */ /* Never use yyunput */ /* Supply our own alloc/realloc/free functions */ /* Re-entrant scanner */ /* definitions */ #line 75 "./n3_lexer.l" /* NOTE: These headers are NOT included here but are inserted by * fix-flex since otherwise it appears far too late in the generated C */ /* #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif */ #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_SETJMP_H #include <setjmp.h> #endif #include <raptor.h> #include <raptor_internal.h> #include <n3_parser.h> #include <n3_common.h> /* Prototypes */ static unsigned char *n3_copy_token(unsigned char *text, size_t len); static unsigned char *n3_copy_string_token(raptor_parser* rdf_parser, unsigned char *text, size_t len, int delim); void n3_lexer_syntax_error(void* rdf_parser, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); #ifdef RAPTOR_DEBUG const char * n3_token_print(raptor_world* world, int token, YYSTYPE *lval); #endif int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t yyscanner); #define YY_DECL int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t yyscanner) #ifdef __cplusplus #define INPUT_FN yyinput #else #define INPUT_FN input #endif /* Missing n3_lexer.c/h prototypes */ int n3_lexer_get_column(yyscan_t yyscanner); void n3_lexer_set_column(int column_no , yyscan_t yyscanner); static void n3_lexer_cleanup(yyscan_t yyscanner); #ifdef HAVE_SETJMP static jmp_buf n3_lexer_fatal_error_longjmp_env; /* fatal error handler declaration */ #define YY_FATAL_ERROR(msg) do { \ n3_lexer_fatal_error(msg, yyscanner); \ longjmp(n3_lexer_fatal_error_longjmp_env, 1); \ } while(0) #else #define YY_FATAL_ERROR(msg) do { \ n3_lexer_fatal_error(msg, yyscanner); \ abort(); \ } while(0) #endif static void n3_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner); /* Fatal error handler that returns EOF instead of abort()/longjmp() * so that parser can clean up properly */ #define YY_FATAL_ERROR_EOF(msg) do { \ n3_lexer_fatal_error(msg, yyscanner); \ yyterminate(); \ } while(0) /* Out-of-memory reporting macro */ #define N3_LEXER_OOM() YY_FATAL_ERROR_EOF(n3_lexer_oom_text) static const char n3_lexer_oom_text[]="n3_lexer: Out of memory"; /* from SPARQL */ /* similar to SPARQL but no need for <= check here */ #line 1973 "n3_lexer.c" #define INITIAL 0 #define PREF 1 #define LITERAL 2 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #ifndef YY_NO_UNISTD_H #include <unistd.h> #endif #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif /* Holds the entire state of the reentrant scanner. */ struct yyguts_t { /* User-defined. Not touched by flex. */ YY_EXTRA_TYPE yyextra_r; /* The rest are the same as the globals declared in the non-reentrant scanner. */ FILE *yyin_r, *yyout_r; size_t yy_buffer_stack_top; /**< index of top of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; int yy_n_chars; int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; int yy_did_buffer_switch_on_eof; int yy_start_stack_ptr; int yy_start_stack_depth; int *yy_start_stack; yy_state_type yy_last_accepting_state; char* yy_last_accepting_cpos; int yylineno_r; int yy_flex_debug_r; char *yytext_r; int yy_more_flag; int yy_more_len; }; /* end struct yyguts_t */ static int yy_init_globals (yyscan_t yyscanner ); int n3_lexer_lex_init (yyscan_t* scanner); int n3_lexer_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int n3_lexer_lex_destroy (yyscan_t yyscanner ); int n3_lexer_get_debug (yyscan_t yyscanner ); void n3_lexer_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE n3_lexer_get_extra (yyscan_t yyscanner ); void n3_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *n3_lexer_get_in (yyscan_t yyscanner ); void n3_lexer_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *n3_lexer_get_out (yyscan_t yyscanner ); void n3_lexer_set_out (FILE * out_str ,yyscan_t yyscanner ); int n3_lexer_get_leng (yyscan_t yyscanner ); char *n3_lexer_get_text (yyscan_t yyscanner ); int n3_lexer_get_lineno (yyscan_t yyscanner ); void n3_lexer_set_lineno (int line_number ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int n3_lexer_wrap (yyscan_t yyscanner ); #else extern int n3_lexer_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner ); #else static int input (yyscan_t yyscanner ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int n3_lexer_lex (yyscan_t yyscanner); #define YY_DECL int n3_lexer_lex (yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; #line 187 "./n3_lexer.l" /* rules */ raptor_parser *rdf_parser=(raptor_parser*)yyextra; raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; #ifdef HAVE_SETJMP if(setjmp(n3_lexer_fatal_error_longjmp_env)) return 1; #endif #line 2216 "n3_lexer.c" if ( !yyg->yy_init ) { yyg->yy_init = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yyg->yy_start ) yyg->yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { n3_lexer_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = n3_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } n3_lexer__load_buffer_state(yyscanner ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; /* Support of yytext. */ *yy_cp = yyg->yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yyg->yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 615 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 614 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yyg->yy_hold_char; yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 201 "./n3_lexer.l" { n3_parser->lineno++; } YY_BREAK case 2: YY_RULE_SETUP #line 203 "./n3_lexer.l" { /* empty */ } YY_BREAK case 3: YY_RULE_SETUP #line 205 "./n3_lexer.l" { return A; } YY_BREAK case 4: YY_RULE_SETUP #line 207 "./n3_lexer.l" { return DOT; } YY_BREAK case 5: YY_RULE_SETUP #line 208 "./n3_lexer.l" { return COMMA; } YY_BREAK case 6: YY_RULE_SETUP #line 209 "./n3_lexer.l" { return SEMICOLON; } YY_BREAK case 7: YY_RULE_SETUP #line 210 "./n3_lexer.l" { return LEFT_SQUARE; } YY_BREAK case 8: YY_RULE_SETUP #line 211 "./n3_lexer.l" { return RIGHT_SQUARE; } YY_BREAK case 9: YY_RULE_SETUP #line 212 "./n3_lexer.l" { BEGIN(PREF); return PREFIX; } YY_BREAK case 10: YY_RULE_SETUP #line 213 "./n3_lexer.l" { return AT; } YY_BREAK case 11: YY_RULE_SETUP #line 214 "./n3_lexer.l" { return HAT; } YY_BREAK case 12: YY_RULE_SETUP #line 215 "./n3_lexer.l" { return LEFT_ROUND; } YY_BREAK case 13: YY_RULE_SETUP #line 216 "./n3_lexer.l" { return RIGHT_ROUND; } YY_BREAK case 14: YY_RULE_SETUP #line 219 "./n3_lexer.l" { n3_parser_lval->string=n3_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '\"'); /* ' */ if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_string_token failed"); return STRING_LITERAL; } YY_BREAK case 15: YY_RULE_SETUP #line 224 "./n3_lexer.l" { n3_parser_lval->string=n3_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '"'); /* ' */ if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_string_token failed"); return STRING_LITERAL; } YY_BREAK case 16: YY_RULE_SETUP #line 229 "./n3_lexer.l" { BEGIN(LITERAL); n3_parser->sb=raptor_new_stringbuffer(); if(!n3_parser->sb) N3_LEXER_OOM(); } YY_BREAK case 17: YY_RULE_SETUP #line 235 "./n3_lexer.l" { size_t len; BEGIN(INITIAL); len=raptor_stringbuffer_length(n3_parser->sb); n3_parser_lval->string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(!n3_parser_lval->string) N3_LEXER_OOM(); raptor_stringbuffer_copy_to_string(n3_parser->sb, (unsigned char*)n3_parser_lval->string, len); n3_parser_lval->string[len]='\0'; raptor_free_stringbuffer(n3_parser->sb); n3_parser->sb=NULL; return STRING_LITERAL; } YY_BREAK case 18: /* rule 18 can match eol */ YY_RULE_SETUP #line 250 "./n3_lexer.l" { if (*yytext == EOF) { BEGIN(INITIAL); n3_syntax_error(rdf_parser, "End of file in middle of literal"); raptor_free_stringbuffer(n3_parser->sb); n3_parser->sb=NULL; return EOF; } if(raptor_stringbuffer_append_turtle_string(n3_parser->sb, (unsigned char*)yytext, yyleng, '"', (raptor_simple_message_handler)n3_lexer_syntax_error, rdf_parser)) { /* " */ BEGIN(INITIAL); raptor_free_stringbuffer(n3_parser->sb); n3_parser->sb=NULL; YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } } YY_BREAK case 19: YY_RULE_SETUP #line 268 "./n3_lexer.l" { n3_parser_lval->string=n3_copy_token((unsigned char*)yytext+2, yyleng-2); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); return BLANK_LITERAL; } YY_BREAK case 20: YY_RULE_SETUP #line 273 "./n3_lexer.l" { n3_parser_lval->uri=n3_qname_to_uri(rdf_parser, (unsigned char*)yytext, yyleng); if(!n3_parser_lval->uri) YY_FATAL_ERROR_EOF("n3_qname_to_uri failed"); return QNAME_LITERAL; } YY_BREAK case 21: YY_RULE_SETUP #line 278 "./n3_lexer.l" { n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, yyleng); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); return DECIMAL_LITERAL; } YY_BREAK case 22: YY_RULE_SETUP #line 284 "./n3_lexer.l" { double d; int n; n=sscanf((const char*)yytext, "%lf", &d); if(n != 1) { n3_syntax_error(rdf_parser, "N3 syntax error - Illegal floating point constant %s", yytext); yyterminate(); } n3_parser_lval->floating=d; return FLOATING_LITERAL; } YY_BREAK case 23: YY_RULE_SETUP #line 297 "./n3_lexer.l" { n3_parser_lval->integer=atoi(yytext); return INTEGER_LITERAL; } YY_BREAK case 24: YY_RULE_SETUP #line 300 "./n3_lexer.l" { /* eat up leading whitespace */ } YY_BREAK case 25: YY_RULE_SETUP #line 301 "./n3_lexer.l" { n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, yyleng); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); BEGIN(INITIAL); return IDENTIFIER; } YY_BREAK case 26: YY_RULE_SETUP #line 306 "./n3_lexer.l" { BEGIN(INITIAL); n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, 0); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); return IDENTIFIER; } YY_BREAK case 27: /* rule 27 can match eol */ YY_RULE_SETUP #line 312 "./n3_lexer.l" { BEGIN(INITIAL); if (*yytext == EOF) return EOF; n3_syntax_error(rdf_parser, "syntax error at '%c' - @prefix name must end in :", *yytext); yyterminate(); } YY_BREAK case 28: /* rule 28 can match eol */ YY_RULE_SETUP #line 320 "./n3_lexer.l" { if(yyleng == 2) n3_parser_lval->uri=raptor_uri_copy_v2(rdf_parser->world, rdf_parser->base_uri); else { yytext[yyleng-1]='\0'; n3_parser_lval->uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, rdf_parser->base_uri, (const unsigned char*)yytext+1); if(!n3_parser_lval->uri) YY_FATAL_ERROR_EOF("raptor_new_uri_relative_to_base failed"); } return URI_LITERAL; } YY_BREAK case 29: YY_RULE_SETUP #line 330 "./n3_lexer.l" { n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, yyleng); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); return IDENTIFIER; } YY_BREAK case 30: /* rule 30 can match eol */ YY_RULE_SETUP #line 335 "./n3_lexer.l" { /* # comment */ n3_parser->lineno++; } YY_BREAK case 31: YY_RULE_SETUP #line 339 "./n3_lexer.l" { /* # comment on the last line with no terminating newline */ } YY_BREAK case 32: YY_RULE_SETUP #line 342 "./n3_lexer.l" { if (*yytext == EOF) return EOF; n3_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } YY_BREAK case 33: YY_RULE_SETUP #line 349 "./n3_lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 2558 "n3_lexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PREF): case YY_STATE_EOF(LITERAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yyg->yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * n3_lexer_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yyg->yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_END_OF_FILE: { yyg->yy_did_buffer_switch_on_eof = 0; if ( n3_lexer_wrap(yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of n3_lexer_lex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = yyg->yytext_ptr; register int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ n3_lexer_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } if ( yyg->yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; n3_lexer_restart(yyin ,yyscanner); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) n3_lexer_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } yyg->yy_n_chars += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { register yy_state_type yy_current_state; register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 615 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { register int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ register char *yy_cp = yyg->yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 615 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 614); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) #else static int input (yyscan_t yyscanner) #endif { int c; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; *yyg->yy_c_buf_p = yyg->yy_hold_char; if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) /* This was really a NUL. */ *yyg->yy_c_buf_p = '\0'; else { /* need more input */ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ n3_lexer_restart(yyin ,yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( n3_lexer_wrap(yyscanner ) ) return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(yyscanner); #else return input(yyscanner); #endif } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; } } } c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ yyg->yy_hold_char = *++yyg->yy_c_buf_p; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ void n3_lexer_restart (FILE * input_file , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! YY_CURRENT_BUFFER ){ n3_lexer_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = n3_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } n3_lexer__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); n3_lexer__load_buffer_state(yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ void n3_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* TODO. We should be able to replace this entire function body * with * n3_lexer_pop_buffer_state(); * n3_lexer_push_buffer_state(new_buffer); */ n3_lexer_ensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } YY_CURRENT_BUFFER_LVALUE = new_buffer; n3_lexer__load_buffer_state(yyscanner ); /* We don't actually know whether we did this switch during * EOF (n3_lexer_wrap()) processing, but the only time this flag * is looked at is after n3_lexer_wrap() is called, so it's safe * to go ahead and always set it. */ yyg->yy_did_buffer_switch_on_eof = 1; } static void n3_lexer__load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * @param yyscanner The scanner object. * @return the allocated buffer state. */ YY_BUFFER_STATE n3_lexer__create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) n3_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in n3_lexer__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) n3_lexer_alloc(b->yy_buf_size + 2 ,yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in n3_lexer__create_buffer()" ); b->yy_is_our_buffer = 1; n3_lexer__init_buffer(b,file ,yyscanner); return b; } /** Destroy the buffer. * @param b a buffer created with n3_lexer__create_buffer() * @param yyscanner The scanner object. */ void n3_lexer__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) n3_lexer_free((void *) b->yy_ch_buf ,yyscanner ); n3_lexer_free((void *) b ,yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a n3_lexer_restart() or at EOF. */ static void n3_lexer__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; n3_lexer__flush_buffer(b ,yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then n3_lexer__init_buffer was _probably_ * called from n3_lexer_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ void n3_lexer__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) n3_lexer__load_buffer_state(yyscanner ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * @param yyscanner The scanner object. */ void n3_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (new_buffer == NULL) return; n3_lexer_ensure_buffer_stack(yyscanner); /* This block is copied from n3_lexer__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) yyg->yy_buffer_stack_top++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from n3_lexer__switch_to_buffer. */ n3_lexer__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ void n3_lexer_pop_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!YY_CURRENT_BUFFER) return; n3_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { n3_lexer__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void n3_lexer_ensure_buffer_stack (yyscan_t yyscanner) { int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; yyg->yy_buffer_stack = (struct yy_buffer_state**)n3_lexer_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in n3_lexer_ensure_buffer_stack()" ); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; } if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)n3_lexer_realloc (yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in n3_lexer_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE n3_lexer__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) n3_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in n3_lexer__scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; n3_lexer__switch_to_buffer(b ,yyscanner ); return b; } /** Setup the input buffer state to scan a string. The next call to n3_lexer_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * n3_lexer__scan_bytes() instead. */ YY_BUFFER_STATE n3_lexer__scan_string (yyconst char * yystr , yyscan_t yyscanner) { return n3_lexer__scan_bytes(yystr,strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to n3_lexer_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE n3_lexer__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) n3_lexer_alloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in n3_lexer__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = n3_lexer__scan_buffer(buf,n ,yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in n3_lexer__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ yyg->yy_hold_char = *yyg->yy_c_buf_p; \ *yyg->yy_c_buf_p = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ YY_EXTRA_TYPE n3_lexer_get_extra (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ int n3_lexer_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ int n3_lexer_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ FILE *n3_lexer_get_in (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ FILE *n3_lexer_get_out (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ int n3_lexer_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ char *n3_lexer_get_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ void n3_lexer_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ; } /** Set the current line number. * @param line_number * @param yyscanner The scanner object. */ void n3_lexer_set_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR("n3_lexer_set_lineno called with no buffer"); yylineno = line_number; } /** Set the current column. * @param line_number * @param yyscanner The scanner object. */ void n3_lexer_set_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR("n3_lexer_set_column called with no buffer"); yycolumn = column_no; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * @param yyscanner The scanner object. * @see n3_lexer__switch_to_buffer */ void n3_lexer_set_in (FILE * in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyin = in_str ; } void n3_lexer_set_out (FILE * out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyout = out_str ; } int n3_lexer_get_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; } void n3_lexer_set_debug (int bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_flex_debug = bdebug ; } /* Accessor methods for yylval and yylloc */ /* User-visible API */ /* n3_lexer_lex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ int n3_lexer_lex_init(yyscan_t* ptr_yy_globals) { if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) n3_lexer_alloc ( sizeof( struct yyguts_t ), NULL ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); return yy_init_globals ( *ptr_yy_globals ); } /* n3_lexer_lex_init_extra has the same functionality as n3_lexer_lex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and * is the reason, too, why this function also must handle its own declaration). * The user defined value in the first argument will be available to n3_lexer_alloc in * the yyextra field. */ int n3_lexer_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; n3_lexer_set_extra (yy_user_defined, &dummy_yyguts); if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) n3_lexer_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); n3_lexer_set_extra (yy_user_defined, *ptr_yy_globals); return yy_init_globals ( *ptr_yy_globals ); } static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Initialization is the same as for the non-reentrant scanner. * This function is called from n3_lexer_lex_destroy(), so don't allocate here. */ yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; yyg->yy_c_buf_p = (char *) 0; yyg->yy_init = 0; yyg->yy_start = 0; yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_depth = 0; yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * n3_lexer_lex_init() */ return 0; } /* n3_lexer_lex_destroy is for both reentrant and non-reentrant scanners. */ int n3_lexer_lex_destroy (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ n3_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; n3_lexer_pop_buffer_state(yyscanner); } /* Destroy the stack itself. */ n3_lexer_free(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ n3_lexer_free(yyg->yy_start_stack ,yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * n3_lexer_lex() is called, initialization will occur. */ yy_init_globals( yyscanner); /* Destroy the main struct (reentrant only). */ /* clean up leaks if any before freeing yyscanner */ n3_lexer_cleanup(yyscanner); n3_lexer_free ( yyscanner , yyscanner ); yyscanner = NULL; return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #define YYTABLES_NAME "yytables" #line 349 "./n3_lexer.l" /* user code */ int n3_lexer_wrap (yyscan_t yyscanner) { return 1; } static unsigned char * n3_copy_token(unsigned char *text, size_t len) { unsigned char *s; if(!len) len=strlen((const char*)text); s=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(s) { strncpy((char*)s, (const char*)text, len); s[len] = '\0'; } return s; } static unsigned char * n3_copy_string_token(raptor_parser* rdf_parser, unsigned char *string, size_t len, int delim) { raptor_stringbuffer* sb=NULL; int rc; if(len) { sb=raptor_new_stringbuffer(); if(!sb) return NULL; rc=raptor_stringbuffer_append_turtle_string(sb, string, len, delim, (raptor_simple_message_handler)n3_lexer_syntax_error, rdf_parser); if(rc) { raptor_free_stringbuffer(sb); return NULL; } len=raptor_stringbuffer_length(sb); } string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(string) { if(sb) { raptor_stringbuffer_copy_to_string(sb, string, len+1); } string[len]='\0'; } if(sb) raptor_free_stringbuffer(sb); return string; } void n3_lexer_syntax_error(void* ctx, const char *message, ...) { raptor_parser* rdf_parser=(raptor_parser *)ctx; raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; va_list arguments; rdf_parser->locator.line=n3_parser->lineno; #ifdef RAPTOR_N3_USE_ERROR_COLUMNS rdf_parser->locator.column=n3_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_error_varargs(((raptor_parser*)rdf_parser), message, arguments); va_end(arguments); } /* * n3_lexer_fatal_error: * @msg: * @yyscanner: * * INTERNAL - replacement for the generated error handler. */ static void n3_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner) { raptor_parser *rdf_parser=NULL; if(yyscanner) rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(rdf_parser) /* avoid "format not a string literal and no format arguments" warning with %s */ raptor_parser_fatal_error(rdf_parser, "%s", msg); else { fputs(msg, stderr); fputc('\n', stderr); } } /* Define LEXER_ALLOC_TRACKING to enable allocated memory tracking * - fixes lexer memory leak when ensure_buffer_stack fails */ #ifdef LEXER_ALLOC_TRACKING typedef struct { /* Number of void* slots allocated */ int lexer_allocs_size; /* Allocted void* slots follow in memory after this header */ } lexer_alloc_tracker_header; /* Initial alloc tracker slot array size - 2 seems to be enough for almost all cases */ static const int initial_lexer_allocs_size=2; #endif /* * n3_lexer_cleanup: * @yyscanner: * * INTERNAL - Clean up unfreed lexer allocs if LEXER_ALLOC_TRACKING is enabled. */ static void n3_lexer_cleanup(yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; if(!yyscanner) return; rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs=(void**)&tracker[1]; for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]) free(lexer_allocs[i]); lexer_allocs[i]=NULL; } free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data=NULL; #endif } /* * n3_lexer_alloc: * @size * @yyscanner * * INTERNAL - alloc replacement. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *n3_lexer_alloc(yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *ptr; /* yyscanner not initialized -> probably initializing yyscanner itself * -> just malloc without tracking */ if(!yyscanner) return malloc(size); rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_alloc: yyscanner extra not initialized"); /* try to allocate tracker if it does not exist */ tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) { /* allocate tracker header + array of void* slots */ tracker=(lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+initial_lexer_allocs_size*sizeof(void*)); if(!tracker) YY_FATAL_ERROR("lexer_alloc: cannot allocate tracker"); tracker->lexer_allocs_size=initial_lexer_allocs_size; rdf_parser->lexer_user_data=(void *)tracker; } lexer_allocs=(void**)&tracker[1]; /* allocate memory */ ptr=malloc(size); /* find a free slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(!lexer_allocs[i]) { lexer_allocs[i]=ptr; break; } } /* no free slots -> grow tracker slot array */ if(i>=tracker->lexer_allocs_size) { int j; void **dest; tracker=(lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+i*2*sizeof(void*)); if(!tracker) { if(ptr) free(ptr); YY_FATAL_ERROR("lexer_alloc: cannot grow tracker"); } tracker->lexer_allocs_size=i*2; /* copy data from old tracker */ dest=(void**)&tracker[1]; for(j=0; j<i; ++j) { dest[j]=lexer_allocs[j]; } /* set new item to first free slot */ dest[j]=ptr; /* free old tracker and replace with new one */ free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data=tracker; } return ptr; #else return malloc(size); #endif } /* * n3_lexer_realloc: * * INTERNAL - realloc replacement * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *n3_lexer_realloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *newptr; if(!yyscanner) YY_FATAL_ERROR("lexer_realloc: yyscanner not initialized"); rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_realloc: yyscanner extra not initialized"); tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) YY_FATAL_ERROR("lexer_realloc: no alloc tracker"); lexer_allocs=(void**)&tracker[1]; /* find the old slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]==ptr) break; } /* no old slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_realloc: cell not in tracker"); /* realloc */ newptr=realloc((char*)ptr, size); /* replace entry in tracker */ lexer_allocs[i]=newptr; return newptr; #else return realloc((char*)ptr, size); #endif } /* * n3_lexer_free: * * INTERNAL - free replacement. * Checks for NULL pointer to be freed unlike the default lexer free function. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void n3_lexer_free(void *ptr, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; /* do not free NULL */ if(!ptr) return; /* free ptr even if we would encounter an error */ free(ptr); /* yyscanner is allocated with n3_lexer_alloc() but it's never stored in the tracker * - we need yyscanner to access the tracker */ if(!yyscanner || ptr==yyscanner) return; rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs=(void**)&tracker[1]; /* find the slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]==ptr) break; } /* no slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_free: cell not in tracker"); /* remove entry from tracker */ lexer_allocs[i]=NULL; #else if(ptr) free(ptr); #endif } #ifdef RAPTOR_DEBUG const char * n3_token_print(raptor_world* world, int token, YYSTYPE *lval) { static char buffer[2048]; if(!token) return "<<EOF>>"; switch(token) { case PREFIX: return "PREFIX"; case A: return "A"; case DOT: return "DOT"; case COMMA: return "COMMA"; case SEMICOLON: return "SEMICOLON"; case LEFT_SQUARE: return "LEFT_SQUARE"; case RIGHT_SQUARE: return "RIGHT_SQUARE"; case AT: return "AT"; case HAT: return "HAT"; case STRING_LITERAL: sprintf(buffer, "STRING_LITERAL(%s)", lval->string); return buffer; case URI_LITERAL: sprintf(buffer, "URI_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string_v2(world, lval->uri) : "")); return buffer; case BLANK_LITERAL: sprintf(buffer, "BLANK_LITERAL(%s)", lval->string); return buffer; case QNAME_LITERAL: sprintf(buffer, "QNAME_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string_v2(world, lval->uri) : "")); return buffer; case INTEGER_LITERAL: sprintf(buffer, "INTEGER_LITERAL(%d)", lval->integer); return buffer; case FLOATING_LITERAL: sprintf(buffer, "FLOATING_LITERAL(%1g)", lval->floating); return buffer; case IDENTIFIER: sprintf(buffer, "IDENTIFIER(%s)", (lval->string ? (char*)lval->string : "")); return buffer; case DECIMAL_LITERAL: sprintf(buffer, "DECIMAL_LITERAL(%s)", lval->string); return buffer; case ERROR_TOKEN: return "ERROR"; default: RAPTOR_DEBUG2("UNKNOWN token %d - add a new case\n", token); return "(UNKNOWN)"; } } #endif #ifdef STANDALONE static void n3_token_free(int token, YYSTYPE *lval) { if(!token) return; switch(token) { case STRING_LITERAL: case BLANK_LITERAL: case IDENTIFIER: if(lval->string) RAPTOR_FREE(cstring, lval->string); break; case URI_LITERAL: case QNAME_LITERAL: if(lval->uri) raptor_free_uri(lval->uri); break; default: break; } } int main(int argc, char *argv[]) { raptor_parser rdf_parser; raptor_n3_parser n3_parser; yyscan_t scanner; int token=EOF; FILE *fh; YYSTYPE lval; const unsigned char *uri_string; char *filename=NULL; raptor_init(); if(argc > 1) { filename=argv[1]; fh=fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename="<stdin>"; fh=stdin; } memset(&rdf_parser, 0, sizeof(raptor_parser)); memset(&n3_parser, 0, sizeof(raptor_n3_parser)); n3_lexer_lex_init(&n3_parser.scanner); scanner=n3_parser.scanner; n3_lexer_set_in(fh, scanner); n3_lexer_set_extra(&rdf_parser, scanner); /* Initialise enough of the parser and locator to get error messages */ rdf_parser.context=&n3_parser; n3_parser.lineno=1; rdf_parser.locator.file=filename; rdf_parser.locator.column= -1; uri_string=raptor_uri_filename_to_uri_string(filename); rdf_parser.base_uri=raptor_new_uri(uri_string); RAPTOR_FREE(cstring, (void*)uri_string); while(1) { memset(&lval, 0, sizeof(YYSTYPE)); if(n3_lexer_get_text(scanner) != NULL) printf("yyinput '%s'\n", n3_lexer_get_text(scanner)); token=n3_lexer_lex(&lval,scanner); #ifdef RAPTOR_DEBUG printf("token %s\n", n3_token_print(raptor_world_instance(), token, &lval)); /* FIXME */ #else printf("token %d\n", token); #endif n3_token_free(token, &lval); if(!token || token == EOF || token == ERROR_TOKEN) break; } n3_lexer_lex_destroy(scanner); raptor_free_uri(rdf_parser.base_uri); raptor_finish(); if(token == ERROR_TOKEN) return 1; return 0; } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/n3_lexer.h������������������������������������������������������������������������0000644�0001750�0001750�00000020700�11330672550�012507� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef n3_lexer_HEADER_H #define n3_lexer_HEADER_H 1 #define n3_lexer_IN_HEADER 1 #line 6 "n3_lexer.h" #line 8 "n3_lexer.h" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ void n3_lexer_restart (FILE *input_file ,yyscan_t yyscanner ); void n3_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE n3_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void n3_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void n3_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void n3_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void n3_lexer_pop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE n3_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE n3_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE n3_lexer__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *n3_lexer_alloc (yy_size_t ,yyscan_t yyscanner ); void *n3_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void n3_lexer_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ #define yytext_ptr yytext_r #ifdef YY_HEADER_EXPORT_START_CONDITIONS #define INITIAL 0 #define PREF 1 #define LITERAL 2 #endif #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include <unistd.h> #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif int n3_lexer_lex_init (yyscan_t* scanner); int n3_lexer_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int n3_lexer_lex_destroy (yyscan_t yyscanner ); int n3_lexer_get_debug (yyscan_t yyscanner ); void n3_lexer_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE n3_lexer_get_extra (yyscan_t yyscanner ); void n3_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *n3_lexer_get_in (yyscan_t yyscanner ); void n3_lexer_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *n3_lexer_get_out (yyscan_t yyscanner ); void n3_lexer_set_out (FILE * out_str ,yyscan_t yyscanner ); int n3_lexer_get_leng (yyscan_t yyscanner ); char *n3_lexer_get_text (yyscan_t yyscanner ); int n3_lexer_get_lineno (yyscan_t yyscanner ); void n3_lexer_set_lineno (int line_number ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int n3_lexer_wrap (yyscan_t yyscanner ); #else extern int n3_lexer_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int n3_lexer_lex (yyscan_t yyscanner); #define YY_DECL int n3_lexer_lex (yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ #undef YY_NEW_FILE #undef YY_FLUSH_BUFFER #undef yy_set_bol #undef yy_new_buffer #undef yy_set_interactive #undef YY_DO_BEFORE_ACTION #ifdef YY_DECL_IS_OURS #undef YY_DECL_IS_OURS #undef YY_DECL #endif #line 349 "./n3_lexer.l" #line 347 "n3_lexer.h" #undef n3_lexer_IN_HEADER #endif /* n3_lexer_HEADER_H */ ����������������������������������������������������������������raptor-1.4.21/src/n3_lexer.l������������������������������������������������������������������������0000644�0001750�0001750�00000055060�11330672502�012517� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * n3_lexer.l - Raptor Notation 3 lexer - making tokens for grammar generator * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * This is an incomplete Notation 3 parser. * * To generate the C files from this source, rather than use the * shipped n3_lexer.c/.h needs a patched version of flex 2.5.31 such * as the one available in Debian GNU/Linux. Details below * near the %option descriptions. * */ /* recognise 8-bits */ %option 8bit %option warn nodefault /* all symbols prefixed by this */ %option prefix="n3_lexer_" /* This is not needed, flex is invoked -on3_lexer.c */ /* %option outfile="n3_lexer.c" */ /* Emit a C header file for prototypes * Only available in flex 2.5.13 or newer. * It was renamed to header-file in flex 2.5.19 */ %option header-file="n3_lexer.h" /* Do not emit #include <unistd.h> * Only available in flex 2.5.7 or newer. * Broken in flex 2.5.31 without patches. */ %option nounistd /* Never interactive */ /* No isatty() check */ %option never-interactive /* Batch scanner */ %option batch /* Never use yyunput */ %option nounput /* Supply our own alloc/realloc/free functions */ %option noyyalloc noyyrealloc noyyfree /* Re-entrant scanner */ %option reentrant /* definitions */ %{ /* NOTE: These headers are NOT included here but are inserted by * fix-flex since otherwise it appears far too late in the generated C */ /* #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif */ #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_SETJMP_H #include <setjmp.h> #endif #include <raptor.h> #include <raptor_internal.h> #include <n3_parser.h> #include <n3_common.h> /* Prototypes */ static unsigned char *n3_copy_token(unsigned char *text, size_t len); static unsigned char *n3_copy_string_token(raptor_parser* rdf_parser, unsigned char *text, size_t len, int delim); void n3_lexer_syntax_error(void* rdf_parser, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); #ifdef RAPTOR_DEBUG const char * n3_token_print(raptor_world* world, int token, YYSTYPE *lval); #endif int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t yyscanner); #define YY_DECL int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t yyscanner) #ifdef __cplusplus #define INPUT_FN yyinput #else #define INPUT_FN input #endif /* Missing n3_lexer.c/h prototypes */ int n3_lexer_get_column(yyscan_t yyscanner); void n3_lexer_set_column(int column_no , yyscan_t yyscanner); static void n3_lexer_cleanup(yyscan_t yyscanner); #ifdef HAVE_SETJMP static jmp_buf n3_lexer_fatal_error_longjmp_env; /* fatal error handler declaration */ #define YY_FATAL_ERROR(msg) do { \ n3_lexer_fatal_error(msg, yyscanner); \ longjmp(n3_lexer_fatal_error_longjmp_env, 1); \ } while(0) #else #define YY_FATAL_ERROR(msg) do { \ n3_lexer_fatal_error(msg, yyscanner); \ abort(); \ } while(0) #endif static void n3_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner); /* Fatal error handler that returns EOF instead of abort()/longjmp() * so that parser can clean up properly */ #define YY_FATAL_ERROR_EOF(msg) do { \ n3_lexer_fatal_error(msg, yyscanner); \ yyterminate(); \ } while(0) /* Out-of-memory reporting macro */ #define N3_LEXER_OOM() YY_FATAL_ERROR_EOF(n3_lexer_oom_text) static const char n3_lexer_oom_text[]="n3_lexer: Out of memory"; %} /* from SPARQL */ LANGUAGETOKEN [A-Za-z][-A-Z_a-z0-9]* NCCHAR1 [A-Za-z\\\x80-\xff] NCCHAR {NCCHAR1}|"-"|"_"|[0-9] NCNAME_PREFIX {NCCHAR1}(({NCCHAR}|".")*{NCCHAR})? NCNAME ("_"|{NCCHAR1})(({NCCHAR}|".")*{NCCHAR})? QNAME {NCNAME_PREFIX}?":"{NCNAME}? BNAME "_:"{NCNAME} /* similar to SPARQL but no need for <= check here */ QUOTEDURI \<[^\>]*\> DECIMAL [0-9]+"."[0-9]*|"."[0-9]+ DOUBLE [0-9]+"."[0-9]*{EXPONENT}|"."([0-9])+{EXPONENT}|([0-9])+{EXPONENT} EXPONENT [eE][+-]?[0-9]+ %x PREF LITERAL %% /* rules */ %{ raptor_parser *rdf_parser=(raptor_parser*)yyextra; raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; #ifdef HAVE_SETJMP if(setjmp(n3_lexer_fatal_error_longjmp_env)) return 1; #endif %} \r\n|\r|\n { n3_parser->lineno++; } [\ \t\v]+ { /* empty */ } "a" { return A; } "." { return DOT; } "," { return COMMA; } ";" { return SEMICOLON; } "[" { return LEFT_SQUARE; } "]" { return RIGHT_SQUARE; } "@prefix" { BEGIN(PREF); return PREFIX; } "@" { return AT; } "^^" { return HAT; } "(" { return LEFT_ROUND; } ")" { return RIGHT_ROUND; } '([^'\\\n\r]|\\[^\n\r])*' { n3_parser_lval->string=n3_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '\"'); /* ' */ if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_string_token failed"); return STRING_LITERAL; } \"([^"\\\n\r]|\\[^\n\r])*\" { n3_parser_lval->string=n3_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '"'); /* ' */ if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_string_token failed"); return STRING_LITERAL; } \"\"\" { BEGIN(LITERAL); n3_parser->sb=raptor_new_stringbuffer(); if(!n3_parser->sb) N3_LEXER_OOM(); } <LITERAL>\"\"\" { size_t len; BEGIN(INITIAL); len=raptor_stringbuffer_length(n3_parser->sb); n3_parser_lval->string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(!n3_parser_lval->string) N3_LEXER_OOM(); raptor_stringbuffer_copy_to_string(n3_parser->sb, (unsigned char*)n3_parser_lval->string, len); n3_parser_lval->string[len]='\0'; raptor_free_stringbuffer(n3_parser->sb); n3_parser->sb=NULL; return STRING_LITERAL; } <LITERAL>\"|(\\[^uU]|\\u....|\\U........|[^\"]|\n)* { if (*yytext == EOF) { BEGIN(INITIAL); n3_syntax_error(rdf_parser, "End of file in middle of literal"); raptor_free_stringbuffer(n3_parser->sb); n3_parser->sb=NULL; return EOF; } if(raptor_stringbuffer_append_turtle_string(n3_parser->sb, (unsigned char*)yytext, yyleng, '"', (raptor_simple_message_handler)n3_lexer_syntax_error, rdf_parser)) { /* " */ BEGIN(INITIAL); raptor_free_stringbuffer(n3_parser->sb); n3_parser->sb=NULL; YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } } {BNAME} { n3_parser_lval->string=n3_copy_token((unsigned char*)yytext+2, yyleng-2); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); return BLANK_LITERAL; } {QNAME} { n3_parser_lval->uri=n3_qname_to_uri(rdf_parser, (unsigned char*)yytext, yyleng); if(!n3_parser_lval->uri) YY_FATAL_ERROR_EOF("n3_qname_to_uri failed"); return QNAME_LITERAL; } [-+]?{DECIMAL} { n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, yyleng); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); return DECIMAL_LITERAL; } [-+]?{DOUBLE} { double d; int n; n=sscanf((const char*)yytext, "%lf", &d); if(n != 1) { n3_syntax_error(rdf_parser, "N3 syntax error - Illegal floating point constant %s", yytext); yyterminate(); } n3_parser_lval->floating=d; return FLOATING_LITERAL; } [-+]?[0-9]+ { n3_parser_lval->integer=atoi(yytext); return INTEGER_LITERAL; } <PREF>[\ \t\v]+ { /* eat up leading whitespace */ } <PREF>{NCNAME_PREFIX}":" { n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, yyleng); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); BEGIN(INITIAL); return IDENTIFIER; } <PREF>":" { BEGIN(INITIAL); n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, 0); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); return IDENTIFIER; } <PREF>(.|\n) { BEGIN(INITIAL); if (*yytext == EOF) return EOF; n3_syntax_error(rdf_parser, "syntax error at '%c' - @prefix name must end in :", *yytext); yyterminate(); } {QUOTEDURI} { if(yyleng == 2) n3_parser_lval->uri=raptor_uri_copy_v2(rdf_parser->world, rdf_parser->base_uri); else { yytext[yyleng-1]='\0'; n3_parser_lval->uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, rdf_parser->base_uri, (const unsigned char*)yytext+1); if(!n3_parser_lval->uri) YY_FATAL_ERROR_EOF("raptor_new_uri_relative_to_base failed"); } return URI_LITERAL; } {LANGUAGETOKEN} { n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, yyleng); if(!n3_parser_lval->string) YY_FATAL_ERROR_EOF("n3_copy_token failed"); return IDENTIFIER; } \#[^\r\n]*(\r\n|\r|\n) { /* # comment */ n3_parser->lineno++; } \#[^\r\n]* { /* # comment on the last line with no terminating newline */ } . { if (*yytext == EOF) return EOF; n3_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } %% /* user code */ int yywrap (yyscan_t yyscanner) { return 1; } static unsigned char * n3_copy_token(unsigned char *text, size_t len) { unsigned char *s; if(!len) len=strlen((const char*)text); s=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(s) { strncpy((char*)s, (const char*)text, len); s[len] = '\0'; } return s; } static unsigned char * n3_copy_string_token(raptor_parser* rdf_parser, unsigned char *string, size_t len, int delim) { raptor_stringbuffer* sb=NULL; int rc; if(len) { sb=raptor_new_stringbuffer(); if(!sb) return NULL; rc=raptor_stringbuffer_append_turtle_string(sb, string, len, delim, (raptor_simple_message_handler)n3_lexer_syntax_error, rdf_parser); if(rc) { raptor_free_stringbuffer(sb); return NULL; } len=raptor_stringbuffer_length(sb); } string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1); if(string) { if(sb) { raptor_stringbuffer_copy_to_string(sb, string, len+1); } string[len]='\0'; } if(sb) raptor_free_stringbuffer(sb); return string; } void n3_lexer_syntax_error(void* ctx, const char *message, ...) { raptor_parser* rdf_parser=(raptor_parser *)ctx; raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context; va_list arguments; rdf_parser->locator.line=n3_parser->lineno; #ifdef RAPTOR_N3_USE_ERROR_COLUMNS rdf_parser->locator.column=n3_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_error_varargs(((raptor_parser*)rdf_parser), message, arguments); va_end(arguments); } /* * n3_lexer_fatal_error: * @msg: * @yyscanner: * * INTERNAL - replacement for the generated error handler. */ static void n3_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner) { raptor_parser *rdf_parser=NULL; if(yyscanner) rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(rdf_parser) /* avoid "format not a string literal and no format arguments" warning with %s */ raptor_parser_fatal_error(rdf_parser, "%s", msg); else { fputs(msg, stderr); fputc('\n', stderr); } } /* Define LEXER_ALLOC_TRACKING to enable allocated memory tracking * - fixes lexer memory leak when ensure_buffer_stack fails */ #ifdef LEXER_ALLOC_TRACKING typedef struct { /* Number of void* slots allocated */ int lexer_allocs_size; /* Allocted void* slots follow in memory after this header */ } lexer_alloc_tracker_header; /* Initial alloc tracker slot array size - 2 seems to be enough for almost all cases */ static const int initial_lexer_allocs_size=2; #endif /* * n3_lexer_cleanup: * @yyscanner: * * INTERNAL - Clean up unfreed lexer allocs if LEXER_ALLOC_TRACKING is enabled. */ static void n3_lexer_cleanup(yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; if(!yyscanner) return; rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs=(void**)&tracker[1]; for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]) free(lexer_allocs[i]); lexer_allocs[i]=NULL; } free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data=NULL; #endif } /* * n3_lexer_alloc: * @size * @yyscanner * * INTERNAL - alloc replacement. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *n3_lexer_alloc(yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *ptr; /* yyscanner not initialized -> probably initializing yyscanner itself * -> just malloc without tracking */ if(!yyscanner) return malloc(size); rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_alloc: yyscanner extra not initialized"); /* try to allocate tracker if it does not exist */ tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) { /* allocate tracker header + array of void* slots */ tracker=(lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+initial_lexer_allocs_size*sizeof(void*)); if(!tracker) YY_FATAL_ERROR("lexer_alloc: cannot allocate tracker"); tracker->lexer_allocs_size=initial_lexer_allocs_size; rdf_parser->lexer_user_data=(void *)tracker; } lexer_allocs=(void**)&tracker[1]; /* allocate memory */ ptr=malloc(size); /* find a free slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(!lexer_allocs[i]) { lexer_allocs[i]=ptr; break; } } /* no free slots -> grow tracker slot array */ if(i>=tracker->lexer_allocs_size) { int j; void **dest; tracker=(lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+i*2*sizeof(void*)); if(!tracker) { if(ptr) free(ptr); YY_FATAL_ERROR("lexer_alloc: cannot grow tracker"); } tracker->lexer_allocs_size=i*2; /* copy data from old tracker */ dest=(void**)&tracker[1]; for(j=0; j<i; ++j) { dest[j]=lexer_allocs[j]; } /* set new item to first free slot */ dest[j]=ptr; /* free old tracker and replace with new one */ free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data=tracker; } return ptr; #else return malloc(size); #endif } /* * n3_lexer_realloc: * * INTERNAL - realloc replacement * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *n3_lexer_realloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *newptr; if(!yyscanner) YY_FATAL_ERROR("lexer_realloc: yyscanner not initialized"); rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_realloc: yyscanner extra not initialized"); tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) YY_FATAL_ERROR("lexer_realloc: no alloc tracker"); lexer_allocs=(void**)&tracker[1]; /* find the old slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]==ptr) break; } /* no old slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_realloc: cell not in tracker"); /* realloc */ newptr=realloc((char*)ptr, size); /* replace entry in tracker */ lexer_allocs[i]=newptr; return newptr; #else return realloc((char*)ptr, size); #endif } /* * n3_lexer_free: * * INTERNAL - free replacement. * Checks for NULL pointer to be freed unlike the default lexer free function. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void n3_lexer_free(void *ptr, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; /* do not free NULL */ if(!ptr) return; /* free ptr even if we would encounter an error */ free(ptr); /* yyscanner is allocated with n3_lexer_alloc() but it's never stored in the tracker * - we need yyscanner to access the tracker */ if(!yyscanner || ptr==yyscanner) return; rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs=(void**)&tracker[1]; /* find the slot for ptr */ for(i=0; i<tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]==ptr) break; } /* no slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_free: cell not in tracker"); /* remove entry from tracker */ lexer_allocs[i]=NULL; #else if(ptr) free(ptr); #endif } #ifdef RAPTOR_DEBUG const char * n3_token_print(raptor_world* world, int token, YYSTYPE *lval) { static char buffer[2048]; if(!token) return "<<EOF>>"; switch(token) { case PREFIX: return "PREFIX"; case A: return "A"; case DOT: return "DOT"; case COMMA: return "COMMA"; case SEMICOLON: return "SEMICOLON"; case LEFT_SQUARE: return "LEFT_SQUARE"; case RIGHT_SQUARE: return "RIGHT_SQUARE"; case AT: return "AT"; case HAT: return "HAT"; case STRING_LITERAL: sprintf(buffer, "STRING_LITERAL(%s)", lval->string); return buffer; case URI_LITERAL: sprintf(buffer, "URI_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string_v2(world, lval->uri) : "")); return buffer; case BLANK_LITERAL: sprintf(buffer, "BLANK_LITERAL(%s)", lval->string); return buffer; case QNAME_LITERAL: sprintf(buffer, "QNAME_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string_v2(world, lval->uri) : "")); return buffer; case INTEGER_LITERAL: sprintf(buffer, "INTEGER_LITERAL(%d)", lval->integer); return buffer; case FLOATING_LITERAL: sprintf(buffer, "FLOATING_LITERAL(%1g)", lval->floating); return buffer; case IDENTIFIER: sprintf(buffer, "IDENTIFIER(%s)", (lval->string ? (char*)lval->string : "")); return buffer; case DECIMAL_LITERAL: sprintf(buffer, "DECIMAL_LITERAL(%s)", lval->string); return buffer; case ERROR_TOKEN: return "ERROR"; default: RAPTOR_DEBUG2("UNKNOWN token %d - add a new case\n", token); return "(UNKNOWN)"; } } #endif #ifdef STANDALONE static void n3_token_free(int token, YYSTYPE *lval) { if(!token) return; switch(token) { case STRING_LITERAL: case BLANK_LITERAL: case IDENTIFIER: if(lval->string) RAPTOR_FREE(cstring, lval->string); break; case URI_LITERAL: case QNAME_LITERAL: if(lval->uri) raptor_free_uri(lval->uri); break; default: break; } } int main(int argc, char *argv[]) { raptor_parser rdf_parser; raptor_n3_parser n3_parser; yyscan_t scanner; int token=EOF; FILE *fh; YYSTYPE lval; const unsigned char *uri_string; char *filename=NULL; raptor_init(); if(argc > 1) { filename=argv[1]; fh=fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename="<stdin>"; fh=stdin; } memset(&rdf_parser, 0, sizeof(raptor_parser)); memset(&n3_parser, 0, sizeof(raptor_n3_parser)); yylex_init(&n3_parser.scanner); scanner=n3_parser.scanner; n3_lexer_set_in(fh, scanner); n3_lexer_set_extra(&rdf_parser, scanner); /* Initialise enough of the parser and locator to get error messages */ rdf_parser.context=&n3_parser; n3_parser.lineno=1; rdf_parser.locator.file=filename; rdf_parser.locator.column= -1; uri_string=raptor_uri_filename_to_uri_string(filename); rdf_parser.base_uri=raptor_new_uri(uri_string); RAPTOR_FREE(cstring, (void*)uri_string); while(1) { memset(&lval, 0, sizeof(YYSTYPE)); if(n3_lexer_get_text(scanner) != NULL) printf("yyinput '%s'\n", n3_lexer_get_text(scanner)); token=yylex(&lval, scanner); #ifdef RAPTOR_DEBUG printf("token %s\n", n3_token_print(raptor_world_instance(), token, &lval)); /* FIXME */ #else printf("token %d\n", token); #endif n3_token_free(token, &lval); if(!token || token == EOF || token == ERROR_TOKEN) break; } yylex_destroy(scanner); raptor_free_uri(rdf_parser.base_uri); raptor_finish(); if(token == ERROR_TOKEN) return 1; return 0; } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_locator.c������������������������������������������������������������������0000644�0001750�0001750�00000015442�11330672502�014021� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_locator.c - Raptor parsing locator functions * * Copyright (C) 2002-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2006, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef RAPTOR_DISABLE_V1 /** * raptor_print_locator: * @stream: stream to print to * @locator: #raptor_locator to print * * Print a raptor locator to a stream. * * raptor_init() MUST have been called before calling this function. * Use raptor_print_locator_v2() if using raptor_world APIs. **/ void raptor_print_locator(FILE *stream, raptor_locator* locator) { raptor_print_locator_v2(raptor_world_instance(), stream, locator); } #endif /** * raptor_print_locator_v2: * @world: raptor_world object * @stream: stream to print to * @locator: #raptor_locator to print * * Print a raptor locator to a stream. * **/ void raptor_print_locator_v2(raptor_world* world, FILE *stream, raptor_locator* locator) { if(!locator) return; if(locator->uri) fprintf(stream, "URI %s", raptor_uri_as_string_v2(world, locator->uri)); else if (locator->file) fprintf(stream, "file %s", locator->file); else return; if(locator->line >= 0) { fprintf(stream, ":%d", locator->line); if(locator->column >= 0) fprintf(stream, " column %d", locator->column); } } #ifndef RAPTOR_DISABLE_V1 /** * raptor_format_locator: * @buffer: buffer to store format * @length: size of buffer * @locator: #raptor_locator to format * * Format a raptor locator as a string. * * If buffer is NULL or length is insufficient for the size of * the locator, returns the number of additional bytes required * in the buffer to write the locator. * * raptor_init() MUST have been called before calling this function. * Use raptor_format_locator_v2() if using raptor_world APIs. * * Return value: 0 on success, >0 if additional bytes required in buffer, <0 on failure **/ int raptor_format_locator(char *buffer, size_t length, raptor_locator* locator) { return raptor_format_locator_v2(raptor_world_instance(), buffer, length, locator); } #endif /** * raptor_format_locator_v2: * @world: raptor_world object * @buffer: buffer to store format * @length: size of buffer * @locator: #raptor_locator to format * * Format a raptor locator as a string. * * If buffer is NULL or length is insufficient for the size of * the locator, returns the number of additional bytes required * in the buffer to write the locator. * * Return value: 0 on success, >0 if additional bytes required in buffer, <0 on failure **/ int raptor_format_locator_v2(raptor_world* world, char *buffer, size_t length, raptor_locator* locator) { size_t bufsize=0; int count; if(!locator) return -1; if(locator->uri) { size_t uri_len; (void)raptor_uri_as_counted_string_v2(world, locator->uri, &uri_len); bufsize= 4 + uri_len; /* "URI " */ } else if (locator->file) bufsize= 5 + strlen(locator->file); /* "file " */ else return -1; if(locator->line > 0) { bufsize += snprintf(NULL, 0, ":%d", locator->line); if(locator->column >= 0) bufsize += snprintf(NULL, 0, " column %d", locator->column); } if(!buffer || !length || length < bufsize) return bufsize; if(locator->uri) count=sprintf(buffer, "URI %s", raptor_uri_as_string_v2(world, locator->uri)); else if (locator->file) count=sprintf(buffer, "file %s", locator->file); else return -1; buffer+= count; if(locator->line > 0) { count=sprintf(buffer, ":%d", locator->line); if(locator->column >= 0) sprintf(buffer+count, " column %d", locator->column); } return 0; } /** * raptor_locator_line: * @locator: locator * * Get line number from locator. * * Return value: integer line number, or -1 if there is no line number available **/ int raptor_locator_line(raptor_locator *locator) { if (!locator) return -1; return locator->line; } /** * raptor_locator_column: * @locator: locator * * Get column number from locator. * * Return value: integer column number, or -1 if there is no column number available **/ int raptor_locator_column(raptor_locator *locator) { if (!locator) return -1; return locator->column; } /** * raptor_locator_byte: * @locator: locator * * Get the locator byte offset from locator. * * Return value: integer byte number, or -1 if there is no byte offset available **/ int raptor_locator_byte(raptor_locator *locator) { if (!locator) return -1; return locator->byte; } /** * raptor_locator_file: * @locator: locator * * Get file name from locator. * * Return value: string file name, or NULL if there is no filename available **/ const char * raptor_locator_file(raptor_locator *locator) { if (!locator) return NULL; return locator->file; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_locator_uri: * @locator: locator * * Get URI from locator. * * Returns a pointer to a shared string version of the URI in * the locator. This must be copied if it is needed. * * raptor_init() MUST have been called before calling this function. * Use raptor_locator_uri_v2() if using raptor_world APIs. * * Return value: string URI, or NULL if there is no URI available **/ const char * raptor_locator_uri(raptor_locator *locator) { return raptor_locator_uri_v2(raptor_world_instance(), locator); } #endif /** * raptor_locator_uri_v2: * @world: raptor_world object * @locator: locator * * Get URI from locator. * * Returns a pointer to a shared string version of the URI in * the locator. This must be copied if it is needed. * * Return value: string URI, or NULL if there is no URI available **/ const char * raptor_locator_uri_v2(raptor_world* world, raptor_locator *locator) { if (!locator) return NULL; return (const char*)raptor_uri_as_string_v2(world, locator->uri); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_parse.c��������������������������������������������������������������������0000644�0001750�0001750�00000200543�11330672502�013466� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_parse.c - Raptor Parser API * * Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE /* prototypes for helper functions */ static void raptor_free_type_q(raptor_type_q* type_q); /* helper methods */ static void raptor_free_parser_factory(raptor_parser_factory* factory) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(factory, raptor_parser_factory); if(factory->finish_factory) factory->finish_factory(factory); if(factory->name) RAPTOR_FREE(raptor_parser_factory, (void*)factory->name); if(factory->label) RAPTOR_FREE(raptor_parser_factory, (void*)factory->label); if(factory->alias) RAPTOR_FREE(raptor_parser_factory, (void*)factory->alias); if(factory->mime_types) raptor_free_sequence(factory->mime_types); if(factory->uri_string) RAPTOR_FREE(raptor_parser_factory, (void*)factory->uri_string); RAPTOR_FREE(raptor_parser_factory, factory); } /* class methods */ int raptor_parsers_init(raptor_world *world) { int rc=0; world->parsers=raptor_new_sequence((raptor_sequence_free_handler *)raptor_free_parser_factory, NULL); if(!world->parsers) return 1; #ifdef RAPTOR_PARSER_RDFXML rc+= raptor_init_parser_rdfxml(world) != 0; #endif #ifdef RAPTOR_PARSER_NTRIPLES rc+= raptor_init_parser_ntriples(world) != 0; #endif #ifdef RAPTOR_PARSER_N3 rc+= raptor_init_parser_n3(world) != 0; #endif #ifdef RAPTOR_PARSER_TURTLE rc+= raptor_init_parser_turtle(world) != 0; #endif #ifdef RAPTOR_PARSER_TRIG rc+= raptor_init_parser_trig(world) != 0; #endif #ifdef RAPTOR_PARSER_RSS rc+= raptor_init_parser_rss(world) != 0; #endif #if defined(RAPTOR_PARSER_GRDDL) rc+= raptor_init_parser_grddl_common(world) != 0; #ifdef RAPTOR_PARSER_GRDDL rc+= raptor_init_parser_grddl(world) != 0; #endif #endif #ifdef RAPTOR_PARSER_GUESS rc+= raptor_init_parser_guess(world) != 0; #endif #ifdef RAPTOR_PARSER_RDFA rc+= raptor_init_parser_rdfa(world) != 0; #endif return rc; } /* * raptor_finish_parsers - delete all the registered parsers */ void raptor_parsers_finish(raptor_world *world) { if(world->parsers) { raptor_free_sequence(world->parsers); world->parsers=NULL; } #if defined(RAPTOR_PARSER_GRDDL) raptor_terminate_parser_grddl_common(world); #endif } /* * raptor_parser_register_factory: * @name: the short syntax name * @label: readable label for syntax * @mime_type: MIME type of the syntax handled by the parser (or NULL) * @uri_string: URI string of the syntax (or NULL) * @factory: pointer to function to call to register the factory * * Register a syntax handled by a parser factory. * * INTERNAL * **/ RAPTOR_EXTERN_C raptor_parser_factory* raptor_parser_register_factory(raptor_world* world, const char *name, const char *label, int (*factory) (raptor_parser_factory*)) { raptor_parser_factory *parser=NULL; raptor_parser_factory *h; char *name_copy, *label_copy; int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("Received registration for syntax %s '%s'\n", name, label); #endif for(i=0; (h=(raptor_parser_factory*)raptor_sequence_get_at(world->parsers, i)); i++) { if(!strcmp(h->name, name)) { RAPTOR_DEBUG2("parser %s already registered\n", h->name); return NULL; } } parser=(raptor_parser_factory*)RAPTOR_CALLOC(raptor_parser_factory, 1, sizeof(raptor_parser_factory)); if(!parser) return NULL; parser->world=world; name_copy=(char*)RAPTOR_CALLOC(cstring, strlen(name)+1, 1); if(!name_copy) goto tidy; strcpy(name_copy, name); parser->name=name_copy; label_copy=(char*)RAPTOR_CALLOC(cstring, strlen(label)+1, 1); if(!label_copy) goto tidy; strcpy(label_copy, label); parser->label=label_copy; parser->mime_types=raptor_new_sequence((raptor_sequence_free_handler*)raptor_free_type_q, NULL); if(!parser->mime_types) goto tidy; if(raptor_sequence_push(world->parsers, parser)) return NULL; /* on error, parser is already freed by the sequence */ /* Call the parser registration function on the new object */ if (factory(parser)) return NULL; /* parser is owned and freed by the parsers sequence */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("%s has context size %d\n", name, parser->context_length); #endif return parser; /* Clean up on failure */ tidy: raptor_free_parser_factory(parser); return NULL; } int raptor_parser_factory_add_alias(raptor_parser_factory* factory, const char *alias) { raptor_parser_factory *p; char *alias_copy; int i; for(i=0; (p=(raptor_parser_factory*)raptor_sequence_get_at(factory->world->parsers, i)); i++) { if(!strcmp(p->name, alias)) { RAPTOR_DEBUG2("parser %s already registered\n", p->name); return 1; } } alias_copy=(char*)RAPTOR_CALLOC(cstring, strlen(alias)+1, 1); if(!alias_copy) return 1; strcpy(alias_copy, alias); factory->alias=alias_copy; return 0; } static void raptor_free_type_q(raptor_type_q* type_q) { RAPTOR_FREE(cstring, (void*)type_q->mime_type); RAPTOR_FREE(raptor_type_q, (void*)type_q); } /** * raptor_parser_factory_add_mime_type: * @factory: Raptor parser factory * @mime_type: MIME Type string * @q: Accept 'Q' value 0 to 10 inclusive representing 0.0 to 1.0 * * Register a MIME type as handled by a factory. * * The FIRST added MIME type is the default or main one reported. * * Return value: non-0 on failure * **/ int raptor_parser_factory_add_mime_type(raptor_parser_factory* factory, const char* mime_type, int q) { raptor_type_q* type_q; char* mime_type_copy; size_t len; type_q=(raptor_type_q*)RAPTOR_CALLOC(raptor_type_q, sizeof(raptor_type_q), 1); if(!type_q) return 1; len=strlen(mime_type); mime_type_copy=(char*)RAPTOR_CALLOC(cstring, len+1, 1); if(!mime_type_copy) { raptor_free_type_q(type_q); return 1; } strcpy(mime_type_copy, mime_type); type_q->mime_type=mime_type_copy; type_q->mime_type_len=len; if(q<0) q=0; if(q>10) q=10; type_q->q=q; return raptor_sequence_push(factory->mime_types, type_q); } /** * raptor_parser_factory_add_uri: * @factory: Raptor parser factory * @uri_string: URI string * * Register an identifying URI as handled by a factory. * * Return value: non-0 on failure **/ int raptor_parser_factory_add_uri(raptor_parser_factory* factory, const unsigned char *uri_string) { unsigned char *uri_string_copy; if(!uri_string) return 1; uri_string_copy=(unsigned char*)RAPTOR_CALLOC(cstring, strlen((const char*)uri_string)+1, 1); if(!uri_string_copy) return 1; strcpy((char*)uri_string_copy, (const char*)uri_string); factory->uri_string=uri_string_copy; return 0; } /** * raptor_get_parser_factory: * @world: raptor_world object * @name: the factory name or NULL for the default factory * * Get a parser factory by name. * * Return value: the factory object or NULL if there is no such factory **/ raptor_parser_factory* raptor_get_parser_factory(raptor_world *world, const char *name) { raptor_parser_factory *factory; /* return 1st parser if no particular one wanted - why? */ if(!name) { factory=(raptor_parser_factory *)raptor_sequence_get_at(world->parsers, 0); if(!factory) { RAPTOR_DEBUG1("No (default) parsers registered\n"); return NULL; } } else { int i; for(i=0; (factory=(raptor_parser_factory*)raptor_sequence_get_at(world->parsers, i)); i++) { if(!strcmp(factory->name, name) || (factory->alias && !strcmp(factory->alias, name))) break; } /* else FACTORY name not found */ if(!factory) { RAPTOR_DEBUG2("No parser with name %s found\n", name); return NULL; } } return factory; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_syntaxes_enumerate: * @counter: index into the list of syntaxes * @name: pointer to store the name of the syntax (or NULL) * @label: pointer to store syntax readable label (or NULL) * @mime_type: pointer to store syntax MIME Type (or NULL) * @uri_string: pointer to store syntax URI string (or NULL) * * Get information on syntaxes. * * raptor_init() MUST have been called before calling this function. * Use raptor_syntaxes_enumerate_v2() if using raptor_world APIs. * * Return value: non 0 on failure of if counter is out of range **/ int raptor_syntaxes_enumerate(const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string) { return raptor_syntaxes_enumerate_v2(raptor_world_instance(), counter, name, label, mime_type, uri_string); } #endif /** * raptor_syntaxes_enumerate_v2: * @world: raptor_world object * @counter: index into the list of syntaxes * @name: pointer to store the name of the syntax (or NULL) * @label: pointer to store syntax readable label (or NULL) * @mime_type: pointer to store syntax MIME Type (or NULL) * @uri_string: pointer to store syntax URI string (or NULL) * * Get information on syntaxes. * * Return value: non 0 on failure of if counter is out of range **/ int raptor_syntaxes_enumerate_v2(raptor_world* world, const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string) { raptor_parser_factory *factory; factory=(raptor_parser_factory*)raptor_sequence_get_at(world->parsers, counter); if(!factory) return 1; if(name) *name=factory->name; if(label) *label=factory->label; if(mime_type) { const char *mime_type_t=NULL; if(factory->mime_types) { raptor_type_q* tq; tq=(raptor_type_q*)raptor_sequence_get_at(factory->mime_types, 0); if(tq) mime_type_t=tq->mime_type; } *mime_type=mime_type_t; } if(uri_string) *uri_string=factory->uri_string; return 0; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_parsers_enumerate: * @counter: index to list of parsers * @name: pointer to store syntax name (or NULL) * @label: pointer to store syntax label (or NULL) * * Get list of syntax parsers. * * Return value: non 0 on failure of if counter is out of range **/ int raptor_parsers_enumerate(const unsigned int counter, const char **name, const char **label) { return raptor_syntaxes_enumerate(counter, name, label, NULL, NULL); } /** * raptor_syntax_name_check: * @name: the syntax name * * Check name of a parser. * * raptor_init() MUST have been called before calling this function. * Use raptor_syntax_name_check_v2() if using raptor_world APIs. * * Return value: non 0 if name is a known syntax name */ int raptor_syntax_name_check(const char *name) { return raptor_syntax_name_check_v2(raptor_world_instance(), name); } #endif /** * raptor_syntax_name_check_v2: * @world: raptor_world object * @name: the syntax name * * Check name of a parser. * * Return value: non 0 if name is a known syntax name */ int raptor_syntax_name_check_v2(raptor_world* world, const char *name) { return (raptor_get_parser_factory(world, name) != NULL); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_parser: * @name: the parser name * * Constructor - create a new raptor_parser object. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_parser_v2() if using raptor_world APIs. * * Return value: a new #raptor_parser object or NULL on failure */ raptor_parser* raptor_new_parser(const char *name) { return raptor_new_parser_v2(raptor_world_instance(), name); } #endif /** * raptor_new_parser_v2: * @world: raptor_world object * @name: the parser name * * Constructor - create a new raptor_parser object. * * Return value: a new #raptor_parser object or NULL on failure */ raptor_parser* raptor_new_parser_v2(raptor_world* world, const char *name) { raptor_parser_factory* factory; raptor_parser* rdf_parser; factory=raptor_get_parser_factory(world, name); if(!factory) return NULL; rdf_parser=(raptor_parser*)RAPTOR_CALLOC(raptor_parser, 1, sizeof(raptor_parser)); if(!rdf_parser) return NULL; rdf_parser->world=world; rdf_parser->context=(char*)RAPTOR_CALLOC(raptor_parser_context, 1, factory->context_length); if(!rdf_parser->context) { raptor_free_parser(rdf_parser); return NULL; } #ifdef RAPTOR_XML_LIBXML rdf_parser->magic=RAPTOR_LIBXML_MAGIC; #endif rdf_parser->factory=factory; rdf_parser->failed=0; rdf_parser->error_handlers.locator=&rdf_parser->locator; rdf_parser->error_handlers.last_log_level=RAPTOR_LOG_LEVEL_LAST; raptor_error_handlers_init_v2(rdf_parser->world, &rdf_parser->error_handlers); /* Initialise default (lax) feature values */ raptor_set_parser_strict(rdf_parser, 0); if(factory->init(rdf_parser, name)) { raptor_free_parser(rdf_parser); return NULL; } return rdf_parser; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_parser_for_content: * @uri: URI identifying the syntax (or NULL) * @mime_type: mime type identifying the content (or NULL) * @buffer: buffer of content to guess (or NULL) * @len: length of buffer * @identifier: identifier of content (or NULL) * * Constructor - create a new raptor_parser. * * Uses raptor_guess_parser_name() to find a parser by scoring * recognition of the syntax by a block of characters, the content * identifier or a mime type. The content identifier is typically a * filename or URI or some other identifier. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_parser_for_content_v2() if using raptor_world APIs. * * Return value: a new #raptor_parser object or NULL on failure **/ raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier) { return raptor_new_parser_for_content_v2(raptor_world_instance(), uri, mime_type, buffer, len, identifier); } #endif /** * raptor_new_parser_for_content_v2: * @world: raptor_world object * @uri: URI identifying the syntax (or NULL) * @mime_type: mime type identifying the content (or NULL) * @buffer: buffer of content to guess (or NULL) * @len: length of buffer * @identifier: identifier of content (or NULL) * * Constructor - create a new raptor_parser. * * Uses raptor_guess_parser_name() to find a parser by scoring * recognition of the syntax by a block of characters, the content * identifier or a mime type. The content identifier is typically a * filename or URI or some other identifier. * * Return value: a new #raptor_parser object or NULL on failure **/ raptor_parser* raptor_new_parser_for_content_v2(raptor_world* world, raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier) { return raptor_new_parser_v2(world, raptor_guess_parser_name_v2(world, uri, mime_type, buffer, len, identifier)); } /** * raptor_start_parse: * @rdf_parser: RDF parser * @uri: base URI or may be NULL if no base URI is required * * Start a parse of content with base URI. * * Parsers that need a base URI can be tested with raptor_get_need_base_uri(). * * Return value: non-0 on failure, <0 if a required base URI was missing **/ int raptor_start_parse(raptor_parser *rdf_parser, raptor_uri *uri) { if(rdf_parser->factory->need_base_uri && !uri) { raptor_parser_error(rdf_parser, "Missing base URI for %s parser.", rdf_parser->factory->name); return -1; } if(uri) uri=raptor_uri_copy_v2(rdf_parser->world, uri); if(rdf_parser->base_uri) raptor_free_uri_v2(rdf_parser->world, rdf_parser->base_uri); rdf_parser->base_uri=uri; rdf_parser->locator.uri = uri; rdf_parser->locator.line = -1; rdf_parser->locator.column = -1; rdf_parser->locator.byte = -1; if(rdf_parser->factory->start) return rdf_parser->factory->start(rdf_parser); else return 0; } /** * raptor_parse_chunk: * @rdf_parser: RDF parser * @buffer: content to parse * @len: length of buffer * @is_end: non-0 if this is the end of the content (such as EOF) * * Parse a block of content into triples. * * This method can only be called after raptor_start_parse has * initialised the parser. * * Return value: non-0 on failure. **/ int raptor_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end) { if(rdf_parser->sb) raptor_stringbuffer_append_counted_string(rdf_parser->sb, buffer, len, 1); return rdf_parser->factory->chunk(rdf_parser, buffer, len, is_end); } /** * raptor_free_parser: * @parser: #raptor_parser object * * Destructor - destroy a raptor_parser object. * **/ void raptor_free_parser(raptor_parser* rdf_parser) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(rdf_parser, raptor_parser); if(rdf_parser->factory) rdf_parser->factory->terminate(rdf_parser); if(rdf_parser->www) raptor_www_free(rdf_parser->www); if(rdf_parser->context) RAPTOR_FREE(raptor_parser_context, rdf_parser->context); if(rdf_parser->base_uri) raptor_free_uri_v2(rdf_parser->world, rdf_parser->base_uri); if(rdf_parser->default_generate_id_handler_prefix) RAPTOR_FREE(cstring, rdf_parser->default_generate_id_handler_prefix); if(rdf_parser->sb) raptor_free_stringbuffer(rdf_parser->sb); if(rdf_parser->cache_control) RAPTOR_FREE(cstring, rdf_parser->cache_control); if(rdf_parser->user_agent) RAPTOR_FREE(cstring, rdf_parser->user_agent); RAPTOR_FREE(raptor_parser, rdf_parser); } /* Size of XML buffer to use when reading from a file */ #define RAPTOR_READ_BUFFER_SIZE 4096 /** * raptor_parse_file_stream: * @rdf_parser: parser * @stream: FILE* of RDF content * @filename: filename of content or NULL if it has no name * @base_uri: the base URI to use * * Parse RDF content from a FILE*. * * After draining the stream, fclose is not called on it internally. * * Return value: non 0 on failure **/ int raptor_parse_file_stream(raptor_parser* rdf_parser, FILE *stream, const char* filename, raptor_uri *base_uri) { /* Read buffer */ unsigned char buffer[RAPTOR_READ_BUFFER_SIZE+1]; int rc=0; raptor_locator *locator=&rdf_parser->locator; if(!stream || !base_uri) return 1; locator->line= locator->column = -1; locator->file= filename; if(raptor_start_parse(rdf_parser, base_uri)) return 1; while(!feof(stream)) { int len=fread(buffer, 1, RAPTOR_READ_BUFFER_SIZE, stream); int is_end=(len < RAPTOR_READ_BUFFER_SIZE); buffer[len] = '\0'; rc=raptor_parse_chunk(rdf_parser, buffer, len, is_end); if(rc || is_end) break; } return (rc != 0); } /** * raptor_parse_file: * @rdf_parser: parser * @uri: URI of RDF content or NULL to read from standard input * @base_uri: the base URI to use (or NULL if the same) * * Parse RDF content at a file URI. * * If uri is NULL (source is stdin), then the base_uri is required. * * Return value: non 0 on failure **/ int raptor_parse_file(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri) { int rc=0; int free_base_uri=0; const char *filename=NULL; FILE *fh=NULL; #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) struct stat buf; #endif if(uri) { filename=raptor_uri_uri_string_to_filename(raptor_uri_as_string_v2(rdf_parser->world, uri)); if(!filename) return 1; #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) if(!stat(filename, &buf) && S_ISDIR(buf.st_mode)) { raptor_parser_error(rdf_parser, "Cannot read from a directory '%s'", filename); goto cleanup; } #endif fh = fopen(filename, "r"); if(!fh) { raptor_parser_error(rdf_parser, "file '%s' open failed - %s", filename, strerror(errno)); goto cleanup; } if(!base_uri) { base_uri=raptor_uri_copy_v2(rdf_parser->world, uri); free_base_uri=1; } } else { if(!base_uri) return 1; fh=stdin; } rc=raptor_parse_file_stream(rdf_parser, fh, filename, base_uri); cleanup: if(uri) { if(fh) fclose(fh); RAPTOR_FREE(cstring, (void*)filename); } if(free_base_uri) raptor_free_uri_v2(rdf_parser->world, base_uri); return rc; } void raptor_parse_uri_write_bytes(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb) { raptor_parse_bytes_context* rpbc=(raptor_parse_bytes_context*)userdata; int len=size*nmemb; if(!rpbc->started) { raptor_uri* base_uri=rpbc->base_uri; if(!base_uri) { rpbc->final_uri=raptor_www_get_final_uri(www); /* base URI after URI resolution is finally chosen */ base_uri = rpbc->final_uri ? rpbc->final_uri : www->uri; } if(raptor_start_parse(rpbc->rdf_parser, base_uri)) raptor_www_abort(www, "Parsing failed"); rpbc->started=1; } if(raptor_parse_chunk(rpbc->rdf_parser, (unsigned char*)ptr, len, 0)) raptor_www_abort(www, "Parsing failed"); } static void raptor_parse_uri_content_type_handler(raptor_www* www, void* userdata, const char* content_type) { raptor_parser* rdf_parser=(raptor_parser*)userdata; if(rdf_parser->factory->content_type_handler) rdf_parser->factory->content_type_handler(rdf_parser, content_type); } int raptor_parse_uri_no_net_filter(void *user_data, raptor_uri* uri) { raptor_parser* rdf_parser=(raptor_parser*)user_data; unsigned char* uri_string=raptor_uri_as_string_v2(rdf_parser->world, uri); if(raptor_uri_uri_string_is_file_uri(uri_string)) return 0; raptor_parser_error((raptor_parser*)user_data, "Network fetch of URI '%s' denied", uri_string); return 1; } /** * raptor_parse_uri: * @rdf_parser: parser * @uri: URI of RDF content * @base_uri: the base URI to use (or NULL if the same) * * Parse the RDF content at URI. * * Sends an HTTP Accept: header whent the URI is of the HTTP protocol, * see raptor_parse_uri_with_connection() for details including * how the @base_uri is used. * * Return value: non 0 on failure **/ int raptor_parse_uri(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri) { return raptor_parse_uri_with_connection(rdf_parser, uri, base_uri, NULL); } /** * raptor_parse_uri_with_connection: * @rdf_parser: parser * @uri: URI of RDF content * @base_uri: the base URI to use (or NULL if the same) * @connection: connection object pointer or NULL to create a new one * * Parse RDF content at URI using existing WWW connection. * * If @base_uri is not given and during resolution of the URI, a * protocol redirection occurs, the final resolved URI will be * used as the base URI. If redirection does not occur, the * base URI will be @uri. * * If @base_uri is given, it overrides the process above. * * When @connection is NULL and a MIME Type exists for the parser * type - such as returned by raptor_get_mime_type(parser) - this * type is sent in an HTTP Accept: header in the form * Accept: MIME-TYPE along with a wildcard of 0.1 quality, so MIME-TYPE is * prefered rather than the sole answer. The latter part may not be * necessary but should ensure an HTTP 200 response. * * Return value: non 0 on failure **/ int raptor_parse_uri_with_connection(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection) { int ret=0; raptor_parse_bytes_context rpbc; if(connection) { if(rdf_parser->www) raptor_www_free(rdf_parser->www); rdf_parser->www=raptor_www_new_with_connection_v2(rdf_parser->world, connection); if(!rdf_parser->www) return 1; } else { const char *accept_h; if(rdf_parser->www) raptor_www_free(rdf_parser->www); rdf_parser->www=raptor_www_new_v2(rdf_parser->world); if(!rdf_parser->www) return 1; accept_h=raptor_parser_get_accept_header(rdf_parser); if(accept_h) { raptor_www_set_http_accept(rdf_parser->www, accept_h); RAPTOR_FREE(cstring, accept_h); } } rpbc.rdf_parser=rdf_parser; rpbc.base_uri=base_uri; rpbc.final_uri=NULL; rpbc.started=0; if(rdf_parser->uri_filter) raptor_www_set_uri_filter(rdf_parser->www, rdf_parser->uri_filter, rdf_parser->uri_filter_user_data); else if(rdf_parser->features[RAPTOR_FEATURE_NO_NET]) raptor_www_set_uri_filter(rdf_parser->www, raptor_parse_uri_no_net_filter, rdf_parser); raptor_www_set_error_handler(rdf_parser->www, rdf_parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].handler, rdf_parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].user_data); raptor_www_set_write_bytes_handler(rdf_parser->www, raptor_parse_uri_write_bytes, &rpbc); raptor_www_set_content_type_handler(rdf_parser->www, raptor_parse_uri_content_type_handler, rdf_parser); raptor_www_set_http_cache_control(rdf_parser->www, rdf_parser->cache_control); if(rdf_parser->user_agent) raptor_www_set_user_agent(rdf_parser->www, rdf_parser->user_agent); ret=raptor_www_fetch(rdf_parser->www, uri); if(!rpbc.started && !ret) ret=raptor_start_parse(rdf_parser, base_uri); if(rpbc.final_uri) raptor_free_uri_v2(rdf_parser->world, rpbc.final_uri); if(ret) { raptor_www_free(rdf_parser->www); rdf_parser->www=NULL; return 1; } if(raptor_parse_chunk(rdf_parser, NULL, 0, 1)) rdf_parser->failed=1; raptor_www_free(rdf_parser->www); rdf_parser->www=NULL; return rdf_parser->failed; } /* * raptor_parser_fatal_error - Fatal Error from a parser - Internal */ void raptor_parser_fatal_error(raptor_parser* parser, const char *message, ...) { va_list arguments; parser->failed=1; va_start(arguments, message); if(parser) raptor_log_error_varargs(parser->world, RAPTOR_LOG_LEVEL_FATAL, parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_FATAL].handler, parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_FATAL].user_data, &parser->locator, message, arguments); else raptor_log_error_varargs(NULL, RAPTOR_LOG_LEVEL_FATAL, NULL, NULL, NULL, message, arguments); va_end(arguments); } /* * raptor_parser_error - Error from a parser - Internal */ void raptor_parser_error(raptor_parser* parser, const char *message, ...) { va_list arguments; va_start(arguments, message); raptor_parser_error_varargs(parser, message, arguments); va_end(arguments); } /* * raptor_parser_simple_error - Error from a parser - Internal * * Matches the raptor_simple_message_handler API but same as * raptor_parser_error */ void raptor_parser_simple_error(void* user_data, const char *message, ...) { raptor_parser* parser=(raptor_parser*)user_data; va_list arguments; va_start(arguments, message); if(parser) raptor_log_error_varargs(parser->world, RAPTOR_LOG_LEVEL_ERROR, parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].handler, parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].user_data, &parser->locator, message, arguments); else raptor_log_error_varargs(NULL, RAPTOR_LOG_LEVEL_ERROR, NULL, NULL, NULL, message, arguments); va_end(arguments); } /** * raptor_parser_error_varargs: * @parser: parser * @message: error format message * @arguments: varargs for message * * Error from a parser - Internal. */ void raptor_parser_error_varargs(raptor_parser* parser, const char *message, va_list arguments) { if(parser) raptor_log_error_varargs(parser->world, RAPTOR_LOG_LEVEL_ERROR, parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].handler, parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].user_data, &parser->locator, message, arguments); else raptor_log_error_varargs(NULL, RAPTOR_LOG_LEVEL_ERROR, NULL, NULL, NULL, message, arguments); } /* * raptor_parser_warning - Warning from a parser - Internal */ void raptor_parser_warning(raptor_parser* parser, const char *message, ...) { va_list arguments; va_start(arguments, message); if(parser) raptor_log_error_varargs(parser->world, RAPTOR_LOG_LEVEL_WARNING, parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_WARNING].handler, parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_WARNING].user_data, &parser->locator, message, arguments); else raptor_log_error_varargs(NULL, RAPTOR_LOG_LEVEL_WARNING, NULL, NULL, NULL, message, arguments); va_end(arguments); } /* PUBLIC FUNCTIONS */ /** * raptor_set_fatal_error_handler: * @parser: the parser * @user_data: user data to pass to function * @handler: pointer to the function * * Set the parser error handling function. * * The function will receive callbacks when the parser fails. * **/ void raptor_set_fatal_error_handler(raptor_parser* parser, void *user_data, raptor_message_handler handler) { parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_FATAL].user_data=user_data; parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_FATAL].handler=handler; } /** * raptor_set_error_handler: * @parser: the parser * @user_data: user data to pass to function * @handler: pointer to the function * * Set the parser error handling function. * * The function will receive callbacks when the parser fails. * **/ void raptor_set_error_handler(raptor_parser* parser, void *user_data, raptor_message_handler handler) { parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].user_data=user_data; parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].handler=handler; } /** * raptor_set_warning_handler: * @parser: the parser * @user_data: user data to pass to function * @handler: pointer to the function * * Set the parser warning handling function. * * The function will receive callbacks when the parser gives a warning. * **/ void raptor_set_warning_handler(raptor_parser* parser, void *user_data, raptor_message_handler handler) { parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_WARNING].user_data=user_data; parser->error_handlers.handlers[RAPTOR_LOG_LEVEL_WARNING].handler=handler; } /** * raptor_set_statement_handler: * @parser: #raptor_parser parser object * @user_data: user data pointer for callback * @handler: new statement callback function * * Set the statement handler function for the parser. * **/ void raptor_set_statement_handler(raptor_parser* parser, void *user_data, raptor_statement_handler handler) { parser->user_data=user_data; parser->statement_handler=handler; } /** * raptor_set_graph_handler: * @parser: #raptor_parser parser object * @user_data: user data pointer for callback * @handler: new graph callback function * * Set the graph handler function for the parser. * **/ void raptor_set_graph_handler(raptor_parser* parser, void *user_data, raptor_graph_handler handler) { parser->user_data=user_data; parser->graph_handler=handler; } /** * raptor_set_generate_id_handler: * @parser: #raptor_parser parser object * @user_data: user data pointer for callback * @handler: generate ID callback function * * Set the generate ID handler function for the parser. * * Sets the function to generate IDs for the parser. The handler is * called with the @user_data parameter and an ID type of either * RAPTOR_GENID_TYPE_BNODEID or RAPTOR_GENID_TYPE_BAGID (latter is deprecated). * * The final argument of the callback method is user_bnodeid, the value of * the rdf:nodeID attribute that the user provided if any (or NULL). * It can either be returned directly as the generated value when present or * modified. The passed in value must be free()d if it is not used. * * If handler is NULL, the default method is used * **/ void raptor_set_generate_id_handler(raptor_parser* parser, void *user_data, raptor_generate_id_handler handler) { parser->generate_id_handler_user_data=user_data; parser->generate_id_handler=handler; } /** * raptor_set_namespace_handler: * @parser: #raptor_parser parser object * @user_data: user data pointer for callback * @handler: new namespace callback function * * Set the namespace handler function for the parser. * * When a prefix/namespace is seen in a parser, call the given * @handler with the prefix string and the #raptor_uri namespace URI. * Either can be NULL for the default prefix or default namespace. * * The handler function does not deal with duplicates so any * namespace may be declared multiple times. * **/ void raptor_set_namespace_handler(raptor_parser* parser, void *user_data, raptor_namespace_handler handler) { parser->namespace_handler=handler; parser->namespace_handler_user_data=user_data; } /** * raptor_parser_set_uri_filter: * @parser: parser object * @filter: URI filter function * @user_data: User data to pass to filter function * * Set URI filter function for WWW retrieval. **/ void raptor_parser_set_uri_filter(raptor_parser* parser, raptor_uri_filter_func filter, void *user_data) { parser->uri_filter=filter; parser->uri_filter_user_data=user_data; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_features_enumerate: * @feature: feature enumeration (0+) * @name: pointer to store feature short name (or NULL) * @uri: pointer to store feature URI (or NULL) * @label: pointer to feature label (or NULL) * * Get list of syntax features. * * If uri is not NULL, a pointer to a new raptor_uri is returned * that must be freed by the caller with raptor_free_uri(). * * raptor_init() MUST have been called before calling this function. * Use raptor_features_enumerate_v2() if using raptor_world APIs. * * Return value: 0 on success, <0 on failure, >0 if feature is unknown **/ int raptor_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label) { return raptor_features_enumerate_v2(raptor_world_instance(), feature, name, uri, label); } #endif /** * raptor_features_enumerate_v2: * @world: raptor_world object * @feature: feature enumeration (0+) * @name: pointer to store feature short name (or NULL) * @uri: pointer to store feature URI (or NULL) * @label: pointer to feature label (or NULL) * * Get list of syntax features. * * If uri is not NULL, a pointer to a new raptor_uri is returned * that must be freed by the caller with raptor_free_uri_v2(). * * Return value: 0 on success, <0 on failure, >0 if feature is unknown **/ int raptor_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label) { return raptor_features_enumerate_common(world, feature, name, uri, label, 1); } /** * raptor_set_feature: * @parser: #raptor_parser parser object * @feature: feature to set from enumerated #raptor_feature values * @value: integer feature value (0 or larger) * * Set various parser features. * * The allowed features are available via raptor_features_enumerate(). * * Return value: non 0 on failure or if the feature is unknown **/ int raptor_set_feature(raptor_parser *parser, raptor_feature feature, int value) { if(value < 0) return -1; switch(feature) { case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_NO_NET: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: parser->features[(int)feature]=value; break; case RAPTOR_FEATURE_ASSUME_IS_RDF: break; case RAPTOR_FEATURE_WRITE_BASE_URI: case RAPTOR_FEATURE_RELATIVE_URIS: case RAPTOR_FEATURE_START_URI: case RAPTOR_FEATURE_WRITER_AUTO_INDENT: case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: case RAPTOR_FEATURE_WRITER_XML_VERSION: case RAPTOR_FEATURE_WRITER_XML_DECLARATION: case RAPTOR_FEATURE_RESOURCE_BORDER: case RAPTOR_FEATURE_LITERAL_BORDER: case RAPTOR_FEATURE_BNODE_BORDER: case RAPTOR_FEATURE_RESOURCE_FILL: case RAPTOR_FEATURE_LITERAL_FILL: case RAPTOR_FEATURE_BNODE_FILL: case RAPTOR_FEATURE_JSON_CALLBACK: case RAPTOR_FEATURE_JSON_EXTRA_DATA: case RAPTOR_FEATURE_RSS_TRIPLES: case RAPTOR_FEATURE_ATOM_ENTRY_URI: case RAPTOR_FEATURE_PREFIX_ELEMENTS: case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: return -1; break; } return 0; } /** * raptor_parser_set_feature_string: * @parser: #raptor_parser parser object * @feature: feature to set from enumerated #raptor_feature values * @value: feature value * * Set parser features with string values. * * The allowed features are available via raptor_features_enumerate(). * If the feature type is integer, the value is interpreted as an integer. * * Return value: non 0 on failure or if the feature is unknown **/ int raptor_parser_set_feature_string(raptor_parser *parser, raptor_feature feature, const unsigned char *value) { int value_is_string=(raptor_feature_value_type(feature) == 1); if(!value_is_string) return raptor_set_feature(parser, feature, atoi((const char*)value)); if((feature == RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL) || (feature == RAPTOR_FEATURE_WWW_HTTP_USER_AGENT)) { char *value_copy; size_t len=0; if(value) len=strlen((const char*)value); value_copy=(char*)RAPTOR_MALLOC(cstring, len+1); if(!value_copy) return 1; if(len) strncpy(value_copy, (const char*)value, len); value_copy[len]='\0'; if(feature == RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL) parser->cache_control=value_copy; else parser->user_agent=value_copy; return 0; } return -1; } /** * raptor_get_feature: * @parser: #raptor_parser parser object * @feature: feature to get value * * Get various parser features. * * The allowed features are available via raptor_features_enumerate(). * * Note: no feature value is negative * * Return value: feature value or < 0 for an illegal feature **/ int raptor_get_feature(raptor_parser *parser, raptor_feature feature) { int result= -1; switch(feature) { case RAPTOR_FEATURE_SCANNING: case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: case RAPTOR_FEATURE_ALLOW_BAGID: case RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_FEATURE_NORMALIZE_LANGUAGE: case RAPTOR_FEATURE_NON_NFC_FATAL: case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: case RAPTOR_FEATURE_CHECK_RDF_ID: case RAPTOR_FEATURE_NO_NET: case RAPTOR_FEATURE_HTML_TAG_SOUP: case RAPTOR_FEATURE_MICROFORMATS: case RAPTOR_FEATURE_HTML_LINK: case RAPTOR_FEATURE_WWW_TIMEOUT: result = parser->features[(int)feature]; break; case RAPTOR_FEATURE_ASSUME_IS_RDF: result=0; break; /* serializing features */ case RAPTOR_FEATURE_WRITE_BASE_URI: case RAPTOR_FEATURE_RELATIVE_URIS: case RAPTOR_FEATURE_START_URI: case RAPTOR_FEATURE_RESOURCE_BORDER: case RAPTOR_FEATURE_LITERAL_BORDER: case RAPTOR_FEATURE_BNODE_BORDER: case RAPTOR_FEATURE_RESOURCE_FILL: case RAPTOR_FEATURE_LITERAL_FILL: case RAPTOR_FEATURE_BNODE_FILL: case RAPTOR_FEATURE_JSON_CALLBACK: case RAPTOR_FEATURE_JSON_EXTRA_DATA: case RAPTOR_FEATURE_RSS_TRIPLES: case RAPTOR_FEATURE_ATOM_ENTRY_URI: case RAPTOR_FEATURE_PREFIX_ELEMENTS: /* XML writer features */ case RAPTOR_FEATURE_WRITER_AUTO_INDENT: case RAPTOR_FEATURE_WRITER_AUTO_EMPTY: case RAPTOR_FEATURE_WRITER_INDENT_WIDTH: case RAPTOR_FEATURE_WRITER_XML_VERSION: case RAPTOR_FEATURE_WRITER_XML_DECLARATION: /* WWW features */ case RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: case RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: default: break; } return result; } /** * raptor_parser_get_feature_string: * @parser: #raptor_parser parser object * @feature: feature to get value * * Get parser features with string values. * * The allowed features are available via raptor_features_enumerate(). * If a string is returned, it must be freed by the caller. * * Return value: feature value or NULL for an illegal feature or no value **/ const unsigned char * raptor_parser_get_feature_string(raptor_parser *parser, raptor_feature feature) { int value_is_string=(raptor_feature_value_type(feature) == 1); if(!value_is_string) return NULL; return NULL; } /** * raptor_set_parser_strict: * @rdf_parser: #raptor_parser object * @is_strict: Non 0 for strict parsing * * Set parser to strict / lax mode. * **/ void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_strict) { is_strict=(is_strict) ? 1 : 0; /* Initialise default parser mode */ rdf_parser->features[RAPTOR_FEATURE_SCANNING]=0; rdf_parser->features[RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES]=!is_strict; rdf_parser->features[RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES]=!is_strict; rdf_parser->features[RAPTOR_FEATURE_ALLOW_BAGID]=!is_strict; rdf_parser->features[RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST]=0; rdf_parser->features[RAPTOR_FEATURE_NORMALIZE_LANGUAGE]=1; rdf_parser->features[RAPTOR_FEATURE_NON_NFC_FATAL]=is_strict; rdf_parser->features[RAPTOR_FEATURE_WARN_OTHER_PARSETYPES]=!is_strict; rdf_parser->features[RAPTOR_FEATURE_CHECK_RDF_ID]=1; rdf_parser->features[RAPTOR_FEATURE_HTML_TAG_SOUP]=!is_strict; rdf_parser->features[RAPTOR_FEATURE_MICROFORMATS]=!is_strict; rdf_parser->features[RAPTOR_FEATURE_HTML_LINK]=!is_strict; } /** * raptor_set_default_generate_id_parameters: * @rdf_parser: #raptor_parser object * @prefix: prefix string * @base: integer base identifier * * Set default ID generation parameters. * * Sets the parameters for the default algorithm used to generate IDs. * The default algorithm uses both @prefix and @base to generate a new * identifier. The exact identifier generated is not guaranteed to * be a strict concatenation of @prefix and @base but will use both * parts. The @prefix parameter is copied to generate an ID. * * For finer control of the generated identifiers, use * raptor_set_default_generate_id_handler(). * * If @prefix is NULL, the default prefix is used (currently "genid") * If @base is less than 1, it is initialised to 1. * **/ void raptor_set_default_generate_id_parameters(raptor_parser* rdf_parser, char *prefix, int base) { char *prefix_copy=NULL; size_t length=0; if(--base<0) base=0; if(prefix) { length=strlen(prefix); prefix_copy=(char*)RAPTOR_MALLOC(cstring, length+1); if(!prefix_copy) return; strcpy(prefix_copy, prefix); } if(rdf_parser->default_generate_id_handler_prefix) RAPTOR_FREE(cstring, rdf_parser->default_generate_id_handler_prefix); rdf_parser->default_generate_id_handler_prefix=prefix_copy; rdf_parser->default_generate_id_handler_prefix_length=length; rdf_parser->default_generate_id_handler_base=base; } /** * raptor_get_name: * @rdf_parser: #raptor_parser parser object * * Get the name of a parser. * * Return value: the short name for the parser. **/ const char* raptor_get_name(raptor_parser *rdf_parser) { if(rdf_parser->factory->get_name) return rdf_parser->factory->get_name(rdf_parser); else return rdf_parser->factory->name; } /** * raptor_get_label: * @rdf_parser: #raptor_parser parser object * * Get a descriptive label of a parser. * * Return value: a readable label for the parser. **/ const char* raptor_get_label(raptor_parser *rdf_parser) { return rdf_parser->factory->label; } /** * raptor_get_mime_type: * @rdf_parser: #raptor_parser parser object * * Return MIME type for the parser. * * Return value: MIME type or NULL if none available **/ const char* raptor_get_mime_type(raptor_parser *rdf_parser) { const char *mime_type=NULL; if(rdf_parser->factory->mime_types) { raptor_type_q* tq; tq=(raptor_type_q*)raptor_sequence_get_at(rdf_parser->factory->mime_types, 0); if(tq) mime_type=tq->mime_type; } return mime_type; } /** * raptor_get_need_base_uri: * @rdf_parser: #raptor_parser parser object * * Get a boolean whether this parser needs a base URI to start parsing. * * Return value: non-0 if this parser needs a base URI **/ int raptor_get_need_base_uri(raptor_parser *rdf_parser) { return rdf_parser->factory->need_base_uri; } /** * raptor_parse_abort: * @rdf_parser: #raptor_parser parser object * * Abort an ongoing parse. * * Causes any ongoing generation of statements by a parser to be * terminated and the parser to return controlto the application * as soon as draining any existing buffers. * * Most useful inside raptor_parse_file or raptor_parse_uri when * the Raptor library is directing the parsing and when one of the * callback handlers such as as set by raptor_set_statement_handler * requires to return to the main application code. **/ void raptor_parse_abort(raptor_parser *rdf_parser) { rdf_parser->failed=1; } static unsigned char* raptor_default_generate_id_handler(void *user_data, raptor_genid_type type, unsigned char *user_bnodeid) { raptor_parser *rdf_parser=(raptor_parser *)user_data; int id; unsigned char *buffer; int length; int tmpid; if(user_bnodeid) return user_bnodeid; id=++rdf_parser->default_generate_id_handler_base; tmpid=id; length=2; /* min length 1 + \0 */ while(tmpid/=10) length++; if(rdf_parser->default_generate_id_handler_prefix) length += rdf_parser->default_generate_id_handler_prefix_length; else length += 5; /* genid */ buffer=(unsigned char*)RAPTOR_MALLOC(cstring, length); if(!buffer) return NULL; if(rdf_parser->default_generate_id_handler_prefix) { strncpy((char*)buffer, rdf_parser->default_generate_id_handler_prefix, rdf_parser->default_generate_id_handler_prefix_length); sprintf((char*)buffer+rdf_parser->default_generate_id_handler_prefix_length, "%d", id); } else sprintf((char*)buffer, "genid%d", id); return buffer; } /** * raptor_parser_generate_id: * @rdf_parser: #raptor_parser parser object * @type: Type of ID to generate * * Generate an ID for a parser * * Type can be either RAPTOR_GENID_TYPE_BNODEID or * RAPTOR_GENID_TYPE_BAGID * * Return value: newly allocated generated ID or NULL on failure **/ unsigned char* raptor_parser_generate_id(raptor_parser *rdf_parser, raptor_genid_type type) { if(type != RAPTOR_GENID_TYPE_BNODEID || type != RAPTOR_GENID_TYPE_BAGID) return NULL; return raptor_parser_internal_generate_id(rdf_parser, type, NULL); } unsigned char* raptor_parser_internal_generate_id(raptor_parser *rdf_parser, raptor_genid_type type, unsigned char *user_bnodeid) { if(rdf_parser->generate_id_handler) return rdf_parser->generate_id_handler(rdf_parser->generate_id_handler_user_data, type, user_bnodeid); else return raptor_default_generate_id_handler(rdf_parser, type, user_bnodeid); } /** * raptor_get_locator: * @rdf_parser: raptor parser * * Get the current raptor locator object. * * Return value: raptor locator **/ raptor_locator* raptor_get_locator(raptor_parser *rdf_parser) { return &rdf_parser->locator; } #ifdef RAPTOR_DEBUG void raptor_stats_print(raptor_parser *rdf_parser, FILE *stream) { #ifdef RAPTOR_PARSER_RDFXML #if RAPTOR_DEBUG > 1 if(!strcmp(rdf_parser->factory->name, "rdfxml")) { raptor_rdfxml_parser *rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; fputs("raptor parser stats\n ", stream); raptor_rdfxml_parser_stats_print(rdf_xml_parser, stream); } #endif #endif } #endif struct syntax_score { int score; raptor_parser_factory* factory; }; static int compare_syntax_score(const void *a, const void *b) { return ((struct syntax_score*)b)->score - ((struct syntax_score*)a)->score; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_guess_parser_name: * @uri: URI identifying the syntax (or NULL) * @mime_type: mime type identifying the content (or NULL) * @buffer: buffer of content to guess (or NULL) * @len: length of buffer * @identifier: identifier of content (or NULL) * * Guess a parser name for content. * * Find a parser by scoring recognition of the syntax by a block of * characters, the content identifier or a mime type. The content * identifier is typically a filename or URI or some other identifier. * * raptor_init() MUST have been called before calling this function. * Use raptor_guess_parser_name_v2() if using raptor_world APIs. * * Return value: a parser name or NULL if no guess could be made **/ const char* raptor_guess_parser_name(raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier) { return raptor_guess_parser_name_v2(raptor_world_instance(), uri, mime_type, buffer, len, identifier); } #endif /** * raptor_guess_parser_name_v2: * @world: raptor_world object * @uri: URI identifying the syntax (or NULL) * @mime_type: mime type identifying the content (or NULL) * @buffer: buffer of content to guess (or NULL) * @len: length of buffer * @identifier: identifier of content (or NULL) * * Guess a parser name for content. * * Find a parser by scoring recognition of the syntax by a block of * characters, the content identifier or a mime type. The content * identifier is typically a filename or URI or some other identifier. * * Return value: a parser name or NULL if no guess could be made **/ const char* raptor_guess_parser_name_v2(raptor_world* world, raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier) { unsigned int i; raptor_parser_factory *factory; unsigned char *suffix=NULL; /* FIXME - up to 10 parsers :) */ #define MAX_PARSERS 10 struct syntax_score scores[MAX_PARSERS]; if(identifier) { unsigned char *p=(unsigned char*)strrchr((const char*)identifier, '.'); if(p) { unsigned char *from, *to; p++; suffix=(unsigned char*)RAPTOR_MALLOC(cstring, strlen((const char*)p)+1); if(!suffix) return NULL; for(from=p, to=suffix; *from; ) { unsigned char c=*from++; /* discard the suffix if it wasn't '\.[a-zA-Z0-9]+$' */ if(!isalpha(c) && !isdigit(c)) { RAPTOR_FREE(cstring, suffix); suffix=NULL; to=NULL; break; } *to++=isupper((char)c) ? (unsigned char)tolower((char)c): c; } if(to) *to='\0'; } } for(i=0; (factory=(raptor_parser_factory*)raptor_sequence_get_at(world->parsers, i)); i++) { int score= -1; raptor_type_q* type_q=NULL; if(mime_type && factory->mime_types) { int j; type_q=NULL; for(j=0; (type_q=(raptor_type_q*)raptor_sequence_get_at(factory->mime_types, j)); j++) { if(!strcmp(mime_type, type_q->mime_type)) break; } /* got an exact match mime type - score it via the Q */ if(type_q) score=type_q->q; } /* mime type match has high Q - return result */ if(score >= 10) break; if(uri && factory->uri_string && !strcmp((const char*)raptor_uri_as_string_v2(world, uri), (const char*)factory->uri_string)) /* got an exact match syntax for URI - return result */ break; if(factory->recognise_syntax) { int c= -1; /* Only use first N bytes to avoid HTML documents that contain * RDF/XML examples */ #define FIRSTN 1024 if(buffer && len && len > FIRSTN) { c=buffer[FIRSTN]; ((char*)buffer)[FIRSTN]='\0'; } score += factory->recognise_syntax(factory, buffer, len, identifier, suffix, mime_type); if(c >= 0) ((char*)buffer)[FIRSTN]=c; } if(i > MAX_PARSERS) { RAPTOR_DEBUG2("Number of parsers greater than static buffer size %d\n", MAX_PARSERS); if(suffix) RAPTOR_FREE(cstring, suffix); return NULL; } scores[i].score=score < 10 ? score : 10; scores[i].factory=factory; #if RAPTOR_DEBUG > 2 RAPTOR_DEBUG3("Score %15s : %d\n", factory->name, score); #endif } if(!factory) { /* sort the scores and pick a factory */ qsort(scores, i, sizeof(struct syntax_score), compare_syntax_score); if(scores[0].score >= 0) factory=scores[0].factory; } if(suffix) RAPTOR_FREE(cstring, suffix); return factory ? factory->name : NULL; } /* * raptor_parser_copy_user_state: * @to_parser: destination parser * @from_parser: source parser * * Copy user state between parsers - INTERNAL. * * Return value: non-0 on failure **/ int raptor_parser_copy_user_state(raptor_parser *to_parser, raptor_parser *from_parser) { int rc=0; int i; to_parser->user_data= from_parser->user_data; memcpy(&to_parser->error_handlers, &from_parser->error_handlers, sizeof(raptor_error_handlers)); to_parser->statement_handler= from_parser->statement_handler; to_parser->generate_id_handler_user_data= from_parser->generate_id_handler_user_data; to_parser->generate_id_handler= from_parser->generate_id_handler; to_parser->default_generate_id_handler_base= from_parser->default_generate_id_handler_base; /* copy over non-shared user state - generate ID prefix string */ if(from_parser->default_generate_id_handler_prefix) { size_t len=from_parser->default_generate_id_handler_prefix_length; to_parser->default_generate_id_handler_prefix=(char*)RAPTOR_MALLOC(cstring, len+1); if(to_parser->default_generate_id_handler_prefix) strncpy((char*)to_parser->default_generate_id_handler_prefix, (const char*)from_parser->default_generate_id_handler_prefix, len+1); else rc=1; } to_parser->default_generate_id_handler_prefix_length= from_parser->default_generate_id_handler_prefix_length; to_parser->namespace_handler= from_parser->namespace_handler; to_parser->namespace_handler_user_data= from_parser->namespace_handler_user_data; to_parser->uri_filter= from_parser->uri_filter; to_parser->uri_filter_user_data= from_parser->uri_filter_user_data; /* copy over Cache-Control: header */ if(!rc && from_parser->cache_control) { size_t len=strlen(from_parser->cache_control); to_parser->cache_control=(char*)RAPTOR_MALLOC(cstring, len+1); if(to_parser->cache_control) strncpy((char*)to_parser->cache_control, (const char*)from_parser->cache_control, len+1); else rc=1; } /* copy over User-Agent: header */ if(!rc && from_parser->user_agent) { size_t len=strlen(from_parser->user_agent); to_parser->user_agent=(char*)RAPTOR_MALLOC(cstring, len+1); if(to_parser->user_agent) strncpy((char*)to_parser->user_agent, (const char*)from_parser->user_agent, len+1); else rc=1; } /* copy features */ for(i=0; i<= RAPTOR_FEATURE_LAST; i++) to_parser->features[i]= from_parser->features[i]; return rc; } /* * raptor_parser_start_namespace: * @rdf_parser: parser * @nspace: namespace starting * * Internal - Invoke start namespace handler **/ void raptor_parser_start_namespace(raptor_parser* rdf_parser, raptor_namespace* nspace) { if(!rdf_parser->namespace_handler) return; (*rdf_parser->namespace_handler)(rdf_parser->namespace_handler_user_data, nspace); } /** * raptor_parser_get_accept_header: * @rdf_parser: parser * * Get an HTTP Accept value for the parser. * * The returned string must be freed by the caller such as with * raptor_free_memory(). * * Return value: a new Accept: header string or NULL on failure **/ const char* raptor_parser_get_accept_header(raptor_parser* rdf_parser) { raptor_parser_factory *factory=rdf_parser->factory; char *accept_header=NULL; size_t len; char *p; int i; raptor_type_q* type_q; if(factory->accept_header) return factory->accept_header(rdf_parser); if(!factory->mime_types) return NULL; len=0; for(i=0; (type_q=(raptor_type_q*)raptor_sequence_get_at(factory->mime_types, i)); i++) { if(type_q->mime_type) { len+= type_q->mime_type_len + 2; /* ", " */ if(type_q->q < 10) len+= 6; /* ";q=X.Y" */ } } /* 9 = "\*\/\*;q=0.1" */ accept_header=(char*)RAPTOR_MALLOC(cstring, len + 9 + 1); if(!accept_header) return NULL; p=accept_header; for(i=0; (type_q=(raptor_type_q*)raptor_sequence_get_at(factory->mime_types, i)); i++) { if(type_q->mime_type) { strncpy(p, type_q->mime_type, type_q->mime_type_len); p+= type_q->mime_type_len; if(type_q->q < 10) { *p++ = ';'; *p++ = 'q'; *p++ = '='; *p++ = '0'; *p++ = '.'; *p++ = '0' + (type_q->q); } } *p++ = ','; *p++ = ' '; } strncpy(p, "*/*;q=0.1", 10); return accept_header; } const char* raptor_parser_get_accept_header_all(raptor_world* world) { raptor_parser_factory *factory; char *accept_header=NULL; size_t len; char *p; int i; len=0; for(i=0; (factory=(raptor_parser_factory*)raptor_sequence_get_at(world->parsers, i)); i++) { raptor_type_q* type_q; int j; for(j=0; (type_q=(raptor_type_q*)raptor_sequence_get_at(factory->mime_types, j)); j++) { if(type_q->mime_type) { len+= type_q->mime_type_len + 2; /* ", " */ if(type_q->q < 10) len+= 6; /* ";q=X.Y" */ } } } /* 9 = "\*\/\*;q=0.1" */ accept_header=(char*)RAPTOR_MALLOC(cstring, len + 9 + 1); if(!accept_header) return NULL; p=accept_header; for(i=0; (factory=(raptor_parser_factory*)raptor_sequence_get_at(world->parsers, i)); i++) { raptor_type_q* type_q; int j; for(j=0; (type_q=(raptor_type_q*)raptor_sequence_get_at(factory->mime_types, j)); j++) { if(type_q->mime_type) { strncpy(p, type_q->mime_type, type_q->mime_type_len); p+= type_q->mime_type_len; if(type_q->q < 10) { *p++ = ';'; *p++ = 'q'; *p++ = '='; *p++ = '0'; *p++ = '.'; *p++ = '0' + (type_q->q); } } *p++ = ','; *p++ = ' '; } } strncpy(p, "*/*;q=0.1", 10); return accept_header; } void raptor_parser_save_content(raptor_parser* rdf_parser, int save) { if(rdf_parser->sb) raptor_free_stringbuffer(rdf_parser->sb); rdf_parser->sb= save ? raptor_new_stringbuffer() : NULL; } const unsigned char* raptor_parser_get_content(raptor_parser* rdf_parser, size_t* length_p) { unsigned char* buffer; size_t len; if(!rdf_parser->sb) return NULL; len=raptor_stringbuffer_length(rdf_parser->sb); buffer=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!buffer) return NULL; raptor_stringbuffer_copy_to_string(rdf_parser->sb, buffer, len); if(length_p) *length_p=len; return buffer; } void raptor_parser_set_graph_name(raptor_parser* parser, raptor_uri* uri) { if(parser->graph_handler) (*parser->graph_handler)(parser->user_data, uri); } int raptor_parser_get_current_base_id(raptor_parser* parser) { if(parser->factory->get_current_base_id) return parser->factory->get_current_base_id(parser); else return parser->default_generate_id_handler_base; } /** * raptor_parser_get_world: * @rdf_parser: parser * * Get the #raptor_world object associated with a parser. * * Return value: raptor_world* pointer **/ raptor_world * raptor_parser_get_world(raptor_parser* rdf_parser) { return rdf_parser->world; } /* end not STANDALONE */ #endif #ifdef STANDALONE #include <stdio.h> int main(int argc, char *argv[]); int main(int argc, char *argv[]) { raptor_world *world; #ifdef RAPTOR_DEBUG const char *program=raptor_basename(argv[0]); #endif int i; const char *s; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Known features:\n", program); #endif for(i=0; i <= RAPTOR_FEATURE_LAST; i++) { const char *feature_name; const char *feature_label; raptor_uri *feature_uri; int fn; if(raptor_features_enumerate_v2(world, (raptor_feature)i, &feature_name, &feature_uri, &feature_label)) continue; #ifdef RAPTOR_DEBUG fprintf(stderr, " %2d %-20s %s\n", i, feature_name, feature_label); #endif fn=raptor_feature_from_uri_v2(world, feature_uri); if(fn != i) { fprintf(stderr, "raptor_feature_from_uri returned %d expected %d\n", fn, i); return 1; } raptor_free_uri_v2(world, feature_uri); } s=raptor_parser_get_accept_header_all(world); fprintf(stderr, "Default HTTP accept header: '%s'\n", s); RAPTOR_FREE(cstring, s); raptor_free_world(world); return 0; } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_nfc.c����������������������������������������������������������������������0000644�0001750�0001750�00000024613�11330672502�013124� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_nfc.c - Raptor Unicode Normal Form C (NFC) support * * Copyright (C) 2004-2007, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * See Unicode Normalization http://unicode.org/unicode/reports/tr15/ * for the definition of Unicode Normal Form C (NFC) * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include <stdio.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #include "raptor_nfc.h" #undef RAPTOR_DEBUG_NFC_CHECK /* * raptor_nfc_check_combiners - Check for allowed combining characters * @base: first character (U+0...U+FFFF) * @follow: second character (U+0...U+FFFF) * * Return value: non-0 if combination is allowed */ static int raptor_nfc_check_combiners(u16 base, u16 follow) { int low=0; int high=RAPTOR_NFC_RECOMBINERS_COUNT; while(low < high) { int middle=(low+high)/2; u16 middle_base=raptor_nfc_recombiners[middle].base; if(base == middle_base) { /* found base */ u16 middle_follow=raptor_nfc_recombiners[middle].follow; if(middle_follow == follow) /* success */ return 1; /* otherwise need to binary search for further 'follow' * values for this base */ if(follow < middle_follow) high=middle; else low=middle+1; } else if(base < middle_base) high=middle; else low=middle+1; } return raptor_nfc_recombiners[low].base == base && raptor_nfc_recombiners[low].follow == follow; } static int raptor_nfc_get_class(unsigned long key) { int low=0; int high=RAPTOR_NFC_CLASSES_COUNT; while (low < high) { int middle=(low+high)/2; unsigned int middle_key=raptor_nfc_classes[middle].key; /* found class */ if(key == middle_key) return raptor_nfc_classes[middle].combining_class; /* otherwise need to binary search further */ if(key < middle_key) high=middle; else low=middle+1; } return raptor_nfc_classes[low].combining_class; } static RAPTOR_INLINE raptor_nfc_code_flag raptor_nfc_get_code_flag (unsigned long c) { if(c < 0x10900) { /* U+0 to U+108FF - from flags table (first 0x10900 entries) */ if(c & 1) return (raptor_nfc_code_flag)(raptor_nfc_flags[c>>1] & 0xF); else return (raptor_nfc_code_flag)(raptor_nfc_flags[c>>1] >>4); } else if(c < 0x1D000) /* U+10900 to U+1CFFF - codes do not exist */ return NoNo; else if(c < 0x1D800) { /* U+1D000 to U+1D7FF - from flags table (after first 0x10900) */ c -= (0x1D000-0x10900); if(c & 1) return (raptor_nfc_code_flag)(raptor_nfc_flags[c>>1] & 0xF); else return (raptor_nfc_code_flag)(raptor_nfc_flags[c>>1] >>4); } else if(c < 0x20000) /* U+1D800 to U+1FFFF - codes do not exist */ return NoNo; else if(c < 0x2A6D7) /* U+20000 to U+2A6D6 - CJK Ideograph Extension B - simple */ return simp; else if(c < 0x2F800) /* U+2A6D8 to U+2F7FF - codes do not exist */ return NoNo; else if(c < 0x2FA1E) /* U+2F800 to U+2FA1D - CJK Compatibility Ideographs Supplement - forbidden/excluded in NFC */ /* FIXME Unicode 4 says to 2FA1F */ return NOFC; else if(c == 0xE0001) /* U+E0001 - "Language Tag" - simple */ return simp; else if(c < 0xE0020) /* U+E0002 to U+E001F - codes do not exist */ return NoNo; else if(c < 0xE0080) /* U+E0020 to U+E007F - Tag components - simple */ return simp; else if(c < 0xE0100) /* U+E0080 to U+E00FF - codes do not exist */ return NoNo; else if(c < 0xE01F0) /* U+E0100 to U+E01EF - Variation Selectors Supplement - simple */ return simp; else /* otherwise does not exist/forbidden */ return NoNo; } #ifdef RAPTOR_DEBUG_NFC_CHECK #define RAPTOR_NFC_CHECK_FAIL(char, reason) do { fprintf(stderr, "%s:%d:%s: NFC check failed on U+%04lX: " reason "\n", __FILE__, __LINE__, __func__, char); } while(0) #else #define RAPTOR_NFC_CHECK_FAIL(char, reason) #endif /** * raptor_nfc_check: * @input: UTF-8 string * @length: length of string * @errorp: pointer to store offset of character in error (or NULL) * * Unicode Normal Form C (NFC) check function. * * If errorp is not NULL, it is set to the offset of the character * in error in the buffer, or <0 if there is no error. * * Return value: Non 0 if the string is NFC **/ int raptor_nfc_check (const unsigned char* string, size_t len, int *error) { const unsigned char* start; int is_start; size_t offset; raptor_nfc_code_flag prev_char_flag=(raptor_nfc_code_flag)0; unsigned long prev_char=0L; int prev_class; start=string; is_start=1; offset=0; prev_class=0; while(offset < len) { raptor_unichar unichar; int unichar_len; int combining_class=0; raptor_nfc_code_flag flag; unichar_len=raptor_utf8_to_unicode_char(&unichar, string, len); if(unichar_len < 0 || unichar_len > (int)len) { /* UTF-8 encoding had an error or ended in the middle of a string */ if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "UTF-8 decoding error"); return 0; } string += unichar_len; offset += unichar_len; len -= unichar_len; flag = raptor_nfc_get_code_flag(unichar); switch (flag) { case HIGH: case loww: case NOFC: /* Forbidden combinations: * HIGH: high surrogate * * loww: low surrogate * * NOFC: Either singleton or excluded. Exclusions are given in: * http://www.unicode.org/unicode/reports/tr15/#Primary_Exclusion_List_Table * http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt */ if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "forbidden combinations - HIGH, loww, NOFC"); return 0; case NoNo: /* character does not exist */ if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "NoNo - character does not exist"); return 0; case ReCo: /* class > 0 and recombining */ /* class > 0 are forbidden at start */ if(is_start) { if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "ReCo at start"); return 0; } combining_class=raptor_nfc_get_class(unichar); /* check 1 - previous class later than current, always an error */ if(prev_class > combining_class) { if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "ReCo and prev class > current"); return 0; } /* check 2 - previous class same as current - always OK */ /* check 3 - previous class earlier than current class. * Only perform combining check when both are in range */ if(prev_class < combining_class && prev_char < 0x10000 && unichar < 0x10000 && !raptor_nfc_check_combiners(prev_char, unichar)) { if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "ReCo and combiners check failed"); return 0; } break; case NoRe: /* class >0, not recombining */ /* class > 0 are forbidden at start */ if(is_start) { if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "NoRe at start"); return 0; } combining_class=raptor_nfc_get_class(unichar); if(prev_class > combining_class) { if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "NoRe and prev class > current"); return 0; } break; case COM0: /* class is 0 and composing */ /* Composing characters forbidden at start */ if(is_start) { if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "COMB at start"); return 0; } /* Only perform combining check when both are in range */ if(prev_char < 0x10000 && unichar < 0x10000 && raptor_nfc_check_combiners(prev_char, unichar)) { if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "COMB and combiners check failed"); return 0; } combining_class=0; break; case Hang: /* hangul Jamo (Korean) initial consonants */ combining_class=0; break; case hAng: /* Hangul Jamo (Korean) medial vowels * Must not be at the start and must not follow * a Hangul initial consonant */ if(is_start || prev_char_flag == Hang) { if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "hAng at start"); return 0; } combining_class=0; break; case haNG: /* hangul trailing consonants * Must not be at the start and must not follow a * hangul initial/medial syllable */ if(is_start || prev_char_flag == HAng) { if(error) *error=offset; RAPTOR_NFC_CHECK_FAIL(unichar, "haNG at start"); return 0; } combining_class=0; break; case HAng: /* Hangul Jamo (Korean) initial/medial syllables */ combining_class=0; break; case Base: /* base that combines */ case simp: /* simple characters */ combining_class=0; break; } prev_char=unichar; prev_char_flag=flag; prev_class=combining_class; is_start=0; } return 1; } ���������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_nfc.h����������������������������������������������������������������������0000644�0001750�0001750�00000006571�11322277061�013136� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_nfc.h - Raptor Unicode NFC headers * * Copyright (C) 2004-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #include <sys/types.h> #ifndef HAVE_U16 #if SIZEOF_UNSIGNED_SHORT == 2 typedef unsigned int u16; #elif SIZEOF_UNSIGNED_INT == 2 typedef unsigned long u16; #else #error u16 type not defined #endif #endif #ifndef HAVE_U8 #if SIZEOF_UNSIGNED_CHAR == 1 typedef unsigned char u8; #else #error u8 type not defined #endif #endif /* * Definitions for Unicode NFC data tables * * See Unicode Normalization http://unicode.org/unicode/reports/tr15/ * for the definition of Unicode Normal Form C (NFC) */ /* Unicode combining classes * * The combining class is taken from the 4th field of UnicodeData.txt * and are mostly class 0 - nothing special. This structure * is used to make a sparse sequence of (key, class) pairs * ordered by key, of the non-0 class entries. * */ typedef struct { /* the code (0.. 0x10FFD inclusive - 24 bits) */ unsigned int key:24; /* the combining class (0.. 255 - 8 bits is enough, there are ~50-60 used) */ unsigned int combining_class:8; } raptor_nfc_key_class; /* Unicode combining characters * * Pairs of characters (base, follow) that must be in that order * They are all 0..0xFFFF inclusive * * This structure is used to make a sparse sequence of (base, follow) * pairs of valid combinations. 'base' may have several valid 'follow's in * the sequence. */ typedef struct { u16 base; u16 follow; } raptor_nfc_base_follow; /* * Flags for codes U+0 to U+108FF, U+1D000 to U+1D7FF */ typedef enum { HIGH, /* U+D800 to U+DBFF High Surrogates */ loww, /* U+DC00 to U+DFFF Low Surrogates */ NoNo, /* code that does not exist */ NOFC, /* forbidden or excluded in NFC */ ReCo, /* class > 0 recombining */ NoRe, /* class > 0 not recombining */ COM0, /* class 0 and composing */ Hang, /* U+1100 to U+1112 - Hangul Jamo (Korean) initial consonants */ hAng, /* U+1161 to U+1175 - Hangul Jamo (Korean) medial vowels */ haNG, /* U+11A8 to U+11C2 - Hangul Jamo (Korean) trailing consonants */ HAng, /* U+AC00 to U+D7A3 (except for every 28) - Hangul syllables */ Base, /* base that combines */ simp /* class 0 nothing special */ } raptor_nfc_code_flag; #define RAPTOR_NFC_CLASSES_COUNT 352 extern const raptor_nfc_key_class raptor_nfc_classes[RAPTOR_NFC_CLASSES_COUNT]; #define RAPTOR_NFC_RECOMBINERS_COUNT 2177 extern const raptor_nfc_base_follow raptor_nfc_recombiners[RAPTOR_NFC_RECOMBINERS_COUNT]; #define RAPTOR_NFC_CODE_FLAGS_COUNT 34944 extern const u8 raptor_nfc_flags[RAPTOR_NFC_CODE_FLAGS_COUNT]; ���������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_set.c����������������������������������������������������������������������0000644�0001750�0001750�00000016076�11330672502�013155� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_set.c - Sets for checking IDs * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <stdarg.h> #include <sys/types.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> /* for abort() as used in errors */ #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE /* * The only methods needed here are: * Create Set * Destroy Set * Check a (base, ID) pair present add it if not, return if added/not * */ struct raptor_base_id_set_s { raptor_world* world; /* The base URI of this set of IDs */ raptor_uri *uri; /* neighbour ID sets */ struct raptor_base_id_set_s* prev; struct raptor_base_id_set_s* next; /* binary tree */ raptor_avltree* tree; }; typedef struct raptor_base_id_set_s raptor_base_id_set; struct raptor_id_set_s { raptor_world* world; /* start of trees, 1 per base URI */ struct raptor_base_id_set_s* first; #if RAPTOR_DEBUG > 1 int hits; int misses; #endif }; /* functions implementing the ID set api */ /** * raptor_new_id_set: * @world: raptor_world object * * INTERNAL - Constructor - create a new ID set. * * Return value: non 0 on failure **/ raptor_id_set* raptor_new_id_set(raptor_world* world) { raptor_id_set* set=(raptor_id_set*)RAPTOR_CALLOC(raptor_id_set, 1, sizeof(raptor_id_set)); if(!set) return NULL; set->world=world; return set; } /** * raptor_free_base_id_set: * @set: #raptor_base_id_set * * INTERNAL - Destructor - Free a Base ID Set. * **/ static void raptor_free_base_id_set(raptor_base_id_set *base) { if(base->tree) raptor_free_avltree(base->tree); if(base->uri) raptor_free_uri_v2(base->world, base->uri); RAPTOR_FREE(raptor_base_id_set, base); } /** * raptor_free_id_set: * @set: #raptor_id_set * * INTERNAL - Destructor - Free ID Set. * **/ void raptor_free_id_set(raptor_id_set *set) { raptor_base_id_set *base; RAPTOR_ASSERT_OBJECT_POINTER_RETURN(set, raptor_id_set); base=set->first; while(base) { raptor_base_id_set *next=base->next; raptor_free_base_id_set(base); base=next; } RAPTOR_FREE(raptor_id_set, set); } /** * raptor_id_set_add: * @set: #raptor_id_set * @base_uri: base #raptor_uri of identifier * @id: identifier name * @id_len: length of identifier * * INTERNAL - Add an item to the set. * * Return value: <0 on failure, 0 on success, 1 if already present **/ int raptor_id_set_add(raptor_id_set* set, raptor_uri *base_uri, const unsigned char *id, size_t id_len) { raptor_base_id_set *base; char* item; if(!base_uri || !id || !id_len) return -1; base=set->first; while(base) { if(raptor_uri_equals_v2(set->world, base->uri, base_uri)) break; base=base->next; } if(!base) { /* a set for this base_uri not found */ base=(raptor_base_id_set*)RAPTOR_CALLOC(raptor_base_id_set, 1, sizeof(raptor_base_id_set)); if(!base) return -1; base->world=set->world; base->uri=raptor_uri_copy_v2(set->world, base_uri); base->tree=raptor_new_avltree(set->world, (raptor_data_compare_function)strcmp, free, 0); /* Add to the start of the list */ if(set->first) set->first->prev=base; /* base->prev=NULL; */ base->next=set->first; set->first=base; } else { /* If not at the start of the list, move there */ if(base != set->first) { /* remove from the list */ base->prev->next=base->next; if(base->next) base->next->prev=base->prev; /* add at the start of the list */ set->first->prev=base; base->prev=NULL; base->next=set->first; } } item=(char*)raptor_avltree_search(base->tree, id); /* if already there, error */ if(item) { #if RAPTOR_DEBUG > 1 set->misses++; #endif return 1; } #if RAPTOR_DEBUG > 1 set->hits++; #endif item=(char*)RAPTOR_MALLOC(cstring, id_len+1); if(!item) return 1; strncpy(item, (const char*)id, id_len+1); return raptor_avltree_add(base->tree, item); } #if RAPTOR_DEBUG > 1 void raptor_id_set_stats_print(raptor_id_set* set, FILE *stream) { fprintf(stream, "set hits: %d misses: %d\n", set->hits, set->misses); } #endif #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); int main(int argc, char *argv[]) { raptor_world *world; const char *program=raptor_basename(argv[0]); const char *items[8] = { "ron", "amy", "jen", "bij", "jib", "daj", "jim", NULL }; raptor_id_set *set; raptor_uri *base_uri; int i=0; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); base_uri=raptor_new_uri_v2(world, (const unsigned char*)"http://example.org/base#"); #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Creating set\n", program); #endif set=raptor_new_id_set(world); if(!set) { fprintf(stderr, "%s: Failed to create set\n", program); exit(1); } for(i=0; items[i]; i++) { size_t len=strlen(items[i]); int rc; #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Adding set item '%s'\n", program, items[i]); #endif rc=raptor_id_set_add(set, base_uri, (const unsigned char*)items[i], len); if(rc) { fprintf(stderr, "%s: Adding set item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } } for(i=0; items[i]; i++) { size_t len=strlen(items[i]); int rc; #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Adding duplicate set item '%s'\n", program, items[i]); #endif rc=raptor_id_set_add(set, base_uri, (const unsigned char*)items[i], len); if(rc <= 0) { fprintf(stderr, "%s: Adding duplicate set item %d '%s' succeeded, should have failed, returning error %d\n", program, i, items[i], rc); exit(1); } } #if RAPTOR_DEBUG > 1 raptor_id_set_stats_print(set, stderr); #endif #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing set\n", program); #endif raptor_free_id_set(set); raptor_free_uri_v2(world, base_uri); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_rss.c����������������������������������������������������������������������0000644�0001750�0001750�00000147612�11330672502�013172� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rss.c - Raptor Feeds (RSS and Atom) tag soup parser * * Copyright (C) 2003-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #include "raptor_rss.h" /* local prototypes */ static void raptor_rss_uplift_items(raptor_parser* rdf_parser); static int raptor_rss_emit(raptor_parser* rdf_parser); static void raptor_rss_start_element_handler(void *user_data, raptor_xml_element* xml_element); static void raptor_rss_end_element_handler(void *user_data, raptor_xml_element* xml_element); static void raptor_rss_cdata_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len); static void raptor_rss_comment_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s); static void raptor_rss_sax2_new_namespace_handler(void *user_data, raptor_namespace* nspace); /* * RSS parser object */ struct raptor_rss_parser_s { /* static model */ raptor_rss_model model; /* current line */ char *line; /* current line length */ int line_length; /* current char in line buffer */ int offset; /* static statement for use in passing to user code */ raptor_statement statement; raptor_sax2 *sax2; /* rss node type of current CONTAINER item */ raptor_rss_type current_type; /* one place stack */ raptor_rss_type prev_type; raptor_rss_fields_type current_field; /* emptyness of current element */ int element_is_empty; /* stack of namespaces */ raptor_namespace_stack *nstack; /* non-0 if this is an atom 1.0 parser */ int is_atom; /* namespaces declared here */ raptor_namespace* nspaces[RAPTOR_RSS_NAMESPACES_SIZE]; /* namespaces seen during parsing or creating output model */ char nspaces_seen[RAPTOR_RSS_NAMESPACES_SIZE]; /* current BLOCK pointer (inside CONTAINER of type current_type) */ raptor_rss_block *current_block; }; typedef struct raptor_rss_parser_s raptor_rss_parser; typedef enum { RAPTOR_RSS_CONTENT_TYPE_NONE, RAPTOR_RSS_CONTENT_TYPE_XML, RAPTOR_RSS_CONTENT_TYPE_TEXT } raptor_rss_content_type; struct raptor_rss_element_s { raptor_world* world; raptor_uri* uri; /* Two types of content */ raptor_rss_content_type type; /* 1) XML */ raptor_xml_writer* xml_writer; /* XML written to this iostream to the xml_content string */ raptor_iostream* iostream; /* ends up here */ void *xml_content; size_t xml_content_length; /* 2) cdata */ raptor_stringbuffer* sb; }; typedef struct raptor_rss_element_s raptor_rss_element; static void raptor_free_rss_element(raptor_rss_element *rss_element) { if(rss_element->uri) raptor_free_uri_v2(rss_element->world, rss_element->uri); if(rss_element->type == RAPTOR_RSS_CONTENT_TYPE_XML) { if(rss_element->xml_writer) raptor_free_xml_writer(rss_element->xml_writer); if(rss_element->iostream) raptor_free_iostream(rss_element->iostream); if(rss_element->xml_content) raptor_free_memory(rss_element->xml_content); } if(rss_element->sb) raptor_free_stringbuffer(rss_element->sb); RAPTOR_FREE(raptor_rss_element, rss_element); } static int raptor_rss_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; raptor_sax2* sax2; int n; raptor_rss_common_init(rdf_parser->world); raptor_rss_model_init(rdf_parser->world, &rss_parser->model); rss_parser->prev_type = RAPTOR_RSS_NONE; rss_parser->current_field = RAPTOR_RSS_FIELD_NONE; rss_parser->current_type = RAPTOR_RSS_NONE; rss_parser->current_block = NULL; if(rss_parser->sax2) { raptor_free_sax2(rss_parser->sax2); rss_parser->sax2 = NULL; } rss_parser->nstack = raptor_new_namespaces_v2(rdf_parser->world, NULL, NULL, /* errors */ 1); /* Initialise the namespaces */ for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) { unsigned const char* prefix = (unsigned const char*)raptor_rss_namespaces_info[n].prefix; raptor_uri* uri = rdf_parser->world->rss_namespaces_info_uris[n]; raptor_namespace* nspace = NULL; if(prefix && uri) nspace = raptor_new_namespace_from_uri(rss_parser->nstack, prefix, uri, 0); rss_parser->nspaces[n] = nspace; } sax2 = raptor_new_sax2(rdf_parser, &rdf_parser->error_handlers); rss_parser->sax2 = sax2; raptor_sax2_set_start_element_handler(sax2, raptor_rss_start_element_handler); raptor_sax2_set_end_element_handler(sax2, raptor_rss_end_element_handler); raptor_sax2_set_characters_handler(sax2, raptor_rss_cdata_handler); raptor_sax2_set_cdata_handler(sax2, raptor_rss_cdata_handler); raptor_sax2_set_comment_handler(sax2, raptor_rss_comment_handler); raptor_sax2_set_namespace_handler(sax2, raptor_rss_sax2_new_namespace_handler); return 0; } static void raptor_rss_parse_terminate(raptor_parser *rdf_parser) { raptor_rss_parser *rss_parser = (raptor_rss_parser*)rdf_parser->context; int n; if(rss_parser->sax2) raptor_free_sax2(rss_parser->sax2); raptor_rss_model_clear(&rss_parser->model); for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) { if(rss_parser->nspaces[n]) raptor_free_namespace(rss_parser->nspaces[n]); } if(rss_parser->nstack) raptor_free_namespaces(rss_parser->nstack); raptor_rss_common_terminate(rdf_parser->world); } static int raptor_rss_parse_start(raptor_parser *rdf_parser) { raptor_uri *uri = rdf_parser->base_uri; raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int n; /* base URI required for RSS */ if(!uri) return 1; for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) rss_parser->nspaces_seen[n] = 'N'; /* Optionally forbid network requests in the XML parser */ raptor_sax2_set_feature(rss_parser->sax2, RAPTOR_FEATURE_NO_NET, rdf_parser->features[RAPTOR_FEATURE_NO_NET]); raptor_sax2_parse_start(rss_parser->sax2, uri); return 0; } static int raptor_rss_add_container(raptor_rss_parser *rss_parser, const char *name) { raptor_rss_type type = RAPTOR_RSS_NONE; if(!strcmp(name, "rss") || !strcmp(name, "rdf") || !strcmp(name, "RDF")) { /* rss */ } else if(!raptor_strcasecmp(name, "channel")) { /* rss or atom 0.3 channel */ type = RAPTOR_RSS_CHANNEL; } else if(!strcmp(name, "feed")) { /* atom 1.0 feed */ type = RAPTOR_RSS_CHANNEL; rss_parser->is_atom = 1; } else if(!strcmp(name, "item")) { type = RAPTOR_RSS_ITEM; } else if(!strcmp(name, "entry")) { type = RAPTOR_RSS_ITEM; rss_parser->is_atom = 1; } else { int i; for(i = 0; i < RAPTOR_RSS_COMMON_SIZE; i++) { if(!(raptor_rss_items_info[i].flags & RAPTOR_RSS_ITEM_CONTAINER)) continue; if(!strcmp(name, raptor_rss_items_info[i].name)) { /* rss and atom clash on the author name field (rss) or type (atom) */ if(i != RAPTOR_ATOM_AUTHOR || (i == RAPTOR_ATOM_AUTHOR && rss_parser->is_atom)) { type = (raptor_rss_type)i; break; } } } } if(type != RAPTOR_RSS_NONE) { if(type == RAPTOR_RSS_ITEM) raptor_rss_model_add_item(&rss_parser->model); else raptor_rss_model_add_common(&rss_parser->model, type); /* Inner container - push the current type onto a 1-place stack */ if(rss_parser->current_type != RAPTOR_RSS_NONE) rss_parser->prev_type = rss_parser->current_type; rss_parser->current_type = type; } return (type == RAPTOR_RSS_NONE); } static raptor_uri* raptor_rss_promote_namespace_uri(raptor_world *world, raptor_uri* nspace_URI) { /* RSS 0.9 and RSS 1.1 namespaces => RSS 1.0 namespace */ if((raptor_uri_equals_v2(world, nspace_URI, world->rss_namespaces_info_uris[RSS0_9_NS]) || raptor_uri_equals_v2(world, nspace_URI, world->rss_namespaces_info_uris[RSS1_1_NS]))) { nspace_URI = world->rss_namespaces_info_uris[RSS1_0_NS]; } /* Atom 0.3 namespace => Atom 1.0 namespace */ if(raptor_uri_equals_v2(world, nspace_URI, world->rss_namespaces_info_uris[ATOM0_3_NS])) { nspace_URI = world->rss_namespaces_info_uris[ATOM1_0_NS]; } return nspace_URI; } static raptor_rss_item* raptor_rss_get_current_item(raptor_rss_parser *rss_parser) { raptor_rss_item* item; if(rss_parser->current_type == RAPTOR_RSS_ITEM) item = rss_parser->model.last; else item = raptor_rss_model_get_common(&rss_parser->model, rss_parser->current_type); return item; } static void raptor_rss_block_set_field(raptor_world *world, raptor_uri *base_uri, raptor_rss_block *block, const raptor_rss_block_field_info *bfi, const char *string) { int attribute_type = bfi->attribute_type; int offset = bfi->offset; if(attribute_type == RSS_BLOCK_FIELD_TYPE_URL) { raptor_uri* uri; uri = raptor_new_uri_relative_to_base_v2(world, base_uri, (const unsigned char*)string); block->urls[offset] = uri; } else if (attribute_type == RSS_BLOCK_FIELD_TYPE_STRING) { size_t len = strlen(string); block->strings[offset] = (char*)RAPTOR_MALLOC(cstring, len+1); strncpy(block->strings[offset], string, len+1); } else { #ifdef RAPTOR_DEBUG RAPTOR_FATAL2("Found unknown attribute_type %d\n", attribute_type); #endif } } static void raptor_rss_start_element_handler(void *user_data, raptor_xml_element* xml_element) { raptor_parser *rdf_parser; raptor_rss_parser *rss_parser; raptor_rss_block *block = NULL; raptor_uri* base_uri; raptor_qname *el_qname; const unsigned char *name; int ns_attributes_count; raptor_qname** named_attrs; const raptor_namespace* el_nspace; raptor_rss_element* rss_element; int i; rdf_parser = (raptor_parser*)user_data; rss_parser = (raptor_rss_parser*)rdf_parser->context; rss_element = (raptor_rss_element*)RAPTOR_CALLOC(raptor_rss_element, sizeof(raptor_rss_element), 1); /* FIXME: check for alloc failure */ rss_element->world = rdf_parser->world; rss_element->sb = raptor_new_stringbuffer(); xml_element->user_data = rss_element; if(xml_element->parent) { raptor_rss_element* parent_rss_element; parent_rss_element = (raptor_rss_element*)(xml_element->parent->user_data); if(parent_rss_element->xml_writer) rss_element->xml_writer = parent_rss_element->xml_writer; } if(rss_element->xml_writer) { raptor_xml_writer_start_element(rss_element->xml_writer, xml_element); return; } el_qname = raptor_xml_element_get_name(xml_element); name = el_qname->local_name; el_nspace = el_qname->nspace; named_attrs = raptor_xml_element_get_attributes(xml_element); ns_attributes_count = raptor_xml_element_get_attributes_count(xml_element); base_uri = raptor_sax2_inscope_base_uri(rss_parser->sax2); /* No container type - identify and record in rss_parser->current_type * either as a top-level container or an inner-container */ if(!raptor_rss_add_container(rss_parser, (const char*)name)) { #ifdef RAPTOR_DEBUG if(1) { raptor_rss_type old_type = rss_parser->prev_type; if(old_type != rss_parser->current_type && old_type != RAPTOR_RSS_NONE) RAPTOR_DEBUG5("FOUND inner container type %d - %s INSIDE current container type %d - %s\n", rss_parser->current_type, raptor_rss_items_info[rss_parser->current_type].name, old_type, raptor_rss_items_info[old_type].name); else RAPTOR_DEBUG3("FOUND container type %d - %s\n", rss_parser->current_type, raptor_rss_items_info[rss_parser->current_type].name); } #endif /* check a few container attributes */ if(named_attrs) { raptor_rss_item* update_item = raptor_rss_get_current_item(rss_parser); for(i = 0; i < ns_attributes_count; i++) { raptor_qname* attr=named_attrs[i]; const char* attrName = (const char*)attr->local_name; const unsigned char* attrValue = attr->value; RAPTOR_DEBUG3(" container attribute %s=%s\n", attrName, attrValue); if(!strcmp(attrName, "about")) { if(update_item) { raptor_uri *new_uri; update_item->uri = raptor_new_uri_v2(rdf_parser->world, attrValue); new_uri = raptor_uri_copy_v2(rdf_parser->world, update_item->uri); raptor_set_identifier_uri(&update_item->identifier, new_uri); } } } } return; } else if(rss_parser->current_type == RAPTOR_RSS_NONE) { RAPTOR_DEBUG2("Unknown container element named %s\n", name); /* Nothing more that can be done with unknown element - skip it */ return; } /* have container (current_type) so this element is inside it is either: * 1. a metadata block element (such as rss:enclosure) * 2. a field (such as atom:title) */ /* Find field ID */ rss_parser->current_field = RAPTOR_RSS_FIELD_UNKNOWN; for(i = 0; i < RAPTOR_RSS_FIELDS_SIZE; i++) { raptor_uri* nspace_URI; raptor_uri* field_nspace_URI; rss_info_namespace nsid = raptor_rss_fields_info[i].nspace; if(strcmp((const char*)name, raptor_rss_fields_info[i].name)) continue; if(!el_nspace) { if(nsid != RSS_NO_NS && nsid != RSS1_0_NS && nsid != RSS0_91_NS && nsid != RSS0_9_NS && nsid != RSS1_1_NS) continue; /* Matches if the element has no namespace and field is not atom */ rss_parser->current_field = (raptor_rss_fields_type)i; break; } /* Promote element namespaces */ nspace_URI = raptor_rss_promote_namespace_uri(rdf_parser->world, raptor_namespace_get_uri(el_nspace)); field_nspace_URI = rdf_parser->world->rss_namespaces_info_uris[raptor_rss_fields_info[i].nspace]; if(raptor_uri_equals_v2(rdf_parser->world, nspace_URI, field_nspace_URI)) { rss_parser->current_field = (raptor_rss_fields_type)i; break; } } if(rss_parser->current_field == RAPTOR_RSS_FIELD_UNKNOWN) { RAPTOR_DEBUG3("Unknown field element named %s inside type %s\n", name, raptor_rss_items_info[rss_parser->current_type].name); return; } /* Found a block element to process */ if(raptor_rss_fields_info[rss_parser->current_field].flags & RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE) { raptor_rss_type block_type; raptor_rss_item* update_item; const unsigned char *id; block_type = raptor_rss_fields_info[rss_parser->current_field].block_type; RAPTOR_DEBUG3("FOUND new block type %d - %s\n", block_type, raptor_rss_items_info[block_type].name); update_item = raptor_rss_get_current_item(rss_parser); id = raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); block = raptor_new_rss_block(rdf_parser->world, block_type, id); raptor_rss_item_add_block(update_item, block); rss_parser->current_block = block; rss_parser->nspaces_seen[raptor_rss_items_info[block_type].nspace] = 'Y'; /* Now check block attributes */ if(named_attrs) { for (i = 0; i < ns_attributes_count; i++) { raptor_qname* attr = named_attrs[i]; const char* attrName = (const char*)attr->local_name; const unsigned char* attrValue = attr->value; const raptor_rss_block_field_info *bfi; int attribute_type = -1; int offset = -1; for(bfi = &raptor_rss_block_fields_info[0]; bfi->type != RAPTOR_RSS_NONE; bfi++) { if(!bfi->attribute) continue; if(bfi->type == block_type && !strcmp(attrName, bfi->attribute)) { attribute_type = bfi->attribute_type; offset = bfi->offset; break; } } if(offset < 0) continue; /* Found attribute for this block type */ RAPTOR_DEBUG3(" found block attribute %s=%s\n", attrName, attrValue); raptor_rss_block_set_field(rdf_parser->world, base_uri, block, bfi, (const char*)attrValue); } } return; } /* Process field */ RAPTOR_DEBUG4("FOUND field %d - %s inside type %s\n", rss_parser->current_field, raptor_rss_fields_info[rss_parser->current_field].name, raptor_rss_items_info[rss_parser->current_type].name); /* Mark namespace seen in new field */ if(1) { rss_info_namespace ns_index; ns_index = raptor_rss_fields_info[rss_parser->current_field].nspace; rss_parser->nspaces_seen[ns_index] = 'Y'; } /* Now check for field attributes */ if(named_attrs) { for (i = 0; i < ns_attributes_count; i++) { raptor_qname* attr = named_attrs[i]; const unsigned char* attrName = attr->local_name; const unsigned char* attrValue = attr->value; RAPTOR_DEBUG3(" attribute %s=%s\n", attrName, attrValue); /* Pick a few attributes to care about */ if(!strcmp((const char*)attrName, "isPermaLink")) { raptor_rss_item* update_item = rss_parser->model.last; if(!strcmp((const char*)name, "guid")) { /* <guid isPermaLink="..."> */ if(update_item) { raptor_rss_field* field = raptor_rss_new_field(rdf_parser->world); RAPTOR_DEBUG1("fa1 - "); raptor_rss_item_add_field(update_item, RAPTOR_RSS_FIELD_GUID, field); if(!strcmp((const char*)attrValue, "true")) { RAPTOR_DEBUG2(" setting guid to URI '%s'\n", attrValue); field->uri = raptor_new_uri_relative_to_base_v2(rdf_parser->world, base_uri, (const unsigned char*)attrValue); } else { size_t len = strlen((const char*)attrValue); RAPTOR_DEBUG2(" setting guid to string '%s'\n", attrValue); field->value = (unsigned char*)RAPTOR_MALLOC(cstring, len+1); strncpy((char*)field->value, (char*)attrValue, len+1); } } } } else if(!strcmp((const char*)attrName, "href")) { if(rss_parser->current_field == RAPTOR_RSS_FIELD_LINK || rss_parser->current_field == RAPTOR_RSS_FIELD_ATOM_LINK) { RAPTOR_DEBUG2(" setting href as URI string for type %s\n", raptor_rss_items_info[rss_parser->current_type].name); if(rss_element->uri) raptor_free_uri_v2(rdf_parser->world, rss_element->uri); rss_element->uri = raptor_new_uri_relative_to_base_v2(rdf_parser->world, base_uri, (const unsigned char*)attrValue); } } else if (!strcmp((const char*)attrName, "type")) { if(rss_parser->current_field == RAPTOR_RSS_FIELD_ATOM_LINK) { /* do nothing with atom link attribute type */ } else if(rss_parser->is_atom) { /* Atom only typing */ if (!strcmp((const char*)attrValue, "xhtml") || !strcmp((const char*)attrValue, "xml") || strstr((const char*)attrValue, "+xml")) { RAPTOR_DEBUG2(" found type '%s', making an XML writer\n", attrValue); rss_element->type = RAPTOR_RSS_CONTENT_TYPE_XML; rss_element->iostream = raptor_new_iostream_to_string(&rss_element->xml_content, &rss_element->xml_content_length, raptor_alloc_memory); rss_element->xml_writer = raptor_new_xml_writer_v2(rdf_parser->world, NULL, rss_element->iostream, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser, 1); raptor_xml_writer_set_feature(rss_element->xml_writer, RAPTOR_FEATURE_WRITER_XML_DECLARATION, 0); raptor_free_stringbuffer(rss_element->sb); rss_element->sb = NULL; } } } else if (!strcmp((const char*)attrName, "version")) { if(!raptor_strcasecmp((const char*)name, "feed")) { if(!strcmp((const char*)attrValue, "0.3")) rss_parser->is_atom = 1; } } } } /* if have field attributes */ } static void raptor_rss_end_element_handler(void *user_data, raptor_xml_element* xml_element) { raptor_parser* rdf_parser; raptor_rss_parser* rss_parser; #ifdef RAPTOR_DEBUG const unsigned char* name = raptor_xml_element_get_name(xml_element)->local_name; #endif raptor_rss_element* rss_element; size_t cdata_len = 0; unsigned char* cdata = NULL; rss_element = (raptor_rss_element*)xml_element->user_data; rdf_parser = (raptor_parser*)user_data; rss_parser = (raptor_rss_parser*)rdf_parser->context; if(rss_element->xml_writer) { if(rss_element->type != RAPTOR_RSS_CONTENT_TYPE_XML) { raptor_xml_writer_end_element(rss_element->xml_writer, xml_element); goto tidy_end_element; } /* otherwise we are done making XML */ raptor_free_iostream(rss_element->iostream); rss_element->iostream = NULL; cdata = (unsigned char*)rss_element->xml_content; cdata_len = rss_element->xml_content_length; } if(rss_element->sb) { cdata_len = raptor_stringbuffer_length(rss_element->sb); cdata = raptor_stringbuffer_as_string(rss_element->sb); } if(cdata) { raptor_uri* base_uri = NULL; base_uri = raptor_sax2_inscope_base_uri(rss_parser->sax2); if(rss_parser->current_block) { const raptor_rss_block_field_info *bfi; int handled = 0; /* in a block, maybe store the CDATA there */ for(bfi = &raptor_rss_block_fields_info[0]; bfi->type != RAPTOR_RSS_NONE; bfi++) { if(bfi->type != rss_parser->current_block->rss_type || bfi->attribute != NULL) continue; /* Set author name from element */ raptor_rss_block_set_field(rdf_parser->world, base_uri, rss_parser->current_block, bfi, (const char*)cdata); handled = 1; break; } #ifdef RAPTOR_DEBUG if(!handled) { raptor_rss_type block_type = rss_parser->current_block->rss_type; RAPTOR_DEBUG3("Ignoring cdata for block %d - %s\n", block_type, raptor_rss_items_info[block_type].name); } #endif rss_parser->current_block = NULL; goto do_end_element; } if(rss_parser->current_type == RAPTOR_RSS_NONE || (rss_parser->current_field == RAPTOR_RSS_FIELD_NONE || rss_parser->current_field == RAPTOR_RSS_FIELD_UNKNOWN)) { unsigned char *p = cdata; int i; for(i = cdata_len; i>0 && *p; i--) { if(!isspace(*p)) break; p++; } if(i>0 && *p) { RAPTOR_DEBUG4("IGNORING non-whitespace text '%s' inside type %s, field %s\n", cdata, raptor_rss_items_info[rss_parser->current_type].name, raptor_rss_fields_info[rss_parser->current_field].name); } goto do_end_element; } if(rss_parser->current_type >= RAPTOR_RSS_COMMON_IGNORED) { /* skipHours, skipDays common but IGNORED */ RAPTOR_DEBUG2("Ignoring fields for type %s\n", raptor_rss_items_info[rss_parser->current_type].name); } else { raptor_rss_item* update_item = raptor_rss_get_current_item(rss_parser); raptor_rss_field* field = raptor_rss_new_field(rdf_parser->world); /* if value is always an uri, make it so */ if(raptor_rss_fields_info[rss_parser->current_field].flags & RAPTOR_RSS_INFO_FLAG_URI_VALUE) { RAPTOR_DEBUG4("Added URI %s to field %s of type %s\n", cdata, raptor_rss_fields_info[rss_parser->current_field].name, raptor_rss_items_info[rss_parser->current_type].name); field->uri = raptor_new_uri_relative_to_base_v2(rdf_parser->world, base_uri, cdata); } else { RAPTOR_DEBUG4("Added text '%s' to field %s of type %s\n", cdata, raptor_rss_fields_info[rss_parser->current_field].name, raptor_rss_items_info[rss_parser->current_type].name); field->uri = NULL; field->value = (unsigned char*)RAPTOR_MALLOC(cstring, cdata_len+1); strncpy((char*)field->value, (const char*)cdata, cdata_len); field->value[cdata_len] = '\0'; } RAPTOR_DEBUG1("fa3 - "); raptor_rss_item_add_field(update_item, rss_parser->current_field, field); } } /* end if contained cdata */ if(raptor_xml_element_is_empty(xml_element)) { /* Empty element, so consider adding one of the attributes as * literal or URI content */ if(rss_parser->current_type >= RAPTOR_RSS_COMMON_IGNORED) { /* skipHours, skipDays common but IGNORED */ RAPTOR_DEBUG3("Ignoring empty element %s for type %s\n", name, raptor_rss_items_info[rss_parser->current_type].name); } else if(rss_element->uri) { raptor_rss_item* update_item = raptor_rss_get_current_item(rss_parser); raptor_rss_field* field = raptor_rss_new_field(rdf_parser->world); if(rss_parser->current_field == RAPTOR_RSS_FIELD_UNKNOWN) { RAPTOR_DEBUG2("Cannot add URI from alternate attribute to type %s unknown field\n", raptor_rss_items_info[rss_parser->current_type].name); raptor_rss_field_free(field); } else { RAPTOR_DEBUG3("Added URI to field %s of type %s\n", raptor_rss_fields_info[rss_parser->current_field].name, raptor_rss_items_info[rss_parser->current_type].name); field->uri = rss_element->uri; rss_element->uri = NULL; RAPTOR_DEBUG1("fa2 - "); raptor_rss_item_add_field(update_item, rss_parser->current_field, field); } } } do_end_element: if(rss_parser->current_type != RAPTOR_RSS_NONE) { if(rss_parser->current_field != RAPTOR_RSS_FIELD_NONE) { RAPTOR_DEBUG3("Ending element %s field %s\n", name, raptor_rss_fields_info[rss_parser->current_field].name); rss_parser->current_field = RAPTOR_RSS_FIELD_NONE; } else { RAPTOR_DEBUG3("Ending element %s type %s\n", name, raptor_rss_items_info[rss_parser->current_type].name); if(rss_parser->prev_type != RAPTOR_RSS_NONE) { rss_parser->current_type = rss_parser->prev_type; rss_parser->prev_type = RAPTOR_RSS_NONE; RAPTOR_DEBUG3("Returning to type %d - %s\n", rss_parser->current_type, raptor_rss_items_info[rss_parser->current_type].name); } else rss_parser->current_type = RAPTOR_RSS_NONE; } } if(rss_parser->current_block) { #ifdef RAPTOR_DEBUG raptor_rss_type block_type = rss_parser->current_block->rss_type; RAPTOR_DEBUG3("Ending current block %d - %s\n", block_type, raptor_rss_items_info[block_type].name); #endif rss_parser->current_block = NULL; } tidy_end_element: if(rss_element) raptor_free_rss_element(rss_element); } static void raptor_rss_cdata_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len) { raptor_rss_element* rss_element; rss_element = (raptor_rss_element*)xml_element->user_data; if(rss_element->xml_writer) { raptor_xml_writer_cdata_counted(rss_element->xml_writer, s, len); return; } raptor_stringbuffer_append_counted_string(rss_element->sb, s, len, 1); } static void raptor_rss_comment_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s) { raptor_rss_element* rss_element; if(!xml_element) return; rss_element = (raptor_rss_element*)xml_element->user_data; if(rss_element->xml_writer) { raptor_xml_writer_comment(rss_element->xml_writer, s); return; } } static void raptor_rss_sax2_new_namespace_handler(void *user_data, raptor_namespace* nspace) { raptor_parser* rdf_parser = (raptor_parser*)user_data; raptor_rss_parser* rss_parser; int n; rss_parser = (raptor_rss_parser*)rdf_parser->context; for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) { raptor_uri* ns_uri = rdf_parser->world->rss_namespaces_info_uris[n]; if(!ns_uri) continue; if(!raptor_uri_equals_v2(rdf_parser->world, ns_uri, nspace->uri)) { rss_parser->nspaces_seen[n] = 'Y'; break; } } } /* Add an rss:link from string contents of either: * atom:id * atom:link[@rel="self"]/@href */ static void raptor_rss_insert_rss_link(raptor_parser* rdf_parser, raptor_rss_item* item) { raptor_rss_block *block; raptor_rss_field* id_field; raptor_rss_field* field = NULL; /* Try atom:id first */ id_field = item->fields[RAPTOR_RSS_FIELD_ATOM_ID]; if(id_field && id_field->value) { const char *value = (const char*)id_field->value; size_t len = strlen(value); field = raptor_rss_new_field(item->world); field->value = (unsigned char*)RAPTOR_MALLOC(cstring, len + 1); strncpy((char*)field->value, (const char*)value, len + 1); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_LINK, field); return; } for(block = item->blocks; block; block = block->next) { if(block->rss_type != RAPTOR_ATOM_LINK) continue; /* FIXME - <link @href> is url 0 and <link @rel> is string 0 * We just "know" this although the raptor_rss_block_fields_info * structure records it. */ if(!block->urls[0] || (block->strings[0] && strcmp(block->strings[0], "self")) ) continue; /* set the field rss:link to the string value of the @href */ field = raptor_rss_new_field(item->world); field->value = raptor_uri_to_string_v2(rdf_parser->world, block->urls[0]); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_LINK, field); return; } } static void raptor_rss_insert_identifiers(raptor_parser* rdf_parser) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int i; raptor_rss_item* item; for(i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { for(item = rss_parser->model.common[i]; item; item = item->next) { raptor_identifier* identifier; identifier = &(item->identifier); if(!item->fields_count) continue; RAPTOR_DEBUG3("Inserting identifiers in common type %d - %s\n", i, raptor_rss_items_info[i].name); if(item->uri) { raptor_uri *new_uri = raptor_uri_copy_v2(rdf_parser->world, item->uri); raptor_set_identifier_uri(identifier, new_uri); } else { int url_fields[2]; int url_fields_count = 1; int f; url_fields[0] = (i== RAPTOR_RSS_IMAGE) ? RAPTOR_RSS_FIELD_URL : RAPTOR_RSS_FIELD_LINK; if(i == RAPTOR_RSS_CHANNEL) { url_fields[1] = RAPTOR_RSS_FIELD_ATOM_ID; url_fields_count++; } for(f = 0; f < url_fields_count; f++) { raptor_rss_field* field; for(field = item->fields[url_fields[f]]; field; field = field->next) { raptor_uri *new_uri; if(field->value) new_uri = raptor_new_uri_v2(rdf_parser->world, (const unsigned char*)field->value); else if(field->uri) new_uri = raptor_uri_copy_v2(rdf_parser->world, field->uri); raptor_set_identifier_uri(identifier, new_uri); break; } } if(!identifier->uri) { const unsigned char *id; /* need to make bnode */ id = raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); raptor_set_identifier_id(identifier, id); } } /* Try to add an rss:link if missing */ if(i == RAPTOR_RSS_CHANNEL && !item->fields[RAPTOR_RSS_FIELD_LINK]) raptor_rss_insert_rss_link(rdf_parser, item); item->node_type = &raptor_rss_items_info[i]; item->node_typei = i; } } /* sequence of rss:item */ for(item = rss_parser->model.items; item; item = item->next) { raptor_identifier* identifier = &item->identifier; raptor_rss_block *block; raptor_uri* uri; if(!item->fields[RAPTOR_RSS_FIELD_LINK]) raptor_rss_insert_rss_link(rdf_parser, item); if(item->uri) { uri = raptor_uri_copy_v2(rdf_parser->world, item->uri); } else { if (item->fields[RAPTOR_RSS_FIELD_LINK]) { if (item->fields[RAPTOR_RSS_FIELD_LINK]->value) uri = raptor_new_uri_v2(rdf_parser->world, (const unsigned char*)item->fields[RAPTOR_RSS_FIELD_LINK]->value); else if(item->fields[RAPTOR_RSS_FIELD_LINK]->uri) uri = raptor_uri_copy_v2(rdf_parser->world, item->fields[RAPTOR_RSS_FIELD_LINK]->uri); } else if(item->fields[RAPTOR_RSS_FIELD_ATOM_ID]) { if (item->fields[RAPTOR_RSS_FIELD_ATOM_ID]->value) uri = raptor_new_uri_v2(rdf_parser->world, (const unsigned char*)item->fields[RAPTOR_RSS_FIELD_ATOM_ID]->value); else if(item->fields[RAPTOR_RSS_FIELD_ATOM_ID]->uri) uri = raptor_uri_copy_v2(rdf_parser->world, item->fields[RAPTOR_RSS_FIELD_ATOM_ID]->uri); } } raptor_set_identifier_uri(identifier, uri); for(block = item->blocks; block; block = block->next) { if(!block->identifier.uri && !block->identifier.id) { const unsigned char *id; /* need to make bnode */ id = raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); raptor_set_identifier_id(identifier, id); } } item->node_type = &raptor_rss_items_info[RAPTOR_RSS_ITEM]; item->node_typei = RAPTOR_RSS_ITEM; } } static int raptor_rss_emit_type_triple(raptor_parser* rdf_parser, raptor_identifier *resource, raptor_uri *type_uri) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; if(!resource->uri && !resource->id) { raptor_parser_error(rdf_parser, "RSS node has no identifier"); return 1; } rss_parser->statement.subject = resource->uri ? (void*)resource->uri : (void*)resource->id; rss_parser->statement.subject_type = resource->type; rss_parser->statement.predicate = RAPTOR_RSS_RDF_type_URI(&rss_parser->model); rss_parser->statement.predicate_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; rss_parser->statement.object = (void*)type_uri; rss_parser->statement.object_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; rss_parser->statement.object_literal_language = NULL; rss_parser->statement.object_literal_datatype = NULL; /* Generate the statement */ (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); return 0; } static int raptor_rss_emit_block(raptor_parser* rdf_parser, raptor_identifier *resource, raptor_rss_block *block) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; raptor_identifier* identifier = &block->identifier; raptor_rss_type block_type = block->rss_type; raptor_uri *predicate_uri; const raptor_rss_block_field_info *bfi; raptor_rss_fields_type predicate_field; if(!identifier->uri && !identifier->id) { raptor_parser_error(rdf_parser, "Block has no identifier"); return 1; } rss_parser->statement.subject = resource->uri ? (void*)resource->uri : (void*)resource->id; rss_parser->statement.subject_type = resource->type; predicate_field = raptor_rss_items_info[block_type].predicate; predicate_uri = rdf_parser->world->rss_fields_info_uris[predicate_field]; rss_parser->statement.predicate = predicate_uri; rss_parser->statement.predicate_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; if(identifier->uri) { rss_parser->statement.object = identifier->uri; rss_parser->statement.object_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; } else { rss_parser->statement.object = identifier->id; rss_parser->statement.object_type = RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; } rss_parser->statement.object_literal_language = NULL; rss_parser->statement.object_literal_datatype = NULL; (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); if(raptor_rss_emit_type_triple(rdf_parser, identifier, block->node_type)) return 1; for(bfi = &raptor_rss_block_fields_info[0]; bfi->type != RAPTOR_RSS_NONE; bfi++) { int attribute_type; int offset; if(bfi->type != block_type || !bfi->attribute) continue; attribute_type = bfi->attribute_type; offset = bfi->offset; predicate_uri = rdf_parser->world->rss_fields_info_uris[bfi->field]; rss_parser->statement.predicate = predicate_uri; if(attribute_type == RSS_BLOCK_FIELD_TYPE_URL) { raptor_uri *uri = block->urls[offset]; if(uri) { rss_parser->statement.object = uri; rss_parser->statement.object_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); } } else if (attribute_type == RSS_BLOCK_FIELD_TYPE_STRING) { const char *str = block->strings[offset]; if(str) { rss_parser->statement.object = str; rss_parser->statement.object_type = RAPTOR_IDENTIFIER_TYPE_LITERAL; (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); } } else { #ifdef RAPTOR_DEBUG RAPTOR_FATAL2("Found unknown attribute_type %d\n", attribute_type); #endif } } return 0; } static int raptor_rss_emit_item(raptor_parser* rdf_parser, raptor_rss_item *item) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int f; raptor_identifier* identifier = &item->identifier; raptor_rss_block *block; raptor_uri *type_uri; if(!item->fields_count) return 0; /* HACK - FIXME - set correct atom output class type */ if(item->node_typei == RAPTOR_ATOM_AUTHOR) type_uri = rdf_parser->world->rss_fields_info_uris[RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS]; else type_uri = rdf_parser->world->rss_types_info_uris[item->node_typei]; if(raptor_rss_emit_type_triple(rdf_parser, identifier, type_uri)) return 1; for(f = 0; f< RAPTOR_RSS_FIELDS_SIZE; f++) { raptor_rss_field* field; /* This is only made by a connection */ if(f == RAPTOR_RSS_FIELD_ITEMS) continue; rss_parser->statement.predicate = rdf_parser->world->rss_fields_info_uris[f]; if(!rss_parser->statement.predicate) continue; rss_parser->statement.predicate_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; for (field = item->fields[f]; field; field = field->next) { rss_parser->statement.object_literal_language = NULL; rss_parser->statement.object_literal_datatype = NULL; if(field->value) { rss_parser->statement.object = field->value; rss_parser->statement.object_type = RAPTOR_IDENTIFIER_TYPE_LITERAL; /* FIXME - should store and emit languages */ } else { rss_parser->statement.object = field->uri; rss_parser->statement.object_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; } /* Generate the statement */ (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); } } for(block = item->blocks; block; block = block->next) { raptor_rss_emit_block(rdf_parser, identifier, block); } return 0; } static int raptor_rss_emit_connection(raptor_parser* rdf_parser, raptor_identifier *subject_identifier, raptor_uri predicate_uri, int predicate_ordinal, raptor_identifier *object_identifier) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; raptor_uri *puri = NULL; if(!subject_identifier->uri && !subject_identifier->id) { raptor_parser_error(rdf_parser, "Connection subject has no identifier"); return 1; } rss_parser->statement.subject = subject_identifier->uri ? (void*)subject_identifier->uri : (void*)subject_identifier->id; rss_parser->statement.subject_type = subject_identifier->type; if(!predicate_uri) { /* new URI object */ puri = raptor_new_uri_from_rdf_ordinal(rdf_parser->world, predicate_ordinal); predicate_uri = puri; } rss_parser->statement.predicate_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; rss_parser->statement.predicate = predicate_uri; rss_parser->statement.object = object_identifier->uri ? (void*)object_identifier->uri : (void*)object_identifier->id; rss_parser->statement.object_type = object_identifier->type; rss_parser->statement.object_literal_language = NULL; rss_parser->statement.object_literal_datatype = NULL; /* Generate the statement */ (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); if(puri) raptor_free_uri_v2(rdf_parser->world, puri); return 0; } static int raptor_rss_emit(raptor_parser* rdf_parser) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int i; raptor_rss_item* item; if (!rss_parser->model.common[RAPTOR_RSS_CHANNEL]) { raptor_parser_error(rdf_parser, "No RSS channel item present"); return 1; } if(!rss_parser->model.common[RAPTOR_RSS_CHANNEL]->identifier.uri && !rss_parser->model.common[RAPTOR_RSS_CHANNEL]->identifier.id) { raptor_parser_error(rdf_parser, "RSS channel has no identifier"); return 1; } for (i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { for (item = rss_parser->model.common[i]; item; item = item->next) { if(!item->fields_count) continue; RAPTOR_DEBUG3("Emitting type %i - %s\n", i, raptor_rss_items_info[i].name); if(!item->identifier.uri && !item->identifier.id) { raptor_parser_error(rdf_parser, "RSS %s has no identifier", raptor_rss_items_info[i].name); return 1; } if(raptor_rss_emit_item(rdf_parser, item)) return 1; /* Add connections to channel */ if(i != RAPTOR_RSS_CHANNEL) { if(raptor_rss_emit_connection(rdf_parser, &(rss_parser->model.common[RAPTOR_RSS_CHANNEL]->identifier), rdf_parser->world->rss_types_info_uris[i], 0, &(item->identifier))) return 1; } } } if(rss_parser->model.items_count) { raptor_identifier *items; /* make a new genid for the <rdf:Seq> node */ items = raptor_new_identifier_v2(rdf_parser->world, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, NULL, RAPTOR_URI_SOURCE_GENERATED, (const unsigned char*)raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL), NULL, NULL, NULL); /* _:genid1 rdf:type rdf:Seq . */ if(raptor_rss_emit_type_triple(rdf_parser, items, RAPTOR_RSS_RDF_Seq_URI(&rss_parser->model))) { raptor_free_identifier(items); return 1; } /* <channelURI> rss:items _:genid1 . */ if(raptor_rss_emit_connection(rdf_parser, &(rss_parser->model.common[RAPTOR_RSS_CHANNEL]->identifier), rdf_parser->world->rss_fields_info_uris[RAPTOR_RSS_FIELD_ITEMS], 0, items)) { raptor_free_identifier(items); return 1; } /* sequence of rss:item */ for(i = 1, item = rss_parser->model.items; item; item = item->next, i++) { if(raptor_rss_emit_item(rdf_parser, item) || raptor_rss_emit_connection(rdf_parser, items, NULL, i, &(item->identifier))) { raptor_free_identifier(items); return 1; } } raptor_free_identifier(items); } return 0; } static int raptor_rss_copy_field(raptor_rss_parser* rss_parser, raptor_rss_item* item, const raptor_field_pair* pair) { raptor_rss_fields_type from_field = pair->from; raptor_rss_fields_type to_field = pair->to; raptor_rss_field* field = NULL; if(!(item->fields[from_field] && item->fields[from_field]->value)) return 1; if(from_field == to_field) { field = item->fields[from_field]; } else { if(item->fields[to_field] && item->fields[to_field]->value) return 1; field = raptor_rss_new_field(item->world); field->is_mapped = 1; raptor_rss_item_add_field(item, to_field, field); } /* Ensure output namespace is declared */ rss_parser->nspaces_seen[raptor_rss_fields_info[to_field].nspace] = 'Y'; if(!field->value) { if(pair->conversion) pair->conversion(item->fields[from_field], field); else { size_t len; /* Otherwise default action is to copy from_field value */ len = strlen((const char*)item->fields[from_field]->value); field->value = (unsigned char*)RAPTOR_MALLOC(cstring, len + 1); strncpy((char*)field->value, (const char*)item->fields[from_field]->value, len + 1); } } return 0; } static void raptor_rss_uplift_fields(raptor_rss_parser* rss_parser, raptor_rss_item* item) { int i; /* COPY some fields from atom to rss/dc */ for(i = 0; raptor_atom_to_rss[i].from != RAPTOR_RSS_FIELD_UNKNOWN; i++) { #ifdef RAPTOR_DEBUG raptor_rss_fields_type from_field = raptor_atom_to_rss[i].from; raptor_rss_fields_type to_field = raptor_atom_to_rss[i].to; #endif if(raptor_rss_copy_field(rss_parser, item, &raptor_atom_to_rss[i])) continue; RAPTOR_DEBUG3("Copied field %s to rss field %s\n", raptor_rss_fields_info[from_field].name, raptor_rss_fields_info[to_field].name); } } static void raptor_rss_uplift_items(raptor_parser* rdf_parser) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int i; raptor_rss_item* item; for(i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { for(item = rss_parser->model.common[i]; item; item = item->next) { raptor_rss_uplift_fields(rss_parser, item); } } for(item = rss_parser->model.items; item; item = item->next) { raptor_rss_uplift_fields(rss_parser, item); } } static void raptor_rss_start_namespaces(raptor_parser* rdf_parser) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int i; int n; /* for each item type (channel, item, ...) */ for (i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { raptor_rss_item* item; /* for each item instance of a type */ for (item = rss_parser->model.common[i]; item; item = item->next) { int f; if(!item->fields_count) continue; /* for each field */ for(f = 0; f< RAPTOR_RSS_FIELDS_SIZE; f++) { raptor_rss_field* field; /* for each field value */ for (field = item->fields[f]; field; field = field->next) { rss_info_namespace ns_index = raptor_rss_fields_info[f].nspace; rss_parser->nspaces_seen[ns_index] = 'Y'; /* knowing there is one value is enough */ break; } } } } /* start the namespaces */ for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) { if(rss_parser->nspaces[n] && rss_parser->nspaces_seen[n] == 'Y') raptor_parser_start_namespace(rdf_parser, rss_parser->nspaces[n]); } } static int raptor_rss_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; if(rdf_parser->failed) return 1; raptor_sax2_parse_chunk(rss_parser->sax2, s, len, is_end); if(!is_end) return 0; if(rdf_parser->failed) return 1; /* turn strings into URIs, move things around if needed */ raptor_rss_insert_identifiers(rdf_parser); /* add some new fields */ raptor_rss_uplift_items(rdf_parser); /* find out what namespaces to declare and start them */ raptor_rss_start_namespaces(rdf_parser); /* generate the triples */ raptor_rss_emit(rdf_parser); return 0; } static int raptor_rss_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score = 0; if(suffix) { if(!strcmp((const char*)suffix, "rss")) score = 7; if(!strcmp((const char*)suffix, "atom")) score = 5; if(!strcmp((const char*)suffix, "xml")) score = 4; } if(identifier) { if(!strncmp((const char*)identifier, "http://feed", 11)) score += 5; else if(strstr((const char*)identifier, "feed")) score += 3; if(strstr((const char*)identifier, "rss2")) score += 5; else if(!suffix && strstr((const char*)identifier, "rss")) score += 4; else if(!suffix && strstr((const char*)identifier, "atom")) score += 4; else if(strstr((const char*)identifier, "rss.xml")) score += 4; else if(strstr((const char*)identifier, "atom.xml")) score += 4; } if(mime_type) { if(!strstr((const char*)mime_type, "html")) { if(strstr((const char*)mime_type, "rss")) score += 4; else if(strstr((const char*)mime_type, "xml")) score += 4; else if(strstr((const char*)mime_type, "atom")) score += 4; } } return score; } static int raptor_rss_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->context_length = sizeof(raptor_rss_parser); factory->need_base_uri = 1; factory->init = raptor_rss_parse_init; factory->terminate = raptor_rss_parse_terminate; factory->start = raptor_rss_parse_start; factory->chunk = raptor_rss_parse_chunk; factory->recognise_syntax = raptor_rss_parse_recognise_syntax; rc+= raptor_parser_factory_add_mime_type(factory, "application/rss", 10) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/rss+xml", 10) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "text/rss", 8) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/xml", 3) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "text/xml", 3) != 0; return rc; } int raptor_init_parser_rss(raptor_world* world) { return !raptor_parser_register_factory(world, "rss-tag-soup", "RSS Tag Soup", &raptor_rss_parser_register_factory); } ����������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_rss.h����������������������������������������������������������������������0000644�0001750�0001750�00000036340�11330672502�013172� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rss.h - Redland Parser Toolkit Internal RSS Model and API * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef RAPTOR_RSS_H #define RAPTOR_RSS_H #ifdef __cplusplus extern "C" { #endif typedef enum { /* CONTAINERs */ /* common */ RAPTOR_RSS_CHANNEL, RAPTOR_RSS_IMAGE, RAPTOR_RSS_TEXTINPUT, /* list items */ RAPTOR_RSS_ITEM, /* atom author */ RAPTOR_ATOM_AUTHOR, /* atom link */ RAPTOR_ATOM_LINK, /* itunes owner */ RAPTOR_ITUNES_OWNER, /* containers but IGNORED */ RAPTOR_RSS_SKIPHOURS, RAPTOR_RSS_SKIPDAYS, /* metadata BLOCKs */ RAPTOR_RSS_ENCLOSURE, RAPTOR_ATOM_CATEGORY, RAPTOR_RSS_SOURCE, /* serializing containers */ RAPTOR_ATOM_FEED, RAPTOR_ATOM_ENTRY, /* nothing found yet */ RAPTOR_RSS_NONE, /* deliberately not counting NONE */ RAPTOR_RSS_COMMON_SIZE = RAPTOR_RSS_NONE - RAPTOR_RSS_CHANNEL, RAPTOR_RSS_COMMON_IGNORED = RAPTOR_RSS_SKIPHOURS } raptor_rss_type; /* Namespaces used in RSS */ #define RSS1_0_NAMESPACE_URI "http://purl.org/rss/1.0/" #define RSS0_91_NAMESPACE_URI "http://purl.org/rss/1.0/modules/rss091#" #define RSS2_0_ENC_NAMESPACE_URI "http://purl.oclc.org/net/rss_2.0/enc#" #define ATOM0_3_NAMESPACE_URI "http://purl.org/atom/ns#" #define DC_NAMESPACE_URI "http://purl.org/dc/elements/1.1/" #define RSS1_1_NAMESPACE_URI "http://purl.org/net/rss1.1#" #define CONTENT_NAMESPACE_URI "http://purl.org/rss/1.0/modules/content/" #define ATOM1_0_NAMESPACE_URI "http://www.w3.org/2005/Atom" #define RDF_NAMESPACE_URI "http://www.w3.org/1999/02/22-rdf-syntax-ns#" #define ATOMTRIPLES_NAMESPACE_URI "http://purl.org/syndication/atomtriples/1" #define ITUNES_NAMESPACE_URI "http://www.itunes.com/dtds/podcast-1.0.dtd" /* Old netscape namespace, turn into RSS 1.0 */ #define RSS0_9_NAMESPACE_URI "http://my.netscape.com/rdf/simple/0.9/" typedef enum { RSS_UNKNOWN_NS = 0, RSS_NO_NS = 1, RSS0_91_NS = 2, RSS0_9_NS = 3, RSS0_92_NS = RSS_NO_NS, RSS2_0_NS = RSS_NO_NS, RSS1_0_NS = 4, ATOM0_3_NS = 5, DC_NS = 6, RSS2_0_ENC_NS = 7, RSS1_1_NS = 8, CONTENT_NS = 9, ATOM1_0_NS = 10, RDF_NS = 11, ATOMTRIPLES_NS = 12, ITUNES_NS = 13, RAPTOR_RSS_NAMESPACES_SIZE = ITUNES_NS + 1 } rss_info_namespace; typedef struct { const char *uri_string; const char *prefix; } raptor_rss_namespace_info; extern const raptor_rss_namespace_info raptor_rss_namespaces_info[RAPTOR_RSS_NAMESPACES_SIZE]; #define RAPTOR_RSS_INFO_FLAG_URI_VALUE 1 #define RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE 2 /* Namespaced elements used in feeds */ typedef struct { const char* name; rss_info_namespace nspace; int flags; raptor_rss_type block_type; } raptor_rss_field_info; /* Fields of typed nodes used in RSS */ typedef enum { RAPTOR_RSS_FIELD_TITLE, RAPTOR_RSS_FIELD_LINK, RAPTOR_RSS_FIELD_DESCRIPTION, RAPTOR_RSS_FIELD_URL, /* image */ RAPTOR_RSS_FIELD_NAME, /* textinput */ RAPTOR_RSS_FIELD_LANGUAGE, /* channel 0.91 */ RAPTOR_RSS_FIELD_RATING, /* channel 0.91 */ RAPTOR_RSS_FIELD_COPYRIGHT, /* channel 0.91 */ RAPTOR_RSS_FIELD_PUBDATE, /* channel 0.91, item 2.0 */ RAPTOR_RSS_FIELD_LASTBUILDDATE, /* channel 0.91 */ RAPTOR_RSS_FIELD_DOCS, /* channel 0.91 */ RAPTOR_RSS_FIELD_MANAGINGEDITOR,/* channel 0.91 */ RAPTOR_RSS_FIELD_WEBMASTER, /* channel 0.91 */ RAPTOR_RSS_FIELD_CLOUD, /* channel 0.92, 2.0 */ RAPTOR_RSS_FIELD_TTL, /* channel 2.0 */ RAPTOR_RSS_FIELD_WIDTH, /* image 0.91 */ RAPTOR_RSS_FIELD_HEIGHT, /* image 0.91 */ RAPTOR_RSS_FIELD_HOUR, /* skipHours 0.91 */ RAPTOR_RSS_FIELD_DAY, /* skipDays 0.91 */ RAPTOR_RSS_FIELD_GENERATOR, /* channel 0.92, 2.0 */ RAPTOR_RSS_FIELD_SOURCE, /* item 0.92, 2.0 */ RAPTOR_RSS_FIELD_AUTHOR, /* item 2.0 */ RAPTOR_RSS_FIELD_GUID, /* item 2.0 */ RAPTOR_RSS_FIELD_ENCLOSURE, /* item 0.92, 2.0 */ RAPTOR_RSS_RDF_ENCLOSURE, /* In RDF output, not an RSS field */ RAPTOR_RSS_RDF_ENCLOSURE_CLASS, /* In RDF output, not an RSS field */ RAPTOR_RSS_RDF_ENCLOSURE_URL, /* In RDF output, not an RSS field */ RAPTOR_RSS_RDF_ENCLOSURE_LENGTH, /* In RDF output, not an RSS field */ RAPTOR_RSS_RDF_ENCLOSURE_TYPE, /* In RDF output, not an RSS field */ RAPTOR_RSS_FIELD_LENGTH, /* item 0.92, 2.0 */ RAPTOR_RSS_FIELD_TYPE, /* item 0.92, 2.0 */ RAPTOR_RSS_FIELD_CATEGORY, /* item 0.92, 2.0, channel 2.0 */ RAPTOR_RSS_FIELD_COMMENTS, /* comments v? */ RAPTOR_RSS_FIELD_ITEMS, /* rss 1.0 items */ RAPTOR_RSS_FIELD_IMAGE, /* rss 1.0 property from channel->image) */ RAPTOR_RSS_FIELD_TEXTINPUT, /* rss 1.0 property from channel->textinput */ RAPTOR_RSS_FIELD_ATOM_COPYRIGHT, /* atom 0.3 copyright */ RAPTOR_RSS_FIELD_ATOM_CREATED, /* atom 0.3 created */ RAPTOR_RSS_FIELD_ATOM_ISSUED, /* atom 0.3 issued */ RAPTOR_RSS_FIELD_ATOM_MODIFIED, /* atom 0.3 modified */ RAPTOR_RSS_FIELD_ATOM_TAGLINE, /* atom 0.3 tagline */ /* atom 1.0 required fields */ RAPTOR_RSS_FIELD_ATOM_ID, /* atom 1.0 id */ RAPTOR_RSS_FIELD_ATOM_TITLE, /* atom 1.0 title */ RAPTOR_RSS_FIELD_ATOM_UPDATED, /* atom 1.0 updated */ /* atom 1.0 optional fields */ RAPTOR_RSS_FIELD_ATOM_AUTHOR, /* atom 1.0 author */ RAPTOR_RSS_FIELD_ATOM_CATEGORY, /* atom 1.0 category */ RAPTOR_RSS_FIELD_ATOM_CONTENT, /* atom 1.0 content */ RAPTOR_RSS_FIELD_ATOM_CONTRIBUTOR, /* atom 1.0 contributor */ RAPTOR_RSS_FIELD_ATOM_EMAIL, /* atom 1.0 email */ RAPTOR_RSS_FIELD_ATOM_ENTRY, /* atom 1.0 entry */ RAPTOR_RSS_FIELD_ATOM_FEED, /* atom 1.0 feed */ RAPTOR_RSS_FIELD_ATOM_GENERATOR, /* atom 1.0 generator */ RAPTOR_RSS_FIELD_ATOM_ICON, /* atom 1.0 icon */ RAPTOR_RSS_FIELD_ATOM_LINK, /* atom 1.0 link */ RAPTOR_RSS_FIELD_ATOM_LOGO, /* atom 1.0 logo */ RAPTOR_RSS_FIELD_ATOM_NAME, /* atom 1.0 name */ RAPTOR_RSS_FIELD_ATOM_PUBLISHED, /* atom 1.0 published */ RAPTOR_RSS_FIELD_ATOM_RIGHTS, /* atom 1.0 rights */ RAPTOR_RSS_FIELD_ATOM_SOURCE, /* atom 1.0 source */ RAPTOR_RSS_FIELD_ATOM_SUBTITLE, /* atom 1.0 subtitle */ RAPTOR_RSS_FIELD_ATOM_SUMMARY, /* atom 1.0 summary */ RAPTOR_RSS_FIELD_ATOM_URI, /* atom 1.0 uri */ RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS, /* In RDF output, not atom field */ RAPTOR_RSS_RDF_ATOM_CATEGORY_CLASS, /* In RDF output, not atom field */ RAPTOR_RSS_RDF_ATOM_LINK_CLASS, /* In RDF output, not atom field */ RAPTOR_RSS_FIELD_ATOM_LABEL, /* atom 1.0 attribute label */ RAPTOR_RSS_FIELD_ATOM_SCHEME, /* atom 1.0 attribute scheme */ RAPTOR_RSS_FIELD_ATOM_TERM, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_HREF, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_REL, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_TYPE, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_HREFLANG, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_LENGTH, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_DC_TITLE, /* DC title */ RAPTOR_RSS_FIELD_DC_CONTRIBUTOR, /* DC contributor */ RAPTOR_RSS_FIELD_DC_CREATOR, /* DC creator */ RAPTOR_RSS_FIELD_DC_PUBLISHER, /* DC publisher */ RAPTOR_RSS_FIELD_DC_SUBJECT, /* DC subject */ RAPTOR_RSS_FIELD_DC_DESCRIPTION, /* DC description */ RAPTOR_RSS_FIELD_DC_DATE, /* DC date */ RAPTOR_RSS_FIELD_DC_TYPE, /* DC type */ RAPTOR_RSS_FIELD_DC_FORMAT, /* DC format */ RAPTOR_RSS_FIELD_DC_IDENTIFIER, /* DC identifier */ RAPTOR_RSS_FIELD_DC_LANGUAGE, /* DC language */ RAPTOR_RSS_FIELD_DC_RELATION, /* DC relation */ RAPTOR_RSS_FIELD_DC_SOURCE, /* DC source */ RAPTOR_RSS_FIELD_DC_COVERAGE, /* DC coverage */ RAPTOR_RSS_FIELD_DC_RIGHTS, /* DC rights */ RAPTOR_RSS_FIELD_CONTENT_ENCODED, /* rss 1.0 module content:encoded */ RAPTOR_RSS_FIELD_AT_CONTENT_TYPE, /* at:contentType */ RAPTOR_RSS_FIELD_ITUNES_AUTHOR, RAPTOR_RSS_FIELD_ITUNES_SUBTITLE, RAPTOR_RSS_FIELD_ITUNES_SUMARY, RAPTOR_RSS_FIELD_ITUNES_KEYWORDS, RAPTOR_RSS_FIELD_ITUNES_EXPLICIT, RAPTOR_RSS_FIELD_ITUNES_IMAGE, RAPTOR_RSS_FIELD_ITUNES_NAME, RAPTOR_RSS_FIELD_ITUNES_OWNER, RAPTOR_RSS_FIELD_ITUNES_BLOCK, RAPTOR_RSS_FIELD_ITUNES_CATEGORY, RAPTOR_RSS_FIELD_ITUNES_EMAIL, RAPTOR_RSS_FIELD_UNKNOWN, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELDS_SIZE=RAPTOR_RSS_FIELD_UNKNOWN } raptor_rss_fields_type; extern const raptor_rss_field_info raptor_rss_fields_info[RAPTOR_RSS_FIELDS_SIZE+2]; typedef struct raptor_rss_field_s raptor_rss_field; typedef int (*raptor_rss_field_conversion)(raptor_rss_field* from_field, raptor_rss_field* to_field); typedef struct { raptor_rss_fields_type from; raptor_rss_fields_type to; raptor_rss_field_conversion conversion; } raptor_field_pair; extern const raptor_field_pair raptor_atom_to_rss[]; #define RSS_BLOCK_FIELD_TYPE_URL 0 #define RSS_BLOCK_FIELD_TYPE_STRING 1 #define RSS_BLOCK_MAX_URLS 1 #define RSS_BLOCK_MAX_STRINGS 5 /* Feed metadata blocks support (was raptor_rss_enclosure) */ struct raptor_rss_block_s { raptor_rss_type rss_type; /* enclosure: subject node URI/blank node */ raptor_identifier identifier; /* enclosure: node RAPTOR_RSS_ENCLOSURE category: node RAPTOR_ATOM_CATEGORY person: node RAPTOR_ATOM_AUTHOR or RAPTOR_ATOM_CONTRIBUTOR link: node RAPTOR_ATOM_LINK */ raptor_uri *node_type; /* enclosure: 0: where enclosure is located - @url attr (required) atom category: 0: @scheme attr (optional) rss category: 0: @domain attr (optional) rss source: 0: @url attr (required) person: 0: @atom:uri attr (optional) link: 0: @href attr (required) */ raptor_uri *urls[RSS_BLOCK_MAX_URLS]; /* enclosure: 0: content length @length attr (required) 1: content type @type attr (required) atom category: 0: @term attr (required) 1: @label attr (optional) person: 0: @atom:name attr (required) 1: @atom:email attr (optional) link: 0: @length attr (optional) 1: @type attr (optional) 2: @rel attr (optional) 3: @hreflang attr (optional) 4: @title attr (optional) */ char *strings[RSS_BLOCK_MAX_STRINGS]; /* next in list */ struct raptor_rss_block_s* next; }; typedef struct raptor_rss_block_s raptor_rss_block; #define RAPTOR_RSS_ITEM_CONTAINER 1 #define RAPTOR_RSS_ITEM_BLOCK 2 typedef struct { const char* name; rss_info_namespace nspace; int flags; /* RDF class URI */ raptor_rss_fields_type cls; /* RDF predicate URI to connect to the instance of this item */ raptor_rss_fields_type predicate; } raptor_rss_item_info; extern const raptor_rss_item_info raptor_rss_items_info[RAPTOR_RSS_COMMON_SIZE+1]; #define RAPTOR_RSS_BLOCKS_SIZE 17 /* Metadata blocks info */ typedef struct { /* metadata block type it applies to */ raptor_rss_type type; /* XML attribute (or NULL for field to use to store CDATA) */ const char *attribute; /* How that attribute should be interpreted: url or string */ int attribute_type; /* Index into urls/strings array to store it */ int offset; /* RDF predicate this maps to */ raptor_rss_fields_type field; } raptor_rss_block_field_info; extern const raptor_rss_block_field_info raptor_rss_block_fields_info[RAPTOR_RSS_BLOCKS_SIZE+1]; struct raptor_rss_field_s { raptor_world* world; unsigned char* value; raptor_uri* uri; struct raptor_rss_field_s* next; /* this field was mapped from another vocab */ unsigned int is_mapped:1; /* value is XML */ unsigned int is_xml:1; }; #define RAPTOR_RSS_FIELD_MAPPED /* RSS items (instances of typed nodes) containing fields */ struct raptor_rss_item_s { raptor_world* world; raptor_uri *uri; raptor_identifier identifier; const raptor_rss_item_info *node_type; int node_typei; raptor_rss_field* fields[RAPTOR_RSS_FIELDS_SIZE]; raptor_rss_block* blocks; int fields_count; struct raptor_rss_item_s* next; /* Triples with this item as subject and do not fit in @fields */ raptor_sequence* triples; }; typedef struct raptor_rss_item_s raptor_rss_item; /* raptor_rss_common.c */ #define RAPTOR_RSS_N_CONCEPTS 3 #define RAPTOR_RSS_RDF_type_URI(rss_model) ((rss_model)->concepts[0]) #define RAPTOR_RSS_RDF_Seq_URI(rss_model) ((rss_model)->concepts[1]) #define RAPTOR_RSS_RSS_items_URI(rss_model) ((rss_model)->concepts[2]) typedef struct { raptor_world* world; /* RAPTOR_RSS_CHANNEL, RAPTOR_RSS_IMAGE, RAPTOR_RSS_TEXTINPUT */ raptor_rss_item* common[RAPTOR_RSS_COMMON_SIZE]; /* list of items RAPTOR_RSS_ITEM */ raptor_rss_item* items; /* this points to the last one added, so we can append easy */ raptor_rss_item* last; /* item count */ int items_count; raptor_uri* concepts[RAPTOR_RSS_N_CONCEPTS]; raptor_namespace_stack *nstack; } raptor_rss_model; /* raptor_rss_common.c */ int raptor_rss_common_init(raptor_world* world); void raptor_rss_common_terminate(raptor_world* world); void raptor_rss_model_init(raptor_world* world, raptor_rss_model* rss_model); void raptor_rss_model_clear(raptor_rss_model* rss_model); raptor_rss_item* raptor_new_rss_item(raptor_world* world); int raptor_rss_model_add_item(raptor_rss_model* rss_model); raptor_rss_item* raptor_rss_model_add_common(raptor_rss_model* rss_model, raptor_rss_type type); raptor_rss_item* raptor_rss_model_get_common(raptor_rss_model* rss_model, raptor_rss_type type); void raptor_clear_rss_item(raptor_rss_item* item); void raptor_free_rss_item(raptor_rss_item* item); void raptor_rss_item_add_block(raptor_rss_item* item, raptor_rss_block *block); void raptor_rss_item_add_field(raptor_rss_item* item, int type, raptor_rss_field* field); int raptor_rss_item_equals_statement_subject(const raptor_rss_item *item, const raptor_statement *statement); int raptor_rss_item_set_uri(raptor_rss_item *item, raptor_uri* uri); raptor_rss_block *raptor_new_rss_block(raptor_world *world, raptor_rss_type rss_type, const unsigned char* id); void raptor_free_rss_block(raptor_rss_block *block); raptor_rss_field* raptor_rss_new_field(raptor_world* world); void raptor_rss_field_free(raptor_rss_field* field); #define RAPTOR_ISO_DATE_LEN 20 int raptor_rss_format_iso_date(char* buffer, size_t len, time_t unix_time); int raptor_rss_set_date_field(raptor_rss_field* field, time_t unix_time); int raptor_rss_date_uplift(raptor_rss_field* to_field, const unsigned char *date_string); #ifdef __cplusplus } #endif #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_uri.c����������������������������������������������������������������������0000644�0001750�0001750�00000174737�11330672502�013172� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_uri.c - Raptor URI resolving implementation * * Copyright (C) 2002-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #ifdef HAVE_LIMITS_H #include <limits.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifdef WIN32_URI_TEST #define WIN32 #endif /* Symbian OS uses similar path mappings as Windows but does not necessarily have the WIN32 flag defined */ #if defined(__SYMBIAN32__) && !defined(WIN32) #define WIN32 #endif #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_set_handler: * @handler: URI handler structure * @context: URI handler context * * Change the URI class implementation to the functions provided by the * * The URI interface in @handler->initialised should be either 1 * or 2 (if raptor_uri_compare_func is implemented). * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_set_handler_v2() if using raptor_world APIs. **/ void raptor_uri_set_handler(const raptor_uri_handler *handler, void *context) { raptor_uri_set_handler_v2(raptor_world_instance(), handler, context); } #endif /** * raptor_uri_set_handler_v2: * @world: raptor_world object * @handler: URI handler structure * @context: URI handler context * * Change the URI class implementation to the functions provided by the * * The URI interface in @handler->initialised should be either 1 * or 2 (if raptor_uri_compare_func is implemented). **/ void raptor_uri_set_handler_v2(raptor_world* world, const raptor_uri_handler *handler, void *context) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(handler, raptor_uri_handler); /* RAPTOR_ASSERT is the negative of ordinary asserts - it fails if the condition is true */ RAPTOR_ASSERT(!(handler->initialised >= 1 && handler->initialised <= 2), "raptor_uri_handler->initialised not 1..2"); world->uri_handler=handler; world->uri_handler_context=context; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_get_handler: * @handler: URI handler to return * @context: URI context to return * * Return the current raptor URI class implementation @handler and @context * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_get_handler_v2() if using raptor_world APIs. **/ void raptor_uri_get_handler(const raptor_uri_handler **handler, void **context) { raptor_uri_get_handler_v2(raptor_world_instance(), handler, context); } #endif /** * raptor_uri_get_handler_v2: * @handler: URI handler to return * @context: URI context to return * * Return the current raptor URI class implementation @handler and @context **/ void raptor_uri_get_handler_v2(raptor_world* world, const raptor_uri_handler **handler, void **context) { if(handler) *handler=world->uri_handler; if(context) *context=world->uri_handler_context; } static raptor_uri* raptor_default_new_uri(void *context, const unsigned char *uri_string) { raptor_world* world=(raptor_world*)context; unsigned char *p; size_t len; /* If uri_string is "file:path-to-file", turn it into a correct file:URI */ if(raptor_uri_uri_string_is_file_uri(uri_string)) { unsigned char *fragment=NULL; char *filename; raptor_uri* uri=NULL; filename=raptor_uri_uri_string_to_filename_fragment(uri_string, &fragment); if(filename && !access(filename, R_OK)) { uri=(raptor_uri*)raptor_uri_filename_to_uri_string(filename); /* If there was a fragment, reattach it to the new URI */ if(fragment) { unsigned char *new_fragment; raptor_uri* new_uri; new_fragment=(unsigned char*)RAPTOR_MALLOC(cstring, strlen((const char*)fragment) + 1 + sizeof(char*)); if(!new_fragment) return NULL; *new_fragment='#'; strcpy((char*)new_fragment+1, (const char*)fragment); new_uri=raptor_new_uri_relative_to_base_v2(world, uri, new_fragment); RAPTOR_FREE(cstring, new_fragment); raptor_free_uri_v2(world, uri); uri=new_uri; } } if(filename) RAPTOR_FREE(cstring, filename); if(fragment) RAPTOR_FREE(cstring, fragment); if(uri) return uri; } len=strlen((const char*)uri_string); p=(unsigned char*)RAPTOR_MALLOC(raptor_uri, len + sizeof(char*)); if(!p) return NULL; strcpy((char*)p, (const char*)uri_string); return (raptor_uri*)p; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri: * @uri_string: URI string. * * Constructor - create a raptor URI from a UTF-8 encoded Unicode string. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_uri_v2() if using raptor_world APIs. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri(const unsigned char *uri_string) { return raptor_new_uri_v2(raptor_world_instance(), uri_string); } #endif /** * raptor_new_uri_v2: * @world: raptor_world object * @uri_string: URI string. * * Constructor - create a raptor URI from a UTF-8 encoded Unicode string. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_v2(raptor_world* world, const unsigned char *uri_string) { if(!uri_string || !*uri_string) return NULL; return (*world->uri_handler->new_uri)(world->uri_handler_context, uri_string); } static raptor_uri* raptor_default_new_uri_from_uri_local_name(void *context, raptor_uri *uri, const unsigned char *local_name) { int uri_length=strlen((char*)uri); unsigned char *p=(unsigned char*)RAPTOR_MALLOC(cstring, uri_length + strlen((const char*)local_name) + sizeof(char*)); if(!p) return NULL; strcpy((char*)p, (const char*)uri); strcpy((char*)p + uri_length, (const char*)local_name); return (raptor_uri*)p; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_from_uri_local_name: * @uri: existing #raptor_uri * @local_name: local name * * Constructor - create a raptor URI from an existing URI and a local name. * * Creates a new URI from the concatenation of the @local_name to the * @uri. This is NOT relative URI resolution, which is done by the * raptor_new_uri_relative_to_base() constructor. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_uri_from_uri_local_name_v2() if using raptor_world APIs. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsigned char *local_name) { return raptor_new_uri_from_uri_local_name_v2(raptor_world_instance(), uri, local_name); } #endif /** * raptor_new_uri_from_uri_local_name_v2: * @world: raptor_world object * @uri: existing #raptor_uri * @local_name: local name * * Constructor - create a raptor URI from an existing URI and a local name. * * Creates a new URI from the concatenation of the @local_name to the * @uri. This is NOT relative URI resolution, which is done by the * raptor_new_uri_relative_to_base() constructor. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_from_uri_local_name_v2(raptor_world* world, raptor_uri *uri, const unsigned char *local_name) { if(!uri || !local_name) return NULL; return (*world->uri_handler->new_uri_from_uri_local_name)(world->uri_handler_context, uri, local_name); } static raptor_uri* raptor_default_new_uri_relative_to_base(void *context, raptor_uri *base_uri, const unsigned char *uri_string) { raptor_uri* new_uri; size_t new_uri_len=strlen((const char*)base_uri)+strlen((const char*)uri_string) + sizeof(char*); /* +2 is for \0 plus an extra 1 for adding any missing URI path '/' */ new_uri=(raptor_uri*)RAPTOR_MALLOC(cstring, new_uri_len+2); if(!new_uri) return NULL; /* If URI string is empty, just copy base URI */ if(!*uri_string) { strcpy((char*)new_uri, (char*)base_uri); return new_uri; } raptor_uri_resolve_uri_reference((const unsigned char*)base_uri, uri_string, (unsigned char*)new_uri, new_uri_len); return new_uri; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_relative_to_base: * @base_uri: existing base URI * @uri_string: relative URI string * * Constructor - create a raptor URI from a base URI and a relative URI string. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_uri_relative_to_base_v2() if using raptor_world APIs. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri, const unsigned char *uri_string) { return raptor_new_uri_relative_to_base_v2(raptor_world_instance(), base_uri, uri_string); } #endif /** * raptor_new_uri_relative_to_base_v2: * @world: raptor_world object * @base_uri: existing base URI * @uri_string: relative URI string * * Constructor - create a raptor URI from a base URI and a relative URI string. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_relative_to_base_v2(raptor_world* world, raptor_uri *base_uri, const unsigned char *uri_string) { if(!base_uri || !uri_string) return NULL; return (*world->uri_handler->new_uri_relative_to_base)(world->uri_handler_context, base_uri, uri_string); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_from_id: * @base_uri: existing base URI * @id: RDF ID * * Constructor - create a new URI from a base URI and RDF ID. * * This creates a URI equivalent to concatenating @base_uri with * ## and @id. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_uri_from_id_v2() if using raptor_world APIs. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const unsigned char *id) { return raptor_new_uri_from_id_v2(raptor_world_instance(), base_uri, id); } #endif /** * raptor_new_uri_from_id_v2: * @world: raptor_world object * @base_uri: existing base URI * @id: RDF ID * * Constructor - create a new URI from a base URI and RDF ID. * * This creates a URI equivalent to concatenating @base_uri with * ## and @id. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_from_id_v2(raptor_world *world, raptor_uri *base_uri, const unsigned char *id) { raptor_uri *new_uri; unsigned char *local_name; int len; if(!base_uri || !id) return NULL; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Using ID %s\n", id); #endif /* "#id\0" */ len=1+strlen((char*)id) + sizeof(char*); local_name=(unsigned char*)RAPTOR_MALLOC(cstring, len); if(!local_name) return NULL; *local_name='#'; strcpy((char*)local_name+1, (char*)id); new_uri=raptor_new_uri_relative_to_base_v2(world, base_uri, local_name); RAPTOR_FREE(cstring, local_name); return new_uri; } static raptor_uri* raptor_default_new_uri_for_rdf_concept(void *context, const char *name) { raptor_uri *new_uri; const unsigned char *base_uri=raptor_rdf_namespace_uri; unsigned int base_uri_len=raptor_rdf_namespace_uri_len; unsigned int new_uri_len; new_uri_len=base_uri_len+strlen(name) + sizeof(char*); new_uri=(raptor_uri*)RAPTOR_MALLOC(cstring, new_uri_len); if(!new_uri) return NULL; strcpy((char*)new_uri, (const char*)base_uri); strcpy((char*)new_uri+base_uri_len, name); return new_uri; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_for_rdf_concept: * @name: RDF namespace concept * * Constructor - create a raptor URI for the RDF namespace concept name. * * Example: u=raptor_new_uri_for_rdf_concept("value") creates a new * URI for the rdf:value term. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_uri_for_rdf_concept_v2() if using raptor_world APIs. * * Return value: a new #raptor_uri object or NULL on failure **/ raptor_uri* raptor_new_uri_for_rdf_concept(const char *name) { return raptor_new_uri_for_rdf_concept_v2(raptor_world_instance(), name); } #endif /** * raptor_new_uri_for_rdf_concept_v2: * @world: raptor_world object * @name: RDF namespace concept * * Constructor - create a raptor URI for the RDF namespace concept name. * * Example: u=raptor_new_uri_for_rdf_concept("value") creates a new * URI for the rdf:value term. * * Return value: a new #raptor_uri object or NULL on failure **/ raptor_uri* raptor_new_uri_for_rdf_concept_v2(raptor_world* world, const char *name) { if(!name) return NULL; return (*world->uri_handler->new_uri_for_rdf_concept)(world->uri_handler_context, name); } static void raptor_default_free_uri(void *context, raptor_uri *uri) { RAPTOR_FREE(raptor_uri, uri); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_free_uri: * @uri: URI to destroy * * raptor_init() MUST have been called before calling this function. * Use raptor_free_uri_v2() if using raptor_world APIs. * * Destructor - destroy a #raptor_uri object **/ void raptor_free_uri(raptor_uri *uri) { raptor_free_uri_v2(raptor_world_instance(), uri); } #endif /* FIXME: Refactor the uri abstraction so that raptor_world* can be stored there. */ /** * raptor_free_uri_v2: * @world: raptor_world object * @uri: URI to destroy * * Destructor - destroy a #raptor_uri object **/ void raptor_free_uri_v2(raptor_world* world, raptor_uri *uri) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(uri, raptor_uri); (*world->uri_handler->free_uri)(world->uri_handler_context, uri); } static int raptor_default_uri_equals(void *context, raptor_uri* uri1, raptor_uri* uri2) { return strcmp((char*)uri1, (char*)uri2)==0; } static int raptor_default_uri_compare(void *context, raptor_uri* uri1, raptor_uri* uri2) { return strcmp((char*)uri1, (char*)uri2); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_equals: * @uri1: URI 1 (may be NULL) * @uri2: URI 2 (may be NULL) * * Check if two URIs are equal. * * A NULL URI is not equal to a non-NULL URI. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_equals_v2() if using raptor_world APIs. * * Return value: non-0 if the URIs are equal **/ int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2) { return raptor_uri_equals_v2(raptor_world_instance(), uri1, uri2); } #endif /** * raptor_uri_equals_v2: * @world: raptor_world object * @uri1: URI 1 (may be NULL) * @uri2: URI 2 (may be NULL) * * Check if two URIs are equal. * * A NULL URI is not equal to a non-NULL URI. * * Return value: non-0 if the URIs are equal **/ int raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2) { if(uri1 && uri2) /* Both not-NULL - check with handler */ return (*world->uri_handler->uri_equals)(world->uri_handler_context, uri1, uri2); else if(uri1 || uri2) /* Only one is NULL - not equal */ return 0; else /* both NULL - equal */ return 1; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_compare: * @uri1: URI 1 (may be NULL) * @uri2: URI 2 (may be NULL) * * Compare two URIs, ala strcmp. * * A NULL URI is always less than (never equal to) a non-NULL URI. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_compare_v2() if using raptor_world APIs. * * Return value: -1 if uri1 < uri2, 0 if equal, 1 if uri1 > uri2 **/ int raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2) { return raptor_uri_compare_v2(raptor_world_instance(), uri1, uri2); } #endif /** * raptor_uri_compare_v2: * @world: raptor_world object * @uri1: URI 1 (may be NULL) * @uri2: URI 2 (may be NULL) * * Compare two URIs, ala strcmp. * * A NULL URI is always less than (never equal to) a non-NULL URI. * * Return value: -1 if uri1 < uri2, 0 if equal, 1 if uri1 > uri2 **/ int raptor_uri_compare_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2) { if(uri1 && uri2) { /* string compare function is available in API V2 or newer */ if(world->uri_handler->initialised >= 2) return (*world->uri_handler->uri_compare)(world->uri_handler_context, uri1, uri2); else return raptor_default_uri_compare(world->uri_handler_context, uri1, uri2); } else if(uri1) /* uri1 > uri2 (NULL) */ return 1; else /* uri1 (NULL) < uri2 */ return -1; } static raptor_uri* raptor_default_uri_copy(void *context, raptor_uri *uri) { raptor_uri* new_uri=(raptor_uri*)RAPTOR_MALLOC(cstring, strlen((char*)uri) + sizeof(char*)); if(!new_uri) return NULL; strcpy((char*)new_uri, (char*)uri); return new_uri; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_copy: * @uri: URI object * * Constructor - get a copy of a URI. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_copy_v2() if using raptor_world APIs. * * Return value: a new #raptor_uri object or NULL on failure **/ raptor_uri* raptor_uri_copy(raptor_uri *uri) { return raptor_uri_copy_v2(raptor_world_instance(), uri); } #endif /** * raptor_uri_copy_v2: * @world: raptor_world object * @uri: URI object * * Constructor - get a copy of a URI. * * Return value: a new #raptor_uri object or NULL on failure **/ raptor_uri* raptor_uri_copy_v2(raptor_world* world, raptor_uri *uri) { if(!uri) return NULL; return (*world->uri_handler->uri_copy)(world->uri_handler_context, uri); } static unsigned char* raptor_default_uri_as_string(void *context, raptor_uri *uri) { return (unsigned char*)uri; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_as_string: * @uri: #raptor_uri object * * Get a string representation of a URI. * * Returns a shared pointer to a string representation of @uri. This * string is shared and must not be freed, otherwise see use the * raptor_uri_to_string() or raptor_uri_to_counted_string() methods. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_as_string_v2() if using raptor_world APIs. * * Return value: shared string representation of URI **/ unsigned char* raptor_uri_as_string(raptor_uri *uri) { return raptor_uri_as_string_v2(raptor_world_instance(), uri); } #endif /** * raptor_uri_as_string_v2: * @world: raptor_world object * @uri: #raptor_uri object * * Get a string representation of a URI. * * Returns a shared pointer to a string representation of @uri. This * string is shared and must not be freed, otherwise see use the * raptor_uri_to_string() or raptor_uri_to_counted_string() methods. * * Return value: shared string representation of URI **/ unsigned char* raptor_uri_as_string_v2(raptor_world* world, raptor_uri *uri) { if(!uri) return NULL; return (*world->uri_handler->uri_as_string)(world->uri_handler_context, uri); } static unsigned char* raptor_default_uri_as_counted_string(void *context, raptor_uri *uri, size_t* len_p) { if(len_p) *len_p=strlen((char*)uri); return (unsigned char*)uri; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_as_counted_string: * @uri: URI object * @len_p: address of length variable or NULL * * Get a string representation of a URI with count. * * Returns a shared pointer to a string representation of @uri along * with the length of the string in @len_p, if not NULL. This * string is shared and must not be freed, otherwise see use the * raptor_uri_to_string() or raptor_uri_to_counted_string() methods. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_as_counted_string_v2() if using raptor_world APIs. * * Return value: shared string representation of URI **/ unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p) { return raptor_uri_as_counted_string_v2(raptor_world_instance(), uri, len_p); } #endif /** * raptor_uri_as_counted_string_v2: * @world: raptor_world object * @uri: URI object * @len_p: address of length variable or NULL * * Get a string representation of a URI with count. * * Returns a shared pointer to a string representation of @uri along * with the length of the string in @len_p, if not NULL. This * string is shared and must not be freed, otherwise see use the * raptor_uri_to_string() or raptor_uri_to_counted_string() methods. * * Return value: shared string representation of URI **/ unsigned char* raptor_uri_as_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t* len_p) { if(!uri) return NULL; return (*world->uri_handler->uri_as_counted_string)(world->uri_handler_context, uri, len_p); } /** * raptor_uri_filename_to_uri_string: * @filename: The filename to convert * * Converts a filename to a file: URI. * * Handles the OS-specific escaping on turning filenames into URIs * and returns a new buffer that the caller must free(). Turns * a space in the filname into %20 and '%' into %25. * * Return value: A newly allocated string with the URI or NULL on failure **/ unsigned char * raptor_uri_filename_to_uri_string(const char *filename) { unsigned char *buffer=NULL; const char *from; char *to; #ifndef WIN32 char *path=NULL; #endif /* "file://" ... \0 */ size_t len=7 + sizeof(char*); if(!filename) return NULL; #ifdef WIN32 /* * On WIN32, filenames turn into * "file://" + translated filename * where the translation is \\ turns into / and ' ' into %20, '%' into %25 * and if the filename does not start with '\', it is relative * in which case, a . is appended to the authority * * e.g * FILENAME URI * c:\windows\system file:///c:/windows/system * \\server\dir\file.doc file://server/dir/file.doc * a:foo file:///a:./foo * C:\Documents and Settings\myapp\foo.bat * file:///C:/Documents%20and%20Settings/myapp/foo.bat * * There are also UNC names \\server\share\blah * that turn into file:///server/share/blah * using the above algorithm. */ if(filename[1] == ':' && filename[2] != '\\') len+=3; /* relative filename - add / and ./ */ else if(*filename == '\\') len-=2; /* two // from not needed in filename */ else len++; /* / at start of path */ #else /* others - unix: turn spaces into %20, '%' into %25 */ if(*filename != '/') { size_t path_max; #ifdef PATH_MAX path_max=PATH_MAX; #else path_max=1024; /* an initial guess at the length */ #endif path=(char*)malloc(path_max); while(1) { /* malloc() failed or getcwd() succeeded */ if(!path || getcwd(path, path_max)) break; /* failed */ if(errno != ERANGE) break; /* try again with a bigger buffer */ path_max *= 2; path=(char*)realloc(path, path_max); } if(!path) goto path_done; strcat(path, "/"); strcat(path, filename); filename=(const char*)path; } #endif /* add URI-escaped filename length */ for(from=filename; *from ; from++) { len++; if(*from == ' ' || *from == '%') len+=2; /* strlen(%xx)-1 */ } buffer=(unsigned char*)RAPTOR_MALLOC(cstring, len); if(!buffer) goto path_done; strcpy((char*)buffer, "file://"); from=filename; to=(char*)(buffer+7); #ifdef WIN32 if(*from == '\\' && from[1] == '\\') from+=2; else *to++ ='/'; #endif while(*from) { char c=*from++; #ifdef WIN32 if (c == '\\') *to++ ='/'; else if(c == ':') { *to++ = c; if(*from != '\\') { *to++ ='.'; *to++ ='/'; } } else #endif if(c == ' ' || c == '%') { *to++ ='%'; *to++ ='2'; *to++ =(c == ' ') ? '0' : '5'; } else *to++ =c; } *to='\0'; path_done: #ifndef WIN32 if(path) free(path); #endif return buffer; } /** * raptor_uri_uri_string_to_filename_fragment: * @uri_string: The file: URI to convert * @fragment_p: Address of pointer to store any URI fragment or NULL * * Convert a file: URI to a filename and fragment. * * Handles the OS-specific file: URIs to filename mappings. Returns * a new buffer containing the filename that the caller must free. * * If @fragment_p is given, a new string containing the URI fragment * is returned, or NULL if none is present * * Return value: A newly allocated string with the filename or NULL on failure **/ char * raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_string, unsigned char **fragment_p) { char *filename; size_t len=0; raptor_uri_detail *ud=NULL; unsigned char *from; char *to; #ifdef WIN32 unsigned char *p; #endif if(!uri_string || !*uri_string) return NULL; ud=raptor_new_uri_detail(uri_string); if(!ud) return NULL; if(!ud->scheme || raptor_strcasecmp((const char*)ud->scheme, "file")) { raptor_free_uri_detail(ud); return NULL; } if(ud->authority) { if(!*ud->authority) ud->authority=NULL; else if(!raptor_strcasecmp((const char*)ud->authority, "localhost")) ud->authority=NULL; } /* Cannot do much if there is no path */ if(!ud->path || (ud->path && !*ud->path)) { raptor_free_uri_detail(ud); return NULL; } /* See raptor_uri_filename_to_uri_string for details of the mapping */ #ifdef WIN32 if(ud->authority) len+=ud->authority_len+3; p=ud->path; /* remove leading slash from path if there is one */ if(*p && p[0] == '/') { p++; len--; } /* handle case where path starts with drive letter */ if(*p && (p[1] == '|' || p[1] == ':')) { /* Either * "a:" like in file://a|/... or file://a:/... * or * "a:." like in file://a:./foo * giving device-relative path a:foo */ if(p[2]=='.') { p[2]=*p; p[3]=':'; p+= 2; len-= 2; /* remove 2 for ./ */ } else p[1]=':'; } #endif /* add URI-escaped filename length */ for(from=ud->path; *from ; from++) { len++; if(*from == '%') from+= 2; } /* Something is wrong */ if(!len) { raptor_free_uri_detail(ud); return NULL; } filename=(char*)RAPTOR_MALLOC(cstring, len + sizeof(char*)); if(!filename) { raptor_free_uri_detail(ud); return NULL; } to=filename; #ifdef WIN32 if(ud->authority) { *to++ = '\\'; *to++ = '\\'; from=ud->authority; while( (*to++ = *from++) ) ; to--; *to++ = '\\'; } /* copy path after all /s */ from=p; #else from=ud->path; #endif while(*from) { char c=*from++; #ifdef WIN32 if(c == '/') *to++ ='\\'; else #endif if(c == '%') { if(*from && from[1]) { char hexbuf[3]; char *endptr=NULL; hexbuf[0]=(char)*from; hexbuf[1]=(char)from[1]; hexbuf[2]='\0'; c=(char)strtol((const char*)hexbuf, &endptr, 16); if(endptr == &hexbuf[2]) *to++ = c; } from+= 2; } else *to++ =c; } *to='\0'; if(fragment_p) { if(ud->fragment) { len=ud->fragment_len; *fragment_p=(unsigned char*)RAPTOR_MALLOC(cstring, len + sizeof(char*)); if(*fragment_p) strncpy((char*)*fragment_p, (const char*)ud->fragment, len+1); } else *fragment_p=NULL; } raptor_free_uri_detail(ud); return filename; } /** * raptor_uri_uri_string_to_filename: * @uri_string: The file: URI to convert * * Convert a file: URI to a filename. * * Handles the OS-specific file: URIs to filename mappings. Returns * a new buffer containing the filename that the caller must free. * * Return value: A newly allocated string with the filename or NULL on failure **/ char * raptor_uri_uri_string_to_filename(const unsigned char *uri_string) { return raptor_uri_uri_string_to_filename_fragment(uri_string, NULL); } #ifndef RAPTOR_DISABLE_DEPRECATED /** * raptor_uri_is_file_uri: * @uri_string: The URI string to check * * Check if a URI string is a file: URI. * * @deprecated: use raptor_uri_uri_string_is_file_uri() instead * * Return value: Non zero if URI string is a file: URI **/ int raptor_uri_is_file_uri(const unsigned char* uri_string) { return raptor_uri_uri_string_is_file_uri(uri_string); } #endif /** * raptor_uri_uri_string_is_file_uri: * @uri_string: The URI string to check * * Check if a URI string is a file: URI. * * Return value: Non zero if URI string is a file: URI **/ int raptor_uri_uri_string_is_file_uri(const unsigned char* uri_string) { if(!uri_string || !*uri_string) return 1; return raptor_strncasecmp((const char*)uri_string, "file:", 5)==0; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_for_xmlbase: * @old_uri: URI to transform * * Constructor - create a URI suitable for use as an XML Base. * * Takes an existing URI and ensures it has a path (default /) and has * no fragment or query arguments - XML base does not use these. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_uri_for_xmlbase_v2() if using raptor_world APIs. * * Return value: new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* old_uri) { return raptor_new_uri_for_xmlbase_v2(raptor_world_instance(), old_uri); } #endif /** * raptor_new_uri_for_xmlbase_v2: * @world: raptor_world object * @old_uri: URI to transform * * Constructor - create a URI suitable for use as an XML Base. * * Takes an existing URI and ensures it has a path (default /) and has * no fragment or query arguments - XML base does not use these. * * Return value: new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world, raptor_uri* old_uri) { unsigned char *uri_string; unsigned char *new_uri_string; raptor_uri* new_uri; raptor_uri_detail *ud; if(!old_uri) return NULL; uri_string=raptor_uri_as_string_v2(world, old_uri); ud=raptor_new_uri_detail(uri_string); if(!ud) return NULL; if(!ud->path) { ud->path=(unsigned char*)"/"; ud->path_len=1; } ud->query=NULL; ud->query_len=0; ud->fragment=NULL; ud->fragment_len=0; new_uri_string=raptor_uri_detail_to_string(ud, NULL); raptor_free_uri_detail(ud); if(!new_uri_string) return NULL; new_uri=raptor_new_uri_v2(world, new_uri_string); RAPTOR_FREE(cstring, new_uri_string); return new_uri; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_for_retrieval: * @old_uri: URI to transform * * Constructor - create a URI suitable for retrieval. * * Takes an existing URI and ensures it has a path (default /) and has * no fragment - URI retrieval does not use the fragment part. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_uri_for_retrieval_v2() if using raptor_world APIs. * * Return value: new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri) { return raptor_new_uri_for_retrieval_v2(raptor_world_instance(), old_uri); } #endif /** * raptor_new_uri_for_retrieval_v2: * @world: raptor_world object * @old_uri: URI to transform * * Constructor - create a URI suitable for retrieval. * * Takes an existing URI and ensures it has a path (default /) and has * no fragment - URI retrieval does not use the fragment part. * * Return value: new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world, raptor_uri* old_uri) { unsigned char *uri_string; unsigned char *new_uri_string; raptor_uri* new_uri; raptor_uri_detail *ud; if(!old_uri) return NULL; uri_string=raptor_uri_as_string_v2(world, old_uri); ud=raptor_new_uri_detail(uri_string); if(!ud) return NULL; if(!ud->path) { ud->path=(unsigned char*)"/"; ud->path_len=1; } ud->fragment=NULL; ud->fragment_len=0; new_uri_string=raptor_uri_detail_to_string(ud, NULL); raptor_free_uri_detail(ud); if(!new_uri_string) return NULL; new_uri=raptor_new_uri_v2(world, new_uri_string); RAPTOR_FREE(cstring, new_uri_string); return new_uri; } static const raptor_uri_handler raptor_uri_default_handler = { raptor_default_new_uri, raptor_default_new_uri_from_uri_local_name, raptor_default_new_uri_relative_to_base, raptor_default_new_uri_for_rdf_concept, raptor_default_free_uri, raptor_default_uri_equals, raptor_default_uri_copy, raptor_default_uri_as_string, raptor_default_uri_as_counted_string, 2, /* URI Interface Version */ raptor_default_uri_compare /* URI Interface V2 */ }; int raptor_uri_init(raptor_world* world) { raptor_uri_set_handler_v2(world, &raptor_uri_default_handler, world); return 0; } /* * raptor_uri_path_common_base_length: * @first_path: The first path (path only, not a full URI) * @first_path_len: Length of first_path * @second_path: The second path (path only, not a full URI) * @second_path_len: Length of second_path * * Find the common base length of two URI path components. * * Return value: Length of the common base path **/ static int raptor_uri_path_common_base_length(const unsigned char *first_path, size_t first_path_len, const unsigned char *second_path, size_t second_path_len) { int common_len=0; const unsigned char *cur_ptr=first_path; const unsigned char *prev_ptr=first_path; /* Compare each path component of first_path and second_path until there is a mismatch. Then return the length from the start of the path to the last successful match. */ while((cur_ptr=(const unsigned char*)memchr(cur_ptr, '/', first_path_len))) { cur_ptr++; if(strncmp((const char*)first_path+common_len, (const char*)second_path+common_len, cur_ptr-prev_ptr)) break; first_path_len -= cur_ptr - prev_ptr; prev_ptr=cur_ptr; common_len = prev_ptr - first_path; } return prev_ptr - first_path; } /* * raptor_uri_path_make_relative_path: * @from_path: The base path (path only, not a full URI) * @from_path_len: Length of the base path * @to_path: The reference path (path only, not a full URI) * @to_path_len: Length of the reference path * @suffix: String to be appended to the final relative path * @suffix_len: Length of the suffix * @result_length_p: Location to store the length of the string or NULL * * Make a relative URI path. * * Return value: A newly allocated relative path string or NULL on failure. **/ static unsigned char * raptor_uri_path_make_relative_path(const unsigned char *from_path, size_t from_path_len, const unsigned char *to_path, size_t to_path_len, const unsigned char *suffix, size_t suffix_len, size_t *result_length_p) { int common_len, cur_len, final_len, up_dirs = 0, to_dir_len = 0; const unsigned char *cur_ptr, *prev_ptr; unsigned char *final_path, *final_path_cur; common_len=raptor_uri_path_common_base_length(from_path, from_path_len, to_path, to_path_len); if(result_length_p) *result_length_p=0; /* Count how many directories we have to go up */ cur_ptr = from_path + common_len; prev_ptr=cur_ptr; cur_len = from_path_len - common_len; while((cur_ptr = (const unsigned char*)memchr(cur_ptr, '/', cur_len))) { cur_ptr++; up_dirs++; cur_len -= cur_ptr - prev_ptr; prev_ptr=cur_ptr; } /* Calculate how many characters of to_path subdirs (counted from the common base) we have to add. */ cur_ptr = to_path + common_len; prev_ptr=cur_ptr; cur_len = to_path_len - common_len; while((cur_ptr = (const unsigned char*)memchr(cur_ptr, '/', cur_len))) { cur_ptr++; cur_len -= cur_ptr - prev_ptr; prev_ptr=cur_ptr; } to_dir_len = prev_ptr - (to_path + common_len); /* Create the final relative path */ final_len = up_dirs*3 + to_dir_len + suffix_len; /* 3 for each "../" */ final_path=(unsigned char*)RAPTOR_MALLOC(cstring, final_len + sizeof(char*)); if(!final_path) return NULL; *final_path=0; /* First, add the necessary "../" parts */ final_path_cur=final_path; while (up_dirs--) { *final_path_cur++='.'; *final_path_cur++='.'; *final_path_cur++='/'; } /* Then, add the path from the common base to the to_path */ memcpy(final_path_cur, to_path + common_len, to_dir_len); final_path_cur+=to_dir_len; /* Finally, add the suffix */ if(suffix && suffix_len) { /* As a special case, if the suffix begins with a dot (".") and the final output string so far is non-empty, skip the dot. */ if (*suffix == '.' && final_path_cur != final_path) { /* Make sure that the dot really represents a directory and it's not just part of a file name like ".foo". In other words, the dot must either be the only character or the next character must be the fragment or the query character. */ if ((suffix_len == 1) || (suffix_len > 1 && (suffix[1] == '#' || suffix[1] == '?'))) { suffix++; suffix_len--; final_len--; } } if(suffix_len) memcpy(final_path_cur, suffix, suffix_len); } final_path[final_len]=0; if (result_length_p) *result_length_p=final_len; return final_path; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_to_relative_counted_uri_string: * @base_uri: The base absolute URI to resolve against (or NULL) * @reference_uri: The reference absolute URI to use * @length_p: Location to store the length of the relative URI string or NULL * * Get the counted relative URI string of a URI against a base URI. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_to_relative_counted_uri_string_v2() if using raptor_world APIs. * * Return value: A newly allocated relative URI string or NULL on failure **/ unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p) { return raptor_uri_to_relative_counted_uri_string_v2(raptor_world_instance(), base_uri, reference_uri, length_p); } #endif /** * raptor_uri_to_relative_counted_uri_string_v2: * @world: raptor_world object * @base_uri: The base absolute URI to resolve against (or NULL) * @reference_uri: The reference absolute URI to use * @length_p: Location to store the length of the relative URI string or NULL * * Get the counted relative URI string of a URI against a base URI. * * Return value: A newly allocated relative URI string or NULL on failure **/ unsigned char* raptor_uri_to_relative_counted_uri_string_v2(raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p) { raptor_uri_detail *base_detail=NULL, *reference_detail; const unsigned char *base, *reference_str, *base_file, *reference_file; unsigned char *suffix, *cur_ptr; size_t base_len, reference_len, reference_file_len, suffix_len; unsigned char *result=NULL; int suffix_is_result=0; if(!reference_uri) return NULL; if(length_p) *length_p=0; reference_str=raptor_uri_as_counted_string_v2(world, reference_uri, &reference_len); reference_detail=raptor_new_uri_detail(reference_str); if(!reference_detail) goto err; if(!base_uri) goto buildresult; base=raptor_uri_as_counted_string_v2(world, base_uri, &base_len); base_detail=raptor_new_uri_detail(base); if(!base_detail) goto err; /* Check if the whole URIs are equal */ if(raptor_uri_equals_v2(world, base_uri, reference_uri)) { reference_len=0; goto buildresult; } /* Check if scheme and authority of the URIs are equal */ if(base_detail->scheme_len == reference_detail->scheme_len && base_detail->authority_len == reference_detail->authority_len && !strncmp((const char*)base_detail->scheme, (const char*)reference_detail->scheme, base_detail->scheme_len) && !strncmp((const char*)base_detail->authority, (const char*)reference_detail->authority, base_detail->authority_len)) { if(!base_detail->path) { if(reference_detail->path) { /* if base has no path then the relative URI is relative * to scheme+authority so assemble that in the suffix * buffer (adding any query part or fragment needed) */ reference_file=reference_detail->path; reference_file_len=reference_detail->path_len; suffix_is_result=1; goto addqueryfragment; } goto buildresult; } /* Find the file name components */ base_file = (const unsigned char*)strrchr((const char*)base_detail->path, '/'); if(!base_file) goto buildresult; base_file++; if(!reference_detail->path) goto buildresult; reference_file=(const unsigned char*)strrchr((const char*)reference_detail->path, '/'); if(!reference_file) goto buildresult; reference_file++; reference_file_len=reference_detail->path_len - (reference_file - reference_detail->path); if(!strcmp((const char*)base_file, (const char*)reference_file)) { /* If the file names are equal, don't put them in the relative URI */ reference_file=NULL; reference_file_len=0; } else if(*base_file && !*reference_file) { /* If the base file is non-empty, but the reference file is * empty, use "." as the file name. */ reference_file=(const unsigned char*)"."; reference_file_len=1; } addqueryfragment: /* Calculate the length of the suffix (file name + query + fragment) */ suffix_len=reference_file_len + reference_detail->query_len + reference_detail->fragment_len; if (reference_detail->query) suffix_len++; /* add one char for the '?' */ if (reference_detail->fragment) suffix_len++; /* add one char for the '#' */ /* Assemble the suffix */ suffix=(unsigned char*)RAPTOR_MALLOC(cstring, suffix_len + sizeof(char*)); if(!suffix) goto err; cur_ptr=suffix; if(reference_file) { memcpy(suffix, reference_file, reference_file_len); cur_ptr+= reference_file_len; } if(reference_detail->query) { *cur_ptr++='?'; memcpy(cur_ptr, reference_detail->query, reference_detail->query_len); cur_ptr+= reference_detail->query_len; } if(reference_detail->fragment) { *cur_ptr++='#'; memcpy(cur_ptr, reference_detail->fragment, reference_detail->fragment_len); cur_ptr+= reference_detail->fragment_len; } *cur_ptr=0; if(suffix_is_result) { /* If suffix is what we need, just use that as the result */ result=suffix; if(length_p) *length_p=suffix_len; } else { /* Otherwise create the full relative path */ result = raptor_uri_path_make_relative_path(base_detail->path, base_detail->path_len, reference_detail->path, reference_detail->path_len, suffix, suffix_len, length_p); RAPTOR_FREE(cstring, suffix); } } buildresult: /* If result is NULL at this point, it means that we were unable to find a relative URI, so we'll return a full absolute URI instead. */ if(!result) { result=(unsigned char*)RAPTOR_MALLOC(cstring, reference_len + sizeof(char*)); if(result) { if(reference_len) memcpy(result, reference_str, reference_len); result[reference_len] = 0; if(length_p) *length_p=reference_len; } } err: if(base_detail) raptor_free_uri_detail(base_detail); raptor_free_uri_detail(reference_detail); return result; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_to_relative_uri_string: * @base_uri: The base absolute URI to resolve against * @reference_uri: The reference absolute URI to use * * Get the relative URI string of a URI against a base URI. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_to_relative_uri_string_v2() if using raptor_world APIs. * * Return value: A newly allocated relative URI string or NULL on failure **/ unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri) { return raptor_uri_to_relative_uri_string_v2(raptor_world_instance(), base_uri, reference_uri); } #endif /** * raptor_uri_to_relative_uri_string_v2: * @world: raptor_world instance * @base_uri: The base absolute URI to resolve against * @reference_uri: The reference absolute URI to use * * Get the relative URI string of a URI against a base URI. * * Return value: A newly allocated relative URI string or NULL on failure **/ unsigned char* raptor_uri_to_relative_uri_string_v2(raptor_world *world, raptor_uri *base_uri, raptor_uri *reference_uri) { return raptor_uri_to_relative_counted_uri_string_v2(world, base_uri, reference_uri, NULL); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_print: * @uri: URI to print * @stream: The file handle to print to * * Print a URI to a file handle. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_print_v2() if using raptor_world APIs. * **/ void raptor_uri_print(const raptor_uri* uri, FILE *stream) { raptor_uri_print_v2(raptor_world_instance(), uri, stream); } #endif /** * raptor_uri_print_v2: * @world: raptor_world object * @uri: URI to print * @stream: The file handle to print to * * Print a URI to a file handle. * **/ void raptor_uri_print_v2(raptor_world* world, const raptor_uri* uri, FILE *stream) { int rc = 0; if(uri) { size_t len; unsigned char *string=raptor_uri_as_counted_string_v2(world, (raptor_uri*)uri, &len); rc = fwrite(string, len, 1, stream); } else rc = fwrite("(NULL URI)", 10, 1, stream); /* FIXME Until world gains an error handler, there is nowhere to * report the IO error */ } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_to_counted_string: * @uri: #raptor_uri object * @len_p: Pointer to length (or NULL) * * Get a new counted string for a URI. * * If @len_p is not NULL, the length of the string is stored in it. * * The memory allocated must be freed by the caller and * raptor_free_memory() should be used for best portability. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_to_counted_string_v2() if using raptor_world APIs. * * Return value: new string or NULL on failure **/ unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p) { return raptor_uri_to_counted_string_v2(raptor_world_instance(), uri, len_p); } #endif /** * raptor_uri_to_counted_string_v2: * @world: raptor_world object * @uri: #raptor_uri object * @len_p: Pointer to length (or NULL) * * Get a new counted string for a URI. * * If @len_p is not NULL, the length of the string is stored in it. * * The memory allocated must be freed by the caller and * raptor_free_memory() should be used for best portability. * * Return value: new string or NULL on failure **/ unsigned char* raptor_uri_to_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t *len_p) { size_t len; unsigned char *string; unsigned char *new_string; if(!uri) return NULL; string=raptor_uri_as_counted_string_v2(world, uri, &len); if(!string) return NULL; new_string=(unsigned char*)RAPTOR_MALLOC(cstring, len + 1); /* +1 for NUL termination */ if(!new_string) return NULL; memcpy(new_string, string, len+1); if(len_p) *len_p=len; return new_string; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_to_string: * @uri: #raptor_uri object * * Get a new string for a URI. * * The memory allocated must be freed by the caller and * raptor_free_memory() should be used for best portability. * * raptor_init() MUST have been called before calling this function. * Use raptor_uri_to_string_v2() if using raptor_world APIs. * * Return value: new string or NULL on failure **/ unsigned char* raptor_uri_to_string(raptor_uri *uri) { return raptor_uri_to_string_v2(raptor_world_instance(), uri); } #endif /** * raptor_uri_to_string_v2: * @world: raptor_world object * @uri: #raptor_uri object * * Get a new string for a URI. * * The memory allocated must be freed by the caller and * raptor_free_memory() should be used for best portability. * * Return value: new string or NULL on failure **/ unsigned char* raptor_uri_to_string_v2(raptor_world* world, raptor_uri *uri) { return raptor_uri_to_counted_string_v2(world, uri, NULL); } /** * raptor_new_uri_from_rdf_ordinal: * @world: raptor_world object * @ordinal: integer rdf:_n * * Internal - convert an integer rdf:_n ordinal to the resource URI * * Return value: new URI object or NULL on failure **/ raptor_uri* raptor_new_uri_from_rdf_ordinal(raptor_world* world, int ordinal) { /* 55 = strlen(rdf namespace URI) + _ + 10-digit number + \0 */ unsigned char uri_string[55]; strncpy((char*)uri_string, (const char*)raptor_rdf_namespace_uri, raptor_rdf_namespace_uri_len); sprintf((char*)uri_string+raptor_rdf_namespace_uri_len, "_%d", ordinal); return raptor_new_uri_v2(world, uri_string); } #ifdef STANDALONE #include <stdio.h> #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif /* one more prototype */ int main(int argc, char *argv[]); static const char *program; static int assert_filename_to_uri (const char *filename, const char *reference_uri) { unsigned char *uri; uri=raptor_uri_filename_to_uri_string(filename); if (!uri || strcmp((const char*)uri, (const char*)reference_uri)) { fprintf(stderr, "%s: raptor_uri_filename_to_uri_string(%s) FAILED gaving URI %s != %s\n", program, filename, uri, reference_uri); if(uri) RAPTOR_FREE(cstring, uri); return 1; } RAPTOR_FREE(cstring, uri); return 0; } static int assert_uri_to_filename (const char *uri, const char *reference_filename) { char *filename; filename=raptor_uri_uri_string_to_filename((const unsigned char*)uri); if(filename && !reference_filename) { fprintf(stderr, "%s: raptor_uri_uri_string_to_filename(%s) FAILED giving filename %s != NULL\n", program, uri, filename); if(filename) RAPTOR_FREE(cstring, filename); return 1; } else if (filename && strcmp(filename, reference_filename)) { fprintf(stderr, "%s: raptor_uri_uri_string_to_filename(%s) FAILED gaving filename %s != %s\n", program, uri, filename, reference_filename); if(filename) RAPTOR_FREE(cstring, filename); return 1; } RAPTOR_FREE(cstring, filename); return 0; } static int assert_uri_to_relative(raptor_world *world, const char *base, const char *uri, const char *relative) { unsigned char *output; int result; raptor_uri* base_uri=NULL; raptor_uri* reference_uri=raptor_new_uri_v2(world, (const unsigned char*)uri); size_t length=0; if(base) base_uri=raptor_new_uri_v2(world, (const unsigned char*)base); output=raptor_uri_to_relative_counted_uri_string_v2(world, base_uri, reference_uri, &length); result=strcmp(relative, (const char*)output); if (result) { fprintf(stderr, "%s: raptor_uri_string_to_relative_uri_string FAILED: base='%s', uri='%s', expected='%s', got='%s'\n", program, base, uri, relative, output); RAPTOR_FREE(cstring, output); return 1; } RAPTOR_FREE(cstring, output); if(base_uri) raptor_free_uri_v2(world, base_uri); raptor_free_uri_v2(world, reference_uri); return 0; } static int raptor_test_uri_compare(void *context, raptor_uri* uri1, raptor_uri* uri2) { int* called_p=(int*)context; *called_p=1; return strcmp((char*)uri1, (char*)uri2); } int main(int argc, char *argv[]) { raptor_world *world; const char *base_uri = "http://example.org/bpath/cpath/d;p?querystr#frag"; const char *base_uri_xmlbase = "http://example.org/bpath/cpath/d;p"; const char *base_uri_retrievable = "http://example.org/bpath/cpath/d;p?querystr"; #ifndef WIN32 #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) const char* dirs[6] = { "/etc", "/bin", "/tmp", "/lib", "/var", NULL }; unsigned char uri_buffer[16]; /* strlen("file:///DIR/foo")+1 */ int i; const char *dir; #endif #endif unsigned char *str; raptor_uri *uri1, *uri2, *uri3; int failures=0; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); if((program=strrchr(argv[0], '/'))) program++; else if((program=strrchr(argv[0], '\\'))) program++; else program=argv[0]; #ifdef WIN32 failures += assert_filename_to_uri ("c:\\windows\\system", "file:///c:/windows/system"); failures += assert_filename_to_uri ("\\\\server\\share\\file.doc", "file://server/share/file.doc"); failures += assert_filename_to_uri ("a:foo", "file:///a:./foo"); failures += assert_filename_to_uri ("C:\\Documents and Settings\\myapp\\foo.bat", "file:///C:/Documents%20and%20Settings/myapp/foo.bat"); failures += assert_filename_to_uri ("C:\\My Documents\\%age.txt", "file:///C:/My%20Documents/%25age.txt"); failures += assert_uri_to_filename ("file:///c|/windows/system", "c:\\windows\\system"); failures += assert_uri_to_filename ("file:///c:/windows/system", "c:\\windows\\system"); failures += assert_uri_to_filename ("file://server/share/file.doc", "\\\\server\\share\\file.doc"); failures += assert_uri_to_filename ("file:///a:./foo", "a:foo"); failures += assert_uri_to_filename ("file:///C:/Documents%20and%20Settings/myapp/foo.bat", "C:\\Documents and Settings\\myapp\\foo.bat"); failures += assert_uri_to_filename ("file:///C:/My%20Documents/%25age.txt", "C:\\My Documents\\%age.txt"); failures += assert_uri_to_filename ("file:c:\\thing", "c:\\thing"); failures += assert_uri_to_filename ("file:/c:\\thing", "c:\\thing"); failures += assert_uri_to_filename ("file://c:\\thing", NULL); failures += assert_uri_to_filename ("file:///c:\\thing", "c:\\thing"); failures += assert_uri_to_filename ("file://localhost/", NULL); failures += assert_uri_to_filename ("file://c:\\foo\\bar\\x.rdf", NULL); #else failures += assert_filename_to_uri ("/path/to/file", "file:///path/to/file"); failures += assert_filename_to_uri ("/path/to/file with spaces", "file:///path/to/file%20with%20spaces"); failures += assert_uri_to_filename ("file:///path/to/file", "/path/to/file"); failures += assert_uri_to_filename ("file:///path/to/file%20with%20spaces", "/path/to/file with spaces"); /* Tests for Issue#0000268 http://bugs.librdf.org/mantis/view.php?id=268 */ failures += assert_uri_to_filename ("file:///path/to/http%253A%252F%252Fwww.example.org%252Fa%252Fb%252Fc", "/path/to/http%3A%2F%2Fwww.example.org%2Fa%2Fb%2Fc"); failures += assert_filename_to_uri ("/path/to/http%3A%2F%2Fwww.example.org%2Fa%2Fb%2Fc", "file:///path/to/http%253A%252F%252Fwww.example.org%252Fa%252Fb%252Fc"); #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) /* Need to test this with a real dir (preferably not /) * This is just a test so pretty likely to work on all development systems * that are not WIN32 */ for(i=0; (dir=dirs[i]); i++) { struct stat buf; if(!lstat(dir, &buf) && S_ISDIR(buf.st_mode) && !S_ISLNK(buf.st_mode)) { if(!chdir(dir)) break; } } if(!dir) fprintf(stderr, "%s: WARNING: Found no convenient directory - not testing relative files\n", program); else { sprintf((char*)uri_buffer, "file://%s/foo", dir); fprintf(stderr, "%s: Checking relative file name 'foo' in dir %s expecting URI %s\n", program, dir, uri_buffer); failures += assert_filename_to_uri ("foo", (const char*)uri_buffer); } #endif #endif uri1=raptor_new_uri_v2(world, (const unsigned char*)base_uri); str=raptor_uri_as_string_v2(world, uri1); if(strcmp((const char*)str, base_uri)) { fprintf(stderr, "%s: raptor_uri_as_string(%s) FAILED gaving %s != %s\n", program, base_uri, str, base_uri); failures++; } uri2=raptor_new_uri_for_xmlbase_v2(world, uri1); str=raptor_uri_as_string_v2(world, uri2); if(strcmp((const char*)str, base_uri_xmlbase)) { fprintf(stderr, "%s: raptor_new_uri_for_xmlbase(URI %s) FAILED giving %s != %s\n", program, base_uri, str, base_uri_xmlbase); failures++; } uri3=raptor_new_uri_for_retrieval_v2(world, uri1); str=raptor_uri_as_string_v2(world, uri3); if(strcmp((const char*)str, base_uri_retrievable)) { fprintf(stderr, "%s: raptor_new_uri_for_retrievable(%s) FAILED gaving %s != %s\n", program, base_uri, str, base_uri_retrievable); failures++; } raptor_free_uri_v2(world, uri3); raptor_free_uri_v2(world, uri2); raptor_free_uri_v2(world, uri1); failures += assert_uri_to_relative(world, NULL, "http://example.com/foo/bar", "http://example.com/foo/bar"); failures += assert_uri_to_relative(world, "", "http://example.com/foo/bar", "http://example.com/foo/bar"); failures += assert_uri_to_relative(world, "foo:", "http://example.com/foo/bar", "http://example.com/foo/bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo?foo#foo", "http://example.com/base/bar?bar#bar", "bar?bar#bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo/", "foo/"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo/.foo", "foo/.foo"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo/.foo#bar", "foo/.foo#bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo/bar", "foo/bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo#bar", "#bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/bar#foo", "bar#foo"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/otherbase/bar", "../otherbase/bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/#foo", ".#foo"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example2.com/base/bar", "http://example2.com/base/bar"); failures += assert_uri_to_relative(world, "http://example.com/base/one?path=/should/be/ignored", "http://example.com/base/two?path=/should/be/ignored", "two?path=/should/be/ignored"); failures += assert_uri_to_relative(world, "http://example.org/base#", "http://www.foo.org", "http://www.foo.org"); failures += assert_uri_to_relative(world, "http://example.org", "http://a.example.org/", "http://a.example.org/"); failures += assert_uri_to_relative(world, "http://example.org", "http://a.example.org", "http://a.example.org"); failures += assert_uri_to_relative(world, "http://abcdefgh.example.org/foo/bar/", "http://ijklmnop.example.org/", "http://ijklmnop.example.org/"); failures += assert_uri_to_relative(world, "http://example.org", "http://example.org/a/b/c/d/efgh", "/a/b/c/d/efgh"); if(1) { raptor_uri_handler uri_handler; int ret; raptor_uri* u1; raptor_uri* u2; int called; /* URI Interface V1 */ uri_handler.new_uri = raptor_default_new_uri; uri_handler.free_uri = raptor_default_free_uri; uri_handler.uri_compare = raptor_test_uri_compare; uri_handler.initialised=1; called=0; raptor_uri_set_handler_v2(world, &uri_handler, &called); u1=raptor_new_uri_v2(world, (const unsigned char *)"http://example.org/abc"); u2=raptor_new_uri_v2(world, (const unsigned char *)"http://example.org/def"); ret=raptor_uri_compare_v2(world, u1, u2); if(!(ret < 0)) { fprintf(stderr, "%s: raptor_uri_compare(%s, %s) FAILED V1 gave %d expected <0\n", program, raptor_uri_as_string_v2(world, u1), raptor_uri_as_string_v2(world, u2), ret); failures++; } if(called) { fprintf(stderr, "%s: raptor_uri_compare(%s, %s) FAILED V1 called user handler\n", program, raptor_uri_as_string_v2(world, u1), raptor_uri_as_string_v2(world, u2)); failures++; } /* URI Interface V2 */ uri_handler.initialised=2; called=0; raptor_uri_set_handler_v2(world, &uri_handler, &called); ret=raptor_uri_compare_v2(world, u1, u2); if(!(ret < 0)) { fprintf(stderr, "%s: raptor_uri_compare(%s, %s) FAILED V2 gave %d expected <0\n", program, raptor_uri_as_string_v2(world, u1), raptor_uri_as_string_v2(world, u2), ret); failures++; } if(!called) { fprintf(stderr, "%s: raptor_uri_compare(%s, %s) FAILED V2 did not call user handler\n", program, raptor_uri_as_string_v2(world, u1), raptor_uri_as_string_v2(world, u2)); failures++; } raptor_free_uri_v2(world, u1); raptor_free_uri_v2(world, u2); } raptor_free_world(world); return failures ; } #endif ���������������������������������raptor-1.4.21/src/raptor_xml.c����������������������������������������������������������������������0000644�0001750�0001750�00000076142�11330672502�013162� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_xml.c - Raptor XML routines * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE /** * raptor_new_xml_element: * @name: The XML element name * @xml_language: the in-scope XML language (or NULL) * @xml_base: the in-scope XML base URI (or NULL) * * Constructor - create a new XML element from a QName * * Return value: a new #raptor_xml_element or NULL on failure **/ raptor_xml_element* raptor_new_xml_element(raptor_qname *name, const unsigned char *xml_language, raptor_uri *xml_base) { raptor_xml_element* xml_element; xml_element=(raptor_xml_element*)RAPTOR_CALLOC(raptor_xml_element, 1, sizeof(raptor_xml_element)); if(!xml_element) return NULL; /* Element name */ xml_element->name=name; xml_element->xml_language=xml_language; xml_element->base_uri=xml_base; xml_element->declared_nspaces=NULL; xml_element->content_cdata_sb=raptor_new_stringbuffer(); if(!xml_element->content_cdata_sb) { RAPTOR_FREE(raptor_xml_element, xml_element); xml_element=NULL; } return xml_element; } /** * raptor_new_xml_element_from_namespace_local_name: * @ns: namespace * @name: the XML element local name * @xml_language: the in-scope XML language (or NULL) * @xml_base: base uri (or NULL) * * Constructor - create a new XML element from an XML namespace and a local name * * Added in 1.4.16. * * Return value: a new #raptor_xml_element or NULL on failure */ raptor_xml_element* raptor_new_xml_element_from_namespace_local_name(raptor_namespace *ns, const unsigned char *name, const unsigned char *xml_language, raptor_uri *xml_base) { raptor_uri *base_uri_copy; raptor_qname *qname; raptor_xml_element *element=NULL; qname=raptor_new_qname_from_namespace_local_name_v2(ns->nstack->world, ns, name, NULL); if(qname) { base_uri_copy=xml_base ? raptor_uri_copy_v2(ns->nstack->world, xml_base) : NULL; element=raptor_new_xml_element(qname, xml_language, base_uri_copy); if(!element) { raptor_free_qname(qname); if(base_uri_copy) raptor_free_uri_v2(ns->nstack->world, base_uri_copy); } } return element; } /** * raptor_free_xml_element: * @element: XML Element * * Destructor - destroy a raptor_xml_element object. **/ void raptor_free_xml_element(raptor_xml_element *element) { unsigned int i; RAPTOR_ASSERT_OBJECT_POINTER_RETURN(element, raptor_xml_element); for (i=0; i < element->attribute_count; i++) if(element->attributes[i]) raptor_free_qname(element->attributes[i]); if(element->attributes) RAPTOR_FREE(raptor_qname_array, element->attributes); if(element->content_cdata_sb) raptor_free_stringbuffer(element->content_cdata_sb); if(element->base_uri) raptor_free_uri_v2(element->name->world, element->base_uri); if(element->xml_language) RAPTOR_FREE(cstring, (void*)element->xml_language); raptor_free_qname(element->name); if(element->declared_nspaces) raptor_free_sequence(element->declared_nspaces); RAPTOR_FREE(raptor_element, element); } /** * raptor_xml_element_get_name: * @xml_element: XML Element * * Get the XML Name of an XML element * * Return value: The Name. **/ raptor_qname* raptor_xml_element_get_name(raptor_xml_element *xml_element) { return xml_element->name; } /** * raptor_xml_element_set_attributes: * @xml_element: XML Element * @attributes: Array of XML Qname attributes with values * @count: Length of array * * Set the attributes on an XML element. * * The @attributes array becomes owned by the element after this function. **/ void raptor_xml_element_set_attributes(raptor_xml_element* xml_element, raptor_qname **attributes, int count) { xml_element->attributes=attributes; xml_element->attribute_count=count; } /** * raptor_xml_element_get_attributes: * @xml_element: XML Element * * Get the array of attributes on the XML element. * * Use raptor_xml_element_get_attributes_count() to get the count * of the array size. * * Return value: the array of qnames or NULL if none are present. **/ raptor_qname** raptor_xml_element_get_attributes(raptor_xml_element* xml_element) { return xml_element->attributes; } /** * raptor_xml_element_get_attributes_count: * @xml_element: XML Element * * Get the number of attributes on the XML element. * * Return value: Integer number of attributes - 0 or more. **/ int raptor_xml_element_get_attributes_count(raptor_xml_element* xml_element) { return xml_element->attribute_count; } /** * raptor_xml_element_declare_namespace: * @xml_element: XML Element * @nspace: raptor_namespace to declare * * Declare a namespace on the XML Element. * * Return value: non-0 if namespace cannot be declared **/ int raptor_xml_element_declare_namespace(raptor_xml_element* xml_element, raptor_namespace *nspace) { int i; const raptor_namespace *ns; if(!xml_element->declared_nspaces) xml_element->declared_nspaces=raptor_new_sequence(NULL, NULL); if((ns = xml_element->name->nspace)) { /* Cannot have same namespace already seen */ if(ns == nspace || /* ... or two default nspaces */ (!ns->prefix && !nspace->prefix) || /* ... or two same prefixes */ (ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) ) return 1; } for(i=0; (ns = (const raptor_namespace*)raptor_sequence_get_at(xml_element->declared_nspaces, i)); i++) { /* Cannot have same namespace already seen */ if(ns == nspace || /* ... or two default nspaces */ (!ns->prefix && !nspace->prefix) || /* ... or two same prefixes */ (ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) ) return 1; } raptor_sequence_push(xml_element->declared_nspaces, nspace); return 0; } #ifdef RAPTOR_DEBUG void raptor_print_xml_element(raptor_xml_element *element, FILE* stream) { raptor_qname_print(stream, element->name); fputc('\n', stream); if(element->attribute_count) { unsigned int i; int printed=0; fputs(" attributes: ", stream); for (i = 0; i < element->attribute_count; i++) { if(element->attributes[i]) { if(printed) fputc(' ', stream); raptor_qname_print(stream, element->attributes[i]); fprintf(stream, "='%s'", element->attributes[i]->value); printed=1; } } fputc('\n', stream); } } #endif struct nsd { const raptor_namespace *nspace; unsigned char *declaration; size_t length; }; static int raptor_nsd_compare(const void *a, const void *b) { struct nsd* nsd_a=(struct nsd*)a; struct nsd* nsd_b=(struct nsd*)b; return strcmp((const char*)nsd_a->declaration, (const char*)nsd_b->declaration); } /** * raptor_iostream_write_xml_element: * @iostr: iostream object * @element: XML element to format * @nstack: Namespace stack context to use in formatting * @is_empty: non-0 if element is empty * @is_end: non-0 if this is an end element (else is a start element) * @error_handler: error handler function * @error_data: error handler function data * @depth: XML element depth * * Write a formatted XML element to a #raptor_iostream * * Return value: non-0 on failure */ int raptor_iostream_write_xml_element(raptor_iostream* iostr, raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, raptor_simple_message_handler error_handler, void *error_data, int depth) { struct nsd *nspace_declarations=NULL; size_t nspace_declarations_count=0; unsigned int i; /* max is 1 per element and 1 for each attribute + size of declared */ if(nstack) { int nspace_max_count=element->attribute_count+1; if(element->declared_nspaces) nspace_max_count += raptor_sequence_size(element->declared_nspaces); nspace_declarations=(struct nsd*)RAPTOR_CALLOC(nsdarray, nspace_max_count, sizeof(struct nsd)); } if(element->name->nspace) { if(!is_end && nstack && !raptor_namespaces_namespace_in_scope(nstack, element->name->nspace)) { nspace_declarations[0].declaration= raptor_namespaces_format(element->name->nspace, &nspace_declarations[0].length); nspace_declarations[0].nspace=element->name->nspace; nspace_declarations_count++; } } if (!is_end && element->attributes) { for(i=0; i < element->attribute_count; i++) { /* qname */ if(element->attributes[i]->nspace) { if(nstack && !raptor_namespaces_namespace_in_scope(nstack, element->attributes[i]->nspace) && element->attributes[i]->nspace != element->name->nspace) { /* not in scope and not same as element (so already going to be declared)*/ unsigned int j; int declare_me=1; /* check it wasn't an earlier declaration too */ for (j=0; j < nspace_declarations_count; j++) if(nspace_declarations[j].nspace == element->attributes[j]->nspace) { declare_me=0; break; } if(declare_me) { nspace_declarations[nspace_declarations_count].declaration= raptor_namespaces_format(element->attributes[i]->nspace, &nspace_declarations[nspace_declarations_count].length); nspace_declarations[nspace_declarations_count].nspace=element->attributes[i]->nspace; nspace_declarations_count++; } } } } } if(!is_end && nstack && element->declared_nspaces && raptor_sequence_size(element->declared_nspaces) > 0) { for(i=0; i< (unsigned int)raptor_sequence_size(element->declared_nspaces); i++) { raptor_namespace* nspace=(raptor_namespace*)raptor_sequence_get_at(element->declared_nspaces, i); unsigned int j; int declare_me=1; /* check it wasn't an earlier declaration too */ for (j=0; j < nspace_declarations_count; j++) if(nspace_declarations[j].nspace == nspace) { declare_me=0; break; } if(declare_me) { nspace_declarations[nspace_declarations_count].declaration= raptor_namespaces_format(nspace, &nspace_declarations[nspace_declarations_count].length); nspace_declarations[nspace_declarations_count].nspace=nspace; nspace_declarations_count++; } } } raptor_iostream_write_byte(iostr, '<'); if(is_end) raptor_iostream_write_byte(iostr, '/'); if(element->name->nspace && element->name->nspace->prefix_length > 0) { raptor_iostream_write_counted_string(iostr, (const char*)element->name->nspace->prefix, element->name->nspace->prefix_length); raptor_iostream_write_byte(iostr, ':'); } raptor_iostream_write_counted_string(iostr, (const char*)element->name->local_name, element->name->local_name_length); /* declare namespaces */ if(nspace_declarations_count) { /* sort them into the canonical order */ qsort((void*)nspace_declarations, nspace_declarations_count, sizeof(struct nsd), raptor_nsd_compare); /* add them */ for (i=0; i < nspace_declarations_count; i++) { raptor_iostream_write_byte(iostr, ' '); raptor_iostream_write_counted_string(iostr, (const char*)nspace_declarations[i].declaration, nspace_declarations[i].length); RAPTOR_FREE(cstring, nspace_declarations[i].declaration); nspace_declarations[i].declaration=NULL; raptor_namespace_copy(nstack, (raptor_namespace*)nspace_declarations[i].nspace, depth); } } if(!is_end && element->attributes) { for(i=0; i < element->attribute_count; i++) { raptor_iostream_write_byte(iostr, ' '); if(element->attributes[i]->nspace && element->attributes[i]->nspace->prefix_length > 0) { raptor_iostream_write_counted_string(iostr, (char*)element->attributes[i]->nspace->prefix, element->attributes[i]->nspace->prefix_length); raptor_iostream_write_byte(iostr, ':'); } raptor_iostream_write_counted_string(iostr, (const char*)element->attributes[i]->local_name, element->attributes[i]->local_name_length); raptor_iostream_write_counted_string(iostr, "=\"", 2); raptor_iostream_write_xml_escaped_string(iostr, element->attributes[i]->value, element->attributes[i]->value_length, '"', error_handler, error_data); raptor_iostream_write_byte(iostr, '"'); } } if(is_empty) raptor_iostream_write_byte(iostr, '/'); raptor_iostream_write_byte(iostr, '>'); if(nstack) RAPTOR_FREE(stringarray, nspace_declarations); return 0; } /** * raptor_xml_element_get_language: * @xml_element: XML Element * * Get the XML language of the element. * * Return value: XML language or NULL if none in scope **/ const unsigned char* raptor_xml_element_get_language(raptor_xml_element* xml_element) { return xml_element->xml_language; } /** * raptor_valid_xml_ID: * @rdf_parser: RDF parser * @string: The string to check. * * Check the string matches the xml:ID value constraints. * * This checks the syntax part of the xml:ID validity constraint, * that it matches [ VC: Name Token ] as amended by XML Namespaces: * * http://www.w3.org/TR/REC-xml-names/#NT-NCName * * Return value: non-zero if the ID string is valid **/ int raptor_valid_xml_ID(raptor_parser *rdf_parser, const unsigned char *string) { int len=strlen((const char*)string); #ifdef RAPTOR_XML_1_1 #define XML_ID_XML_VERSION 11 #else #define XML_ID_XML_VERSION 10 #endif return raptor_xml_name_check(string, len, XML_ID_XML_VERSION); } /** * raptor_xml_any_escape_string: * @string: string to XML escape (UTF-8) * @len: length of string * @buffer: the buffer to use for new string (UTF-8) * @length: buffer size * @quote: optional quote character to escape for attribute content, or 0 * @xml_version: XML 1.0 (10) or XML 1.1 (11) * @error_handler: error handler function * @error_data: error handler user data * * Return an XML-escaped version a string. * * Follows Canonical XML rules on Text Nodes and Attribute Nodes * http://www.w3.org/TR/xml-c14n#ProcessingModel * * Both: * Replaces <literal>&</literal> and <literal><</literal> * with <literal>&amp;</literal> and <literal>&lt;</literal> * respectively, preserving other characters. * * Text Nodes: * <literal>></literal> is turned into <literal>&gt;</literal> * ##xD is turned into <literal>&##xD;</literal> * * Attribute Nodes: * <literal>></literal> is generated not <literal>&gt</literal>. * ##x9, ##xA and ##xD are turned into * <literal>&##x9;</literal>, * <literal>&##xA;</literal> and * <literal>&##xD;</literal> * entities. * * If @quote is given it can be either of '\'' or '\"' * which will be turned into <literal>&apos;</literal> or * <literal>&quot;</literal> respectively. * ASCII NUL ('\0') or any other character will not be escaped. * * If @buffer is NULL, no work is done but the size of buffer * required is returned. The output in buffer remains in UTF-8. * * If the input @string is empty, a single NUL will be written to the * buffer. * * Return value: the number of bytes required / used or <0 on failure. **/ int raptor_xml_any_escape_string(const unsigned char *string, size_t len, unsigned char *buffer, size_t length, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data) { int l; size_t new_len=0; const unsigned char *p; unsigned char *q; int unichar_len; raptor_unichar unichar; if(quote != '\"' && quote != '\'') quote='\0'; for(l=len, p=string; l; p++, l--) { if(*p > 0x7f) { unichar_len=raptor_utf8_to_unicode_char(&unichar, p, l); if(unichar_len < 0 || unichar_len > l) { if(error_handler) error_handler(error_data, "Bad UTF-8 encoding."); return -1; } } else { unichar=*p; unichar_len=1; } if(unichar == '&') /* & */ new_len+= 5; else if(unichar == '<' || (!quote && unichar == '>')) /* < or > */ new_len+= 4; else if (quote && unichar == (unsigned long)quote) /* ' or " */ new_len+= 6; else if (unichar == 0x0d || (quote && (unichar == 0x09 || unichar == 0x0a))) /* or or &xA; */ new_len+= 5; else if (unichar == 0x7f || (unichar < 0x20 && unichar != 0x09 && unichar != 0x0a)) { if(!unichar || xml_version < 11) { if(error_handler) error_handler(error_data, "Cannot write illegal XML 1.0 character %d.", unichar); } else { /* &#xX; */ new_len+= 5; if(unichar > 0x0f) new_len++; } } else new_len+= unichar_len; unichar_len--; /* since loop does len-- */ p += unichar_len; l -= unichar_len; } if(length && new_len > length) return 0; if(!buffer) return new_len; for(l=len, p=string, q=buffer; l; p++, l--) { if(*p > 0x7f) { unichar_len=raptor_utf8_to_unicode_char(&unichar, p, l); } else { unichar=*p; unichar_len=1; } if(unichar == '&') { strncpy((char*)q, "&", 5); q+= 5; } else if (unichar == '<') { strncpy((char*)q, "<", 4); q+= 4; } else if (!quote && unichar == '>') { strncpy((char*)q, ">", 4); q+= 4; } else if (quote && unichar == (unsigned long)quote) { if(quote == '\'') strncpy((char*)q, "'", 6); else strncpy((char*)q, """, 6); q+= 6; } else if (unichar == 0x0d || (quote && (unichar == 0x09 || unichar == 0x0a))) { /* &#xX; */ *q++='&'; *q++='#'; *q++='x'; if(unichar == 0x09) *q++ = '9'; else *q++ = 'A'+ ((char)unichar-0x0a); *q++= ';'; } else if (unichar == 0x7f || (unichar < 0x20 && unichar != 0x09 && unichar != 0x0a)) { if(!unichar || xml_version < 11) { if(error_handler) error_handler(error_data, "Cannot write illegal XML 1.0 character %d.", unichar); } else { /* &#xX; */ *q++='&'; *q++='#'; *q++='x'; sprintf((char*)q, "%X", (unsigned int)unichar); q+= (unichar < 0x10) ? 1 : 2; *q++=';'; } } else { strncpy((char*)q, (const char*)p, unichar_len); q+= unichar_len; } unichar_len--; /* since loop does len-- */ p += unichar_len; l -= unichar_len; } /* Terminate new string */ *q = '\0'; return new_len; } /** * raptor_xml_escape_string: * @string: string to XML 1.0 escape (UTF-8) * @len: length of string * @buffer: the buffer to use for new string (UTF-8) * @length: buffer size * @quote: optional quote character to escape for attribute content, or 0 * @error_handler: error handler function * @error_data: error handler user data * * Return an XML 1.0-escaped version a string. * * See raptor_xml_any_escape_string() for the conditions on parameters. * * Return value: the number of bytes required / used or <0 on failure. **/ int raptor_xml_escape_string(const unsigned char *string, size_t len, unsigned char *buffer, size_t length, char quote, raptor_simple_message_handler error_handler, void *error_data) { return raptor_xml_any_escape_string(string, len, buffer, length, quote, 10, error_handler, error_data); } /** * raptor_iostream_write_xml_any_escaped_string: * @string: string to XML escape (UTF-8) * @len: length of string * @quote: optional quote character to escape for attribute content, or 0 * @iostr: the #raptor_iostream to write to * @xml_version: XML version - 10 (XML 1.0) or 11 (XML 1.1) * @error_handler: error handler function * @error_data: error handler data * * Write an XML-escaped version of a string to an iostream. * * See raptor_xml_escape_string() for the escapes performed and * the conditions on @quote and @string. XML 1.1 allows additional * characters in XML such as U+0001 to U+001F inclusive. * * Return value: non 0 on failure **/ int raptor_iostream_write_xml_any_escaped_string(raptor_iostream* iostr, const unsigned char *string, size_t len, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data) { int l; const unsigned char *p; if(xml_version != 10) xml_version=11; if(quote != '\"' && quote != '\'') quote='\0'; for(l=len, p=string; l; p++, l--) { int unichar_len=1; raptor_unichar unichar=*p; if(*p > 0x7f) { unichar_len=raptor_utf8_to_unicode_char(&unichar, p, l); if(unichar_len < 0 || unichar_len > l) { if(error_handler) error_handler(error_data, "Bad UTF-8 encoding."); return 1; } } if(unichar == '&') raptor_iostream_write_counted_string(iostr, "&", 5); else if (unichar == '<') raptor_iostream_write_counted_string(iostr, "<", 4); else if (!quote && unichar == '>') raptor_iostream_write_counted_string(iostr, ">", 4); else if (quote && unichar == (unsigned long)quote) { if(quote == '\'') raptor_iostream_write_counted_string(iostr, "'", 6); else raptor_iostream_write_counted_string(iostr, """, 6); } else if (unichar == 0x0d || (quote && (unichar == 0x09 || unichar == 0x0a))) { /* &#xX; */ raptor_iostream_write_counted_string(iostr, "&#x", 3); if(unichar == 0x09) raptor_iostream_write_byte(iostr, '9'); else raptor_iostream_write_byte(iostr, 'A'+ ((char)unichar-0x0a)); raptor_iostream_write_byte(iostr, ';'); } else if (unichar == 0x7f || (unichar < 0x20 && unichar != 0x09 && unichar != 0x0a)) { if(!unichar || xml_version < 11) { if(error_handler) error_handler(error_data, "Cannot write illegal XML 1.0 character %d.", unichar); } else { int width=(unichar < 0x10) ? 1 : 2; /* &#xX; */ raptor_iostream_write_counted_string(iostr, "&#x", 3); raptor_iostream_format_hexadecimal(iostr, unichar, width); raptor_iostream_write_byte(iostr, ';'); } } else raptor_iostream_write_counted_string(iostr, (const char*)p, unichar_len); unichar_len--; /* since loop does len-- */ p += unichar_len; l -= unichar_len; } return 0; } /** * raptor_iostream_write_xml_escaped_string: * @string: string to XML 1.0 escape (UTF-8) * @len: length of string * @quote: optional quote character to escape for attribute content, or 0 * @iostr: the #raptor_iostream to write to * @error_handler: error handler function * @error_data: error handler data * * Write an XML 1.0-escaped version of a string to an iostream. * * See raptor_iostream_write_xml_any_escaped_string() for the escapes * performed and the conditions on @quote and @string. * * Return value: non 0 on failure **/ int raptor_iostream_write_xml_escaped_string(raptor_iostream* iostr, const unsigned char *string, size_t len, char quote, raptor_simple_message_handler error_handler, void *error_data) { return raptor_iostream_write_xml_any_escaped_string(iostr, string, len, quote, 10, error_handler, error_data); } /** * raptor_xml_name_check: * @string: UTF-8 name string * @length: length of string * @xml_version: XML version * * Check a string is a legal XML name (and legal UTF8). * * xml_version is either 10 (for XML 1.0) or 11 for (XML 1.1). Any * other version fails. * * Return value: Non 0 if the string is a legal XML name **/ int raptor_xml_name_check(const unsigned char *string, size_t length, int xml_version) { int pos; if(xml_version != 10 && xml_version != 11) return 0; for(pos=0; length > 0; pos++) { raptor_unichar unichar=0; int unichar_len=raptor_utf8_to_unicode_char(&unichar, string, length); if(unichar_len < 0 || unichar_len > (int)length) return 0; if(unichar > 0x10ffff) return 0; if(!pos) { /* start of name */ if(xml_version == 10) { if(!raptor_unicode_is_xml10_namestartchar(unichar)) return 0; } else { if(!raptor_unicode_is_xml11_namestartchar(unichar)) return 0; } } else { /* rest of name */ if(xml_version == 10) { if(!raptor_unicode_is_xml10_namechar(unichar)) return 0; } else { if(!raptor_unicode_is_xml11_namechar(unichar)) return 0; } } string += unichar_len; length -= unichar_len; } return 1; } #endif #ifdef STANDALONE /* static prototypes */ void raptor_bad_string_print(const unsigned char *input, FILE *stream); int main(int argc, char *argv[]); void raptor_bad_string_print(const unsigned char *input, FILE *stream) { while(*input) { char c=*input; if(isprint(c)) fputc(c, stream); else fprintf(stream, "\\x%02X", (c & 0xff)); input++; } } int main(int argc, char *argv[]) { const char *program=raptor_basename(argv[0]); struct tv { const char *string; const char quote; const char *result; }; struct tv *t; struct tv test_values[]={ {"", 0, ""}, {"&", 0, "&"}, {"<", 0, "<"}, {">", 0, ">"}, {"\x09", 0, "\x09"}, {"\x0a", 0, "\x0a"}, {"\x0d", 0, " "}, {"'&'", '\'', "'&'"}, {"'<'", '\'', "'<'"}, {"'>'", '\'', "'>'"}, {"\x09", '\'', " "}, {"\x0a", '\'', " "}, {"\x0d", '\'', " "}, {"\"&\"", '\"', ""&""}, {"\"<\"", '\"', ""<""}, {"\">\"", '\"', "">""}, {"\x09", '\"', " "}, {"\x0a", '\"', " "}, {"\x0d", '\"', " "}, {"&", 0, "&amp;"}, {"<foo>", 0, "<foo>"}, #if 0 {"\x1f", 0, ""}, {"\xc2\x80", 0, "€"}, {"\xe0\xa0\x80", 0, "ࠀ"}, {"\xf0\x90\x80\x80", 0, "𐀀"}, {"\x7f", 0, ""}, {"\xdf\xbf", 0, "߿"}, {"\xef\xbf\xbd", 0, "�"}, {"\xf4\x8f\xbf\xbf", 0, "􏿿"}, {"\xc3\xbf", 0, "ÿ"}, {"\xf0\x8f\xbf\xbf", 0, "￿"}, #endif {NULL, 0, 0} }; int i; int failures=0; for(i=0; (t=&test_values[i]) && t->string; i++) { const unsigned char *utf8_string=(const unsigned char*)t->string; int quote=t->quote; size_t utf8_string_len=strlen((const char*)utf8_string); unsigned char *xml_string; int xml_string_len=0; xml_string_len=raptor_xml_escape_string(utf8_string, utf8_string_len, NULL, 0, quote, NULL, NULL); if(xml_string_len < 0) { fprintf(stderr, "%s: raptor_xml_escape_string FAILED to escape string '", program); raptor_bad_string_print(utf8_string, stderr); fputs("'\n", stderr); failures++; continue; } xml_string=(unsigned char*)RAPTOR_MALLOC(cstring, xml_string_len+1); xml_string_len=raptor_xml_escape_string(utf8_string, utf8_string_len, xml_string, xml_string_len, quote, NULL, NULL); if(xml_string_len < 0) { fprintf(stderr, "%s: raptor_xml_escape_string FAILED to escape string '", program); raptor_bad_string_print(utf8_string, stderr); fputs("'\n", stderr); failures++; continue; } if(strcmp((const char*)xml_string, t->result)) { fprintf(stderr, "%s: raptor_xml_escape_string FAILED to escape string '", program); raptor_bad_string_print(utf8_string, stderr); fprintf(stderr, "', expected '%s', result was '%s'\n", t->result, xml_string); failures++; continue; } #if RAPTOR_DEBUG > 1 fprintf(stderr, "%s: raptor_xml_escape_string escaped string to '%s' ok\n", program, xml_string); #endif RAPTOR_FREE(cstring, xml_string); } #if RAPTOR_DEBUG > 1 if(!failures) fprintf(stderr, "%s: raptor_xml_escape_string all tests OK\n", program); #endif return failures; } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_www.c����������������������������������������������������������������������0000644�0001750�0001750�00000053462�11330672502�013206� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www.c - Raptor WWW retrieval core * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" static int raptor_www_init_common(int skip_www_init_finish, int *www_initialized); static void raptor_www_finish_common(int skip_www_init_finish); static int raptor_www_file_fetch(raptor_www* www); #ifndef RAPTOR_DISABLE_V1 /* should raptor_www do initializing and cleanup of the WWW library */ static int raptor_www_skip_www_init_finish=0; static int raptor_www_initialized=0; #endif #ifndef RAPTOR_DISABLE_V1 /** * raptor_www_init: * * Initialise the WWW class. * * Must be called before creating any #raptor_www object. * * See also: raptor_www_init_v2() **/ void raptor_www_init(void) { raptor_www_init_common(raptor_www_skip_www_init_finish, &raptor_www_initialized); } #endif /** * raptor_www_init_v2: * @world: raptor_world object * * Initialise the WWW class. * * Must be called before creating any #raptor_www object. * * See also: raptor_www_init() * * Return value: non-0 on failure **/ int raptor_www_init_v2(raptor_world* world) { #ifndef RAPTOR_DISABLE_V1 /* support legacy v1 raptor_www_no_www_library_init_finish() */ if(raptor_www_skip_www_init_finish) world->www_skip_www_init_finish = raptor_www_skip_www_init_finish; /* skip init if already inited with legacy init() */ if(raptor_www_initialized) return 0; #endif return raptor_www_init_common(world->www_skip_www_init_finish, &world->www_initialized); } static int raptor_www_init_common(int skip_www_init_finish, int *www_initialized) { int rc = 0; if(*www_initialized) return 0; if(!skip_www_init_finish) { #ifdef RAPTOR_WWW_LIBCURL rc = curl_global_init(CURL_GLOBAL_ALL); #endif } *www_initialized = 1; return rc; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_www_no_www_library_init_finish: * * Do not initialise or finish the lower level WWW library. * * If this is called then the raptor_www library will neither * initialise or terminate the lower level WWW library. Usually in * raptor_init either curl_global_init (for libcurl) * are called and in raptor_finish curl_global_cleanup is called. * * This allows the application finer control over these libraries such * as setting other global options or potentially calling and terminating * raptor several times. It does mean that applications which use * this call must do their own extra work in order to allocate and free * all resources to the system. * * This function must be called before raptor_init. * * See also: raptor_www_no_www_library_init_finish_v2() * **/ void raptor_www_no_www_library_init_finish(void) { raptor_www_skip_www_init_finish = 1; } #endif /** * raptor_www_no_www_library_init_finish_v2: * @world: raptor_world object * * Do not initialise or finish the lower level WWW library. * * If this is called then the raptor_www library will neither * initialise or terminate the lower level WWW library. Usually in * raptor_world_open() either curl_global_init (for libcurl) * are called and in raptor_finish curl_global_cleanup is called. * * This allows the application finer control over these libraries such * as setting other global options or potentially calling and terminating * raptor several times. It does mean that applications which use * this call must do their own extra work in order to allocate and free * all resources to the system. * * This function must be called before raptor_world_open(). * **/ void raptor_www_no_www_library_init_finish_v2(raptor_world* world) { world->www_skip_www_init_finish = 1; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_www_finish: * * Terminate the WWW class. * * Must be called to clean any resources used by the WWW implementation. * * See also: raptor_www_finish_v2() **/ void raptor_www_finish(void) { raptor_www_finish_common(raptor_www_skip_www_init_finish); } #endif /** * raptor_www_finish_v2: * @world: raptor_world object * * Terminate the WWW class. * * Must be called to clean any resources used by the WWW implementation. * * See also: raptor_www_finish() **/ void raptor_www_finish_v2(raptor_world* world) { raptor_www_finish_common(world->www_skip_www_init_finish); } static void raptor_www_finish_common(int skip_www_init_finish) { if(!skip_www_init_finish) { #ifdef RAPTOR_WWW_LIBCURL curl_global_cleanup(); #endif } } #ifndef RAPTOR_DISABLE_V1 /** * raptor_www_new_with_connection: * @connection: external WWW connection object. * * Constructor - create a new #raptor_www object over an existing WWW connection. * * At present this only works with a libcurl CURL handle object * when raptor is compiled with libcurl suppport. Otherwise the * @connection is ignored. This allows such things as setting * up special flags on the curl handle before passing into the constructor. * * raptor_init() MUST have been called before calling this function. * Use raptor_www_new_with_connection_v2() if using raptor_world APIs. * * Return value: a new #raptor_www object or NULL on failure. **/ raptor_www* raptor_www_new_with_connection(void *connection) { return raptor_www_new_with_connection_v2(raptor_world_instance(), connection); } #endif /** * raptor_www_new_with_connection_v2: * @world: raptor_world object * @connection: external WWW connection object. * * Constructor - create a new #raptor_www object over an existing WWW connection. * * At present this only works with a libcurl CURL handle object * when raptor is compiled with libcurl suppport. Otherwise the * @connection is ignored. This allows such things as setting * up special flags on the curl handle before passing into the constructor. * * Return value: a new #raptor_www object or NULL on failure. **/ raptor_www* raptor_www_new_with_connection_v2(raptor_world* world, void *connection) { raptor_www* www=(raptor_www* )RAPTOR_CALLOC(www, 1, sizeof(raptor_www)); if(!www) return NULL; www->world=world; www->type=NULL; www->free_type=1; /* default is to free content type */ www->total_bytes=0; www->failed=0; www->status_code=0; www->write_bytes=NULL; www->content_type=NULL; www->uri_filter=NULL; www->connection_timeout=10; www->cache_control=NULL; #ifdef RAPTOR_WWW_LIBCURL www->curl_handle=(CURL*)connection; raptor_www_curl_init(www); #endif #ifdef RAPTOR_WWW_LIBXML raptor_www_libxml_init(www); #endif #ifdef RAPTOR_WWW_LIBFETCH raptor_www_libfetch_init(www); #endif www->error_handlers.locator=&www->locator; raptor_error_handlers_init_v2(world, &www->error_handlers); return www; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_www_new: * * Constructor - create a new #raptor_www object. * * raptor_init() MUST have been called before calling this function. * Use raptor_www_new_v2() if using raptor_world APIs. * * Return value: a new #raptor_www or NULL on failure. **/ raptor_www* raptor_www_new(void) { return raptor_www_new_v2(raptor_world_instance()); } #endif /** * raptor_www_new_v2: * @world: raptor_world object * * Constructor - create a new #raptor_www object. * * Return value: a new #raptor_www or NULL on failure. **/ raptor_www* raptor_www_new_v2(raptor_world* world) { return raptor_www_new_with_connection_v2(world, NULL); } /** * raptor_www_free: * @www: WWW object. * * Destructor - destroy a #raptor_www object. **/ void raptor_www_free(raptor_www* www) { /* free context */ if(www->type) { if(www->free_type) RAPTOR_FREE(cstring, www->type); www->type=NULL; } if(www->user_agent) { RAPTOR_FREE(cstring, www->user_agent); www->user_agent=NULL; } if(www->cache_control) { RAPTOR_FREE(cstring, www->cache_control); www->cache_control=NULL; } if(www->proxy) { RAPTOR_FREE(cstring, www->proxy); www->proxy=NULL; } if(www->http_accept) { RAPTOR_FREE(cstring, www->http_accept); www->http_accept=NULL; } #ifdef RAPTOR_WWW_LIBCURL raptor_www_curl_free(www); #endif #ifdef RAPTOR_WWW_LIBXML raptor_www_libxml_free(www); #endif #ifdef RAPTOR_WWW_LIBFETCH raptor_www_libfetch_free(www); #endif if(www->uri) raptor_free_uri_v2(www->world, www->uri); if(www->final_uri) raptor_free_uri_v2(www->world, www->final_uri); RAPTOR_FREE(www, www); } /** * raptor_www_set_error_handler: * @www: WWW object * @error_handler: error handler function * @error_data: error handler data * * Set the error handler routine for the raptor_www class. * * This takes the same arguments as the raptor_parser_set_error() and * raptor_parser_set_warning_handler() methods. **/ void raptor_www_set_error_handler(raptor_www* www, raptor_message_handler error_handler, void *error_data) { www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].user_data=error_data; www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].handler=error_handler; } /** * raptor_www_set_write_bytes_handler: * @www: WWW object * @handler: bytes handler function * @user_data: bytes handler data * * Set the handler to receive bytes written by the #raptor_www implementation. * **/ void raptor_www_set_write_bytes_handler(raptor_www* www, raptor_www_write_bytes_handler handler, void *user_data) { www->write_bytes=handler; www->write_bytes_userdata=user_data; } /** * raptor_www_set_content_type_handler: * @www: WWW object * @handler: content type handler function * @user_data: content type handler data * * Set the handler to receive the HTTP Content-Type header value. * * This is called if or when the value is discovered during retrieval * by the raptor_www implementation. Not all implementations provide * access to this. **/ void raptor_www_set_content_type_handler(raptor_www* www, raptor_www_content_type_handler handler, void *user_data) { www->content_type=handler; www->content_type_userdata=user_data; } /** * raptor_www_set_user_agent: * @www: WWW object * @user_agent: User-Agent string * * Set the user agent value, for HTTP requests typically. **/ void raptor_www_set_user_agent(raptor_www* www, const char *user_agent) { char *ua_copy=NULL; if(!user_agent || !*user_agent) { www->user_agent=NULL; return; } ua_copy=(char*)RAPTOR_MALLOC(cstring, strlen(user_agent)+1); if(!ua_copy) return; strcpy(ua_copy, user_agent); www->user_agent=ua_copy; } /** * raptor_www_set_proxy: * @www: WWW object * @proxy: proxy string. * * Set the proxy for the WWW object. * * The @proxy usually a string of the form http://server.domain:port. **/ void raptor_www_set_proxy(raptor_www* www, const char *proxy) { char *proxy_copy; if(!proxy) return; proxy_copy=(char*)RAPTOR_MALLOC(cstring, strlen(proxy)+1); if(!proxy_copy) return; strcpy(proxy_copy, proxy); www->proxy=proxy_copy; } /** * raptor_www_set_http_accept: * @www: #raptor_www class * @value: Accept: header value or NULL to have an empty one. * * Set HTTP Accept header. * **/ void raptor_www_set_http_accept(raptor_www* www, const char *value) { char *value_copy; size_t len=8; /* strlen("Accept:")+1 */ if(value) len+=1+strlen(value); /* " "+value */ value_copy=(char*)RAPTOR_MALLOC(cstring, len); if(!value_copy) return; www->http_accept=value_copy; strcpy(value_copy, "Accept:"); value_copy+=7; if(value) { *value_copy++=' '; strcpy(value_copy, value); } #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Using Accept header: '%s'\n", www->http_accept); #endif } /** * raptor_www_set_connection_timeout: * @www: WWW object * @timeout: Timeout in seconds * * Set WWW connection timeout **/ void raptor_www_set_connection_timeout(raptor_www* www, int timeout) { www->connection_timeout=timeout; } /** * raptor_www_set_http_cache_control: * @www: WWW object * @cache_control: Cache-Control header value (or NULL to disable) * * Set HTTP Cache-Control:header (default none) * * The @cache_control value can be a string to set it, "" to send * a blank header or NULL to not set the header at all. * * Return value: non-0 on failure **/ int raptor_www_set_http_cache_control(raptor_www* www, const char* cache_control) { char *cache_control_copy; const char* const header="Cache-Control:"; const size_t header_len=14; /* strlen("Cache-Control:") */ size_t len; RAPTOR_ASSERT((strlen(header) != header_len), "Cache-Control header length is wrong"); if(www->cache_control) { RAPTOR_FREE(cstring, www->cache_control); www->cache_control=NULL; } if(!cache_control) { www->cache_control=NULL; return 0; } len=header_len + 1 +strlen(cache_control) + 1; /* header+" "+cache_control+"\0" */ cache_control_copy=(char*)RAPTOR_MALLOC(cstring, len); if(!cache_control_copy) return 1; www->cache_control=cache_control_copy; strncpy(cache_control_copy, header, header_len); cache_control_copy+= header_len; if(*cache_control) { *cache_control_copy++=' '; strcpy(cache_control_copy, cache_control); } #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Using Cache-Control header: '%s'\n", www->cache_control); #endif return 0; } /** * raptor_www_set_uri_filter: * @www: WWW object * @filter: URI filter function * @user_data: User data to pass to filter function * * Set URI filter function for WWW retrieval. **/ void raptor_www_set_uri_filter(raptor_www* www, raptor_uri_filter_func filter, void *user_data) { www->uri_filter=filter; www->uri_filter_user_data=user_data; } /** * raptor_www_get_connection: * @www: #raptor_www object * * Get WWW library connection object. * * Return the internal WWW connection handle. For libcurl, this * returns the CURL handle and for libxml the context. Otherwise * it returns NULL. * * Return value: connection pointer **/ void* raptor_www_get_connection(raptor_www* www) { #ifdef RAPTOR_WWW_NONE return NULL; #endif #ifdef RAPTOR_WWW_LIBCURL return www->curl_handle; #endif #ifdef RAPTOR_WWW_LIBXML return www->ctxt; #endif #ifdef RAPTOR_WWW_LIBFETCH return NULL; #endif return NULL; } /** * raptor_www_abort: * @www: WWW object * @reason: abort reason message * * Abort an ongoing raptor WWW operation and pass back a reason. * * This is typically used within one of the raptor WWW handlers * when retrieval need no longer continue due to another * processing issue or error. **/ void raptor_www_abort(raptor_www* www, const char *reason) { www->failed=1; } void raptor_www_error(raptor_www* www, const char *message, ...) { va_list arguments; va_start(arguments, message); raptor_log_error_varargs(www->world, RAPTOR_LOG_LEVEL_ERROR, www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].handler, www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].user_data, &www->locator, message, arguments); va_end(arguments); } static int raptor_www_file_handle_fetch(raptor_www* www, FILE* fh) { unsigned char buffer[RAPTOR_WWW_BUFFER_SIZE+1]; while(!feof(fh)) { int len=fread(buffer, 1, RAPTOR_WWW_BUFFER_SIZE, fh); if(len > 0) { www->total_bytes += len; buffer[len]='\0'; if(www->write_bytes) www->write_bytes(www, www->write_bytes_userdata, buffer, len, 1); } if(feof(fh) || www->failed) break; } if(!www->failed) www->status_code=200; return www->failed; } static int raptor_www_file_fetch(raptor_www* www) { char *filename; FILE *fh; unsigned char *uri_string=raptor_uri_as_string_v2(www->world, www->uri); #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) struct stat buf; #endif www->status_code=200; filename=raptor_uri_uri_string_to_filename(uri_string); if(!filename) { raptor_www_error(www, "Not a file: URI"); return 1; } #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) if(!stat(filename, &buf) && S_ISDIR(buf.st_mode)) { raptor_www_error(www, "Cannot read from a directory '%s'", filename); RAPTOR_FREE(cstring, filename); www->status_code=404; return 1; } #endif fh=fopen(filename, "rb"); if(!fh) { raptor_www_error(www, "file '%s' open failed - %s", filename, strerror(errno)); RAPTOR_FREE(cstring, filename); www->status_code=(errno == EACCES) ? 403: 404; www->failed=1; return www->failed; } raptor_www_file_handle_fetch(www, fh); fclose(fh); RAPTOR_FREE(cstring, filename); return www->failed; } /** * raptor_www_fetch: * @www: WWW object * @uri: URI to read from * * Start a WWW content retrieval for the given URI, returning data via the write_bytes handler. * * Return value: non-0 on failure. **/ int raptor_www_fetch(raptor_www *www, raptor_uri *uri) { int status=1; www->uri=raptor_new_uri_for_retrieval_v2(www->world, uri); www->locator.uri=uri; www->locator.line= -1; www->locator.column= -1; if(www->uri_filter) if(www->uri_filter(www->uri_filter_user_data, uri)) return status; #ifdef RAPTOR_WWW_NONE status=raptor_www_file_fetch(www); #else if(raptor_uri_uri_string_is_file_uri(raptor_uri_as_string_v2(www->world, www->uri))) status=raptor_www_file_fetch(www); else { #ifdef RAPTOR_WWW_LIBCURL status=raptor_www_curl_fetch(www); #endif #ifdef RAPTOR_WWW_LIBXML status=raptor_www_libxml_fetch(www); #endif #ifdef RAPTOR_WWW_LIBFETCH status=raptor_www_libfetch_fetch(www); #endif } #endif if(!status && www->status_code && www->status_code != 200){ raptor_www_error(www, "Resolving URI failed with HTTP status %d", www->status_code); status=1; } www->failed=status; return www->failed; } static void raptor_www_fetch_to_string_write_bytes(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb) { raptor_stringbuffer* sb=(raptor_stringbuffer*)userdata; int len=size*nmemb; raptor_stringbuffer_append_counted_string(sb, (unsigned char*)ptr, len, 1); } /** * raptor_www_fetch_to_string: * @www: raptor_www object * @uri: raptor_uri to retrieve * @string_p: pointer to location to hold string * @length_p: pointer to location to hold length of string (or NULL) * @malloc_handler: pointer to malloc to use to make string (or NULL) * * Start a WWW content retrieval for the given URI, returning the data in a new string. * * If malloc_handler is null, raptor will allocate it using it's * own memory allocator. *string_p is set to NULL on failure (and * *length_p to 0 if length_p is not NULL). * * Return value: non-0 on failure **/ RAPTOR_EXTERN_C int raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)) { raptor_stringbuffer *sb=NULL; void *str=NULL; raptor_www_write_bytes_handler saved_write_bytes; void *saved_write_bytes_userdata; sb=raptor_new_stringbuffer(); if(!sb) return 1; if(length_p) *length_p=0; saved_write_bytes=www->write_bytes; saved_write_bytes_userdata=www->write_bytes_userdata; raptor_www_set_write_bytes_handler(www, raptor_www_fetch_to_string_write_bytes, sb); if(raptor_www_fetch(www, uri)) str=NULL; else { size_t len=raptor_stringbuffer_length(sb); if(len) { str=(void*)malloc_handler(len+1); if(str) { raptor_stringbuffer_copy_to_string(sb, (unsigned char*)str, len+1); *string_p=str; if(length_p) *length_p=len; } } } if(sb) raptor_free_stringbuffer(sb); raptor_www_set_write_bytes_handler(www, saved_write_bytes, saved_write_bytes_userdata); return (str == NULL); } /** * raptor_www_get_final_uri: * @www: #raptor_www object * * Get the WWW final resolved URI. * * This returns the URI used after any protocol redirection. * * Return value: a new URI or NULL if not known. **/ raptor_uri* raptor_www_get_final_uri(raptor_www* www) { return www->final_uri ? raptor_uri_copy_v2(www->world, www->final_uri) : NULL; } /** * raptor_www_set_final_uri_handler: * @www: WWW object * @handler: content type handler function * @user_data: content type handler data * * Set the handler to receive the HTTP Content-Type header value. * * This is called if or when the value is discovered during retrieval * by the raptor_www implementation. Not all implementations provide * access to this. **/ void raptor_www_set_final_uri_handler(raptor_www* www, raptor_www_final_uri_handler handler, void *user_data) { www->final_uri_handler=handler; www->final_uri_userdata=user_data; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_xsd.c����������������������������������������������������������������������0000644�0001750�0001750�00000003425�11330672502�013152� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_xsd.c - Raptor XML Schema Datatypes (XSD) code * * Copyright (C) 2005-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" raptor_identifier* raptor_new_identifier_from_double(raptor_world* world, double d) { unsigned char *string; raptor_uri *uri; string=(unsigned char*)RAPTOR_MALLOC(cstring, 32); /* FIXME */ if((double)((int)d) == d) sprintf((char*)string, "%1g.0", d); else sprintf((char*)string, "%1g", d); uri=raptor_new_uri_v2(world, (const unsigned char*)"http://www.w3.org/2001/XMLSchema#double"); return raptor_new_identifier_v2(world, RAPTOR_IDENTIFIER_TYPE_LITERAL, NULL, RAPTOR_URI_SOURCE_ELEMENT, NULL, string, uri, NULL); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_statement.c����������������������������������������������������������������0000644�0001750�0001750�00000070635�11330672502�014367� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_statement.c - Raptor statements * * Copyright (C) 2008, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* prototypes for helper functions */ static void raptor_print_statement_part_as_ntriples(raptor_world* world, FILE* stream, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language); static void raptor_print_statement_as_ntriples_common(raptor_world* world, const raptor_statement *statement, FILE *stream); static int raptor_statement_compare_common(raptor_world* world, const raptor_statement *s1, const raptor_statement *s2); /** * raptor_statement_copy_v2: * @statement: statement to copy * * Copy a #raptor_statement. * * Return value: a new #raptor_statement_v2 or NULL on error */ raptor_statement_v2* raptor_statement_copy_v2(const raptor_statement_v2 *statement) { return raptor_statement_copy_v2_from_v1(statement->world, statement->s); } /** * raptor_statement_copy_v2_from_v1: * @world: raptor_world object * @statement: statement to copy * * Copy a #raptor_statement and wrap it in #raptor_statement_v2. * * Return value: a new #raptor_statement_v2 or NULL on error */ raptor_statement_v2* raptor_statement_copy_v2_from_v1(raptor_world* world, const raptor_statement *statement) { raptor_statement_v2 *s; s=(raptor_statement_v2*)RAPTOR_CALLOC(raptor_statement_v2, 1, sizeof(raptor_statement_v2)); if(!s) return NULL; s->world=world; s->s=raptor_statement_copy(world, statement); if(!s->s) { raptor_free_statement_v2(s); s=NULL; } return s; } /** * raptor_statement_copy: * @world: raptor_world object * @statement: statement to copy * * Copy a #raptor_statement. * * Return value: a new #raptor_statement or NULL on error */ raptor_statement* raptor_statement_copy(raptor_world* world, const raptor_statement *statement) { raptor_statement *s; s=(raptor_statement*)RAPTOR_CALLOC(raptor_statement, 1, sizeof(raptor_statement)); if(!s) return NULL; s->subject_type=statement->subject_type; if(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { unsigned char *new_blank=(unsigned char*)RAPTOR_MALLOC(cstring, strlen((char*)statement->subject)+1); if(!new_blank) goto oom; strcpy((char*)new_blank, (const char*)statement->subject); s->subject=new_blank; } else if(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { s->subject=raptor_new_uri_from_rdf_ordinal(world, *((int*)statement->subject)); s->subject_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; } else s->subject=raptor_uri_copy_v2(world, (raptor_uri*)statement->subject); s->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; if(statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) s->predicate=raptor_new_uri_from_rdf_ordinal(world, *((int*)statement->predicate)); else s->predicate=raptor_uri_copy_v2(world, (raptor_uri*)statement->predicate); s->object_type=statement->object_type; if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL || statement->object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { unsigned char *string; char *language=NULL; raptor_uri *uri=NULL; string=(unsigned char*)RAPTOR_MALLOC(cstring, strlen((char*)statement->object)+1); if(!string) goto oom; strcpy((char*)string, (const char*)statement->object); s->object=string; if(statement->object_literal_language) { language=(char*)RAPTOR_MALLOC(cstring, strlen((const char*)statement->object_literal_language)+1); if(!language) goto oom; strcpy(language, (const char*)statement->object_literal_language); s->object_literal_language=(const unsigned char*)language; } if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { /* nop */ } else if(statement->object_literal_datatype) { uri=raptor_uri_copy_v2(world, (raptor_uri*)statement->object_literal_datatype); s->object_literal_datatype=uri; } } else if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { char *blank=(char*)statement->object; unsigned char *new_blank=(unsigned char*)RAPTOR_MALLOC(cstring, strlen(blank)+1); if(!new_blank) goto oom; strcpy((char*)new_blank, (const char*)blank); s->object=new_blank; } else if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { s->object=raptor_new_uri_from_rdf_ordinal(world, *((int*)statement->object)); s->object_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; } else { raptor_uri *uri=raptor_uri_copy_v2(world, (raptor_uri*)statement->object); s->object=uri; } return s; oom: raptor_free_statement(world, s); return NULL; } /** * raptor_free_statement_v2: * @statement: statement * * Destructor * */ void raptor_free_statement_v2(raptor_statement_v2 *statement) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(statement, raptor_statement); raptor_free_statement(statement->world, statement->s); RAPTOR_FREE(raptor_statement_v2, statement); } /** * raptor_free_statement: * @statement: statement * * Destructor * */ void raptor_free_statement(raptor_world *world, raptor_statement *statement) { if(statement->subject) { if(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) raptor_free_uri_v2(world, (raptor_uri*)statement->subject); else RAPTOR_FREE(cstring, (void*)statement->subject); } if(statement->predicate) { if(statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_PREDICATE || statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) raptor_free_uri_v2(world, (raptor_uri*)statement->predicate); else RAPTOR_FREE(cstring, (void*)statement->predicate); } if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { if(statement->object) raptor_free_uri_v2(world, (raptor_uri*)statement->object); } else { if(statement->object) RAPTOR_FREE(cstring, (void*)statement->object); if(statement->object_literal_language) RAPTOR_FREE(cstring, (void*)statement->object_literal_language); if(statement->object_literal_datatype) raptor_free_uri_v2(world, (raptor_uri*)statement->object_literal_datatype); } RAPTOR_FREE(raptor_statement, statement); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_print_statement: * @statement: #raptor_statement object to print * @stream: #FILE* stream * * Print a raptor_statement to a stream. * * raptor_init() MUST have been called before calling this function. * Use raptor_print_statement_v2() if using raptor_world APIs. **/ void raptor_print_statement(const raptor_statement * statement, FILE *stream) { raptor_print_statement_v1(raptor_world_instance(), statement, stream); } #endif /** * raptor_print_statement_v2: * @statement: #raptor_statement_v2 object to print * @stream: #FILE* stream * * Print a raptor_statement to a stream. **/ void raptor_print_statement_v2(const raptor_statement_v2 * statement, FILE *stream) { raptor_print_statement_v1(statement->world, statement->s, stream); } /** * raptor_print_statement_v1: * @world: raptor_world object * @statement: #raptor_statement object to print * @stream: #FILE* stream * * Print a raptor_statement to a stream. **/ void raptor_print_statement_v1(raptor_world* world, const raptor_statement * statement, FILE *stream) { fputc('[', stream); if(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { fputs((const char*)statement->subject, stream); } else { #ifdef RAPTOR_DEBUG if(!statement->subject) RAPTOR_FATAL1("Statement has NULL subject URI\n"); #endif fputs((const char*)raptor_uri_as_string_v2(world, (raptor_uri*)statement->subject), stream); } fputs(", ", stream); if(statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) fprintf(stream, "[rdf:_%d]", *((int*)statement->predicate)); else { #ifdef RAPTOR_DEBUG if(!statement->predicate) RAPTOR_FATAL1("Statement has NULL predicate URI\n"); #endif fputs((const char*)raptor_uri_as_string_v2(world, (raptor_uri*)statement->predicate), stream); } fputs(", ", stream); if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL || statement->object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { fputc('<', stream); fputs((const char*)raptor_xml_literal_datatype_uri_string, stream); fputc('>', stream); } else if(statement->object_literal_datatype) { fputc('<', stream); fputs((const char*)raptor_uri_as_string_v2(world, (raptor_uri*)statement->object_literal_datatype), stream); fputc('>', stream); } fputc('"', stream); fputs((const char*)statement->object, stream); fputc('"', stream); } else if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) fputs((const char*)statement->object, stream); else if(statement->object_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) fprintf(stream, "[rdf:_%d]", *((int*)statement->object)); else { #ifdef RAPTOR_DEBUG if(!statement->object) RAPTOR_FATAL1("Statement has NULL object URI\n"); #endif fputs((const char*)raptor_uri_as_string_v2(world, (raptor_uri*)statement->object), stream); } fputc(']', stream); } #if !defined(RAPTOR_DISABLE_DEPRECATED) && !defined(RAPTOR_DISABLE_V1) /** * raptor_print_statement_detailed: * @statement: #raptor_statement object to print * @detailed: unused * @stream: #FILE* stream * * Print a raptor_statement to a stream in a detailed fashion. * * raptor_init() MUST have been called before calling this function. * * @deprecated: an internal function, do not use. * * No current difference from calling raptor_print_statement(). * **/ void raptor_print_statement_detailed(const raptor_statement * statement, int detailed, FILE *stream) { raptor_print_statement(statement, stream); } #endif #ifndef RAPTOR_DISABLE_V1 /** * raptor_statement_part_as_counted_string: * @term: #raptor_statement part (subject, predicate, object) * @type: #raptor_statement part type * @literal_datatype: #raptor_statement part datatype * @literal_language: #raptor_statement part language * @len_p: Pointer to location to store length of new string (if not NULL) * * Turns part of raptor statement into a N-Triples format counted string. * * Turns the given @term into an N-Triples escaped string using all the * escapes as defined in http://www.w3.org/TR/rdf-testcases/#ntriples * * The part (subject, predicate, object) of the raptor_statement is * typically passed in as @term, the part type (subject_type, * predicate_type, object_type) is passed in as @type. When the part * is a literal, the @literal_datatype and @literal_language fields * are set, otherwise NULL (usually object_datatype, * object_literal_language). * * raptor_init() MUST have been called before calling this function. * Use raptor_statement_part_as_counted_string_v2() if using raptor_world APIs. * * Return value: the new string or NULL on failure. The length of * the new string is returned in *@len_p if len_p is not NULL. **/ unsigned char* raptor_statement_part_as_counted_string(const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language, size_t* len_p) { return raptor_statement_part_as_counted_string_v2(raptor_world_instance(), term, type, literal_datatype, literal_language, len_p); } #endif /** * raptor_statement_part_as_counted_string_v2: * @world: raptor_world object * @term: #raptor_statement part (subject, predicate, object) * @type: #raptor_statement part type * @literal_datatype: #raptor_statement part datatype * @literal_language: #raptor_statement part language * @len_p: Pointer to location to store length of new string (if not NULL) * * Turns part of raptor statement into a N-Triples format counted string. * * Turns the given @term into an N-Triples escaped string using all the * escapes as defined in http://www.w3.org/TR/rdf-testcases/#ntriples * * The part (subject, predicate, object) of the raptor_statement is * typically passed in as @term, the part type (subject_type, * predicate_type, object_type) is passed in as @type. When the part * is a literal, the @literal_datatype and @literal_language fields * are set, otherwise NULL (usually object_datatype, * object_literal_language). * * Return value: the new string or NULL on failure. The length of * the new string is returned in *@len_p if len_p is not NULL. **/ unsigned char* raptor_statement_part_as_counted_string_v2(raptor_world* world, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language, size_t* len_p) { size_t len=0, term_len, uri_len; size_t language_len=0; unsigned char *s, *buffer=NULL; unsigned char *uri_string=NULL; switch(type) { case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: term_len=strlen((const char*)term); len=2+term_len; if(literal_language && type == RAPTOR_IDENTIFIER_TYPE_LITERAL) { language_len=strlen((const char*)literal_language); len+= language_len+1; } if(type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) len += 4+raptor_xml_literal_datatype_uri_string_len; else if(literal_datatype) { uri_string=raptor_uri_as_counted_string_v2(world, (raptor_uri*)literal_datatype, &uri_len); len += 4+uri_len; } buffer=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!buffer) return NULL; s=buffer; *s++ ='"'; /* raptor_print_ntriples_string(stream, (const char*)term, '"'); */ strcpy((char*)s, (const char*)term); s+= term_len; *s++ ='"'; if(literal_language && type == RAPTOR_IDENTIFIER_TYPE_LITERAL) { *s++ ='@'; strcpy((char*)s, (const char*)literal_language); s+= language_len; } if(type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { *s++ ='^'; *s++ ='^'; *s++ ='<'; strcpy((char*)s, (const char*)raptor_xml_literal_datatype_uri_string); s+= raptor_xml_literal_datatype_uri_string_len; *s++ ='>'; } else if(literal_datatype) { *s++ ='^'; *s++ ='^'; *s++ ='<'; strcpy((char*)s, (const char*)uri_string); s+= uri_len; *s++ ='>'; } *s++ ='\0'; break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: len=2+strlen((const char*)term); buffer=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!buffer) return NULL; s=buffer; *s++ ='_'; *s++ =':'; strcpy((char*)s, (const char*)term); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: len=raptor_rdf_namespace_uri_len + 13; buffer=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!buffer) return NULL; sprintf((char*)buffer, "<%s_%d>", raptor_rdf_namespace_uri, *((int*)term)); break; case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: uri_string=raptor_uri_as_counted_string_v2(world, (raptor_uri*)term, &uri_len); len=2+uri_len; buffer=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!buffer) return NULL; s=buffer; *s++ ='<'; /* raptor_print_ntriples_string(stream, raptor_uri_as_string((raptor_uri*)term), '\0'); */ strcpy((char*)s, (const char*)uri_string); s+= uri_len; *s++ ='>'; *s++ ='\0'; break; case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL2("Unknown type %d", type); } if(len_p) *len_p=len; return buffer; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_statement_part_as_string: * @term: #raptor_statement part (subject, predicate, object) * @type: #raptor_statement part type * @literal_datatype: #raptor_statement part datatype * @literal_language: #raptor_statement part language * * Turns part of raptor statement into a N-Triples format string. * * Turns the given @term into an N-Triples escaped string using all the * escapes as defined in http://www.w3.org/TR/rdf-testcases/#ntriples * * The part (subject, predicate, object) of the raptor_statement is * typically passed in as @term, the part type (subject_type, * predicate_type, object_type) is passed in as @type. When the part * is a literal, the @literal_datatype and @literal_language fields * are set, otherwise NULL (usually object_datatype, * object_literal_language). * * raptor_init() MUST have been called before calling this function. * Use raptor_statement_part_as_string_v2() if using raptor_world APIs. * * Return value: the new string or NULL on failure. **/ unsigned char* raptor_statement_part_as_string(const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language) { return raptor_statement_part_as_string_v2(raptor_world_instance(), term, type, literal_datatype, literal_language); } #endif /** * raptor_statement_part_as_string_v2: * @world: raptor_world object * @term: #raptor_statement part (subject, predicate, object) * @type: #raptor_statement part type * @literal_datatype: #raptor_statement part datatype * @literal_language: #raptor_statement part language * * Turns part of raptor statement into a N-Triples format string. * * Turns the given @term into an N-Triples escaped string using all the * escapes as defined in http://www.w3.org/TR/rdf-testcases/#ntriples * * The part (subject, predicate, object) of the raptor_statement is * typically passed in as @term, the part type (subject_type, * predicate_type, object_type) is passed in as @type. When the part * is a literal, the @literal_datatype and @literal_language fields * are set, otherwise NULL (usually object_datatype, * object_literal_language). * * Return value: the new string or NULL on failure. **/ unsigned char* raptor_statement_part_as_string_v2(raptor_world* world, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language) { return raptor_statement_part_as_counted_string_v2(world, term, type, literal_datatype, literal_language, NULL); } static void raptor_print_statement_part_as_ntriples(raptor_world* world, FILE* stream, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language) { switch(type) { case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: fputc('"', stream); raptor_print_ntriples_string(stream, (const unsigned char*)term, '"'); fputc('"', stream); if(literal_language && type == RAPTOR_IDENTIFIER_TYPE_LITERAL) { fputc('@', stream); fputs((const char*)literal_language, stream); } if(type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { fputs("^^<", stream); fputs((const char*)raptor_xml_literal_datatype_uri_string, stream); fputc('>', stream); } else if(literal_datatype) { fputs("^^<", stream); fputs((const char*)raptor_uri_as_string_v2(world, (raptor_uri*)literal_datatype), stream); fputc('>', stream); } break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: fputs("_:", stream); fputs((const char*)term, stream); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: fprintf(stream, "<%s_%d>", raptor_rdf_namespace_uri, *((int*)term)); break; case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: fputc('<', stream); raptor_print_ntriples_string(stream, raptor_uri_as_string_v2(world, (raptor_uri*)term), '\0'); fputc('>', stream); break; case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL2("Unknown type %d", type); } } #ifndef RAPTOR_DISABLE_V1 /** * raptor_print_statement_as_ntriples: * @statement: #raptor_statement to print * @stream: #FILE* stream * * Print a raptor_statement in N-Triples form. * * raptor_init() MUST have been called before calling this function. * Use raptor_print_statement_as_ntriples_v2() if using raptor_world APIs. * **/ void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream) { raptor_print_statement_as_ntriples_common(raptor_world_instance(), statement, stream); } #endif /** * raptor_print_statement_as_ntriples_v2: * @statement: #raptor_statement_v2 to print * @stream: #FILE* stream * * Print a raptor_statement in N-Triples form. * **/ void raptor_print_statement_as_ntriples_v2(const raptor_statement_v2 * statement, FILE *stream) { raptor_print_statement_as_ntriples_common(statement->world, statement->s, stream); } static void raptor_print_statement_as_ntriples_common(raptor_world* world, const raptor_statement *statement, FILE *stream) { raptor_print_statement_part_as_ntriples(world, stream, statement->subject, statement->subject_type, NULL, NULL); fputc(' ', stream); raptor_print_statement_part_as_ntriples(world, stream, statement->predicate, statement->predicate_type, NULL, NULL); fputc(' ', stream); raptor_print_statement_part_as_ntriples(world, stream, statement->object, statement->object_type, statement->object_literal_datatype, statement->object_literal_language); fputs(" .", stream); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_statement_compare: * @s1: first statement * @s2: second statement * * Compare a pair of #raptor_statement * * If types are different, the #raptor_identifier_type order is used. * Resource and datatype URIs are compared with raptor_uri_compare(), * blank nodes and literals with strcmp(). If one literal has no * language, it is earlier than one with a language. If one literal * has no datatype, it is earlier than one with a datatype. * * raptor_init() MUST have been called before calling this function. * Use raptor_statement_compare_v2() if using raptor_world APIs. * * Return value: <0 if s1 is before s2, 0 if equal, >0 if s1 is after s2 */ int raptor_statement_compare(const raptor_statement *s1, const raptor_statement *s2) { return raptor_statement_compare_common(raptor_world_instance(), s1, s2); } #endif /** * raptor_statement_compare_v2: * @s1: first statement * @s2: second statement * * Compare a pair of #raptor_statement_v2 * * If types are different, the #raptor_identifier_type order is used. * Resource and datatype URIs are compared with raptor_uri_compare(), * blank nodes and literals with strcmp(). If one literal has no * language, it is earlier than one with a language. If one literal * has no datatype, it is earlier than one with a datatype. * * Return value: <0 if s1 is before s2, 0 if equal, >0 if s1 is after s2 */ int raptor_statement_compare_v2(const raptor_statement_v2 *s1, const raptor_statement_v2 *s2) { return raptor_statement_compare_common(s1->world, s1->s, s2->s); } static int raptor_statement_compare_common(raptor_world* world, const raptor_statement *s1, const raptor_statement *s2) { int d=0; if(s1->subject && s2->subject) { d=s1->subject_type != s2->subject_type; if(d) return d; /* subjects are URIs or blank nodes */ if(s1->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) d=strcmp((char*)s1->subject, (char*)s2->subject); else d=raptor_uri_compare_v2(world, (raptor_uri*)s1->subject, (raptor_uri*)s2->subject); } else if(s1->subject || s2->subject) d=(!s1->subject ? -1 : 1); if(d) return d; /* predicates are URIs */ if(s1->predicate && s2->predicate) { d=raptor_uri_compare_v2(world, (raptor_uri*)s1->predicate, (raptor_uri*)s2->predicate); } else if(s1->predicate || s2->predicate) d=(!s1->predicate ? -1 : 1); if(d) return d; /* objects are URIs or blank nodes or literals */ if(s1->object && s2->object) { if(s1->object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL || s1->object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { d=strcmp((char*)s1->object, (char*)s2->object); if(d) return d; if(s1->object_literal_language && s2->object_literal_language) { /* both have a language */ d=strcmp((char*)s1->object_literal_language, (char*)s2->object_literal_language); } else if(s1->object_literal_language || s2->object_literal_language) /* only one has a language; the language-less one is earlier */ d=(!s1->object_literal_language ? -1 : 1); if(d) return d; if(s1->object_literal_datatype && s2->object_literal_datatype) { /* both have a datatype */ d=raptor_uri_compare_v2(world, (raptor_uri*)s1->object_literal_datatype, (raptor_uri*)s2->object_literal_datatype); } else if(s1->object_literal_datatype || s2->object_literal_datatype) /* only one has a datatype; the datatype-less one is earlier */ d=(!s1->object_literal_datatype ? -1 : 1); if(d) return d; } else if(s1->object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) d=strcmp((char*)s1->object, (char*)s2->object); else d=raptor_uri_compare_v2(world, (raptor_uri*)s1->object, (raptor_uri*)s2->object); } else if(s1->object || s2->object) d=(!s1->object ? -1 : 1); return d; } ���������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_stringbuffer.c�������������������������������������������������������������0000644�0001750�0001750�00000051462�11330672502�015060� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_stringbuffer.c - Stringbuffer class for growing strings * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <stdarg.h> #include <sys/types.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> /* for abort() as used in errors */ #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE struct raptor_stringbuffer_node_s { struct raptor_stringbuffer_node_s* next; unsigned char *string; size_t length; }; typedef struct raptor_stringbuffer_node_s raptor_stringbuffer_node; struct raptor_stringbuffer_s { /* Pointing to the first item in the list of nodes */ raptor_stringbuffer_node* head; /* and the last */ raptor_stringbuffer_node* tail; /* total length of the string */ size_t length; /* frozen string if already calculated, or NULL if not present */ unsigned char *string; }; /* prototypes for local functions */ static int raptor_stringbuffer_append_string_common(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy); /* functions implementing the stringbuffer api */ /** * raptor_new_stringbuffer: * * Create a new stringbuffer. * * Return value: pointer to a raptor_stringbuffer object or NULL on failure **/ raptor_stringbuffer* raptor_new_stringbuffer(void) { return (raptor_stringbuffer*)RAPTOR_CALLOC(raptor_stringbuffer, 1, sizeof(raptor_stringbuffer)); } /** * raptor_free_stringbuffer: * @stringbuffer: stringbuffer object to destroy. * * Destroy a stringbuffer. * **/ void raptor_free_stringbuffer(raptor_stringbuffer *stringbuffer) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(stringbuffer, raptor_stringbuffer); if(stringbuffer->head) { raptor_stringbuffer_node *node=stringbuffer->head; while(node) { raptor_stringbuffer_node *next=node->next; if(node->string) RAPTOR_FREE(cstring, node->string); RAPTOR_FREE(raptor_stringbuffer_node, node); node=next; } } if(stringbuffer->string) RAPTOR_FREE(cstring, stringbuffer->string); RAPTOR_FREE(raptor_stringbuffer, stringbuffer); } /** * raptor_stringbuffer_append_string_common: * @stringbuffer: raptor stringbuffer * @string: string * @length: length of string * @do_copy: non-0 to copy the string * * Add a string to the stringbuffer. * * INTERNAL * * If @string is NULL or @length is 0, no work is performed. * * If @do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Return value: non-0 on failure **/ static int raptor_stringbuffer_append_string_common(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy) { raptor_stringbuffer_node *node; if(!string || !length) return 0; node=(raptor_stringbuffer_node*)RAPTOR_MALLOC(raptor_stringbuffer_node, sizeof(raptor_stringbuffer_node)); if(!node) { if(!do_copy) RAPTOR_FREE(cstring, string); return 1; } if(do_copy) { /* Note this copy does not include the \0 character - not needed */ node->string=(unsigned char*)RAPTOR_MALLOC(bytes, length); if(!node->string) { RAPTOR_FREE(raptor_stringbuffer_node, node); return 1; } strncpy((char*)node->string, (const char*)string, length); } else node->string=(unsigned char*)string; node->length=length; if(stringbuffer->tail) { stringbuffer->tail->next=node; stringbuffer->tail=node; } else stringbuffer->head=stringbuffer->tail=node; node->next=NULL; if(stringbuffer->string) { RAPTOR_FREE(cstring, stringbuffer->string); stringbuffer->string=NULL; } stringbuffer->length += length; return 0; } /** * raptor_stringbuffer_append_counted_string: * @stringbuffer: raptor stringbuffer * @string: string * @length: length of string * @do_copy: non-0 to copy the string * * If @string is NULL or @length is 0, no work is performed. * * If @do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Add a string to the stringbuffer. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_counted_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy) { if(!string || !length) return 0; return raptor_stringbuffer_append_string_common(stringbuffer, string, length, do_copy); } /** * raptor_stringbuffer_append_string: * @stringbuffer: raptor stringbuffer * @string: string * @do_copy: non-0 to copy the string * * Add a string to the stringbuffer. * * If @string is NULL, no work is performed. * * If @do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, int do_copy) { if(!string) return 0; return raptor_stringbuffer_append_string_common(stringbuffer, string, strlen((const char*)string), do_copy); } /** * raptor_stringbuffer_append_decimal: * @stringbuffer: raptor stringbuffer * @integer: integer to format as decimal and add * * Add an integer in decimal to the stringbuffer. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_decimal(raptor_stringbuffer* stringbuffer, int integer) { /* enough for 64 bit signed integer * INT64_MAX is 9223372036854775807 (19 digits) + 1 for sign */ unsigned char buf[20]; unsigned char *p; int i=integer; size_t length=1; if(integer<0) { length++; i= -integer; } while(i/=10) length++; p=buf+length-1; i=integer; if(i<0) i= -i; do { *p-- ='0'+(i %10); i /= 10; } while(i); if(integer<0) *p= '-'; return raptor_stringbuffer_append_counted_string(stringbuffer, buf, length, 1); } /** * raptor_stringbuffer_append_stringbuffer: * @stringbuffer: #raptor_stringbuffer * @append: #raptor_stringbuffer to append * * Add a stringbuffer to the stringbuffer. * * This function removes the content from the appending stringbuffer, * making it empty and appends it to the supplied stringbuffer. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_stringbuffer(raptor_stringbuffer* stringbuffer, raptor_stringbuffer* append) { raptor_stringbuffer_node *node=append->head; if(!node) return 0; /* move all append nodes to stringbuffer */ if(stringbuffer->tail) { stringbuffer->tail->next=node; } else stringbuffer->head=node; stringbuffer->tail=append->tail; /* adjust our length */ stringbuffer->length += append->length; if(stringbuffer->string) { RAPTOR_FREE(cstring, stringbuffer->string); stringbuffer->string=NULL; } /* zap append content */ append->head=append->tail=NULL; append->length=0; if(append->string) { RAPTOR_FREE(cstring, append->string); append->string=NULL; } return 0; } /** * raptor_stringbuffer_prepend_string_common: * @stringbuffer: raptor stringbuffer * @string: string * @length: length of string * @do_copy: non-0 to copy the string * * Add a string to the start of a stringbuffer. * * INTERNAL * * If do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Return value: non-0 on failure **/ static int raptor_stringbuffer_prepend_string_common(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy) { raptor_stringbuffer_node *node; node=(raptor_stringbuffer_node*)RAPTOR_MALLOC(raptor_stringbuffer_node, sizeof(raptor_stringbuffer_node)); if(!node) return 1; if(do_copy) { /* Note this copy does not include the \0 character - not needed */ node->string=(unsigned char*)RAPTOR_MALLOC(bytes, length); if(!node->string) { RAPTOR_FREE(raptor_stringbuffer_node, node); return 1; } strncpy((char*)node->string, (const char*)string, length); } else node->string=(unsigned char*)string; node->length=length; node->next=stringbuffer->head; if(stringbuffer->head) stringbuffer->head=node; else stringbuffer->head=stringbuffer->tail=node; if(stringbuffer->string) { RAPTOR_FREE(cstring, stringbuffer->string); stringbuffer->string=NULL; } stringbuffer->length += length; return 0; } /** * raptor_stringbuffer_prepend_counted_string: * @stringbuffer: raptor stringbuffer * @string: string * @length: length of string * @do_copy: non-0 to copy the string * If do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Add a string to the start of the stringbuffer. * * Return value: non-0 on failure **/ int raptor_stringbuffer_prepend_counted_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy) { return raptor_stringbuffer_prepend_string_common(stringbuffer, string, length, do_copy); } /** * raptor_stringbuffer_prepend_string: * @stringbuffer: raptor stringbuffer * @string: string * @do_copy: non-0 to copy the string * * Add a string to the start of the stringbuffer. * * If do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Return value: non-0 on failure **/ int raptor_stringbuffer_prepend_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, int do_copy) { return raptor_stringbuffer_prepend_string_common(stringbuffer, string, strlen((const char*)string), do_copy); } /** * raptor_stringbuffer_length: * @stringbuffer: raptor stringbuffer * * Return the stringbuffer length. * * Return value: size of stringbuffer **/ size_t raptor_stringbuffer_length(raptor_stringbuffer* stringbuffer) { return stringbuffer->length; } /** * raptor_stringbuffer_as_string: * @stringbuffer: raptor stringbuffer * * Return the stringbuffer as a C string. * * Note: the return value is a to a shared string that the stringbuffer * allocates and manages. * * Return value: NULL on failure or stringbuffer is empty, otherwise * a pointer to a shared copy of the string. **/ unsigned char * raptor_stringbuffer_as_string(raptor_stringbuffer* stringbuffer) { raptor_stringbuffer_node *node; unsigned char *p; if(!stringbuffer->length) return NULL; if(stringbuffer->string) return stringbuffer->string; stringbuffer->string=(unsigned char*)RAPTOR_MALLOC(cstring, stringbuffer->length+1); if(!stringbuffer->string) return NULL; node=stringbuffer->head; p=stringbuffer->string; while(node) { strncpy((char*)p, (const char*)node->string, node->length); p+= node->length; node=node->next; } *p='\0'; return stringbuffer->string; } /** * raptor_stringbuffer_copy_to_string: * @stringbuffer: raptor stringbuffer * @string: output string * @length: size of output string * * Copy the stringbuffer into a string. * * Copies the underlying string to a pre-allocated buffer. The * output string is always '\0' terminated. * * Return value: non-0 on failure such as stringbuffer is empty, buffer is too small **/ int raptor_stringbuffer_copy_to_string(raptor_stringbuffer* stringbuffer, unsigned char *string, size_t length) { raptor_stringbuffer_node *node; unsigned char *p; if(!string || length < 1) return 1; if(!stringbuffer->length) return 0; p=string; for(node=stringbuffer->head; node; node=node->next) { if(node->length > length) { p[-1]='\0'; return 1; } strncpy((char*)p, (const char*)node->string, node->length); p+= node->length; length-= node->length; } *p='\0'; return 0; } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); int main(int argc, char *argv[]) { const char *program=raptor_basename(argv[0]); #define TEST_ITEMS_COUNT 9 const char *items[TEST_ITEMS_COUNT] = { "the", "quick" ,"brown", "fox", "jumps", "over", "the", "lazy", "dog" }; const char *items_string = "thequickbrownfoxjumpsoverthelazydog"; const size_t items_len=35; const char *test_integer_string = "abcd"; #define TEST_INTEGERS_COUNT 7 const int test_integers[TEST_INTEGERS_COUNT]={ 0, 1, -1, 11, 1234, 12345, -12345 }; const char *test_integer_results[TEST_INTEGERS_COUNT]={ "abcd0", "abcd1", "abcd-1", "abcd11", "abcd1234", "abcd12345", "abcd-12345" }; raptor_stringbuffer *sb; unsigned char *str; size_t len; int i=0; raptor_stringbuffer *sb1, *sb2; #define TEST_APPEND_COUNT 2 const char *test_append_results[TEST_APPEND_COUNT]={ "thebrownjumpsthedog", "quickfoxoverlazy" }; const char *test_append_results_total="thebrownjumpsthedogquickfoxoverlazy"; #define COPY_STRING_BUFFER_SIZE 100 unsigned char *copy_string; #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Creating string buffer\n", program); #endif /* test appending */ sb=raptor_new_stringbuffer(); if(!sb) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } for(i=0; i<TEST_ITEMS_COUNT; i++) { int rc; len=strlen(items[i]); #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Adding string buffer item '%s'\n", program, items[i]); #endif rc=raptor_stringbuffer_append_counted_string(sb, (unsigned char*)items[i], len, 1); if(rc) { fprintf(stderr, "%s: Adding string buffer item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } } len=raptor_stringbuffer_length(sb); if(len != items_len) { fprintf(stderr, "%s: string buffer len is %d, expected %d\n", program, (int)len, (int)items_len); exit(1); } str=raptor_stringbuffer_as_string(sb); if(strcmp((const char*)str, items_string)) { fprintf(stderr, "%s: string buffer contains '%s', expected '%s'\n", program, str, items_string); exit(1); } raptor_free_stringbuffer(sb); /* test prepending */ #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Creating string buffer\n", program); #endif sb=raptor_new_stringbuffer(); if(!sb) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } for(i=TEST_ITEMS_COUNT-1; i>=0 ; i--) { int rc; len=strlen(items[i]); #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Prepending string buffer item '%s'\n", program, items[i]); #endif rc=raptor_stringbuffer_prepend_counted_string(sb, (unsigned char*)items[i], len, 1); if(rc) { fprintf(stderr, "%s: Prepending string buffer item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } } len=raptor_stringbuffer_length(sb); if(len != items_len) { fprintf(stderr, "%s: string buffer len is %d, expected %d\n", program, (int)len, (int)items_len); exit(1); } str=raptor_stringbuffer_as_string(sb); if(strcmp((const char*)str, items_string)) { fprintf(stderr, "%s: string buffer contains '%s', expected '%s'\n", program, str, items_string); exit(1); } /* test adding integers */ for(i=0; i<TEST_INTEGERS_COUNT; i++) { raptor_stringbuffer *isb=raptor_new_stringbuffer(); if(!isb) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } raptor_stringbuffer_append_string(isb, (const unsigned char*)test_integer_string, 1); #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Adding decimal integer %d to buffer\n", program, test_integers[i]); #endif raptor_stringbuffer_append_decimal(isb, test_integers[i]); str=raptor_stringbuffer_as_string(isb); if(strcmp((const char*)str, test_integer_results[i])) { fprintf(stderr, "%s: string buffer contains '%s', expected '%s'\n", program, str, test_integer_results[i]); exit(1); } #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Freeing string buffer\n", program); #endif raptor_free_stringbuffer(isb); } #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Creating two stringbuffers to join\n", program); #endif sb1=raptor_new_stringbuffer(); if(!sb1) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } sb2=raptor_new_stringbuffer(); if(!sb2) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } for(i=0; i<TEST_ITEMS_COUNT; i++) { raptor_stringbuffer *sbx; int rc; len=strlen(items[i]); sbx=(i % 2) ? sb2 : sb1; rc=raptor_stringbuffer_append_counted_string(sbx, (unsigned char*)items[i], len, 1); if(rc) { fprintf(stderr, "%s: Adding string buffer item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } } if(1) { int rc; rc=raptor_stringbuffer_append_counted_string(sb1, (unsigned char*)"X", 0, 1); if(rc) { fprintf(stderr, "%s: Adding 0-length counted string failed, returning error %d\n", program, rc); exit(1); } rc=raptor_stringbuffer_append_string(sb1, NULL, 1); if(rc) { fprintf(stderr, "%s: Adding NULL string failed, returning error %d\n", program, rc); exit(1); } } str=raptor_stringbuffer_as_string(sb1); if(strcmp((const char*)str, test_append_results[0])) { fprintf(stderr, "%s: string buffer sb1 contains '%s', expected '%s'\n", program, str, test_append_results[0]); exit(1); } str=raptor_stringbuffer_as_string(sb2); if(strcmp((const char*)str, test_append_results[1])) { fprintf(stderr, "%s: string buffer sb2 contains '%s', expected '%s'\n", program, str, test_append_results[1]); exit(1); } #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Appended two stringbuffers\n", program); #endif if(raptor_stringbuffer_append_stringbuffer(sb1, sb2)) { fprintf(stderr, "%s: Failed to append string buffer\n", program); exit(1); } str=raptor_stringbuffer_as_string(sb1); if(strcmp((const char*)str, test_append_results_total)) { fprintf(stderr, "%s: appended string buffer contains '%s', expected '%s'\n", program, str, test_append_results_total); exit(1); } len=raptor_stringbuffer_length(sb2); if(len) { fprintf(stderr, "%s: appended string buffer is length %d, not empty'\n", program, (int)len); exit(1); } #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Copying string buffer to string\n", program); #endif copy_string=(unsigned char*)malloc(COPY_STRING_BUFFER_SIZE); if(raptor_stringbuffer_copy_to_string(sb1, copy_string, COPY_STRING_BUFFER_SIZE)) { fprintf(stderr, "%s: copying string buffer to string failed\n", program); exit(1); } if(strcmp((const char*)copy_string, test_append_results_total)) { fprintf(stderr, "%s: copied string buffer contains '%s', expected '%s'\n", program, copy_string, test_append_results_total); exit(1); } free(copy_string); #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Freeing string buffers\n", program); #endif raptor_free_stringbuffer(sb1); raptor_free_stringbuffer(sb2); raptor_free_stringbuffer(sb); /* keep gcc -Wall happy */ return(0); } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_internal.h�����������������������������������������������������������������0000644�0001750�0001750�00000132024�11330672502�014173� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_internal.h - Redland Parser Toolkit for RDF (Raptor) internals * * Copyright (C) 2002-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef RAPTOR_INTERNAL_H #define RAPTOR_INTERNAL_H #ifdef __cplusplus extern "C" { #define RAPTOR_EXTERN_C extern "C" #else #define RAPTOR_EXTERN_C #endif #ifdef RAPTOR_INTERNAL /* for the memory allocation functions */ #ifdef HAVE_STDLIB_H #include <stdlib.h> #undef HAVE_STDLIB_H #endif #if defined(HAVE_DMALLOC_H) && defined(RAPTOR_MEMORY_DEBUG_DMALLOC) #include <dmalloc.h> #endif /* Can be over-ridden or undefined in a config.h file or -Ddefine */ #ifndef RAPTOR_INLINE #define RAPTOR_INLINE inline #endif #ifdef LIBRDF_DEBUG #define RAPTOR_DEBUG 1 #endif #if defined(RAPTOR_MEMORY_SIGN) #define RAPTOR_SIGN_KEY 0x08A61080 void* raptor_sign_malloc(size_t size); void* raptor_sign_calloc(size_t nmemb, size_t size); void* raptor_sign_realloc(void *ptr, size_t size); void raptor_sign_free(void *ptr); #define RAPTOR_MALLOC(type, size) raptor_sign_malloc(size) #define RAPTOR_CALLOC(type, nmemb, size) raptor_sign_calloc(nmemb, size) #define RAPTOR_REALLOC(type, ptr, size) raptor_sign_realloc(ptr, size) #define RAPTOR_FREE(type, ptr) raptor_sign_free(ptr) #else #define RAPTOR_MALLOC(type, size) malloc(size) #define RAPTOR_CALLOC(type, nmemb, size) calloc(nmemb, size) #define RAPTOR_REALLOC(type, ptr, size) realloc(ptr, size) #define RAPTOR_FREE(type, ptr) free((void*)ptr) #endif #ifdef RAPTOR_DEBUG /* Debugging messages */ #define RAPTOR_DEBUG1(msg) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __func__); } while(0) #define RAPTOR_DEBUG2(msg, arg1) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __func__, arg1);} while(0) #define RAPTOR_DEBUG3(msg, arg1, arg2) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __func__, arg1, arg2);} while(0) #define RAPTOR_DEBUG4(msg, arg1, arg2, arg3) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __func__, arg1, arg2, arg3);} while(0) #define RAPTOR_DEBUG5(msg, arg1, arg2, arg3, arg4) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __func__, arg1, arg2, arg3, arg4);} while(0) #define RAPTOR_DEBUG6(msg, arg1, arg2, arg3, arg4, arg5) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __func__, arg1, arg2, arg3, arg4, arg5);} while(0) #if defined(HAVE_DMALLOC_H) && defined(RAPTOR_MEMORY_DEBUG_DMALLOC) void* raptor_system_malloc(size_t size); void raptor_system_free(void *ptr); #define SYSTEM_MALLOC(size) raptor_system_malloc(size) #define SYSTEM_FREE(ptr) raptor_system_free(ptr) #else #define SYSTEM_MALLOC(size) malloc(size) #define SYSTEM_FREE(ptr) free(ptr) #endif #ifndef RAPTOR_ASSERT_DIE #define RAPTOR_ASSERT_DIE abort(); #endif #else /* DEBUGGING TURNED OFF */ /* No debugging messages */ #define RAPTOR_DEBUG1(msg) #define RAPTOR_DEBUG2(msg, arg1) #define RAPTOR_DEBUG3(msg, arg1, arg2) #define RAPTOR_DEBUG4(msg, arg1, arg2, arg3) #define RAPTOR_DEBUG5(msg, arg1, arg2, arg3, arg4) #define RAPTOR_DEBUG6(msg, arg1, arg2, arg3, arg4, arg5) #define SYSTEM_MALLOC(size) malloc(size) #define SYSTEM_FREE(ptr) free(ptr) #ifndef RAPTOR_ASSERT_DIE #define RAPTOR_ASSERT_DIE #endif #endif #ifdef RAPTOR_DISABLE_ASSERT_MESSAGES #define RAPTOR_ASSERT_REPORT(line) #else #define RAPTOR_ASSERT_REPORT(msg) fprintf(stderr, "%s:%d: (%s) assertion failed: " msg "\n", __FILE__, __LINE__, __func__); #endif #ifdef RAPTOR_DISABLE_ASSERT #define RAPTOR_ASSERT(condition, msg) #define RAPTOR_ASSERT_RETURN(condition, msg, ret) #define RAPTOR_ASSERT_OBJECT_POINTER_RETURN(pointer, type) do { \ if(!pointer) \ return; \ } while(0) #define RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(pointer, type, ret) #else #define RAPTOR_ASSERT(condition, msg) do { \ if(condition) { \ RAPTOR_ASSERT_REPORT(msg) \ RAPTOR_ASSERT_DIE \ } \ } while(0) #define RAPTOR_ASSERT_RETURN(condition, msg, ret) do { \ if(condition) { \ RAPTOR_ASSERT_REPORT(msg) \ RAPTOR_ASSERT_DIE \ return ret; \ } \ } while(0) #define RAPTOR_ASSERT_OBJECT_POINTER_RETURN(pointer, type) do { \ if(!pointer) { \ RAPTOR_ASSERT_REPORT("object pointer of type " #type " is NULL.") \ RAPTOR_ASSERT_DIE \ return; \ } \ } while(0) #define RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(pointer, type, ret) do { \ if(!pointer) { \ RAPTOR_ASSERT_REPORT("object pointer of type " #type " is NULL.") \ RAPTOR_ASSERT_DIE \ return ret; \ } \ } while(0) #endif /* Fatal errors - always happen */ #define RAPTOR_FATAL1(msg) do {fprintf(stderr, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __func__); abort();} while(0) #define RAPTOR_FATAL2(msg,arg) do {fprintf(stderr, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __func__, arg); abort();} while(0) #define RAPTOR_FATAL3(msg,arg1,arg2) do {fprintf(stderr, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __func__, arg1, arg2); abort();} while(0) #define MAX_ASCII_INT_SIZE 13 /* XML parser includes */ #ifdef RAPTOR_XML_EXPAT #ifdef HAVE_EXPAT_H #include <expat.h> #endif #ifdef HAVE_XMLPARSE_H #include <xmlparse.h> #endif #endif #ifdef RAPTOR_XML_LIBXML #include <libxml/parser.h> /* libxml-only prototypes */ /* raptor_libxml.c exports */ extern void raptor_libxml_init(raptor_sax2* sax2, raptor_uri *base_uri); extern void raptor_libxml_init_sax_error_handlers(xmlSAXHandler *sax); extern void raptor_libxml_generic_error(void* user_data, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); extern void raptor_libxml_validation_error(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); extern void raptor_libxml_validation_warning(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_libxml_free(xmlParserCtxtPtr xc); void raptor_libxml_xmlStructuredErrorFunc(void *user_data, xmlErrorPtr err); /* raptor_parse.c - exported to libxml part */ extern void raptor_libxml_update_document_locator(raptor_sax2* sax2, raptor_locator* locator); /* end of libxml-only */ #endif /* expat-only prototypes */ #ifdef RAPTOR_XML_EXPAT /* raptor_expat.c exports */ extern void raptor_expat_init(raptor_sax2* sax2, raptor_uri *base_uri); extern void raptor_expat_update_document_locator(raptor_sax2* sax2, raptor_locator *locator); /* raptor_parse.c */ void raptor_xml_unparsed_entity_decl_handler(void *user_data, const unsigned char* entityName, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId, const unsigned char* notationName); int raptor_xml_external_entity_ref_handler(void *user_data, const unsigned char* context, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId); /* end of expat-only */ #endif typedef struct raptor_parser_factory_s raptor_parser_factory; typedef struct raptor_serializer_factory_s raptor_serializer_factory; typedef struct raptor_id_set_s raptor_id_set; typedef struct raptor_uri_detail_s raptor_uri_detail; /* raptor_avltree.c */ /* AVL tree */ typedef struct raptor_avltree_s raptor_avltree; typedef struct raptor_avltree_iterator_s raptor_avltree_iterator; typedef struct raptor_avltree_node_s raptor_avltree_node; /* user functions */ typedef int (*raptor_data_compare_function)(const void* data1, const void* data2); typedef void (*raptor_data_free_function)(void* data); typedef int (*raptor_avltree_visit_function)(int depth, void* data, void *user_data); typedef void (*raptor_data_print_function)(FILE* handle, const void* data); /* AVL-tree */ struct raptor_avltree_s { /* raptor_world object */ raptor_world* world; /* root node of tree */ raptor_avltree_node* root; /* node comparison function (optional) */ raptor_data_compare_function compare_fn; /* node deletion function (optional) */ raptor_data_free_function free_fn; /* node print function (optional) */ raptor_data_print_function print_fn; /* tree flags (none defined at present) */ unsigned int flags; /* number of nodes in tree */ unsigned int size; /* legacy iterator used for cursor methods */ raptor_avltree_iterator* cursor_iterator; }; /* Raptor Namespace Stack node */ struct raptor_namespace_stack_s { raptor_world* world; int size; int table_size; raptor_namespace** table; raptor_namespace* def_namespace; raptor_simple_message_handler error_handler; void *error_data; raptor_uri *rdf_ms_uri; raptor_uri *rdf_schema_uri; }; /* Forms: * 1) prefix=NULL uri=<URI> - default namespace defined * 2) prefix=NULL, uri=NULL - no default namespace * 3) prefix=<prefix>, uri=<URI> - regular pair defined <prefix>:<URI> */ struct raptor_namespace_s { /* next down the stack, NULL at bottom */ struct raptor_namespace_s* next; raptor_namespace_stack *nstack; /* NULL means is the default namespace */ const unsigned char *prefix; /* needed to safely compare prefixed-names */ int prefix_length; /* URI of namespace or NULL for default */ raptor_uri *uri; /* parsing depth that this ns was added. It will * be deleted when the parser leaves this depth */ int depth; /* Non 0 if is xml: prefixed name */ int is_xml; /* Non 0 if is RDF M&S Namespace */ int is_rdf_ms; /* Non 0 if is RDF Schema Namespace */ int is_rdf_schema; }; raptor_namespace** raptor_namespace_stack_to_array(raptor_namespace_stack *nstack, size_t *size_p); #ifdef RAPTOR_XML_LIBXML #define RAPTOR_LIBXML_MAGIC 0x8AF108 #endif /* * Raptor parser object */ struct raptor_parser_s { raptor_world* world; #ifdef RAPTOR_XML_LIBXML int magic; #endif /* can be filled with error location information */ raptor_locator locator; /* non 0 if parser had fatal error and cannot continue */ int failed; /* generated ID counter */ int genid; /* base URI of RDF/XML */ raptor_uri *base_uri; /* static statement for use in passing to user code */ raptor_statement statement; /* Features */ int features[RAPTOR_FEATURE_LAST+1]; /* stuff for our user */ void *user_data; raptor_error_handlers error_handlers; void* unused1; /* UNUSED - re-use struct slot later needed */ /* parser callbacks */ raptor_statement_handler statement_handler; raptor_graph_handler graph_handler; void *generate_id_handler_user_data; raptor_generate_id_handler generate_id_handler; int default_generate_id_handler_base; char *default_generate_id_handler_prefix; size_t default_generate_id_handler_prefix_length; void* uri_filter_user_data; raptor_uri_filter_func uri_filter; /* parser specific stuff */ void *context; struct raptor_parser_factory_s* factory; /* namespace callback */ raptor_namespace_handler namespace_handler; void* namespace_handler_user_data; raptor_stringbuffer* sb; /* raptor_www pointer stored here to allow cleanup on error */ raptor_www* www; /* internal data for lexers */ void* lexer_user_data; /* FEATURE: * HTTP Cache-Control: header value to send (default NULL) * RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL */ const char* cache_control; /* FEATURE: * HTTP User-Agent: header value to send (default NULL) * RAPTOR_FEATURE_WWW_HTTP_USER_AGENT */ const char* user_agent; /* NOTE: if anything a user can set is added here check that * raptor_parser_copy_user_state() is updated to copy it. */ }; /** A list of (MIME Type, Q) values */ struct raptor_type_q_s { const char* mime_type; size_t mime_type_len; int q; /* 0-10 standing for 0.0-1.0 */ }; typedef struct raptor_type_q_s raptor_type_q; /** A Parser Factory for a syntax */ struct raptor_parser_factory_s { raptor_world* world; struct raptor_parser_factory_s* next; /* syntax name */ const char* name; /* alternate syntax name; not mentioned in enumerations */ const char* alias; /* syntax readable label */ const char* label; /* syntax MIME type (or NULL) */ raptor_sequence* mime_types; /* syntax URI (or NULL) */ const unsigned char* uri_string; /* the rest of this structure is populated by the parser-specific register function */ size_t context_length; /* create a new parser */ int (*init)(raptor_parser* parser, const char *name); /* destroy a parser */ void (*terminate)(raptor_parser* parser); /* start a parse */ int (*start)(raptor_parser* parser); /* parse a chunk of memory */ int (*chunk)(raptor_parser* parser, const unsigned char *buffer, size_t len, int is_end); /* finish the parser factory */ void (*finish_factory)(raptor_parser_factory* factory); /* score recognition of the syntax by a block of characters, the * content identifier or it's suffix or a mime type * (different from the factory-registered one) */ int (*recognise_syntax)(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type); /* get the Content-Type value of a URI request */ void (*content_type_handler)(raptor_parser* rdf_parser, const char* content_type); /* get the Accept header of a URI request (OPTIONAL) */ const char* (*accept_header)(raptor_parser* rdf_parser); /* non-0 if this parser needs a base URI */ int need_base_uri; /* get the current generated ID base (OPTIONAL) */ int (*get_current_base_id)(raptor_parser* rdf_parser); /* get the name (OPTIONAL) */ const char* (*get_name)(raptor_parser* rdf_parser); }; /* * Raptor serializer object */ struct raptor_serializer_s { raptor_world* world; /* can be filled with error location information */ raptor_locator locator; /* FEATURE: * non 0 to write base URI to document header (@base) */ int feature_write_base_uri; /* FEATURE: * non 0 to write relative URIs wherever possible */ int feature_relative_uris; /* FEATURE: * non NULL to start serializing from this URI */ raptor_uri* feature_start_uri; /* FEATURES: * non NULL to override default border color */ unsigned char *feature_resource_border; unsigned char *feature_literal_border; unsigned char *feature_bnode_border; /* FEATURES: * non NULL to fill with value */ unsigned char *feature_resource_fill; unsigned char *feature_literal_fill; unsigned char *feature_bnode_fill; void *error_user_data; void *warning_user_data; raptor_message_handler error_handler; raptor_message_handler warning_handler; /* non 0 if serializer had fatal error and cannot continue */ int failed; /* base URI of RDF/XML */ raptor_uri *base_uri; /* serializer specific stuff */ void *context; /* destination stream for the serialization */ raptor_iostream *iostream; /* if true, iostream was made here so free it */ int free_iostream_on_end; struct raptor_serializer_factory_s* factory; /* XML 1.0 (10) or XML 1.1 (11) */ int xml_version; /* FEATURE: * non 0 to write XML 1.0 or 1.1 declaration (default 1) */ int feature_write_xml_declaration; /* FEATURE: * JSON serializer callback function name */ unsigned char *feature_json_callback; /* FEATURE: * JSON serializer extra data */ unsigned char *feature_json_extra_data; /* FEATURE: * RSS serializer triples */ unsigned char *feature_rss_triples; /* FEATURE: * Atom serializer entry URI string */ unsigned char *feature_atom_entry_uri; /* FEATURE: * Namespace-prefix elements OR prefer unprefixed elements. */ int feature_prefix_elements; }; /** A Serializer Factory for a syntax */ struct raptor_serializer_factory_s { raptor_world* world; struct raptor_serializer_factory_s* next; /* syntax name */ const char* name; /* alternate syntax name; not mentioned in enumerations */ const char* alias; /* syntax readable label */ const char* label; /* syntax MIME type (or NULL) */ const char* mime_type; /* syntax URI (or NULL) */ const unsigned char* uri_string; /* the rest of this structure is populated by the serializer-specific register function */ size_t context_length; /* create a new serializer */ int (*init)(raptor_serializer* serializer, const char *name); /* destroy a serializer */ void (*terminate)(raptor_serializer* serializer); /* add a namespace */ int (*declare_namespace)(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix); /* start a serialization */ int (*serialize_start)(raptor_serializer* serializer); /* serialize a statement */ int (*serialize_statement)(raptor_serializer* serializer, const raptor_statement *statment); /* end a serialization */ int (*serialize_end)(raptor_serializer* serializer); /* finish the serializer factory */ void (*finish_factory)(raptor_serializer_factory* factory); /* add a namespace using an existing namespace */ int (*declare_namespace_from_namespace)(raptor_serializer* serializer, raptor_namespace *nspace); }; /* for raptor_parse_uri_write_bytes() when used as a handler for * raptor_www_set_write_bytes_handler() */ typedef struct { raptor_parser* rdf_parser; raptor_uri* base_uri; raptor_uri* final_uri; int started; } raptor_parse_bytes_context; /* raptor_serialize.c */ int raptor_serializer_register_factory(raptor_world* world, const char *name, const char *label, const char *mime_type, const char *alias, const unsigned char *uri_string, int (*factory) (raptor_serializer_factory*)); /* raptor_general.c */ raptor_parser_factory* raptor_parser_register_factory(raptor_world* world, const char *name, const char *label, int (*factory) (raptor_parser_factory*)); int raptor_parser_factory_add_alias(raptor_parser_factory* factory, const char *alias); int raptor_parser_factory_add_mime_type(raptor_parser_factory* factory, const char* mime_type, int q); int raptor_parser_factory_add_uri(raptor_parser_factory* factory, const unsigned char *uri_string); unsigned char* raptor_parser_internal_generate_id(raptor_parser *rdf_parser, raptor_genid_type type, unsigned char *user_bnodeid); #ifdef RAPTOR_DEBUG void raptor_stats_print(raptor_parser *rdf_parser, FILE *stream); #endif const char* raptor_basename(const char *name); raptor_statement* raptor_statement_copy(raptor_world* world, const raptor_statement *statement); raptor_statement_v2* raptor_statement_copy_v2(const raptor_statement_v2 *statement); raptor_statement_v2* raptor_statement_copy_v2_from_v1(raptor_world* world, const raptor_statement *statement); void raptor_free_statement(raptor_world* world, raptor_statement *statement); void raptor_free_statement_v2(raptor_statement_v2 *statement); void raptor_print_statement_v1(raptor_world* world, const raptor_statement * statement, FILE *stream); /* raptor_parse.c */ raptor_parser_factory* raptor_get_parser_factory(raptor_world* world, const char *name); void raptor_delete_parser_factories(void); const char* raptor_parser_get_accept_header_all(raptor_world* world); int raptor_parse_uri_no_net_filter(void *user_data, raptor_uri* uri); void raptor_parse_uri_write_bytes(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb); void raptor_parser_fatal_error(raptor_parser* parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_parser_error(raptor_parser* parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_parser_simple_error(void* parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_parser_error_varargs(raptor_parser* parser, const char *message, va_list arguments) RAPTOR_PRINTF_FORMAT(2, 0); void raptor_parser_warning(raptor_parser* parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); /* logging */ #define RAPTOR_ERROR_HANDLER_MAGIC 0xD00DB1FF void raptor_log_error_to_handlers(raptor_world* world, raptor_error_handlers* error_handlers, raptor_log_level level, raptor_locator* locator, const char* message); void raptor_log_error_varargs(raptor_world* world, raptor_log_level level, raptor_message_handler handler, void* handler_data, raptor_locator* locator, const char* message, va_list arguments) RAPTOR_PRINTF_FORMAT(6, 0); void raptor_log_error(raptor_world* world, raptor_log_level level, raptor_message_handler handler, void* handler_data, raptor_locator* locator, const char* message); /* raptor_parse.c */ typedef struct raptor_rdfxml_parser_s raptor_rdfxml_parser; /* Prototypes for common expat/libxml parsing event-handling functions */ extern void raptor_xml_start_element_handler(void *user_data, const unsigned char *name, const unsigned char **atts); extern void raptor_xml_end_element_handler(void *user_data, const unsigned char *name); /* s is not 0 terminated. */ extern void raptor_xml_characters_handler(void *user_data, const unsigned char *s, int len); extern void raptor_xml_cdata_handler(void *user_data, const unsigned char *s, int len); void raptor_xml_comment_handler(void *user_data, const unsigned char *s); #if RAPTOR_DEBUG > 1 void raptor_rdfxml_parser_stats_print(raptor_rdfxml_parser* rdf_xml_parser, FILE *stream); #endif int raptor_parser_copy_user_state(raptor_parser *to_parser, raptor_parser *from_parser); /* raptor_feature.c */ int raptor_features_enumerate_common(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label, int flags); /* raptor_general.c */ extern int raptor_valid_xml_ID(raptor_parser *rdf_parser, const unsigned char *string); int raptor_check_ordinal(const unsigned char *name); /* raptor_identifier.c */ void raptor_set_identifier_uri(raptor_identifier *identifier, raptor_uri *uri); void raptor_set_identifier_id(raptor_identifier *identifier, const unsigned char *id); #ifdef RAPTOR_DEBUG void raptor_identifier_print(FILE *stream, raptor_identifier* identifier); #endif /* raptor_locator.c */ #ifdef HAVE_STRCASECMP #define raptor_strcasecmp strcasecmp #define raptor_strncasecmp strncasecmp #else #ifdef HAVE_STRICMP #define raptor_strcasecmp stricmp #define raptor_strncasecmp strnicmp #endif #endif /* raptor_nfc.c */ int raptor_nfc_check (const unsigned char* string, size_t len, int *error); /* raptor_namespace.c */ #ifdef RAPTOR_DEBUG void raptor_namespace_print(FILE *stream, raptor_namespace* ns); #endif void raptor_parser_start_namespace(raptor_parser* rdf_parser, raptor_namespace* nspace); /* * Raptor XML-namespace qualified name (qname), for elements or attributes * * namespace is only defined when the XML name has a namespace and * only then is uri also given. */ struct raptor_qname_s { raptor_world* world; /* Name - always present */ const unsigned char *local_name; int local_name_length; /* Namespace or NULL if not in a namespace */ const raptor_namespace *nspace; /* URI of namespace+local_name or NULL if not defined */ raptor_uri *uri; /* optional value - used when name is an attribute */ const unsigned char *value; unsigned int value_length; }; /* raptor_qname.c */ #ifdef RAPTOR_DEBUG void raptor_qname_print(FILE *stream, raptor_qname* name); #endif /* raptor_uri.c */ int raptor_uri_init(raptor_world* world); raptor_uri* raptor_new_uri_from_rdf_ordinal(raptor_world* world, int ordinal); /* parsers */ int raptor_init_parser_rdfxml(raptor_world* world); int raptor_init_parser_ntriples(raptor_world* world); int raptor_init_parser_turtle(raptor_world* world); int raptor_init_parser_trig(raptor_world* world); int raptor_init_parser_n3(raptor_world* world); int raptor_init_parser_grddl_common(raptor_world* world); int raptor_init_parser_grddl(raptor_world* world); int raptor_init_parser_guess(raptor_world* world); int raptor_init_parser_rss(raptor_world* world); int raptor_init_parser_rdfa(raptor_world* world); void raptor_terminate_parser_grddl_common(raptor_world *world); /* raptor_parse.c */ int raptor_parsers_init(raptor_world* world); void raptor_parsers_finish(raptor_world *world); void raptor_parser_save_content(raptor_parser* rdf_parser, int save); const unsigned char* raptor_parser_get_content(raptor_parser* rdf_parser, size_t* length_p); void raptor_parser_set_graph_name(raptor_parser* parser, raptor_uri* uri); int raptor_parser_get_current_base_id(raptor_parser* parser); /* raptor_rss.c */ int raptor_init_serializer_rss10(raptor_world* world); int raptor_init_serializer_atom(raptor_world* world); extern const unsigned char * const raptor_atom_namespace_uri; /* raptor_rfc2396.c */ raptor_uri_detail* raptor_new_uri_detail(const unsigned char *uri_string); void raptor_free_uri_detail(raptor_uri_detail* uri_detail); unsigned char* raptor_uri_detail_to_string(raptor_uri_detail *ud, size_t* len_p); /* serializers */ int raptor_init_serializer_rdfxml(raptor_world* world); int raptor_init_serializer_ntriples(raptor_world* world); int raptor_init_serializer_dot(raptor_world* world); int raptor_init_serializer_simple(raptor_world* world); /* raptor_serializer.c */ int raptor_serializers_init(raptor_world* world); void raptor_serializers_finish(raptor_world* world); void raptor_serializer_error(raptor_serializer* serializer, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_serializer_simple_error(void* serializer, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_serializer_error_varargs(raptor_serializer* serializer, const char *message, va_list arguments) RAPTOR_PRINTF_FORMAT(2, 0); void raptor_serializer_warning(raptor_serializer* serializer, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_serializer_warning_varargs(raptor_serializer* serializer, const char *message, va_list arguments) RAPTOR_PRINTF_FORMAT(2, 0); /* raptor_serialize_rdfxmla.c */ int raptor_init_serializer_rdfxmla(raptor_world* world); /* raptor_serialize_turtle.c */ int raptor_init_serializer_turtle(raptor_world* world); /* raptor_serialize_json.c */ int raptor_init_serializer_json(raptor_world* world); /* raptor_utf8.c */ int raptor_unicode_is_namestartchar(raptor_unichar c); int raptor_unicode_is_namechar(raptor_unichar c); int raptor_utf8_is_nfc(const unsigned char *input, size_t length); /* raptor_www*.c */ #ifdef RAPTOR_WWW_LIBXML #include <libxml/parser.h> #include <libxml/xmlerror.h> #include <libxml/nanohttp.h> #endif #ifdef RAPTOR_WWW_LIBCURL #include <curl/curl.h> #include <curl/types.h> #include <curl/easy.h> #endif /* Size of buffer used in various raptor_www places for I/O */ #ifndef RAPTOR_WWW_BUFFER_SIZE #define RAPTOR_WWW_BUFFER_SIZE 4096 #endif /* WWW library state */ struct raptor_www_s { raptor_world* world; char *type; int free_type; int total_bytes; int failed; int status_code; raptor_uri *uri; #ifdef RAPTOR_WWW_LIBCURL CURL* curl_handle; char error_buffer[CURL_ERROR_SIZE]; int curl_init_here; int checked_status; #endif #ifdef RAPTOR_WWW_LIBXML void *ctxt; char buffer[RAPTOR_WWW_BUFFER_SIZE]; int is_end; void *old_xmlGenericErrorContext; #endif #ifdef RAPTOR_WWW_LIBFETCH char buffer[RAPTOR_WWW_BUFFER_SIZE]; #endif char *user_agent; /* proxy URL string or NULL for none */ char *proxy; void *write_bytes_userdata; raptor_www_write_bytes_handler write_bytes; void *content_type_userdata; raptor_www_content_type_handler content_type; void* uri_filter_user_data; raptor_uri_filter_func uri_filter; /* can be filled with error location information */ raptor_locator locator; char *http_accept; FILE* handle; raptor_error_handlers error_handlers; int connection_timeout; /* The URI returned after any redirections */ raptor_uri* final_uri; void *final_uri_userdata; raptor_www_final_uri_handler final_uri_handler; char* cache_control; }; /* internal */ void raptor_www_libxml_init(raptor_www *www); void raptor_www_libxml_free(raptor_www *www); int raptor_www_libxml_fetch(raptor_www *www); void raptor_www_error(raptor_www *www, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_www_curl_init(raptor_www *www); void raptor_www_curl_free(raptor_www *www); int raptor_www_curl_fetch(raptor_www *www); void raptor_www_libfetch_init(raptor_www *www); void raptor_www_libfetch_free(raptor_www *www); int raptor_www_libfetch_fetch(raptor_www *www); /* raptor_set.c */ raptor_id_set* raptor_new_id_set(raptor_world* world); void raptor_free_id_set(raptor_id_set* set); int raptor_id_set_add(raptor_id_set* set, raptor_uri* base_uri, const unsigned char *item, size_t item_len); #if RAPTOR_DEBUG > 1 void raptor_id_set_stats_print(raptor_id_set* set, FILE *stream); #endif /* raptor_sax2.c */ /* * SAX2 elements/attributes on stack */ struct raptor_xml_element_s { /* NULL at bottom of stack */ struct raptor_xml_element_s *parent; raptor_qname *name; raptor_qname **attributes; unsigned int attribute_count; /* value of xml:lang attribute on this element or NULL */ const unsigned char *xml_language; /* URI of xml:base attribute value on this element or NULL */ raptor_uri *base_uri; /* CDATA content of element and checks for mixed content */ raptor_stringbuffer* content_cdata_sb; unsigned int content_cdata_length; /* how many cdata blocks seen */ unsigned int content_cdata_seen; /* how many contained elements seen */ unsigned int content_element_seen; raptor_sequence *declared_nspaces; void* user_data; }; struct raptor_sax2_s { #ifdef RAPTOR_XML_LIBXML int magic; #endif raptor_world* world; void* user_data; #ifdef RAPTOR_XML_EXPAT XML_Parser xp; #ifdef EXPAT_UTF8_BOM_CRASH int tokens_count; /* used to see if trying to get location info is safe */ #endif #endif #ifdef RAPTOR_XML_LIBXML /* structure holding sax event handlers */ xmlSAXHandler sax; /* parser context */ xmlParserCtxtPtr xc; /* pointer to SAX document locator */ xmlSAXLocatorPtr loc; #if LIBXML_VERSION < 20425 /* flag for some libxml eversions*/ int first_read; #endif void *saved_structured_error_context; xmlStructuredErrorFunc saved_structured_error_handler; void *saved_generic_error_context; xmlGenericErrorFunc saved_generic_error_handler; #endif /* element depth */ int depth; /* stack of elements - elements add after current_element */ raptor_xml_element *root_element; raptor_xml_element *current_element; /* start of an element */ raptor_sax2_start_element_handler start_element_handler; /* end of an element */ raptor_sax2_end_element_handler end_element_handler; /* characters */ raptor_sax2_characters_handler characters_handler; /* like <![CDATA[...]> */ raptor_sax2_cdata_handler cdata_handler; /* comment */ raptor_sax2_comment_handler comment_handler; /* unparsed (NDATA) entity */ raptor_sax2_unparsed_entity_decl_handler unparsed_entity_decl_handler; /* external entity reference */ raptor_sax2_external_entity_ref_handler external_entity_ref_handler; raptor_locator *locator; raptor_error_handlers* error_handlers; /* New XML namespace callback */ raptor_namespace_handler namespace_handler; /* FEATURE: * non 0 if require normalizing xml:lang attribute values to lowercase. */ int feature_normalize_language; /* FEATURE: * non 0 if network access is denied */ int feature_no_net; /* stack of namespaces, most recently added at top */ raptor_namespace_stack namespaces; /* base URI for resolving relative URIs or xml:base URIs */ raptor_uri* base_uri; /* sax2 init failed - do not try to do anything with it */ int failed; }; int raptor_sax2_init(raptor_world* world); void raptor_sax2_finish(raptor_world* world); raptor_xml_element* raptor_xml_element_pop(raptor_sax2* sax2); void raptor_xml_element_push(raptor_sax2* sax2, raptor_xml_element* element); int raptor_sax2_get_depth(raptor_sax2* sax2); void raptor_sax2_inc_depth(raptor_sax2* sax2); void raptor_sax2_dec_depth(raptor_sax2* sax2); void raptor_sax2_update_document_locator(raptor_sax2* sax2, raptor_locator* locator); int raptor_sax2_set_feature(raptor_sax2* sax2, raptor_feature feature, int value); #ifdef RAPTOR_DEBUG void raptor_print_xml_element(raptor_xml_element *element, FILE* stream); #endif void raptor_sax2_start_element(void* user_data, const unsigned char *name, const unsigned char **atts); void raptor_sax2_end_element(void* user_data, const unsigned char *name); void raptor_sax2_characters(void* user_data, const unsigned char *s, int len); void raptor_sax2_cdata(void* user_data, const unsigned char *s, int len); void raptor_sax2_comment(void* user_data, const unsigned char *s); void raptor_sax2_unparsed_entity_decl(void* user_data, const unsigned char* entityName, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId, const unsigned char* notationName); int raptor_sax2_external_entity_ref(void* user_data, const unsigned char* context, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId); /* turtle_parser.y and turtle_lexer.l */ typedef struct raptor_turtle_parser_s raptor_turtle_parser; /* n3_parser.y and n3_lexer.l */ typedef struct raptor_n3_parser_s raptor_n3_parser; typedef struct { raptor_identifier *subject; raptor_identifier *predicate; raptor_identifier *object; } raptor_triple; /* raptor_rfc2396.c */ struct raptor_uri_detail_s { size_t uri_len; /* buffer is the same size as the original uri_len */ unsigned char *buffer; /* URI Components. These all point into buffer */ unsigned char *scheme; unsigned char *authority; unsigned char *path; unsigned char *query; unsigned char *fragment; /* Lengths of the URI Components */ size_t scheme_len; size_t authority_len; size_t path_len; size_t query_len; size_t fragment_len; /* Flags */ int is_hierarchical; }; /* for time_t */ #if TIME_WITH_SYS_TIME # include <sys/time.h> # include <time.h> #else # if HAVE_SYS_TIME_H # include <sys/time.h> # else # include <time.h> # endif #endif /* parsedate.c */ #ifdef HAVE_INN_PARSEDATE #include <libinn.h> #define RAPTOR_PARSEDATE_FUNCTION parsedate #else #ifdef HAVE_RAPTOR_PARSE_DATE time_t raptor_parse_date(const char *p, time_t *now); #define RAPTOR_PARSEDATE_FUNCTION raptor_parse_date #else #ifdef HAVE_CURL_CURL_H #include <curl/curl.h> #define RAPTOR_PARSEDATE_FUNCTION curl_getdate #endif #endif #endif /* turtle_common.c */ int raptor_stringbuffer_append_turtle_string(raptor_stringbuffer* stringbuffer, const unsigned char *text, size_t len, int delim, raptor_simple_message_handler error_handler, void *error_data); /* raptor_xsd.c */ raptor_identifier* raptor_new_identifier_from_double(raptor_world* world, double d); /* raptor_abbrev.c */ typedef struct { raptor_world* world; int ref_count; /* count of references to this node */ int count_as_subject; /* count of this blank/resource node as subject */ int count_as_object; /* count of this blank/resource node as object */ raptor_identifier_type type; /* node type */ union { struct { raptor_uri *uri; } resource; struct { unsigned char *string; raptor_uri *datatype; unsigned char *language; } literal; struct { int ordinal; } ordinal; struct { unsigned char *string; } blank; } value; } raptor_abbrev_node; typedef struct { raptor_abbrev_node* node; /* node representing the subject of * this resource */ raptor_abbrev_node* node_type; /* the rdf:type of this resource */ raptor_avltree *properties; /* list of properties * (predicate/object pair) of this * subject */ raptor_sequence *list_items; /* list of container elements if * is rdf container */ int valid; /* set 0 for blank nodes that do not * need to be referred to again */ } raptor_abbrev_subject; raptor_abbrev_node* raptor_new_abbrev_node(raptor_world* world, raptor_identifier_type node_type, const void *node_data, raptor_uri *datatype, const unsigned char *language); void raptor_free_abbrev_node(raptor_abbrev_node* node); int raptor_abbrev_node_cmp(raptor_abbrev_node* node1, raptor_abbrev_node* node2); int raptor_abbrev_node_equals(raptor_abbrev_node* node1, raptor_abbrev_node* node2); raptor_abbrev_node* raptor_abbrev_node_lookup(raptor_avltree* nodes, raptor_identifier_type node_type, const void *node_value, raptor_uri *datatype, const unsigned char *language, int* created_p); raptor_abbrev_subject* raptor_new_abbrev_subject(raptor_abbrev_node* node); void raptor_free_abbrev_subject(raptor_abbrev_subject* subject); int raptor_abbrev_subject_add_property(raptor_abbrev_subject* subject, raptor_abbrev_node* predicate, raptor_abbrev_node* object); int raptor_abbrev_subject_add_list_element(raptor_abbrev_subject* subject, int ordinal, raptor_abbrev_node* object); int raptor_abbrev_subject_cmp(raptor_abbrev_subject* subject1, raptor_abbrev_subject* subject2); raptor_abbrev_subject* raptor_abbrev_subject_find(raptor_avltree *subjects, raptor_identifier_type node_type, const void *node_data); raptor_abbrev_subject* raptor_abbrev_subject_lookup(raptor_avltree* nodes, raptor_avltree* subjects, raptor_avltree* blanks, raptor_identifier_type node_type, const void *node_data, int* created_p); int raptor_abbrev_subject_valid(raptor_abbrev_subject *subject); int raptor_abbrev_subject_invalidate(raptor_abbrev_subject *subject); unsigned char *raptor_unique_id(unsigned char *base); raptor_qname* raptor_new_qname_from_resource(raptor_sequence* namespaces, raptor_namespace_stack* nstack, int* namespace_count, raptor_abbrev_node* node); /** * raptor_turtle_writer: * * Raptor Turtle Writer class */ typedef struct raptor_turtle_writer_s raptor_turtle_writer; /* Turtle Writer Class (raptor_turtle_writer) */ raptor_turtle_writer* raptor_new_turtle_writer(raptor_world* world, raptor_uri* base_uri, int write_base_uri, raptor_namespace_stack *nstack, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data); void raptor_free_turtle_writer(raptor_turtle_writer* turtle_writer); void raptor_turtle_writer_raw(raptor_turtle_writer* turtle_writer, const unsigned char *s); void raptor_turtle_writer_raw_counted(raptor_turtle_writer* turtle_writer, const unsigned char *s, unsigned int len); void raptor_turtle_writer_namespace_prefix(raptor_turtle_writer* turtle_writer, raptor_namespace* ns); void raptor_turtle_writer_base(raptor_turtle_writer* turtle_writer, raptor_uri* base_uri); void raptor_turtle_writer_increase_indent(raptor_turtle_writer *turtle_writer); void raptor_turtle_writer_decrease_indent(raptor_turtle_writer *turtle_writer); void raptor_turtle_writer_newline(raptor_turtle_writer *turtle_writer); void raptor_turtle_writer_reference(raptor_turtle_writer* turtle_writer, raptor_uri* uri); int raptor_turtle_writer_literal(raptor_turtle_writer* turtle_writer, raptor_namespace_stack *nstack, const unsigned char *s, const unsigned char* lang, raptor_uri* datatype); void raptor_turtle_writer_qname(raptor_turtle_writer* turtle_writer, raptor_qname* qname); int raptor_turtle_writer_quoted_counted_string(raptor_turtle_writer* turtle_writer, const unsigned char *s, size_t length); void raptor_turtle_writer_comment(raptor_turtle_writer* turtle_writer, const unsigned char *s); int raptor_turtle_writer_features_enumerate(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); int raptor_turtle_writer_set_feature(raptor_turtle_writer *turtle_writer, raptor_feature feature, int value); int raptor_turtle_writer_set_feature_string(raptor_turtle_writer *turtle_writer, raptor_feature feature, const unsigned char *value); int raptor_turtle_writer_get_feature(raptor_turtle_writer *turtle_writer, raptor_feature feature); const unsigned char *raptor_turtle_writer_get_feature_string(raptor_turtle_writer *turtle_writer, raptor_feature feature); /** * raptor_json_writer: * * Raptor JSON Writer class */ typedef struct raptor_json_writer_s raptor_json_writer; /* raptor_json_writer.c */ raptor_json_writer* raptor_new_json_writer(raptor_world* world, raptor_uri* base_uri, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data); void raptor_free_json_writer(raptor_json_writer* json_writer); int raptor_json_writer_newline(raptor_json_writer* json_writer); int raptor_json_writer_key_value(raptor_json_writer* json_writer, const char* key, size_t key_len, const char* value, size_t value_len); int raptor_json_writer_start_block(raptor_json_writer* json_writer, char c); int raptor_json_writer_end_block(raptor_json_writer* json_writer, char c); int raptor_json_writer_literal_object(raptor_json_writer* json_writer, unsigned char* s, unsigned char* lang, raptor_uri* datatype, const char* key, const char* type_key); int raptor_json_writer_blank_object(raptor_json_writer* json_writer, const char* blank); int raptor_json_writer_uri_object(raptor_json_writer* json_writer, raptor_uri* uri); int raptor_json_writer_key_uri_value(raptor_json_writer* json_writer, const char* key, size_t key_len, raptor_uri* uri); /* raptor_memstr.c */ const char* raptor_memstr(const char *haystack, size_t haystack_len, const char *needle); /* raptor_serialize_rdfxmla.c special functions for embedding rdf/xml */ int raptor_rdfxmla_serialize_set_write_rdf_RDF(raptor_serializer* serializer, int value); int raptor_rdfxmla_serialize_set_xml_writer(raptor_serializer* serializer, raptor_xml_writer* xml_writer, raptor_namespace_stack *nstack); int raptor_rdfxmla_serialize_set_single_node(raptor_serializer* serializer, raptor_uri* uri); int raptor_rdfxmla_serialize_set_write_typed_nodes(raptor_serializer* serializer, int value); /* snprintf.c */ char* raptor_format_float(char *buffer, size_t *currlen, size_t maxlen, double fvalue, unsigned int min, unsigned int max, int flags); /* constructor / destructor */ #define RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES 1 raptor_avltree* raptor_new_avltree(raptor_world* world, raptor_data_compare_function compare_fn, raptor_data_free_function free_fn, unsigned int flags); void raptor_free_avltree(raptor_avltree* tree); /* methods */ int raptor_avltree_add(raptor_avltree* tree, void* p_user); void* raptor_avltree_remove(raptor_avltree* tree, void* p_data); int raptor_avltree_delete(raptor_avltree* tree, void* p_user); void* raptor_avltree_search(raptor_avltree* tree, const void* p_user); int raptor_avltree_visit(raptor_avltree* tree, raptor_avltree_visit_function visit_fn, void* user_data); int raptor_avltree_size(raptor_avltree* tree); void raptor_avltree_set_print_handler(raptor_avltree* tree, raptor_data_print_function print_fn); void raptor_avltree_print(raptor_avltree* tree, FILE* stream); #ifdef RAPTOR_DEBUG int raptor_avltree_dump(raptor_avltree* tree, FILE* stream); void raptor_avltree_check(raptor_avltree* tree); #endif int raptor_avltree_cursor_first(raptor_avltree* tree); int raptor_avltree_cursor_last(raptor_avltree* tree); int raptor_avltree_cursor_prev(raptor_avltree* tree); int raptor_avltree_cursor_next(raptor_avltree* tree); void* raptor_avltree_cursor_get(raptor_avltree* tree); raptor_avltree_iterator* raptor_new_avltree_iterator(raptor_avltree* tree, void* range, raptor_data_free_function range_free_fn, int direction); void raptor_free_avltree_iterator(raptor_avltree_iterator* iterator); int raptor_avltree_iterator_end(raptor_avltree_iterator* iterator); int raptor_avltree_iterator_next(raptor_avltree_iterator* iterator); void* raptor_avltree_iterator_get(raptor_avltree_iterator* iterator); /* raptor_world structure */ struct raptor_world_s { /* world has been initialized with raptor_world_open() */ int opened; /* raptor_init(), raptor_finish() balance */ int static_usage; /* sequence of parser factories */ raptor_sequence *parsers; /* sequence of serializer factories */ raptor_sequence *serializers; /* current uri handler and its data */ const raptor_uri_handler *uri_handler; void *uri_handler_context; /* raptor_rss_common initialisation counter */ int rss_common_initialised; /* raptor_rss_{namespaces,types,fields}_info const data initialized to raptor_uri,raptor_qname objects */ raptor_uri **rss_namespaces_info_uris; raptor_uri **rss_types_info_uris; raptor_qname **rss_types_info_qnames; raptor_uri **rss_fields_info_uris; raptor_qname **rss_fields_info_qnames; /* raptor_www v2 flags */ int www_skip_www_init_finish; int www_initialized; /* raptor_sax2 init counter to work around issues in xml parser init/cleanup */ int sax2_initialized; /* This is used to store a #xsltSecurityPrefsPtr typed object * pointer when libxslt is compiled in. */ void* xslt_security_preferences; /* If non-0 - raptors own the above object and should free it with * xsltFreeSecurityPrefs() on exit */ int free_xslt_security_preferences; /* Flags for libxml set by raptor_world_set_libxml_flags() and * raptor_set_libxml_flags() - see #raptor_libxml_flags for * meanings */ int libxml_flags; }; /* raptor_world legacy accessor */ #ifndef RAPTOR_DISABLE_V1 raptor_world* raptor_world_instance(void); #endif /* end of RAPTOR_INTERNAL */ #endif #ifdef __cplusplus } #endif #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_win32.c��������������������������������������������������������������������0000644�0001750�0001750�00000002307�11322277062�013317� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_win32.c - Raptor WIN32 support functions * * Copyright (C) 2002-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #ifdef WIN32 /* Only on WIN32 systems */ /* DLL entry point */ BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { return TRUE; } /* end if WIN32 */ #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_serialize_json.c�����������������������������������������������������������0000644�0001750�0001750�00000043154�11330672502�015377� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_json.c - JSON serializers * * Copyright (C) 2008-2009, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * Raptor JSON serializer object */ typedef struct { /* non-0 if json-r otherwise json-t */ int is_resource; int need_subject_comma; /* JSON writer object */ raptor_json_writer* json_writer; /* Ordered sequence of triples if is_resource */ raptor_avltree* avltree; /* Last statement generated if is_resource (shared pointer) */ raptor_statement_v2* last_statement; int need_object_comma; } raptor_json_context; static int raptor_json_serialize_init(raptor_serializer* serializer, const char *name); static void raptor_json_serialize_terminate(raptor_serializer* serializer); static int raptor_json_serialize_start(raptor_serializer* serializer); static int raptor_json_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement); static int raptor_json_serialize_end(raptor_serializer* serializer); static void raptor_json_serialize_finish_factory(raptor_serializer_factory* factory); /* * raptor serializer JSON implementation */ /* create a new serializer */ static int raptor_json_serialize_init(raptor_serializer* serializer, const char *name) { raptor_json_context* context=(raptor_json_context*)serializer->context; context->is_resource=!strcmp(name,"json"); /* Default for JSON serializer is absolute URIs */ serializer->feature_relative_uris=0; return 0; } /* destroy a serializer */ static void raptor_json_serialize_terminate(raptor_serializer* serializer) { raptor_json_context* context=(raptor_json_context*)serializer->context; if(context->json_writer) { raptor_free_json_writer(context->json_writer); context->json_writer=NULL; } if(context->avltree) { raptor_free_avltree(context->avltree); context->avltree=NULL; } } static int raptor_json_serialize_start(raptor_serializer* serializer) { raptor_json_context* context=(raptor_json_context*)serializer->context; raptor_uri* base_uri; base_uri=(serializer->feature_relative_uris) ? serializer->base_uri : NULL; context->json_writer=raptor_new_json_writer(serializer->world, base_uri, serializer->iostream, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer); if(!context->json_writer) return 1; if(context->is_resource) { context->avltree=raptor_new_avltree(serializer->world, (raptor_data_compare_function)raptor_statement_compare_v2, (raptor_data_free_function)raptor_free_statement_v2, 0); if(!context->avltree) { raptor_free_json_writer(context->json_writer); context->json_writer=NULL; return 1; } } /* start callback */ if(serializer->feature_json_callback) { raptor_iostream_write_string(serializer->iostream, serializer->feature_json_callback); raptor_iostream_write_byte(serializer->iostream, '('); } if(!context->is_resource) { /* start outer object */ raptor_json_writer_start_block(context->json_writer, '{'); raptor_json_writer_newline(context->json_writer); /* start triples array */ raptor_iostream_write_counted_string(serializer->iostream, (const unsigned char*)"\"triples\" : ", 12); raptor_json_writer_start_block(context->json_writer, '['); raptor_json_writer_newline(context->json_writer); } return 0; } static int raptor_json_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement) { raptor_json_context* context=(raptor_json_context*)serializer->context; if(context->is_resource) { raptor_statement_v2* s=raptor_statement_copy_v2_from_v1(serializer->world, statement); if(!s) return 1; return raptor_avltree_add(context->avltree, s); } if(context->need_subject_comma) { raptor_iostream_write_byte(serializer->iostream, ','); raptor_json_writer_newline(context->json_writer); } /* start triple */ raptor_json_writer_start_block(context->json_writer, '{'); raptor_json_writer_newline(context->json_writer); /* subject */ raptor_iostream_write_string(serializer->iostream, (const unsigned char*)"\"subject\" : "); switch(statement->subject_type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: raptor_json_writer_uri_object(context->json_writer, (raptor_uri*)statement->subject); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: raptor_json_writer_blank_object(context->json_writer, (const char*)statement->subject); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL1("Unsupported identifier type\n"); break; } raptor_iostream_write_byte(serializer->iostream, ','); raptor_json_writer_newline(context->json_writer); /* predicate */ raptor_iostream_write_string(serializer->iostream, (const unsigned char*)"\"predicate\" : "); raptor_json_writer_uri_object(context->json_writer, (raptor_uri*)statement->predicate); raptor_iostream_write_byte(serializer->iostream, ','); raptor_json_writer_newline(context->json_writer); /* object */ raptor_iostream_write_string(serializer->iostream, (const unsigned char*)"\"object\" : "); switch(statement->object_type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: raptor_json_writer_uri_object(context->json_writer, (raptor_uri*)statement->object); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: raptor_json_writer_literal_object(context->json_writer, (unsigned char*)statement->object, (unsigned char*)statement->object_literal_language, statement->object_literal_datatype, "value", "type"); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: raptor_json_writer_blank_object(context->json_writer, (const char*)statement->object); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL1("Unsupported identifier type\n"); break; } raptor_json_writer_newline(context->json_writer); /* end triple */ raptor_json_writer_end_block(context->json_writer, '}'); context->need_subject_comma=1; return 0; } /* return 0 to abort visit */ static int raptor_json_serialize_avltree_visit(int depth, void* data, void *user_data) { raptor_serializer* serializer=(raptor_serializer*)user_data; raptor_json_context* context=(raptor_json_context*)serializer->context; raptor_statement_v2* statement=(raptor_statement_v2*)data; raptor_statement* s1 = statement->s; raptor_statement* s2 = context->last_statement ? (context->last_statement->s) : NULL; int new_subject=0; int new_predicate=0; if(s2) { if(s1->subject_type != s2->subject_type) { new_subject=1; } else { /* subjects are URIs or blank nodes */ if(s1->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) new_subject=strcmp((char*)s1->subject, (char*)s2->subject); else new_subject=!raptor_uri_equals_v2(serializer->world, (raptor_uri*)s1->subject, (raptor_uri*)s2->subject); } if(new_subject) { /* end last predicate */ raptor_json_writer_newline(context->json_writer); raptor_json_writer_end_block(context->json_writer, ']'); raptor_json_writer_newline(context->json_writer); /* end last statement */ raptor_json_writer_end_block(context->json_writer, '}'); raptor_json_writer_newline(context->json_writer); context->need_subject_comma=1; context->need_object_comma=0; } } else new_subject=1; if(new_subject) { if(context->need_subject_comma) { raptor_iostream_write_byte(serializer->iostream, ','); raptor_json_writer_newline(context->json_writer); } /* start triple */ /* subject */ switch(s1->subject_type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: raptor_json_writer_key_uri_value(context->json_writer, NULL, 0, (raptor_uri*)s1->subject); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: raptor_iostream_write_counted_string(serializer->iostream, "\"_:", 3); raptor_iostream_write_string_python(serializer->iostream, (const unsigned char*)s1->subject, 0, '"', 2); raptor_iostream_write_byte(serializer->iostream, '"'); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL2("Unsupported statement subject identifier type %d\n", s1->subject_type); break; } raptor_iostream_write_counted_string(serializer->iostream, " : ", 3); raptor_json_writer_start_block(context->json_writer, '{'); raptor_json_writer_newline(context->json_writer); } /* predicate */ if(context->last_statement) { if(new_subject) new_predicate=1; else { new_predicate=!raptor_uri_equals_v2(serializer->world, (raptor_uri*)s1->predicate, (raptor_uri*)s2->predicate); if(new_predicate) { raptor_json_writer_newline(context->json_writer); raptor_json_writer_end_block(context->json_writer, ']'); raptor_iostream_write_byte(serializer->iostream, ','); raptor_json_writer_newline(context->json_writer); } } } else new_predicate=1; if(new_predicate) { /* start predicate */ raptor_json_writer_key_uri_value(context->json_writer, NULL, 0, (raptor_uri*)s1->predicate); raptor_iostream_write_counted_string(serializer->iostream, " : ", 3); raptor_json_writer_start_block(context->json_writer, '['); raptor_iostream_write_byte(serializer->iostream, ' '); context->need_object_comma=0; } if(context->need_object_comma) { raptor_iostream_write_byte(serializer->iostream, ','); raptor_json_writer_newline(context->json_writer); } /* object */ switch(s1->object_type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: case RAPTOR_IDENTIFIER_TYPE_PREDICATE: raptor_json_writer_uri_object(context->json_writer, (raptor_uri*)s1->object); raptor_json_writer_newline(context->json_writer); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: raptor_json_writer_literal_object(context->json_writer, (unsigned char*)s1->object, (unsigned char*)s1->object_literal_language, s1->object_literal_datatype, "value", "type"); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: raptor_json_writer_blank_object(context->json_writer, (const char*)s1->object); raptor_json_writer_newline(context->json_writer); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL2("Unsupported statement object identifier type %d\n", s1->object_type); break; } /* end triple */ context->need_object_comma = 1; context->last_statement = statement; return 1; } static int raptor_json_serialize_end(raptor_serializer* serializer) { raptor_json_context* context=(raptor_json_context*)serializer->context; raptor_json_writer_newline(context->json_writer); if(context->is_resource) { /* start outer object */ raptor_json_writer_start_block(context->json_writer, '{'); raptor_json_writer_newline(context->json_writer); raptor_avltree_visit(context->avltree, raptor_json_serialize_avltree_visit, serializer); /* end last triples block */ if(context->last_statement) { raptor_json_writer_newline(context->json_writer); raptor_json_writer_end_block(context->json_writer, ']'); raptor_json_writer_newline(context->json_writer); raptor_json_writer_end_block(context->json_writer, '}'); raptor_json_writer_newline(context->json_writer); } } else { /* end triples array */ raptor_json_writer_end_block(context->json_writer, ']'); raptor_json_writer_newline(context->json_writer); } if(serializer->feature_json_extra_data) { raptor_iostream_write_byte(serializer->iostream, ','); raptor_json_writer_newline(context->json_writer); raptor_iostream_write_string(serializer->iostream, serializer->feature_json_extra_data); raptor_json_writer_newline(context->json_writer); } /* end outer object */ raptor_json_writer_end_block(context->json_writer, '}'); raptor_json_writer_newline(context->json_writer); /* end callback */ if(serializer->feature_json_callback) raptor_iostream_write_counted_string(serializer->iostream, (const unsigned char*)");", 2); return 0; } static void raptor_json_serialize_finish_factory(raptor_serializer_factory* factory) { /* NOP */ } static int raptor_json_triples_serializer_register_factory(raptor_serializer_factory *factory) { factory->context_length = sizeof(raptor_json_context); factory->init = raptor_json_serialize_init; factory->terminate = raptor_json_serialize_terminate; factory->declare_namespace = NULL; factory->declare_namespace_from_namespace = NULL; factory->serialize_start = raptor_json_serialize_start; factory->serialize_statement = raptor_json_serialize_statement; factory->serialize_end = raptor_json_serialize_end; factory->finish_factory = raptor_json_serialize_finish_factory; return 0; } static int raptor_json_resource_serializer_register_factory(raptor_serializer_factory *factory) { factory->context_length = sizeof(raptor_json_context); factory->init = raptor_json_serialize_init; factory->terminate = raptor_json_serialize_terminate; factory->declare_namespace = NULL; factory->declare_namespace_from_namespace = NULL; factory->serialize_start = raptor_json_serialize_start; factory->serialize_statement = raptor_json_serialize_statement; factory->serialize_end = raptor_json_serialize_end; factory->finish_factory = raptor_json_serialize_finish_factory; return 0; } int raptor_init_serializer_json(raptor_world* world) { int rc; rc=raptor_serializer_register_factory(world, "json-triples", "RDF/JSON Triples", "application/json", NULL, NULL, &raptor_json_triples_serializer_register_factory); if(rc) return rc; return raptor_serializer_register_factory(world, "json", "RDF/JSON Resource-Centric", "application/json", NULL, (const unsigned char *)"http://n2.talis.com/wiki/RDF_JSON_Specification", &raptor_json_resource_serializer_register_factory); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_iostream.c�����������������������������������������������������������������0000644�0001750�0001750�00000117712�11330672502�014204� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_iostream.c - Raptor I/O-stream class for abstracting I/O * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE #define RAPTOR_IOSTREAM_MODE_READ 1 #define RAPTOR_IOSTREAM_MODE_WRITE 2 #define RAPTOR_IOSTREAM_FLAGS_EOF 1 #define RAPTOR_IOSTREAM_FLAGS_FREE_HANDLER 2 struct raptor_iostream_s { void *user_data; const raptor_iostream_handler2* handler; unsigned long offset; unsigned int mode; int flags; }; /* prototypes for local functions */ static int raptor_iostream_calculate_modes(const raptor_iostream_handler2 * const handler2) { int mode = 0; /* API V1 checks */ if((handler2->version >= 1) && handler2->read_bytes) mode |= RAPTOR_IOSTREAM_MODE_READ; /* API V2 checks */ if((handler2->version >= 2) && (handler2->write_byte || handler2->write_bytes)) mode |= RAPTOR_IOSTREAM_MODE_WRITE; return mode; } /* Return non-0 if handler is legal and OK for given mode (if not 0=ANY) */ static int raptor_iostream_check_handler(const raptor_iostream_handler2 * const handler2, unsigned int user_mode) { int mode; if(handler2->version < 1 || handler2->version > 2) return 0; mode = raptor_iostream_calculate_modes(handler2); if(user_mode && !(user_mode & mode)) return 0; return (mode != 0); } /** * raptor_new_iostream_from_handler2: * @user_data: pointer to context information to pass in to calls * @handler2: pointer to handler methods * * Create a new iostream over a user-defined handler * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_handler2(void *user_data, const raptor_iostream_handler2 * const handler2) { raptor_iostream* iostr; if(!raptor_iostream_check_handler(handler2, 0)) return NULL; iostr=(raptor_iostream*)RAPTOR_CALLOC(raptor_iostream, 1, sizeof(raptor_iostream)); if(!iostr) return NULL; iostr->handler=handler2; iostr->user_data=(void*)user_data; iostr->mode = raptor_iostream_calculate_modes(handler2); if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } return iostr; } #ifndef RAPTOR_DISABLE_DEPRECATED /** * raptor_new_iostream_from_handler: * @context: pointer to context information to pass in to calls * @handler: pointer to handler methods * * Create a new iostream over a user-defined handler. * * @deprecated: Use raptor_new_iostream_from_handler2() instead * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_handler(void *user_data, const raptor_iostream_handler *handler) { raptor_iostream* iostr=NULL; raptor_iostream_handler2 *handler2; if(!handler) return NULL; handler2=(raptor_iostream_handler2*)RAPTOR_CALLOC(raptor_iostream_handler2, 1, sizeof(raptor_iostream_handler2*)); if(!handler2) return NULL; /* Copy V1 functions to V2 structure */ handler2->init = handler->init; handler2->finish = handler->finish; handler2->write_byte = handler->write_byte; handler2->write_bytes = handler->write_bytes; handler2->write_end = handler->write_end; iostr=raptor_new_iostream_from_handler2(user_data, handler2); if(iostr) { /* Ensure newly alloced structure is freed on iostream destruction */ iostr->flags |= RAPTOR_IOSTREAM_FLAGS_FREE_HANDLER; } else /* failure: so delete it now */ RAPTOR_FREE(raptor_iostream_handler2, handler2); return iostr; } #endif /* Local handlers for reading/writing to/from a sink */ static int raptor_sink_iostream_write_byte(void *user_data, const int byte) { return 0; } static int raptor_sink_iostream_write_bytes(void *user_data, const void *ptr, size_t size, size_t nmemb) { return 0; } static int raptor_sink_iostream_read_bytes(void *user_data, void *ptr, size_t size, size_t nmemb) { return 0; } static int raptor_sink_iostream_read_eof(void *user_data) { return 1; /* EOF always */ } static const raptor_iostream_handler2 raptor_iostream_sink_handler={ /* .version = */ 2, /* .init = */ NULL, /* .finish = */ NULL, /* .write_byte = */ raptor_sink_iostream_write_byte, /* .write_bytes = */ raptor_sink_iostream_write_bytes, /* .write_end = */ NULL, /* .read_bytes = */ raptor_sink_iostream_read_bytes, /* .read_eof = */ raptor_sink_iostream_read_eof }; /** * raptor_new_iostream_to_sink: * * Create a new write iostream to a sink. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_to_sink(void) { return raptor_new_iostream_from_handler2(NULL, &raptor_iostream_sink_handler); } /* Local handlers for reading/writing from a filename */ static void raptor_filename_iostream_finish(void *user_data) { FILE* handle=(FILE*)user_data; fclose(handle); } static int raptor_filename_iostream_write_byte(void *user_data, const int byte) { FILE* handle=(FILE*)user_data; return (fputc(byte, handle) == byte); } static int raptor_filename_iostream_write_bytes(void *user_data, const void *ptr, size_t size, size_t nmemb) { FILE* handle=(FILE*)user_data; return (fwrite(ptr, size, nmemb, handle) == nmemb); } static void raptor_filename_iostream_write_end(void *user_data) { FILE* handle=(FILE*)user_data; fclose(handle); } static int raptor_filename_iostream_read_bytes(void *user_data, void *ptr, size_t size, size_t nmemb) { FILE* handle=(FILE*)user_data; return fread(ptr, size, nmemb, handle); } static int raptor_filename_iostream_read_eof(void *user_data) { FILE* handle=(FILE*)user_data; return feof(handle); } static const raptor_iostream_handler2 raptor_iostream_write_filename_handler={ /* .version = */ 2, /* .init = */ NULL, /* .finish = */ raptor_filename_iostream_finish, /* .write_byte = */ raptor_filename_iostream_write_byte, /* .write_bytes = */ raptor_filename_iostream_write_bytes, /* .write_end = */ raptor_filename_iostream_write_end, /* .read_bytes = */ NULL, /* .read_eof = */ NULL }; /** * raptor_new_iostream_to_filename: * @filename: Output filename to open and write to * * Constructor - create a new iostream writing to a filename. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_to_filename(const char *filename) { FILE *handle; raptor_iostream* iostr; const raptor_iostream_handler2* handler2=&raptor_iostream_write_filename_handler; const unsigned int mode=RAPTOR_IOSTREAM_MODE_WRITE; if(!raptor_iostream_check_handler(handler2, mode)) return NULL; handle=fopen(filename, "wb"); if(!handle) return NULL; iostr=(raptor_iostream*)RAPTOR_CALLOC(raptor_iostream, 1, sizeof(raptor_iostream)); if(!iostr) { fclose(handle); return NULL; } iostr->handler=handler2; iostr->user_data=(void*)handle; iostr->mode=mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { raptor_free_iostream(iostr); return NULL; } return iostr; } static const raptor_iostream_handler2 raptor_iostream_write_file_handler={ /* .version = */ 2, /* .init = */ NULL, /* .finish = */ NULL, /* .write_byte = */ raptor_filename_iostream_write_byte, /* .write_bytes = */ raptor_filename_iostream_write_bytes, /* .write_end = */ NULL, /* .read_bytes = */ NULL, /* .read_eof = */ NULL }; /** * raptor_new_iostream_to_file_handle: * @handle: FILE* handle to write to * * Constructor - create a new iostream writing to a FILE*. * * The @handle must already be open for writing. * NOTE: This does not fclose the @handle when it is finished. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_to_file_handle(FILE *handle) { raptor_iostream* iostr; const raptor_iostream_handler2* handler2=&raptor_iostream_write_file_handler; const unsigned int mode=RAPTOR_IOSTREAM_MODE_WRITE; if(!handle) return NULL; if(!raptor_iostream_check_handler(handler2, mode)) return NULL; iostr=(raptor_iostream*)RAPTOR_CALLOC(raptor_iostream, 1, sizeof(raptor_iostream)); if(!iostr) return NULL; iostr->handler=handler2; iostr->user_data=(void*)handle; iostr->mode=mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } return iostr; } struct raptor_write_string_iostream_context { raptor_stringbuffer *sb; void *(*malloc_handler)(size_t size); void **string_p; size_t *length_p; }; /* Local handlers for writing to a string */ static void raptor_write_string_iostream_finish(void *user_data) { struct raptor_write_string_iostream_context* con; size_t len; void *str=NULL; con=(struct raptor_write_string_iostream_context*)user_data; len=raptor_stringbuffer_length(con->sb); *con->string_p=NULL; if(con->length_p) *con->length_p=len; str=(void*)con->malloc_handler(len+1); if(str) { if(len) raptor_stringbuffer_copy_to_string(con->sb, (unsigned char*)str, len+1); else *(char*)str='\0'; *con->string_p=str; } if(!str && con->length_p) *con->length_p=0; raptor_free_stringbuffer(con->sb); RAPTOR_FREE(raptor_write_string_iostream_context, con); return; } static int raptor_write_string_iostream_write_byte(void *user_data, const int byte) { struct raptor_write_string_iostream_context* con; unsigned char buf=(unsigned char)byte; con=(struct raptor_write_string_iostream_context*)user_data; return raptor_stringbuffer_append_counted_string(con->sb, &buf, 1, 1); } static int raptor_write_string_iostream_write_bytes(void *user_data, const void *ptr, size_t size, size_t nmemb) { struct raptor_write_string_iostream_context* con; con=(struct raptor_write_string_iostream_context*)user_data; return raptor_stringbuffer_append_counted_string(con->sb, (const unsigned char*)ptr, size * nmemb, 1); } static const raptor_iostream_handler2 raptor_iostream_write_string_handler={ /* .version = */ 2, /* .init = */ NULL, /* .finish = */ raptor_write_string_iostream_finish, /* .write_byte = */ raptor_write_string_iostream_write_byte, /* .write_bytes = */ raptor_write_string_iostream_write_bytes, /* .write_end = */ NULL, /* .read_bytes = */ NULL, /* .read_eof = */ NULL }; /** * raptor_new_iostream_to_string: * @string_p: pointer to location to hold string * @length_p: pointer to location to hold length of string (or NULL) * @malloc_handler: pointer to malloc to use to make string (or NULL) * * Constructor - create a new iostream writing to a string. * * If @malloc_handler is null, raptor will allocate it using it's * own memory allocator. *@string_p is set to NULL on failure (and * *@length_p to 0 if @length_p is not NULL). * * Return value: new #raptor_iostream object or NULL on failure **/ RAPTOR_EXTERN_C raptor_iostream* raptor_new_iostream_to_string(void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)) { raptor_iostream* iostr; struct raptor_write_string_iostream_context* con; const raptor_iostream_handler2* handler2=&raptor_iostream_write_string_handler; const unsigned int mode=RAPTOR_IOSTREAM_MODE_WRITE; if(!raptor_iostream_check_handler(handler2, mode)) return NULL; iostr=(raptor_iostream*)RAPTOR_CALLOC(raptor_iostream, 1, sizeof(raptor_iostream)); if(!iostr) return NULL; con=(struct raptor_write_string_iostream_context*)RAPTOR_CALLOC(raptor_write_string_iostream_context, 1, sizeof(struct raptor_write_string_iostream_context)); if(!con) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } con->sb=raptor_new_stringbuffer(); if(!con->sb) { RAPTOR_FREE(raptor_iostream, iostr); RAPTOR_FREE(raptor_write_string_iostream_context, con); return NULL; } con->string_p=string_p; *string_p=NULL; con->length_p=length_p; if(length_p) *length_p=0; if(malloc_handler) con->malloc_handler=malloc_handler; else con->malloc_handler=raptor_alloc_memory; iostr->handler=handler2; iostr->user_data=(void*)con; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { raptor_free_iostream(iostr); return NULL; } return iostr; } /** * raptor_new_iostream_from_sink: * * Create a new read iostream from a sink. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_sink(void) { return raptor_new_iostream_from_handler2(NULL, &raptor_iostream_sink_handler); } static const raptor_iostream_handler2 raptor_iostream_read_filename_handler={ /* .version = */ 2, /* .init = */ NULL, /* .finish = */ raptor_filename_iostream_finish, /* .write_byte = */ NULL, /* .write_bytes = */ NULL, /* .write_end = */ NULL, /* .read_bytes = */ raptor_filename_iostream_read_bytes, /* .read_eof = */ raptor_filename_iostream_read_eof }; /** * raptor_new_iostream_from_filename: * @filename: Input filename to open and read from * * Constructor - create a new iostream reading from a filename. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_filename(const char *filename) { FILE *handle; raptor_iostream* iostr; const raptor_iostream_handler2* handler2=&raptor_iostream_read_filename_handler; const unsigned int mode=RAPTOR_IOSTREAM_MODE_READ; if(!filename) return NULL; if(!raptor_iostream_check_handler(handler2, mode)) return NULL; handle=fopen(filename, "rb"); if(!handle) return NULL; iostr=(raptor_iostream*)RAPTOR_CALLOC(raptor_iostream, 1, sizeof(raptor_iostream)); if(!iostr) { fclose(handle); return NULL; } iostr->handler=handler2; iostr->user_data=(void*)handle; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { raptor_free_iostream(iostr); return NULL; } return iostr; } static const raptor_iostream_handler2 raptor_iostream_read_file_handle_handler={ /* .version = */ 2, /* .init = */ NULL, /* .finish = */ NULL, /* .write_byte = */ NULL, /* .write_bytes = */ NULL, /* .write_end = */ NULL, /* .read_bytes = */ raptor_filename_iostream_read_bytes, /* .read_eof = */ raptor_filename_iostream_read_eof }; /** * raptor_new_iostream_from_file_handle: * @handle: Input file_handle to open and read from * * Constructor - create a new iostream reading from a file_handle. * * The @handle must already be open for reading. * NOTE: This does not fclose the @handle when it is finished. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_file_handle(FILE *handle) { raptor_iostream* iostr; const raptor_iostream_handler2* handler2=&raptor_iostream_read_file_handle_handler; const unsigned int mode=RAPTOR_IOSTREAM_MODE_READ; if(!handle) return NULL; if(!raptor_iostream_check_handler(handler2, mode)) return NULL; iostr=(raptor_iostream*)RAPTOR_CALLOC(raptor_iostream, 1, sizeof(raptor_iostream)); if(!iostr) return NULL; iostr->handler=handler2; iostr->user_data=(void*)handle; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } return iostr; } /** * raptor_free_iostream: * @iostr: iostream object * * Destructor - destroy an iostream. **/ void raptor_free_iostream(raptor_iostream *iostr) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(iostr, raptor_iostream); if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) raptor_iostream_write_end(iostr); if(iostr->handler->finish) iostr->handler->finish(iostr->user_data); if((iostr->flags & RAPTOR_IOSTREAM_FLAGS_FREE_HANDLER)) RAPTOR_FREE(raptor_iostream_handler2, iostr->handler); RAPTOR_FREE(raptor_iostream, iostr); } /** * raptor_iostream_write_byte: * @iostr: raptor iostream * @byte: byte to write * * Write a byte to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_write_byte(raptor_iostream *iostr, const int byte) { iostr->offset++; if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) return 1; if(!iostr->handler->write_byte) return 1; if(!(iostr->mode & RAPTOR_IOSTREAM_MODE_WRITE)) return 1; return iostr->handler->write_byte(iostr->user_data, byte); } /** * raptor_iostream_write_bytes: * @iostr: raptor iostream * @ptr: start of objects to write * @size: size of object * @nmemb: number of objects * * Write bytes to the iostream. * * Return value: number of objects written or less than nmemb or 0 on failure **/ int raptor_iostream_write_bytes(raptor_iostream *iostr, const void *ptr, size_t size, size_t nmemb) { iostr->offset += (size*nmemb); if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) return 1; if(!iostr->handler->write_bytes) return 0; if(!(iostr->mode & RAPTOR_IOSTREAM_MODE_WRITE)) return 1; return iostr->handler->write_bytes(iostr->user_data, ptr, size, nmemb); } /** * raptor_iostream_write_string: * @iostr: raptor iostream * @string: string * * Write a NULL-terminated string to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_write_string(raptor_iostream *iostr, const void *string) { size_t len=strlen((const char*)string); return (raptor_iostream_write_bytes(iostr, string, 1, len) != (int)len); } /** * raptor_iostream_write_counted_string: * @iostr: raptor iostream * @string: string * @len: string length * * Write a counted string to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_write_counted_string(raptor_iostream *iostr, const void *string, size_t len) { return (raptor_iostream_write_bytes(iostr, string, 1, len) != (int)len); } #ifndef RAPTOR_DISABLE_V1 /** * raptor_iostream_write_uri: * @iostr: raptor iostream * @uri: URI * * Write a raptor URI to the iostream. * * raptor_init() MUST have been called before calling this function. * Use raptor_iostream_write_uri_v2() if using raptor_world APIs. * * Return value: non-0 on failure **/ int raptor_iostream_write_uri(raptor_iostream* iostr, raptor_uri* uri) { return raptor_iostream_write_uri_v2(raptor_world_instance(), iostr, uri); } #endif /** * raptor_iostream_write_uri_v2: * @world: raptor_world object * @iostr: raptor iostream * @uri: URI * * Write a raptor URI to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_write_uri_v2(raptor_world* world, raptor_iostream* iostr, raptor_uri* uri) { size_t len; const void *string=raptor_uri_as_counted_string_v2(world, uri, &len); return (raptor_iostream_write_bytes(iostr, string, 1, len) != (int)len); } /** * raptor_iostream_write_end: * @iostr: raptor iostream * * End writing to the iostream. **/ void raptor_iostream_write_end(raptor_iostream *iostr) { if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) return; if(iostr->handler->write_end) iostr->handler->write_end(iostr->user_data); iostr->flags |= RAPTOR_IOSTREAM_FLAGS_EOF; } #ifndef RAPTOR_DISABLE_DEPRECATED /** * raptor_iostream_get_bytes_written_count: * @iostr: raptor iostream * * Get the number of bytes written to the iostream. * * @deprecated: Use raptor_iostream_tell() instead * * Return value: number of bytes written or 0 if none written so far **/ size_t raptor_iostream_get_bytes_written_count(raptor_iostream *iostr) { return iostr->offset; } #endif /** * raptor_iostream_write_stringbuffer: * @iostr: raptor iostream * @sb: #raptor_stringbuffer to write * * Write a stringbuffer to an iostream. * * Return value: non-0 on failure **/ int raptor_iostream_write_stringbuffer(raptor_iostream* iostr, raptor_stringbuffer *sb) { int length; if(!sb) return 1; length=(int)raptor_stringbuffer_length(sb); if(length) { int count=raptor_iostream_write_bytes(iostr, raptor_stringbuffer_as_string(sb), 1, length); return (count != length); } else return 0; } /** * raptor_iostream_write_decimal: * @iostr: raptor iostream * @integer: integer to format as decimal * * Write an integer in decimal to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_write_decimal(raptor_iostream* iostr, int integer) { /* enough for 64 bit signed integer * INT64_MAX is 9223372036854775807 (19 digits) + 1 for sign */ unsigned char buf[20]; unsigned char *p; int i=integer; size_t length=1; if(integer < 0) { length++; i= -integer; } while(i/=10) length++; p=buf+length-1; i=integer; if(i < 0) i= -i; do { *p-- ='0'+(i %10); i /= 10; } while(i); if(integer < 0) *p= '-'; return raptor_iostream_write_bytes(iostr, buf, 1, length); } /** * raptor_iostream_format_hexadecimal: * @iostr: raptor iostream * @integer: unsigned integer to format as hexadecimal * @width: field width * * Write an integer in hexadecimal to the iostream. * * Always 0-fills the entire field and writes in uppercase A-F * * Return value: non-0 on failure **/ int raptor_iostream_format_hexadecimal(raptor_iostream* iostr, unsigned int integer, int width) { unsigned char *buf; unsigned char *p; int rc; if(width <1) return 1; buf=(unsigned char*)RAPTOR_MALLOC(cstring, width); if(!buf) return 1; p=buf+width-1; do { unsigned int digit=(integer & 15); *p-- =(digit < 10) ? '0'+digit : 'A'+(digit-10); integer >>= 4; } while(integer); while(p >= buf) *p-- = '0'; rc=raptor_iostream_write_bytes(iostr, buf, 1, width); RAPTOR_FREE(cstring, buf); return rc; } /** * raptor_iostream_read_bytes: * @iostr: raptor iostream * @ptr: start of buffer to read objects into * @size: size of object * @nmemb: number of objects to read * * Read bytes to the iostream. * * Return value: number of objects read, 0 or less than nmemb on EOF, <0 on failure **/ int raptor_iostream_read_bytes(raptor_iostream *iostr, void *ptr, size_t size, size_t nmemb) { int count; if(!(iostr->mode & RAPTOR_IOSTREAM_MODE_READ)) return -1; if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) return 0; if(!iostr->handler->read_bytes) count= -1; else count=iostr->handler->read_bytes(iostr->user_data, ptr, size, nmemb); if(count > 0) iostr->offset += (size*count); if(count < (int)nmemb) iostr->flags |= RAPTOR_IOSTREAM_FLAGS_EOF; return count; } /** * raptor_iostream_read_eof: * @iostr: raptor read iostream * * Check if an read iostream has ended * * Return value: non-0 if EOF (or not a read iostream) **/ int raptor_iostream_read_eof(raptor_iostream *iostr) { /* Streams without read are always EOF */ if(!(iostr->mode & RAPTOR_IOSTREAM_MODE_READ)) return 1; if(!(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) && iostr->handler->read_eof && iostr->handler->read_eof(iostr->user_data)) iostr->flags |= RAPTOR_IOSTREAM_FLAGS_EOF; return ((iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) != 0); } struct raptor_read_string_iostream_context { /* input buffer */ void* string; size_t length; /* pointer into buffer */ size_t offset; }; /* Local handlers for reading from a string */ static void raptor_read_string_iostream_finish(void *user_data) { struct raptor_read_string_iostream_context* con; con=(struct raptor_read_string_iostream_context*)user_data; RAPTOR_FREE(raptor_read_string_iostream_context, con); return; } static int raptor_read_string_iostream_read_bytes(void *user_data, void *ptr, size_t size, size_t nmemb) { struct raptor_read_string_iostream_context* con; size_t avail; size_t blen; if(!ptr || size <= 0 || !nmemb) return -1; con=(struct raptor_read_string_iostream_context*)user_data; if(con->offset >= con->length) return 0; avail=(int)((con->length-con->offset) / size); if(avail < nmemb) avail=nmemb; blen=(avail * size); memcpy(ptr, (char*)con->string + con->offset, blen); con->offset+= blen; return avail; } static int raptor_read_string_iostream_read_eof(void *user_data) { struct raptor_read_string_iostream_context* con; con=(struct raptor_read_string_iostream_context*)user_data; return (con->offset >= con->length); } static const raptor_iostream_handler2 raptor_iostream_read_string_handler={ /* .version = */ 2, /* .init = */ NULL, /* .finish = */ raptor_read_string_iostream_finish, /* .write_byte = */ NULL, /* .write_bytes = */ NULL, /* .write_end = */ NULL, /* .read_bytes = */ raptor_read_string_iostream_read_bytes, /* .read_eof = */ raptor_read_string_iostream_read_eof }; /** * raptor_new_iostream_from_string: * @string: pointer to string * @length: length of string * * Constructor - create a new iostream reading from a string. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_string(void *string, size_t length) { raptor_iostream* iostr; struct raptor_read_string_iostream_context* con; const raptor_iostream_handler2* handler2=&raptor_iostream_read_string_handler; const unsigned int mode=RAPTOR_IOSTREAM_MODE_READ; if(!string) return NULL; if(!raptor_iostream_check_handler(handler2, mode)) return NULL; iostr=(raptor_iostream*)RAPTOR_CALLOC(raptor_iostream, 1, sizeof(raptor_iostream)); if(!iostr) return NULL; con=(struct raptor_read_string_iostream_context*)RAPTOR_CALLOC(raptor_read_string_iostream_context, 1, sizeof(struct raptor_read_string_iostream_context)); if(!con) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } con->string=string; con->length=length; iostr->handler=handler2; iostr->user_data=(void*)con; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { raptor_free_iostream(iostr); return NULL; } return iostr; } /** * raptor_iostream_tell: * @iostr: raptor iostream * * Get the offset in the iostream. * * Return value: offset in iostream **/ unsigned long raptor_iostream_tell(raptor_iostream *iostr) { return iostr->offset; } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); static const char *program; #define READ_BUFFER_SIZE 256 static int test_write_to_filename(const char* filename, const char* test_string, size_t test_string_len, const unsigned int expected_bytes_count) { raptor_iostream *iostr=NULL; unsigned long count; int rc=0; const char* const label="write iostream to filename"; #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Testing %s '%s'\n", program, label, filename); #endif iostr=raptor_new_iostream_to_filename(filename); if(!iostr) { fprintf(stderr, "%s: Failed to create %s '%s'\n", program, label, filename); rc=1; goto tidy; } raptor_iostream_write_bytes(iostr, test_string, 1, test_string_len); raptor_iostream_write_byte(iostr, '\n'); count=raptor_iostream_tell(iostr); if(count != expected_bytes_count) { fprintf(stderr, "%s: %s wrote %d bytes, expected %d\n", program, label, (int)count, expected_bytes_count); rc=1; goto tidy; } tidy: if(iostr) raptor_free_iostream(iostr); remove(filename); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_write_to_file_handle(FILE* handle, const char* test_string, size_t test_string_len, const unsigned int expected_bytes_count) { raptor_iostream *iostr=NULL; unsigned long count; int rc=0; const char* const label="write iostream to file handle"; #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr=raptor_new_iostream_to_file_handle(handle); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc=1; goto tidy; } raptor_iostream_write_bytes(iostr, test_string, 1, test_string_len); raptor_iostream_write_byte(iostr, '\n'); count=raptor_iostream_tell(iostr); if(count != expected_bytes_count) { fprintf(stderr, "%s: %s wrote %d bytes, expected %d\n", program, label, (int)count, expected_bytes_count); rc=1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_write_to_string(const char* test_string, size_t test_string_len, const unsigned int expected_bytes_count) { raptor_iostream *iostr=NULL; unsigned long count; int rc=0; void *string=NULL; size_t string_len; const char* const label="write iostream to a string"; #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr=raptor_new_iostream_to_string(&string, &string_len, NULL); if(!iostr) { fprintf(stderr, "%s: Failed to create write iostream to string\n", program); rc=1; goto tidy; } raptor_iostream_write_bytes(iostr, test_string, 1, test_string_len); raptor_iostream_write_byte(iostr, '\n'); count=raptor_iostream_tell(iostr); if(count != expected_bytes_count) { fprintf(stderr, "%s: %s wrote %d bytes, expected %d\n", program, label, (int)count, expected_bytes_count); rc=1; } raptor_free_iostream(iostr); iostr=NULL; if(!string) { fprintf(stderr, "%s: %s failed to create a string\n", program, label); return 1; } if(string_len != count) { fprintf(stderr, "%s: %s created a string length %d, expected %d\n", program, label, (int)string_len, (int)count); return 1; } tidy: if(string) raptor_free_memory(string); if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_write_to_sink(const char* test_string, size_t test_string_len, const unsigned int expected_bytes_count) { raptor_iostream *iostr=NULL; unsigned long count; int rc=0; const char* const label="write iostream to sink"; #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr=raptor_new_iostream_to_sink(); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc=1; goto tidy; } raptor_iostream_write_bytes(iostr, test_string, 1, test_string_len); raptor_iostream_write_byte(iostr, '\n'); count=raptor_iostream_tell(iostr); if(count != expected_bytes_count) { fprintf(stderr, "%s: %s wrote %d bytes, expected %d\n", program, label, (int)count, expected_bytes_count); rc=1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_read_from_filename(const char* filename, const char* test_string, size_t test_string_len, const unsigned int expected_len, const unsigned int expected_len2) { raptor_iostream *iostr=NULL; char buffer[READ_BUFFER_SIZE]; unsigned long count; int rc=0; const char* const label="read iostream from filename"; #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Testing %s '%s'\n", program, label, filename); #endif iostr=raptor_new_iostream_from_filename(filename); if(!iostr) { fprintf(stderr, "%s: Failed to create %s '%s'\n", program, label, filename); rc=1; goto tidy; } count=raptor_iostream_read_bytes(iostr, buffer, 1, test_string_len); if(count != expected_len) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len); rc=1; goto tidy; } count=raptor_iostream_read_bytes(iostr, buffer, 1, test_string_len); if(count != expected_len2) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len2); rc=1; goto tidy; } if(!raptor_iostream_read_eof(iostr)) { fprintf(stderr, "%s: %s not EOF as expected\n", program, label); rc=1; goto tidy; } if(strncmp(buffer, test_string, test_string_len)) { fprintf(stderr, "%s: %s returned '%s' expected '%s'\n", program, label, buffer, test_string); rc=1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_read_from_file_handle(FILE* handle, const char* test_string, size_t test_string_len, const unsigned int expected_len, const unsigned int expected_len2) { raptor_iostream *iostr=NULL; char buffer[READ_BUFFER_SIZE]; unsigned long count; int rc=0; const char* const label="read iostream from file handle"; #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr=raptor_new_iostream_from_file_handle(handle); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc=1; goto tidy; } count=raptor_iostream_read_bytes(iostr, buffer, 1, test_string_len); if(count != expected_len) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len); rc=1; } count=raptor_iostream_read_bytes(iostr, buffer, 1, test_string_len); if(count != expected_len2) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len2); rc=1; goto tidy; } if(!raptor_iostream_read_eof(iostr)) { fprintf(stderr, "%s: %s not EOF as expected\n", program, label); rc=1; } if(strncmp(buffer, test_string, test_string_len)) { fprintf(stderr, "%s: %s returned '%s' expected '%s'\n", program, label, buffer, test_string); rc=1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_read_from_string(const char* test_string, size_t test_string_len, const unsigned int expected_len) { raptor_iostream *iostr=NULL; char buffer[READ_BUFFER_SIZE]; unsigned long count; int rc=0; const char* const label="read iostream from a string"; #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr=raptor_new_iostream_from_string((void*)test_string, test_string_len); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc=1; goto tidy; } count=raptor_iostream_read_bytes(iostr, buffer, 1, test_string_len); if(count != expected_len) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len); rc=1; } if(!raptor_iostream_read_eof(iostr)) { fprintf(stderr, "%s: %s not EOF as expected\n", program, label); rc=1; } if(strncmp(buffer, test_string, test_string_len)) { fprintf(stderr, "%s: %s returned '%s' expected '%s'\n", program, label, buffer, test_string); rc=1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_read_from_sink(size_t read_len, size_t expected_len) { raptor_iostream *iostr=NULL; char buffer[READ_BUFFER_SIZE]; unsigned long count; int rc=0; const char* const label="read iostream from sink"; #ifdef RAPTOR_DEBUG fprintf(stderr, "%s: Testing %s\n", program, label); #endif expected_len=0; iostr=raptor_new_iostream_from_sink(); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc=1; goto tidy; } count=raptor_iostream_read_bytes(iostr, buffer, 1, read_len); if(count != expected_len) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len); rc=1; } if(!raptor_iostream_read_eof(iostr)) { fprintf(stderr, "%s: %s not EOF as expected\n", program, label); rc=1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } #define OUT_FILENAME "out.bin" #define OUT_BYTES_COUNT 14 #define TEST_STRING "Hello, world!" #define TEST_STRING_LEN 13 #define IN_FILENAME "in.bin" int main(int argc, char *argv[]) { FILE *handle=NULL; int failures=0; program=raptor_basename(argv[0]); /* Write tests */ failures+= test_write_to_filename((const char*)OUT_FILENAME, TEST_STRING, TEST_STRING_LEN, (int)OUT_BYTES_COUNT); handle=fopen((const char*)OUT_FILENAME, "wb"); if(!handle) { fprintf(stderr, "%s: Failed to create write file handle to file %s\n", program, OUT_FILENAME); failures++; } else { failures+= test_write_to_file_handle(handle, TEST_STRING, TEST_STRING_LEN, (int)OUT_BYTES_COUNT); fclose(handle); remove(OUT_FILENAME); } failures+= test_write_to_string(TEST_STRING, TEST_STRING_LEN, (int)OUT_BYTES_COUNT); failures+= test_write_to_sink(TEST_STRING, TEST_STRING_LEN, (int)OUT_BYTES_COUNT); remove(OUT_FILENAME); /* Read tests */ handle=fopen((const char*)IN_FILENAME, "wb"); if(!handle) { fprintf(stderr, "%s: Failed to create write handle to file %s\n", program, IN_FILENAME); failures++; } else { fwrite(TEST_STRING, 1, TEST_STRING_LEN, handle); fclose(handle); failures+= test_read_from_filename((const char*)IN_FILENAME, TEST_STRING, TEST_STRING_LEN, TEST_STRING_LEN, 0); handle=fopen((const char*)IN_FILENAME, "rb"); if(!handle) { fprintf(stderr, "%s: Failed to create read file handle to file %s\n", program, IN_FILENAME); failures++; } else { failures+= test_read_from_file_handle(handle, TEST_STRING, TEST_STRING_LEN, TEST_STRING_LEN, 0); fclose(handle); handle=NULL; } } failures+= test_read_from_string(TEST_STRING, TEST_STRING_LEN, TEST_STRING_LEN); failures+= test_read_from_sink(TEST_STRING_LEN, 0); remove(IN_FILENAME); return failures; } #endif ������������������������������������������������������raptor-1.4.21/src/raptor-config.1�������������������������������������������������������������������0000644�0001750�0001750�00000004310�10774615317�013463� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" Hey, EMACS: -*- nroff -*- .\" .\" raptor-config.1 - Raptor compiling utility manual page .\" .\" Copyright (C) 2003-2008 David Beckett - http://www.dajobe.org/ .\" Copyright (C) 2003-2005 University of Bristol - http://www.bristol.ac.uk/ .\" .TH raptor-config 1 "2008-04-01" .\" Please adjust this date whenever revising the manpage. .SH NAME raptor-config \- script to get information about the installed version of Raptor .SH SYNOPSIS .B raptor-config [\-\-cflags] [\-\-options] [\-\-help] [\-\-libs] [\-\-libtool\-libs] [\-\-private\-libs] [\-\-prefix\fI[=DIR]\fP] [\-\-version\-decimal] [\-\-version] .SH DESCRIPTION \fIraptor-config\fP is a tool that is used to determine the compile and linker flags that should be used to compile and link programs that use the Raptor RDF parser library. .SH OPTIONS \fIraptor-config\fP accepts the following options: .TP 8 .B \-\-cflags Print the compiler flags that are necessary to compile a raptor program. .TP 8 .B \-\-options Print raptor compiled options such as parsers and serializers available, the XML parser used (if any) and the WWW retrieval library used (if any). .TP 8 .B \-\-help Print a help message summarising usage. .TP 8 .B \-\-libs Print the linker flags that are necessary to link a raptor program. This excludes linker arguments used to build the raptor shared library. .TP 8 .B \-\-libtool\-libs Print the path to the libtool file for raptor. .TP 8 .B \-\-private\-libs Print the linker flags that are necessary to build the raptor shared library. This option is not usually needed because the raptor shared library has already been dynamically linked against these flags. .TP 8 .B \-\-prefix=PREFIX If specified, use PREFIX instead of the installation prefix that raptor was built with when computing the output for the \-\-cflags and \-\-libs options. This option must be specified before any \-\-libs or \-\-cflags options. .TP 8 .B \-\-version Print the currently installed version of raptor on the standard output. .TP 8 .B \-\-version\-decimal Print the currently installed version of raptor as a decimal integer. .SH SEE ALSO .BR libraptor(3) .SH AUTHOR Dave Beckett - .UR http://www.dajobe.org/ http://www.dajobe.org/ .UE ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_serialize_turtle.c���������������������������������������������������������0000644�0001750�0001750�00000124567�11330732216�015754� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_turtle.c - Turtle serializer * * Copyright (C) 2006,2008 Dave Robillard * Copyright (C) 2004-2010 David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005 University of Bristol, UK http://www.bristol.ac.uk/ * Copyright (C) 2005 Steve Shepard steveshep@gmail.com * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #define MAX_ASCII_INT_SIZE 13 /* * Raptor turtle serializer object */ typedef struct { raptor_namespace_stack *nstack; /* Namespace stack */ raptor_namespace *rdf_nspace; /* the rdf: namespace */ raptor_turtle_writer *turtle_writer; /* where the xml is being written */ raptor_sequence *namespaces; /* User declared namespaces */ raptor_avltree *subjects; /* subject items */ raptor_avltree *blanks; /* blank subject items */ raptor_avltree *nodes; /* nodes */ raptor_abbrev_node *rdf_type; /* rdf:type uri */ /* URI of rdf:XMLLiteral */ raptor_uri* rdf_xml_literal_uri; /* URI of rdf:first */ raptor_uri* rdf_first_uri; /* URI of rdf:rest */ raptor_uri* rdf_rest_uri; /* URI of rdf:nil */ raptor_uri* rdf_nil_uri; /* non zero if header is finished being written * (and thus no new namespaces can be declared). */ int written_header; /* for labeling namespaces */ int namespace_count; } raptor_turtle_context; /* prototypes for functions */ static int raptor_turtle_emit_resource(raptor_serializer *serializer, raptor_abbrev_node* node, int depth); static int raptor_turtle_emit_literal(raptor_serializer *serializer, raptor_abbrev_node* node, int depth); static int raptor_turtle_emit_xml_literal(raptor_serializer *serializer, raptor_abbrev_node* node, int depth); static int raptor_turtle_emit_blank(raptor_serializer *serializer, raptor_abbrev_node* node, int depth); static int raptor_turtle_emit_subject_list_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth); static int raptor_turtle_emit_subject_collection_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth); static int raptor_turtle_emit_subject_properties(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth); static int raptor_turtle_emit_subject(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth); static int raptor_turtle_emit(raptor_serializer *serializer); static int raptor_turtle_serialize_init(raptor_serializer* serializer, const char *name); static void raptor_turtle_serialize_terminate(raptor_serializer* serializer); static int raptor_turtle_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix); static int raptor_turtle_serialize_start(raptor_serializer* serializer); static int raptor_turtle_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement); static int raptor_turtle_serialize_end(raptor_serializer* serializer); static void raptor_turtle_serialize_finish_factory(raptor_serializer_factory* factory); static int raptor_turtle_is_legal_turtle_qname(raptor_qname* qname) { const char* prefix_name; const char* local_name; if(!qname) return 0; prefix_name = qname->nspace ? (const char*)qname->nspace->prefix : NULL; if(prefix_name) { /* prefixName: must have leading [A-Z][a-z][0-9] (nameStartChar - '_') */ /* prefixName: no . anywhere */ if(!(isalpha(*prefix_name) || isdigit(*prefix_name)) || strchr(prefix_name, '.')) return 0; } local_name = (const char*)qname->local_name; if(local_name) { /* nameStartChar: must have leading [A-Z][a-z][0-9]_ */ /* nameChar: no . anywhere */ if(!(isalpha(*local_name) || isdigit(*local_name) || *local_name == '_') || strchr(local_name, '.')) return 0; } return 1; } /* * raptor_turtle_emit_resource: * @serializer: #raptor_serializer object * @node: resource node * @depth: depth into tree * * Emit a description of a resource using an XML Element * * Return value: non-0 on failure **/ static int raptor_turtle_emit_resource(raptor_serializer *serializer, raptor_abbrev_node* node, int depth) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_turtle_writer *turtle_writer = context->turtle_writer; raptor_qname* qname = NULL; RAPTOR_DEBUG5("Emitting resource node %p refcount %d subject %d object %d\n", node, node->ref_count, node->count_as_subject, node->count_as_object); if(node->type != RAPTOR_IDENTIFIER_TYPE_RESOURCE) return 1; qname = raptor_namespaces_qname_from_uri(context->nstack, node->value.resource.uri, 10); /* XML Names allow leading '_' and '.' anywhere but Turtle does not */ if(qname && !raptor_turtle_is_legal_turtle_qname(qname)) { raptor_free_qname(qname); qname = NULL; } if(qname) { raptor_turtle_writer_qname(turtle_writer, qname); raptor_free_qname(qname); } else { raptor_turtle_writer_reference(turtle_writer, node->value.resource.uri); } RAPTOR_DEBUG2("Emitted %p\n", node); return 0; } /* * raptor_turtle_emit_literal: * @serializer: #raptor_serializer object * @node: literal node * @depth: depth into tree * * Emit a description of a literal (object). * * Return value: non-0 on failure **/ static int raptor_turtle_emit_literal(raptor_serializer *serializer, raptor_abbrev_node* node, int depth) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_turtle_writer *turtle_writer = context->turtle_writer; int rc=0; RAPTOR_DEBUG5("Emitting literal node %p refcount %d subject %d object %d\n", node, node->ref_count, node->count_as_subject, node->count_as_object); if(node->type != RAPTOR_IDENTIFIER_TYPE_LITERAL) return 1; rc=raptor_turtle_writer_literal(turtle_writer, context->nstack, node->value.literal.string, node->value.literal.language, node->value.literal.datatype); RAPTOR_DEBUG2("Emitted %p\n", node); return rc; } /* * raptor_turtle_emit_xml_literal: * @serializer: #raptor_serializer object * @node: XML literal node * @depth: depth into tree * * Emit a description of a literal using an XML Element * * Return value: non-0 on failure **/ static int raptor_turtle_emit_xml_literal(raptor_serializer *serializer, raptor_abbrev_node* node, int depth) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_turtle_writer *turtle_writer = context->turtle_writer; raptor_uri* type_uri; int rc=0; RAPTOR_DEBUG5("Emitting XML literal node %p refcount %d subject %d object %d\n", node, node->ref_count, node->count_as_subject, node->count_as_object); if(node->type != RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) return 1; type_uri = raptor_new_uri_v2(serializer->world, (const unsigned char*) "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); rc=raptor_turtle_writer_literal(turtle_writer, context->nstack, node->value.literal.string, NULL, type_uri); raptor_free_uri_v2(serializer->world, type_uri); return rc; } /* * raptor_turtle_emit_blank: * @serializer: #raptor_serializer object * @node: blank node * @depth: depth into tree * * Emit a description of a blank node * * Return value: non-0 on failure **/ static int raptor_turtle_emit_blank(raptor_serializer *serializer, raptor_abbrev_node* node, int depth) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; int rc=0; RAPTOR_DEBUG5("Emitting blank node %p refcount %d subject %d object %d\n", node, node->ref_count, node->count_as_subject, node->count_as_object); if(node->type != RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) return 1; if((node->count_as_subject == 1 && node->count_as_object == 1)) { /* If this is only used as a 1 subject and object or never * used as a subject or never used as an object, it never need * be referenced with an explicit name */ raptor_abbrev_subject* blank; blank = raptor_abbrev_subject_find(context->blanks, node->type, node->value.blank.string); if(blank) { rc = raptor_turtle_emit_subject(serializer, blank, depth+1); raptor_abbrev_subject_invalidate(blank); } } else { /* Blank node that needs an explicit name */ const unsigned char *node_id = node->value.blank.string; raptor_turtle_writer_raw(context->turtle_writer, (const unsigned char*)"_:"); raptor_turtle_writer_raw(context->turtle_writer, node_id); } RAPTOR_DEBUG2("Emitted %p\n", node); return rc; } /* * raptor_turtle_emit_subject_list_items: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit an rdf list of items (rdf:li) about a subject node. * * Return value: non-0 on failure **/ static int raptor_turtle_emit_subject_list_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { int rv = 0; int i=0; RAPTOR_DEBUG5("Emitting subject list items for node %p refcount %d subject %d object %d\n", subject->node, subject->node->ref_count, subject->node->count_as_subject, subject->node->count_as_object); while(!rv && i < raptor_sequence_size(subject->list_items)) { raptor_abbrev_node* object; object = (raptor_abbrev_node*)raptor_sequence_get_at(subject->list_items, i++); if(!object) continue; switch(object->type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: rv = raptor_turtle_emit_resource(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: rv = raptor_turtle_emit_literal(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: rv = raptor_turtle_emit_xml_literal(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: rv = raptor_turtle_emit_blank(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: /* ordinals should never appear as an object with current parsers */ case RAPTOR_IDENTIFIER_TYPE_PREDICATE: /* predicates should never appear as an object */ case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL1("Unsupported identifier type\n"); break; } } return rv; } /* * raptor_turtle_emit_subject_collection_items: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit an abbreviated rdf collection of items (rdf:first, rdf:rest) about a subject node. * * Return value: non-0 on failure **/ static int raptor_turtle_emit_subject_collection_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; int rv = 0; raptor_avltree_iterator* iter=NULL; int i; int is_new_subject = 0; RAPTOR_DEBUG5("Emitting subject collection items for node %p refcount %d subject %d object %d\n", subject->node, subject->node->ref_count, subject->node->count_as_subject, subject->node->count_as_object); /* if just saw a new subject (is_new_subject is true) then there is no need * to advance the iterator - it was just reset */ for(i=0, (iter=raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1)); iter && !rv; i++, (rv = is_new_subject ? 0 : raptor_avltree_iterator_next(iter))) { raptor_abbrev_node** nodes; raptor_abbrev_node* predicate; raptor_abbrev_node* object; is_new_subject = 0; nodes=(raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; predicate= nodes[0]; object= nodes[1]; if(!raptor_uri_equals_v2(serializer->world, predicate->value.resource.uri, context->rdf_first_uri)) { raptor_serializer_error(serializer, "Malformed collection - first predicate is not rdf:first"); return 1; } if(!object) continue; if(i > 0) raptor_turtle_writer_newline(context->turtle_writer); switch(object->type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: rv = raptor_turtle_emit_resource(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: rv = raptor_turtle_emit_literal(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: rv = raptor_turtle_emit_xml_literal(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: rv = raptor_turtle_emit_blank(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: /* ordinals should never appear as an object with current parsers */ case RAPTOR_IDENTIFIER_TYPE_PREDICATE: /* predicates should never appear as an object */ case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL1("Unsupported identifier type\n"); break; } /* last item */ rv=raptor_avltree_iterator_next(iter); if(rv) break; nodes=(raptor_abbrev_node**)raptor_avltree_iterator_get(iter); predicate = nodes[0]; object = nodes[1]; if(!raptor_uri_equals_v2(serializer->world, predicate->value.resource.uri, context->rdf_rest_uri)) { raptor_serializer_error(serializer, "Malformed collection - second predicate is not rdf:rest"); return 1; } if(object->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { subject = raptor_abbrev_subject_find(context->blanks, object->type, object->value.blank.string); if(!subject) { raptor_serializer_error(serializer, "Malformed collection - could not find subject for rdf:rest"); return 1; } /* got a <(old)subject> rdf:rest <(new)subject> triple so know * subject has changed and should reset the properties iterator */ if(iter) raptor_free_avltree_iterator(iter); iter = raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1); is_new_subject = 1; } else { if(object->type != RAPTOR_IDENTIFIER_TYPE_RESOURCE || !raptor_uri_equals_v2(serializer->world, object->value.resource.uri, context->rdf_nil_uri)) { raptor_serializer_error(serializer, "Malformed collection - last rdf:rest resource is not rdf:nil"); return 1; } break; } } if(iter) raptor_free_avltree_iterator(iter); return rv; } /* * raptor_turtle_emit_subject_properties: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit the properties about a subject node. * * Return value: non-0 on failure **/ static int raptor_turtle_emit_subject_properties(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_turtle_writer *turtle_writer = context->turtle_writer; raptor_abbrev_node* last_predicate=NULL; int rv = 0; raptor_avltree_iterator* iter=NULL; int i; RAPTOR_DEBUG5("Emitting subject properties for node %p refcount %d subject %d object %d\n", subject->node, subject->node->ref_count, subject->node->count_as_subject, subject->node->count_as_object); /* Emit any rdf:_n properties collected */ if(raptor_sequence_size(subject->list_items) > 0) rv = raptor_turtle_emit_subject_list_items(serializer, subject, depth+1); for(i=0, (iter=raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1)); iter && !rv; i++, (rv=raptor_avltree_iterator_next(iter))) { raptor_abbrev_node** nodes; raptor_abbrev_node* predicate; raptor_abbrev_node* object; raptor_qname *qname; nodes=(raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; predicate= nodes[0]; object= nodes[1]; if(!(last_predicate && raptor_abbrev_node_equals(predicate, last_predicate))) { /* no object list abbreviation possible, terminate last object */ if(last_predicate) { raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)" ;"); raptor_turtle_writer_newline(turtle_writer); } if(predicate->type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { /* we should only get here in rare cases -- usually when there * are multiple ordinals with the same value. */ unsigned char uri_string[MAX_ASCII_INT_SIZE + 2]; sprintf((char*)uri_string, "_%d", predicate->value.ordinal.ordinal); qname = raptor_new_qname_from_namespace_local_name_v2(serializer->world, context->rdf_nspace, uri_string, NULL); } else { qname = raptor_namespaces_qname_from_uri(context->nstack, predicate->value.resource.uri, 10); } if(raptor_abbrev_node_equals(predicate, context->rdf_type)) raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)"a"); else if(qname) raptor_turtle_writer_qname(turtle_writer, qname); else raptor_turtle_writer_reference(turtle_writer, predicate->value.resource.uri); raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)" "); if(qname) raptor_free_qname(qname); } else raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)", "); switch(object->type) { case RAPTOR_IDENTIFIER_TYPE_RESOURCE: rv = raptor_turtle_emit_resource(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_LITERAL: rv = raptor_turtle_emit_literal(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: rv = raptor_turtle_emit_blank(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: rv = raptor_turtle_emit_xml_literal(serializer, object, depth+1); break; case RAPTOR_IDENTIFIER_TYPE_ORDINAL: /* ordinals should never appear as an object with current parsers */ case RAPTOR_IDENTIFIER_TYPE_PREDICATE: /* predicates should never appear as an object */ case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: default: RAPTOR_FATAL1("Unsupported identifier type\n"); break; } last_predicate = predicate; } if (iter) raptor_free_avltree_iterator(iter); return rv; } /* * raptor_turtle_emit_subject: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit a subject node * * Return value: non-0 on failure **/ static int raptor_turtle_emit_subject(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_turtle_writer* turtle_writer=context->turtle_writer; int blank = 1; int collection = 0; int rc = 0; if (!raptor_abbrev_subject_valid(subject)) return 0; RAPTOR_DEBUG5("Emitting subject node %p refcount %d subject %d object %d\n", subject->node, subject->node->ref_count, subject->node->count_as_subject, subject->node->count_as_object); if(!depth && subject->node->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS && subject->node->count_as_subject == 1 && subject->node->count_as_object == 1) { RAPTOR_DEBUG2("Skipping subject node %p\n", subject->node); return 0; } if(raptor_avltree_size(subject->properties) == 0) { RAPTOR_DEBUG2("Skipping subject node %p\n", subject->node); return 0; } /* check if we can do collection abbreviation */ if(raptor_avltree_size(subject->properties) >= 2) { raptor_avltree_iterator* iter=NULL; raptor_abbrev_node* pred1; raptor_abbrev_node* pred2; iter=raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1); if(!iter) return 1; pred1=((raptor_abbrev_node**)raptor_avltree_iterator_get(iter))[0]; raptor_avltree_iterator_next(iter); pred2=((raptor_abbrev_node**)raptor_avltree_iterator_get(iter))[0]; raptor_free_avltree_iterator(iter); if(pred1->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE && pred2->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE && ( (raptor_uri_equals_v2(serializer->world, pred1->value.resource.uri, context->rdf_first_uri) && raptor_uri_equals_v2(serializer->world, pred2->value.resource.uri, context->rdf_rest_uri)) || (raptor_uri_equals_v2(serializer->world, pred2->value.resource.uri, context->rdf_first_uri) && raptor_uri_equals_v2(serializer->world, pred1->value.resource.uri, context->rdf_rest_uri)) ) ) { collection = 1; } } /* emit the subject node */ if(subject->node->type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { rc= raptor_turtle_emit_resource(serializer, subject->node, depth+1); if(rc) return rc; blank = 0; } else if(subject->node->type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { if((subject->node->count_as_subject == 1 && subject->node->count_as_object == 0) && depth > 1) { blank = 1; } else if(subject->node->count_as_object == 0) { raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)"[]"); blank = 0; } else if(!collection && subject->node->count_as_object > 1) { /* Referred to (used as an object), so needs a nodeID */ const unsigned char* genid = subject->node->value.blank.string; size_t len = strlen((const char*)genid); unsigned char* subject_str; subject_str= (unsigned char *)RAPTOR_MALLOC(cstring, len+3); if(!subject_str) return 1; subject_str[0]='_'; subject_str[1]=':'; strncpy((char*)&subject_str[2], (const char*)genid, len+1); raptor_turtle_writer_raw(turtle_writer, subject_str); RAPTOR_FREE(cstring, subject_str); } } else if(subject->node->type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { unsigned char* subject_str; subject_str = (unsigned char *)RAPTOR_MALLOC(string, raptor_rdf_namespace_uri_len + MAX_ASCII_INT_SIZE + 2); if(!subject_str) return 1; sprintf((char*)subject, "%s_%d", raptor_rdf_namespace_uri, subject->node->value.ordinal.ordinal); raptor_turtle_writer_raw(turtle_writer, subject_str); RAPTOR_FREE(cstring, subject_str); return blank = 0; } if(collection) { raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)"("); raptor_turtle_writer_increase_indent(turtle_writer); rc=raptor_turtle_emit_subject_collection_items(serializer, subject, depth+1); raptor_turtle_writer_decrease_indent(turtle_writer); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)")"); } else { if(blank && depth > 1) raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)"["); raptor_turtle_writer_increase_indent(turtle_writer); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_emit_subject_properties(serializer, subject, depth+1); raptor_turtle_writer_decrease_indent(turtle_writer); if(blank && depth > 1) { raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)"]"); } } if(depth == 0) { /* NOTE: the space before the . here MUST be there or statements * that end in a numeric literal will be interpreted incorrectly * (the "." will be parsed as part of the literal and statement * left unterminated) */ raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)" ."); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_newline(turtle_writer); } return rc; } /* * raptor_turtle_emit: * @serializer: #raptor_serializer object * * Emit Turtle for all stored triples. * * Return value: non-0 on failure **/ static int raptor_turtle_emit(raptor_serializer *serializer) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_abbrev_subject* subject; raptor_abbrev_subject* blank; int rc; raptor_avltree_iterator* iter=NULL; iter = raptor_new_avltree_iterator(context->subjects, NULL, NULL, 1); while (iter) { subject = (raptor_abbrev_subject *)raptor_avltree_iterator_get(iter); if (subject) { rc = raptor_turtle_emit_subject(serializer, subject, 0); if (rc) { raptor_free_avltree_iterator(iter); return rc; } } if (raptor_avltree_iterator_next(iter)) break; } if (iter) raptor_free_avltree_iterator(iter); /* Emit any remaining blank nodes. */ iter = raptor_new_avltree_iterator(context->blanks, NULL, NULL, 1); while (iter) { blank = (raptor_abbrev_subject *)raptor_avltree_iterator_get(iter); if (blank) { rc = raptor_turtle_emit_subject(serializer, blank, 0); if (rc) { raptor_free_avltree_iterator(iter); return rc; } } if (raptor_avltree_iterator_next(iter)) break; } if (iter) raptor_free_avltree_iterator(iter); return 0; } /* * raptor serializer Turtle implementation */ /* create a new serializer */ static int raptor_turtle_serialize_init(raptor_serializer* serializer, const char *name) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_uri *rdf_type_uri; context->nstack=raptor_new_namespaces_v2(serializer->world, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer, 1); if(!context->nstack) return 1; context->rdf_nspace=raptor_new_namespace(context->nstack, (const unsigned char*)"rdf", (const unsigned char*)raptor_rdf_namespace_uri, 0); context->namespaces=raptor_new_sequence(NULL, NULL); context->subjects = raptor_new_avltree(serializer->world, (raptor_data_compare_function)raptor_abbrev_subject_cmp, (raptor_data_free_function)raptor_free_abbrev_subject, 0); context->blanks = raptor_new_avltree(serializer->world, (raptor_data_compare_function)raptor_abbrev_subject_cmp, (raptor_data_free_function)raptor_free_abbrev_subject, 0); context->nodes = raptor_new_avltree(serializer->world, (raptor_data_compare_function)raptor_abbrev_node_cmp, (raptor_data_free_function)raptor_free_abbrev_node, 0); rdf_type_uri = raptor_new_uri_for_rdf_concept_v2(serializer->world, "type"); if(rdf_type_uri) { context->rdf_type = raptor_new_abbrev_node(serializer->world, RAPTOR_IDENTIFIER_TYPE_RESOURCE, rdf_type_uri, NULL, NULL); raptor_free_uri_v2(serializer->world, rdf_type_uri); } else context->rdf_type = NULL; context->rdf_xml_literal_uri=raptor_new_uri_v2(serializer->world, raptor_xml_literal_datatype_uri_string); context->rdf_first_uri=raptor_new_uri_v2(serializer->world, (const unsigned char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#first"); context->rdf_rest_uri=raptor_new_uri_v2(serializer->world, (const unsigned char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"); context->rdf_nil_uri=raptor_new_uri_v2(serializer->world, (const unsigned char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"); if(!context->rdf_nspace || !context->namespaces || !context->subjects || !context->blanks || !context->nodes || !context->rdf_xml_literal_uri || !context->rdf_first_uri || !context->rdf_rest_uri || !context->rdf_nil_uri || !context->rdf_type) { raptor_turtle_serialize_terminate(serializer); return 1; } /* Note: item 0 in the list is rdf:RDF's namespace */ if(raptor_sequence_push(context->namespaces, context->rdf_nspace)) { raptor_turtle_serialize_terminate(serializer); return 1; } return 0; } /* destroy a serializer */ static void raptor_turtle_serialize_terminate(raptor_serializer* serializer) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; if(context->turtle_writer) { raptor_free_turtle_writer(context->turtle_writer); context->turtle_writer=NULL; } if(context->rdf_nspace) { raptor_free_namespace(context->rdf_nspace); context->rdf_nspace=NULL; } if(context->namespaces) { int i; /* Note: item 0 in the list is rdf:RDF's namespace and freed above */ for(i=1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns =(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); if(ns) raptor_free_namespace(ns); } raptor_free_sequence(context->namespaces); context->namespaces=NULL; } if(context->subjects) { raptor_free_avltree(context->subjects); context->subjects=NULL; } if(context->blanks) { raptor_free_avltree(context->blanks); context->blanks=NULL; } if(context->nodes) { raptor_free_avltree(context->nodes); context->nodes=NULL; } if(context->nstack) { raptor_free_namespaces(context->nstack); context->nstack=NULL; } if(context->rdf_type) { raptor_free_abbrev_node(context->rdf_type); context->rdf_type=NULL; } if(context->rdf_xml_literal_uri) { raptor_free_uri_v2(serializer->world, context->rdf_xml_literal_uri); context->rdf_xml_literal_uri=NULL; } if(context->rdf_first_uri) { raptor_free_uri_v2(serializer->world, context->rdf_first_uri); context->rdf_first_uri=NULL; } if(context->rdf_rest_uri) { raptor_free_uri_v2(serializer->world, context->rdf_rest_uri); context->rdf_rest_uri=NULL; } if(context->rdf_nil_uri) { raptor_free_uri_v2(serializer->world, context->rdf_nil_uri); context->rdf_nil_uri=NULL; } } #define TURTLE_NAMESPACE_DEPTH 0 /* add a namespace */ static int raptor_turtle_serialize_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; int i; if(context->written_header) return 1; for(i=0; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns=(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); /* If prefix is already declared, ignore it */ if(!ns->prefix && !nspace->prefix) return 1; if(ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) return 1; if(ns->uri && nspace->uri && raptor_uri_equals_v2(serializer->world, ns->uri, nspace->uri)) return 1; } nspace=raptor_new_namespace_from_uri(context->nstack, nspace->prefix, nspace->uri, TURTLE_NAMESPACE_DEPTH); if(!nspace) return 1; raptor_sequence_push(context->namespaces, nspace); return 0; } /* add a namespace */ static int raptor_turtle_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_namespace *ns; int rc; ns=raptor_new_namespace_from_uri(context->nstack, prefix, uri, TURTLE_NAMESPACE_DEPTH); rc=raptor_turtle_serialize_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /* start a serialize */ static int raptor_turtle_serialize_start(raptor_serializer* serializer) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_turtle_writer* turtle_writer; if(context->turtle_writer) raptor_free_turtle_writer(context->turtle_writer); turtle_writer=raptor_new_turtle_writer(serializer->world, serializer->base_uri, serializer->feature_write_base_uri, context->nstack, serializer->iostream, (raptor_simple_message_handler)raptor_serializer_simple_error, serializer); if(!turtle_writer) return 1; raptor_turtle_writer_set_feature(turtle_writer, RAPTOR_FEATURE_WRITER_AUTO_INDENT,1); raptor_turtle_writer_set_feature(turtle_writer, RAPTOR_FEATURE_WRITER_INDENT_WIDTH,2); context->turtle_writer=turtle_writer; return 0; } static void raptor_turtle_ensure_writen_header(raptor_serializer* serializer, raptor_turtle_context* context) { int i; if(context->written_header) return; if(!context->turtle_writer) return; for(i=0; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns=(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); raptor_turtle_writer_namespace_prefix(context->turtle_writer, ns); raptor_namespace_copy(context->nstack, ns, 0); } raptor_turtle_writer_raw(context->turtle_writer, (const unsigned char*)"\n"); context->written_header=1; } /* serialize a statement */ static int raptor_turtle_serialize_statement(raptor_serializer* serializer, const raptor_statement *statement) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_abbrev_subject* subject = NULL; raptor_abbrev_node* predicate = NULL; raptor_abbrev_node* object = NULL; int rv; raptor_identifier_type object_type; int subject_created = 0; int predicate_created = 0; int object_created = 0; if(!(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS || statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL)) { raptor_serializer_error(serializer, "Do not know how to serialize node type %d\n", statement->subject_type); return 1; } subject = raptor_abbrev_subject_lookup(context->nodes, context->subjects, context->blanks, statement->subject_type, statement->subject, &subject_created); if(!subject) { return 1; } object_type=statement->object_type; if(object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL) { if(statement->object_literal_datatype && raptor_uri_equals_v2(serializer->world, statement->object_literal_datatype, context->rdf_xml_literal_uri)) object_type = RAPTOR_IDENTIFIER_TYPE_XML_LITERAL; } if(!(object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS || object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL || object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL || object_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL)) { raptor_serializer_error(serializer, "Cannot serialize a triple with object node type %d\n", object_type); return 1; } object = raptor_abbrev_node_lookup(context->nodes, object_type, statement->object, statement->object_literal_datatype, statement->object_literal_language, &object_created); if(!object) return 1; if((statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_PREDICATE) || (statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE)) { predicate = raptor_abbrev_node_lookup(context->nodes, statement->predicate_type, statement->predicate, NULL, NULL, &predicate_created); if(!predicate) return 1; rv = raptor_abbrev_subject_add_property(subject, predicate, object); if(rv < 0) { raptor_serializer_error(serializer, "Unable to add properties to subject %p\n", subject); return rv; } } else if(statement->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { int idx = *(int*)statement->predicate; rv = raptor_abbrev_subject_add_list_element(subject, idx, object); if(rv) { /* An ordinal might already exist at that location, the fallback * is to just put in the properties list */ predicate = raptor_abbrev_node_lookup(context->nodes, statement->predicate_type, statement->predicate, NULL, NULL, &predicate_created); if(!predicate) return 1; rv = raptor_abbrev_subject_add_property(subject, predicate, object); if(rv < 0) { raptor_serializer_error(serializer, "Unable to add properties to subject %p\n", subject); return rv; } } } else { raptor_serializer_error(serializer, "Do not know how to serialize node type %d\n", statement->predicate_type); return 1; } if(object_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE || object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) object->count_as_object++; return 0; } /* end a serialize */ static int raptor_turtle_serialize_end(raptor_serializer* serializer) { raptor_turtle_context* context=(raptor_turtle_context*)serializer->context; raptor_turtle_ensure_writen_header(serializer, context); raptor_turtle_emit(serializer); /* reset serializer for reuse */ context->written_header=0; return 0; } /* finish the serializer factory */ static void raptor_turtle_serialize_finish_factory(raptor_serializer_factory* factory) { /* NOP */ } static int raptor_turtle_serializer_register_factory(raptor_serializer_factory *factory) { factory->context_length = sizeof(raptor_turtle_context); factory->init = raptor_turtle_serialize_init; factory->terminate = raptor_turtle_serialize_terminate; factory->declare_namespace = raptor_turtle_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_turtle_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_turtle_serialize_start; factory->serialize_statement = raptor_turtle_serialize_statement; factory->serialize_end = raptor_turtle_serialize_end; factory->finish_factory = raptor_turtle_serialize_finish_factory; return 0; } int raptor_init_serializer_turtle(raptor_world* world) { return raptor_serializer_register_factory(world, "turtle", "Turtle", "application/x-turtle", NULL, (const unsigned char*)"http://www.dajobe.org/2004/01/turtle", &raptor_turtle_serializer_register_factory); } �����������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_qname.c��������������������������������������������������������������������0000644�0001750�0001750�00000041516�11330672502�013460� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_qname.c - Raptor XML qname class * * Copyright (C) 2002-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* * Namespaces in XML * http://www.w3.org/TR/1999/REC-xml-names-19990114/#defaulting * says: * * -------------------------------------------------------------------- * 5.2 Namespace Defaulting * * A default namespace is considered to apply to the element where it * is declared (if that element has no namespace prefix), and to all * elements with no prefix within the content of that element. * * If the URI reference in a default namespace declaration is empty, * then unprefixed elements in the scope of the declaration are not * considered to be in any namespace. * * Note that default namespaces do not apply directly to attributes. * * [...] * * 5.3 Uniqueness of Attributes * * In XML documents conforming to this specification, no tag may * contain two attributes which: * * 1. have identical names, or * * 2. have qualified names with the same local part and with * prefixes which have been bound to namespace names that are * identical. * -------------------------------------------------------------------- */ /** * raptor_new_qname: * @nstack: namespace stack to look up for namespaces * @name: element or attribute name * @value: attribute value (else is an element) * @error_handler: function to call on an error * @error_data: user data for error function * * Constructor - create a new XML qname. * * Create a new qname from the local element/attribute name, * with optional (attribute) value. The namespace stack is used * to look up the name and find the namespace and generate the * URI of the qname. * * Return value: a new #raptor_qname object or NULL on failure **/ raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsigned char *name, const unsigned char *value, raptor_simple_message_handler error_handler, void *error_data) { raptor_qname* qname; const unsigned char *p; raptor_namespace* ns; unsigned char* new_name; int prefix_length; int local_name_length=0; #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("name %s\n", name); #endif qname=(raptor_qname*)RAPTOR_CALLOC(raptor_qname, 1, sizeof(raptor_qname)); if(!qname) return NULL; qname->world=nstack->world; if(value) { int value_length=strlen((char*)value); unsigned char* new_value=(unsigned char*)RAPTOR_MALLOC(cstring, value_length+1); if(!new_value) { RAPTOR_FREE(raptor_qname, qname); return NULL; } strcpy((char*)new_value, (char*)value); qname->value=new_value; qname->value_length=value_length; } /* Find : */ for(p=name; *p && *p != ':'; p++) ; if(!*p) { local_name_length=p-name; /* No : in the name */ new_name=(unsigned char*)RAPTOR_MALLOC(cstring, local_name_length+1); if(!new_name) { raptor_free_qname(qname); return NULL; } strcpy((char*)new_name, (char*)name); qname->local_name=new_name; qname->local_name_length=local_name_length; /* For elements only, pick up the default namespace if there is one */ if(!value) { ns=raptor_namespaces_get_default_namespace(nstack); if(ns) { qname->nspace=ns; #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Found default namespace %s\n", raptor_uri_as_string_v2(nstack->world, ns->uri)); #endif } else { #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG1("No default namespace defined\n"); #endif } } /* if is_element */ } else { /* There is a namespace prefix */ prefix_length=p-name; p++; /* p now is at start of local_name */ local_name_length=strlen((char*)p); new_name=(unsigned char*)RAPTOR_MALLOC(cstring, local_name_length+1); if(!new_name) { raptor_free_qname(qname); return NULL; } strcpy((char*)new_name, (char*)p); qname->local_name=new_name; qname->local_name_length=local_name_length; /* Find the namespace */ ns=raptor_namespaces_find_namespace(nstack, name, prefix_length); if(!ns) { /* failed to find namespace - now what? */ if(error_handler) error_handler((raptor_parser*)error_data, "The namespace prefix in \"%s\" was not declared.", name); } else { #if RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("Found namespace prefix %s URI %s\n", ns->prefix, raptor_uri_as_string_v2(nstack->world, ns->uri)); #endif qname->nspace=ns; } } /* If namespace has a URI and a local_name is defined, create the URI * for this element */ if(qname->nspace && local_name_length) { raptor_uri *uri=raptor_namespace_get_uri(qname->nspace); if(uri) uri=raptor_new_uri_from_uri_local_name_v2(qname->world, uri, new_name); qname->uri=uri; } return qname; } #ifndef RAPTOR_DISABLE_V1 /** * raptor_new_qname_from_namespace_local_name: * @ns: namespace of qname (or NULL) * @local_name: element or attribute name * @value: attribute value (else is an element) * * Constructor - create a new XML qname. * * Create a new qname from the namespace and local element/attribute name, * with optional (attribute) value. * * raptor_init() MUST have been called before calling this function. * Use raptor_new_qname_from_namespace_local_name_v2() if using raptor_world APIs. * * Return value: a new #raptor_qname object or NULL on failure **/ raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_namespace *ns, const unsigned char *local_name, const unsigned char *value) { return raptor_new_qname_from_namespace_local_name_v2(raptor_world_instance(), ns, local_name, value); } #endif /** * raptor_new_qname_from_namespace_local_name_v2: * @world: raptor_world object * @ns: namespace of qname (or NULL) * @local_name: element or attribute name * @value: attribute value (else is an element) * * Constructor - create a new XML qname. * * Create a new qname from the namespace and local element/attribute name, * with optional (attribute) value. * * Return value: a new #raptor_qname object or NULL on failure **/ raptor_qname* raptor_new_qname_from_namespace_local_name_v2(raptor_world* world, raptor_namespace *ns, const unsigned char *local_name, const unsigned char *value) { raptor_qname* qname; unsigned char* new_name; int local_name_length=strlen((char*)local_name); if(!local_name) return NULL; qname=(raptor_qname*)RAPTOR_CALLOC(raptor_qname, 1, sizeof(raptor_qname)); if(!qname) return NULL; qname->world=world; if(value) { int value_length=strlen((char*)value); unsigned char* new_value=(unsigned char*)RAPTOR_MALLOC(cstring, value_length+1); if(!new_value) { RAPTOR_FREE(raptor_qname, qname); return NULL; } strcpy((char*)new_value, (char*)value); qname->value=new_value; qname->value_length=value_length; } new_name=(unsigned char*)RAPTOR_MALLOC(cstring, local_name_length+1); if(!new_name) { raptor_free_qname(qname); return NULL; } strcpy((char*)new_name, (char*)local_name); qname->local_name=new_name; qname->local_name_length=local_name_length; qname->nspace=ns; if(qname->nspace) { qname->uri=raptor_namespace_get_uri(qname->nspace); if(qname->uri) qname->uri=raptor_new_uri_from_uri_local_name_v2(qname->world, qname->uri, new_name); } return qname; } /** * raptor_qname_copy: * @qname: existing qname * * Copy constructor - copy an existing XML qname. * * Return value: a new #raptor_qname object or NULL on failure **/ raptor_qname* raptor_qname_copy(raptor_qname *qname) { raptor_qname* new_qname; unsigned char* new_name; new_qname=(raptor_qname*)RAPTOR_CALLOC(raptor_qname, 1, sizeof(raptor_qname)); if(!new_qname) return NULL; new_qname->world=qname->world; if(qname->value) { int value_length=qname->value_length; unsigned char* new_value=(unsigned char*)RAPTOR_MALLOC(cstring, value_length+1); if(!new_value) { RAPTOR_FREE(raptor_qname, qname); return NULL; } strcpy((char*)new_value, (char*)qname->value); new_qname->value=new_value; new_qname->value_length=value_length; } new_name=(unsigned char*)RAPTOR_MALLOC(cstring, qname->local_name_length+1); if(!new_name) { raptor_free_qname(new_qname); return NULL; } strcpy((char*)new_name, (char*)qname->local_name); new_qname->local_name=new_name; new_qname->local_name_length=qname->local_name_length; new_qname->nspace=qname->nspace; new_qname->uri=raptor_namespace_get_uri(new_qname->nspace); if(new_qname->uri) new_qname->uri=raptor_new_uri_from_uri_local_name_v2(qname->world, new_qname->uri, new_name); return new_qname; } #ifdef RAPTOR_DEBUG void raptor_qname_print(FILE *stream, raptor_qname* name) { if(name->nspace) { const unsigned char *prefix=raptor_namespace_get_prefix(name->nspace); if(prefix) fprintf(stream, "%s:%s", prefix, name->local_name); else fprintf(stream, "(default):%s", name->local_name); } else fputs((char*)name->local_name, stream); } #endif /** * raptor_free_qname: * @name: #raptor_qname object * * Destructor - destroy a raptor_qname object. **/ void raptor_free_qname(raptor_qname* name) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(name, raptor_qname); if(name->local_name) RAPTOR_FREE(cstring, (void*)name->local_name); if(name->uri && name->nspace) raptor_free_uri_v2(name->world, name->uri); if(name->value) RAPTOR_FREE(cstring, (void*)name->value); RAPTOR_FREE(raptor_qname, name); } /** * raptor_qname_equal: * @name1: first #raptor_qname * @name2: second #raptor_name * * Compare two XML Qnames for equality. * * Return value: non-0 if the qnames are equal. **/ int raptor_qname_equal(raptor_qname *name1, raptor_qname *name2) { if(name1->nspace != name2->nspace) return 0; if(name1->local_name_length != name2->local_name_length) return 0; if(strcmp((char*)name1->local_name, (char*)name2->local_name)) return 0; return 1; } /** * raptor_qname_string_to_uri: * @nstack: #raptor_namespace_stack to decode the namespace * @name: QName string or NULL * @name_len: QName string length * @error_handler: function to call on an error * @error_data: user data for error function * * Get the URI for a qname. * * Utility function to turn a string representing a QName in the * N3 style, into a new URI representing it. A NULL name or name ":" * returns the default namespace URI. A name "p:" returns * namespace name (URI) for the namespace with prefix "p". * * Partially equivalent to * qname=raptor_new_qname(nstack, name, NULL, error_handler, error_data); * uri=raptor_uri_copy(qname->uri); * raptor_free_qname(qname) * but without making the qname, and it also handles the NULL and * ":" name cases as well as error checking. * * Return value: new #raptor_uri object or NULL on failure **/ raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, const unsigned char *name, size_t name_len, raptor_simple_message_handler error_handler, void *error_data) { raptor_uri *uri=NULL; const unsigned char *p; const unsigned char *original_name=name; const unsigned char *local_name=NULL; int local_name_length=0; raptor_namespace* ns; /* Empty string is default namespace URI */ if(!name) { ns=raptor_namespaces_get_default_namespace(nstack); } else { /* If starts with :, it is relative to default namespace, so skip it */ if(*name == ':') { name++; name_len--; } for(p=name; *p && *p != ':'; p++) ; /* If ends with :, it is the URI of a namespace */ if(p-name == (int)(name_len-1)) { ns=raptor_namespaces_find_namespace(nstack, name, name_len-1); } else { if(!*p) { local_name=name; local_name_length=p-name; /* pick up the default namespace if there is one */ ns=raptor_namespaces_get_default_namespace(nstack); } else { /* There is a namespace prefix */ int prefix_length=p-name; p++; local_name=p; local_name_length=strlen((char*)p); /* Find the namespace */ ns=raptor_namespaces_find_namespace(nstack, name, prefix_length); } } } if(!ns) { if(error_handler) error_handler((raptor_parser*)error_data, "The namespace prefix in \"%s\" was not declared.", original_name); } /* If namespace has a URI and a local_name is defined, return the URI * for this name */ if(ns && (uri=raptor_namespace_get_uri(ns))) { if(local_name_length) uri=raptor_new_uri_from_uri_local_name_v2(nstack->world, uri, local_name); else uri=raptor_uri_copy_v2(nstack->world, uri); } return uri; } /** * raptor_iostream_write_qname: * @iostr: raptor iosteram * @qname: QName to write * * Write a formatted qname to an iostream * * Return value: non-0 on failure **/ int raptor_iostream_write_qname(raptor_iostream* iostr, raptor_qname *qname) { if(qname->nspace && qname->nspace->prefix_length > 0) { raptor_iostream_write_counted_string(iostr, qname->nspace->prefix, qname->nspace->prefix_length); raptor_iostream_write_byte(iostr, ':'); } raptor_iostream_write_counted_string(iostr, qname->local_name, qname->local_name_length); return 0; } /** * raptor_qname_to_counted_name: * @qname: QName to write * @length_p: pointer to variable to store length of name (or NULL) * * Get the string form of a QName name * * Return value: string or NULL on failure **/ unsigned char* raptor_qname_to_counted_name(raptor_qname *qname, size_t* length_p) { size_t len=qname->local_name_length; unsigned char* s; unsigned char *p; if(qname->nspace && qname->nspace->prefix_length > 0) len+= 1 + qname->nspace->prefix_length; if(length_p) *length_p=len; s=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!s) return NULL; p=s; if(qname->nspace && qname->nspace->prefix_length > 0) { strncpy((char*)p, (const char*)qname->nspace->prefix, qname->nspace->prefix_length); p+= qname->nspace->prefix_length; *p++ = ':'; } strncpy((char*)p, (const char*)qname->local_name, qname->local_name_length+1); return s; } /** * raptor_qname_get_namespace: * @name: #raptor_qname object * * Get the #raptor_namespace of an XML QName. * * Return value: the namespace **/ const raptor_namespace* raptor_qname_get_namespace(raptor_qname* name) { return name->nspace; } /** * raptor_qname_get_local_name: * @name: #raptor_qname object * * Get the #raptor_local_name of an XML QName. * * Return value: the local_name **/ const unsigned char* raptor_qname_get_local_name(raptor_qname* name) { return name->local_name; } /** * raptor_qname_get_value: * @name: #raptor_qname object * * Get the #raptor_value of an XML QName. * * Return value: the value **/ const unsigned char* raptor_qname_get_value(raptor_qname* name) { return name->value; } /** * raptor_qname_get_counted_value: * @name: #raptor_qname object * @length_p: pointer to variable to store length of name (or NULL) * * Get the #raptor_value of an XML QName. * * Return value: the value **/ const unsigned char* raptor_qname_get_counted_value(raptor_qname* name, size_t* length_p) { if(length_p) *length_p=name->value_length; return name->value; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_libxml.c�������������������������������������������������������������������0000644�0001750�0001750�00000052453�11330672502�013650� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_libxml.c - Raptor libxml functions * * Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifdef RAPTOR_XML_LIBXML /* prototypes */ static void raptor_libxml_warning(void* user_data, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); static void raptor_libxml_error_common(void* user_data, const char *msg, va_list args, const char *prefix, int is_fatal) RAPTOR_PRINTF_FORMAT(2, 0); static void raptor_libxml_error(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); static void raptor_libxml_fatal_error(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); static const char* const xml_warning_prefix="XML parser warning - "; static const char* const xml_error_prefix="XML parser error - "; static const char* const xml_generic_error_prefix="XML error - "; static const char* const xml_fatal_error_prefix="XML parser fatal error - "; static const char* const xml_validation_error_prefix="XML parser validation error - "; static const char* const xml_validation_warning_prefix="XML parser validation warning - "; #ifdef HAVE_XMLSAX2INTERNALSUBSET /* SAX2 - 2.6.0 or later */ #define libxml2_internalSubset xmlSAX2InternalSubset #define libxml2_externalSubset xmlSAX2ExternalSubset #define libxml2_isStandalone xmlSAX2IsStandalone #define libxml2_hasInternalSubset xmlSAX2HasInternalSubset #define libxml2_hasExternalSubset xmlSAX2HasExternalSubset #define libxml2_resolveEntity xmlSAX2ResolveEntity #define libxml2_getEntity xmlSAX2GetEntity #define libxml2_getParameterEntity xmlSAX2GetParameterEntity #define libxml2_entityDecl xmlSAX2EntityDecl #define libxml2_unparsedEntityDecl xmlSAX2UnparsedEntityDecl #define libxml2_startDocument xmlSAX2StartDocument #define libxml2_endDocument xmlSAX2EndDocument #else /* SAX1 - before libxml2 2.6.0 */ #define libxml2_internalSubset internalSubset #define libxml2_externalSubset externalSubset #define libxml2_isStandalone isStandalone #define libxml2_hasInternalSubset hasInternalSubset #define libxml2_hasExternalSubset hasExternalSubset #define libxml2_resolveEntity resolveEntity #define libxml2_getEntity getEntity #define libxml2_getParameterEntity getParameterEntity #define libxml2_entityDecl entityDecl #define libxml2_unparsedEntityDecl unparsedEntityDecl #define libxml2_startDocument startDocument #define libxml2_endDocument endDocument #endif static void raptor_libxml_internalSubset(void* user_data, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { raptor_sax2* sax2=(raptor_sax2*)user_data; libxml2_internalSubset(sax2->xc, name, ExternalID, SystemID); } #ifdef RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET static void raptor_libxml_externalSubset(void* user_data, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { raptor_sax2* sax2=(raptor_sax2*)user_data; libxml2_externalSubset(sax2->xc, name, ExternalID, SystemID); } #endif static int raptor_libxml_isStandalone (void* user_data) { raptor_sax2* sax2=(raptor_sax2*)user_data; return libxml2_isStandalone(sax2->xc); } static int raptor_libxml_hasInternalSubset (void* user_data) { raptor_sax2* sax2=(raptor_sax2*)user_data; return libxml2_hasInternalSubset(sax2->xc); } static int raptor_libxml_hasExternalSubset (void* user_data) { raptor_sax2* sax2=(raptor_sax2*)user_data; return libxml2_hasExternalSubset(sax2->xc); } static xmlParserInputPtr raptor_libxml_resolveEntity(void* user_data, const xmlChar *publicId, const xmlChar *systemId) { raptor_sax2* sax2=(raptor_sax2*)user_data; return libxml2_resolveEntity(sax2->xc, publicId, systemId); } static xmlEntityPtr raptor_libxml_getEntity(void* user_data, const xmlChar *name) { raptor_sax2* sax2=(raptor_sax2*)user_data; return libxml2_getEntity(sax2->xc, name); } static xmlEntityPtr raptor_libxml_getParameterEntity(void* user_data, const xmlChar *name) { raptor_sax2* sax2=(raptor_sax2*)user_data; return libxml2_getParameterEntity(sax2->xc, name); } static void raptor_libxml_entityDecl(void* user_data, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) { raptor_sax2* sax2=(raptor_sax2*)user_data; libxml2_entityDecl(sax2->xc, name, type, publicId, systemId, content); } static void raptor_libxml_unparsedEntityDecl(void* user_data, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName) { raptor_sax2* sax2=(raptor_sax2*)user_data; libxml2_unparsedEntityDecl(sax2->xc, name, publicId, systemId, notationName); } static void raptor_libxml_startDocument(void* user_data) { raptor_sax2* sax2=(raptor_sax2*)user_data; libxml2_startDocument(sax2->xc); } static void raptor_libxml_endDocument(void* user_data) { raptor_sax2* sax2=(raptor_sax2*)user_data; xmlParserCtxtPtr xc=sax2->xc; libxml2_endDocument(sax2->xc); if(xc->myDoc) { xmlFreeDoc(xc->myDoc); xc->myDoc=NULL; } } static void raptor_libxml_set_document_locator(void* user_data, xmlSAXLocatorPtr loc) { raptor_sax2* sax2=(raptor_sax2*)user_data; sax2->loc=loc; } void raptor_libxml_update_document_locator(raptor_sax2* sax2, raptor_locator* locator) { /* for storing error info */ xmlSAXLocatorPtr loc=sax2 ? sax2->loc : NULL; xmlParserCtxtPtr xc= sax2 ? sax2->xc : NULL; if(xc && xc->inSubset) return; if(!locator) return; locator->line= -1; locator->column= -1; if(!xc) return; if(loc) { locator->line=loc->getLineNumber(xc); /* Seems to be broken */ /* locator->column=loc->getColumnNumber(xc); */ } } static void raptor_libxml_warning(void* user_data, const char *msg, ...) { raptor_sax2* sax2=NULL; va_list args; int prefix_length=strlen(xml_warning_prefix); int length; char *nmsg; /* Work around libxml2 bug - sometimes the sax2->error * returns a ctx, sometimes the userdata */ if(((raptor_sax2*)user_data)->magic == RAPTOR_LIBXML_MAGIC) sax2=(raptor_sax2*)user_data; else /* user_data is not userData */ sax2=(raptor_sax2*)((xmlParserCtxtPtr)user_data)->userData; va_start(args, msg); raptor_libxml_update_document_locator(sax2, sax2->locator); length=prefix_length+strlen(msg)+1; nmsg=(char*)RAPTOR_MALLOC(cstring, length); if(nmsg) { strcpy(nmsg, xml_warning_prefix); strcpy(nmsg+prefix_length, msg); if(nmsg[length-2]=='\n') nmsg[length-2]='\0'; } raptor_log_error_varargs(sax2->world, RAPTOR_LOG_LEVEL_WARNING, sax2->error_handlers->handlers[RAPTOR_LOG_LEVEL_WARNING].handler, sax2->error_handlers->handlers[RAPTOR_LOG_LEVEL_WARNING].user_data, sax2->locator, nmsg ? nmsg : msg, args); if(nmsg) RAPTOR_FREE(cstring,nmsg); va_end(args); } static void raptor_libxml_error_common(void* user_data, const char *msg, va_list args, const char *prefix, int is_fatal) { raptor_sax2* sax2=NULL; int prefix_length=strlen(prefix); int length; char *nmsg; if(user_data) { /* Work around libxml2 bug - sometimes the sax2->error * returns a user_data, sometimes the userdata */ if(((raptor_sax2*)user_data)->magic == RAPTOR_LIBXML_MAGIC) sax2=(raptor_sax2*)user_data; else /* user_data is not userData */ sax2=(raptor_sax2*)((xmlParserCtxtPtr)user_data)->userData; } if(sax2->locator) raptor_libxml_update_document_locator(sax2, sax2->locator); length=prefix_length+strlen(msg)+1; nmsg=(char*)RAPTOR_MALLOC(cstring, length); if(nmsg) { strcpy(nmsg, prefix); strcpy(nmsg+prefix_length, msg); if(nmsg[length-1]=='\n') nmsg[length-1]='\0'; } if(is_fatal) raptor_log_error_varargs(sax2->world, RAPTOR_LOG_LEVEL_FATAL, sax2->error_handlers->handlers[RAPTOR_LOG_LEVEL_FATAL].handler, sax2->error_handlers->handlers[RAPTOR_LOG_LEVEL_FATAL].user_data, sax2->locator, nmsg ? nmsg : msg, args); else raptor_log_error_varargs(sax2->world, RAPTOR_LOG_LEVEL_ERROR, sax2->error_handlers->handlers[RAPTOR_LOG_LEVEL_ERROR].handler, sax2->error_handlers->handlers[RAPTOR_LOG_LEVEL_ERROR].user_data, sax2->locator, nmsg ? nmsg : msg, args); if(nmsg) RAPTOR_FREE(cstring,nmsg); } static void raptor_libxml_error(void* user_data, const char *msg, ...) { va_list args; va_start(args, msg); raptor_libxml_error_common(user_data, msg, args, xml_error_prefix, 0); va_end(args); } void raptor_libxml_generic_error(void* user_data, const char *msg, ...) { raptor_error_handlers* error_handlers=(raptor_error_handlers*)user_data; va_list args; const char* prefix=xml_generic_error_prefix; int prefix_length=strlen(prefix); int length; char *nmsg; va_start(args, msg); /* no SAX2 and locator from error_handlers */ length=prefix_length+strlen(msg)+1; nmsg=(char*)RAPTOR_MALLOC(cstring, length); if(nmsg) { strcpy(nmsg, prefix); strcpy(nmsg+prefix_length, msg); if(nmsg[length-1]=='\n') nmsg[length-1]='\0'; } raptor_log_error_varargs(error_handlers->world, RAPTOR_LOG_LEVEL_ERROR, error_handlers->handlers[RAPTOR_LOG_LEVEL_ERROR].handler, error_handlers->handlers[RAPTOR_LOG_LEVEL_ERROR].user_data, error_handlers->locator, nmsg ? nmsg : msg, args); if(nmsg) RAPTOR_FREE(cstring,nmsg); va_end(args); } static void raptor_libxml_fatal_error(void* user_data, const char *msg, ...) { va_list args; va_start(args, msg); raptor_libxml_error_common(user_data, msg, args, xml_fatal_error_prefix, 1); va_end(args); } void raptor_libxml_validation_error(void* user_data, const char *msg, ...) { va_list args; va_start(args, msg); raptor_libxml_error_common(user_data, msg, args, xml_validation_error_prefix, 1); va_end(args); } void raptor_libxml_validation_warning(void* user_data, const char *msg, ...) { va_list args; raptor_sax2* sax2=(raptor_sax2*)user_data; int prefix_length=strlen(xml_validation_warning_prefix); int length; char *nmsg; va_start(args, msg); raptor_libxml_update_document_locator(sax2, sax2->locator); length=prefix_length+strlen(msg)+1; nmsg=(char*)RAPTOR_MALLOC(cstring, length); if(nmsg) { strcpy(nmsg, xml_validation_warning_prefix); strcpy(nmsg+prefix_length, msg); if(nmsg[length-2]=='\n') nmsg[length-2]='\0'; } raptor_log_error_varargs(sax2->world, RAPTOR_LOG_LEVEL_WARNING, sax2->error_handlers->handlers[RAPTOR_LOG_LEVEL_WARNING].handler, sax2->error_handlers->handlers[RAPTOR_LOG_LEVEL_WARNING].user_data, sax2->locator, nmsg ? nmsg : msg, args); if(nmsg) RAPTOR_FREE(cstring,nmsg); va_end(args); } void raptor_libxml_init(raptor_sax2* sax2, raptor_uri *base_uri) { xmlSAXHandler *sax=&sax2->sax; sax->internalSubset = raptor_libxml_internalSubset; sax->isStandalone = raptor_libxml_isStandalone; sax->hasInternalSubset = raptor_libxml_hasInternalSubset; sax->hasExternalSubset = raptor_libxml_hasExternalSubset; sax->resolveEntity = raptor_libxml_resolveEntity; sax->getEntity = raptor_libxml_getEntity; sax->getParameterEntity = raptor_libxml_getParameterEntity; sax->entityDecl = raptor_libxml_entityDecl; sax->attributeDecl = NULL; /* attributeDecl */ sax->elementDecl = NULL; /* elementDecl */ sax->notationDecl = NULL; /* notationDecl */ sax->unparsedEntityDecl = raptor_libxml_unparsedEntityDecl; sax->setDocumentLocator = raptor_libxml_set_document_locator; sax->startDocument = raptor_libxml_startDocument; sax->endDocument = raptor_libxml_endDocument; sax->startElement= raptor_sax2_start_element; sax->endElement= raptor_sax2_end_element; sax->reference = NULL; /* reference */ sax->characters= raptor_sax2_characters; sax->cdataBlock= raptor_sax2_cdata; /* like <![CDATA[...]> */ sax->ignorableWhitespace= raptor_sax2_cdata; sax->processingInstruction = NULL; /* processingInstruction */ sax->comment = raptor_sax2_comment; /* comment */ sax->warning=(warningSAXFunc)raptor_libxml_warning; sax->error=(errorSAXFunc)raptor_libxml_error; sax->fatalError=(fatalErrorSAXFunc)raptor_libxml_fatal_error; sax->serror=(xmlStructuredErrorFunc)raptor_libxml_xmlStructuredErrorFunc; #ifdef RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET sax->externalSubset = raptor_libxml_externalSubset; #endif #ifdef RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED sax->initialized = 1; #endif } void raptor_libxml_init_sax_error_handlers(xmlSAXHandler *sax) { sax->warning=(warningSAXFunc)raptor_libxml_warning; sax->error=(errorSAXFunc)raptor_libxml_error; sax->fatalError=(fatalErrorSAXFunc)raptor_libxml_fatal_error; sax->serror=(xmlStructuredErrorFunc)raptor_libxml_xmlStructuredErrorFunc; #ifdef RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED sax->initialized = 1; #endif } void raptor_libxml_free(xmlParserCtxtPtr xc) { libxml2_endDocument(xc); if(xc->myDoc) { xmlFreeDoc(xc->myDoc); xc->myDoc=NULL; } xmlFreeParserCtxt(xc); } #if LIBXML_VERSION >= 20621 #define XML_LAST_DL XML_FROM_I18N #else #if LIBXML_VERSION >= 20617 #define XML_LAST_DL XML_FROM_WRITER #else #if LIBXML_VERSION >= 20616 #define XML_LAST_DL XML_FROM_CHECK #else #if LIBXML_VERSION >= 20615 #define XML_LAST_DL XML_FROM_VALID #else #define XML_LAST_DL XML_FROM_XSLT #endif #endif #endif #endif /* All other symbols not specifically below noted were added during * the period 2-10 October 2003 which is before the minimum libxml2 * version 2.6.8 release date of Mar 23 2004. * * When the minimum libxml2 version goes up, the #ifdefs for * older versions can be removed. */ static const char* const raptor_libxml_domain_labels[XML_LAST_DL+2]= { NULL, /* XML_FROM_NONE */ "parser", /* XML_FROM_PARSER */ "tree", /* XML_FROM_TREE */ "namespace", /* XML_FROM_NAMESPACE */ "validity", /* XML_FROM_DTD */ "HTML parser", /* XML_FROM_HTML */ "memory", /* XML_FROM_MEMORY */ "output", /* XML_FROM_OUTPUT */ "I/O" , /* XML_FROM_IO */ "FTP", /* XML_FROM_FTP */ #if LIBXML_VERSION >= 20618 /* 2005-02-13 - v2.6.18 */ "HTTP", /* XML_FROM_HTTP */ #endif "XInclude", /* XML_FROM_XINCLUDE */ "XPath", /* XML_FROM_XPATH */ "parser", /* XML_FROM_XPOINTER */ "regexp", /* XML_FROM_REGEXP */ "Schemas datatype", /* XML_FROM_DATATYPE */ "Schemas parser", /* XML_FROM_SCHEMASP */ "Schemas validity", /* XML_FROM_SCHEMASV */ "Relax-NG parser", /* XML_FROM_RELAXNGP */ "Relax-NG validity", /* XML_FROM_RELAXNGV */ "Catalog", /* XML_FROM_CATALOG */ "C14", /* XML_FROM_C14N */ "XSLT", /* XML_FROM_XSLT */ #if LIBXML_VERSION >= 20615 /* 2004-10-07 - v2.6.15 */ "validity", /* XML_FROM_VALID */ #endif #if LIBXML_VERSION >= 20616 /* 2004-11-04 - v2.6.16 */ "checking", /* XML_FROM_CHECK */ #endif #if LIBXML_VERSION >= 20617 /* 2005-01-04 - v2.6.17 */ "writer", /* XML_FROM_WRITER */ #endif #if LIBXML_VERSION >= 20621 /* 2005-08-24 - v2.6.21 */ "module", /* XML_FROM_MODULE */ "encoding", /* XML_FROM_I18N */ #endif NULL }; void raptor_libxml_xmlStructuredErrorFunc(void *user_data, xmlErrorPtr err) { raptor_error_handlers* error_handlers = NULL; raptor_stringbuffer* sb; char *nmsg; raptor_message_handler handler=NULL; void* handler_data=NULL; raptor_log_level level=RAPTOR_LOG_LEVEL_ERROR; /* user_data OR err->ctxt->userData may point to a raptor_sax2 */ if(user_data) { raptor_sax2* sax2 = (raptor_sax2*)user_data; if(sax2->magic == RAPTOR_LIBXML_MAGIC) error_handlers = sax2->error_handlers; } if(err && err->ctxt) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)err->ctxt; if(ctxt->userData) { raptor_sax2* sax2 = (raptor_sax2*)ctxt->userData; if(sax2->magic == RAPTOR_LIBXML_MAGIC) error_handlers = sax2->error_handlers; } } if(err == NULL || err->code == XML_ERR_OK || err->level == XML_ERR_NONE) return; /* Do not warn about things with no location */ if(err->level == XML_ERR_WARNING && !err->file) return; /* XML fatal errors never cause an abort */ if(err->level == XML_ERR_FATAL) err->level= XML_ERR_ERROR; sb=raptor_new_stringbuffer(); if(err->domain != XML_FROM_HTML) raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)"XML ", 4, 1); if(err->domain != XML_FROM_NONE && err->domain < XML_LAST_DL) { const unsigned char* label; label=(const unsigned char*)raptor_libxml_domain_labels[(int)err->domain]; raptor_stringbuffer_append_string(sb, label, 1); raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)" ", 1, 1); } if(err->level == XML_ERR_WARNING) raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)"warning: ", 9, 1); else /* XML_ERR_ERROR or XML_ERR_FATAL */ raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)"error: ", 7, 1); if(err->message) { unsigned char* msg; size_t len; msg=(unsigned char*)err->message; len= strlen((const char*)msg); if(len && msg[len-1] == '\n') msg[--len]='\0'; raptor_stringbuffer_append_counted_string(sb, msg, len, 1); } #if LIBXML_VERSION >= 20618 /* 2005-02-13 - v2.6.18 */ /* str1 has the detailed HTTP error */ if(err->domain == XML_FROM_HTTP && err->str1) { unsigned char* msg; size_t len; msg=(unsigned char*)err->str1; len= strlen((const char*)msg); if(len && msg[len-1] == '\n') msg[--len]='\0'; raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)" - ", 3, 1); raptor_stringbuffer_append_counted_string(sb, msg, len, 1); } #endif /* When err->domain == XML_FROM_XPATH then err->int1 is * the offset into err->str1, the line with the error */ if(err->domain == XML_FROM_XPATH && err->str1) { raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)" in ", 4, 1); raptor_stringbuffer_append_string(sb, (const unsigned char*)err->str1, 1); } if(error_handlers) { if(error_handlers->magic != RAPTOR_ERROR_HANDLER_MAGIC) { #ifdef RAPTOR_DEBUG if(1) /* FIXME */ RAPTOR_DEBUG2("Received bogus error_handlers pointer %p\n", error_handlers); else RAPTOR_FATAL2("Received bogus error_handlers pointer %p\n", error_handlers); #endif error_handlers=NULL; } } nmsg=(char*)raptor_stringbuffer_as_string(sb); if(err->level == XML_ERR_FATAL) level=RAPTOR_LOG_LEVEL_FATAL; else if(err->level == XML_ERR_ERROR) level=RAPTOR_LOG_LEVEL_ERROR; else level=RAPTOR_LOG_LEVEL_WARNING; if(error_handlers && level <= error_handlers->last_log_level) { handler=error_handlers->handlers[level].handler; handler_data=error_handlers->handlers[level].user_data; } if(error_handlers) raptor_log_error(error_handlers->world, level, handler, handler_data, error_handlers->locator, nmsg); else fputs(nmsg, stderr); raptor_free_stringbuffer(sb); } /* end if RAPTOR_XML_LIBXML */ #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_rdfxml.c�������������������������������������������������������������������0000644�0001750�0001750�00000370155�11330672502�013657� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rdfxml.c - Raptor RDF/XML Parser * * Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* Define these for far too much output */ #undef RAPTOR_DEBUG_VERBOSE #undef RAPTOR_DEBUG_CDATA /* Raptor structures */ typedef enum { /* Catch uninitialised state */ RAPTOR_STATE_INVALID = 0, /* Skipping current tree of elements - used to recover finding * illegal content, when parsling permissively. */ RAPTOR_STATE_SKIPPING, /* Not in RDF grammar yet - searching for a start element. * * This can be <rdf:RDF> (goto NODE_ELEMENT_LIST) but since it is optional, * the start element can also be one of * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElementURIs * * If RDF content is assumed, go straight to OBJ */ RAPTOR_STATE_UNKNOWN, /* A list of node elements * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElementList */ RAPTOR_STATE_NODE_ELEMENT_LIST, /* Found an <rdf:Description> */ RAPTOR_STATE_DESCRIPTION, /* Found a property element * http://www.w3.org/TR/rdf-syntax-grammar/#propertyElt */ RAPTOR_STATE_PROPERTYELT, /* A property element that is an ordinal - rdf:li, rdf:_n */ RAPTOR_STATE_MEMBER_PROPERTYELT, /* Found a node element * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElement */ RAPTOR_STATE_NODE_ELEMENT, /* A property element with rdf:parseType="Literal" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeLiteralPropertyElt */ RAPTOR_STATE_PARSETYPE_LITERAL, /* A property element with rdf:parseType="Resource" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeResourcePropertyElt */ RAPTOR_STATE_PARSETYPE_RESOURCE, /* A property element with rdf:parseType="Collection" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeCollectionPropertyElt * * (This also handles daml:Collection) */ RAPTOR_STATE_PARSETYPE_COLLECTION, /* A property element with a rdf:parseType attribute and a value * not "Literal" or "Resource" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeOtherPropertyElt */ RAPTOR_STATE_PARSETYPE_OTHER, RAPTOR_STATE_PARSETYPE_LAST = RAPTOR_STATE_PARSETYPE_OTHER } raptor_state; static const char * const raptor_state_names[RAPTOR_STATE_PARSETYPE_LAST+2]={ "INVALID", "SKIPPING", "UNKNOWN", "nodeElementList", "propertyElt", "Description", "propertyElt", "memberPropertyElt", "nodeElement", "parseTypeLiteral", "parseTypeResource", "parseTypeCollection", "parseTypeOther" }; static const char * raptor_rdfxml_state_as_string(raptor_state state) { if(state<1 || state > RAPTOR_STATE_PARSETYPE_LAST) state=(raptor_state)0; return raptor_state_names[(int)state]; } /* * RDF/XML syntax terms, properties and classes. * Must match names in rdf_syntax_terms_info below. */ typedef enum { RDF_ATTR_RDF = 0, RDF_ATTR_Description = 1, RDF_ATTR_li = 2, RDF_ATTR_about = 3, /* value of rdf:about attribute */ RDF_ATTR_aboutEach = 4, /* " rdf:aboutEach */ RDF_ATTR_aboutEachPrefix = 5, /* " rdf:aboutEachPrefix */ RDF_ATTR_ID = 6, /* " rdf:ID */ RDF_ATTR_bagID = 7, /* " rdf:bagID */ RDF_ATTR_resource = 8, /* " rdf:resource */ RDF_ATTR_parseType = 9, /* " rdf:parseType */ RDF_ATTR_nodeID = 10, /* " rdf:nodeID */ RDF_ATTR_datatype = 11, /* " rdf:datatype */ /* rdf:Property-s */ RDF_ATTR_type = 12, /* " rdf:type -- a property in RDF Model */ RDF_ATTR_value = 13, /* " rdf:value -- a property in RDF model */ RDF_ATTR_subject = 14, /* " rdf:subject -- a property in RDF model */ RDF_ATTR_predicate = 15, /* " rdf:predicate -- a property in RDF model */ RDF_ATTR_object = 16, /* " rdf:object -- a property in RDF model */ RDF_ATTR_first = 17, /* " rdf:first -- a property in RDF model */ RDF_ATTR_rest = 18, /* " rdf:rest -- a property in RDF model */ /* rdfs:Class-s */ RDF_ATTR_Seq = 19, /* " rdf:Seq -- a class in RDF Model */ RDF_ATTR_Bag = 20, /* " rdf:Bag -- a class in RDF model */ RDF_ATTR_Alt = 21, /* " rdf:Alt -- a class in RDF model */ RDF_ATTR_Statement = 22, /* " rdf:Statement -- a class in RDF model */ RDF_ATTR_Property = 23, /* " rdf:Property -- a class in RDF model */ RDF_ATTR_List = 24, /* " rdf:List -- a class in RDF model */ RDF_ATTR_XMLLiteral = 25, /* " rdf:XMLLiteral - a cless in RDF graph */ /* rdfs:Resource-s */ RDF_ATTR_nil = 26, /* " rdf:nil -- a resource in RDF graph */ RDF_ATTR_LAST = RDF_ATTR_nil } rdf_attr; /* * http://www.w3.org/TR/rdf-syntax-grammar/#section-grammar-summary * * coreSyntaxTerms := rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType | rdf:resource | rdf:nodeID | rdf:datatype * syntaxTerms := coreSyntaxTerms | rdf:Description | rdf:li * oldTerms := rdf:aboutEach | rdf:aboutEachPrefix | rdf:bagID * * nodeElementURIs := anyURI - ( coreSyntaxTerms | rdf:li | oldTerms ) * propertyElementURIs := anyURI - ( coreSyntaxTerms | rdf:Description | oldTerms ) * propertyAttributeURIs := anyURI - ( coreSyntaxTerms | rdf:Description | rdf:li | oldTerms ) * * So, forbidden terms in the RDF namespace are: * nodeElements * RDF | ID | about | bagID | parseType | resource | nodeID | datatype | * li | aboutEach | aboutEachPrefix | bagID * * propertyElements * RDF | ID | about | bagID | parseType | resource | nodeID | datatype | * Description | aboutEach | aboutEachPrefix | bagID * * propertyAttributes * RDF | ID | about | bagID | parseType | resource | nodeID | datatype | * Description | li | aboutEach | aboutEachPrefix | bagID * * Information about rdf attributes: * raptor_identifier_type type * Set when the attribute is a property rather than just syntax * NOTE: raptor_rdfxml_process_property_attributes() expects only * RAPTOR_IDENTIFIER_TYPE_NONE, * RAPTOR_IDENTIFIER_TYPE_LITERAL or RAPTOR_IDENTIFIER_TYPE_RESOURCE * allowed_unprefixed_on_attribute * If allowed for legacy reasons to be unprefixed as an attribute. * */ static const struct { const char *name; /* term name */ int forbidden_as_nodeElement; int forbidden_as_propertyElement; int forbidden_as_propertyAttribute; raptor_identifier_type type; /* statement value */ int allowed_unprefixed_on_attribute; } rdf_syntax_terms_info[]={ /* syntax only */ { "RDF", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 0 }, { "Description", 0, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 0 }, { "li", 1, 0, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 0 }, { "about", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 1 }, { "aboutEach", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 0 }, { "aboutEachPrefix", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 0 }, { "ID", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 1 }, { "bagID", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 1 }, { "resource", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 1 }, { "parseType", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 1 }, { "nodeID", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 0 }, { "datatype", 1, 1, 1, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 0 }, /* rdf:Property-s */ { "type", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_RESOURCE, 1 }, { "value", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "subject", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "predicate", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "object", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "first", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "rest", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, /* rdfs:Class-s */ { "Seq", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "Bag", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "Alt", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "Statement", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "Property", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "List", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { "XMLLiteral", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, /* rdfs:Resource-s */ { "nil", 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_LITERAL , 0 }, { NULL , 0, 0, 0, RAPTOR_IDENTIFIER_TYPE_UNKNOWN , 0 } }; static int raptor_rdfxml_forbidden_nodeElement_name(const char *name) { int i; if(*name == '_') return 0; for(i=0; rdf_syntax_terms_info[i].name; i++) if(!strcmp(rdf_syntax_terms_info[i].name, name)) return rdf_syntax_terms_info[i].forbidden_as_nodeElement; return -1; } static int raptor_rdfxml_forbidden_propertyElement_name(const char *name) { int i; if(*name == '_') return 0; for(i=0; rdf_syntax_terms_info[i].name; i++) if(!strcmp(rdf_syntax_terms_info[i].name, (const char*)name)) return rdf_syntax_terms_info[i].forbidden_as_propertyElement; return -1; } static int raptor_rdfxml_forbidden_propertyAttribute_name(const char *name) { int i; if(*name == '_') return 0; for(i=0; rdf_syntax_terms_info[i].name; i++) if(!strcmp(rdf_syntax_terms_info[i].name, (const char*)name)) return rdf_syntax_terms_info[i].forbidden_as_propertyAttribute; return -1; } typedef enum { /* undetermined yet - whitespace is stored */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_UNKNOWN, /* literal content - no elements, cdata allowed, whitespace significant * <propElement> blah </propElement> */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL, /* parseType literal content (WF XML) - all content preserved * <propElement rdf:parseType="Literal"><em>blah</em></propElement> */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL, /* top-level nodes - 0+ elements expected, no cdata, whitespace ignored, * any non-whitespace cdata is error * only used for <rdf:RDF> or implict <rdf:RDF> */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_NODES, /* properties - 0+ elements expected, no cdata, whitespace ignored, * any non-whitespace cdata is error * <nodeElement><prop1>blah</prop1> <prop2>blah</prop2> </nodeElement> */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES, /* property content - all content preserved * any content type changes when first non-whitespace found * <propElement>... */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT, /* resource URI given - no element, no cdata, whitespace ignored, * any non-whitespace cdata is error * <propElement rdf:resource="uri"/> * <propElement rdf:resource="uri"></propElement> */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE, /* skipping content - all content is preserved * Used when skipping content for unknown parseType-s, * error recovery, some other reason */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED, /* parseType Collection - all content preserved * Parsing of this determined by RDF/XML (Revised) closed collection rules * <propElement rdf:parseType="Collection">...</propElement> */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION, /* Like above but handles "daml:collection" */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION, /* dummy for use in strings below */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST } raptor_rdfxml_element_content_type; static const struct { const char * name; int whitespace_significant; /* non-blank cdata */ int cdata_allowed; /* XML element content */ int element_allowed; /* Do RDF-specific processing? (property attributes, rdf: attributes, ...) */ int rdf_processing; } rdf_content_type_info[RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST]={ {"Unknown", 1, 1, 1, 0 }, {"Literal", 1, 1, 0, 0 }, {"XML Literal", 1, 1, 1, 0 }, {"Nodes", 0, 0, 1, 1 }, {"Properties", 0, 1, 1, 1 }, {"Property Content",1, 1, 1, 1 }, {"Resource", 0, 0, 0, 0 }, {"Preserved", 1, 1, 1, 0 }, {"Collection", 1, 1, 1, 1 }, {"DAML Collection", 1, 1, 1, 1 }, }; static const char * raptor_rdfxml_element_content_type_as_string(raptor_rdfxml_element_content_type type) { if(type > RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST) return "INVALID"; return rdf_content_type_info[type].name; } /* * Raptor Element/attributes on stack */ struct raptor_rdfxml_element_s { raptor_world* world; raptor_xml_element *xml_element; /* NULL at bottom of stack */ struct raptor_rdfxml_element_s *parent; /* attributes declared in M&S */ const unsigned char * rdf_attr[RDF_ATTR_LAST+1]; /* how many of above seen */ int rdf_attr_count; /* state that this production matches */ raptor_state state; /* how to handle the content inside this XML element */ raptor_rdfxml_element_content_type content_type; /* starting state for children of this element */ raptor_state child_state; /* starting content type for children of this element */ raptor_rdfxml_element_content_type child_content_type; /* STATIC Reified statement identifier */ raptor_identifier reified; /* STATIC Bag identifier */ raptor_identifier bag; int last_bag_ordinal; /* starts at 0, so first predicate is rdf:_1 */ /* STATIC Subject identifier (URI/anon ID), type, source * * When the XML element represents a node, this is the identifier */ raptor_identifier subject; /* STATIC Predicate URI, source is either * RAPTOR_URI_SOURCE_ELEMENT or RAPTOR_URI_SOURCE_ATTRIBUTE * * When the XML element represents a node or predicate, * this is the identifier of the predicate */ raptor_identifier predicate; /* STATIC Object identifier (URI/anon ID), type, source * * When this XML element generates a statement that needs an object, * possibly from a child element, this is the identifier of the object */ raptor_identifier object; /* URI of datatype of literal */ raptor_uri *object_literal_datatype; /* last ordinal used, so initialising to 0 works, emitting rdf:_1 first */ int last_ordinal; /* If this element's parseType is a Collection * this identifies the anon node of current tail of the collection(list). */ const unsigned char *tail_id; /* RDF/XML specific checks */ /* all cdata so far is whitespace */ unsigned int content_cdata_all_whitespace; }; typedef struct raptor_rdfxml_element_s raptor_rdfxml_element; #define RAPTOR_RDFXML_N_CONCEPTS 22 /* * Raptor parser object */ struct raptor_rdfxml_parser_s { raptor_sax2 *sax2; /* stack of elements - elements add after current_element */ raptor_rdfxml_element *root_element; raptor_rdfxml_element *current_element; raptor_uri* concepts[RAPTOR_RDFXML_N_CONCEPTS]; /* set of seen rdf:ID / rdf:bagID values (with in-scope base URI) */ raptor_id_set* id_set; void *xml_content; size_t xml_content_length; raptor_iostream* iostream; /* writer for building parseType="Literal" content */ raptor_xml_writer* xml_writer; }; /* static variables */ #define RAPTOR_RDF_type_URI(rdf_xml_parser) rdf_xml_parser->concepts[0] #define RAPTOR_RDF_value_URI(rdf_xml_parser) rdf_xml_parser->concepts[1] #define RAPTOR_RDF_subject_URI(rdf_xml_parser) rdf_xml_parser->concepts[2] #define RAPTOR_RDF_predicate_URI(rdf_xml_parser) rdf_xml_parser->concepts[3] #define RAPTOR_RDF_object_URI(rdf_xml_parser) rdf_xml_parser->concepts[4] #define RAPTOR_RDF_Statement_URI(rdf_xml_parser) rdf_xml_parser->concepts[5] #define RAPTOR_RDF_Seq_URI(rdf_xml_parser) rdf_xml_parser->concepts[6] #define RAPTOR_RDF_Bag_URI(rdf_xml_parser) rdf_xml_parser->concepts[7] #define RAPTOR_RDF_Alt_URI(rdf_xml_parser) rdf_xml_parser->concepts[8] #define RAPTOR_RDF_List_URI(rdf_xml_parser) rdf_xml_parser->concepts[9] #define RAPTOR_RDF_first_URI(rdf_xml_parser) rdf_xml_parser->concepts[10] #define RAPTOR_RDF_rest_URI(rdf_xml_parser) rdf_xml_parser->concepts[11] #define RAPTOR_RDF_nil_URI(rdf_xml_parser) rdf_xml_parser->concepts[12] #define RAPTOR_DAML_NS_URI(rdf_xml_parser) rdf_xml_parser->concepts[13] #define RAPTOR_DAML_List_URI(rdf_xml_parser) rdf_xml_parser->concepts[14] #define RAPTOR_DAML_first_URI(rdf_xml_parser) rdf_xml_parser->concepts[15] #define RAPTOR_DAML_rest_URI(rdf_xml_parser) rdf_xml_parser->concepts[16] #define RAPTOR_DAML_nil_URI(rdf_xml_parser) rdf_xml_parser->concepts[17] #define RAPTOR_RDF_RDF_URI(rdf_xml_parser) rdf_xml_parser->concepts[18] #define RAPTOR_RDF_Description_URI(rdf_xml_parser) rdf_xml_parser->concepts[19] #define RAPTOR_RDF_li_URI(rdf_xml_parser) rdf_xml_parser->concepts[20] #define RAPTOR_RDF_XMLLiteral_URI(rdf_xml_parser) rdf_xml_parser->concepts[21] /* RAPTOR_RDFXML_N_CONCEPTS defines size of array */ /* prototypes for element functions */ static raptor_rdfxml_element* raptor_rdfxml_element_pop(raptor_rdfxml_parser *rdf_parser); static void raptor_rdfxml_element_push(raptor_rdfxml_parser *rdf_parser, raptor_rdfxml_element* element); static int raptor_rdfxml_record_ID(raptor_parser *rdf_parser, raptor_rdfxml_element *element, const unsigned char *id); /* prototypes for grammar functions */ static void raptor_rdfxml_start_element_grammar(raptor_parser *parser, raptor_rdfxml_element *element); static void raptor_rdfxml_end_element_grammar(raptor_parser *parser, raptor_rdfxml_element *element); static void raptor_rdfxml_cdata_grammar(raptor_parser *parser, const unsigned char *s, int len, int is_cdata); /* prototype for statement related functions */ static void raptor_rdfxml_generate_statement(raptor_parser *rdf_parser, raptor_uri *subject_uri, const unsigned char *subject_id, const raptor_identifier_type subject_type, const raptor_uri_source subject_uri_source, raptor_uri *predicate_uri, const unsigned char *predicate_id, const raptor_identifier_type predicate_type, const raptor_uri_source predicate_uri_source, int predicate_ordinal, raptor_uri *object_uri, const unsigned char *object_id, const raptor_identifier_type object_type, const raptor_uri_source object_uri_source, raptor_uri *literal_datatype, raptor_identifier *reified, raptor_rdfxml_element *bag_element); /* Prototypes for parsing data functions */ static int raptor_rdfxml_parse_init(raptor_parser* rdf_parser, const char *name); static void raptor_rdfxml_parse_terminate(raptor_parser *rdf_parser); static int raptor_rdfxml_parse_start(raptor_parser* rdf_parser); static int raptor_rdfxml_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end); static void raptor_rdfxml_update_document_locator(raptor_parser *rdf_parser); static raptor_uri* raptor_rdfxml_inscope_base_uri(raptor_parser *rdf_parser); static raptor_rdfxml_element* raptor_rdfxml_element_pop(raptor_rdfxml_parser *rdf_xml_parser) { raptor_rdfxml_element *element=rdf_xml_parser->current_element; if(!element) return NULL; rdf_xml_parser->current_element=element->parent; if(rdf_xml_parser->root_element == element) /* just deleted root */ rdf_xml_parser->root_element=NULL; return element; } static void raptor_rdfxml_element_push(raptor_rdfxml_parser *rdf_xml_parser, raptor_rdfxml_element* element) { element->parent=rdf_xml_parser->current_element; rdf_xml_parser->current_element=element; if(!rdf_xml_parser->root_element) rdf_xml_parser->root_element=element; } static void raptor_free_rdfxml_element(raptor_rdfxml_element *element) { int i; /* Free special RDF M&S attributes */ for(i=0; i<= RDF_ATTR_LAST; i++) if(element->rdf_attr[i]) RAPTOR_FREE(cstring, (void*)element->rdf_attr[i]); raptor_free_identifier(&element->subject); raptor_free_identifier(&element->predicate); raptor_free_identifier(&element->object); raptor_free_identifier(&element->bag); raptor_free_identifier(&element->reified); if(element->tail_id) RAPTOR_FREE(cstring, (char*)element->tail_id); if(element->object_literal_datatype) raptor_free_uri_v2(element->world, element->object_literal_datatype); RAPTOR_FREE(raptor_rdfxml_element, element); } static void raptor_rdfxml_sax2_new_namespace_handler(void *user_data, raptor_namespace* nspace) { raptor_parser* rdf_parser; const unsigned char* namespace_name; size_t namespace_name_len; raptor_uri* uri=raptor_namespace_get_uri(nspace); rdf_parser=(raptor_parser*)user_data; raptor_parser_start_namespace(rdf_parser, nspace); if(!uri) return; namespace_name=raptor_uri_as_counted_string_v2(nspace->nstack->world, uri, &namespace_name_len); if(namespace_name_len == raptor_rdf_namespace_uri_len-1 && !strncmp((const char*)namespace_name, (const char*)raptor_rdf_namespace_uri, namespace_name_len)) { const unsigned char *prefix=raptor_namespace_get_prefix(nspace); raptor_parser_warning(rdf_parser, "Declaring a namespace with prefix %s to URI %s - one letter short of the RDF namespace URI and probably a mistake.", prefix, namespace_name); } if(namespace_name_len > raptor_rdf_namespace_uri_len && !strncmp((const char*)namespace_name, (const char*)raptor_rdf_namespace_uri, raptor_rdf_namespace_uri_len)) { raptor_parser_error(rdf_parser, "Declaring a namespace URI %s to which the RDF namespace URI is a prefix is forbidden.", namespace_name); } } static void raptor_rdfxml_start_element_handler(void *user_data, raptor_xml_element* xml_element) { raptor_parser* rdf_parser; raptor_rdfxml_parser* rdf_xml_parser; raptor_rdfxml_element* element; int ns_attributes_count=0; raptor_qname** named_attrs=NULL; int i; int count_bumped=0; rdf_parser=(raptor_parser*)user_data; rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; if(rdf_parser->failed) return; raptor_rdfxml_update_document_locator(rdf_parser); /* Create new element structure */ element=(raptor_rdfxml_element*)RAPTOR_CALLOC(raptor_rdfxml_element, 1, sizeof(raptor_rdfxml_element)); if(!element) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); rdf_parser->failed=1; return; } element->world=rdf_parser->world; element->xml_element=xml_element; /* init world fields in identifiers not created with raptor_new_identifier() */ element->reified.world= element->bag.world= element->subject.world= element->predicate.world= element->object.world= rdf_parser->world; raptor_rdfxml_element_push(rdf_xml_parser, element); named_attrs=raptor_xml_element_get_attributes(xml_element); ns_attributes_count=raptor_xml_element_get_attributes_count(xml_element); /* RDF-specific processing of attributes */ if(ns_attributes_count) { raptor_qname** new_named_attrs; int offset = 0; raptor_rdfxml_element* parent_element; parent_element=element->parent; /* Allocate new array to move namespaced-attributes to if * rdf processing is performed */ new_named_attrs=(raptor_qname**)RAPTOR_CALLOC(raptor_qname_array, ns_attributes_count, sizeof(raptor_qname*)); if(!new_named_attrs) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); rdf_parser->failed=1; return; } for (i = 0; i < ns_attributes_count; i++) { raptor_qname* attr=named_attrs[i]; /* If: * 1 We are handling RDF content and RDF processing is allowed on * this element * OR * 2 We are not handling RDF content and * this element is at the top level (top level Desc. / typedNode) * i.e. we have no parent * then handle the RDF attributes */ if((parent_element && rdf_content_type_info[parent_element->child_content_type].rdf_processing) || !parent_element) { /* Save pointers to some RDF M&S attributes */ /* If RDF namespace-prefixed attributes */ if(attr->nspace && attr->nspace->is_rdf_ms) { const unsigned char *attr_name=attr->local_name; int j; for(j=0; j<= RDF_ATTR_LAST; j++) if(!strcmp((const char*)attr_name, rdf_syntax_terms_info[j].name)) { element->rdf_attr[j]=attr->value; element->rdf_attr_count++; /* Delete it if it was stored elsewhere */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Found RDF namespace attribute '%s' URI %s\n", (char*)attr_name, attr->value); #endif /* make sure value isn't deleted from qname structure */ attr->value=NULL; raptor_free_qname(attr); attr=NULL; break; } } /* end if RDF namespaced-prefixed attributes */ if(!attr) continue; /* If non namespace-prefixed RDF attributes found on an element */ if(rdf_parser->features[RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES] && !attr->nspace) { const unsigned char *attr_name=attr->local_name; int j; for(j=0; j<= RDF_ATTR_LAST; j++) if(!strcmp((const char*)attr_name, rdf_syntax_terms_info[j].name)) { element->rdf_attr[j]=attr->value; element->rdf_attr_count++; if(!rdf_syntax_terms_info[j].allowed_unprefixed_on_attribute) raptor_parser_warning(rdf_parser, "Using rdf attribute '%s' without the RDF namespace has been deprecated.", attr_name); /* Delete it if it was stored elsewhere */ /* make sure value isn't deleted from qname structure */ attr->value=NULL; raptor_free_qname(attr); attr=NULL; break; } } /* end if non-namespace prefixed RDF attributes */ if(!attr) continue; } /* end if leave literal XML alone */ if(attr) new_named_attrs[offset++]=attr; } /* new attribute count is set from attributes that haven't been skipped */ ns_attributes_count=offset; if(!ns_attributes_count) { /* all attributes were deleted so delete the new array */ RAPTOR_FREE(raptor_qname_array, new_named_attrs); new_named_attrs=NULL; } RAPTOR_FREE(raptor_qname_array, named_attrs); named_attrs=new_named_attrs; raptor_xml_element_set_attributes(xml_element, named_attrs, ns_attributes_count); } /* end if ns_attributes_count */ /* start from unknown; if we have a parent, it may set this */ element->state=RAPTOR_STATE_UNKNOWN; element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_UNKNOWN; if(element->parent && element->parent->child_content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_UNKNOWN) { element->content_type=element->parent->child_content_type; if(element->parent->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE && element->content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION && element->content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) { /* If parent has an rdf:resource, this element should not be here */ raptor_parser_error(rdf_parser, "property element '%s' has multiple object node elements, skipping.", raptor_xml_element_get_name(element->parent->xml_element)->local_name); element->state=RAPTOR_STATE_SKIPPING; element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED; } else { if(!element->parent->child_state) { raptor_parser_fatal_error(rdf_parser, "raptor_rdfxml_start_element_handler: no parent element child_state set"); return; } element->state=element->parent->child_state; element->parent->xml_element->content_element_seen++; count_bumped++; /* leave literal XML alone */ if (!rdf_content_type_info[element->content_type].cdata_allowed) { if(element->parent->xml_element->content_element_seen && element->parent->xml_element->content_cdata_seen) { /* Uh oh - mixed content, the parent element has cdata too */ raptor_parser_warning(rdf_parser, "element '%s' has mixed content.", raptor_xml_element_get_name(element->parent->xml_element)->local_name); } /* If there is some existing all-whitespace content cdata * before this node element, delete it */ if(element->parent->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES && element->parent->xml_element->content_element_seen && element->parent->content_cdata_all_whitespace && element->parent->xml_element->content_cdata_length) { element->parent->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; raptor_free_stringbuffer(element->parent->xml_element->content_cdata_sb); element->parent->xml_element->content_cdata_sb=NULL; element->parent->xml_element->content_cdata_length=0; } } /* end if leave literal XML alone */ } /* end if parent has no rdf:resource */ } /* end if element->parent */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Using content type %s\n", rdf_content_type_info[element->content_type].name); fprintf(stderr, "raptor_rdfxml_start_element_handler: Start ns-element: "); raptor_print_xml_element(xml_element, stderr); #endif /* Check for non namespaced stuff when not in a parseType literal, other */ if (rdf_content_type_info[element->content_type].rdf_processing) { /* The element */ /* If has no namespace or the namespace has no name (xmlns="") */ if(!raptor_xml_element_get_name(xml_element)->nspace || (raptor_xml_element_get_name(xml_element)->nspace && !raptor_namespace_get_uri(raptor_xml_element_get_name(xml_element)->nspace))) { raptor_parser_error(rdf_parser, "Using an element '%s' without a namespace is forbidden.", raptor_xml_element_get_name(element->parent->xml_element)->local_name); element->state=RAPTOR_STATE_SKIPPING; /* Remove count above so that parent thinks this is empty */ if(count_bumped) element->parent->xml_element->content_element_seen--; element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED; } /* Check for any remaining non-namespaced attributes */ if (named_attrs) { for(i=0; i < ns_attributes_count; i++) { raptor_qname *attr=named_attrs[i]; /* Check if any attributes are non-namespaced */ if(!attr->nspace || (attr->nspace && !raptor_namespace_get_uri(attr->nspace))) { raptor_parser_error(rdf_parser, "Using an attribute '%s' without a namespace is forbidden.", attr->local_name); raptor_free_qname(attr); named_attrs[i]=NULL; } } } } if (element->rdf_attr[RDF_ATTR_aboutEach] || element->rdf_attr[RDF_ATTR_aboutEachPrefix]) { raptor_parser_warning(rdf_parser, "element '%s' has aboutEach / aboutEachPrefix, skipping.", raptor_xml_element_get_name(xml_element)->local_name); element->state=RAPTOR_STATE_SKIPPING; /* Remove count above so that parent thinks this is empty */ if(count_bumped) element->parent->xml_element->content_element_seen--; element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED; } /* Right, now ready to enter the grammar */ raptor_rdfxml_start_element_grammar(rdf_parser, element); return; } static void raptor_rdfxml_end_element_handler(void *user_data, raptor_xml_element* xml_element) { raptor_parser* rdf_parser; raptor_rdfxml_parser* rdf_xml_parser; raptor_rdfxml_element* element; rdf_parser=(raptor_parser*)user_data; rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; if(!rdf_parser->failed) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_rdfxml_end_element_grammar(rdf_parser, rdf_xml_parser->current_element); } element=raptor_rdfxml_element_pop(rdf_xml_parser); if(element) { if(element->parent) { /* Do not change this; PROPERTYELT will turn into MEMBER if necessary * See the switch case for MEMBER / PROPERTYELT where the test is done. * * PARSETYPE_RESOURCE should never be propogated up since it * will turn the next child (node) element into a property */ if(element->state != RAPTOR_STATE_MEMBER_PROPERTYELT && element->state != RAPTOR_STATE_PARSETYPE_RESOURCE) element->parent->child_state=element->state; } raptor_free_rdfxml_element(element); } } /* cdata (and ignorable whitespace for libxml). * s is not 0 terminated for expat, is for libxml - grrrr. */ static void raptor_rdfxml_characters_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len) { raptor_parser* rdf_parser=(raptor_parser*)user_data; raptor_rdfxml_cdata_grammar(rdf_parser, s, len, 0); } /* cdata (and ignorable whitespace for libxml). * s is not 0 terminated for expat, is for libxml - grrrr. */ static void raptor_rdfxml_cdata_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len) { raptor_parser* rdf_parser=(raptor_parser*)user_data; raptor_rdfxml_cdata_grammar(rdf_parser, s, len, 1); } /* comment handler * s is 0 terminated */ static void raptor_rdfxml_comment_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s) { raptor_parser* rdf_parser=(raptor_parser*)user_data; raptor_rdfxml_parser* rdf_xml_parser; raptor_rdfxml_element* element; if(rdf_parser->failed || !xml_element) return; rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; element=rdf_xml_parser->current_element; if(element) { if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL) raptor_xml_writer_comment(rdf_xml_parser->xml_writer, s); } #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("XML Comment '%s'\n", s); #endif } static int raptor_rdfxml_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_rdfxml_parser* rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; raptor_sax2* sax2; raptor_world* world=rdf_parser->world; /* Allocate sax2 object */ sax2=raptor_new_sax2(rdf_parser, &rdf_parser->error_handlers); rdf_xml_parser->sax2=sax2; if(!sax2) return 1; /* Initialize sax2 element handlers */ raptor_sax2_set_start_element_handler(sax2, raptor_rdfxml_start_element_handler); raptor_sax2_set_end_element_handler(sax2, raptor_rdfxml_end_element_handler); raptor_sax2_set_characters_handler(sax2, raptor_rdfxml_characters_handler); raptor_sax2_set_cdata_handler(sax2, raptor_rdfxml_cdata_handler); raptor_sax2_set_comment_handler(sax2, raptor_rdfxml_comment_handler); raptor_sax2_set_namespace_handler(sax2, raptor_rdfxml_sax2_new_namespace_handler); /* Allocate uris */ RAPTOR_RDF_type_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "type"); RAPTOR_RDF_value_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "value"); RAPTOR_RDF_subject_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "subject"); RAPTOR_RDF_predicate_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "predicate"); RAPTOR_RDF_object_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "object"); RAPTOR_RDF_Statement_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "Statement"); RAPTOR_RDF_Seq_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "Seq"); RAPTOR_RDF_Bag_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "Bag"); RAPTOR_RDF_Alt_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "Alt"); RAPTOR_RDF_List_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "List"); RAPTOR_RDF_first_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "first"); RAPTOR_RDF_rest_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "rest"); RAPTOR_RDF_nil_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "nil"); RAPTOR_DAML_NS_URI(rdf_xml_parser)=raptor_new_uri_v2(world, (const unsigned char*)"http://www.daml.org/2001/03/daml+oil#"); RAPTOR_DAML_List_URI(rdf_xml_parser)=raptor_new_uri_from_uri_local_name_v2(world, RAPTOR_DAML_NS_URI(rdf_xml_parser), (const unsigned char *)"List"); RAPTOR_DAML_first_URI(rdf_xml_parser)=raptor_new_uri_from_uri_local_name_v2(world, RAPTOR_DAML_NS_URI(rdf_xml_parser) ,(const unsigned char *)"first"); RAPTOR_DAML_rest_URI(rdf_xml_parser)=raptor_new_uri_from_uri_local_name_v2(world, RAPTOR_DAML_NS_URI(rdf_xml_parser), (const unsigned char *)"rest"); RAPTOR_DAML_nil_URI(rdf_xml_parser)=raptor_new_uri_from_uri_local_name_v2(world, RAPTOR_DAML_NS_URI(rdf_xml_parser), (const unsigned char *)"nil"); RAPTOR_RDF_RDF_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "RDF"); RAPTOR_RDF_Description_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "Description"); RAPTOR_RDF_li_URI(rdf_xml_parser)=raptor_new_uri_for_rdf_concept_v2(world, "li"); RAPTOR_RDF_XMLLiteral_URI(rdf_xml_parser)=raptor_new_uri_v2(world, raptor_xml_literal_datatype_uri_string); /* Check for uri allocation failures */ if(!RAPTOR_RDF_type_URI(rdf_xml_parser) || !RAPTOR_RDF_value_URI(rdf_xml_parser) || !RAPTOR_RDF_subject_URI(rdf_xml_parser) || !RAPTOR_RDF_predicate_URI(rdf_xml_parser) || !RAPTOR_RDF_object_URI(rdf_xml_parser) || !RAPTOR_RDF_Statement_URI(rdf_xml_parser) || !RAPTOR_RDF_Seq_URI(rdf_xml_parser) || !RAPTOR_RDF_Bag_URI(rdf_xml_parser) || !RAPTOR_RDF_Alt_URI(rdf_xml_parser) || !RAPTOR_RDF_List_URI(rdf_xml_parser) || !RAPTOR_RDF_first_URI(rdf_xml_parser) || !RAPTOR_RDF_rest_URI(rdf_xml_parser) || !RAPTOR_RDF_nil_URI(rdf_xml_parser) || !RAPTOR_DAML_NS_URI(rdf_xml_parser) || !RAPTOR_DAML_List_URI(rdf_xml_parser) || !RAPTOR_DAML_first_URI(rdf_xml_parser) || !RAPTOR_DAML_rest_URI(rdf_xml_parser) || !RAPTOR_DAML_nil_URI(rdf_xml_parser) || !RAPTOR_RDF_RDF_URI(rdf_xml_parser) || !RAPTOR_RDF_Description_URI(rdf_xml_parser) || !RAPTOR_RDF_li_URI(rdf_xml_parser) || !RAPTOR_RDF_XMLLiteral_URI(rdf_xml_parser)) return 1; /* Everything succeeded */ return 0; } static int raptor_rdfxml_parse_start(raptor_parser* rdf_parser) { raptor_uri *uri=rdf_parser->base_uri; raptor_rdfxml_parser* rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; /* base URI required for RDF/XML */ if(!uri) return 1; /* Optionally normalize language to lowercase * http://www.w3.org/TR/rdf-concepts/#dfn-language-identifier */ raptor_sax2_set_feature(rdf_xml_parser->sax2, RAPTOR_FEATURE_NORMALIZE_LANGUAGE, rdf_parser->features[RAPTOR_FEATURE_NORMALIZE_LANGUAGE]); /* Optionally forbid network requests in the XML parser */ raptor_sax2_set_feature(rdf_xml_parser->sax2, RAPTOR_FEATURE_NO_NET, rdf_parser->features[RAPTOR_FEATURE_NO_NET]); raptor_sax2_parse_start(rdf_xml_parser->sax2, uri); /* Delete any existing id_set */ if(rdf_xml_parser->id_set) { raptor_free_id_set(rdf_xml_parser->id_set); rdf_xml_parser->id_set = NULL; } /* Create a new id_set if needed */ if(rdf_parser->features[RAPTOR_FEATURE_CHECK_RDF_ID]) { rdf_xml_parser->id_set = raptor_new_id_set(rdf_parser->world); if(!rdf_xml_parser->id_set) return 1; } return 0; } static void raptor_rdfxml_parse_terminate(raptor_parser *rdf_parser) { raptor_rdfxml_parser* rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; raptor_rdfxml_element* element; int i; if(rdf_xml_parser->sax2) { raptor_free_sax2(rdf_xml_parser->sax2); rdf_xml_parser->sax2=NULL; } while( (element=raptor_rdfxml_element_pop(rdf_xml_parser)) ) raptor_free_rdfxml_element(element); for(i=0; i< RAPTOR_RDFXML_N_CONCEPTS; i++) { raptor_uri* concept_uri=rdf_xml_parser->concepts[i]; if(concept_uri) { raptor_free_uri_v2(rdf_parser->world, concept_uri); rdf_xml_parser->concepts[i]=NULL; } } if(rdf_xml_parser->id_set) { raptor_free_id_set(rdf_xml_parser->id_set); rdf_xml_parser->id_set=NULL; } } static int raptor_rdfxml_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "rdf") || !strcmp((const char*)suffix, "rdfs") || !strcmp((const char*)suffix, "foaf") || !strcmp((const char*)suffix, "doap") || !strcmp((const char*)suffix, "owl") || !strcmp((const char*)suffix, "daml")) score=9; if(!strcmp((const char*)suffix, "rss")) score=3; } if(identifier) { if(strstr((const char*)identifier, "rss1")) score+=5; else if(!suffix && strstr((const char*)identifier, "rss")) score+=3; else if(!suffix && strstr((const char*)identifier, "rdf")) score+=2; else if(!suffix && strstr((const char*)identifier, "RDF")) score+=2; } if(mime_type) { if(strstr((const char*)mime_type, "html")) score-= 4; else if(!strcmp((const char*)mime_type, "text/rdf")) score+= 7; else if(!strcmp((const char*)mime_type, "application/xml")) score+= 5; } if(buffer && len) { /* Check it's an XML namespace declared and not N3 or Turtle which * mention the namespace URI but not in this form. */ #define HAS_RDF_XMLNS1 (raptor_memstr((const char*)buffer, len, "xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#") != NULL) #define HAS_RDF_XMLNS2 (raptor_memstr((const char*)buffer, len, "xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#") != NULL) #define HAS_RDF_XMLNS3 (raptor_memstr((const char*)buffer, len, "xmlns=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#") != NULL) #define HAS_RDF_XMLNS4 (raptor_memstr((const char*)buffer, len, "xmlns='http://www.w3.org/1999/02/22-rdf-syntax-ns#") != NULL) #define HAS_RDF_ENTITY1 (raptor_memstr((const char*)buffer, len, "<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>") != NULL) #define HAS_RDF_ENTITY2 (raptor_memstr((const char*)buffer, len, "<!ENTITY rdf \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">") != NULL) #define HAS_RDF_ENTITY3 (raptor_memstr((const char*)buffer, len, "xmlns:rdf=\"&rdf;\"") != NULL) #define HAS_RDF_ENTITY4 (raptor_memstr((const char*)buffer, len, "xmlns:rdf='&rdf;'") != NULL) #define HAS_HTML_NS (raptor_memstr((const char*)buffer, len, "http://www.w3.org/1999/xhtml") != NULL) #define HAS_HTML_ROOT (raptor_memstr((const char*)buffer, len, "<html") != NULL) if(!HAS_HTML_NS && !HAS_HTML_ROOT && (HAS_RDF_XMLNS1 || HAS_RDF_XMLNS2 || HAS_RDF_XMLNS3 || HAS_RDF_XMLNS4 || HAS_RDF_ENTITY1 || HAS_RDF_ENTITY2 || HAS_RDF_ENTITY3 || HAS_RDF_ENTITY4) ) { int has_rdf_RDF=(raptor_memstr((const char*)buffer, len, "<rdf:RDF") != NULL); int has_rdf_Description=(raptor_memstr((const char*)buffer, len, "rdf:Description") != NULL); int has_rdf_about=(raptor_memstr((const char*)buffer, len, "rdf:about") != NULL); score+= 7; if(has_rdf_RDF) score++; if(has_rdf_Description) score++; if(has_rdf_about) score++; } } return score; } static int raptor_rdfxml_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end) { raptor_rdfxml_parser* rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; if(rdf_parser->failed) return 1; return raptor_sax2_parse_chunk(rdf_xml_parser->sax2, buffer, len, is_end); } static void raptor_rdfxml_generate_statement(raptor_parser *rdf_parser, raptor_uri *subject_uri, const unsigned char *subject_id, const raptor_identifier_type subject_type, const raptor_uri_source subject_uri_source, raptor_uri *predicate_uri, const unsigned char *predicate_id, raptor_identifier_type predicate_type, const raptor_uri_source predicate_uri_source, int predicate_ordinal, raptor_uri *object_uri, const unsigned char *object_id, const raptor_identifier_type object_type, const raptor_uri_source object_uri_source, raptor_uri *literal_datatype, raptor_identifier *reified, raptor_rdfxml_element* bag_element) { raptor_statement *statement=&rdf_parser->statement; const unsigned char *language=NULL; static const char empty_literal[1]=""; raptor_rdfxml_parser *rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; char *reified_id=NULL; raptor_uri* uri1=NULL; raptor_uri* uri2=NULL; if(rdf_parser->failed) return; if((object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL || object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) && !literal_datatype) { language=raptor_sax2_inscope_xml_language(rdf_xml_parser->sax2); if(!object_uri) object_uri=(raptor_uri*)empty_literal; } statement->subject=subject_uri ? (void*)subject_uri : (void*)subject_id; statement->subject_type=subject_type; statement->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; if(predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { /* new URI object */ uri1=raptor_new_uri_from_rdf_ordinal(rdf_parser->world, predicate_ordinal); predicate_uri=uri1; predicate_id=NULL; predicate_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE; } statement->predicate=predicate_uri; statement->object=object_uri ? (void*)object_uri : (void*)object_id; statement->object_type=object_type; statement->object_literal_language=language; statement->object_literal_datatype=literal_datatype; #ifdef RAPTOR_DEBUG_VERBOSE fprintf(stderr, "raptor_rdfxml_generate_statement: Generating statement: "); raptor_print_statement(statement, stderr); fputc('\n', stderr); if(!(subject_uri||subject_id)) RAPTOR_FATAL1("Statement has no subject\n"); if(!(predicate_uri||predicate_id)) RAPTOR_FATAL1("Statement has no predicate\n"); if(!(object_uri||object_id)) RAPTOR_FATAL1("Statement has no object\n"); #endif if(!rdf_parser->statement_handler) goto generate_tidy; /* Generate the statement; or is it fact? */ (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); /* the bagID mess */ if(rdf_parser->features[RAPTOR_FEATURE_ALLOW_BAGID] && bag_element && (bag_element->bag.uri || bag_element->bag.id)) { raptor_identifier* bag=&bag_element->bag; statement->subject=bag->uri ? (void*)bag->uri : (void*)bag->id; statement->subject_type=bag->type; bag_element->last_bag_ordinal++; /* new URI object */ uri2=raptor_new_uri_from_rdf_ordinal(rdf_parser->world, bag_element->last_bag_ordinal); statement->predicate=uri2; if(reified && (reified->uri || reified->id)) { statement->object=reified->uri ? (void*)reified->uri : (void*)reified->id; statement->object_type=reified->type; } else { /* reified may be NULL so do not use it */ reified_id=(char*)raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); statement->object=reified_id; statement->object_type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; } (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); } else if(!reified || (!reified->uri && !reified->id)) goto generate_tidy; /* generate reified statements */ statement->subject_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; statement->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; statement->object_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; statement->object_literal_language=NULL; if(reified_id) { /* reified may be NULL so do not use it */ statement->subject=reified_id; statement->subject_type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; } else { statement->subject=reified->uri ? (void*)reified->uri : (void*)reified->id; statement->subject_type=reified->type; } statement->predicate=RAPTOR_RDF_type_URI(rdf_xml_parser); statement->object=RAPTOR_RDF_Statement_URI(rdf_xml_parser); (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); statement->predicate=RAPTOR_RDF_subject_URI(rdf_xml_parser); statement->object=subject_uri ? (void*)subject_uri : (void*)subject_id; statement->object_type=subject_type; (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); statement->predicate=RAPTOR_RDF_predicate_URI(rdf_xml_parser); statement->object=predicate_uri ? (void*)predicate_uri : (void*)predicate_id; statement->object_type=predicate_type; (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); statement->predicate=RAPTOR_RDF_object_URI(rdf_xml_parser); statement->object=object_uri ? (void*)object_uri : (void*)object_id; statement->object_type=object_type; statement->object_literal_language=language; (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); generate_tidy: /* Tidy up things allocated here */ if(reified_id) RAPTOR_FREE(cstring, reified_id); if(uri1) raptor_free_uri_v2(rdf_parser->world, uri1); if(uri2) raptor_free_uri_v2(rdf_parser->world, uri2); } /** * raptor_rdfxml_element_has_property_attributes: * @element: element with the property attributes * * Return true if the element has at least one property attribute. * **/ static int raptor_rdfxml_element_has_property_attributes(raptor_rdfxml_element *element) { int i; if(element->xml_element->attribute_count >0) return 1; /* look for rdf: properties */ for(i=0; i<= RDF_ATTR_LAST; i++) { if(element->rdf_attr[i] && rdf_syntax_terms_info[i].type != RAPTOR_IDENTIFIER_TYPE_UNKNOWN) return 1; } return 0; } /** * raptor_rdfxml_process_property_attributes: * @rdf_parser: Raptor parser object * @attributes_element: element with the property attributes * @resource_element: element that defines the resource URI * subject_uri, subject_uri_source etc. * @property_node_identifier: Use this identifier for the resource URI * and count any ordinals for it locally * * Process the property attributes for an element for a given resource. * **/ static void raptor_rdfxml_process_property_attributes(raptor_parser *rdf_parser, raptor_rdfxml_element *attributes_element, raptor_rdfxml_element *resource_element, raptor_identifier *property_node_identifier) { unsigned int i; raptor_identifier *resource_identifier; resource_identifier=property_node_identifier ? property_node_identifier : &resource_element->subject; /* Process attributes as propAttr* = * (propName="string")* */ for(i=0; i < attributes_element->xml_element->attribute_count; i++) { raptor_qname* attr=attributes_element->xml_element->attributes[i]; const unsigned char *name; const unsigned char *value; int handled=0; if(!attr) continue; name=attr->local_name; value = attr->value; if(!attr->nspace) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "Using property attribute '%s' without a namespace is forbidden.", name); continue; } if(!raptor_utf8_is_nfc(value, strlen((const char*)value))) { const char *message="Property attribute '%s' has a string not in Unicode Normal Form C: %s"; raptor_rdfxml_update_document_locator(rdf_parser); if(rdf_parser->features[RAPTOR_FEATURE_NON_NFC_FATAL]) raptor_parser_error(rdf_parser, message, name, value); else raptor_parser_warning(rdf_parser, message, name, value); continue; } /* Generate the property statement using one of these properties: * 1) rdf:_n * 2) the URI from the rdf:* attribute where allowed * 3) otherwise forbidden (including rdf:li) */ if(attr->nspace->is_rdf_ms) { /* is rdf: namespace */ int ordinal=0; if(*name == '_') { /* recognise rdf:_ */ name++; ordinal=raptor_check_ordinal(name); if(ordinal < 1) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "Illegal ordinal value %d in property attribute '%s' seen on containing element '%s'.", ordinal, attr->local_name, name); ordinal=1; } } else { raptor_rdfxml_update_document_locator(rdf_parser); if(raptor_rdfxml_forbidden_propertyAttribute_name((const char*)name) > 0) raptor_parser_error(rdf_parser, "RDF term %s is forbidden as a property attribute.", name); else raptor_parser_warning(rdf_parser, "Unknown RDF namespace property attribute '%s'.", name); } if(ordinal >= 1) { /* Generate an ordinal property when there are no problems */ raptor_rdfxml_generate_statement(rdf_parser, resource_identifier->uri, resource_identifier->id, resource_identifier->type, resource_identifier->uri_source, NULL, NULL, RAPTOR_IDENTIFIER_TYPE_ORDINAL, RAPTOR_URI_SOURCE_NOT_URI, ordinal, (raptor_uri*)value, NULL, RAPTOR_IDENTIFIER_TYPE_LITERAL, RAPTOR_URI_SOURCE_NOT_URI, NULL, NULL, /* Property attributes are never reified*/ resource_element); handled=1; } } /* end is RDF namespace property */ if(!handled) /* else not rdf: namespace or unknown in rdf: namespace so * generate a statement with a literal object */ raptor_rdfxml_generate_statement(rdf_parser, resource_identifier->uri, resource_identifier->id, resource_identifier->type, resource_identifier->uri_source, attr->uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_ATTRIBUTE, 0, (raptor_uri*)value, NULL, RAPTOR_IDENTIFIER_TYPE_LITERAL, RAPTOR_URI_SOURCE_NOT_URI, NULL, NULL, /* Property attributes are never reified*/ resource_element); } /* end for ... attributes */ /* Handle rdf property attributes * (only rdf:type and rdf:value at present) */ for(i=0; i<= RDF_ATTR_LAST; i++) { const unsigned char *value=attributes_element->rdf_attr[i]; int object_is_literal=(rdf_syntax_terms_info[i].type == RAPTOR_IDENTIFIER_TYPE_LITERAL); raptor_uri *property_uri, *object_uri; raptor_identifier_type object_type; if(!value) continue; if(rdf_syntax_terms_info[i].type == RAPTOR_IDENTIFIER_TYPE_UNKNOWN) { const char *name=rdf_syntax_terms_info[i].name; if(raptor_rdfxml_forbidden_propertyAttribute_name(name)) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "RDF term %s is forbidden as a property attribute.", name); continue; } } if(object_is_literal && !raptor_utf8_is_nfc(value, strlen((const char*)value))) { const char *message="Property attribute '%s' has a string not in Unicode Normal Form C: %s"; raptor_rdfxml_update_document_locator(rdf_parser); if(rdf_parser->features[RAPTOR_FEATURE_NON_NFC_FATAL]) raptor_parser_error(rdf_parser, message, rdf_syntax_terms_info[i].name, value); else raptor_parser_warning(rdf_parser, message, rdf_syntax_terms_info[i].name, value); continue; } property_uri=raptor_new_uri_for_rdf_concept_v2(rdf_parser->world, (rdf_syntax_terms_info[i].name)); object_uri=object_is_literal ? (raptor_uri*)value : raptor_new_uri_relative_to_base_v2(rdf_parser->world, raptor_rdfxml_inscope_base_uri(rdf_parser), value); object_type=object_is_literal ? RAPTOR_IDENTIFIER_TYPE_LITERAL : RAPTOR_IDENTIFIER_TYPE_RESOURCE; raptor_rdfxml_generate_statement(rdf_parser, resource_identifier->uri, resource_identifier->id, resource_identifier->type, resource_identifier->uri_source, property_uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_ATTRIBUTE, 0, object_uri, NULL, object_type, RAPTOR_URI_SOURCE_NOT_URI, NULL, NULL, /* Property attributes are never reified*/ resource_element); if(!object_is_literal) raptor_free_uri_v2(rdf_parser->world, object_uri); raptor_free_uri_v2(rdf_parser->world, property_uri); } /* end for rdf:property values */ } static void raptor_rdfxml_start_element_grammar(raptor_parser *rdf_parser, raptor_rdfxml_element *element) { int finished; raptor_state state; raptor_xml_element* xml_element=element->xml_element; const unsigned char *el_name=raptor_xml_element_get_name(xml_element)->local_name; int element_in_rdf_ns=(raptor_xml_element_get_name(xml_element)->nspace && raptor_xml_element_get_name(xml_element)->nspace->is_rdf_ms); raptor_rdfxml_parser *rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; int rc=0; raptor_uri* base_uri; state=element->state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Starting in state %s\n", raptor_rdfxml_state_as_string(state)); #endif base_uri=raptor_rdfxml_inscope_base_uri(rdf_parser); finished= 0; while(!finished) { switch(state) { case RAPTOR_STATE_SKIPPING: element->child_state=state; element->child_content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED; finished=1; break; case RAPTOR_STATE_UNKNOWN: /* found <rdf:RDF> ? */ if(element_in_rdf_ns) { if(raptor_uri_equals_v2(rdf_parser->world, raptor_xml_element_get_name(xml_element)->uri, RAPTOR_RDF_RDF_URI(rdf_xml_parser))) { element->child_state=RAPTOR_STATE_NODE_ELEMENT_LIST; element->child_content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_NODES; /* Yes - need more content before can continue, * so wait for another element */ finished=1; break; } if(raptor_uri_equals_v2(rdf_parser->world, raptor_xml_element_get_name(xml_element)->uri, RAPTOR_RDF_Description_URI(rdf_xml_parser))) { state=RAPTOR_STATE_DESCRIPTION; element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; /* Yes - found something so move immediately to description */ break; } if(element_in_rdf_ns && (rc=raptor_rdfxml_forbidden_nodeElement_name((const char*)el_name))) { if(rc > 0) { raptor_parser_error(rdf_parser, "rdf:%s is forbidden as a node element.", el_name); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } else raptor_parser_warning(rdf_parser, "rdf:%s is an unknown RDF namespaced element.", el_name); } } /* If scanning for element, can continue */ if(rdf_parser->features[RAPTOR_FEATURE_SCANNING]) { finished=1; break; } /* Otherwise the choice of the next state can be made * from the current element by the OBJ state */ state=RAPTOR_STATE_NODE_ELEMENT_LIST; element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_NODES; break; case RAPTOR_STATE_NODE_ELEMENT_LIST: /* Handling * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElementList * * Everything goes to nodeElement */ state=RAPTOR_STATE_NODE_ELEMENT; element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; break; case RAPTOR_STATE_DESCRIPTION: case RAPTOR_STATE_NODE_ELEMENT: case RAPTOR_STATE_PARSETYPE_RESOURCE: case RAPTOR_STATE_PARSETYPE_COLLECTION: /* Handling <rdf:Description> or other node element * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElement * * or a property element acting as a node element for * rdf:parseType="Resource" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeResourcePropertyElt * or rdf:parseType="Collection" (and daml:Collection) * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeCollectionPropertyElt * * Only create a bag if bagID given */ if(!raptor_xml_element_get_name(xml_element)->uri) { /* We cannot handle this */ raptor_parser_warning(rdf_parser, "Using node element '%s' without a namespace is forbidden.", raptor_xml_element_get_name(xml_element)->local_name); raptor_rdfxml_update_document_locator(rdf_parser); element->state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } if(element_in_rdf_ns && (rc = raptor_rdfxml_forbidden_nodeElement_name((const char*)el_name))) { if(rc > 0) { raptor_parser_error(rdf_parser, "rdf:%s is forbidden as a node element.", el_name); state=RAPTOR_STATE_SKIPPING; element->state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } else raptor_parser_warning(rdf_parser, "rdf:%s is an unknown RDF namespaced element.", el_name); } if(element->content_type !=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION && element->content_type !=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION && element->parent && (element->parent->state == RAPTOR_STATE_PROPERTYELT || element->parent->state == RAPTOR_STATE_MEMBER_PROPERTYELT) && element->parent->xml_element->content_element_seen > 1) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "The enclosing property already has an object"); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } if(state == RAPTOR_STATE_NODE_ELEMENT || state == RAPTOR_STATE_DESCRIPTION || state == RAPTOR_STATE_PARSETYPE_COLLECTION) { if(element_in_rdf_ns && raptor_uri_equals_v2(rdf_parser->world, raptor_xml_element_get_name(xml_element)->uri, RAPTOR_RDF_Description_URI(rdf_xml_parser))) state=RAPTOR_STATE_DESCRIPTION; else state=RAPTOR_STATE_NODE_ELEMENT; } if((element->rdf_attr[RDF_ATTR_ID]!=NULL) + (element->rdf_attr[RDF_ATTR_about]!=NULL) + (element->rdf_attr[RDF_ATTR_nodeID]!=NULL)>1) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "Multiple attributes of rdf:ID, rdf:about and rdf:nodeID on element '%s' - only one allowed.", el_name); } if(element->rdf_attr[RDF_ATTR_ID]) { element->subject.id=element->rdf_attr[RDF_ATTR_ID]; element->rdf_attr[RDF_ATTR_ID]=NULL; element->subject.uri=raptor_new_uri_from_id_v2(rdf_parser->world, base_uri, element->subject.id); if(!element->subject.uri) goto oom; element->subject.type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; element->subject.uri_source=RAPTOR_URI_SOURCE_ID; if(!raptor_valid_xml_ID(rdf_parser, element->subject.id)) { raptor_parser_error(rdf_parser, "Illegal rdf:ID value '%s'", element->subject.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } if(raptor_rdfxml_record_ID(rdf_parser, element, element->subject.id)) { raptor_parser_error(rdf_parser, "Duplicated rdf:ID value '%s'", element->subject.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } } else if (element->rdf_attr[RDF_ATTR_about]) { element->subject.uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, base_uri, (const unsigned char*)element->rdf_attr[RDF_ATTR_about]); RAPTOR_FREE(cstring, (void*)element->rdf_attr[RDF_ATTR_about]); element->rdf_attr[RDF_ATTR_about]=NULL; if(!element->subject.uri) goto oom; element->subject.type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; element->subject.uri_source=RAPTOR_URI_SOURCE_URI; } else if (element->rdf_attr[RDF_ATTR_nodeID]) { element->subject.id=raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, (unsigned char*)element->rdf_attr[RDF_ATTR_nodeID]); element->rdf_attr[RDF_ATTR_nodeID]=NULL; if(!element->subject.id) goto oom; element->subject.type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; element->subject.uri_source=RAPTOR_URI_SOURCE_BLANK_ID; if(!raptor_valid_xml_ID(rdf_parser, element->subject.id)) { raptor_parser_error(rdf_parser, "Illegal rdf:nodeID value '%s'", element->subject.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } } else if (element->parent && element->parent->child_content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION && element->parent->child_content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION && (element->parent->object.uri || element->parent->object.id)) { /* copy from parent (property element), it has a URI for us */ raptor_copy_identifier(&element->subject, &element->parent->object); } else { element->subject.id=raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!element->subject.id) goto oom; element->subject.type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; element->subject.uri_source=RAPTOR_URI_SOURCE_GENERATED; } if(element->rdf_attr[RDF_ATTR_bagID]) { if(rdf_parser->features[RAPTOR_FEATURE_ALLOW_BAGID]) { element->bag.id=element->rdf_attr[RDF_ATTR_bagID]; element->rdf_attr[RDF_ATTR_bagID]=NULL; element->bag.uri=raptor_new_uri_from_id_v2(rdf_parser->world, base_uri, element->bag.id); if(!element->bag.uri) goto oom; element->bag.type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; element->bag.uri_source=RAPTOR_URI_SOURCE_GENERATED; if(!raptor_valid_xml_ID(rdf_parser, element->bag.id)) { raptor_parser_error(rdf_parser, "Illegal rdf:bagID value '%s'", element->bag.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } if(raptor_rdfxml_record_ID(rdf_parser, element, element->bag.id)) { raptor_parser_error(rdf_parser, "Duplicated rdf:bagID value '%s'", element->bag.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } raptor_parser_warning(rdf_parser, "rdf:bagID is deprecated."); raptor_rdfxml_generate_statement(rdf_parser, element->bag.uri, element->bag.id, element->bag.type, element->bag.uri_source, RAPTOR_RDF_type_URI(rdf_xml_parser), NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_URI, 0, RAPTOR_RDF_Bag_URI(rdf_xml_parser), NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_NOT_URI, NULL, NULL, NULL); } else { /* bagID forbidden */ raptor_parser_error(rdf_parser, "rdf:bagID is forbidden."); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } } if(element->parent) { /* In a rdf:parseType="Collection" the resources are appended * to the list at the genid element->parent->tail_id */ if (element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION || element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) { const unsigned char * idList = raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); /* <idList> rdf:type rdf:List */ raptor_uri *collection_uri=(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) ? RAPTOR_DAML_List_URI(rdf_xml_parser) : RAPTOR_RDF_List_URI(rdf_xml_parser); if(!idList) goto oom; if((element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) || rdf_parser->features[RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST]) raptor_rdfxml_generate_statement(rdf_parser, NULL, idList, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, RAPTOR_URI_SOURCE_ID, RAPTOR_RDF_type_URI(rdf_xml_parser), NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_URI, 0, collection_uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_URI, NULL, NULL, element); collection_uri=(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) ? RAPTOR_DAML_first_URI(rdf_xml_parser) : RAPTOR_RDF_first_URI(rdf_xml_parser); /* <idList> rdf:first <element->uri> */ raptor_rdfxml_generate_statement(rdf_parser, NULL, idList, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, RAPTOR_URI_SOURCE_ID, collection_uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_URI, 0, element->subject.uri, element->subject.id, element->subject.type, element->subject.uri_source, NULL, NULL, NULL); /* If there is no rdf:parseType="Collection" */ if (!element->parent->tail_id) { int len; unsigned char *new_id; /* Free any existing object URI still around * I suspect this can never happen. */ if(element->parent->object.uri) raptor_free_uri_v2(rdf_parser->world, element->parent->object.uri); len=strlen((char*)idList); new_id=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!len) { if(new_id) RAPTOR_FREE(cstring, new_id); return; } strncpy((char*)new_id, (char*)idList, len+1); element->parent->object.id=new_id; element->parent->object.type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; element->parent->object.uri_source=RAPTOR_URI_SOURCE_ID; } else { collection_uri=(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) ? RAPTOR_DAML_rest_URI(rdf_xml_parser) : RAPTOR_RDF_rest_URI(rdf_xml_parser); /* _:tail_id rdf:rest _:listRest */ raptor_rdfxml_generate_statement(rdf_parser, NULL, element->parent->tail_id, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, RAPTOR_URI_SOURCE_ID, collection_uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_URI, 0, NULL, idList, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, RAPTOR_URI_SOURCE_ID, NULL, NULL, NULL); } /* update new tail */ if(element->parent->tail_id) RAPTOR_FREE(cstring, (char*)element->parent->tail_id); element->parent->tail_id=idList; } else if(element->parent->state != RAPTOR_STATE_UNKNOWN && element->state != RAPTOR_STATE_PARSETYPE_RESOURCE) { /* If there is a parent element (property) containing this * element (node) and it has no object, set it from this subject */ if(element->parent->object.uri) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "Tried to set multiple objects of a statement"); } else { /* Store URI of this node in our parent as the property object */ raptor_copy_identifier(&element->parent->object, &element->subject); element->parent->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } } } /* If this is a node element, generate the rdf:type statement * from this node */ if(state == RAPTOR_STATE_NODE_ELEMENT) raptor_rdfxml_generate_statement(rdf_parser, element->subject.uri, element->subject.id, element->subject.type, element->subject.uri_source, RAPTOR_RDF_type_URI(rdf_xml_parser), NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_URI, 0, raptor_xml_element_get_name(xml_element)->uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, element->object.uri_source, NULL, &element->reified, element); raptor_rdfxml_process_property_attributes(rdf_parser, element, element, NULL); /* for both productions now need some more content or * property elements before can do any more work. */ element->child_state=RAPTOR_STATE_PROPERTYELT; element->child_content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; finished=1; break; case RAPTOR_STATE_PARSETYPE_OTHER: /* FALLTHROUGH */ case RAPTOR_STATE_PARSETYPE_LITERAL: raptor_xml_writer_start_element(rdf_xml_parser->xml_writer, xml_element); element->child_state = RAPTOR_STATE_PARSETYPE_LITERAL; element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL; finished=1; break; /* Handle all the detail of the various options of property element * http://www.w3.org/TR/rdf-syntax-grammar/#propertyElt * * All the attributes must be scanned here to see what additional * property element work is needed. No triples are generated * until the end of this element, until it is clear if the * element was empty. */ case RAPTOR_STATE_MEMBER_PROPERTYELT: case RAPTOR_STATE_PROPERTYELT: if(!raptor_xml_element_get_name(xml_element)->uri) { raptor_parser_error(rdf_parser, "Using property element '%s' without a namespace is forbidden.", raptor_xml_element_get_name(element->parent->xml_element)->local_name); raptor_rdfxml_update_document_locator(rdf_parser); element->state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } /* Handling rdf:li as a property, noting special processing */ if(element_in_rdf_ns && raptor_uri_equals_v2(rdf_parser->world, raptor_xml_element_get_name(xml_element)->uri, RAPTOR_RDF_li_URI(rdf_xml_parser))) { state=RAPTOR_STATE_MEMBER_PROPERTYELT; } if(element_in_rdf_ns && (rc = raptor_rdfxml_forbidden_propertyElement_name((const char*)el_name))) { if(rc > 0) { raptor_parser_error(rdf_parser, "rdf:%s is forbidden as a property element.", el_name); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } else raptor_parser_warning(rdf_parser, "rdf:%s is an unknown RDF namespaced element.", el_name); } /* rdf:ID on a property element - reify a statement. * Allowed on all property element forms */ if(element->rdf_attr[RDF_ATTR_ID]) { element->reified.id=element->rdf_attr[RDF_ATTR_ID]; element->rdf_attr[RDF_ATTR_ID]=NULL; element->reified.uri=raptor_new_uri_from_id_v2(rdf_parser->world, base_uri, element->reified.id); if(!element->reified.uri) goto oom; element->reified.type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; element->reified.uri_source=RAPTOR_URI_SOURCE_GENERATED; if(!raptor_valid_xml_ID(rdf_parser, element->reified.id)) { raptor_parser_error(rdf_parser, "Illegal rdf:ID value '%s'", element->reified.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } if(raptor_rdfxml_record_ID(rdf_parser, element, element->reified.id)) { raptor_parser_error(rdf_parser, "Duplicated rdf:ID value '%s'", element->reified.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } } /* rdf:datatype on a property element. * Only allowed for * http://www.w3.org/TR/rdf-syntax-grammar/#literalPropertyElt */ if (element->rdf_attr[RDF_ATTR_datatype]) { element->object_literal_datatype=raptor_new_uri_relative_to_base_v2(rdf_parser->world, base_uri, (const unsigned char*)element->rdf_attr[RDF_ATTR_datatype]); RAPTOR_FREE(cstring, (void*)element->rdf_attr[RDF_ATTR_datatype]); element->rdf_attr[RDF_ATTR_datatype]=NULL; if(!element->object_literal_datatype) goto oom; } if(element->rdf_attr[RDF_ATTR_bagID]) { if(rdf_parser->features[RAPTOR_FEATURE_ALLOW_BAGID]) { if(element->rdf_attr[RDF_ATTR_resource] || element->rdf_attr[RDF_ATTR_parseType]) { raptor_parser_error(rdf_parser, "rdf:bagID is forbidden on property element '%s' with an rdf:resource or rdf:parseType attribute.", el_name); /* prevent this being used later either */ element->rdf_attr[RDF_ATTR_bagID]=NULL; } else { element->bag.id=element->rdf_attr[RDF_ATTR_bagID]; element->rdf_attr[RDF_ATTR_bagID]=NULL; element->bag.uri=raptor_new_uri_from_id_v2(rdf_parser->world, base_uri, element->bag.id); if(!element->bag.uri) goto oom; element->bag.type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; element->bag.uri_source=RAPTOR_URI_SOURCE_GENERATED; if(!raptor_valid_xml_ID(rdf_parser, element->bag.id)) { raptor_parser_error(rdf_parser, "Illegal rdf:bagID value '%s'", element->bag.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } if(raptor_rdfxml_record_ID(rdf_parser, element, element->bag.id)) { raptor_parser_error(rdf_parser, "Duplicated rdf:bagID value '%s'", element->bag.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } raptor_parser_warning(rdf_parser, "rdf:bagID is deprecated."); } } else { /* bagID forbidden */ raptor_parser_error(rdf_parser, "rdf:bagID is forbidden."); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } } /* if rdf:bagID on property element */ element->child_content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT; if (element->rdf_attr[RDF_ATTR_parseType]) { const unsigned char *parse_type=element->rdf_attr[RDF_ATTR_parseType]; int i; int is_parseType_Literal=0; if(raptor_rdfxml_element_has_property_attributes(element)) { raptor_parser_error(rdf_parser, "Property attributes cannot be used with rdf:parseType='%s'", parse_type); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } /* Check for bad combinations of things with parseType */ for(i=0; i<= RDF_ATTR_LAST; i++) if(element->rdf_attr[i] && i != RDF_ATTR_parseType) { raptor_parser_error(rdf_parser, "Attribute '%s' cannot be used with rdf:parseType='%s'", rdf_syntax_terms_info[i].name, parse_type); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } if(!strcmp((char*)parse_type, "Literal")) is_parseType_Literal=1; else if (!strcmp((char*)parse_type, "Resource")) { state=RAPTOR_STATE_PARSETYPE_RESOURCE; element->child_state=RAPTOR_STATE_PROPERTYELT; element->child_content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; /* create a node for the subject of the contained properties */ element->subject.id=raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!element->subject.id) goto oom; element->subject.type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; element->subject.uri_source=RAPTOR_URI_SOURCE_GENERATED; } else if(!strcmp((char*)parse_type, "Collection")) { /* An rdf:parseType="Collection" appears as a single node */ element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; element->child_state=RAPTOR_STATE_PARSETYPE_COLLECTION; element->child_content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION; } else { if(rdf_parser->features[RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES] && !raptor_strcasecmp((char*)parse_type, "daml:collection")) { /* A DAML collection appears as a single node */ element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; element->child_state=RAPTOR_STATE_PARSETYPE_COLLECTION; element->child_content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION; } else { if(rdf_parser->features[RAPTOR_FEATURE_WARN_OTHER_PARSETYPES]) { raptor_parser_warning(rdf_parser, "Unknown rdf:parseType value '%s' taken as 'Literal'", parse_type); } is_parseType_Literal=1; } } if(is_parseType_Literal) { /* rdf:parseType="Literal" - explicitly or default * if the parseType value is not recognised */ rdf_xml_parser->xml_content=NULL; rdf_xml_parser->xml_content_length=0; rdf_xml_parser->iostream=raptor_new_iostream_to_string(&rdf_xml_parser->xml_content, &rdf_xml_parser->xml_content_length, raptor_alloc_memory); if(!rdf_xml_parser->iostream) goto oom; rdf_xml_parser->xml_writer=raptor_new_xml_writer_v2(rdf_parser->world, NULL, rdf_xml_parser->iostream, (raptor_simple_message_handler)raptor_parser_simple_error, rdf_parser, 1); if(!rdf_xml_parser->xml_writer) goto oom; raptor_xml_writer_set_feature(rdf_xml_parser->xml_writer, RAPTOR_FEATURE_WRITER_XML_DECLARATION, 0); element->child_state=RAPTOR_STATE_PARSETYPE_LITERAL; element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL; element->child_content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL; } } else { /* Can only be the empty property element case * http://www.w3.org/TR/rdf-syntax-grammar/#emptyPropertyElt */ /* The presence of the rdf:resource or rdf:nodeID * attributes is checked at element close time */ /* * Assign reified URI here so we don't reify property attributes * using this id */ if(element->reified.id && !element->reified.uri) { element->reified.uri=raptor_new_uri_from_id_v2(rdf_parser->world, base_uri, element->reified.id); if(!element->reified.uri) goto oom; element->reified.type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; element->reified.uri_source=RAPTOR_URI_SOURCE_GENERATED; } if(element->rdf_attr[RDF_ATTR_resource] || element->rdf_attr[RDF_ATTR_nodeID]) { /* Done - wait for end of this element to end in order to * check the element was empty as expected */ element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } else { /* Otherwise process content in obj (value) state */ element->child_state=RAPTOR_STATE_NODE_ELEMENT_LIST; element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT; } } finished=1; break; case RAPTOR_STATE_INVALID: default: raptor_parser_fatal_error(rdf_parser, "raptor_rdfxml_start_element_grammar: Unexpected parser state %d - %s", state, raptor_rdfxml_state_as_string(state)); finished=1; } /* end switch */ if(state != element->state) { element->state=state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Moved to state %d - %s\n", state, raptor_rdfxml_state_as_string(state)); #endif } } /* end while */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Ending in state %s\n", raptor_rdfxml_state_as_string(state)); #endif return; oom: raptor_parser_fatal_error(rdf_parser, "Out of memory, skipping"); element->state=RAPTOR_STATE_SKIPPING; } static void raptor_rdfxml_end_element_grammar(raptor_parser *rdf_parser, raptor_rdfxml_element *element) { raptor_state state; int finished; raptor_xml_element* xml_element=element->xml_element; const unsigned char *el_name=raptor_xml_element_get_name(xml_element)->local_name; int element_in_rdf_ns=(raptor_xml_element_get_name(xml_element)->nspace && raptor_xml_element_get_name(xml_element)->nspace->is_rdf_ms); raptor_rdfxml_parser *rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; state=element->state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Starting in state %s\n", raptor_rdfxml_state_as_string(state)); #endif finished= 0; while(!finished) { switch(state) { case RAPTOR_STATE_SKIPPING: finished=1; break; case RAPTOR_STATE_UNKNOWN: finished=1; break; case RAPTOR_STATE_NODE_ELEMENT_LIST: if(element_in_rdf_ns && raptor_uri_equals_v2(rdf_parser->world, raptor_xml_element_get_name(xml_element)->uri, RAPTOR_RDF_RDF_URI(rdf_xml_parser))) { /* end of RDF - boo hoo */ state=RAPTOR_STATE_UNKNOWN; finished=1; break; } /* When scanning, another element ending is outside the RDF * world so this can happen without further work */ if(rdf_parser->features[RAPTOR_FEATURE_SCANNING]) { state=RAPTOR_STATE_UNKNOWN; finished=1; break; } /* otherwise found some junk after RDF content in an RDF-only * document (probably never get here since this would be * a mismatched XML tag and cause an error earlier) */ raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_warning(rdf_parser, "Element '%s' ended, expected end of RDF element", el_name); state=RAPTOR_STATE_UNKNOWN; finished=1; break; case RAPTOR_STATE_DESCRIPTION: case RAPTOR_STATE_NODE_ELEMENT: case RAPTOR_STATE_PARSETYPE_RESOURCE: /* If there is a parent element containing this element and * the parent isn't a description, has an identifier, * create the statement between this node using parent property * (Need to check for identifier so that top-level typed nodes * don't get connect to <rdf:RDF> parent element) */ if(state == RAPTOR_STATE_NODE_ELEMENT && element->parent && (element->parent->subject.uri || element->parent->subject.id)) raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject.uri, element->parent->subject.id, element->parent->subject.type, element->parent->subject.uri_source, raptor_xml_element_get_name(element->parent->xml_element)->uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_ELEMENT, 0, element->subject.uri, element->subject.id, element->subject.type, element->subject.uri_source, NULL, NULL, element); else if(state == RAPTOR_STATE_PARSETYPE_RESOURCE && element->parent && (element->parent->subject.uri || element->parent->subject.id)) { /* Handle rdf:li as the rdf:parseType="resource" property */ if(element_in_rdf_ns && raptor_uri_equals_v2(rdf_parser->world, raptor_xml_element_get_name(xml_element)->uri, RAPTOR_RDF_li_URI(rdf_xml_parser))) { element->parent->last_ordinal++; raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject.uri, element->parent->subject.id, element->parent->subject.type, element->parent->subject.uri_source, NULL, NULL, RAPTOR_IDENTIFIER_TYPE_ORDINAL, RAPTOR_URI_SOURCE_NOT_URI, element->parent->last_ordinal, element->subject.uri, element->subject.id, element->subject.type, element->subject.uri_source, NULL, &element->reified, element->parent); } else { raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject.uri, element->parent->subject.id, element->parent->subject.type, element->parent->subject.uri_source, raptor_xml_element_get_name(xml_element)->uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_ELEMENT, 0, element->subject.uri, element->subject.id, element->subject.type, element->subject.uri_source, NULL, &element->reified, element->parent); } } finished=1; break; case RAPTOR_STATE_PARSETYPE_COLLECTION: finished=1; break; case RAPTOR_STATE_PARSETYPE_OTHER: /* FALLTHROUGH */ case RAPTOR_STATE_PARSETYPE_LITERAL: element->parent->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL; raptor_xml_writer_end_element(rdf_xml_parser->xml_writer, xml_element); finished=1; break; case RAPTOR_STATE_PROPERTYELT: case RAPTOR_STATE_MEMBER_PROPERTYELT: /* A property element * http://www.w3.org/TR/rdf-syntax-grammar/#propertyElt * * Literal content part is handled here. * The element content is handled in the internal states * Empty content is checked here. */ if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT) { if(xml_element->content_cdata_seen) element->content_type= RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL; else if (xml_element->content_element_seen) element->content_type= RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; else { /* Empty Literal */ element->object.type= RAPTOR_IDENTIFIER_TYPE_LITERAL; element->content_type= RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL; } } /* Handle terminating a rdf:parseType="Collection" list */ if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION || element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) { raptor_uri* nil_uri=(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) ? RAPTOR_DAML_nil_URI(rdf_xml_parser) : RAPTOR_RDF_nil_URI(rdf_xml_parser); if (!element->tail_id) { /* If No List: set object of statement to rdf:nil */ element->object.uri= raptor_uri_copy_v2(rdf_parser->world, nil_uri); element->object.id= NULL; element->object.type= RAPTOR_IDENTIFIER_TYPE_RESOURCE; element->object.uri_source= RAPTOR_URI_SOURCE_URI; } else { raptor_uri* rest_uri=(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) ? RAPTOR_DAML_rest_URI(rdf_xml_parser) : RAPTOR_RDF_rest_URI(rdf_xml_parser); /* terminate the list */ raptor_rdfxml_generate_statement(rdf_parser, NULL, element->tail_id, RAPTOR_IDENTIFIER_TYPE_ANONYMOUS, RAPTOR_URI_SOURCE_ID, rest_uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_URI, 0, nil_uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_URI, NULL, NULL, NULL); } } /* end rdf:parseType="Collection" termination */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Content type %s (%d)\n", raptor_rdfxml_element_content_type_as_string(element->content_type), element->content_type); #endif switch(element->content_type) { case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE: if(raptor_rdfxml_element_has_property_attributes(element) && element->child_state == RAPTOR_STATE_DESCRIPTION) { raptor_parser_error(rdf_parser, "Property element '%s' has both property attributes and a node element content", el_name); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } if(element->object.type == RAPTOR_IDENTIFIER_TYPE_UNKNOWN) { if(element->rdf_attr[RDF_ATTR_resource]) { element->object.uri=raptor_new_uri_relative_to_base_v2(rdf_parser->world, raptor_rdfxml_inscope_base_uri(rdf_parser), (const unsigned char*)element->rdf_attr[RDF_ATTR_resource]); RAPTOR_FREE(cstring, (void*)element->rdf_attr[RDF_ATTR_resource]); element->rdf_attr[RDF_ATTR_resource]=NULL; if(!element->object.uri) goto oom; element->object.type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; element->object.uri_source=RAPTOR_URI_SOURCE_URI; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } else if(element->rdf_attr[RDF_ATTR_nodeID]) { element->object.id=raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, (unsigned char*)element->rdf_attr[RDF_ATTR_nodeID]); element->rdf_attr[RDF_ATTR_nodeID]=NULL; if(!element->object.id) goto oom; element->object.type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; element->object.uri_source=RAPTOR_URI_SOURCE_BLANK_ID; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; if(!raptor_valid_xml_ID(rdf_parser, element->object.id)) { raptor_parser_error(rdf_parser, "Illegal rdf:nodeID value '%s'", element->object.id); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } } else { element->object.id=raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!element->object.id) goto oom; element->object.type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; element->object.uri_source=RAPTOR_URI_SOURCE_GENERATED; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } raptor_rdfxml_process_property_attributes(rdf_parser, element, element->parent, &element->object); } /* We know object is a resource, so delete any unsignficant * whitespace so that FALLTHROUGH code below finds the object. */ if(xml_element->content_cdata_length) { raptor_free_stringbuffer(xml_element->content_cdata_sb); xml_element->content_cdata_sb=NULL; xml_element->content_cdata_length=0; } /* FALLTHROUGH */ case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL: if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL) { if(rdf_parser->features[RAPTOR_FEATURE_ALLOW_BAGID]) { /* Only an empty literal can have a rdf:bagID */ if(element->bag.uri || element->bag.id) { if(xml_element->content_cdata_length > 0) { raptor_parser_error(rdf_parser, "rdf:bagID is forbidden on a literal property element '%s'.", el_name); /* prevent this being used later either */ element->rdf_attr[RDF_ATTR_bagID]=NULL; } else raptor_rdfxml_generate_statement(rdf_parser, element->bag.uri, element->bag.id, element->bag.type, element->bag.uri_source, RAPTOR_RDF_type_URI(rdf_xml_parser), NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_URI, 0, RAPTOR_RDF_Bag_URI(rdf_xml_parser), NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_NOT_URI, NULL, NULL, NULL); } } /* if rdf:bagID */ /* If there is empty literal content with properties * generate a node to hang properties off */ if(raptor_rdfxml_element_has_property_attributes(element) && xml_element->content_cdata_length > 0) { raptor_parser_error(rdf_parser, "Literal property element '%s' has property attributes", el_name); state=RAPTOR_STATE_SKIPPING; element->child_state=RAPTOR_STATE_SKIPPING; finished=1; break; } if(element->object.type == RAPTOR_IDENTIFIER_TYPE_LITERAL && raptor_rdfxml_element_has_property_attributes(element) && !element->object.uri) { element->object.id=raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, NULL); if(!element->object.id) goto oom; element->object.type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; element->object.uri_source=RAPTOR_URI_SOURCE_GENERATED; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } raptor_rdfxml_process_property_attributes(rdf_parser, element, element, &element->object); } /* just be friendly to older compilers and don't declare * variables in the middle of a block */ if(1) { raptor_uri *predicate_uri=NULL; raptor_identifier_type predicate_type; int predicate_ordinal=0; raptor_uri *object_uri; raptor_identifier_type object_type; raptor_uri *literal_datatype=NULL; const unsigned char* empty_literal=(const unsigned char*)""; if(state == RAPTOR_STATE_MEMBER_PROPERTYELT) { element->parent->last_ordinal++; predicate_ordinal=element->parent->last_ordinal; predicate_type=RAPTOR_IDENTIFIER_TYPE_ORDINAL; } else { predicate_uri=raptor_xml_element_get_name(xml_element)->uri; predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; } if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL) { unsigned char* literal; object_type=RAPTOR_IDENTIFIER_TYPE_LITERAL; literal=raptor_stringbuffer_as_string(xml_element->content_cdata_sb); literal_datatype=element->object_literal_datatype; if(!literal_datatype && literal && !raptor_utf8_is_nfc(literal, xml_element->content_cdata_length)) { const char *message="Property element '%s' has a string not in Unicode Normal Form C: %s"; raptor_rdfxml_update_document_locator(rdf_parser); if(rdf_parser->features[RAPTOR_FEATURE_NON_NFC_FATAL]) raptor_parser_error(rdf_parser, message, el_name, literal); else raptor_parser_warning(rdf_parser, message, el_name, literal); } if(!literal) /* empty literal */ literal=(unsigned char*)empty_literal; object_uri=(raptor_uri*)literal; } else { object_type=element->object.type; object_uri=element->object.uri; } raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject.uri, element->parent->subject.id, element->parent->subject.type, RAPTOR_URI_SOURCE_ELEMENT, predicate_uri, NULL, predicate_type, RAPTOR_URI_SOURCE_NOT_URI, predicate_ordinal, object_uri, element->object.id, object_type, element->object.uri_source, literal_datatype, &element->reified, element->parent); } break; case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL: { unsigned char *buffer; unsigned int length; if(rdf_xml_parser->xml_writer) { raptor_xml_writer_flush(rdf_xml_parser->xml_writer); raptor_free_iostream(rdf_xml_parser->iostream); rdf_xml_parser->iostream=NULL; buffer=(unsigned char*)rdf_xml_parser->xml_content; length=rdf_xml_parser->xml_content_length; } else { buffer=raptor_stringbuffer_as_string(xml_element->content_cdata_sb); length=xml_element->content_cdata_length; } if(!raptor_utf8_is_nfc(buffer, length)) { const char *message="Property element '%s' has XML literal content not in Unicode Normal Form C: %s"; raptor_rdfxml_update_document_locator(rdf_parser); if(rdf_parser->features[RAPTOR_FEATURE_NON_NFC_FATAL]) raptor_parser_error(rdf_parser, message, el_name, buffer); else raptor_parser_warning(rdf_parser, message, el_name, buffer); } if(state == RAPTOR_STATE_MEMBER_PROPERTYELT) { element->parent->last_ordinal++; raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject.uri, element->parent->subject.id, element->parent->subject.type, element->parent->subject.uri_source, NULL, NULL, RAPTOR_IDENTIFIER_TYPE_ORDINAL, RAPTOR_URI_SOURCE_NOT_URI, element->parent->last_ordinal, (raptor_uri*)buffer, NULL, RAPTOR_IDENTIFIER_TYPE_LITERAL, RAPTOR_URI_SOURCE_NOT_URI, RAPTOR_RDF_XMLLiteral_URI(rdf_xml_parser), &element->reified, element->parent); } else { raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject.uri, element->parent->subject.id, element->parent->subject.type, element->parent->subject.uri_source, raptor_xml_element_get_name(xml_element)->uri, NULL, RAPTOR_IDENTIFIER_TYPE_RESOURCE, RAPTOR_URI_SOURCE_ELEMENT, 0, (raptor_uri*)buffer, NULL, RAPTOR_IDENTIFIER_TYPE_LITERAL, RAPTOR_URI_SOURCE_NOT_URI, RAPTOR_RDF_XMLLiteral_URI(rdf_xml_parser), &element->reified, element->parent); } /* Finish the xml writer iostream for parseType="Literal" */ if(rdf_xml_parser->xml_writer) { raptor_free_xml_writer(rdf_xml_parser->xml_writer); RAPTOR_FREE(cstring, rdf_xml_parser->xml_content); rdf_xml_parser->xml_content=NULL; rdf_xml_parser->xml_content_length=0; } } break; case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_NODES: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_UNKNOWN: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST: default: raptor_parser_fatal_error(rdf_parser, "%s: Internal error in state RAPTOR_STATE_PROPERTYELT - got unexpected content type %s (%d)", __func__, raptor_rdfxml_element_content_type_as_string(element->content_type), element->content_type); } /* end switch */ finished=1; break; case RAPTOR_STATE_INVALID: default: raptor_parser_fatal_error(rdf_parser, "raptor_rdfxml_end_element_grammar: Unexpected parser state %d - %s", state, raptor_rdfxml_state_as_string(state)); finished=1; } /* end switch */ if(state != element->state) { element->state=state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Moved to state %d - %s\n", state, raptor_rdfxml_state_as_string(state)); #endif } } /* end while */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Ending in state %s\n", raptor_rdfxml_state_as_string(state)); #endif return; oom: raptor_parser_fatal_error(rdf_parser, "Out of memory, skipping"); element->state=RAPTOR_STATE_SKIPPING; } static void raptor_rdfxml_cdata_grammar(raptor_parser *rdf_parser, const unsigned char *s, int len, int is_cdata) { raptor_rdfxml_parser* rdf_xml_parser; raptor_rdfxml_element* element; raptor_xml_element* xml_element; raptor_state state; int all_whitespace=1; int i; rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; if(rdf_parser->failed) return; #ifdef RAPTOR_DEBUG_CDATA RAPTOR_DEBUG2("Adding characters (is_cdata=%d): '", is_cdata); (void)fwrite(s, 1, len, stderr); fprintf(stderr, "' (%d bytes)\n", len); #endif for(i=0; i<len; i++) if(!isspace(s[i])) { all_whitespace=0; break; } element=rdf_xml_parser->current_element; /* this file is very broke - probably not XML, whatever */ if(!element) return; xml_element=element->xml_element; raptor_rdfxml_update_document_locator(rdf_parser); /* cdata never changes the parser state * and the containing element state always determines what to do. * Use the child_state first if there is one, since that applies */ state=element->child_state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Working in state %s\n", raptor_rdfxml_state_as_string(state)); #endif #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Content type %s (%d)\n", raptor_rdfxml_element_content_type_as_string(element->content_type), element->content_type); #endif if(state == RAPTOR_STATE_SKIPPING) return; if(state == RAPTOR_STATE_UNKNOWN) { /* Ignore all cdata if still looking for RDF */ if(rdf_parser->features[RAPTOR_FEATURE_SCANNING]) return; /* Ignore all whitespace cdata before first element */ if(all_whitespace) return; /* This probably will never happen since that would make the * XML not be well-formed */ raptor_parser_warning(rdf_parser, "Character data before RDF element."); } if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES) { /* If found non-whitespace content, move to literal content */ if(!all_whitespace) element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL; } if(!rdf_content_type_info[element->child_content_type].whitespace_significant) { /* Whitespace is ignored except for literal or preserved content types */ if(all_whitespace) { #ifdef RAPTOR_DEBUG_CDATA RAPTOR_DEBUG2("Ignoring whitespace cdata inside element '%s'\n", raptor_xml_element_get_name(element->parent->xml_element)->local_name); #endif return; } if(xml_element->content_cdata_seen && xml_element->content_element_seen) { /* Uh oh - mixed content, this element has elements too */ raptor_parser_warning(rdf_parser, "element '%s' has mixed content.", raptor_xml_element_get_name(element->parent->xml_element)->local_name); } } if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT) { element->content_type=RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Content type changed to %s (%d)\n", raptor_rdfxml_element_content_type_as_string(element->content_type), element->content_type); #endif } if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL) raptor_xml_writer_cdata_counted(rdf_xml_parser->xml_writer, s, len); else { raptor_stringbuffer_append_counted_string(xml_element->content_cdata_sb, s, len, 1); element->content_cdata_all_whitespace &= all_whitespace; /* adjust stored length */ xml_element->content_cdata_length += len; } #ifdef RAPTOR_DEBUG_CDATA RAPTOR_DEBUG3("Content cdata now: %d bytes\n", xml_element->content_cdata_length); #endif #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Ending in state %s\n", raptor_rdfxml_state_as_string(state)); #endif } /** * raptor_rdfxml_inscope_base_uri: * @rdf_parser: Raptor parser object * * Return the in-scope base URI. * * Looks for the innermost xml:base on an element or document URI * * Return value: The URI string value or NULL on failure. **/ static raptor_uri* raptor_rdfxml_inscope_base_uri(raptor_parser *rdf_parser) { raptor_rdfxml_parser *rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; raptor_uri* base_uri; base_uri=raptor_sax2_inscope_base_uri(rdf_xml_parser->sax2); if(!base_uri) base_uri=rdf_parser->base_uri; return base_uri; } /** * raptor_rdfxml_record_ID: * @rdf_parser: Raptor parser object * @element: Current element * @id: ID string * * Record an rdf:ID / rdf:bagID value (with xml base) and check it hasn't been seen already. * * Record and check the ID values, if they have been seen already. * per in-scope-base URI. * * Return value: non-zero if already seen, or failure **/ static int raptor_rdfxml_record_ID(raptor_parser *rdf_parser, raptor_rdfxml_element *element, const unsigned char *id) { raptor_rdfxml_parser *rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; raptor_uri* base_uri=raptor_rdfxml_inscope_base_uri(rdf_parser); size_t id_len=strlen((const char*)id); int rc; if(!rdf_parser->features[RAPTOR_FEATURE_CHECK_RDF_ID]) return 0; rc=raptor_id_set_add(rdf_xml_parser->id_set, base_uri, id, id_len); return (rc != 0); } static void raptor_rdfxml_update_document_locator(raptor_parser *rdf_parser) { raptor_rdfxml_parser *rdf_xml_parser=(raptor_rdfxml_parser*)rdf_parser->context; raptor_sax2_update_document_locator(rdf_xml_parser->sax2, &rdf_parser->locator); } static void raptor_rdfxml_parse_finish_factory(raptor_parser_factory* factory) { } static int raptor_rdfxml_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_rdfxml_parser); factory->need_base_uri = 1; factory->init = raptor_rdfxml_parse_init; factory->terminate = raptor_rdfxml_parse_terminate; factory->start = raptor_rdfxml_parse_start; factory->chunk = raptor_rdfxml_parse_chunk; factory->finish_factory = raptor_rdfxml_parse_finish_factory; factory->recognise_syntax = raptor_rdfxml_parse_recognise_syntax; rc+= raptor_parser_factory_add_alias(factory, "raptor") != 0; rc+= raptor_parser_factory_add_uri(factory, (const unsigned char*)"http://www.w3.org/TR/rdf-syntax-grammar") != 0; rc+= raptor_parser_factory_add_mime_type(factory, "application/rdf+xml", 10) != 0; rc+= raptor_parser_factory_add_mime_type(factory, "text/rdf", 6) != 0; return rc; } int raptor_init_parser_rdfxml(raptor_world* world) { return !raptor_parser_register_factory(world, "rdfxml", "RDF/XML", &raptor_rdfxml_parser_register_factory); } #if RAPTOR_DEBUG > 1 void raptor_rdfxml_parser_stats_print(raptor_rdfxml_parser* rdf_xml_parser, FILE *stream) { fputs("rdf:ID set ", stream); raptor_id_set_stats_print(rdf_xml_parser->id_set, stream); } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/snprintf.c������������������������������������������������������������������������0000644�0001750�0001750�00000005156�11330672502�012633� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * This file is in the Public Domain * * Based on code from Public Domain snprintf.c from mutt * http://dev.mutt.org/hg/mutt/file/55cd4cb611d9/snprintf.c * Tue Aug 08 22:49:12 2006 +0000 * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include "raptor.h" #include "raptor_internal.h" #include <float.h> #define __USE_ISOC99 1 #include <math.h> #ifndef HAVE_ROUND /* round (C99): round x to the nearest integer, away from zero */ #define round(x) (((x) < 0) ? (long)((x)-0.5) : (long)((x)+0.5)) #endif #ifndef HAVE_TRUNC /* trunc (C99): round x to the nearest integer, towards zero */ #define trunc(x) (((x) < 0) ? ceil((x)) : floor((x))) #endif /* Convert a double to xsd:decimal representation. * Returned is a pointer to the first character of the number * in buffer (don't free it). */ char* raptor_format_float(char *buffer, size_t *currlen, size_t maxlen, double fvalue, unsigned int min, unsigned int max, int flags) { /* DBL_EPSILON = 52 digits */ #define FRAC_MAX_LEN 52 double ufvalue; double intpart; double fracpart = 0; double frac; double frac_delta = 10; double mod_10; size_t exp_len; size_t frac_len = 0; size_t idx; if (max < min) max = min; /* index to the last char */ idx = maxlen - 1; buffer[idx--] = '\0'; ufvalue = fabs (fvalue); intpart = round(ufvalue); /* We "cheat" by converting the fractional part to integer by * multiplying by a factor of 10 */ frac = (ufvalue - intpart); for (exp_len=0; exp_len <= max; ++exp_len) { frac *= 10; mod_10 = trunc(fmod(trunc(frac), 10)); if (fabs(frac_delta - (fracpart / pow(10, exp_len))) < (DBL_EPSILON * 2.0)) { break; } frac_delta = fracpart / pow(10, exp_len); /* Only "append" (numerically) if digit is not a zero */ if (mod_10 > 0 && mod_10 < 10) { fracpart = round(frac); frac_len = exp_len; } } if (frac_len < min) { buffer[idx--] = '0'; } else { /* Convert/write fractional part (right to left) */ do { mod_10 = fmod(trunc(fracpart), 10); --frac_len; buffer[idx--] = "0123456789"[(unsigned)mod_10]; fracpart /= 10; } while(fracpart > 1 && (frac_len + 1) > 0); } buffer[idx--] = '.'; /* Convert/write integer part (right to left) */ do { buffer[idx--] = "0123456789"[(int)fmod(intpart, 10)]; intpart /= 10; } while(round(intpart)); /* Write a sign, if requested */ if(fvalue < 0) buffer[idx--] = '-'; else if(flags) buffer[idx--] = '+'; *currlen = maxlen - idx - 2; return buffer + idx + 1; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/ntriples_parse.c������������������������������������������������������������������0000644�0001750�0001750�00000100155�11330672502�014015� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * ntriples_parse.c - Raptor N-Triples Parser implementation * * N-Triples * http://www.w3.org/TR/rdf-testcases/#ntriples * * Copyright (C) 2001-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2001-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" /* Set RAPTOR_DEBUG to > 1 to get lots of buffer related debugging */ /* #undef RAPTOR_DEBUG #define RAPTOR_DEBUG 2 */ /* Prototypes for local functions */ static void raptor_ntriples_generate_statement(raptor_parser* parser, const unsigned char *subject, const raptor_ntriples_term_type subject_type, const unsigned char *predicate, const raptor_ntriples_term_type predicate_type, const void *object, const raptor_ntriples_term_type object_type, const unsigned char *object_literal_language, const unsigned char *object_literal_datatype); /* * NTriples parser object */ struct raptor_ntriples_parser_context_s { /* current line */ unsigned char *line; /* current line length */ int line_length; /* current char in line buffer */ int offset; char last_char; /* static statement for use in passing to user code */ raptor_statement statement; }; typedef struct raptor_ntriples_parser_context_s raptor_ntriples_parser_context; /** * raptor_ntriples_parse_init: * * Initialise the Raptor NTriples parser. * * Return value: non 0 on failure **/ static int raptor_ntriples_parse_init(raptor_parser* rdf_parser, const char *name) { /*raptor_ntriples_parser_context *ntriples_parser=(raptor_ntriples_parser_context*)rdf_parser->context; */ return 0; } /* PUBLIC FUNCTIONS */ /* * raptor_ntriples_parse_terminate - Free the Raptor NTriples parser * @rdf_parser: parser object * **/ static void raptor_ntriples_parse_terminate(raptor_parser* rdf_parser) { raptor_ntriples_parser_context *ntriples_parser=(raptor_ntriples_parser_context*)rdf_parser->context; if(ntriples_parser->line_length) RAPTOR_FREE(cdata, ntriples_parser->line); } static const char * const term_type_strings[]={ "URIref", "bnodeID", "Literal" }; #ifndef RAPTOR_DISABLE_DEPRECATED /** * raptor_ntriples_term_as_string: * @term: N-Triples term. * * Get a label for a #raptor_ntriples_term_type. * * @deprecated: an internal debug function, do not use. * * Return value: a pointer to a constant string. **/ const char * raptor_ntriples_term_as_string(raptor_ntriples_term_type term) { return term_type_strings[(int)term]; } #endif static void raptor_ntriples_generate_statement(raptor_parser* parser, const unsigned char *subject, const raptor_ntriples_term_type subject_type, const unsigned char *predicate, const raptor_ntriples_term_type predicate_type, const void *object, const raptor_ntriples_term_type object_type, const unsigned char *object_literal_language, const unsigned char *object_literal_datatype) { /* raptor_ntriples_parser_context *ntriples_parser=(raptor_ntriples_parser_context*)parser->context; */ raptor_statement *statement=&parser->statement; raptor_uri *subject_uri=NULL; raptor_uri *predicate_uri=NULL; raptor_uri *object_uri=NULL; raptor_uri *datatype_uri=NULL; /* Two choices for subject from N-Triples */ if(subject_type == RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE) { statement->subject=subject; statement->subject_type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; } else { subject_uri=raptor_new_uri_v2(parser->world, subject); if(!subject_uri) { raptor_parser_error(parser, "Could not create subject uri '%s', skipping", subject); goto cleanup; } statement->subject=subject_uri; statement->subject_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; } if(object_literal_datatype) { datatype_uri=raptor_new_uri_v2(parser->world, object_literal_datatype); if(!datatype_uri) { raptor_parser_error(parser, "Could not create object literal datatype uri '%s', skipping", object_literal_datatype); goto cleanup; } object_literal_language=NULL; } /* Predicates in N-Triples are URIs but check for bad ordinals */ if(!strncmp((const char*)predicate, "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) { int predicate_ordinal=raptor_check_ordinal(predicate+44); if(predicate_ordinal <= 0) raptor_parser_error(parser, "Illegal ordinal value %d in property '%s'.", predicate_ordinal, predicate); } predicate_uri=raptor_new_uri_v2(parser->world, predicate); if(!predicate_uri) { raptor_parser_error(parser, "Could not create predicate uri '%s', skipping", predicate); goto cleanup; } statement->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; statement->predicate=predicate_uri; /* Three choices for object from N-Triples */ statement->object_literal_language=NULL; statement->object_literal_datatype=NULL; if(object_type == RAPTOR_NTRIPLES_TERM_TYPE_URI_REF) { object_uri=raptor_new_uri_v2(parser->world, (const unsigned char*)object); if(!object_uri) { raptor_parser_error(parser, "Could not create object uri '%s', skipping", (const char *)object); goto cleanup; } statement->object=object_uri; statement->object_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; } else if(object_type == RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE) { statement->object=object; statement->object_type=RAPTOR_IDENTIFIER_TYPE_ANONYMOUS; } else { statement->object_type=RAPTOR_IDENTIFIER_TYPE_LITERAL; statement->object=object; statement->object_literal_language=object_literal_language; statement->object_literal_datatype=datatype_uri; } if(!parser->statement_handler) goto cleanup; /* Generate the statement; or is it fact? */ (*parser->statement_handler)(parser->user_data, statement); cleanup: if(subject_uri) raptor_free_uri_v2(parser->world, subject_uri); if(predicate_uri) raptor_free_uri_v2(parser->world, predicate_uri); if(object_uri) raptor_free_uri_v2(parser->world, object_uri); if(datatype_uri) raptor_free_uri_v2(parser->world, datatype_uri); } /* These are for 7-bit ASCII and not locale-specific */ #define IS_ASCII_ALPHA(c) (((c)>0x40 && (c)<0x5B) || ((c)>0x60 && (c)<0x7B)) #define IS_ASCII_UPPER(c) ((c)>0x40 && (c)<0x5B) #define IS_ASCII_DIGIT(c) ((c)>0x2F && (c)<0x3A) #define IS_ASCII_PRINT(c) ((c)>0x1F && (c)<0x7F) #define TO_ASCII_LOWER(c) ((c)+0x20) typedef enum { RAPTOR_TERM_CLASS_URI, /* ends on > */ RAPTOR_TERM_CLASS_BNODEID, /* ends on first non [A-Za-z][A-Za-z0-9]* */ RAPTOR_TERM_CLASS_STRING, /* ends on non-escaped " */ RAPTOR_TERM_CLASS_LANGUAGE, /* ends on first non [a-z0-9]+ ('-' [a-z0-9]+ )? */ RAPTOR_TERM_CLASS_FULL /* the entire string is used */ } raptor_ntriples_term_class; static int raptor_ntriples_term_valid(unsigned char c, int position, raptor_ntriples_term_class term_class) { int result=0; switch(term_class) { case RAPTOR_TERM_CLASS_URI: /* ends on > */ result=(c!= '>'); break; case RAPTOR_TERM_CLASS_BNODEID: /* ends on first non [A-Za-z][A-Za-z0-9]* */ result=IS_ASCII_ALPHA(c); if(position) result = (result || IS_ASCII_DIGIT(c)); break; case RAPTOR_TERM_CLASS_STRING: /* ends on " */ result=(c!= '"'); break; case RAPTOR_TERM_CLASS_LANGUAGE: /* ends on first non [a-z0-9]+ ('-' [a-z0-9]+ )? */ result=(IS_ASCII_ALPHA(c) || IS_ASCII_DIGIT(c)); if(position) result = (result || c=='-'); break; case RAPTOR_TERM_CLASS_FULL: result=1; break; default: RAPTOR_FATAL2("Unknown ntriples term %d", term_class); } return result; } /* * raptor_ntriples_term - Parse an N-Triples term with escapes * @parser: NTriples parser * @start: pointer to starting character of string (in) * @dest: destination of string (in) * @lenp: pointer to length of string (in/out) * @dest_lenp: pointer to length of destination string (out) * @end_char: string ending character * @class: string class * @allow_utf8: Non-0 if UTF-8 chars are allowed in the term * * N-Triples strings/URIs are written in ASCII at present; characters * outside the printable ASCII range are discarded with a warning. * See the grammar for full details of the allowed ranges. * * If the class is RAPTOR_TERM_CLASS_FULL, the end_char is ignored. * * UTF-8 is only allowed if allow_utf8 is non-0, otherwise the * string is US-ASCII and only the \u and \U esapes are allowed. * If enabled, both are allowed. * * Return value: Non 0 on failure **/ static int raptor_ntriples_term(raptor_parser* rdf_parser, const unsigned char **start, unsigned char *dest, size_t *lenp, size_t *dest_lenp, char end_char, raptor_ntriples_term_class term_class, int allow_utf8) { const unsigned char *p=*start; unsigned char c='\0'; size_t ulen=0; unsigned long unichar=0; unsigned int position=0; int end_char_seen=0; if(term_class == RAPTOR_TERM_CLASS_FULL) end_char='\0'; /* find end of string, fixing backslashed characters on the way */ while(*lenp > 0) { c = *p; p++; (*lenp)--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(allow_utf8) { if(c > 0x7f) { /* just copy the UTF-8 bytes through */ size_t unichar_len=raptor_utf8_to_unicode_char(NULL, (const unsigned char*)p-1, 1+*lenp); if(unichar_len > *lenp) { raptor_parser_error(rdf_parser, "UTF-8 encoding error at character %d (0x%02X) found.", c, c); /* UTF-8 encoding had an error or ended in the middle of a string */ return 1; } memcpy(dest, p-1, unichar_len); dest+= unichar_len; unichar_len--; /* p, *lenp were moved on by 1 earlier */ p += unichar_len; (*lenp) -= unichar_len; rdf_parser->locator.column+= unichar_len; rdf_parser->locator.byte+= unichar_len; continue; } } else if(!IS_ASCII_PRINT(c)) { /* This is an ASCII check, not a printable character check * so isprint() is not appropriate, since that is a locale check. */ raptor_parser_error(rdf_parser, "Non-printable ASCII character %d (0x%02X) found.", c, c); continue; } if(c != '\\') { /* finish at non-backslashed end_char */ if(end_char && c == end_char) { end_char_seen=1; break; } if(!raptor_ntriples_term_valid(c, position, term_class)) { if(end_char) { /* end char was expected, so finding an invalid thing is an error */ raptor_parser_error(rdf_parser, "Missing terminating '%c' (found '%c')", end_char, c); return 0; } else { /* it's the end - so rewind 1 to save next char */ p--; (*lenp)++; rdf_parser->locator.column--; rdf_parser->locator.byte--; break; } } /* otherwise store and move on */ *dest++=c; position++; continue; } if(!*lenp) { if(term_class != RAPTOR_TERM_CLASS_FULL) raptor_parser_error(rdf_parser, "\\ at end of line"); return 0; } c = *p; p++; (*lenp)--; rdf_parser->locator.column++; rdf_parser->locator.byte++; switch(c) { case '"': case '\\': *dest++=c; break; case 'n': *dest++='\n'; break; case 'r': *dest++='\r'; break; case 't': *dest++='\t'; break; case 'u': case 'U': ulen=(c == 'u') ? 4 : 8; if(*lenp < ulen) { raptor_parser_error(rdf_parser, "%c over end of line", c); return 0; } if(1) { int n; n=sscanf((const char*)p, ((ulen == 4) ? "%04lx" : "%08lx"), &unichar); if(n != 1) { raptor_parser_error(rdf_parser, "Illegal Uncode escape '%c%s...'", c, p); break; } } p+=ulen; (*lenp)-=ulen; rdf_parser->locator.column+=ulen; rdf_parser->locator.byte+=ulen; if(unichar > 0x10ffff) { raptor_parser_error(rdf_parser, "Illegal Unicode character with code point #x%lX.", unichar); break; } dest+=raptor_unicode_char_to_utf8(unichar, dest); break; default: raptor_parser_error(rdf_parser, "Illegal string escape \\%c in \"%s\"", c, (char*)start); return 0; } position++; } /* end while */ if(end_char && !end_char_seen) { raptor_parser_error(rdf_parser, "Missing terminating '%c' before end of line.", end_char); return 1; } /* terminate dest, can be shorter than source */ *dest='\0'; if(dest_lenp) *dest_lenp=p-*start; *start=p; return 0; } #ifndef RAPTOR_DISABLE_DEPRECATED /** * raptor_ntriples_string_as_utf8_string: * @rdf_parser: parser object * @src: data to read from * @len: size of data * @dest_lenp: pointer to length of destination (out) or NULL * * Turn an N-Triples string with escapes into a UTF-8 string. * * @deprecated: This requires use of parser internals and was never in the public API header. * * Return value: a new UTF-8 string **/ unsigned char* raptor_ntriples_string_as_utf8_string(raptor_parser* rdf_parser, const unsigned char *src, int len, size_t *dest_lenp) { const unsigned char *start=src; size_t length=len; unsigned char *dest; int rc; dest=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!dest) return NULL; rc=raptor_ntriples_term(rdf_parser, &start, dest, &length, dest_lenp, '\0', RAPTOR_TERM_CLASS_FULL, 1); if(rc) { RAPTOR_FREE(cstring, dest); dest=NULL; } return dest; } #endif static int raptor_ntriples_parse_line(raptor_parser* rdf_parser, unsigned char *buffer, size_t len) { int i; unsigned char *p; unsigned char *dest; unsigned char *terms[3]; int terms_allocated[3]; size_t term_lengths[3]; raptor_ntriples_term_type term_types[3]; size_t term_length= 0; unsigned char *object_literal_language=NULL; unsigned char *object_literal_datatype=NULL; int rc=0; for(i=0; i<3; i++) terms_allocated[i]=0; /* ASSERTION: * p always points to first char we are considering * p[len-1] always points to last char */ /* Handle empty lines */ if(!len) return 0; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("handling line '%s' (%d bytes)\n", buffer, (unsigned int)len); #endif p=buffer; while(len>0 && isspace((int)*p)) { p++; rdf_parser->locator.column++; rdf_parser->locator.byte++; len--; } /* Handle empty - all whitespace lines */ if(!len) return 0; /* Handle comment lines */ if(*p == '#') return 0; /* Remove trailing spaces */ while(len>0 && isspace((int)p[len-1])) { p[len-1]='\0'; len--; } /* can't be empty now - that would have been caught above */ /* Check for terminating '.' */ if(p[len-1] != '.') { /* Move current location to point to problem */ rdf_parser->locator.column += len-2; rdf_parser->locator.byte += len-2; raptor_parser_error(rdf_parser, "Missing . at end of line"); return 0; } p[len-1]='\0'; len--; /* Must be triple */ for(i=0; i<3; i++) { if(!len) { raptor_parser_error(rdf_parser, "Unexpected end of line"); goto cleanup; } /* Expect either <URI> or _:name */ if(i == 2) { if(*p != '<' && *p != '_' && *p != '"' && *p != 'x') { raptor_parser_error(rdf_parser, "Saw '%c', expected <URIref>, _:bnodeID or \"literal\"", *p); goto cleanup; } if(*p == 'x') { if(len < 4 || strncmp((const char*)p, "xml\"", 4)) { raptor_parser_error(rdf_parser, "Saw '%c', expected xml\"...\")", *p); goto cleanup; } } } else if(i == 1) { if(*p != '<') { raptor_parser_error(rdf_parser, "Saw '%c', expected <URIref>", *p); goto cleanup; } } else /* i==0 */ { if(*p != '<' && *p != '_') { raptor_parser_error(rdf_parser, "Saw '%c', expected <URIref> or _:bnodeID", *p); goto cleanup; } } switch(*p) { case '<': term_types[i]= RAPTOR_NTRIPLES_TERM_TYPE_URI_REF; dest=p; p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(raptor_ntriples_term(rdf_parser, (const unsigned char**)&p, dest, &len, &term_length, '>', RAPTOR_TERM_CLASS_URI, 0)) { rc=1; goto cleanup; } break; case '"': term_types[i]= RAPTOR_NTRIPLES_TERM_TYPE_LITERAL; dest=p; p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(raptor_ntriples_term(rdf_parser, (const unsigned char**)&p, dest, &len, &term_length, '"', RAPTOR_TERM_CLASS_STRING, 0)) { rc=1; goto cleanup; } if(len && (*p == '-' || *p == '@')) { if(*p == '-') raptor_parser_error(rdf_parser, "Old N-Triples language syntax using \"string\"-lang rather than \"string\"@lang."); object_literal_language=p; /* Skip - */ p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(!len) { raptor_parser_error(rdf_parser, "Missing language after \"string\"-"); goto cleanup; } if(raptor_ntriples_term(rdf_parser, (const unsigned char**)&p, object_literal_language, &len, NULL, '\0', RAPTOR_TERM_CLASS_LANGUAGE, 0)) { rc=1; goto cleanup; } } if(len >1 && *p == '^' && p[1] == '^') { object_literal_datatype=p; /* Skip ^^ */ p+= 2; len-= 2; rdf_parser->locator.column+= 2; rdf_parser->locator.byte+= 2; if(!len || (len && *p != '<')) { raptor_parser_error(rdf_parser, "Missing datatype URI-ref in\"string\"^^<URI-ref> after ^^"); goto cleanup; } p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(raptor_ntriples_term(rdf_parser, (const unsigned char**)&p, object_literal_datatype, &len, NULL, '>', RAPTOR_TERM_CLASS_URI, 0)) { rc=1; goto cleanup; } } if(object_literal_datatype && object_literal_language) { raptor_parser_warning(rdf_parser, "Typed literal used with a language - ignoring the language"); object_literal_language=NULL; } break; case '_': term_types[i]= RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE; /* store where _ was */ dest=p; p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(!len || (len > 0 && *p != ':')) { raptor_parser_error(rdf_parser, "Illegal bNodeID - _ not followed by :"); goto cleanup; } /* Found ':' - move on */ p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(raptor_ntriples_term(rdf_parser, (const unsigned char**)&p, dest, &len, &term_length, '\0', RAPTOR_TERM_CLASS_BNODEID, 0)) { rc=1; goto cleanup; } if(!term_length) { raptor_parser_error(rdf_parser, "Bad or missing bNodeID after _:"); goto cleanup; } else { unsigned char *blank=(unsigned char*)RAPTOR_MALLOC(cstring, term_length+1); if(!blank) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); rc=1; goto cleanup; } strcpy((char*)blank, (const char*)dest); dest=raptor_parser_internal_generate_id(rdf_parser, RAPTOR_GENID_TYPE_BNODEID, blank); terms_allocated[i]=1; } break; case 'x': raptor_parser_error(rdf_parser, "Old N-Triples XML using xml\"string\"-lang rather than \"string\"@lang^^<%s>.", raptor_xml_literal_datatype_uri_string); /* already know we have 'xml"' coming up */ term_types[i]= RAPTOR_NTRIPLES_TERM_TYPE_LITERAL; /* 3=strlen("xml") */ p+=3; len-=3; dest=p; p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(raptor_ntriples_term(rdf_parser, (const unsigned char**)&p, dest, &len, &term_length, '"', RAPTOR_TERM_CLASS_STRING, 0)) { rc=1; goto cleanup; } /* got XML literal string */ object_literal_datatype=(unsigned char*)raptor_xml_literal_datatype_uri_string; if(len && (*p == '-' || *p == '@')) { if(*p == '-') raptor_parser_error(rdf_parser, "Old N-Triples language syntax using xml\"string\"-lang rather than xml\"string\"@lang."); object_literal_language=p; /* Skip - */ p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(!len) { raptor_parser_error(rdf_parser, "Missing language in xml\"string\"-language after -"); goto cleanup; } if(raptor_ntriples_term(rdf_parser, (const unsigned char**)&p, object_literal_language, &len, NULL, '"', RAPTOR_TERM_CLASS_STRING, 0)) { rc=1; goto cleanup; } } if(len >1 && *p == '^' && p[1] == '^') { object_literal_datatype=p; /* Skip ^^ */ p+= 2; len-= 2; rdf_parser->locator.column+= 2; rdf_parser->locator.byte+= 2; if(!len || (len && *p != '<')) { raptor_parser_error(rdf_parser, "Missing datatype URI-ref in xml\"string\"^^<URI-ref> after ^^"); goto cleanup; } p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; if(raptor_ntriples_term(rdf_parser, (const unsigned char**)&p, object_literal_datatype, &len, NULL, '>', RAPTOR_TERM_CLASS_URI, 0)) { rc=1; goto cleanup; } } if(len) { if(*p != ' ') { raptor_parser_error(rdf_parser, "Missing terminating ' '"); return 0; } p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; } break; default: raptor_parser_fatal_error(rdf_parser, "Unknown term type"); rc=1; goto cleanup; } /* Store term */ terms[i]=dest; term_lengths[i]=term_length; /* Whitespace must separate the terms */ if(i<2 && !isspace((int)*p)) { raptor_parser_error(rdf_parser, "Missing whitespace after term '%s'", terms[i]); rc=1; goto cleanup; } /* Skip whitespace after terms */ while(len>0 && isspace((int)*p)) { p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "item %d: term '%s' len %d type %s\n", i, terms[i], (unsigned int)term_lengths[i], raptor_ntriples_term_as_string(term_types[i])); #endif } if(len) { raptor_parser_error(rdf_parser, "Junk before terminating \".\""); return 0; } if(object_literal_language) { unsigned char *q; /* Normalize language to lowercase * http://www.w3.org/TR/rdf-concepts/#dfn-language-identifier */ for(q=object_literal_language; *q; q++) { if(IS_ASCII_UPPER(*q)) *q=TO_ASCII_LOWER(*q); } } raptor_ntriples_generate_statement(rdf_parser, terms[0], term_types[0], terms[1], term_types[1], terms[2], term_types[2], object_literal_language, object_literal_datatype); rdf_parser->locator.byte += len; cleanup: for(i=0; i<3; i++) if(terms_allocated[i]) RAPTOR_FREE(cstring, terms[i]); return rc; } static int raptor_ntriples_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { unsigned char *buffer; unsigned char *ptr; unsigned char *start; raptor_ntriples_parser_context *ntriples_parser=(raptor_ntriples_parser_context*)rdf_parser->context; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("adding %d bytes to buffer\n", (unsigned int)len); #endif /* No data? It's the end */ if(!len) return 0; buffer=(unsigned char*)RAPTOR_MALLOC(cstring, ntriples_parser->line_length + len + 1); if(!buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } if(ntriples_parser->line_length) { strncpy((char*)buffer, (const char*)ntriples_parser->line, ntriples_parser->line_length); RAPTOR_FREE(cstring, ntriples_parser->line); } ntriples_parser->line=buffer; /* move pointer to end of cdata buffer */ ptr=buffer+ntriples_parser->line_length; /* adjust stored length */ ntriples_parser->line_length += len; /* now write new stuff at end of cdata buffer */ strncpy((char*)ptr, (const char*)s, len); ptr += len; *ptr = '\0'; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("buffer now %d bytes\n", ntriples_parser->line_length); #endif ptr=buffer+ntriples_parser->offset; while(*(start=ptr)) { unsigned char *line_start=ptr; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("line buffer now '%s' (offset %d)\n", ptr, ptr-(buffer+ntriples_parser->offset)); #endif /* skip \n when just seen \r - i.e. \r\n or CR LF */ if(ntriples_parser->last_char == '\r' && *ptr == '\n') { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG1("skipping a \\n\n"); #endif ptr++; rdf_parser->locator.byte++; rdf_parser->locator.column=0; start=line_start=ptr; } while(*ptr && *ptr != '\n' && *ptr != '\r') ptr++; if(!*ptr) break; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("found newline \\x%02x at offset %d\n", *ptr, ptr-line_start); #endif ntriples_parser->last_char=*ptr; len=ptr-line_start; rdf_parser->locator.column=0; *ptr='\0'; if(raptor_ntriples_parse_line(rdf_parser,line_start,len)) return 1; rdf_parser->locator.line++; /* go past newline */ ptr++; rdf_parser->locator.byte++; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 /* Do not peek if too far */ if(ptr-buffer < ntriples_parser->line_length) RAPTOR_DEBUG2("next char is \\x%02x\n", *ptr); else RAPTOR_DEBUG1("next char unknown - end of buffer\n"); #endif } ntriples_parser->offset=start-buffer; len=ntriples_parser->line_length - ntriples_parser->offset; if(len) { /* collapse buffer */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("collapsing buffer from %d to %d bytes\n", ntriples_parser->line_length, (unsigned int)len); #endif buffer=(unsigned char*)RAPTOR_MALLOC(cstring, len + 1); if(!buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } strncpy((char*)buffer, (const char*)ntriples_parser->line+ntriples_parser->line_length-len, len); buffer[len]='\0'; RAPTOR_FREE(cstring, ntriples_parser->line); ntriples_parser->line=buffer; ntriples_parser->line_length -= ntriples_parser->offset; ntriples_parser->offset=0; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("buffer now '%s' (%d bytes)\n", ntriples_parser->line, ntriples_parser->line_length); #endif } /* exit now, no more input */ if(is_end) { if(ntriples_parser->offset != ntriples_parser->line_length) { raptor_parser_error(rdf_parser, "Junk at end of input.\""); return 1; } return 0; } return 0; } static int raptor_ntriples_parse_start(raptor_parser* rdf_parser) { raptor_locator *locator=&rdf_parser->locator; raptor_ntriples_parser_context *ntriples_parser=(raptor_ntriples_parser_context*)rdf_parser->context; locator->line=1; locator->column=0; locator->byte=0; ntriples_parser->last_char='\0'; return 0; } static int raptor_ntriples_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "nt")) score=8; if(!strcmp((const char*)suffix, "ttl")) score=3; if(!strcmp((const char*)suffix, "n3")) score=1; } if(mime_type) { if(strstr((const char*)mime_type, "ntriples")) score+=6; } return score; } static int raptor_ntriples_parser_register_factory(raptor_parser_factory *factory) { int rc=0; factory->context_length = sizeof(raptor_ntriples_parser_context); factory->need_base_uri = 0; factory->init = raptor_ntriples_parse_init; factory->terminate = raptor_ntriples_parse_terminate; factory->start = raptor_ntriples_parse_start; factory->chunk = raptor_ntriples_parse_chunk; factory->recognise_syntax = raptor_ntriples_parse_recognise_syntax; rc=raptor_parser_factory_add_uri(factory, (const unsigned char*)"http://www.w3.org/TR/rdf-testcases/#ntriples"); if(!rc) rc = raptor_parser_factory_add_mime_type(factory, "text/plain", 1); return rc; } int raptor_init_parser_ntriples(raptor_world* world) { return !raptor_parser_register_factory(world, "ntriples", "N-Triples", &raptor_ntriples_parser_register_factory); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/src/raptor_rfc2396.c������������������������������������������������������������������0000644�0001750�0001750�00000052535�11330672502�013460� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rfc2396.c - Raptor URI resolving from RFC2396 and RFC3986 * * Copyright (C) 2004-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef WIN32 #include <win32_raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor.h" #include "raptor_internal.h" #ifndef STANDALONE /** * raptor_new_uri_detail: * @uri_string: The URI string to split * * Create a URI detailed structure from a URI string. * **/ raptor_uri_detail* raptor_new_uri_detail(const unsigned char *uri_string) { const unsigned char *s = NULL; unsigned char *b = NULL; raptor_uri_detail *ud; size_t uri_len; if(!uri_string) return NULL; uri_len=strlen((const char*)uri_string); /* The extra +5 is for the 5 \0s that may be added for each component * even if the entire URI is empty */ ud=(raptor_uri_detail*)RAPTOR_CALLOC(raptor_uri_detail, sizeof(raptor_uri_detail)+uri_len+5+1, 1); if(!ud) return NULL; ud->uri_len=uri_len; ud->buffer=(unsigned char*)((unsigned char*)ud + sizeof(raptor_uri_detail)); s=uri_string; b=ud->buffer; /* Split the URI into it's syntactic components */ /* * scheme is checked in more detail since it is important * to recognise absolute URIs for resolving, and it is easy to do. * * scheme = alpha *( alpha | digit | "+" | "-" | "." ) * RFC 2396 section 3.1 Scheme Component */ if(*s && isalpha((int)*s)) { s++; while(*s && (isalnum((int)*s) || (*s == '+') || (*s == '-') || (*s == '.'))) s++; if(*s == ':') { /* it matches the URI scheme grammar, so store this as a scheme */ ud->scheme=b; ud->scheme_len=s-uri_string; while(*uri_string != ':') *b++ = *uri_string++; *b++ = '\0'; /* and move past the : */ s++; } else s=uri_string; } /* authority */ if(*s && s[1] && *s == '/' && s[1] == '/') { ud->authority=b; s+=2; /* skip "//" */ while(*s && *s != '/' && *s != '?' && *s != '#') *b++ = *s++; ud->authority_len=b-ud->authority; *b++ = '\0'; } /* path */ if(*s && *s != '?' && *s != '#') { ud->path=b; while(*s && *s != '?' && *s != '#') *b++ = *s++; ud->path_len=b-ud->path; *b++ = '\0'; } /* query */ if(*s && *s == '?') { ud->query=b; s++; while(*s && *s != '#') *b++ = *s++; ud->query_len=b-ud->query; *b++ = '\0'; } /* fragment identifier - RFC2396 Section 4.1 */ if(*s && *s == '#') { ud->fragment=b; s++; while(*s) *b++ = *s++; ud->fragment_len=b-ud->fragment; *b='\0'; } ud->is_hierarchical=(ud->path && *ud->path == '/'); return ud; } void raptor_free_uri_detail(raptor_uri_detail* uri_detail) { /* Also frees the uri_detail->buffer allocated in raptor_uri_parse() */ RAPTOR_FREE(raptor_uri_detail, uri_detail); } unsigned char* raptor_uri_detail_to_string(raptor_uri_detail *ud, size_t* len_p) { size_t len=0; unsigned char *buffer, *p; if(ud->scheme) len+= ud->scheme_len+1; /* : */ if(ud->authority) len+= 2 + ud->authority_len; /* // */ if(ud->path) len+= ud->path_len; if(ud->fragment) len+= 1 + ud->fragment_len; /* # */ if(ud->query) len+= 1 + ud->query_len; /* ? */ if(len_p) *len_p=len; buffer=(unsigned char*)RAPTOR_MALLOC(cstring, len+1); if(!buffer) return NULL; p=buffer; if(ud->scheme) { unsigned char *src=ud->scheme; while(*src) *p++ = *src++; *p++ = ':'; } if(ud->authority) { unsigned char *src=ud->authority; *p++ = '/'; *p++ = '/'; while(*src) *p++ = *src++; } if(ud->path) { unsigned char *src=ud->path; while(*src) *p++ = *src++; } if(ud->fragment) { unsigned char *src=ud->fragment; *p++ = '#'; while(*src) *p++ = *src++; } if(ud->query) { unsigned char *src=ud->query; *p++ = '?'; while(*src) *p++ = *src++; } *p='\0'; return buffer; } /** * raptor_uri_resolve_uri_reference: * @base_uri: Base URI string * @reference_uri: Reference URI string * @buffer: Destination buffer URI * @length: Length of destination buffer * * Resolve a URI to a base URI. * **/ void raptor_uri_resolve_uri_reference(const unsigned char *base_uri, const unsigned char *reference_uri, unsigned char *buffer, size_t length) { raptor_uri_detail *ref=NULL; raptor_uri_detail *base=NULL; raptor_uri_detail result; /* static - pointers go to inside ref or base */ unsigned char *path_buffer=NULL; unsigned char *p, *cur, *prev, *s; unsigned char last_char; #if RAPTOR_DEBUG > 2 RAPTOR_DEBUG4("base uri='%s', reference_uri='%s, buffer size %d\n", (base_uri ? (const char*)base_uri : "NULL"), (reference_uri ? (const char*)reference_uri : "NULL"), (int)length); #endif *buffer = '\0'; memset(&result, 0, sizeof(result)); ref=raptor_new_uri_detail(reference_uri); if(!ref) goto resolve_tidy; /* is reference URI "" or "#frag"? */ if(!ref->scheme && !ref->authority && !ref->path && !ref->query) { unsigned char c; /* Copy base URI to result up to '\0' or '#' */ for(p=buffer; (c= *base_uri) && c != '#'; p++, base_uri++) *p = c; *p='\0'; if(ref->fragment) { unsigned char *src=ref->fragment; /* Append any fragment */ *p++ = '#'; while(*src) *p++ = *src++; *p='\0'; } goto resolve_tidy; } /* reference has a scheme - is an absolute URI */ if(ref->scheme) { strncpy((char*)buffer, (const char*)reference_uri, ref->uri_len+1); goto resolve_tidy; } /* now the reference URI must be schemeless, i.e. relative */ base=raptor_new_uri_detail(base_uri); if(!base) goto resolve_tidy; /* result URI must be of the base URI scheme */ result.scheme = base->scheme; result.scheme_len = base->scheme_len; /* an authority is given ( [user:pass@]hostname[:port] for http) * so the reference URI is like //authority */ if(ref->authority) { result.authority = ref->authority; result.authority_len = ref->authority_len; result.path = ref->path; result.path_len = ref->path_len; goto resolve_end; } /* no - so now we have path (maybe with query, fragment) relative to base */ result.authority = base->authority; result.authority_len = base->authority_len; if(ref->is_hierarchical || !base->is_hierarchical) { /* if the reference path is absolute OR the base URI * is a non-hierarchical URI then just copy the reference path * to the result. */ result.path = ref->path; result.path_len = ref->path_len; goto resolve_end; } /* need to resolve relative path */ /* Build the result path in path_buffer */ result.path_len=0; if(base->path) result.path_len += base->path_len; else { /* Add a missing path - makes the base URI 1 character longer */ base->path=(unsigned char*)"/"; /* static, but copied and not free()d */ base->path_len=1; base->uri_len++; result.path_len++; } if(ref->path) result.path_len += ref->path_len; /* the resulting path can be no longer than result.path_len */ path_buffer=(unsigned char*)RAPTOR_MALLOC(cstring, result.path_len+1); if(!path_buffer) goto resolve_tidy; result.path = path_buffer; *path_buffer = '\0'; for(p=base->path + base->path_len-1; p > base->path && *p != '/'; p--) ; if(p >= base->path) { result.path_len=p-base->path+1; /* Found a /, copy everything before that to path_buffer */ strncpy((char*)path_buffer, (char*)base->path, result.path_len); path_buffer[result.path_len]='\0'; } if(ref->path) { strncpy((char*)path_buffer+result.path_len, (const char*)ref->path, ref->path_len+1); result.path_len += ref->path_len; path_buffer[result.path_len]='\0'; } /* remove all "./" path components */ for(p=(prev=path_buffer); *p; p++) { if(*p != '/') continue; if(p == (prev+1) && *prev == '.') { unsigned char *dest=prev; p++; while(*dest) *dest++ = *p++; *dest= '\0'; p=prev; result.path_len -=2; if(!*p) break; } else { prev=p+1; } } if(p == (prev+1) && *prev == '.') { /* Remove "." at the end of a path */ *prev = '\0'; result.path_len--; } #if defined(RAPTOR_DEBUG) if(result.path_len != strlen((const char*)path_buffer)) RAPTOR_FATAL3("Path length %ld does not match calculated %ld.", (long)strlen((const char*)path_buffer), (long)result.path_len); #endif /* Remove all "<component>/../" path components */ /* * The pointers: * <component>/../<next> * prev-^ cur-^ * and p points to the previous prev (can be NULL) */ prev=NULL; cur=NULL; p=NULL; last_char='\0'; for(s=path_buffer; *s; last_char=*s++) { /* find the path components */ if(*s != '/') { /* If it is the start or following a /, record a new path component */ if(!last_char || last_char == '/') { /* Store 2 path components */ if(!prev) prev=s; else if(!cur) cur=s; } continue; } /* Wait till there are two path components */ if(!prev || !cur) continue; #if defined(RAPTOR_DEBUG) if(result.path_len != strlen((const char*)path_buffer)) RAPTOR_FATAL3("Path length %ld does not match calculated %ld.", (long)strlen((const char*)path_buffer), (long)result.path_len); #endif /* If the current one is '..' */ if(s == (cur+2) && cur[0] == '.' && cur[1] == '.') { /* and if the previous one isn't '..' * (which means it is beyond the root such as a path "/foo/../..") */ if(cur != (prev+3) || prev[0] != '.' || prev[1] != '.') { unsigned char *dest=prev; /* remove the <component>/../<next> * prev-^ cur-^ ^-s */ size_t len=s-prev+1; /* length of path component we are removing */ s++; while(*s) *dest++ = *s++; *dest = '\0'; result.path_len -= len; if(p && p < prev) { /* We know the previous prev path component and we didn't do * two adjustments in a row, so can adjust the * pointers to continue the newly shortened path: * s to the / before <next> (autoincremented by the loop) * prev to the previous prev path component * cur to NULL. Will be set by the next loop iteration since s * points to a '/', last_char will be set to *s. */ s=prev-1; prev=p; cur=NULL; p=NULL; } else { /* Otherwise must start from the beginning again */ prev=NULL; cur=NULL; p=NULL; last_char='\0'; s=path_buffer; } } } else { /* otherwise this is not a special path component so * shift the path components stack */ p=prev; prev=cur; cur=NULL; } } if(prev && s == (cur+2) && cur[0] == '.' && cur[1] == '.') { /* Remove <component>/.. at the end of the path */ *prev = '\0'; result.path_len -= (s-prev); } #if defined(RAPTOR_DEBUG) if(result.path_len != strlen((const char*)path_buffer)) RAPTOR_FATAL3("Path length %ld does not match calculated %ld.", (long)strlen((const char*)path_buffer), (long)result.path_len); #endif resolve_end: /* RFC3986 Appendix C.2 / 5.4.2 Abnormal Examples * Remove leading /../ and /./ */ for(p=result.path; p; ) { if(!strncmp((const char *)p, "/../", 4)) { result.path_len -= 3; memmove(p, p+3, result.path_len+1); } else if(!strncmp((const char *)p, "/./", 3)) { result.path_len -= 2; memmove(p, p+2, result.path_len+1); } else break; } if(ref->query) { result.query=ref->query; result.query_len=ref->query_len; } if(ref->fragment) { result.fragment=ref->fragment; result.fragment_len=ref->fragment_len; } p=buffer; if(result.scheme) { strncpy((char*)p, (const char*)result.scheme, result.scheme_len); p += result.scheme_len; *p++ = ':'; } if(result.authority) { *p++ = '/'; *p++ = '/'; strncpy((char*)p, (const char*)result.authority, result.authority_len); p+= result.authority_len; } if(result.path) { strncpy((char*)p, (const char*)result.path, result.path_len); p+= result.path_len; } if(result.query) { *p++ = '?'; strncpy((char*)p, (const char*)result.query, result.query_len); p+= result.query_len; } if(result.fragment) { *p++ = '#'; strncpy((char*)p, (const char*)result.fragment, result.fragment_len); p+= result.fragment_len; } *p = '\0'; resolve_tidy: if(path_buffer) RAPTOR_FREE(cstring, path_buffer); if(base) raptor_free_uri_detail(base); if(ref) raptor_free_uri_detail(ref); } #endif #ifdef STANDALONE #include <stdio.h> /* one more prototype */ int main(int argc, char *argv[]); static const char *program; static int check_resolve(const char *base_uri, const char *reference_uri, const char *result_uri) { unsigned char buffer[1024]; raptor_uri_resolve_uri_reference((const unsigned char*)base_uri, (const unsigned char*)reference_uri, buffer, sizeof (buffer)); if(strcmp((const char*)buffer, result_uri)) { fprintf(stderr, "%s: raptor_uri_resolve_uri_reference(%s, %s) FAILED giving '%s' != '%s'\n", program, base_uri, reference_uri, buffer, result_uri); return 1; } #if RAPTOR_DEBUG > 2 fprintf(stderr, "%s: raptor_uri_resolve_uri_reference(%s, %s) OK giving '%s'\n", program, base_uri, reference_uri, buffer); #endif return 0; } static int check_parses(const char *uri_string) { raptor_uri_detail* ud; ud=raptor_new_uri_detail((unsigned const char*)uri_string); if(!ud) { fprintf(stderr, "%s: raptor_new_uri_detail(%s) FAILED to parse\n", program, uri_string); return 1; } #if RAPTOR_DEBUG > 2 fprintf(stderr, "%s: raptor_new_uri_detail(%s) OK\n", program, uri_string); #endif raptor_free_uri_detail(ud); return 0; } int main(int argc, char *argv[]) { const char *base_uri="http://example.org/bpath/cpath/d;p?querystr#frag"; int failures=0; program=raptor_basename(argv[0]); fprintf(stderr, "%s: Using base URI '%s'\n", program, base_uri); /* Tests from RFC2396 Appendix C * and RFC3986 Section 5 * * Modifications: * - add 'path' when items are path components to make easier to read * - use example.org instead of 'a' for the authority * - results are against the base_uri above */ /* Appendix C.1 / 5.4.1 Normal Examples */ failures += check_resolve(base_uri, "g:h", "g:h"); failures += check_resolve(base_uri, "gpath", "http://example.org/bpath/cpath/gpath"); failures += check_resolve(base_uri, "./gpath", "http://example.org/bpath/cpath/gpath"); failures += check_resolve(base_uri, "gpath/", "http://example.org/bpath/cpath/gpath/"); failures += check_resolve(base_uri, "/gpath", "http://example.org/gpath"); failures += check_resolve(base_uri, "//gpath", "http://gpath"); failures += check_resolve(base_uri, "?y", "http://example.org/bpath/cpath/?y"); failures += check_resolve(base_uri, "gpath?y", "http://example.org/bpath/cpath/gpath?y"); failures += check_resolve(base_uri, "#s", "http://example.org/bpath/cpath/d;p?querystr#s"); failures += check_resolve(base_uri, "gpath#s", "http://example.org/bpath/cpath/gpath#s"); failures += check_resolve(base_uri, "gpath?y#s", "http://example.org/bpath/cpath/gpath?y#s"); failures += check_resolve(base_uri, ";x", "http://example.org/bpath/cpath/;x"); failures += check_resolve(base_uri, "gpath;x", "http://example.org/bpath/cpath/gpath;x"); failures += check_resolve(base_uri, "gpath;x?y#s", "http://example.org/bpath/cpath/gpath;x?y#s"); failures += check_resolve(base_uri, ".", "http://example.org/bpath/cpath/"); failures += check_resolve(base_uri, "./", "http://example.org/bpath/cpath/"); failures += check_resolve(base_uri, "..", "http://example.org/bpath/"); failures += check_resolve(base_uri, "../", "http://example.org/bpath/"); failures += check_resolve(base_uri, "../gpath", "http://example.org/bpath/gpath"); failures += check_resolve(base_uri, "../..", "http://example.org/"); failures += check_resolve(base_uri, "../../", "http://example.org/"); failures += check_resolve(base_uri, "../../gpath", "http://example.org/gpath"); /* Appendix C.2 / 5.4.2 Abnormal Examples */ failures += check_resolve(base_uri, "", "http://example.org/bpath/cpath/d;p?querystr"); /* This is a Normal Example in RFC 3986 */ failures += check_resolve(base_uri, "../../../gpath", "http://example.org/gpath"); /* RFC 3986 changed the answer here */ failures += check_resolve(base_uri, "../../../../gpath", "http://example.org/gpath"); /* RFC 3986 changed the answer here */ failures += check_resolve(base_uri, "/./gpath", "http://example.org/gpath"); /* RFC 3986 changed the answer here */ failures += check_resolve(base_uri, "/../gpath", "http://example.org/gpath"); /* RFC 3986 changed the answer here */ failures += check_resolve(base_uri, "gpath.", "http://example.org/bpath/cpath/gpath."); failures += check_resolve(base_uri, ".gpath", "http://example.org/bpath/cpath/.gpath"); failures += check_resolve(base_uri, "gpath..", "http://example.org/bpath/cpath/gpath.."); failures += check_resolve(base_uri, "..gpath", "http://example.org/bpath/cpath/..gpath"); failures += check_resolve(base_uri, "./../gpath", "http://example.org/bpath/gpath"); failures += check_resolve(base_uri, "./gpath/.", "http://example.org/bpath/cpath/gpath/"); failures += check_resolve(base_uri, "gpath/./hpath", "http://example.org/bpath/cpath/gpath/hpath"); failures += check_resolve(base_uri, "gpath/../hpath", "http://example.org/bpath/cpath/hpath"); failures += check_resolve(base_uri, "gpath;x=1/./y", "http://example.org/bpath/cpath/gpath;x=1/y"); failures += check_resolve(base_uri, "gpath;x=1/../y", "http://example.org/bpath/cpath/y"); failures += check_resolve(base_uri, "gpath?y/./x", "http://example.org/bpath/cpath/gpath?y/./x"); failures += check_resolve(base_uri, "gpath?y/../x", "http://example.org/bpath/cpath/gpath?y/../x"); failures += check_resolve(base_uri, "gpath#s/./x", "http://example.org/bpath/cpath/gpath#s/./x"); failures += check_resolve(base_uri, "gpath#s/../x", "http://example.org/bpath/cpath/gpath#s/../x"); /* RFC 3986 makes this the strict answer but also allows * http://example.org/bpath/cpath/gauthority * for backward compatibility */ failures += check_resolve(base_uri, "http:gauthority", "http:gauthority"); /* Examples from 1.3 */ failures += check_parses("ftp://ftp.is.co.za/rfc/rfc1808.txt"); failures += check_parses("gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles"); failures += check_parses("http://www.math.uio.no/faq/compression-faq/part1.html"); failures += check_parses("mailto:mduerst@ifi.unizh.ch"); failures += check_parses("news:comp.infosystems.www.servers.unix"); failures += check_parses("telnet://melvyl.ucop.edu/"); failures += check_parses(""); /* This is a not-crashing test */ raptor_new_uri_detail(NULL); /* Extra checks not in RFC2396 */ /* RDF xml:base check that fragments and query strings are removed */ failures += check_resolve(base_uri, "gpath/../../../hpath", "http://example.org/hpath"); /* RFC3986 changed the answer to this test * Was "RDF xml:base check that extra ../ are not lost" * with answer "http://example.org/../../../absfile" */ failures += check_resolve("http://example.org/dir/file", "../../../absfile", "http://example.org/absfile"); /* RDF xml:base check that an absolute URI replaces */ failures += check_resolve("http://example.org/dir/file", "http://another.example.org/dir2/file2", "http://another.example.org/dir2/file2"); /* base URI and relative URI with no absolute path works */ failures += check_resolve("foo:", "not_scheme:blah", "foo:not_scheme:blah"); /* Issue#000177 http://bugs.librdf.org/mantis/view.php?id=177 */ failures += check_resolve("foo:1234", "9999", "foo:9999"); return failures; } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/raptor.pc.in��������������������������������������������������������������������������0000644�0001750�0001750�00000000356�11174111172�012267� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: Raptor Description: RDF Parser Toolkit Library Version: @VERSION@ Libs: -L${libdir} -lraptor Libs.private: @RAPTOR_LDFLAGS@ Cflags: -I${includedir} ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/NEWS����������������������������������������������������������������������������������0000644�0001750�0001750�00000050254�11330745027�010536� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ Raptor RDF Parser Library - News 2010-01-30 Raptor Version 1.4.21 Released This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break is underway. RDFa parser buffer management problems were fixed Turtle parser and serializer now use QNames correctly against specification RDF/XML parser now resets correctly to detect duplicate rdf:IDs Made a few other minor bug and build fixes Fixed reported issues: 0000318, 0000319, 0000326, 0000331, 0000332 and 0000337 See the Raptor 1.4.21 Release Notes for the full details of the changes. 2009-11-28 Raptor Version 1.4.20 Released Turtle serializing performance improvement by Chris Cannam librdfa RDFa parser updates to fix empty datatype, xml:lang and 1-char prefixes by Manu Sporny Fix a crash when the GRDDL parser reported errors Enable large file support for 32-bit systems Several resilience improvements by Lauri Aalto Other minor portability and bug fixes Fixed reported issues: 0000306 0000307 0000310 and 0000312. See the Raptor 1.4.20 Release Notes for the full details of the changes. 2009-07-19 Raptor Version 1.4.19 Released Many improvements to RSS tag soup (RSSes and Atom) parser and the RSS 1.0 and Atom serializers Several fixes and improvements to the N-Triples, RDFa and RDF/XML parsers and Turtle serializer Improved the use and configuration of static libxml functions for better compatibility Several Win32 portability fixes - Lou Sakey Many internal changes for upcoming Raptor V2 - primarily by Lauri Aalto Many other fixes and resilience improvements. Fixed reported issues: 0000259, 0000262, 0000263, 0000266, 0000269, 0000270, 0000276, 0000277, 0000287, 0000288, 0000289, 0000290, 0000293, 0000296, 0000299 and 0000303. WARNING: FUTURE ABI and API CHANGES. The next release of raptor 1.4.x will include bug fixes only and no new features. New development will move to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering. See the Raptor 1.4.19 Release Notes for the full details of the changes. 2008-06-25 Raptor Version 1.4.18 Released Added an RDFa parser using an embedded version of librdfa by Manu Sporny of Digital Bazaar. Added an Atom 1.0 (RFC 4287) serializer with several output parameters. Improved RSS 1.0 serializer functionality and resilience. Added new API methods for qname, serializer, sequence and XML writer classes. Many other fixes and resilience improvements. Fixed reported issues: 0000186 and 0000255. See the Raptor 1.4.18 Release Notes for the full details of the changes. 2008-03-30 Raptor Version 1.4.17 Released Added two new JSON serializers: resource-centric 'json' (Talis RDF/JSON) and triple-centric 'json-triples' Added a new public XML SAX2 API class Added a new error handling structure Made the I/O Stream class support reading Added several new API methods. Made several fixes, portability and resilience improvements. Fixed reported issues: 0000252 and 0000245. See the Raptor 1.4.17 Release Notes for the full details of the changes. 2007-10-01 Raptor Version 1.4.16 Released 100% support for the GRDDL W3C Recommendation of 2007-09-11 Turtle parser and serializer were updated to support @base from Turtle 2007-09-11. Turtle and RDF/XML serializers had performance improvements for large graphs. Added a TRiG Parser based on Turtle with named graph support. Several other API changes, fixed and improvements were made. Fixed reported issues: 0000188, 0000192, 0000194, 0000195, 0000207, 0000210, 0000214, 0000216, 0000217, 0000232, 0000237, 0000238 and 0000239 Many other fixes and improvements. See the Raptor 1.4.16 Release Notes for the full details of the changes. 2007-03-26 Raptor Version 1.4.15 Released GRDDL parser substantially updated to support the GRDDL W3C Working Draft 2 March 2007 Errors for XML parsing and URI 404s are reported much better Fixed reported issues: #0000174, #0000177, #0000178, #0000180 Many other minor fixes and improvements. See the Raptor 1.4.15 Release Notes for the full details of the changes. 2007-01-31 Raptor Version 1.4.14 Released New Turtle serializer by Dave Robillard based on the existing RDF/XML-Abbrev serializer. New GraphViz DOT format serializer by Evan Nemerson. GRDDL parser now does namespace and profile URI recursion and has other improvements and fixes. Fixed reported issues: #0000032, #0000141, #0000143, #0000148, #0000155 and #0000157 Many other fixes and improvements. See the Raptor 1.4.14 Release Notes for the full details of the changes. 2006-10-22 Raptor Version 1.4.13 Released Fixed a memory leak in reusing the XML writer Fixed reported issues: #0000134 Minor updates and fixes to tutorial, configuration and build See the Raptor 1.4.13 Release Notes for the full details of the changes. 2006-08-27 Raptor Version 1.4.12 Released Restore serializer enumeration ordering back to that of 1.4.10 which was causing Redland problems when writing type 'application/rdf+xml'. See the Raptor 1.4.12 Release Notes for the gory details. 2006-08-26 Raptor Version 1.4.11 Released Added network request filtering for parsers Improved the GRDDL parser to read Embedded RDF and HCalendar The Guess parser can now be reused to do multiple guesses The RSS 1.0 Serializer now works again Fixed reported issues: #0000014, #0000041, #0000089, #0000091 , #0000110 and #0000112 Made several other changes, fixes and improvements. See the Raptor 1.4.11 Release Notes for the full details of the changes. 2006-07-14 Raptor Version 1.4.10 Released Fixed a crash with RSS Tag Soup parser generating triples too late Fixed a crash with the RDF/XML parser and serializer if a comment was seen outside an element Parsers no longer generate any triple parts of type RAPTOR_IDENTIFIER_TYPE_ORDINAL See the Raptor 1.4.10 Release Notes for the full details of the changes. 2006-04-22 Raptor Version 1.4.9 Released Raptor Tutorial added covering parsing and serializing with examples Raptor Reference Manual now covers 100% of the public API rapper can now pretty-print RDF using namespaces as hints Turtle parser gains boolean literals Requests for content now send appropriate Accept: headers No longer require libxml for rss-tag-soup parser Various Win32 fixes and VC build files updates (John Barstow) Many other bug fixes and changes were made. NOTE: Generation of RAPTOR_IDENTIFIER_TYPE_PREDICATE was removed as deprecated in 1.4.8. See the Raptor 1.4.9 Release Notes for the full details of the changes. 2006-01-03 Raptor Version 1.4.8 Released RSS Tag Soup parser now reads Atom 1.0 and rewrites old Atom 0.3 terms Added a guess parser that picks the parser to use based on protocol information such as HTTP Content-Type Created an enhanced API reference manual with gtk-doc Serializers to build can now be selected at configure time Parsers can now return the namespace prefix/URIs seen in parsing Turtle parser update to version 2006-01-02 (announcement) Fix for URI resolution bugs (win32 fix by John Barstow) Several parser bug fixes for RDF/XML, RSS and GRDDL RDF/XML serializers and XML writer can write XML 1.0 or XML 1.1 Added an alpha Atom 1.0 serializer Added an Adobe XMP (RDF/XML profile) serializer Internal source reorganisation Many other changes, fixes and improvements. NOTE: Raptor will be switching to use Subversion for version control after the 1.4.8 release. See the Redland Subversion site or the online Raptor installation notes for the latest information. See the Raptor 1.4.8 Release Notes for the full details of the changes. 2005-06-08 Raptor Version 1.4.7 Released Fix crashes in the RSS tag soup parser / serializer (Suzan Foster) Fix a crash in the RDF/XML serializers with bad URI predicates. See the Raptor 1.4.7 Release Notes for the full details of the changes. 2005-05-19 Raptor Version 1.4.6 Released Added a Gleaning Resource Descriptions from Dialects of Languages (GRDDL) parser for reading XHTML and XML as RDF triples Updated RSS enclosures support in RSS tag soup parser and RSS 1.0 serializer (Suzan Foster) Fixed several crashes with RSS tag soup parser, RDF/XML-abbrev serializer. The turtle parser now accepts """long literals""" See the Raptor 1.4.6 Release Notes for the full details of the changes. 2005-02-06 Raptor Version 1.4.5 Released Added an RDF/XML with abbreviations serializer (Steve Shepard) Handle RSS 1.1 in RSS tag soup parser More fixes for broken OSX libxml2 See the Raptor 1.4.5 Release Notes for the full details of the changes. 2005-01-15 Raptor Version 1.4.4 Released Fixed crashes in RSS tag soup parser and RSS 1.0 serializer Handle RSS 0.9 namespace in RSS tag soup parser Portability fixes for Win32 (Dave Viner) See the Raptor 1.4.4 Release Notes for the full details of the changes. 2005-01-03 Raptor Version 1.4.3 Released New XML Writer API Improved RDF/XML serializer allowing user namespace declarations and writing relative URIs where possible New RSS 1.0 serializer Updated RSS tag soup parser URI class can write relative URIs (Patch from Rene Puls) Many other API changes See the Raptor 1.4.3 Release Notes for the full details of the changes. 2004-11-01 Raptor Version 1.4.2 Released Fix raptor_xml_escape_string error return. See the Raptor 1.4.2 Release Notes for the full details of the changes. 2004-10-29 Raptor Version 1.4.1 Released Fixed crashes in URI decoding and RSS enclosures. See the Raptor 1.4.1 Release Notes for the full details of the changes. 2004-10-24 Raptor Version 1.4.0 Released Added a serializing class for writing RDF triples as a syntax Added serializers for RDF/XML and N-Triples Added an I/O stream class for aiding writing Added RSS enclosure support to RSS Tag Soup parser (Suzan Foster) See the Raptor 1.4.0 Release Notes for the full details of the changes. 2004-09-20 Raptor Version 1.3.3 Released License changed to LGPL 2.1/Apache 2 Added a new Unicode NFC checker Rewritten URI parsing and resolving code Added configure selection of RDF parsers Updated the RSS Tag Soup parser to handle Atom 0.3 Updated the Turtle parser to handle large documents (Geoff Chappell) Added a parser feature to disable rdf:ID duplicate checking Updated rdf:ID duplicate value checking implementation Portability fixes for building on win32 (Chris Pointon) See the Raptor 1.3.3 Release Notes for the full details of the changes. 2004-07-21 Raptor Version 1.3.2 Released Added support for compiling against expat source trees (Mark Smith) Added raptor_alloc_memory to allocate memory in raptor, typically needed by handler routines on win32. Make errors in fetching WWW content pass to the main error handler. Added accessor functions for parts of the raptor_locator structure (Edd Dumbill) Disabled the broken Unicode NFC checking via GNOME glib for this release. See the Raptor 1.3.2 Release Notes for the full details of the changes. 2004-06-12 Raptor Version 1.3.1 Released Correct raptor_print_statement declaration argument statement to have one less 'const', to match the code. raptor.h now includes stdarg.h Portability fixes for win32 Updates to Turtle parser to only allow language with non-datatyped literals; allow a '_' immediately after a ':' in qnames and make bare ':' work. Added a warning for unknown rdf:parseType values, when parsing in lax mode. This is controlled by a new parser feature warn_other_parsetypes The Turtle parser was fixed to re-initialise correctly when performing multiple parsings Fixes to the file: URI support for %-escaping and for Win32 filenames See the Raptor 1.3.1 Release Notes for the full details of the changes. 2004-05-11 Raptor Version 1.3.0 Released Updated Turtle parser to fix the collections syntax, add integer literals and allow - in names. Added support for guessing a parser from content or identifiers Completed parser feature support Added sending HTTP Accept: headers for WWW retrieval when possible Added new utility sequence and stringbuffer classes Several other functions added and improvements made. See the Raptor 1.3.0 Release Notes for the full details of the changes. 2004-01-24 Raptor Version 1.2.0 Released Added a Turtle parser (was N-Triples Plus) now with collections. Added raptor_syntaxes_enumerate to get syntax name, label, mime_type or uri_string of all known parsers. Added WWW access via BSD libfetch if available. Updated the GNOME GUI grapper program to report errors and warnings 2003-12-31 Raptor Version 1.1.0 Released Added an N-Triples Plus parser Updated for RDF/XML Revised Working Draft (10 October 2003) allowing rdf:RDF to be optional by default. No further changes were needed for RDF/XML Revised Proposed Recommendation (15 December 2003) Made URI class constructors, methods and factory methods as well as some other utility functions using or returning URIs or literals take unsigned char* rather than char*. Added the XML namespace, XML namespace stack and XML qname classes to the public API. Added a function to discover supported parsers. Fixes for line number counting in N-Triples Added support for libxml2 SAX2 API for 2.6.0 and later. The N-Triples parser now uses the generate ID code. Added configure options for XML 1.1 names and disabling NFC check code. 2003-09-08 Raptor Version 1.0.0 Released Several long-deprecated functions were removed and consequently the library shared version number was increased to 1 Fixed scanning for rdf:RDF so that RDF/XML in other XML works, such as in SVG raptor-config --libs now works, added --libtool-libs and --version-decimal Check N-Triples legal Unicode character range #x0-#x10FFFF Normalize RDF/XML xml:lang and N-Triples language to lowercase on input Worked around libxml2 bug causing a crash on some error reporting Added raptor_parse_file_stream for parsing a C FILE* Tidied rapper utility argument handling, added --version 2003-08-25 Raptor Version 0.9.12 Released Fix some XML memory leaks in Exclusive XML Canonicalization. Stop parsing RSS tag soup after a user abort Improved N-Triples syntax checking. Crash fixes for 64 bit Alpha/Sparc Linux/Solaris (varargs, size_t) Fixed some other minor memory leaks with rdf:datatype and rdf:ID attributes. 2003-07-29 Raptor Version 0.9.11 Released Completely handles the revised RDF/XML syntax (including post W3C Last Call changes) Added Unicode Normal Form C (NFC) checking for literals (requires GNOME glib 2.0 at present) Added Exclusive XML Canonicalization for XML Literals Added many more checks for bad syntax (mostly illegal property attributes) Updated parseType="Collection" triples after RDF Core WG change Added an experimental RSS Tag Soup parser to read any pile of XML that has elements such as channel, image, item tags with title, description etc inside them into coherent RSS 1.0 RDF triples. (Requires libxml 2.5.0 or newer) API: Added new methods raptor_get_name, raptor_get_label. API: Added new methods raptor_set_default_generate_id_parameters and raptor_set_generate_id_handler to control generation of IDs. API: Modified utility function raptor_xml_escape_string arguments. Ripped out ISO 3166 country code parts since commercial use might be subject to a license fee. Improvements to GTK example 'grapper'. Several internal reorganisations for pulling out a SAX2 API, XML C14N. Other minor bug fixes. 2003-04-17 Raptor Version 0.9.10 Released Added parser lax / strict modes. lax is the default. rdf:bagID now generates a warning in lax mode, an error in strict Added raptor_www_no_www_library_init_finish to allow disabling of WWW library startup/shutdown. Added raptor_parse_abort to abort parsing inside a callback. Added a GTK GUI example program grapper Other minor bug fixes. 2003-03-28 Raptor Version 0.9.9 Released Performance improvements - uses less memory, less repeated small malloc/free sequences, faster for larger files. Added WWW retrieval - can parse from an URI as well as files, given either libcurl or libxml2 is available. Minor bug fixes. Various Win32 configure, building patches Sources updated to use autoconf 1.6+, automake 2.52+ More debian packaging updates. 2003-02-13 Raptor Version 0.9.8 Released Minor bug fixes (synchronising with Redland 0.9.12 release). Fixed crashing on empty files Fixed accepting illegal xmlns:prefix="" (prefix without URI not allowed) N-Triples bnodeIDs can now have '0's Utility program rdfdump renamed to rapper; name conflicted with a common Linux utility. 2002-12-20 Raptor Version 0.9.7 Released Passes about 90% of RDF Core WG Test Cases All memory leaks fixed Portability fixes - compilers, scripts, auto* tools, libxml2 version rdf:ID syntax and duplicates checked rdf:bagID supported Added more conformance tests, errors and warnings. 2002-11-02 Raptor Version 0.9.6 Released Calling API changed to provide a common interface to the RDF parsers. The libraptor.3 manual page describes the changes. Added support for RDF datatyped literals in RDF/XML with rdf:datatype attribute on property elements and N-Triples with the "string"^^<datatypeURIref>. Added support for rdf:parseType="Collection" for RDF Collections URI class allows swappable implementation by applications. URI class now handles file: URIs for Win32 and Unix conventions. Fixes to enable it to work on Apple OSX 10.1, 10.2 (also tested working on Linux/x86, Solaris/sparc, FreeBSD/x86) Many internal changes to support API changes, allow it to work with Redland when compiled as a separate library Reorganised source into separate modules - URI, xml parser, ntriples parser, XML namespaces, XML qnames, locator. More resilience with XML errors and XML parser errors - none of libxml2's XML test suite examples crash raptor. N-Triples parser recovers gracefully from errors in content Packing for debian included Added manual pages libraptor.3 and rapper.1 Added raptor-config script for compiling with the library. 2002-06-08 Raptor Version 0.9.5 Released Many bugs fixed Added full relative URI resolving Work around bugs in libxml and expat (older versions) Support libxml with the use of entities in the document Support xml:lang passing to application 2002-03-27 Raptor Version 0.9.4 Released XML Base support (xml:base) added xml:lang support added with N-Triples lang-string support All N-Triples string escapes implemented N-Triples support with XML literals - xml("<foo/>") and plain "foo" removed all special code for containers; treated as regular typedNodes rdf:parseType="Literal" now working Builds as shared and static libraries Conformance test suite added 2001-08-21 Raptor Version 0.9.3 Released N-Triples parser added rdf:parseType="Literal" works much better (Aaron Michal and me) DAML collections support added (Aaron Michal) Win32 patch added - I can't confirm my merge didn't break this (Aaron Michal) N-Triples updated to support CR, LF and CR LF endings Make parser generated ids appear distinguised from regular URIs Added N-Triples output Made rdf:type, rdf:value as property attributes work Made empty typed nodes work GNOME xml / libxml error location (line, column) values corrected. 2001-07-03 Raptor Version 0.9.2 Released Now called Raptor 2001-06-06 Raptor Version 0.9.1 Released Many bug fixes Updates for Redland API changes Fixed rdf:parsetype="Literal" buffer overrun Added better XML parser auto-detection for various expats and libxml 2001-01-22 Raptor Version 0.9.0 Released First release __________________________________________________________________ Copyright (C) 2001-2010 Dave Beckett Copyright (C) 2001-2005 University of Bristol ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/data/���������������������������������������������������������������������������������0000755�0001750�0001750�00000000000�11331056234�011016� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/data/dc.rdf���������������������������������������������������������������������������0000644�0001750�0001750�00000000506�10360131567�012026� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:Description rdf:about="http://purl.org/net/dajobe/"> <dc:title>Dave Beckett's Home Page</dc:title> <dc:creator>Dave Beckett</dc:creator> </rdf:Description> </rdf:RDF> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/data/Makefile.am����������������������������������������������������������������������0000644�0001750�0001750�00000000022�10674751730�013000� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������EXTRA_DIST=dc.rdf ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/data/Makefile.in����������������������������������������������������������������������0000644�0001750�0001750�00000024530�11330704763�013015� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = dc.rdf all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/docs/���������������������������������������������������������������������������������0000755�0001750�0001750�00000000000�11331056234�011035� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/docs/html/����������������������������������������������������������������������������0000755�0001750�0001750�00000000000�11331056234�012001� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor-1.4.21/docs/html/tutorial-parse-strictness.html����������������������������������������������0000644�0001750�0001750�00000006206�11331056234�017765� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Set the parsing strictness

Set the parsing strictness

raptor_set_parser_strict() allows setting of the parser strictness flag. The default is lax parsing, accepting older or deprecated syntax forms but may generate a warning. Setting to non-0 (true) will cause parser errors to be generated in these cases.

raptor-1.4.21/docs/html/raptor-section-stringbuffer.html0000644000175000017500000006222211331056234020262 00000000000000 String buffer

String buffer

String buffer — Append-only strings.

Synopsis

typedef             raptor_stringbuffer;
raptor_stringbuffer* raptor_new_stringbuffer            (void);
void                raptor_free_stringbuffer            (raptor_stringbuffer *stringbuffer);
int                 raptor_stringbuffer_append_counted_string
                                                        (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         size_t length,
                                                         int do_copy);
int                 raptor_stringbuffer_append_string   (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         int do_copy);
int                 raptor_stringbuffer_append_decimal  (raptor_stringbuffer *stringbuffer,
                                                         int integer);
int                 raptor_stringbuffer_append_stringbuffer
                                                        (raptor_stringbuffer *stringbuffer,
                                                         raptor_stringbuffer *append);
int                 raptor_stringbuffer_prepend_counted_string
                                                        (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         size_t length,
                                                         int do_copy);
int                 raptor_stringbuffer_prepend_string  (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         int do_copy);
unsigned char *     raptor_stringbuffer_as_string       (raptor_stringbuffer *stringbuffer);
size_t              raptor_stringbuffer_length          (raptor_stringbuffer *stringbuffer);
int                 raptor_stringbuffer_copy_to_string  (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         size_t length);

Description

A utility class that allows easy construction of strings that grow at the end by appending new strings. Primarily used for constructing/serializing syntaxes into strings by the raptor_iostream and raptor_serializer classes.

Details

raptor_stringbuffer

raptor_stringbuffer* raptor_stringbuffer;

Raptor string buffer class


raptor_new_stringbuffer ()

raptor_stringbuffer* raptor_new_stringbuffer            (void);

Create a new stringbuffer.

Returns :

pointer to a raptor_stringbuffer object or NULL on failure

raptor_free_stringbuffer ()

void                raptor_free_stringbuffer            (raptor_stringbuffer *stringbuffer);

Destroy a stringbuffer.

stringbuffer :

stringbuffer object to destroy.

raptor_stringbuffer_append_counted_string ()

int                 raptor_stringbuffer_append_counted_string
                                                        (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         size_t length,
                                                         int do_copy);

If string is NULL or length is 0, no work is performed.

If do_copy is non-0, the passed-in string is copied into new memory otherwise the stringbuffer becomes the owner of the string pointer and will free it when the stringbuffer is destroyed.

Add a string to the stringbuffer.

stringbuffer :

raptor stringbuffer

string :

string

length :

length of string

do_copy :

non-0 to copy the string

Returns :

non-0 on failure

raptor_stringbuffer_append_string ()

int                 raptor_stringbuffer_append_string   (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         int do_copy);

Add a string to the stringbuffer.

If string is NULL, no work is performed.

If do_copy is non-0, the passed-in string is copied into new memory otherwise the stringbuffer becomes the owner of the string pointer and will free it when the stringbuffer is destroyed.

stringbuffer :

raptor stringbuffer

string :

string

do_copy :

non-0 to copy the string

Returns :

non-0 on failure

raptor_stringbuffer_append_decimal ()

int                 raptor_stringbuffer_append_decimal  (raptor_stringbuffer *stringbuffer,
                                                         int integer);

Add an integer in decimal to the stringbuffer.

stringbuffer :

raptor stringbuffer

integer :

integer to format as decimal and add

Returns :

non-0 on failure

raptor_stringbuffer_append_stringbuffer ()

int                 raptor_stringbuffer_append_stringbuffer
                                                        (raptor_stringbuffer *stringbuffer,
                                                         raptor_stringbuffer *append);

Add a stringbuffer to the stringbuffer.

This function removes the content from the appending stringbuffer, making it empty and appends it to the supplied stringbuffer.

stringbuffer :

raptor_stringbuffer

append :

raptor_stringbuffer to append

Returns :

non-0 on failure

raptor_stringbuffer_prepend_counted_string ()

int                 raptor_stringbuffer_prepend_counted_string
                                                        (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         size_t length,
                                                         int do_copy);

If do_copy is non-0, the passed-in string is copied into new memory otherwise the stringbuffer becomes the owner of the string pointer and will free it when the stringbuffer is destroyed.

Add a string to the start of the stringbuffer.

stringbuffer :

raptor stringbuffer

string :

string

length :

length of string

do_copy :

non-0 to copy the string

Returns :

non-0 on failure

raptor_stringbuffer_prepend_string ()

int                 raptor_stringbuffer_prepend_string  (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         int do_copy);

Add a string to the start of the stringbuffer.

If do_copy is non-0, the passed-in string is copied into new memory otherwise the stringbuffer becomes the owner of the string pointer and will free it when the stringbuffer is destroyed.

stringbuffer :

raptor stringbuffer

string :

string

do_copy :

non-0 to copy the string

Returns :

non-0 on failure

raptor_stringbuffer_as_string ()

unsigned char *     raptor_stringbuffer_as_string       (raptor_stringbuffer *stringbuffer);

Return the stringbuffer as a C string.

Note: the return value is a to a shared string that the stringbuffer allocates and manages.

stringbuffer :

raptor stringbuffer

Returns :

NULL on failure or stringbuffer is empty, otherwise a pointer to a shared copy of the string.

raptor_stringbuffer_length ()

size_t              raptor_stringbuffer_length          (raptor_stringbuffer *stringbuffer);

Return the stringbuffer length.

stringbuffer :

raptor stringbuffer

Returns :

size of stringbuffer

raptor_stringbuffer_copy_to_string ()

int                 raptor_stringbuffer_copy_to_string  (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         size_t length);

Copy the stringbuffer into a string.

Copies the underlying string to a pre-allocated buffer. The output string is always '\0' terminated.

stringbuffer :

raptor stringbuffer

string :

output string

length :

size of output string

Returns :

non-0 on failure such as stringbuffer is empty, buffer is too small
raptor-1.4.21/docs/html/serializer-atom.html0000644000175000017500000000655111331056234015725 00000000000000 Atom 1.0 serializer (name atom)

Atom 1.0 serializer (name atom)

A serializer to the Atom 1.0 syndication format defined in IETF RFC 4287. This serializes an RDF graph written in the RSS 1.0 data model to Atom 1.0 plus optionally writes extra RDF triples.

The extra RDF triples are written into an at:md metadata block, along with at:feedmap and at:entrymap elements to describe the RSS 1.0 predicate to Atom 1.0 elements mappings for the feed and entry blocks respecively. The extra triples are enabled when serializer feature 'rssTriples' is set to string value 'atom-triples'.

raptor-1.4.21/docs/html/raptor-section-locator.html0000644000175000017500000003736511331056234017237 00000000000000 Locator

Locator

Locator — Location information for errors, warnings and messages.

Synopsis

                    raptor_locator;
void                raptor_print_locator                (FILE *stream,
                                                         raptor_locator *locator);
int                 raptor_format_locator               (char *buffer,
                                                         size_t length,
                                                         raptor_locator *locator);
int                 raptor_locator_line                 (raptor_locator *locator);
int                 raptor_locator_column               (raptor_locator *locator);
int                 raptor_locator_byte                 (raptor_locator *locator);
const char *        raptor_locator_file                 (raptor_locator *locator);
const char *        raptor_locator_uri                  (raptor_locator *locator);

Description

A small structure that can be optionally filled in when errors, warnings or other messages are generated and returned to user code.

Details

raptor_locator

typedef struct {
  raptor_uri *uri;
  const char *file;
  int line;
  int column;
  int byte;  
} raptor_locator;

Location information for an error, warning or information message.

raptor_uri *uri;

URI of location (or NULL)

const char *file;

Filename of location (or NULL)

int line;

Line number of location (or <0 for no line)

int column;

Column number of location (or <0 for no column)

int byte;

Byte number of location (or <0 for no byte)

raptor_print_locator ()

void                raptor_print_locator                (FILE *stream,
                                                         raptor_locator *locator);

Print a raptor locator to a stream.

raptor_init() MUST have been called before calling this function. Use raptor_print_locator_v2() if using raptor_world APIs.

stream :

stream to print to

locator :

raptor_locator to print

raptor_format_locator ()

int                 raptor_format_locator               (char *buffer,
                                                         size_t length,
                                                         raptor_locator *locator);

Format a raptor locator as a string.

If buffer is NULL or length is insufficient for the size of the locator, returns the number of additional bytes required in the buffer to write the locator.

raptor_init() MUST have been called before calling this function. Use raptor_format_locator_v2() if using raptor_world APIs.

buffer :

buffer to store format

length :

size of buffer

locator :

raptor_locator to format

Returns :

0 on success, >0 if additional bytes required in buffer, <0 on failure

raptor_locator_line ()

int                 raptor_locator_line                 (raptor_locator *locator);

Get line number from locator.

locator :

locator

Returns :

integer line number, or -1 if there is no line number available

raptor_locator_column ()

int                 raptor_locator_column               (raptor_locator *locator);

Get column number from locator.

locator :

locator

Returns :

integer column number, or -1 if there is no column number available

raptor_locator_byte ()

int                 raptor_locator_byte                 (raptor_locator *locator);

Get the locator byte offset from locator.

locator :

locator

Returns :

integer byte number, or -1 if there is no byte offset available

raptor_locator_file ()

const char *        raptor_locator_file                 (raptor_locator *locator);

Get file name from locator.

locator :

locator

Returns :

string file name, or NULL if there is no filename available

raptor_locator_uri ()

const char *        raptor_locator_uri                  (raptor_locator *locator);

Get URI from locator.

Returns a pointer to a shared string version of the URI in the locator. This must be copied if it is needed.

raptor_init() MUST have been called before calling this function. Use raptor_locator_uri_v2() if using raptor_world APIs.

locator :

locator

Returns :

string URI, or NULL if there is no URI available
raptor-1.4.21/docs/html/tutorial-parser-set-id-handler.html0000644000175000017500000001065011331056234020544 00000000000000 Set the identifier creator handler

Set the identifier creator handler

Identifiers are created in some parsers by generating them automatically or via hints given a syntax. Raptor can customise this process using a user-supplied identifier handler function. For example, in RDF/XML generated blank node identifiers and those those specified rdf:nodeID are passed through this process. Setting a handler allows the identifier generation mechanism to be fully replaced. A lighter alternative is to use raptor_set_default_generate_id_parameters() to adjust the default algorithm for generated identifiers.

It is used as follows

  raptor_generate_id_handler id_handler;

  raptor_set_generate_id_handler(rdf_parser, user_data, id_handler);

The id_handler takes the following signature:

unsigned char*
generate_id_handler(void* user_data, raptor_genid_type type,
                    unsigned char* user_id) {
   /* return a new generated ID based on user_id (optional) */
}

where the raptor_genid_type provides extra information on the identifier being created and user_id an optional user-supplied identifier, such as the value of a rdf:nodeID in RDF/XML.

raptor-1.4.21/docs/html/raptor-section-parser.html0000644000175000017500000022140011331056234017051 00000000000000 Parser

Parser

Parser — RDF parsers - from a syntax to RDF triples

Synopsis

typedef             raptor_parser;
raptor_parser*      raptor_new_parser                   (const char *name);
raptor_parser*      raptor_new_parser_for_content       (raptor_uri *uri,
                                                         const char *mime_type,
                                                         unsigned char *buffer,
                                                         size_t len,
                                                         unsigned char *identifier);
int                 raptor_start_parse                  (raptor_parser *rdf_parser,
                                                         raptor_uri *uri);
void                raptor_free_parser                  (raptor_parser *parser);
void                raptor_set_fatal_error_handler      (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_message_handler handler);
void                raptor_set_error_handler            (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_message_handler handler);
void                raptor_set_warning_handler          (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_message_handler handler);
void                raptor_set_statement_handler        (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_statement_handler handler);
void                raptor_set_generate_id_handler      (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_generate_id_handler handler);
void                (*raptor_graph_handler)             (void *user_data,
                                                         raptor_uri *graph);
void                raptor_set_graph_handler            (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_graph_handler handler);
void                (*raptor_namespace_handler)         (void *user_data,
                                                         raptor_namespace *nspace);
void                raptor_set_namespace_handler        (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_namespace_handler handler);
raptor_locator*     raptor_get_locator                  (raptor_parser *rdf_parser);
void                raptor_set_default_generate_id_parameters
                                                        (raptor_parser *rdf_parser,
                                                         char *prefix,
                                                         int base);
int                 raptor_parse_chunk                  (raptor_parser *rdf_parser,
                                                         unsigned char *buffer,
                                                         size_t len,
                                                         int is_end);
int                 raptor_parse_file_stream            (raptor_parser *rdf_parser,
                                                         FILE *stream,
                                                         const char *filename,
                                                         raptor_uri *base_uri);
int                 raptor_parse_file                   (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri);
int                 raptor_parse_uri                    (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri);
int                 raptor_parse_uri_with_connection    (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri,
                                                         void *connection);
void                raptor_parse_abort                  (raptor_parser *rdf_parser);
const char*         raptor_get_name                     (raptor_parser *rdf_parser);
const char*         raptor_get_label                    (raptor_parser *rdf_parser);
const char*         raptor_get_mime_type                (raptor_parser *rdf_parser);
int                 raptor_get_need_base_uri            (raptor_parser *rdf_parser);
int                 raptor_set_feature                  (raptor_parser *parser,
                                                         raptor_feature feature,
                                                         int value);
int                 raptor_parser_set_feature_string    (raptor_parser *parser,
                                                         raptor_feature feature,
                                                         unsigned char *value);
int                 raptor_get_feature                  (raptor_parser *parser,
                                                         raptor_feature feature);
const unsigned char* raptor_parser_get_feature_string   (raptor_parser *parser,
                                                         raptor_feature feature);
void                raptor_set_parser_strict            (raptor_parser *rdf_parser,
                                                         int is_strict);
const char*         raptor_parser_get_accept_header     (raptor_parser *rdf_parser);
void                raptor_parser_set_uri_filter        (raptor_parser *parser,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);
unsigned char*      raptor_parser_generate_id           (raptor_parser *rdf_parser,
                                                         raptor_genid_type type);
raptor_world*       raptor_parser_get_world             (raptor_parser *rdf_parser);

Description

The parsing class that allows creating a parser for reading from a particular syntax (or can guess and use contextual information) that will on demand generate RDF triples to a handler function, as chunks of syntax data are passed into the parser. Parsing can be done from strings in memory, files or from URIs on the web.

There are also methods to deal with handling errors, warnings and returned triples as well as setting options (features) that can adjust how parsing is performed.

Details

raptor_parser

raptor_parser* raptor_parser;

Raptor Parser class


raptor_new_parser ()

raptor_parser*      raptor_new_parser                   (const char *name);

Constructor - create a new raptor_parser object.

raptor_init() MUST have been called before calling this function. Use raptor_new_parser_v2() if using raptor_world APIs.

name :

the parser name

Returns :

a new raptor_parser object or NULL on failure

raptor_new_parser_for_content ()

raptor_parser*      raptor_new_parser_for_content       (raptor_uri *uri,
                                                         const char *mime_type,
                                                         unsigned char *buffer,
                                                         size_t len,
                                                         unsigned char *identifier);

Constructor - create a new raptor_parser.

Uses raptor_guess_parser_name() to find a parser by scoring recognition of the syntax by a block of characters, the content identifier or a mime type. The content identifier is typically a filename or URI or some other identifier.

raptor_init() MUST have been called before calling this function. Use raptor_new_parser_for_content_v2() if using raptor_world APIs.

uri :

URI identifying the syntax (or NULL)

mime_type :

mime type identifying the content (or NULL)

buffer :

buffer of content to guess (or NULL)

len :

length of buffer

identifier :

identifier of content (or NULL)

Returns :

a new raptor_parser object or NULL on failure

raptor_start_parse ()

int                 raptor_start_parse                  (raptor_parser *rdf_parser,
                                                         raptor_uri *uri);

Start a parse of content with base URI.

Parsers that need a base URI can be tested with raptor_get_need_base_uri().

rdf_parser :

RDF parser

uri :

base URI or may be NULL if no base URI is required

Returns :

non-0 on failure, <0 if a required base URI was missing

raptor_free_parser ()

void                raptor_free_parser                  (raptor_parser *parser);

Destructor - destroy a raptor_parser object.

parser :

raptor_parser object

raptor_set_fatal_error_handler ()

void                raptor_set_fatal_error_handler      (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_message_handler handler);

Set the parser error handling function.

The function will receive callbacks when the parser fails.

parser :

the parser

user_data :

user data to pass to function

handler :

pointer to the function

raptor_set_error_handler ()

void                raptor_set_error_handler            (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_message_handler handler);

Set the parser error handling function.

The function will receive callbacks when the parser fails.

parser :

the parser

user_data :

user data to pass to function

handler :

pointer to the function

raptor_set_warning_handler ()

void                raptor_set_warning_handler          (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_message_handler handler);

Set the parser warning handling function.

The function will receive callbacks when the parser gives a warning.

parser :

the parser

user_data :

user data to pass to function

handler :

pointer to the function

raptor_set_statement_handler ()

void                raptor_set_statement_handler        (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_statement_handler handler);

Set the statement handler function for the parser.

parser :

raptor_parser parser object

user_data :

user data pointer for callback

handler :

new statement callback function

raptor_set_generate_id_handler ()

void                raptor_set_generate_id_handler      (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_generate_id_handler handler);

Set the generate ID handler function for the parser.

Sets the function to generate IDs for the parser. The handler is called with the user_data parameter and an ID type of either RAPTOR_GENID_TYPE_BNODEID or RAPTOR_GENID_TYPE_BAGID (latter is deprecated).

The final argument of the callback method is user_bnodeid, the value of the rdf:nodeID attribute that the user provided if any (or NULL). It can either be returned directly as the generated value when present or modified. The passed in value must be free()d if it is not used.

If handler is NULL, the default method is used

parser :

raptor_parser parser object

user_data :

user data pointer for callback

handler :

generate ID callback function

raptor_graph_handler ()

void                (*raptor_graph_handler)             (void *user_data,
                                                         raptor_uri *graph);

Named graph reporting handler function. Due to historic reasons the named graph API is separated from the statement handler. A graph is reported after all its statements.

user_data :

user data

graph :

graph to report, 0 for the default graph

raptor_set_graph_handler ()

void                raptor_set_graph_handler            (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_graph_handler handler);

Set the graph handler function for the parser.

parser :

raptor_parser parser object

user_data :

user data pointer for callback

handler :

new graph callback function

raptor_namespace_handler ()

void                (*raptor_namespace_handler)         (void *user_data,
                                                         raptor_namespace *nspace);

XML Namespace declaration reporting handler set by raptor_set_namespace_handler().

user_data :

user data

nspace :

raptor_namespace declared

raptor_set_namespace_handler ()

void                raptor_set_namespace_handler        (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_namespace_handler handler);

Set the namespace handler function for the parser.

When a prefix/namespace is seen in a parser, call the given handler with the prefix string and the raptor_uri namespace URI. Either can be NULL for the default prefix or default namespace.

The handler function does not deal with duplicates so any namespace may be declared multiple times.

parser :

raptor_parser parser object

user_data :

user data pointer for callback

handler :

new namespace callback function

raptor_get_locator ()

raptor_locator*     raptor_get_locator                  (raptor_parser *rdf_parser);

Get the current raptor locator object.

rdf_parser :

raptor parser

Returns :

raptor locator

raptor_set_default_generate_id_parameters ()

void                raptor_set_default_generate_id_parameters
                                                        (raptor_parser *rdf_parser,
                                                         char *prefix,
                                                         int base);

Set default ID generation parameters.

Sets the parameters for the default algorithm used to generate IDs. The default algorithm uses both prefix and base to generate a new identifier. The exact identifier generated is not guaranteed to be a strict concatenation of prefix and base but will use both parts. The prefix parameter is copied to generate an ID.

For finer control of the generated identifiers, use raptor_set_default_generate_id_handler().

If prefix is NULL, the default prefix is used (currently "genid") If base is less than 1, it is initialised to 1.

rdf_parser :

raptor_parser object

prefix :

prefix string

base :

integer base identifier

raptor_parse_chunk ()

int                 raptor_parse_chunk                  (raptor_parser *rdf_parser,
                                                         unsigned char *buffer,
                                                         size_t len,
                                                         int is_end);

Parse a block of content into triples.

This method can only be called after raptor_start_parse has initialised the parser.

rdf_parser :

RDF parser

buffer :

content to parse

len :

length of buffer

is_end :

non-0 if this is the end of the content (such as EOF)

Returns :

non-0 on failure.

raptor_parse_file_stream ()

int                 raptor_parse_file_stream            (raptor_parser *rdf_parser,
                                                         FILE *stream,
                                                         const char *filename,
                                                         raptor_uri *base_uri);

Parse RDF content from a FILE*.

After draining the stream, fclose is not called on it internally.

rdf_parser :

parser

stream :

FILE* of RDF content

filename :

filename of content or NULL if it has no name

base_uri :

the base URI to use

Returns :

non 0 on failure

raptor_parse_file ()

int                 raptor_parse_file                   (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri);

Parse RDF content at a file URI.

If uri is NULL (source is stdin), then the base_uri is required.

rdf_parser :

parser

uri :

URI of RDF content or NULL to read from standard input

base_uri :

the base URI to use (or NULL if the same)

Returns :

non 0 on failure

raptor_parse_uri ()

int                 raptor_parse_uri                    (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri);

Parse the RDF content at URI.

Sends an HTTP Accept: header whent the URI is of the HTTP protocol, see raptor_parse_uri_with_connection() for details including how the base_uri is used.

rdf_parser :

parser

uri :

URI of RDF content

base_uri :

the base URI to use (or NULL if the same)

Returns :

non 0 on failure

raptor_parse_uri_with_connection ()

int                 raptor_parse_uri_with_connection    (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri,
                                                         void *connection);

Parse RDF content at URI using existing WWW connection.

If base_uri is not given and during resolution of the URI, a protocol redirection occurs, the final resolved URI will be used as the base URI. If redirection does not occur, the base URI will be uri.

If base_uri is given, it overrides the process above.

When connection is NULL and a MIME Type exists for the parser type - such as returned by raptor_get_mime_type(parser) - this type is sent in an HTTP Accept: header in the form Accept: MIME-TYPE along with a wildcard of 0.1 quality, so MIME-TYPE is prefered rather than the sole answer. The latter part may not be necessary but should ensure an HTTP 200 response.

rdf_parser :

parser

uri :

URI of RDF content

base_uri :

the base URI to use (or NULL if the same)

connection :

connection object pointer or NULL to create a new one

Returns :

non 0 on failure

raptor_parse_abort ()

void                raptor_parse_abort                  (raptor_parser *rdf_parser);

Abort an ongoing parse.

Causes any ongoing generation of statements by a parser to be terminated and the parser to return controlto the application as soon as draining any existing buffers.

Most useful inside raptor_parse_file or raptor_parse_uri when the Raptor library is directing the parsing and when one of the callback handlers such as as set by raptor_set_statement_handler requires to return to the main application code.

rdf_parser :

raptor_parser parser object

raptor_get_name ()

const char*         raptor_get_name                     (raptor_parser *rdf_parser);

Get the name of a parser.

rdf_parser :

raptor_parser parser object

Returns :

the short name for the parser.

raptor_get_label ()

const char*         raptor_get_label                    (raptor_parser *rdf_parser);

Get a descriptive label of a parser.

rdf_parser :

raptor_parser parser object

Returns :

a readable label for the parser.

raptor_get_mime_type ()

const char*         raptor_get_mime_type                (raptor_parser *rdf_parser);

Return MIME type for the parser.

rdf_parser :

raptor_parser parser object

Returns :

MIME type or NULL if none available

raptor_get_need_base_uri ()

int                 raptor_get_need_base_uri            (raptor_parser *rdf_parser);

Get a boolean whether this parser needs a base URI to start parsing.

rdf_parser :

raptor_parser parser object

Returns :

non-0 if this parser needs a base URI

raptor_set_feature ()

int                 raptor_set_feature                  (raptor_parser *parser,
                                                         raptor_feature feature,
                                                         int value);

Set various parser features.

The allowed features are available via raptor_features_enumerate().

parser :

raptor_parser parser object

feature :

feature to set from enumerated raptor_feature values

value :

integer feature value (0 or larger)

Returns :

non 0 on failure or if the feature is unknown

raptor_parser_set_feature_string ()

int                 raptor_parser_set_feature_string    (raptor_parser *parser,
                                                         raptor_feature feature,
                                                         unsigned char *value);

Set parser features with string values.

The allowed features are available via raptor_features_enumerate(). If the feature type is integer, the value is interpreted as an integer.

parser :

raptor_parser parser object

feature :

feature to set from enumerated raptor_feature values

value :

feature value

Returns :

non 0 on failure or if the feature is unknown

raptor_get_feature ()

int                 raptor_get_feature                  (raptor_parser *parser,
                                                         raptor_feature feature);

Get various parser features.

The allowed features are available via raptor_features_enumerate().

Note: no feature value is negative

parser :

raptor_parser parser object

feature :

feature to get value

Returns :

feature value or < 0 for an illegal feature

raptor_parser_get_feature_string ()

const unsigned char* raptor_parser_get_feature_string   (raptor_parser *parser,
                                                         raptor_feature feature);

Get parser features with string values.

The allowed features are available via raptor_features_enumerate(). If a string is returned, it must be freed by the caller.

parser :

raptor_parser parser object

feature :

feature to get value

Returns :

feature value or NULL for an illegal feature or no value

raptor_set_parser_strict ()

void                raptor_set_parser_strict            (raptor_parser *rdf_parser,
                                                         int is_strict);

Set parser to strict / lax mode.

rdf_parser :

raptor_parser object

is_strict :

Non 0 for strict parsing

raptor_parser_get_accept_header ()

const char*         raptor_parser_get_accept_header     (raptor_parser *rdf_parser);

Get an HTTP Accept value for the parser.

The returned string must be freed by the caller such as with raptor_free_memory().

rdf_parser :

parser

Returns :

a new Accept: header string or NULL on failure

raptor_parser_set_uri_filter ()

void                raptor_parser_set_uri_filter        (raptor_parser *parser,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);

Set URI filter function for WWW retrieval.

parser :

parser object

filter :

URI filter function

user_data :

User data to pass to filter function

raptor_parser_generate_id ()

unsigned char*      raptor_parser_generate_id           (raptor_parser *rdf_parser,
                                                         raptor_genid_type type);

Generate an ID for a parser

Type can be either RAPTOR_GENID_TYPE_BNODEID or RAPTOR_GENID_TYPE_BAGID

rdf_parser :

raptor_parser parser object

type :

Type of ID to generate

Returns :

newly allocated generated ID or NULL on failure

raptor_parser_get_world ()

raptor_world*       raptor_parser_get_world             (raptor_parser *rdf_parser);

Get the raptor_world object associated with a parser.

rdf_parser :

parser

Returns :

raptor_world* pointer
raptor-1.4.21/docs/html/tutorial-serializer-get-triples.html0000644000175000017500000001676711331056234021077 00000000000000 Get or construct RDF Triples

Get or construct RDF Triples

An raptor_statement can be made either by receiving them from a raptor_parser via parsing or can be constructed by hand.

When constructing by hand, the raptor_statement structure should be allocated by the application and the fields filled in. Each triple has three parts. The subject can be a URI or blank node, the predicate can only be a URI and the object can be a URI, blank node or RDF literal. RDF literals can have either just a Unicode string, a Unicode string and a language or a Unicode string and a datatype URI.

The triple part types are set as fields named like subject_type for describing field subject. So to initialise the subject of the triple, set the field statement.subject to point to a previously allocated raptor_uri* object (for URI) or char* (for blank node) and set statement.subject_type to RAPTOR_IDENTIFIER_TYPE_RESOURCE or RAPTOR_IDENTIFIER_TYPE_ANONYMOUS respectively. Triple predicates are always of type RAPTOR_IDENTIFIER_TYPE_RESOURCE. Triple objects are all all types given above and also RAPTOR_IDENTIFIER_TYPE_LITERAL which takes an unsigned char* pointer plus an optional language char* pointer in the object_literal_language field OR a a raptor_uri* literal datatype pointer in the object_literal_datatype field. The triple part types are described under raptor_identifier_type.

Example 3. rdfserialize.c: Serialize 1 triple to RDF/XML (Abbreviated)

#include <stdio.h>
#include <raptor.h>
#include <stdlib.h>

/* rdfserialize.c: serialize 1 triple to RDF/XML-Abbrev */

int
main(int argc, char *argv[])
{
  raptor_serializer* rdf_serializer=NULL;
  unsigned char *uri_string;
  raptor_uri *base_uri;
  raptor_statement* triple;

  raptor_init();
  
  uri_string=raptor_uri_filename_to_uri_string(argv[1]);
  base_uri=raptor_new_uri(uri_string);

  rdf_serializer=raptor_new_serializer("rdfxml-abbrev");
  raptor_serialize_start_to_file_handle(rdf_serializer, base_uri, stdout);
  
  /* Make a triple with URI subject, URI predicate, literal object */
  triple=(raptor_statement*)calloc(1, sizeof(raptor_statement));
  triple->subject=(void*)raptor_new_uri((const unsigned char*)"http://example.org/subject");
  triple->subject_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE;
  triple->predicate=(void*)raptor_new_uri((const unsigned char*)"http://example.org/predicate");
  triple->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE;
  triple->object="An example literal";
  triple->object_type=RAPTOR_IDENTIFIER_TYPE_LITERAL;
  triple->object_literal_language=(const unsigned char*)"en";

  /* Write the triple */
  raptor_serialize_statement(rdf_serializer, triple);

  /* Delete the triple */
  raptor_free_uri((raptor_uri*)triple->subject);
  raptor_free_uri((raptor_uri*)triple->predicate);
  free(triple);

  raptor_serialize_end(rdf_serializer);
  raptor_free_serializer(rdf_serializer);
  
  raptor_free_uri(base_uri);
  raptor_free_memory(uri_string);

  raptor_finish();
  return 0;
}

Compile it like this:

$ gcc -o rdfserialize rdfserialize.c `raptor-config --cflags` `raptor-config --libs`

and run it with an optional base URI argument

$ ./rdfserialize
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about="http://example.org/subject">
    <ns0:predicate xmlns:ns0="http://example.org/" xml:lang="en">An example</ns0:predicate>
  </rdf:Description>
</rdf:RDF>


raptor-1.4.21/docs/html/tutorial-parser-static-info.html0000644000175000017500000001004711331056234020164 00000000000000 Querying parser static information

Querying parser static information

These methods return information about the constructed parser implementation corresponding to the information available via raptor_syntaxes_enumerate() for all parsers.

raptor_get_name() return the parser syntax name, raptor_get_label() the long label for the parser and raptor_get_mime_type() the primary MIME Type for the parser (there may be others that the parser will accept but this is the main one).

raptor_parser_get_accept_header() returns a string that would be sent in an HTTP request Accept: header for the syntaxes accepted by this parser only.

raptor-1.4.21/docs/html/raptor-section-world.html0000644000175000017500000003523211331056234016712 00000000000000 Initialisation

Initialisation

Initialisation — Library startup, shutdown and configuration.

Synopsis

void                raptor_init                         (void);
void                raptor_finish                       (void);
typedef             raptor_world;
raptor_world*       raptor_new_world                    (void);
void                raptor_free_world                   (raptor_world *world);
enum                raptor_libxml_flags;
void                raptor_world_set_libxml_flags       (raptor_world *world,
                                                         int flags);
void                raptor_world_set_libxslt_security_preferences
                                                        (raptor_world *world,
                                                         void *security_preferences);
int                 raptor_world_open                   (raptor_world *world);

Description

How to initialise and terminate the library, set library-wide configuration flags and options.

Details

raptor_init ()

void                raptor_init                         (void);

Initialise the raptor library.

This function MUST be called before using any of the raptor APIs.


raptor_finish ()

void                raptor_finish                       (void);

Terminate the raptor library.

Cleans up state of the library. If called, must be used after all other objects are destroyed with their destructor.


raptor_world

typedef struct raptor_world_s raptor_world;

Raptor world class.


raptor_new_world ()

raptor_world*       raptor_new_world                    (void);

Allocate a new raptor_world object.

The raptor_world is initialized with raptor_world_open(). Allocation and initialization are decoupled to allow changing settings on the world object before init.

Returns :

uninitialized raptor_world object or NULL on failure

raptor_free_world ()

void                raptor_free_world                   (raptor_world *world);

Terminate the raptor library.

Destroys the raptor_world object and all related information.

world :

raptor_world object

enum raptor_libxml_flags

typedef enum {
  RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE    = 1,
  RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE = 2
} raptor_libxml_flags;

libxml library flags

These are used by raptor_world_set_libxml_flags() and raptor_set_libxml_flags() to control common libxml features.

If any handler saving/restoring is enabled, any existing handler and context is saved before parsing and restored afterwards. Otherwise, no saving/restoring is performed.

RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE

if set - save/restore the libxml generic error handler when parsing (default unset)

RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE

if set - save/restore the libxml structured error handler when parsing (default unset)

raptor_world_set_libxml_flags ()

void                raptor_world_set_libxml_flags       (raptor_world *world,
                                                         int flags);

Set common libxml library flags

If libxml is compiled into the library, flags is a bitmask taking an OR of values defined in raptor_libxml_flags

See the raptor_libxml_flags documentation for full details of what the flags mean.

world :

world

flags :

libxml flags

raptor_world_set_libxslt_security_preferences ()

void                raptor_world_set_libxslt_security_preferences
                                                        (raptor_world *world,
                                                         void *security_preferences);

Set libxslt security preferences policy object

The security_preferences object will NOT become owned by raptor_world

If libxslt is compiled into the library, security_preferences should be an xsltSecurityPrefsPtr and will be used to call xsltSetCtxtSecurityPrefs() when an XSLT engine is initialised.

If libxslt is not compiled in, the object set here is not used.

world :

world

security_preferences :

security preferences (an xsltSecurityPrefsPtr)

raptor_world_open ()

int                 raptor_world_open                   (raptor_world *world);

Initialise the raptor library.

Initializes a raptor_world object created by raptor_new_world(). Allocation and initialization are decoupled to allow changing settings on the world object before init.

The initialized world object is used with subsequent raptor API calls.

world :

raptor_world object

Returns :

non-0 on failure
raptor-1.4.21/docs/html/style.css0000644000175000017500000001142211331056234013573 00000000000000.synopsis, .classsynopsis { /* tango:aluminium 1/2 */ background: #eeeeec; border: solid 1px #d3d7cf; padding: 0.5em; } .programlisting { /* tango:sky blue 0/1 */ background: #e6f3ff; border: solid 1px #729fcf; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } @media screen { sup a.footnote { position: relative; top: 0em ! important; } /* this is needed so that the local anchors are displayed below the naviagtion */ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] { position: relative; padding-top:4.5em; } /* this seems to be a bug in the xsl style sheets when generating indexes */ div.index div.index { top: 0em; } /* make space for the fixed navigation bar and add space at the bottom so that * link targets appear somewhat close to top */ body { padding-top: 3.2em; padding-bottom: 20em; } /* style and size the navigation bar */ table.navigation#top { position: fixed; /* tango:scarlet red 0/1 */ background: #ffe6e6; border: solid 1px #ef2929; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 3em; z-index: 10; } .navigation a, .navigation a:visited { /* tango:scarlet red 3 */ color: #a40000; } .navigation a:hover { /* tango:scarlet red 1 */ color: #ef2929; } td.shortcuts { /* tango:scarlet red 1 */ color: #ef2929; font-size: 80%; white-space: nowrap; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; /* tango:scarlet red 0/1 */ background: #ffe6e6; border: solid 1px #ef2929; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 3em; } } .navigation .title { font-size: 200%; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a, a:visited { text-decoration: none; /* tango:sky blue 2 */ color: #3465a4; } a:hover { text-decoration: underline; /* tango:sky blue 1 */ color: #729fcf; } div.table table { border-collapse: collapse; border-spacing: 0px; /* tango:aluminium 3 */ border: solid 1px #babdb6; } div.table table td, div.table table th { /* tango:aluminium 3 */ border: solid 1px #babdb6; padding: 3px; vertical-align: top; } div.table table th { /* tango:aluminium 2 */ background-color: #d3d7cf; } hr { /* tango:aluminium 3 */ color: #babdb6; background: #babdb6; border: none 0px; height: 1px; clear: both; } .footer { padding-top: 3.5em; /* tango:aluminium 3 */ color: #babdb6; text-align: center; font-size: 80%; } .warning { /* tango:orange 0/1 */ background: #ffeed9; border-color: #ffb04f; } .note { /* tango:chameleon 0/0.5 */ background: #d8ffb2; border-color: #abf562; } .note, .warning { padding: 0.5em; border-width: 1px; border-style: solid; } .note h3, .warning h3 { margin-top: 0.0em } .note p, .warning p { margin-bottom: 0.0em } /* blob links */ h2 .extralinks, h3 .extralinks { float: right; /* tango:aluminium 3 */ color: #babdb6; font-size: 80%; font-weight: normal; } /* code listings */ .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ .programlisting .function { color: #000000; font-weight: bold; } .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ .programlisting .normal { color: #000000; } .programlisting .number { color: #75507b; } /* tango: plum 2 */ .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ .programlisting .type { color: #000000; } .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ .listing_frame { /* tango:sky blue 1 */ border: solid 1px #729fcf; padding: 0px; } .listing_lines, .listing_code { margin-top: 0px; margin-bottom: 0px; padding: 0.5em; } .listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; /* tango:aluminium 6 */ color: #2e3436; } .listing_code { /* tango:sky blue 0 */ background: #e6f3ff; } .listing_code .programlisting { /* override from previous */ border: none 0px; padding: 0px; } .listing_lines pre, .listing_code pre { margin: 0px; } raptor-1.4.21/docs/html/tutorial-parser-set-error-warning-handlers.html0000644000175000017500000001057411331056234023134 00000000000000 Set fatal error, error and warning handlers

Set fatal error, error and warning handlers

There are several other callback handlers that can be set on parsers. These can be set any time before parsing is called. Errors and warnings from parsing can be returned with functions that all take a callback of type raptor_message_handler and signature:

void
message_handler(void *user_data, raptor_locator* locator, 
                const char *message)
{
  /* do something with the message */
}

returning the user data given, associated location information as a raptor_locator and the error/warning message itself. The locator structure contains full information on the details of where in the file or URI the message occurred.

The fatal error, error and warning handlers are all set with similar functions that take a handler as follows:

  raptor_set_fatal_error_handler(rdf_parser, user_data, fatal_handler);

  raptor_set_error_handler(rdf_parser, user_data, error_handler);

  raptor_set_warning_handler(rdf_parser, user_data, warning_handler);

Caution

The program will terminate with abort() if the fatal error handler returns.

raptor-1.4.21/docs/html/parser-guess.html0000644000175000017500000000640011331056234015227 00000000000000 Guess parser (name guess)

Guess parser (name guess)

This is a special parser that picks the actual parser to use based on the content type, the content bytes or the content identifier. The content name can be either from a local file or from a URI.

If the protocol that delivered the content (such as HTTP) provided a Content Type (aka MIME Type) then this will be the primary means for identifying th ecotnent.

The secondary means to identify the content are the bytes of the content (if available), otherwise the content identifier is used, which is the least reliable.

raptor-1.4.21/docs/html/raptor-section-uri-factory.html0000644000175000017500000004711211331056234020027 00000000000000 URI Factory

URI Factory

URI Factory — Provide an implementation for the URI class.

Synopsis

raptor_uri *        (*raptor_new_uri_func)              (void *context,
                                                         unsigned char *uri_string);
raptor_uri *        (*raptor_new_uri_from_uri_local_name_func)
                                                        (void *context,
                                                         raptor_uri *uri,
                                                         unsigned char *local_name);
raptor_uri *        (*raptor_new_uri_relative_to_base_func)
                                                        (void *context,
                                                         raptor_uri *base_uri,
                                                         unsigned char *uri_string);
raptor_uri *        (*raptor_new_uri_for_rdf_concept_func)
                                                        (void *context,
                                                         const char *name);
void                (*raptor_free_uri_func)             (void *context,
                                                         raptor_uri *uri);
int                 (*raptor_uri_equals_func)           (void *context,
                                                         raptor_uri *uri1,
                                                         raptor_uri *uri2);
raptor_uri *        (*raptor_uri_copy_func)             (void *context,
                                                         raptor_uri *uri);
int                 (*raptor_uri_compare_func)          (void *context,
                                                         raptor_uri *uri1,
                                                         raptor_uri *uri2);

Description

A factory that allows registering an implementation for the URI class to override the simple internal one (raptor_uri are char*). Normally used by redland to replace raptor_uri with librdf_uri

Details

raptor_new_uri_func ()

raptor_uri *        (*raptor_new_uri_func)              (void *context,
                                                         unsigned char *uri_string);

Handler function for implementing raptor_new_uri().

context :

URI context data

uri_string :

URI string

Returns :

new URI object or NULL on failure

raptor_new_uri_from_uri_local_name_func ()

raptor_uri *        (*raptor_new_uri_from_uri_local_name_func)
                                                        (void *context,
                                                         raptor_uri *uri,
                                                         unsigned char *local_name);

Handler function for implementing raptor_new_uri_from_uri_local_name().

context :

URI context data

uri :

URI object

local_name :

local name string

Returns :

new URI object or NULL on failure

raptor_new_uri_relative_to_base_func ()

raptor_uri *        (*raptor_new_uri_relative_to_base_func)
                                                        (void *context,
                                                         raptor_uri *base_uri,
                                                         unsigned char *uri_string);

Handler function for implementing raptor_new_uri_relative_to_base().

context :

URI context data

base_uri :

base URI object

uri_string :

relative URI string

Returns :

new URI object or NULL on failure

raptor_new_uri_for_rdf_concept_func ()

raptor_uri *        (*raptor_new_uri_for_rdf_concept_func)
                                                        (void *context,
                                                         const char *name);

Handler function for implementing raptor_new_uri_for_rdf_concept().

context :

URI context data

name :

RDF term

Returns :

new URI object or NULL on failure

raptor_free_uri_func ()

void                (*raptor_free_uri_func)             (void *context,
                                                         raptor_uri *uri);

Handler function for implementing raptor_free_uri().

context :

URI context data

uri :

URI object

raptor_uri_equals_func ()

int                 (*raptor_uri_equals_func)           (void *context,
                                                         raptor_uri *uri1,
                                                         raptor_uri *uri2);

Handler function for implementing raptor_uri_equals().

context :

URI context data

uri1 :

URI object 1

uri2 :

URI object 2

Returns :

non-0 if the URIs are equal

raptor_uri_copy_func ()

raptor_uri *        (*raptor_uri_copy_func)             (void *context,
                                                         raptor_uri *uri);

Handler function for implementing raptor_uri_copy().

context :

URI context data

uri :

URI object

Returns :

new URI object or NULL on failure

raptor_uri_compare_func ()

int                 (*raptor_uri_compare_func)          (void *context,
                                                         raptor_uri *uri1,
                                                         raptor_uri *uri2);

Handler function for implementing raptor_uri_equals().

context :

URI context data

uri1 :

URI object 1

uri2 :

URI object 2

Returns :

-1 if uri1 < uri2, 0 if equal, 1 if uri1 > uri2
raptor-1.4.21/docs/html/raptor-serializers.html0000644000175000017500000001210611331056234016450 00000000000000 Serializers in Raptor (triples to syntax)

Serializers in Raptor (triples to syntax)

Introduction

This section describes the serializers that can be compiled into Raptor and their features. The exact serializers supported may vary by different builds of raptor and can be queried at run-time by use of the raptor_serializers_enumerate function

The optional features that may be set on parsers can also be queried at run-time iwth the raptor_serializer_features_enumerate function.

raptor-1.4.21/docs/html/serializer-rdfxml-abbrev.html0000644000175000017500000000602111331056234017510 00000000000000 RDF/XML (Abbreviated) serializer (name rdfxml-abbrev)

RDF/XML (Abbreviated) serializer (name rdfxml-abbrev)

An RDF/XML serializer using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents.

raptor-1.4.21/docs/html/tutorial-serializer-set-error-warning-handlers.html0000644000175000017500000001016111331056234024001 00000000000000 Set error and warning handlers

Set error and warning handlers

There are several other callback handlers that can be set on serializers. These can be set any time before serializing is started. Errors and warnings from serializing can be returned with functions that all take a callback of type raptor_message_handler and signature:

void
message_handler(void *user_data, raptor_locator* locator, 
                const char *message)
{
  /* do something with the message */
}

returning the user data given, associated location information as a raptor_locator and the error/warning message itself. The locator structure contains full information on the details of where in the serialized file or URI the message occurred.

The fatal error, error and warning handlers are all set with similar functions that take a handler as follows:

  raptor_serializer_set_error_handler(rdf_serializer, user_data, error_handler);

  raptor_serializer_set_warning_handler(rdf_serializer, user_data, warning_handler);

raptor-1.4.21/docs/html/right.png0000644000175000017500000000073011331056234013544 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2 I%=eIDATx!o@.'**M0$$?1~vIeEuLl&4䝠Bݛ|>$ݶoc Features

Features

Features — Parser and Serializer features

Synopsis

enum                raptor_feature;
unsigned int        raptor_get_feature_count            (void);
int                 raptor_features_enumerate           (const raptor_feature feature,
                                                         const char **name,
                                                         raptor_uri **uri,
                                                         const char **label);
raptor_feature      raptor_feature_from_uri             (raptor_uri *uri);
int                 raptor_feature_value_type           (const raptor_feature feature);

Description

Optional parameters for raptor_parser and raptor_serializer objects that can be get and set. Utility functions also exist to enumerate them, their description and the parameter type taken.

Details

enum raptor_feature

typedef enum {
  RAPTOR_FEATURE_SCANNING,
  RAPTOR_FEATURE_ASSUME_IS_RDF,
  RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES,
  RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES,
  RAPTOR_FEATURE_ALLOW_BAGID,
  RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST,
  RAPTOR_FEATURE_NORMALIZE_LANGUAGE,
  RAPTOR_FEATURE_NON_NFC_FATAL,
  RAPTOR_FEATURE_WARN_OTHER_PARSETYPES,
  RAPTOR_FEATURE_CHECK_RDF_ID,
  RAPTOR_FEATURE_RELATIVE_URIS,
  RAPTOR_FEATURE_START_URI,
  RAPTOR_FEATURE_WRITER_AUTO_INDENT,
  RAPTOR_FEATURE_WRITER_AUTO_EMPTY,
  RAPTOR_FEATURE_WRITER_INDENT_WIDTH,
  RAPTOR_FEATURE_WRITER_XML_VERSION,
  RAPTOR_FEATURE_WRITER_XML_DECLARATION,
  RAPTOR_FEATURE_NO_NET,
  RAPTOR_FEATURE_RESOURCE_BORDER,
  RAPTOR_FEATURE_LITERAL_BORDER,
  RAPTOR_FEATURE_BNODE_BORDER,
  RAPTOR_FEATURE_RESOURCE_FILL,
  RAPTOR_FEATURE_LITERAL_FILL,
  RAPTOR_FEATURE_BNODE_FILL,
  RAPTOR_FEATURE_HTML_TAG_SOUP,
  RAPTOR_FEATURE_MICROFORMATS,
  RAPTOR_FEATURE_HTML_LINK,
  RAPTOR_FEATURE_WWW_TIMEOUT,
  RAPTOR_FEATURE_WRITE_BASE_URI,
  RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL,
  RAPTOR_FEATURE_WWW_HTTP_USER_AGENT,
  RAPTOR_FEATURE_JSON_CALLBACK,
  RAPTOR_FEATURE_JSON_EXTRA_DATA,
  RAPTOR_FEATURE_RSS_TRIPLES,
  RAPTOR_FEATURE_ATOM_ENTRY_URI,
  RAPTOR_FEATURE_PREFIX_ELEMENTS,
  RAPTOR_FEATURE_LAST = RAPTOR_FEATURE_PREFIX_ELEMENTS
} raptor_feature;

Raptor parser, serializer or XML writer features.

RAPTOR_FEATURE_SCANNING

If true (default false), the RDF/XML parser will look for embedded rdf:RDF elements inside the XML content, and not require that the XML start with an rdf:RDF root element.

RAPTOR_FEATURE_ASSUME_IS_RDF

If true (default false) then the RDF/XML parser will assume the content is RDF/XML, not require that rdf:RDF root element, and immediately interpret the content as RDF/XML.

RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES

If true (default true) then the RDF/XML parser will allow non-XML namespaced attributes to be accepted as well as rdf: namespaced ones. For example, 'about' and 'ID' will be interpreted as if they were rdf:about and rdf:ID respectively.

RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES

If true (default true) then the RDF/XML parser will allow unknown parsetypes to be present and will pass them on to the user. Unimplemented at present.

RAPTOR_FEATURE_ALLOW_BAGID

If true (default true) then the RDF/XML parser will support the rdf:bagID attribute that was removed from the RDF/XML language when it was revised. This support may be removed in future.

RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST

If true (default false) then the RDF/XML parser will generate the idList rdf:type rdf:List triple in the handling of rdf:parseType="Collection". This triple was removed during the revising of RDF/XML after collections were initially added.

RAPTOR_FEATURE_NORMALIZE_LANGUAGE

If true (default true) then XML language values such as from xml:lang will be normalized to lowercase.

RAPTOR_FEATURE_NON_NFC_FATAL

If true (default false) then illegal Unicode Normal Form C in literals will give a fatal error, otherwise just a warning.

RAPTOR_FEATURE_WARN_OTHER_PARSETYPES

If true (default true) then the RDF/XML parser will warn about unknown rdf:parseType values.

RAPTOR_FEATURE_CHECK_RDF_ID

If true (default true) then the RDF/XML will check rdf:ID attribute values for duplicates and cause an error if any are found.

RAPTOR_FEATURE_RELATIVE_URIS

If true (default true) then relative URIs will be used wherever possible when serializing.

RAPTOR_FEATURE_START_URI

Set the start URI for serlalizing to use.

RAPTOR_FEATURE_WRITER_AUTO_INDENT

Automatically indent elements when seriailizing.

RAPTOR_FEATURE_WRITER_AUTO_EMPTY

Automatically detect and abbreviate empty elements when serializing.

RAPTOR_FEATURE_WRITER_INDENT_WIDTH

Integer number of spaces to use for each indent level when serializing with auto indent.

RAPTOR_FEATURE_WRITER_XML_VERSION

Integer XML version XML 1.0 (10) or XML 1.1 (11)

RAPTOR_FEATURE_WRITER_XML_DECLARATION

Write XML 1.0 or 1.1 declaration.

RAPTOR_FEATURE_NO_NET

Deny network requests.

RAPTOR_FEATURE_RESOURCE_BORDER

Border color of resource nodes for GraphViz DOT serializer.

RAPTOR_FEATURE_LITERAL_BORDER

Border color of literal nodes for GraphViz DOT serializer.

RAPTOR_FEATURE_BNODE_BORDER

Border color of blank nodes for GraphViz DOT serializer.

RAPTOR_FEATURE_RESOURCE_FILL

Fill color of resource nodes for GraphViz DOT serializer.

RAPTOR_FEATURE_LITERAL_FILL

Fill color of literal nodes for GraphViz DOT serializer.

RAPTOR_FEATURE_BNODE_FILL

Fill color of blank nodes for GraphViz DOT serializer.

RAPTOR_FEATURE_HTML_TAG_SOUP

Use a lax HTML parser if an XML parser fails when read HTML for GRDDL parser.

RAPTOR_FEATURE_MICROFORMATS

Look for microformats for GRDDL parser.

RAPTOR_FEATURE_HTML_LINK

Look for head <link> to type rdf/xml for GRDDL parser.

RAPTOR_FEATURE_WWW_TIMEOUT

Set timeout for internal WWW URI requests for GRDDL parser.

RAPTOR_FEATURE_WRITE_BASE_URI

Write base directive for Turtle/N3.

RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL

HTTP Cache-Control: header

RAPTOR_FEATURE_WWW_HTTP_USER_AGENT

HTTP User-Agent: header

RAPTOR_FEATURE_JSON_CALLBACK

JSON serializer callback function.

RAPTOR_FEATURE_JSON_EXTRA_DATA

JSON serializer extra top-level data

RAPTOR_FEATURE_RSS_TRIPLES

Atom/RSS serializer writes extra RDF triples it finds (none, rdf-xml, atom-triples)

RAPTOR_FEATURE_ATOM_ENTRY_URI

Atom entry URI. If given, generate an Atom Entry Document with the item having the given URI, otherwise generate an Atom Feed Document with any items found.

RAPTOR_FEATURE_PREFIX_ELEMENTS

Integer. If set, generate Atom/RSS1.0 documents with prefixed elements, otherwise unprefixed.

RAPTOR_FEATURE_LAST

Internal

raptor_get_feature_count ()

unsigned int        raptor_get_feature_count            (void);

Get the count of features defined.

This is prefered to the compile time-only symbol RAPTOR_FEATURE_LAST and returns a count of the number of features which is RAPTOR_FEATURE_LAST+1.

Returns :

count of features in the raptor_feature enumeration

raptor_features_enumerate ()

int                 raptor_features_enumerate           (const raptor_feature feature,
                                                         const char **name,
                                                         raptor_uri **uri,
                                                         const char **label);

Get list of syntax features.

If uri is not NULL, a pointer to a new raptor_uri is returned that must be freed by the caller with raptor_free_uri().

raptor_init() MUST have been called before calling this function. Use raptor_features_enumerate_v2() if using raptor_world APIs.

feature :

feature enumeration (0+)

name :

pointer to store feature short name (or NULL)

uri :

pointer to store feature URI (or NULL)

label :

pointer to feature label (or NULL)

Returns :

0 on success, <0 on failure, >0 if feature is unknown

raptor_feature_from_uri ()

raptor_feature      raptor_feature_from_uri             (raptor_uri *uri);

Turn a feature URI into an feature enum.

The allowed feature URIs are available via raptor_features_enumerate().

raptor_init() MUST have been called before calling this function. Use raptor_feature_from_uri_v2() if using raptor_world APIs.

uri :

feature URI

Returns :

< 0 if the feature is unknown

raptor_feature_value_type ()

int                 raptor_feature_value_type           (const raptor_feature feature);

Get the type of a features.

The type of the feature is 0=integer , 1=string. Other values are undefined. Most features are integer values and use raptor_set_feature and raptor_get_feature() ( raptor_serializer_set_feature raptor_serializer_get_feature() )

String value features use raptor_parser_set_feature_string() and raptor_parser_get_feature_string() ( raptor_serializer_set_feature_string() and raptor_serializer_get_feature_string() )

feature :

raptor serializer or parser feature

Returns :

the type of the feature or <0 if feature is unknown
raptor-1.4.21/docs/html/raptor-section-triples.html0000644000175000017500000012132511331056234017244 00000000000000 Triples

Triples

Triples — RDF Triples

Synopsis

enum                raptor_genid_type;
enum                raptor_identifier_type;
                    raptor_identifier;
raptor_identifier*  raptor_new_identifier               (raptor_identifier_type type,
                                                         raptor_uri *uri,
                                                         raptor_uri_source uri_source,
                                                         unsigned char *id,
                                                         unsigned char *literal,
                                                         raptor_uri *literal_datatype,
                                                         unsigned char *literal_language);
int                 raptor_copy_identifier              (raptor_identifier *dest,
                                                         raptor_identifier *src);
void                raptor_free_identifier              (raptor_identifier *identifier);
                    raptor_statement;
int                 raptor_statement_compare            (const raptor_statement *s1,
                                                         const raptor_statement *s2);
void                raptor_print_statement              (const raptor_statement *statement,
                                                         FILE *stream);
void                raptor_print_statement_as_ntriples  (const raptor_statement *statement,
                                                         FILE *stream);
void                raptor_print_statement_detailed     (const raptor_statement *statement,
                                                         int detailed,
                                                         FILE *stream);
unsigned char*      raptor_statement_part_as_counted_string
                                                        (const void *term,
                                                         raptor_identifier_type type,
                                                         raptor_uri *literal_datatype,
                                                         unsigned char *literal_language,
                                                         size_t *len_p);
unsigned char*      raptor_statement_part_as_string     (const void *term,
                                                         raptor_identifier_type type,
                                                         raptor_uri *literal_datatype,
                                                         unsigned char *literal_language);

Description

Representation of RDF triples inside Raptor. They are a sequence of three raptor_identifier which cover the RDF terms of URI (RAPTOR_IDENTIFIER_TYPE_RESOURCE), Literal (RAPTOR_IDENTIFIER_TYPE_LITERAL) and Blank Node (RAPTOR_IDENTIFIER_TYPE_ANONYMOUS). Some other raptor_identifer_type forms exist but are deprecated.

Details

enum raptor_genid_type

typedef enum {
  RAPTOR_GENID_TYPE_BNODEID,
  RAPTOR_GENID_TYPE_BAGID
} raptor_genid_type;

Intended type for a generated identifier asked for by the handler registered with raptor_set_generate_id_handler().

RAPTOR_GENID_TYPE_BNODEID

Generated ID is for a blank node

RAPTOR_GENID_TYPE_BAGID

Generated ID is for rdf:bagID

enum raptor_identifier_type

typedef enum {
  RAPTOR_IDENTIFIER_TYPE_UNKNOWN,
  RAPTOR_IDENTIFIER_TYPE_RESOURCE,
  RAPTOR_IDENTIFIER_TYPE_ANONYMOUS,
  RAPTOR_IDENTIFIER_TYPE_PREDICATE,
  RAPTOR_IDENTIFIER_TYPE_ORDINAL,
  RAPTOR_IDENTIFIER_TYPE_LITERAL,
  RAPTOR_IDENTIFIER_TYPE_XML_LITERAL
} raptor_identifier_type;

Type of identifier in a raptor_statement

RAPTOR_IDENTIFIER_TYPE_UNKNOWN

Internal

RAPTOR_IDENTIFIER_TYPE_RESOURCE

Resource URI (e.g. rdf:about)

RAPTOR_IDENTIFIER_TYPE_ANONYMOUS

_:foo N-Triples, or generated

RAPTOR_IDENTIFIER_TYPE_PREDICATE

predicate URI. WARNING: Will not be generated in in Raptor 1.4.9 or newer. Instead a RAPTOR_IDENTIFIER_TYPE_RESOURCE will be returned.

RAPTOR_IDENTIFIER_TYPE_ORDINAL

rdf:li, rdf:_n. No longer generated in any parser in Raptor 1.4.10+, instead a RAPTOR_IDENTIFIER_TYPE_RESOURCE is returned.

RAPTOR_IDENTIFIER_TYPE_LITERAL

regular literal

RAPTOR_IDENTIFIER_TYPE_XML_LITERAL

rdf:parseType="Literal". No longer generated by any parser in Raptor 1.4.8+, instead a RAPTOR_IDENTIFIER_TYPE_LITERAL is returned with a datatype of rdf:XMLLiteral.

raptor_identifier

typedef struct {
  raptor_identifier_type type;
  raptor_uri *uri;
  raptor_uri_source uri_source;
  const unsigned char *id;
  int ordinal;
  int is_malloced;
  const unsigned char *literal;
  raptor_uri *literal_datatype;
  const unsigned char *literal_language;
  raptor_world *world;
} raptor_identifier;

Raptor RDF term identifier.

raptor_identifier_type type;

Type of identifier

raptor_uri *uri;

URI of identifier for types RAPTOR_IDENTIFIER_TYPE_RESOURCE and RAPTOR_IDENTIFIER_TYPE_PREDICATE

raptor_uri_source uri_source;

where the identifier (URI or blank node) came from

int ordinal;

integer ordinal for type RAPTOR_IDENTIFIER_TYPE_ORDINAL

int is_malloced;

internal

raptor_uri *literal_datatype;

RDF literal datatype URI for types RAPTOR_IDENTIFIER_TYPE_LITERAL and RAPTOR_IDENTIFIER_TYPE_XML_LITERAL

raptor_world *world;

raptor_world object

raptor_new_identifier ()

raptor_identifier*  raptor_new_identifier               (raptor_identifier_type type,
                                                         raptor_uri *uri,
                                                         raptor_uri_source uri_source,
                                                         unsigned char *id,
                                                         unsigned char *literal,
                                                         raptor_uri *literal_datatype,
                                                         unsigned char *literal_language);

Constructor - create a raptor_identifier.

Constructs a new identifier copying the URI, ID fields. SHARED means raptor_new_identifier owns this argument after calling.

raptor_init() MUST have been called before calling this function. Use raptor_new_identifier_v2() if using raptor_world APIs.

type :

raptor_identifier_type of identifier

uri :

raptor_uri of identifier (if relevant) (SHARED)

uri_source :

raptor_uri_source of URI (if relevant)

id :

string for ID or genid (if relevant) (SHARED)

literal :

string for literal (SHARED)

literal_datatype :

raptor_uri of identifier (SHARED)

literal_language :

literal language (SHARED)

Returns :

a new raptor_identifier object or NULL on failure

raptor_copy_identifier ()

int                 raptor_copy_identifier              (raptor_identifier *dest,
                                                         raptor_identifier *src);

Copy raptor_identifiers.

dest :

destination raptor_identifier (previously created)

src :

source raptor_identifier

Returns :

Non 0 on failure

raptor_free_identifier ()

void                raptor_free_identifier              (raptor_identifier *identifier);

Destructor - destroy a raptor_identifier object.

identifier :

raptor_identifier object

raptor_statement

typedef struct {
  const void *subject;
  raptor_identifier_type subject_type;
  const void *predicate;
  raptor_identifier_type predicate_type;
  const void *object;
  raptor_identifier_type object_type;
  raptor_uri *object_literal_datatype;
  const unsigned char *object_literal_language;
} raptor_statement;

An RDF triple

See raptor_identifier for a description of how the fields may be used. As returned by a parser statement_handler.

See also raptor_statement_v2.

const void *subject;

triple subject data

raptor_identifier_type subject_type;

triple subject type

const void *predicate;

triple predicate data

raptor_identifier_type predicate_type;

triple predicate type

const void *object;

triple object literal string

raptor_identifier_type object_type;

triple object type

raptor_uri *object_literal_datatype;

triple object literal datatype URI (or NULL)

raptor_statement_compare ()

int                 raptor_statement_compare            (const raptor_statement *s1,
                                                         const raptor_statement *s2);

Compare a pair of raptor_statement

If types are different, the raptor_identifier_type order is used. Resource and datatype URIs are compared with raptor_uri_compare(), blank nodes and literals with strcmp(). If one literal has no language, it is earlier than one with a language. If one literal has no datatype, it is earlier than one with a datatype.

raptor_init() MUST have been called before calling this function. Use raptor_statement_compare_v2() if using raptor_world APIs.

s1 :

first statement

s2 :

second statement

Returns :

<0 if s1 is before s2, 0 if equal, >0 if s1 is after s2

raptor_print_statement ()

void                raptor_print_statement              (const raptor_statement *statement,
                                                         FILE *stream);

Print a raptor_statement to a stream.

raptor_init() MUST have been called before calling this function. Use raptor_print_statement_v2() if using raptor_world APIs.

statement :

raptor_statement object to print

stream :

FILE* stream

raptor_print_statement_as_ntriples ()

void                raptor_print_statement_as_ntriples  (const raptor_statement *statement,
                                                         FILE *stream);

Print a raptor_statement in N-Triples form.

raptor_init() MUST have been called before calling this function. Use raptor_print_statement_as_ntriples_v2() if using raptor_world APIs.

statement :

raptor_statement to print

stream :

FILE* stream

raptor_print_statement_detailed ()

void                raptor_print_statement_detailed     (const raptor_statement *statement,
                                                         int detailed,
                                                         FILE *stream);

Warning

raptor_print_statement_detailed is deprecated and should not be used in newly-written code.

Print a raptor_statement to a stream in a detailed fashion.

raptor_init() MUST have been called before calling this function.

deprecated: an internal function, do not use.

No current difference from calling raptor_print_statement().

statement :

raptor_statement object to print

detailed :

unused

stream :

FILE* stream

raptor_statement_part_as_counted_string ()

unsigned char*      raptor_statement_part_as_counted_string
                                                        (const void *term,
                                                         raptor_identifier_type type,
                                                         raptor_uri *literal_datatype,
                                                         unsigned char *literal_language,
                                                         size_t *len_p);

Turns part of raptor statement into a N-Triples format counted string.

Turns the given term into an N-Triples escaped string using all the escapes as defined in http://www.w3.org/TR/rdf-testcases/ntriples

The part (subject, predicate, object) of the raptor_statement is typically passed in as term, the part type (subject_type, predicate_type, object_type) is passed in as type. When the part is a literal, the literal_datatype and literal_language fields are set, otherwise NULL (usually object_datatype, object_literal_language).

raptor_init() MUST have been called before calling this function. Use raptor_statement_part_as_counted_string_v2() if using raptor_world APIs.

term :

raptor_statement part (subject, predicate, object)

type :

raptor_statement part type

literal_datatype :

raptor_statement part datatype

literal_language :

raptor_statement part language

len_p :

Pointer to location to store length of new string (if not NULL)

Returns :

the new string or NULL on failure. The length of the new string is returned in *len_p if len_p is not NULL.

raptor_statement_part_as_string ()

unsigned char*      raptor_statement_part_as_string     (const void *term,
                                                         raptor_identifier_type type,
                                                         raptor_uri *literal_datatype,
                                                         unsigned char *literal_language);

Turns part of raptor statement into a N-Triples format string.

Turns the given term into an N-Triples escaped string using all the escapes as defined in http://www.w3.org/TR/rdf-testcases/ntriples

The part (subject, predicate, object) of the raptor_statement is typically passed in as term, the part type (subject_type, predicate_type, object_type) is passed in as type. When the part is a literal, the literal_datatype and literal_language fields are set, otherwise NULL (usually object_datatype, object_literal_language).

raptor_init() MUST have been called before calling this function. Use raptor_statement_part_as_string_v2() if using raptor_world APIs.

term :

raptor_statement part (subject, predicate, object)

type :

raptor_statement part type

literal_datatype :

raptor_statement part datatype

literal_language :

raptor_statement part language

Returns :

the new string or NULL on failure.
raptor-1.4.21/docs/html/ix01.html0000644000175000017500000016141711331056234013402 00000000000000 Index

Index

R

raptor_alloc_memory, raptor_alloc_memory ()
raptor_calloc_memory, raptor_calloc_memory ()
raptor_compare_strings, raptor_compare_strings ()
raptor_copy_identifier, raptor_copy_identifier ()
raptor_error_handlers, raptor_error_handlers
raptor_error_handlers_init, raptor_error_handlers_init ()
raptor_feature, enum raptor_feature
raptor_features_enumerate, raptor_features_enumerate ()
raptor_feature_from_uri, raptor_feature_from_uri ()
raptor_feature_value_type, raptor_feature_value_type ()
raptor_finish, raptor_finish ()
raptor_format_locator, raptor_format_locator ()
raptor_free_identifier, raptor_free_identifier ()
raptor_free_iostream, raptor_free_iostream ()
raptor_free_memory, raptor_free_memory ()
raptor_free_namespace, raptor_free_namespace ()
raptor_free_namespaces, raptor_free_namespaces ()
raptor_free_parser, raptor_free_parser ()
raptor_free_qname, raptor_free_qname ()
raptor_free_sax2, raptor_free_sax2 ()
raptor_free_sequence, raptor_free_sequence ()
raptor_free_serializer, raptor_free_serializer ()
raptor_free_stringbuffer, raptor_free_stringbuffer ()
raptor_free_uri, raptor_free_uri ()
raptor_free_uri_func, raptor_free_uri_func ()
raptor_free_world, raptor_free_world ()
raptor_free_xml_element, raptor_free_xml_element ()
raptor_free_xml_writer, raptor_free_xml_writer ()
raptor_genid_type, enum raptor_genid_type
raptor_get_feature, raptor_get_feature ()
raptor_get_feature_count, raptor_get_feature_count ()
raptor_get_label, raptor_get_label ()
raptor_get_locator, raptor_get_locator ()
raptor_get_mime_type, raptor_get_mime_type ()
raptor_get_name, raptor_get_name ()
raptor_get_need_base_uri, raptor_get_need_base_uri ()
raptor_graph_handler, raptor_graph_handler ()
raptor_guess_parser_name, raptor_guess_parser_name ()
raptor_identifier, raptor_identifier
raptor_identifier_type, enum raptor_identifier_type
raptor_init, raptor_init ()
raptor_iostream, raptor_iostream
raptor_iostream_finish_func, raptor_iostream_finish_func ()
raptor_iostream_format_hexadecimal, raptor_iostream_format_hexadecimal ()
raptor_iostream_get_bytes_written_count, raptor_iostream_get_bytes_written_count ()
raptor_iostream_handler, raptor_iostream_handler
raptor_iostream_handler2, raptor_iostream_handler2
raptor_iostream_init_func, raptor_iostream_init_func ()
raptor_iostream_read_bytes, raptor_iostream_read_bytes ()
raptor_iostream_read_bytes_func, raptor_iostream_read_bytes_func ()
raptor_iostream_read_eof, raptor_iostream_read_eof ()
raptor_iostream_read_eof_func, raptor_iostream_read_eof_func ()
raptor_iostream_tell, raptor_iostream_tell ()
raptor_iostream_write_byte, raptor_iostream_write_byte ()
raptor_iostream_write_bytes, raptor_iostream_write_bytes ()
raptor_iostream_write_bytes_func, raptor_iostream_write_bytes_func ()
raptor_iostream_write_byte_func, raptor_iostream_write_byte_func ()
raptor_iostream_write_counted_string, raptor_iostream_write_counted_string ()
raptor_iostream_write_decimal, raptor_iostream_write_decimal ()
raptor_iostream_write_end, raptor_iostream_write_end ()
raptor_iostream_write_end_func, raptor_iostream_write_end_func ()
raptor_iostream_write_namespace, raptor_iostream_write_namespace ()
raptor_iostream_write_qname, raptor_iostream_write_qname ()
raptor_iostream_write_statement_ntriples, raptor_iostream_write_statement_ntriples ()
raptor_iostream_write_string, raptor_iostream_write_string ()
raptor_iostream_write_stringbuffer, raptor_iostream_write_stringbuffer ()
raptor_iostream_write_string_ntriples, raptor_iostream_write_string_ntriples ()
raptor_iostream_write_string_python, raptor_iostream_write_string_python ()
raptor_iostream_write_string_turtle, raptor_iostream_write_string_turtle ()
raptor_iostream_write_uri, raptor_iostream_write_uri ()
raptor_iostream_write_xml_any_escaped_string, raptor_iostream_write_xml_any_escaped_string ()
raptor_iostream_write_xml_element, raptor_iostream_write_xml_element ()
raptor_iostream_write_xml_escaped_string, raptor_iostream_write_xml_escaped_string ()
raptor_libxml_flags, enum raptor_libxml_flags
raptor_locator, raptor_locator
raptor_locator_byte, raptor_locator_byte ()
raptor_locator_column, raptor_locator_column ()
raptor_locator_file, raptor_locator_file ()
raptor_locator_line, raptor_locator_line ()
raptor_locator_uri, raptor_locator_uri ()
raptor_log_level, enum raptor_log_level
raptor_message_handler, raptor_message_handler ()
raptor_message_handler_closure, raptor_message_handler_closure
raptor_namespace, raptor_namespace
raptor_namespaces_clear, raptor_namespaces_clear ()
raptor_namespaces_end_for_depth, raptor_namespaces_end_for_depth ()
raptor_namespaces_find_namespace, raptor_namespaces_find_namespace ()
raptor_namespaces_find_namespace_by_uri, raptor_namespaces_find_namespace_by_uri ()
raptor_namespaces_format, raptor_namespaces_format ()
raptor_namespaces_get_default_namespace, raptor_namespaces_get_default_namespace ()
raptor_namespaces_init, raptor_namespaces_init ()
raptor_namespaces_namespace_in_scope, raptor_namespaces_namespace_in_scope ()
raptor_namespaces_qname_from_uri, raptor_namespaces_qname_from_uri ()
raptor_namespaces_start_namespace, raptor_namespaces_start_namespace ()
raptor_namespaces_start_namespace_full, raptor_namespaces_start_namespace_full ()
raptor_namespace_copy, raptor_namespace_copy ()
raptor_namespace_get_counted_prefix, raptor_namespace_get_counted_prefix ()
raptor_namespace_get_prefix, raptor_namespace_get_prefix ()
raptor_namespace_get_uri, raptor_namespace_get_uri ()
raptor_namespace_handler, raptor_namespace_handler ()
raptor_namespace_stack, raptor_namespace_stack
raptor_new_identifier, raptor_new_identifier ()
raptor_new_iostream_from_filename, raptor_new_iostream_from_filename ()
raptor_new_iostream_from_file_handle, raptor_new_iostream_from_file_handle ()
raptor_new_iostream_from_handler, raptor_new_iostream_from_handler ()
raptor_new_iostream_from_handler2, raptor_new_iostream_from_handler2 ()
raptor_new_iostream_from_sink, raptor_new_iostream_from_sink ()
raptor_new_iostream_from_string, raptor_new_iostream_from_string ()
raptor_new_iostream_to_filename, raptor_new_iostream_to_filename ()
raptor_new_iostream_to_file_handle, raptor_new_iostream_to_file_handle ()
raptor_new_iostream_to_sink, raptor_new_iostream_to_sink ()
raptor_new_iostream_to_string, raptor_new_iostream_to_string ()
raptor_new_namespace, raptor_new_namespace ()
raptor_new_namespaces, raptor_new_namespaces ()
raptor_new_namespace_from_uri, raptor_new_namespace_from_uri ()
raptor_new_namespace_parts_from_string, raptor_new_namespace_parts_from_string ()
raptor_new_parser, raptor_new_parser ()
raptor_new_parser_for_content, raptor_new_parser_for_content ()
raptor_new_qname, raptor_new_qname ()
raptor_new_qname_from_namespace_local_name, raptor_new_qname_from_namespace_local_name ()
raptor_new_sax2, raptor_new_sax2 ()
raptor_new_sequence, raptor_new_sequence ()
raptor_new_serializer, raptor_new_serializer ()
raptor_new_stringbuffer, raptor_new_stringbuffer ()
raptor_new_uri, raptor_new_uri ()
raptor_new_uri_for_rdf_concept, raptor_new_uri_for_rdf_concept ()
raptor_new_uri_for_rdf_concept_func, raptor_new_uri_for_rdf_concept_func ()
raptor_new_uri_for_retrieval, raptor_new_uri_for_retrieval ()
raptor_new_uri_for_xmlbase, raptor_new_uri_for_xmlbase ()
raptor_new_uri_from_id, raptor_new_uri_from_id ()
raptor_new_uri_from_uri_local_name, raptor_new_uri_from_uri_local_name ()
raptor_new_uri_from_uri_local_name_func, raptor_new_uri_from_uri_local_name_func ()
raptor_new_uri_func, raptor_new_uri_func ()
raptor_new_uri_relative_to_base, raptor_new_uri_relative_to_base ()
raptor_new_uri_relative_to_base_func, raptor_new_uri_relative_to_base_func ()
raptor_new_world, raptor_new_world ()
raptor_new_xml_element, raptor_new_xml_element ()
raptor_new_xml_element_from_namespace_local_name, raptor_new_xml_element_from_namespace_local_name ()
raptor_new_xml_writer, raptor_new_xml_writer ()
raptor_ntriples_string_as_utf8_string, raptor_ntriples_string_as_utf8_string ()
raptor_ntriples_term_as_string, raptor_ntriples_term_as_string ()
RAPTOR_OWL_URI, RAPTOR_OWL_URI
raptor_parser, raptor_parser
raptor_parsers_enumerate, raptor_parsers_enumerate ()
raptor_parser_generate_id, raptor_parser_generate_id ()
raptor_parser_get_accept_header, raptor_parser_get_accept_header ()
raptor_parser_get_feature_string, raptor_parser_get_feature_string ()
raptor_parser_get_world, raptor_parser_get_world ()
raptor_parser_set_feature_string, raptor_parser_set_feature_string ()
raptor_parser_set_uri_filter, raptor_parser_set_uri_filter ()
raptor_parse_abort, raptor_parse_abort ()
raptor_parse_chunk, raptor_parse_chunk ()
raptor_parse_file, raptor_parse_file ()
raptor_parse_file_stream, raptor_parse_file_stream ()
raptor_parse_uri, raptor_parse_uri ()
raptor_parse_uri_with_connection, raptor_parse_uri_with_connection ()
raptor_print_locator, raptor_print_locator ()
raptor_print_ntriples_string, raptor_print_ntriples_string ()
raptor_print_statement, raptor_print_statement ()
raptor_print_statement_as_ntriples, raptor_print_statement_as_ntriples ()
raptor_print_statement_detailed, raptor_print_statement_detailed ()
raptor_qname, raptor_qname
raptor_qname_copy, raptor_qname_copy ()
raptor_qname_equal, raptor_qname_equal ()
raptor_qname_get_counted_value, raptor_qname_get_counted_value ()
raptor_qname_get_local_name, raptor_qname_get_local_name ()
raptor_qname_get_namespace, raptor_qname_get_namespace ()
raptor_qname_get_value, raptor_qname_get_value ()
raptor_qname_string_to_uri, raptor_qname_string_to_uri ()
raptor_qname_to_counted_name, raptor_qname_to_counted_name ()
RAPTOR_RDF_MS_URI, RAPTOR_RDF_MS_URI
raptor_rdf_namespace_uri_len, raptor_rdf_namespace_uri_len
RAPTOR_RDF_SCHEMA_URI, RAPTOR_RDF_SCHEMA_URI
raptor_sax2, raptor_sax2
raptor_sax2_cdata_handler, raptor_sax2_cdata_handler ()
raptor_sax2_characters_handler, raptor_sax2_characters_handler ()
raptor_sax2_comment_handler, raptor_sax2_comment_handler ()
raptor_sax2_end_element_handler, raptor_sax2_end_element_handler ()
raptor_sax2_external_entity_ref_handler, raptor_sax2_external_entity_ref_handler ()
raptor_sax2_inscope_base_uri, raptor_sax2_inscope_base_uri ()
raptor_sax2_inscope_xml_language, raptor_sax2_inscope_xml_language ()
raptor_sax2_parse_chunk, raptor_sax2_parse_chunk ()
raptor_sax2_parse_start, raptor_sax2_parse_start ()
raptor_sax2_set_cdata_handler, raptor_sax2_set_cdata_handler ()
raptor_sax2_set_characters_handler, raptor_sax2_set_characters_handler ()
raptor_sax2_set_comment_handler, raptor_sax2_set_comment_handler ()
raptor_sax2_set_end_element_handler, raptor_sax2_set_end_element_handler ()
raptor_sax2_set_external_entity_ref_handler, raptor_sax2_set_external_entity_ref_handler ()
raptor_sax2_set_namespace_handler, raptor_sax2_set_namespace_handler ()
raptor_sax2_set_start_element_handler, raptor_sax2_set_start_element_handler ()
raptor_sax2_set_unparsed_entity_decl_handler, raptor_sax2_set_unparsed_entity_decl_handler ()
raptor_sax2_start_element_handler, raptor_sax2_start_element_handler ()
raptor_sax2_unparsed_entity_decl_handler, raptor_sax2_unparsed_entity_decl_handler ()
raptor_sequence, raptor_sequence
raptor_sequence_delete_at, raptor_sequence_delete_at ()
raptor_sequence_get_at, raptor_sequence_get_at ()
raptor_sequence_join, raptor_sequence_join ()
raptor_sequence_pop, raptor_sequence_pop ()
raptor_sequence_print, raptor_sequence_print ()
raptor_sequence_print_string, raptor_sequence_print_string ()
raptor_sequence_print_uri, raptor_sequence_print_uri ()
raptor_sequence_push, raptor_sequence_push ()
raptor_sequence_set_at, raptor_sequence_set_at ()
raptor_sequence_set_print_handler, raptor_sequence_set_print_handler ()
raptor_sequence_shift, raptor_sequence_shift ()
raptor_sequence_size, raptor_sequence_size ()
raptor_sequence_sort, raptor_sequence_sort ()
raptor_sequence_unshift, raptor_sequence_unshift ()
raptor_serializer, raptor_serializer
raptor_serializers_enumerate, raptor_serializers_enumerate ()
raptor_serializer_features_enumerate, raptor_serializer_features_enumerate ()
raptor_serializer_get_feature, raptor_serializer_get_feature ()
raptor_serializer_get_feature_string, raptor_serializer_get_feature_string ()
raptor_serializer_get_iostream, raptor_serializer_get_iostream ()
raptor_serializer_get_locator, raptor_serializer_get_locator ()
raptor_serializer_get_world, raptor_serializer_get_world ()
raptor_serializer_set_error_handler, raptor_serializer_set_error_handler ()
raptor_serializer_set_feature, raptor_serializer_set_feature ()
raptor_serializer_set_feature_string, raptor_serializer_set_feature_string ()
raptor_serializer_set_warning_handler, raptor_serializer_set_warning_handler ()
raptor_serializer_syntax_name_check, raptor_serializer_syntax_name_check ()
raptor_serialize_end, raptor_serialize_end ()
raptor_serialize_set_namespace, raptor_serialize_set_namespace ()
raptor_serialize_set_namespace_from_namespace, raptor_serialize_set_namespace_from_namespace ()
raptor_serialize_start, raptor_serialize_start ()
raptor_serialize_start_to_filename, raptor_serialize_start_to_filename ()
raptor_serialize_start_to_file_handle, raptor_serialize_start_to_file_handle ()
raptor_serialize_start_to_iostream, raptor_serialize_start_to_iostream ()
raptor_serialize_start_to_string, raptor_serialize_start_to_string ()
raptor_serialize_statement, raptor_serialize_statement ()
raptor_set_default_generate_id_parameters, raptor_set_default_generate_id_parameters ()
raptor_set_error_handler, raptor_set_error_handler ()
raptor_set_fatal_error_handler, raptor_set_fatal_error_handler ()
raptor_set_feature, raptor_set_feature ()
raptor_set_generate_id_handler, raptor_set_generate_id_handler ()
raptor_set_graph_handler, raptor_set_graph_handler ()
raptor_set_libxml_flags, raptor_set_libxml_flags ()
raptor_set_libxslt_security_preferences, raptor_set_libxslt_security_preferences ()
raptor_set_namespace_handler, raptor_set_namespace_handler ()
raptor_set_parser_strict, raptor_set_parser_strict ()
raptor_set_statement_handler, raptor_set_statement_handler ()
raptor_set_warning_handler, raptor_set_warning_handler ()
raptor_simple_message_handler, raptor_simple_message_handler ()
raptor_start_parse, raptor_start_parse ()
raptor_statement, raptor_statement
raptor_statement_compare, raptor_statement_compare ()
raptor_statement_handler, raptor_statement_handler ()
raptor_statement_part_as_counted_string, raptor_statement_part_as_counted_string ()
raptor_statement_part_as_string, raptor_statement_part_as_string ()
raptor_stringbuffer, raptor_stringbuffer
raptor_stringbuffer_append_counted_string, raptor_stringbuffer_append_counted_string ()
raptor_stringbuffer_append_decimal, raptor_stringbuffer_append_decimal ()
raptor_stringbuffer_append_string, raptor_stringbuffer_append_string ()
raptor_stringbuffer_append_stringbuffer, raptor_stringbuffer_append_stringbuffer ()
raptor_stringbuffer_as_string, raptor_stringbuffer_as_string ()
raptor_stringbuffer_copy_to_string, raptor_stringbuffer_copy_to_string ()
raptor_stringbuffer_length, raptor_stringbuffer_length ()
raptor_stringbuffer_prepend_counted_string, raptor_stringbuffer_prepend_counted_string ()
raptor_stringbuffer_prepend_string, raptor_stringbuffer_prepend_string ()
raptor_syntaxes_enumerate, raptor_syntaxes_enumerate ()
raptor_syntax_name_check, raptor_syntax_name_check ()
raptor_unichar, raptor_unichar
raptor_unicode_char_to_utf8, raptor_unicode_char_to_utf8 ()
raptor_unicode_is_xml10_namechar, raptor_unicode_is_xml10_namechar ()
raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml10_namestartchar ()
raptor_unicode_is_xml11_namechar, raptor_unicode_is_xml11_namechar ()
raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml11_namestartchar ()
raptor_uri, raptor_uri
raptor_uri_as_counted_string, raptor_uri_as_counted_string ()
raptor_uri_as_string, raptor_uri_as_string ()
raptor_uri_compare, raptor_uri_compare ()
raptor_uri_compare_func, raptor_uri_compare_func ()
raptor_uri_copy, raptor_uri_copy ()
raptor_uri_copy_func, raptor_uri_copy_func ()
raptor_uri_equals, raptor_uri_equals ()
raptor_uri_equals_func, raptor_uri_equals_func ()
raptor_uri_filename_to_uri_string, raptor_uri_filename_to_uri_string ()
raptor_uri_filter_func, raptor_uri_filter_func ()
raptor_uri_get_handler, raptor_uri_get_handler ()
raptor_uri_handler, raptor_uri_handler
raptor_uri_is_file_uri, raptor_uri_is_file_uri ()
raptor_uri_print, raptor_uri_print ()
raptor_uri_resolve_uri_reference, raptor_uri_resolve_uri_reference ()
raptor_uri_set_handler, raptor_uri_set_handler ()
raptor_uri_to_counted_string, raptor_uri_to_counted_string ()
raptor_uri_to_relative_counted_uri_string, raptor_uri_to_relative_counted_uri_string ()
raptor_uri_to_relative_uri_string, raptor_uri_to_relative_uri_string ()
raptor_uri_to_string, raptor_uri_to_string ()
raptor_uri_uri_string_is_file_uri, raptor_uri_uri_string_is_file_uri ()
raptor_uri_uri_string_to_filename, raptor_uri_uri_string_to_filename ()
raptor_uri_uri_string_to_filename_fragment, raptor_uri_uri_string_to_filename_fragment ()
raptor_utf8_check, raptor_utf8_check ()
raptor_utf8_to_unicode_char, raptor_utf8_to_unicode_char ()
raptor_version_decimal, raptor_version_decimal
raptor_version_major, raptor_version_major
raptor_version_minor, raptor_version_minor
raptor_version_release, raptor_version_release
raptor_vsnprintf, raptor_vsnprintf ()
raptor_world, raptor_world
raptor_world_open, raptor_world_open ()
raptor_world_set_libxml_flags, raptor_world_set_libxml_flags ()
raptor_world_set_libxslt_security_preferences, raptor_world_set_libxslt_security_preferences ()
raptor_www, raptor_www
raptor_www_abort, raptor_www_abort ()
raptor_www_content_type_handler, raptor_www_content_type_handler ()
raptor_www_fetch, raptor_www_fetch ()
raptor_www_fetch_to_string, raptor_www_fetch_to_string ()
raptor_www_final_uri_handler, raptor_www_final_uri_handler ()
raptor_www_finish, raptor_www_finish ()
raptor_www_free, raptor_www_free ()
raptor_www_get_connection, raptor_www_get_connection ()
raptor_www_get_final_uri, raptor_www_get_final_uri ()
raptor_www_init, raptor_www_init ()
raptor_www_new, raptor_www_new ()
raptor_www_new_with_connection, raptor_www_new_with_connection ()
raptor_www_no_www_library_init_finish, raptor_www_no_www_library_init_finish ()
raptor_www_set_connection_timeout, raptor_www_set_connection_timeout ()
raptor_www_set_content_type_handler, raptor_www_set_content_type_handler ()
raptor_www_set_error_handler, raptor_www_set_error_handler ()
raptor_www_set_final_uri_handler, raptor_www_set_final_uri_handler ()
raptor_www_set_http_accept, raptor_www_set_http_accept ()
raptor_www_set_http_cache_control, raptor_www_set_http_cache_control ()
raptor_www_set_proxy, raptor_www_set_proxy ()
raptor_www_set_uri_filter, raptor_www_set_uri_filter ()
raptor_www_set_user_agent, raptor_www_set_user_agent ()
raptor_www_set_write_bytes_handler, raptor_www_set_write_bytes_handler ()
raptor_www_write_bytes_handler, raptor_www_write_bytes_handler ()
RAPTOR_XMLSCHEMA_DATATYPES_URI, RAPTOR_XMLSCHEMA_DATATYPES_URI
raptor_xml_any_escape_string, raptor_xml_any_escape_string ()
raptor_xml_element, raptor_xml_element
raptor_xml_element_declare_namespace, raptor_xml_element_declare_namespace ()
raptor_xml_element_get_attributes, raptor_xml_element_get_attributes ()
raptor_xml_element_get_attributes_count, raptor_xml_element_get_attributes_count ()
raptor_xml_element_get_language, raptor_xml_element_get_language ()
raptor_xml_element_get_name, raptor_xml_element_get_name ()
raptor_xml_element_is_empty, raptor_xml_element_is_empty ()
raptor_xml_element_set_attributes, raptor_xml_element_set_attributes ()
raptor_xml_escape_string, raptor_xml_escape_string ()
raptor_xml_literal_datatype_uri_string_len, raptor_xml_literal_datatype_uri_string_len
raptor_xml_name_check, raptor_xml_name_check ()
raptor_xml_writer, raptor_xml_writer
raptor_xml_writer_cdata, raptor_xml_writer_cdata ()
raptor_xml_writer_cdata_counted, raptor_xml_writer_cdata_counted ()
raptor_xml_writer_comment, raptor_xml_writer_comment ()
raptor_xml_writer_comment_counted, raptor_xml_writer_comment_counted ()
raptor_xml_writer_empty_element, raptor_xml_writer_empty_element ()
raptor_xml_writer_end_element, raptor_xml_writer_end_element ()
raptor_xml_writer_features_enumerate, raptor_xml_writer_features_enumerate ()
raptor_xml_writer_flush, raptor_xml_writer_flush ()
raptor_xml_writer_get_depth, raptor_xml_writer_get_depth ()
raptor_xml_writer_get_feature, raptor_xml_writer_get_feature ()
raptor_xml_writer_get_feature_string, raptor_xml_writer_get_feature_string ()
raptor_xml_writer_newline, raptor_xml_writer_newline ()
raptor_xml_writer_raw, raptor_xml_writer_raw ()
raptor_xml_writer_raw_counted, raptor_xml_writer_raw_counted ()
raptor_xml_writer_set_feature, raptor_xml_writer_set_feature ()
raptor_xml_writer_set_feature_string, raptor_xml_writer_set_feature_string ()
raptor_xml_writer_start_element, raptor_xml_writer_start_element ()
raptor-1.4.21/docs/html/left.png0000644000175000017500000000071311331056234013362 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1&[(XIDATx!OPE*ID%~ꊯ"p'ŏ`sܖrKf hmiIz}ܯI.p\`x l?l[,Hk<#c%\AUx[S7n6rzEs1j@NL$ݤi0 5/}\EKIo͓$a0jdFbkIAh>WlC'?tk;|/t*INZ^`y4Nr]׮ J<ڐt`X1@p䀸dZ')hK $V?%]+LsgUK"w53OIENDB`raptor-1.4.21/docs/html/parser-rdfxml.html0000644000175000017500000001037511331056234015403 00000000000000 RDF/XML parser - default (name rdfxml)

RDF/XML parser - default (name rdfxml)

A parser for the standard RDF/XML syntax as revised by the W3C RDF Core working group.

This is the default parser in Raptor.

Features of this parser:

raptor-1.4.21/docs/html/raptor-section-xml-namespace.html0000644000175000017500000014773711331056234020333 00000000000000 XML Namespaces

XML Namespaces

XML Namespaces — Namespaces in XML include stacks of Namespaces

Synopsis

typedef             raptor_namespace;
raptor_namespace*   raptor_new_namespace_from_uri       (raptor_namespace_stack *nstack,
                                                         unsigned char *prefix,
                                                         raptor_uri *ns_uri,
                                                         int depth);
raptor_namespace_stack* raptor_new_namespaces           (const raptor_uri_handler *uri_handler,
                                                         void *uri_context,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data,
                                                         int defaults);
int                 raptor_namespaces_init              (raptor_namespace_stack *nstack,
                                                         const raptor_uri_handler *uri_handler,
                                                         void *uri_context,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data,
                                                         int defaults);
void                raptor_namespaces_clear             (raptor_namespace_stack *nstack);
void                raptor_free_namespaces              (raptor_namespace_stack *nstack);
void                raptor_namespaces_start_namespace   (raptor_namespace_stack *nstack,
                                                         raptor_namespace *nspace);
int                 raptor_namespaces_start_namespace_full
                                                        (raptor_namespace_stack *nstack,
                                                         unsigned char *prefix,
                                                         unsigned char *ns_uri_string,
                                                         int depth);
void                raptor_namespaces_end_for_depth     (raptor_namespace_stack *nstack,
                                                         int depth);
raptor_namespace*   raptor_namespaces_get_default_namespace
                                                        (raptor_namespace_stack *nstack);
raptor_namespace *  raptor_namespaces_find_namespace    (raptor_namespace_stack *nstack,
                                                         unsigned char *prefix,
                                                         int prefix_length);
raptor_namespace*   raptor_namespaces_find_namespace_by_uri
                                                        (raptor_namespace_stack *nstack,
                                                         raptor_uri *ns_uri);
int                 raptor_namespaces_namespace_in_scope
                                                        (raptor_namespace_stack *nstack,
                                                         const raptor_namespace *nspace);
raptor_namespace*   raptor_new_namespace                (raptor_namespace_stack *nstack,
                                                         unsigned char *prefix,
                                                         unsigned char *ns_uri_string,
                                                         int depth);
void                raptor_free_namespace               (raptor_namespace *ns);
int                 raptor_namespace_copy               (raptor_namespace_stack *nstack,
                                                         raptor_namespace *ns,
                                                         int new_depth);
raptor_uri*         raptor_namespace_get_uri            (const raptor_namespace *ns);
const unsigned char* raptor_namespace_get_prefix        (const raptor_namespace *ns);
const unsigned char* raptor_namespace_get_counted_prefix
                                                        (const raptor_namespace *ns,
                                                         size_t *length_p);
unsigned char *     raptor_namespaces_format            (const raptor_namespace *ns,
                                                         size_t *length_p);
int                 raptor_iostream_write_namespace     (raptor_iostream *iostr,
                                                         raptor_namespace *ns);
int                 raptor_new_namespace_parts_from_string
                                                        (unsigned char *string,
                                                         unsigned char **prefix,
                                                         unsigned char **uri_string);
typedef             raptor_namespace_stack;
raptor_qname*       raptor_namespaces_qname_from_uri    (raptor_namespace_stack *nstack,
                                                         raptor_uri *uri,
                                                         int xml_version);

Description

Two classes that provide an XML namespace - short prefix (or none) and absolute URI (or none) to match the form xmlns...="..." seen in XML. A stack of namespaces raptor_namespace_stack is also provided to handle in-scope namespace calculations that happen inside XML documents where inner namespaces can override outer ones.

Details

raptor_namespace

raptor_namespace* raptor_namespace;

Raptor XML Namespace class


raptor_new_namespace_from_uri ()

raptor_namespace*   raptor_new_namespace_from_uri       (raptor_namespace_stack *nstack,
                                                         unsigned char *prefix,
                                                         raptor_uri *ns_uri,
                                                         int depth);

Constructor - create a new namespace from a prefix and URI object.

nstack :

namespace stack

prefix :

namespace prefix string

ns_uri :

namespace URI

depth :

depth of namespace in the stack

Returns :

a new raptor_namespace or NULL on failure

raptor_new_namespaces ()

raptor_namespace_stack* raptor_new_namespaces           (const raptor_uri_handler *uri_handler,
                                                         void *uri_context,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data,
                                                         int defaults);

Constructor - create a new raptor_namespace_stack.

See raptor_namespaces_init() for the values of defaults.

uri_handler and uri_context parameters are ignored but are retained in the API for backwards compatibility. Internally the same uri handler as returned by raptor_uri_get_handler() will be used.

raptor_init() MUST have been called before calling this function. Use raptor_new_namespaces_v2() if using raptor_world APIs.

uri_handler :

URI handler function (ignored)

uri_context :

URI handler context data (ignored)

error_handler :

error handler function

error_data :

error handler data

defaults :

namespaces to initialise

Returns :

a new namespace stack or NULL on failure

raptor_namespaces_init ()

int                 raptor_namespaces_init              (raptor_namespace_stack *nstack,
                                                         const raptor_uri_handler *uri_handler,
                                                         void *uri_context,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data,
                                                         int defaults);

Initialise a namespaces stack some optional common namespaces.

defaults can be 0 for none, 1 for just XML, 2 for RDF, RDFS, OWL and XSD (RDQL uses this) or 3+ undefined.

uri_handler and uri_context parameters are ignored but are retained in the API for backwards compatibility. Internally the same uri handler as returned by raptor_uri_get_handler() will be used.

raptor_init() MUST have been called before calling this function. Use raptor_namespaces_init_v2() if using raptor_world APIs.

nstack :

raptor_namespace_stack to initialise

uri_handler :

URI handler function (ignored)

uri_context :

context for URI handler (ignored)

error_handler :

error handler function

error_data :

context for error handler

defaults :

namespaces to initialise.

Returns :

non-0 on error

raptor_namespaces_clear ()

void                raptor_namespaces_clear             (raptor_namespace_stack *nstack);

Empty a namespace stack of namespaces and any other resources.

nstack :

namespace stack

raptor_free_namespaces ()

void                raptor_free_namespaces              (raptor_namespace_stack *nstack);

Destructor - destroy a namespace stack

nstack :

namespace stack

raptor_namespaces_start_namespace ()

void                raptor_namespaces_start_namespace   (raptor_namespace_stack *nstack,
                                                         raptor_namespace *nspace);

Start a namespace on a stack of namespaces.

nstack :

namespace stack

nspace :

namespace to start

raptor_namespaces_start_namespace_full ()

int                 raptor_namespaces_start_namespace_full
                                                        (raptor_namespace_stack *nstack,
                                                         unsigned char *prefix,
                                                         unsigned char *ns_uri_string,
                                                         int depth);

nstack :

prefix :

ns_uri_string :

depth :

Returns :


raptor_namespaces_end_for_depth ()

void                raptor_namespaces_end_for_depth     (raptor_namespace_stack *nstack,
                                                         int depth);

End all namespaces at the given depth in the namespace stack.

nstack :

namespace stack

depth :

depth

raptor_namespaces_get_default_namespace ()

raptor_namespace*   raptor_namespaces_get_default_namespace
                                                        (raptor_namespace_stack *nstack);

Get the current default namespace in-scope in a stack.

nstack :

namespace stack

Returns :

raptor_namespace or NULL if no default namespace is in scope

raptor_namespaces_find_namespace ()

raptor_namespace *  raptor_namespaces_find_namespace    (raptor_namespace_stack *nstack,
                                                         unsigned char *prefix,
                                                         int prefix_length);

Find a namespace in a namespace stack by prefix.

Note that this uses the length so that the prefix may be a prefix (sic) of a longer string. If prefix is NULL, the default namespace will be returned if present, prefix_length length is ignored in this case.

nstack :

namespace stack

prefix :

namespace prefix to find

prefix_length :

length of prefix.

Returns :

raptor_namespace for the prefix or NULL on failure

raptor_namespaces_find_namespace_by_uri ()

raptor_namespace*   raptor_namespaces_find_namespace_by_uri
                                                        (raptor_namespace_stack *nstack,
                                                         raptor_uri *ns_uri);

Find a namespace in a namespace stack by namespace URI.

nstack :

namespace stack

ns_uri :

namespace URI to find

Returns :

raptor_namespace for the URI or NULL on failure

raptor_namespaces_namespace_in_scope ()

int                 raptor_namespaces_namespace_in_scope
                                                        (raptor_namespace_stack *nstack,
                                                         const raptor_namespace *nspace);

Test if a given namespace is in-scope in the namespace stack.

nstack :

namespace stack

nspace :

namespace

Returns :

non-0 if the namespace is in scope.

raptor_new_namespace ()

raptor_namespace*   raptor_new_namespace                (raptor_namespace_stack *nstack,
                                                         unsigned char *prefix,
                                                         unsigned char *ns_uri_string,
                                                         int depth);

Constructor - create a new namespace from a prefix and URI string.

nstack :

namespace stack

prefix :

namespace prefix string

ns_uri_string :

namespace URI string

depth :

depth of namespace in the stack

Returns :

a new raptor_namespace or NULL on failure

raptor_free_namespace ()

void                raptor_free_namespace               (raptor_namespace *ns);

Destructor - destroy a namespace.

ns :

namespace object

raptor_namespace_copy ()

int                 raptor_namespace_copy               (raptor_namespace_stack *nstack,
                                                         raptor_namespace *ns,
                                                         int new_depth);

Copy a namespace to a new namespace stack with a new depth.

nstack :

namespace stack

ns :

namespace

new_depth :

new depth

Returns :

non-0 on failure

raptor_namespace_get_uri ()

raptor_uri*         raptor_namespace_get_uri            (const raptor_namespace *ns);

Get the namespace URI.

ns :

namespace object

Returns :

namespace URI or NULL

raptor_namespace_get_prefix ()

const unsigned char* raptor_namespace_get_prefix        (const raptor_namespace *ns);

Get the namespace prefix.

ns :

namespace object

Returns :

prefix string or NULL

raptor_namespace_get_counted_prefix ()

const unsigned char* raptor_namespace_get_counted_prefix
                                                        (const raptor_namespace *ns,
                                                         size_t *length_p);

Get the namespace prefix and length.

ns :

namespace object

length_p :

pointer to store length or NULL

Returns :

prefix string or NULL

raptor_namespaces_format ()

unsigned char *     raptor_namespaces_format            (const raptor_namespace *ns,
                                                         size_t *length_p);

Format a namespace in an XML style into a newly allocated string.

Generates a string of the form xmlns:prefix="uri", xmlns="uri", xmlns:prefix="" or xmlns="" depending on the namespace's prefix or URI. Double quotes are always used.

If length_p is not NULL, the length of the string is stored in the address it points to.

See also raptor_new_namespace_parts_from_string()

ns :

namespace object

length_p :

pointer to length (or NULL)

Returns :

namespace formatted as newly allocated string or NULL on failure

raptor_iostream_write_namespace ()

int                 raptor_iostream_write_namespace     (raptor_iostream *iostr,
                                                         raptor_namespace *ns);

Write a formatted namespace to an iostream

iostr :

raptor iosteram

ns :

namespace to write

Returns :

non-0 on failure

raptor_new_namespace_parts_from_string ()

int                 raptor_new_namespace_parts_from_string
                                                        (unsigned char *string,
                                                         unsigned char **prefix,
                                                         unsigned char **uri_string);

Parse a string containin an XML style namespace declaration into a namespace prefix and URI.

The string is of the form xmlns:prefix="uri", xmlns="uri", xmlns:prefix="" or xmlns="". The quotes can be single or double quotes.

Two values are returned from this function into *prefix and *uri_string neither of which may be NULL.

See also raptor_namespaces_format()

string :

string to parse

prefix :

pointer to location to store namespace prefix

uri_string :

pointer to location to store namespace URI

Returns :

non-0 on failure.

raptor_namespace_stack

raptor_namespace_stack* raptor_namespace_stack;

Raptor XML Namespace Stack class


raptor_namespaces_qname_from_uri ()

raptor_qname*       raptor_namespaces_qname_from_uri    (raptor_namespace_stack *nstack,
                                                         raptor_uri *uri,
                                                         int xml_version);

Make an appropriate XML Qname from the namespaces on a namespace stack

Makes a qname from the in-scope namespaces in a stack if the URI matches the prefix and the rest is a legal XML name.

nstack :

namespace stack

uri :

URI to use to make qname

xml_version :

XML Version

Returns :

raptor_qname for the URI or NULL on failure
raptor-1.4.21/docs/html/tutorial-serializer-create.html0000644000175000017500000000662511331056234020073 00000000000000 Create the Serializer object

Create the Serializer object

The serializer can be created directly from a known name using raptor_new_serializer() such as rdfxml for the W3C Recommendation RDF/XML syntax:

  raptor_serializer* rdf_serializer;

  rdf_serializer = raptor_new_serializer("rdfxml");

or the name can be discovered from an enumeration as discussed in Querying Functionality

raptor-1.4.21/docs/html/raptor.devhelp0000644000175000017500000014177411331056234014617 00000000000000 raptor-1.4.21/docs/html/restrict-parser-network-access.html0000644000175000017500000002077011331056234020674 00000000000000 Restrict parser network access

Restrict parser network access

Parsing can cause network requests to be performed, especially if a URI is given as an argument such as with raptor_parse_uri() however there may also be indirect requests such as with the GRDDL parser that retrieves URIs depending on the results of initial parse requests. The URIs requested may not be wanted to be fetched or need to be filtered, and this can be done in three ways.

Filtering parser network requests with feature RAPTOR_FEATURE_NO_NET

The parser feature RAPTOR_FEATURE_NO_NET can be set with raptor_set_feature() and forbids all network requests. There is no customisation with this approach, for that see the URI filter in the next section.

  rdf_parser = raptor_new_parser("rdfxml");

  /* Disable internal network requests */
  raptor_set_feature(rdf_parser, RAPTOR_FEATURE_NO_NET, 1);

Filtering parser network requests with raptor_www_set_uri_filter()

The raptor_www_set_uri_filter() allows setting of a filtering function to operate on all URIs retrieved by a WWW connection. This connection can be used in parsing when operated by hand.

void write_bytes_handler(raptor_www* www, void *user_data, 
                         const void *ptr, size_t size, size_t nmemb) {
{
  raptor_parser* rdf_parser=(raptor_parser*)user_data;
  raptor_parse_chunk(rdf_parser, (unsigned char*)ptr, size*nmemb, 0);
}

int uri_filter(void* filter_user_data, raptor_uri* uri) {
  /* return non-0 to forbid the request */
}

int main(int argc, char *argv[]) { 
  ...

  rdf_parser = raptor_new_parser("rdfxml");
  www = raptor_new_www();

  /* filter all URI requests */
  raptor_www_set_uri_filter(www, uri_filter, filter_user_data);

  /* make WWW write bytes to parser */
  raptor_www_set_write_bytes_handler(www, write_bytes_handler, rdf_parser);

  raptor_start_parse(rdf_parser, uri);
  raptor_www_fetch(www, uri);
  /* tell the parser that we are done */
  raptor_parse_chunk(rdf_parser, NULL, 0, 1);

  raptor_www_free(www);
  raptor_free_parser(rdf_parser);

  ...
}

Filtering parser network requests with raptor_parser_set_uri_filter()

The raptor_parser_set_uri_filter() allows setting of a filtering function to operate on all URIs that the parser sees. This operates on the internal raptor_www object used inside parsing to retrieve URIs, similar to that described in the previous section.

  int uri_filter(void* filter_user_data, raptor_uri* uri) {
    /* return non-0 to forbid the request */
  }

  rdf_parser = raptor_new_parser("rdfxml");
  raptor_parser_set_uri_filter(rdf_parser, uri_filter, filter_user_data);

  /* parse content as normal */
  raptor_parse_uri(rdf_parser, uri, base_uri);

Setting timeout for parser network requests with feature RAPTOR_FEATURE_WWW_TIMEOUT

If the value of feature RAPTOR_FEATURE_WWW_TIMEOUT if set to a number >0, it is used as the timeout in seconds for retrieving of URIs during parsing (primarily for GRDDL). This uses raptor_www_set_connection_timeout() internally.

  rdf_parser = raptor_new_parser("grddl");

  /* set internal URI retrieval maximum time to 5 seconds */
  raptor_set_feature(rdf_parser, RAPTOR_FEATURE_WWW_TIMEOUT , 5);
raptor-1.4.21/docs/html/tutorial-initialising-finishing.html0000644000175000017500000000604611331056234021115 00000000000000 Initialising and Finishing using the Library

Initialising and Finishing using the Library

Raptor has a single initialising function and a single terminating function. The initialising function must be called before any other Raptor API functions are called:

  raptor_init();
  ...
  raptor_finish();

It is safe to call these functions more than once. But don't do that!

raptor-1.4.21/docs/html/tutorial-serializer-example.html0000644000175000017500000001161311331056234020254 00000000000000 Serializing example code

Serializing example code

Example 4. rdfcat.c: Read any RDF syntax and serialize to RDF/XML (Abbreviated)

#include <stdio.h>
#include <raptor.h>

/* rdfcat.c: parse any RDF syntax and serialize to RDF/XML-Abbrev */

static raptor_serializer* rdf_serializer;

void
serialize_triple(void* user_data, const raptor_statement* triple) 
{
  raptor_serialize_statement(rdf_serializer, triple);
}

static void
declare_namespace(void* user_data, raptor_namespace *nspace)
{
  raptor_serialize_set_namespace_from_namespace(rdf_serializer, nspace);
}

int
main(int argc, char *argv[])
{
  raptor_parser* rdf_parser=NULL;
  unsigned char *uri_string;
  raptor_uri *uri, *base_uri;

  raptor_init();

  uri_string=raptor_uri_filename_to_uri_string(argv[1]);
  uri=raptor_new_uri(uri_string);
  base_uri=raptor_uri_copy(uri);

  /* Ask raptor to work out which parser to use */
  rdf_parser=raptor_new_parser("guess");
  raptor_set_statement_handler(rdf_parser, NULL, serialize_triple);
  raptor_set_namespace_handler(rdf_parser, NULL, declare_namespace);

  rdf_serializer=raptor_new_serializer("rdfxml-abbrev");

  raptor_serialize_start_to_file_handle(rdf_serializer, base_uri, stdout);
  raptor_parse_file(rdf_parser, uri, base_uri);
  raptor_serialize_end(rdf_serializer);

  raptor_free_serializer(rdf_serializer);
  raptor_free_parser(rdf_parser);

  raptor_free_uri(base_uri);
  raptor_free_uri(uri);
  raptor_free_memory(uri_string);

  raptor_finish();
}

Compile it like this:

$ gcc -o rdfcat rdfcat.c `raptor-config --cflags` `raptor-config --libs`

and run it on an RDF file as:

$ ./rdfcat raptor.rdf
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://usefulinc.com/ns/doap#">
  <rdf:Description rdf:about="">
    <foaf:maker>
      <foaf:Person>
        <foaf:name>Dave Beckett</foaf:name>
...


raptor-1.4.21/docs/html/index.html0000644000175000017500000004132011331056234013716 00000000000000 Raptor RDF Syntax Parsing and Serializing Library Manual

Dave Beckett

Manual for Raptor 1.4.21

This documentation is Free Software / Open Source - you can redistribute it and/or modify it under the same licenses as Raptor. It is licensed under the following three licenses as alternatives:

  1. GNU Lesser General Public License (LGPL) V2.1 or any newer version

  2. GNU General Public License (GPL) V2 or any newer version

  3. Apache License, V2.0 or any newer version

You may not use this documentation except in compliance with at least one of the above three licenses. See the Raptor site for the full license terms.


Raptor Overview
I. Raptor Tutorial
Initialising and Finishing using the Library
Listing built-in functionality
Parsing syntaxes to RDF Triples
Introduction
Create the Parser object
Parser features
Set RDF triple callback handler
Set fatal error, error and warning handlers
Set the identifier creator handler
Set namespace declared handler
Set the parsing strictness
Provide syntax content to parse
Parse the content from a URI (raptor_parse_uri())
Parse the content of a URI using an existing WWW connection (raptor_parse_uri_with_connection())
Parse the content of a C FILE* (raptor_parse_file_stream())
Parse the content of a file URI (raptor_parse_file())
Parse chunks of syntax content provided by the application (raptor_start_parse() and raptor_parse_chunk())
Restrict parser network access
Filtering parser network requests with feature RAPTOR_FEATURE_NO_NET
Filtering parser network requests with raptor_www_set_uri_filter()
Filtering parser network requests with raptor_parser_set_uri_filter()
Setting timeout for parser network requests with feature RAPTOR_FEATURE_WWW_TIMEOUT
Querying parser static information
Querying parser run-time information
Aborting parsing
Destroy the parser
Parsing example code
Serializing RDF triples to a syntax
Introduction
Create the Serializer object
Serializer features
Declare namespaces
Set error and warning handlers
Provide a destination for the serialized syntax
Serialize to a filename (raptor_serialize_start_to_filename())
Serialize to a string (raptor_serialize_start_to_string())
Serialize to a FILE* file handle (raptor_serialize_start_to_file_handle())
Serialize to an raptor_iostream (raptor_serialize_start_to_iostream())
Serialize to an raptor_iostream and close iostream (raptor_serialize_start())
Get or construct RDF Triples
Send RDF Triples to serializer
Querying serializer run-time information
Destroy the serializer
Serializing example code
II. Raptor Reference Manual
Parsers in Raptor (syntax to triples)
Introduction
GRDDL parser (name grddl)
Guess parser (name guess)
N-Triples parser (name ntriples)
RDFa parser - (name rdfa)
RDF/XML parser - default (name rdfxml)
RSS Tag Soup parser (name rss-tag-soup)
TRiG parser (name trig)
Turtle Terse RDF Triple Language parser (name turtle)
Serializers in Raptor (triples to syntax)
Introduction
Atom 1.0 serializer (name atom)
JSON serializers (name json and name json-triples)
N-Triples serializer - default (name ntriples)
RDF/XML serializer (name rdfxml)
RDF/XML (Abbreviated) serializer (name rdfxml-abbrev)
RDF/XML (XMP Profile) serializer (name rdfxml-xmp)
Turtle serializer (name turtle)
RSS 1.0 serializer (name rss-1.0)
GraphViz dot serializer (name dot)
Initialisation — Library startup, shutdown and configuration.
General — General library constants and utility functions
Memory — Memory handling functions
Constants — Constant values and strings
Features — Parser and Serializer features
I/O Stream — Providing streaming I/O writing to files, strings or user code.
Locator — Location information for errors, warnings and messages.
Parser — RDF parsers - from a syntax to RDF triples
SAX2 — SAX2 XML Parsing API with namespaces and base URI support.
Sequence — Ordered sequence of items.
Serializer — RDF serializers - from RDF triples to a syntax
String buffer — Append-only strings.
Triples — RDF Triples
Unicode — Unicode and UTF-8 utility functions.
URI Factory — Provide an implementation for the URI class.
URI — URI class and relative URI computation
WWW — Retrieval of URI content from the web.
XML Namespaces — Namespaces in XML include stacks of Namespaces
XML QName — XML Namespace-qualified names.
XML — XML and XML Writer
Index
raptor-1.4.21/docs/html/index.sgml0000644000175000017500000015363611331056234013732 00000000000000 raptor-1.4.21/docs/html/parser-turtle.html0000644000175000017500000000604711331056234015427 00000000000000 Turtle Terse RDF Triple Language parser (name turtle)

Turtle Terse RDF Triple Language parser (name turtle)

A parser for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.

raptor-1.4.21/docs/html/serializer-rdfxml-xmp.html0000644000175000017500000000604511331056234017061 00000000000000 RDF/XML (XMP Profile) serializer (name rdfxml-xmp)

RDF/XML (XMP Profile) serializer (name rdfxml-xmp)

A serializer to the Adobe XMP profile of RDF/XML suitable for embedding inside an external document. Embedding means that the XML header is omitted, wheras for other XML serializings, it is always emitted.

raptor-1.4.21/docs/html/tutorial-serializer-send-triples.html0000644000175000017500000001022011331056234021223 00000000000000 Send RDF Triples to serializer

Send RDF Triples to serializer

Once the serializer has been started, RDF triples can be sent to it via the raptor_serialize_statement() function with a raptor_statement value.

Once all triples are sent, the serializing must be finished with a call to raptor_serialize_end(). In particular, only at this point does the raptor_iostream get flushed or any string constructed for raptor_serialize_start_to_string().

  /* start the serializing somehow */
  while( /* got RDF triples */ ) {
    raptor_serialize_statement(rdf_serializer, triple);
  }
  raptor_serialize_end(rdf_serializer);
  /* now can use the serializing result (FILE, string, raptor_iostream) */

raptor-1.4.21/docs/html/tutorial-parser-create.html0000644000175000017500000001200611331056234017204 00000000000000 Create the Parser object

Create the Parser object

The parser can be created directly from a known name such as rdfxml for the W3C Recommendation RDF/XML syntax:

  raptor_parser* rdf_parser;

  rdf_parser = raptor_new_parser("rdfxml");

or the name can be discovered from an enumeration as discussed in Querying Functionality

The parser can also be created by identifying the syntax by a URI, specifying the syntax by a MIME Type, providng an identifier for the content such as filename or URI string or giving some initial content bytes that can be used to guess. Using the raptor_new_parser_for_content() function, all of these can be given as optional parameters, using NULL or 0 for undefined parameters. The constructor will then use as much of this information as possible.

  raptor_parser* rdf_parser;

Create a parser that reads the MIME Type for RDF/XML application/rdf+xml

  rdf_parser = raptor_new_parser_for_content(NULL, "application/rdf+xml", NULL, 0, NULL);

Create a parser that can read a syntax identified by the URI for Turtle http://www.dajobe.org/2004/01/turtle/, which has no registered MIME Type at this date:

  syntax_uri = raptor_new_uri("http://www.dajobe.org/2004/01/turtle/");
  rdf_parser = raptor_new_parser_for_content(syntax_uri, NULL, NULL, 0, NULL);

Create a parser that recognises the identifier foo.rss:

  rdf_parser = raptor_new_parser_for_content(NULL, NULL, NULL, 0, "foo.rss");

Create a parser that recognises the content in buffer:

  rdf_parser = raptor_new_parser_for_content(NULL, NULL, buffer, len, NULL);

Any of the constructor calls can return NULL if no matching parser could be found, or the construction failed in another way.

raptor-1.4.21/docs/html/home.png0000644000175000017500000000121611331056234013357 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1KvIDATxՕkq?rCp ~CnpCAAJ .B-\'G]:ܠC -(8 Ԁ!fDғklbRoyxwpðIJ<of_-@RHf֟t^ښ$Q|pgv;X^^&s(bwwZF9&3඙ ^IRZUE.0Z]]U PYM8HGIekqqҀ! $۬3n e{-/seeeÌXOͷ$8==USQRR'9-s+B^ Cەs+%<7W :2IENDB`raptor-1.4.21/docs/html/tutorial-parser-example.html0000644000175000017500000001041511331056234017376 00000000000000 Parsing example code

Parsing example code

Example 2. rdfprint.c: Parse an RDF/XML file and print the triples

#include <stdio.h>
#include <raptor.h>

/* rdfprint.c: print triples from parsing RDF/XML */

void
print_triple(void* user_data, const raptor_statement* triple) 
{
  raptor_print_statement_as_ntriples(triple, stdout);
  fputc('\n', stdout);
}

int
main(int argc, char *argv[])
{
  raptor_parser* rdf_parser=NULL;
  unsigned char *uri_string;
  raptor_uri *uri, *base_uri;

  raptor_init();

  rdf_parser=raptor_new_parser("rdfxml");

  raptor_set_statement_handler(rdf_parser, NULL, print_triple);

  uri_string=raptor_uri_filename_to_uri_string(argv[1]);
  uri=raptor_new_uri(uri_string);
  base_uri=raptor_uri_copy(uri);

  raptor_parse_file(rdf_parser, uri, base_uri);

  raptor_free_parser(rdf_parser);

  raptor_free_uri(base_uri);
  raptor_free_uri(uri);
  raptor_free_memory(uri_string);

  raptor_finish();
}

Compile it like this:

$ gcc -o rdfprint rdfprint.c `raptor-config --cflags` `raptor-config --libs`

and run it on an RDF file as:

$ ./rdfprint raptor.rdf
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> .
_:genid1 <http://usefulinc.com/ns/doap#name> "Raptor" .
_:genid1 <http://usefulinc.com/ns/doap#homepage> <http://librdf.org/raptor/> .
...


raptor-1.4.21/docs/html/serializer-rdfxml.html0000644000175000017500000000621111331056234016252 00000000000000 RDF/XML serializer (name rdfxml)

RDF/XML serializer (name rdfxml)

A serializer to the standard RDF/XML syntax as revised by the W3C RDF Core working group. This writes a plain triple-based RDF/XML serialization with no optimisation or pretty-printing.

raptor-1.4.21/docs/html/tutorial-querying-functionality.html0000644000175000017500000001561511331056234021211 00000000000000 Listing built-in functionality

Listing built-in functionality

Raptor can be configured and compiled with support for different parsers and serializers. Lists of the functionality built into the library can be interrogated by means of enumerate functions. These take as input an int counter and return descriptions of the feature at that offset in the list. The descriptions are returned stored in the variables pointed to by the reference arguments of the **var form. The return value of the function is non-zero when the counter has gone too far.

Listing Functionality with Enumeration

List the parse syntaxes (parser names)

int
raptor_parsers_enumerate(const unsigned int counter,
                         const char **name, const char **label);

List the parse syntaxes (same as above but with more information)

int
raptor_syntaxes_enumerate(const unsigned int counter,
                          const char **name,
                          const char **label, 
                          const char **mime_type,
                          const unsigned char **uri_string);

List the serializer syntaxes (serializer names)

int
raptor_serializers_enumerate(const unsigned int counter,
                             const char **name,
                             const char **label,
                             const char **mime_type,
                             const unsigned char **uri_string);

List the Parser features

int
raptor_features_enumerate(const raptor_feature feature,
                          const char **name, raptor_uri **uri,
                          const char **label);

List the Serializer features

int
raptor_serializer_features_enumerate(const raptor_feature feature,
                                     const char **name,
                                     raptor_uri **uri,
                                     const char **label);

List the XML Writer features

int
raptor_xml_writer_features_enumerate(const raptor_feature feature,
                                     const char **name,
                                     raptor_uri **uri,
                                     const char **label);

These functions can be called directly after raptor_init() has been called so can be used to find name parameters for creating parser and serializer instances. This is one way to find a parser (name) by it's MIME Type, the other is to use the mime_type parameter of the raptor_new_parser_for_content().

Example 1. List all features of parsers with an enumerate function

  int i;
  for(i=0; i < RAPTOR_FEATURE_LAST; i++) {
    const char *name;
    raptor_uri *uri;
    const char *label;
    if(raptor_features_enumerate((raptor_feature)i, &name, &uri, &label))
      continue;
    /* do something with name, uri and label */
  }

There are more examples of this usage in the source for the rapper utility in util/rapper.c.


raptor-1.4.21/docs/html/parser-rss-tag-soup.html0000644000175000017500000000710311331056234016446 00000000000000 RSS Tag Soup parser (name rss-tag-soup)

RSS Tag Soup parser (name rss-tag-soup)

A parser for the multiple XML RSS formats that use the elements such as channel, item, title, description in different ways. This includes support for the Atom 1.0 syndication format defined in IETF RFC 4287

The parser attempts to turn the input into RSS 1.0 RDF triples in the RSS 1.0 model of a syndication feed. This includes triples for RSS Enclosures.

True RSS 1.0 when wanted to be used as a full RDF vocabulary, is best parsed by the RDF/XML parser (name rdfxml).

raptor-1.4.21/docs/html/introduction.html0000644000175000017500000000545211331056234015336 00000000000000 Raptor Overview

Raptor Overview

Raptor is a library for RDF syntax parsing and serializing providing APIs to turn syntax to and from RDF triples. It also includes supporting functionality for Unicode, UTF-8, URIs, WWW retrieval and XML writing.

raptor-1.4.21/docs/html/raptor-section-sax2.html0000644000175000017500000012300411331056234016433 00000000000000 SAX2

SAX2

SAX2 — SAX2 XML Parsing API with namespaces and base URI support.

Synopsis

typedef             raptor_sax2;
raptor_sax2*        raptor_new_sax2                     (void *user_data,
                                                         raptor_error_handlers *error_handlers);
void                raptor_free_sax2                    (raptor_sax2 *sax2);
void                (*raptor_sax2_start_element_handler)
                                                        (void *user_data,
                                                         raptor_xml_element *xml_element);
void                (*raptor_sax2_end_element_handler)  (void *user_data,
                                                         raptor_xml_element *xml_element);
void                (*raptor_sax2_characters_handler)   (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         unsigned char *s,
                                                         int len);
void                (*raptor_sax2_cdata_handler)        (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         unsigned char *s,
                                                         int len);
void                (*raptor_sax2_comment_handler)      (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         unsigned char *s);
void                (*raptor_sax2_unparsed_entity_decl_handler)
                                                        (void *user_data,
                                                         unsigned char *entityName,
                                                         unsigned char *base,
                                                         unsigned char *systemId,
                                                         unsigned char *publicId,
                                                         unsigned char *notationName);
int                 (*raptor_sax2_external_entity_ref_handler)
                                                        (void *user_data,
                                                         unsigned char *context,
                                                         unsigned char *base,
                                                         unsigned char *systemId,
                                                         unsigned char *publicId);
void                raptor_sax2_set_start_element_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_start_element_handler handler);
void                raptor_sax2_set_end_element_handler (raptor_sax2 *sax2,
                                                         raptor_sax2_end_element_handler handler);
void                raptor_sax2_set_characters_handler  (raptor_sax2 *sax2,
                                                         raptor_sax2_characters_handler handler);
void                raptor_sax2_set_cdata_handler       (raptor_sax2 *sax2,
                                                         raptor_sax2_cdata_handler handler);
void                raptor_sax2_set_comment_handler     (raptor_sax2 *sax2,
                                                         raptor_sax2_comment_handler handler);
void                raptor_sax2_set_unparsed_entity_decl_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_unparsed_entity_decl_handler handler);
void                raptor_sax2_set_external_entity_ref_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_external_entity_ref_handler handler);
void                raptor_sax2_set_namespace_handler   (raptor_sax2 *sax2,
                                                         raptor_namespace_handler handler);
void                raptor_sax2_parse_start             (raptor_sax2 *sax2,
                                                         raptor_uri *base_uri);
int                 raptor_sax2_parse_chunk             (raptor_sax2 *sax2,
                                                         unsigned char *buffer,
                                                         size_t len,
                                                         int is_end);
const unsigned char* raptor_sax2_inscope_xml_language   (raptor_sax2 *sax2);
raptor_uri*         raptor_sax2_inscope_base_uri        (raptor_sax2 *sax2);

Description

A class providing a SAX2 XML parsing API with XML namespaces and XML base support.

Details

raptor_sax2

typedef struct raptor_sax2_s raptor_sax2;

Raptor SAX2 class


raptor_new_sax2 ()

raptor_sax2*        raptor_new_sax2                     (void *user_data,
                                                         raptor_error_handlers *error_handlers);

Constructor - Create a new SAX2 with error handlers

user_data :

pointer context information to pass to handlers

error_handlers :

error handlers pointer

Returns :

new raptor_sax2 object or NULL on failure

raptor_free_sax2 ()

void                raptor_free_sax2                    (raptor_sax2 *sax2);

Destructor - destroy a SAX2 object

sax2 :

SAX2 object

raptor_sax2_start_element_handler ()

void                (*raptor_sax2_start_element_handler)
                                                        (void *user_data,
                                                         raptor_xml_element *xml_element);

SAX2 start element handler

user_data :

user data

xml_element :

XML element

raptor_sax2_end_element_handler ()

void                (*raptor_sax2_end_element_handler)  (void *user_data,
                                                         raptor_xml_element *xml_element);

SAX2 end element handler

user_data :

user data

xml_element :

XML element

raptor_sax2_characters_handler ()

void                (*raptor_sax2_characters_handler)   (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         unsigned char *s,
                                                         int len);

SAX2 characters handler

user_data :

user data

xml_element :

XML element

s :

string

len :

string len

raptor_sax2_cdata_handler ()

void                (*raptor_sax2_cdata_handler)        (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         unsigned char *s,
                                                         int len);

SAX2 CDATA section handler

user_data :

user data

xml_element :

XML element

s :

string

len :

string len

raptor_sax2_comment_handler ()

void                (*raptor_sax2_comment_handler)      (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         unsigned char *s);

SAX2 XML comment handler

user_data :

user data

xml_element :

XML element

s :

string

raptor_sax2_unparsed_entity_decl_handler ()

void                (*raptor_sax2_unparsed_entity_decl_handler)
                                                        (void *user_data,
                                                         unsigned char *entityName,
                                                         unsigned char *base,
                                                         unsigned char *systemId,
                                                         unsigned char *publicId,
                                                         unsigned char *notationName);

SAX2 unparsed entity (NDATA) handler

user_data :

user data

entityName :

entity name

base :

base URI

systemId :

system ID

publicId :

public ID

notationName :

notation name

raptor_sax2_external_entity_ref_handler ()

int                 (*raptor_sax2_external_entity_ref_handler)
                                                        (void *user_data,
                                                         unsigned char *context,
                                                         unsigned char *base,
                                                         unsigned char *systemId,
                                                         unsigned char *publicId);

SAX2 external entity reference handler

user_data :

user data

context :

context

base :

base URI

systemId :

system ID

publicId :

public ID

Returns :

0 if processing should not continue because of a fatal error in the handling of the external entity.

raptor_sax2_set_start_element_handler ()

void                raptor_sax2_set_start_element_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_start_element_handler handler);

Set SAX2 start element handler.

sax2 :

SAX2 object

handler :

start element handler

raptor_sax2_set_end_element_handler ()

void                raptor_sax2_set_end_element_handler (raptor_sax2 *sax2,
                                                         raptor_sax2_end_element_handler handler);

Set SAX2 end element handler.

sax2 :

SAX2 object

handler :

end element handler

raptor_sax2_set_characters_handler ()

void                raptor_sax2_set_characters_handler  (raptor_sax2 *sax2,
                                                         raptor_sax2_characters_handler handler);

Set SAX2 characters handler.

sax2 :

SAX2 object

handler :

characters handler

raptor_sax2_set_cdata_handler ()

void                raptor_sax2_set_cdata_handler       (raptor_sax2 *sax2,
                                                         raptor_sax2_cdata_handler handler);

Set SAX2 CDATA handler.

sax2 :

SAX2 object

handler :

CDATA handler

raptor_sax2_set_comment_handler ()

void                raptor_sax2_set_comment_handler     (raptor_sax2 *sax2,
                                                         raptor_sax2_comment_handler handler);

Set SAX2 XML comment handler.

sax2 :

SAX2 object

handler :

comment handler

raptor_sax2_set_unparsed_entity_decl_handler ()

void                raptor_sax2_set_unparsed_entity_decl_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_unparsed_entity_decl_handler handler);

Set SAX2 XML unparsed entity declaration handler.

sax2 :

SAX2 object

handler :

unparsed entity declaration handler

raptor_sax2_set_external_entity_ref_handler ()

void                raptor_sax2_set_external_entity_ref_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_external_entity_ref_handler handler);

Set SAX2 XML entity reference handler.

sax2 :

SAX2 object

handler :

entity reference handler

raptor_sax2_set_namespace_handler ()

void                raptor_sax2_set_namespace_handler   (raptor_sax2 *sax2,
                                                         raptor_namespace_handler handler);

Set the XML namespace handler function.

When a prefix/namespace is seen in an XML parser, call the given handler with the prefix string and the raptor_uri namespace URI. Either can be NULL for the default prefix or default namespace.

The handler function does not deal with duplicates so any namespace may be declared multiple times when a namespace is seen in different parts of a document.

sax2 :

raptor_sax2 object

handler :

new namespace callback function

raptor_sax2_parse_start ()

void                raptor_sax2_parse_start             (raptor_sax2 *sax2,
                                                         raptor_uri *base_uri);

Start an XML SAX2 parse.

sax2 :

sax2 object

base_uri :

base URI

raptor_sax2_parse_chunk ()

int                 raptor_sax2_parse_chunk             (raptor_sax2 *sax2,
                                                         unsigned char *buffer,
                                                         size_t len,
                                                         int is_end);

Parse a chunk of XML data generating SAX2 events

sax2 :

sax2 object

buffer :

input buffer

len :

input buffer lenght

is_end :

non-0 if end of data

Returns :

non-0 on failure

raptor_sax2_inscope_xml_language ()

const unsigned char* raptor_sax2_inscope_xml_language   (raptor_sax2 *sax2);

Get the in-scope XML language

sax2 :

SAX2 object

Returns :

the XML language or NULL if none is in scope.

raptor_sax2_inscope_base_uri ()

raptor_uri*         raptor_sax2_inscope_base_uri        (raptor_sax2 *sax2);

Get the in-scope base URI

sax2 :

SAX2 object

Returns :

the in-scope base URI shared object or NULL if none is in scope.
raptor-1.4.21/docs/html/serializer-turtle.html0000644000175000017500000000604011331056234016275 00000000000000 Turtle serializer (name turtle)

Turtle serializer (name turtle)

A serializer for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.

raptor-1.4.21/docs/html/tutorial-parser-abort.html0000644000175000017500000000617511331056234017062 00000000000000 Aborting parsing

Aborting parsing

raptor_parse_abort() allows the current parsing to be aborted, at which point no further triples will be passed to callbacks and the parser will attempt to return control to the application. This is most useful when called inside a handler function which allows the application to decide to stop an active parsing.

raptor-1.4.21/docs/html/tutorial-parser-set-triple-handler.html0000644000175000017500000000704311331056234021451 00000000000000 Set RDF triple callback handler

Set RDF triple callback handler

The main reason to parse a syntax is to get RDF triples returned and this is done by a callback function which is called with parameters of a user data pointer and the triple itself. The handler is set with raptor_set_statement_handler() as follows:

  void
  triples_handler(void* user_data, const raptor_statement* triple) 
  {
    /* do something with the triple */
  }

  raptor_set_statement_handler(rdf_parser, user_data, triples_handler);

It is optional to set a handler function for triples, which does have some uses if just counting triples or validating a syntax.

raptor-1.4.21/docs/html/raptor-section-constants.html0000644000175000017500000001562211331056234017600 00000000000000 Constants

Constants

Constants — Constant values and strings

Synopsis

extern              const unsigned int raptor_rdf_namespace_uri_len;
extern              const unsigned int raptor_xml_literal_datatype_uri_string_len;
#define             RAPTOR_RDF_MS_URI
#define             RAPTOR_RDF_SCHEMA_URI
#define             RAPTOR_XMLSCHEMA_DATATYPES_URI
#define             RAPTOR_OWL_URI

Description

Version numbers and often-used namespace URI strings.

Details

raptor_rdf_namespace_uri_len

extern const unsigned int raptor_rdf_namespace_uri_len;

Length of raptor_rdf_namespace_uri string


raptor_xml_literal_datatype_uri_string_len

extern const unsigned int raptor_xml_literal_datatype_uri_string_len;

Length of raptor_xml_literal_datatype_uri_string


RAPTOR_RDF_MS_URI

#define RAPTOR_RDF_MS_URI raptor_rdf_namespace_uri

RDF Namespace URI (rdf:).

Copy with raptor_uri_copy() to use.


RAPTOR_RDF_SCHEMA_URI

#define RAPTOR_RDF_SCHEMA_URI raptor_rdf_schema_namespace_uri

RDF Schema Namespace URI (rdfs:).

Copy with raptor_uri_copy() to use.


RAPTOR_XMLSCHEMA_DATATYPES_URI

#define RAPTOR_XMLSCHEMA_DATATYPES_URI raptor_xmlschema_datatypes_namespace_uri

XML Schema Datatypes URI (xsd:).

Copy with raptor_uri_copy() to use.


RAPTOR_OWL_URI

#define RAPTOR_OWL_URI raptor_owl_namespace_uri

OWL Namespace URI (owl:).

Copy with raptor_uri_copy() to use.

raptor-1.4.21/docs/html/raptor-section-unicode.html0000644000175000017500000003710411331056234017211 00000000000000 Unicode

Unicode

Unicode — Unicode and UTF-8 utility functions.

Description

Functions to support converting to and from Unicode written in UTF-8 which is the native internal string format of all the redland libraries. Includes checking for Unicode names using either the XML 1.0 or XML 1.1 rules.

Details

raptor_unichar

typedef unsigned long raptor_unichar;

raptor Unicode codepoint


raptor_unicode_char_to_utf8 ()

int                 raptor_unicode_char_to_utf8         (raptor_unichar c,
                                                         unsigned char *output);

Convert a Unicode character to UTF-8 encoding.

Based on librdf_unicode_char_to_utf8() with no need to calculate length since the encoded character is always copied into a buffer with sufficient size.

c :

Unicode character

output :

UTF-8 string buffer or NULL

Returns :

bytes encoded to output buffer or <0 on failure

raptor_utf8_to_unicode_char ()

int                 raptor_utf8_to_unicode_char         (raptor_unichar *output,
                                                         unsigned char *input,
                                                         int length);

Convert an UTF-8 encoded buffer to a Unicode character.

If output is NULL, then will calculate the number of bytes that will be used from the input buffer and not perform the conversion.

output :

Pointer to the Unicode character or NULL

input :

UTF-8 string buffer

length :

buffer size

Returns :

bytes used from input buffer or <0 on failure: -1 input buffer too short or length error, -2 overlong UTF-8 sequence, -3 illegal code positions, -4 code out of range U+0000 to U+10FFFF. In cases -2, -3 and -4 the coded character is stored in the output.

raptor_unicode_is_xml11_namestartchar ()

int                 raptor_unicode_is_xml11_namestartchar
                                                        (raptor_unichar c);

Check if Unicode character is legal to start an XML 1.1 Name

Namespaces in XML 1.1 REC 2004-02-04 http://www.w3.org/TR/2004/REC-xml11-20040204/NT-NameStartChar updating Extensible Markup Language (XML) 1.1 REC 2004-02-04 http://www.w3.org/TR/2004/REC-xml11-20040204/ sec 2.3, [4a] excluding the ':'

c :

Unicode character to check

Returns :

non-0 if legal

raptor_unicode_is_xml10_namestartchar ()

int                 raptor_unicode_is_xml10_namestartchar
                                                        (raptor_unichar c);

Check if Unicode character is legal to start an XML 1.0 Name

Namespaces in XML REC 1999-01-14 http://www.w3.org/TR/1999/REC-xml-names-19990114/NT-NCName updating Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04 http://www.w3.org/TR/2004/REC-xml-20040204/ excluding the ':'

c :

Unicode character to check

Returns :

non-0 if legal

raptor_unicode_is_xml11_namechar ()

int                 raptor_unicode_is_xml11_namechar    (raptor_unichar c);

Check if a Unicode codepoint is a legal to continue an XML 1.1 Name

Namespaces in XML 1.1 REC 2004-02-04 http://www.w3.org/TR/2004/REC-xml11-20040204/ updating Extensible Markup Language (XML) 1.1 REC 2004-02-04 http://www.w3.org/TR/2004/REC-xml11-20040204/ sec 2.3, [4a] excluding the ':'

c :

Unicode character

Returns :

non-0 if legal

raptor_unicode_is_xml10_namechar ()

int                 raptor_unicode_is_xml10_namechar    (raptor_unichar c);

Check if a Unicode codepoint is a legal to continue an XML 1.0 Name

Namespaces in XML REC 1999-01-14 http://www.w3.org/TR/1999/REC-xml-names-19990114/NT-NCNameChar updating Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04 http://www.w3.org/TR/2004/REC-xml-20040204/ excluding the ':'

c :

Unicode character

Returns :

non-0 if legal

raptor_utf8_check ()

int                 raptor_utf8_check                   (unsigned char *string,
                                                         size_t length);

Check a string is UTF-8.

string :

UTF-8 string

length :

length of string

Returns :

Non 0 if the string is UTF-8
raptor-1.4.21/docs/html/tutorial.html0000644000175000017500000002367511331056234014467 00000000000000 Part I. Raptor Tutorial

Part I. Raptor Tutorial

This part describes how to use the Raptor APIs to turn syntaxes into RDF triples and RDF triples into syntaxes.

The next part contains the Raptor Reference Manual which comprehensively describes every class and function of the API.

For the latest information, see the Raptor Home Page and the main document overview in this document tree.

Table of Contents

Initialising and Finishing using the Library
Listing built-in functionality
Parsing syntaxes to RDF Triples
Introduction
Create the Parser object
Parser features
Set RDF triple callback handler
Set fatal error, error and warning handlers
Set the identifier creator handler
Set namespace declared handler
Set the parsing strictness
Provide syntax content to parse
Parse the content from a URI (raptor_parse_uri())
Parse the content of a URI using an existing WWW connection (raptor_parse_uri_with_connection())
Parse the content of a C FILE* (raptor_parse_file_stream())
Parse the content of a file URI (raptor_parse_file())
Parse chunks of syntax content provided by the application (raptor_start_parse() and raptor_parse_chunk())
Restrict parser network access
Filtering parser network requests with feature RAPTOR_FEATURE_NO_NET
Filtering parser network requests with raptor_www_set_uri_filter()
Filtering parser network requests with raptor_parser_set_uri_filter()
Setting timeout for parser network requests with feature RAPTOR_FEATURE_WWW_TIMEOUT
Querying parser static information
Querying parser run-time information
Aborting parsing
Destroy the parser
Parsing example code
Serializing RDF triples to a syntax
Introduction
Create the Serializer object
Serializer features
Declare namespaces
Set error and warning handlers
Provide a destination for the serialized syntax
Serialize to a filename (raptor_serialize_start_to_filename())
Serialize to a string (raptor_serialize_start_to_string())
Serialize to a FILE* file handle (raptor_serialize_start_to_file_handle())
Serialize to an raptor_iostream (raptor_serialize_start_to_iostream())
Serialize to an raptor_iostream and close iostream (raptor_serialize_start())
Get or construct RDF Triples
Send RDF Triples to serializer
Querying serializer run-time information
Destroy the serializer
Serializing example code
raptor-1.4.21/docs/html/serializer-json.html0000644000175000017500000000640311331056234015732 00000000000000 JSON serializers (name json and name json-triples)

JSON serializers (name json and name json-triples)

Two serializers that write JSON in either a resource-centric format with name json and in a triple-dump format with name json-triples. The resource-centric format is based on the Talis RDF/JSON design and the triple-dump format based on the SPARQL query results in JSON design.

raptor-1.4.21/docs/html/serializer-dot.html0000644000175000017500000000712611331056234015552 00000000000000 GraphViz dot serializer (name dot)

GraphViz dot serializer (name dot)

A serializer to the GraphViz DOT format.

This serializer has a set of associated serializer features that may be set to customise the output colors using raptor_serializer_set_feature() with the appropriate feature name and value as given below.

RAPTOR_FEATURE_RESOURCE_BORDER 	Border color of resource nodes
RAPTOR_FEATURE_LITERAL_BORDER 	Border color of literal nodes
RAPTOR_FEATURE_BNODE_BORDER 	Border color of blank nodes
RAPTOR_FEATURE_RESOURCE_FILL 	Fill color of resource nodes
RAPTOR_FEATURE_LITERAL_FILL 	Fill color of literal nodes
RAPTOR_FEATURE_BNODE_FILL 	Fill color of blank nodes
raptor-1.4.21/docs/html/raptor-section-memory.html0000644000175000017500000002026511331056234017073 00000000000000 Memory

Memory

Memory — Memory handling functions

Synopsis

void                raptor_free_memory                  (void *ptr);
void*               raptor_alloc_memory                 (size_t size);
void*               raptor_calloc_memory                (size_t nmemb,
                                                         size_t size);

Description

Wrappers around the free, malloc and calloc functions but called from inside the library. Required by some systems to handle multiple-HEAPs and pass memory to and from the library.

Details

raptor_free_memory ()

void                raptor_free_memory                  (void *ptr);

Free memory allocated inside raptor.

Some systems require memory allocated in a library to be deallocated in that library. This function allows memory allocated by raptor to be freed.

Examples include the result of the '_to_' methods that returns allocated memory such as raptor_uri_filename_to_uri_string, raptor_uri_filename_to_uri_string and raptor_uri_uri_string_to_filename_fragment

ptr :

memory pointer

raptor_alloc_memory ()

void*               raptor_alloc_memory                 (size_t size);

Allocate memory inside raptor.

Some systems require memory allocated in a library to be deallocated in that library. This function allows memory to be allocated inside the raptor shared library that can be freed inside raptor either internally or via raptor_free_memory.

Examples include using this in the raptor_parser_generate_id() handler code to create new strings that will be used internally as short identifiers and freed later on by the parsers.

size :

size of memory to allocate

Returns :

the address of the allocated memory or NULL on failure

raptor_calloc_memory ()

void*               raptor_calloc_memory                (size_t nmemb,
                                                         size_t size);

Allocate zeroed array of items inside raptor.

Some systems require memory allocated in a library to be deallocated in that library. This function allows memory to be allocated inside the raptor shared library that can be freed inside raptor either internally or via raptor_free_memory.

Examples include using this in the raptor_parser_generate_id() handler code to create new strings that will be used internally as short identifiers and freed later on by the parsers.

nmemb :

number of members

size :

size of item

Returns :

the address of the allocated memory or NULL on failure
raptor-1.4.21/docs/html/raptor-section-uri.html0000644000175000017500000017113711331056234016367 00000000000000 URI

URI

URI — URI class and relative URI computation

Synopsis

typedef             raptor_uri;
                    raptor_uri_handler;
raptor_uri*         raptor_new_uri                      (unsigned char *uri_string);
raptor_uri*         raptor_new_uri_from_uri_local_name  (raptor_uri *uri,
                                                         unsigned char *local_name);
raptor_uri*         raptor_new_uri_relative_to_base     (raptor_uri *base_uri,
                                                         unsigned char *uri_string);
raptor_uri*         raptor_new_uri_from_id              (raptor_uri *base_uri,
                                                         unsigned char *id);
raptor_uri*         raptor_new_uri_for_rdf_concept      (const char *name);
void                raptor_free_uri                     (raptor_uri *uri);
int                 raptor_uri_compare                  (raptor_uri *uri1,
                                                         raptor_uri *uri2);
int                 raptor_uri_equals                   (raptor_uri *uri1,
                                                         raptor_uri *uri2);
raptor_uri*         raptor_uri_copy                     (raptor_uri *uri);
unsigned char*      raptor_uri_as_string                (raptor_uri *uri);
unsigned char*      raptor_uri_as_counted_string        (raptor_uri *uri,
                                                         size_t *len_p);
raptor_uri*         raptor_new_uri_for_xmlbase          (raptor_uri *old_uri);
raptor_uri*         raptor_new_uri_for_retrieval        (raptor_uri *old_uri);
void                raptor_uri_resolve_uri_reference    (unsigned char *base_uri,
                                                         unsigned char *reference_uri,
                                                         unsigned char *buffer,
                                                         size_t length);
unsigned char *     raptor_uri_filename_to_uri_string   (const char *filename);
char *              raptor_uri_uri_string_to_filename   (unsigned char *uri_string);
char *              raptor_uri_uri_string_to_filename_fragment
                                                        (unsigned char *uri_string,
                                                         unsigned char **fragment_p);
int                 raptor_uri_uri_string_is_file_uri   (unsigned char *uri_string);
int                 raptor_uri_is_file_uri              (unsigned char *uri_string);
unsigned char*      raptor_uri_to_relative_counted_uri_string
                                                        (raptor_uri *base_uri,
                                                         raptor_uri *reference_uri,
                                                         size_t *length_p);
unsigned char*      raptor_uri_to_relative_uri_string   (raptor_uri *base_uri,
                                                         raptor_uri *reference_uri);
void                raptor_uri_print                    (const raptor_uri *uri,
                                                         FILE *stream);
unsigned char*      raptor_uri_to_counted_string        (raptor_uri *uri,
                                                         size_t *len_p);
unsigned char*      raptor_uri_to_string                (raptor_uri *uri);
void                raptor_uri_set_handler              (const raptor_uri_handler *handler,
                                                         void *context);
void                raptor_uri_get_handler              (const raptor_uri_handler **handler,
                                                         void **context);
int                 raptor_iostream_write_uri           (raptor_iostream *iostr,
                                                         raptor_uri *uri);

Description

A class for absolute URIs used inside raptor and relative URI computation utility functions used inside the main Redland librdf_uri class. Only absolute URIs are provided, with no current access to internals of URIs such as URI scheme, path, authority.

Details

raptor_uri

raptor_uri* raptor_uri;

Raptor URI Class.


raptor_uri_handler

typedef struct {
  /* constructors - URI Interface V1 */
  raptor_new_uri_func                     new_uri;
  raptor_new_uri_from_uri_local_name_func new_uri_from_uri_local_name;
  raptor_new_uri_relative_to_base_func    new_uri_relative_to_base;
  raptor_new_uri_for_rdf_concept_func     new_uri_for_rdf_concept;
  /* destructor - URI Interface V1 */
  raptor_free_uri_func                    free_uri;
  /* methods - URI Interface V1 */
  raptor_uri_equals_func                  uri_equals;
  raptor_uri_copy_func                    uri_copy; /* well, copy constructor */
  raptor_uri_as_string_func               uri_as_string;
  raptor_uri_as_counted_string_func       uri_as_counted_string;
  int initialised;
  /* methods - URI Interface V2 */
  raptor_uri_compare_func                 uri_compare;
} raptor_uri_handler;

URI implementation handler structure.

raptor_new_uri_func new_uri;

function for raptor_new_uri()

raptor_new_uri_from_uri_local_name_func new_uri_from_uri_local_name;

function for raptor_new_uri_from_uri_local_name()

raptor_new_uri_relative_to_base_func new_uri_relative_to_base;

function for raptor_new_uri_relative_to_base()

raptor_new_uri_for_rdf_concept_func new_uri_for_rdf_concept;

function for raptor_new_uri_for_rdf_concept()

raptor_free_uri_func free_uri;

function for raptor_free_uri()

raptor_uri_equals_func uri_equals;

function for raptor_uri_equals()

raptor_uri_copy_func uri_copy;

function for raptor_uri_copy()

raptor_uri_as_string_func uri_as_string;

function for raptor_uri_as_string()

raptor_uri_as_counted_string_func uri_as_counted_string;

function for raptor_uri_as_counted_string()

int initialised;

API version - set to API version implemented: 1..2

raptor_uri_compare_func uri_compare;

function for raptor_uri_compare()

raptor_new_uri ()

raptor_uri*         raptor_new_uri                      (unsigned char *uri_string);

Constructor - create a raptor URI from a UTF-8 encoded Unicode string.

raptor_init() MUST have been called before calling this function. Use raptor_new_uri_v2() if using raptor_world APIs.

uri_string :

URI string.

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_from_uri_local_name ()

raptor_uri*         raptor_new_uri_from_uri_local_name  (raptor_uri *uri,
                                                         unsigned char *local_name);

Constructor - create a raptor URI from an existing URI and a local name.

Creates a new URI from the concatenation of the local_name to the uri. This is NOT relative URI resolution, which is done by the raptor_new_uri_relative_to_base() constructor.

raptor_init() MUST have been called before calling this function. Use raptor_new_uri_from_uri_local_name_v2() if using raptor_world APIs.

uri :

existing raptor_uri

local_name :

local name

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_relative_to_base ()

raptor_uri*         raptor_new_uri_relative_to_base     (raptor_uri *base_uri,
                                                         unsigned char *uri_string);

Constructor - create a raptor URI from a base URI and a relative URI string.

raptor_init() MUST have been called before calling this function. Use raptor_new_uri_relative_to_base_v2() if using raptor_world APIs.

base_uri :

existing base URI

uri_string :

relative URI string

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_from_id ()

raptor_uri*         raptor_new_uri_from_id              (raptor_uri *base_uri,
                                                         unsigned char *id);

Constructor - create a new URI from a base URI and RDF ID.

This creates a URI equivalent to concatenating base_uri with ## and id.

raptor_init() MUST have been called before calling this function. Use raptor_new_uri_from_id_v2() if using raptor_world APIs.

base_uri :

existing base URI

id :

RDF ID

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_for_rdf_concept ()

raptor_uri*         raptor_new_uri_for_rdf_concept      (const char *name);

Constructor - create a raptor URI for the RDF namespace concept name.

Example: u=raptor_new_uri_for_rdf_concept("value") creates a new URI for the rdf:value term.

raptor_init() MUST have been called before calling this function. Use raptor_new_uri_for_rdf_concept_v2() if using raptor_world APIs.

name :

RDF namespace concept

Returns :

a new raptor_uri object or NULL on failure

raptor_free_uri ()

void                raptor_free_uri                     (raptor_uri *uri);

raptor_init() MUST have been called before calling this function. Use raptor_free_uri_v2() if using raptor_world APIs.

Destructor - destroy a raptor_uri object

uri :

URI to destroy

raptor_uri_compare ()

int                 raptor_uri_compare                  (raptor_uri *uri1,
                                                         raptor_uri *uri2);

Compare two URIs, ala strcmp.

A NULL URI is always less than (never equal to) a non-NULL URI.

raptor_init() MUST have been called before calling this function. Use raptor_uri_compare_v2() if using raptor_world APIs.

uri1 :

URI 1 (may be NULL)

uri2 :

URI 2 (may be NULL)

Returns :

-1 if uri1 < uri2, 0 if equal, 1 if uri1 > uri2

raptor_uri_equals ()

int                 raptor_uri_equals                   (raptor_uri *uri1,
                                                         raptor_uri *uri2);

Check if two URIs are equal.

A NULL URI is not equal to a non-NULL URI.

raptor_init() MUST have been called before calling this function. Use raptor_uri_equals_v2() if using raptor_world APIs.

uri1 :

URI 1 (may be NULL)

uri2 :

URI 2 (may be NULL)

Returns :

non-0 if the URIs are equal

raptor_uri_copy ()

raptor_uri*         raptor_uri_copy                     (raptor_uri *uri);

Constructor - get a copy of a URI.

raptor_init() MUST have been called before calling this function. Use raptor_uri_copy_v2() if using raptor_world APIs.

uri :

URI object

Returns :

a new raptor_uri object or NULL on failure

raptor_uri_as_string ()

unsigned char*      raptor_uri_as_string                (raptor_uri *uri);

Get a string representation of a URI.

Returns a shared pointer to a string representation of uri. This string is shared and must not be freed, otherwise see use the raptor_uri_to_string() or raptor_uri_to_counted_string() methods.

raptor_init() MUST have been called before calling this function. Use raptor_uri_as_string_v2() if using raptor_world APIs.

uri :

raptor_uri object

Returns :

shared string representation of URI

raptor_uri_as_counted_string ()

unsigned char*      raptor_uri_as_counted_string        (raptor_uri *uri,
                                                         size_t *len_p);

Get a string representation of a URI with count.

Returns a shared pointer to a string representation of uri along with the length of the string in len_p, if not NULL. This string is shared and must not be freed, otherwise see use the raptor_uri_to_string() or raptor_uri_to_counted_string() methods.

raptor_init() MUST have been called before calling this function. Use raptor_uri_as_counted_string_v2() if using raptor_world APIs.

uri :

URI object

len_p :

address of length variable or NULL

Returns :

shared string representation of URI

raptor_new_uri_for_xmlbase ()

raptor_uri*         raptor_new_uri_for_xmlbase          (raptor_uri *old_uri);

Constructor - create a URI suitable for use as an XML Base.

Takes an existing URI and ensures it has a path (default /) and has no fragment or query arguments - XML base does not use these.

raptor_init() MUST have been called before calling this function. Use raptor_new_uri_for_xmlbase_v2() if using raptor_world APIs.

old_uri :

URI to transform

Returns :

new raptor_uri object or NULL on failure.

raptor_new_uri_for_retrieval ()

raptor_uri*         raptor_new_uri_for_retrieval        (raptor_uri *old_uri);

Constructor - create a URI suitable for retrieval.

Takes an existing URI and ensures it has a path (default /) and has no fragment - URI retrieval does not use the fragment part.

raptor_init() MUST have been called before calling this function. Use raptor_new_uri_for_retrieval_v2() if using raptor_world APIs.

old_uri :

URI to transform

Returns :

new raptor_uri object or NULL on failure.

raptor_uri_resolve_uri_reference ()

void                raptor_uri_resolve_uri_reference    (unsigned char *base_uri,
                                                         unsigned char *reference_uri,
                                                         unsigned char *buffer,
                                                         size_t length);

Resolve a URI to a base URI.

base_uri :

Base URI string

reference_uri :

Reference URI string

buffer :

Destination buffer URI

length :

Length of destination buffer

raptor_uri_filename_to_uri_string ()

unsigned char *     raptor_uri_filename_to_uri_string   (const char *filename);

Converts a filename to a file: URI.

Handles the OS-specific escaping on turning filenames into URIs and returns a new buffer that the caller must free(). Turns a space in the filname into 20 and '%' into 25.

filename :

The filename to convert

Returns :

A newly allocated string with the URI or NULL on failure

raptor_uri_uri_string_to_filename ()

char *              raptor_uri_uri_string_to_filename   (unsigned char *uri_string);

Convert a file: URI to a filename.

Handles the OS-specific file: URIs to filename mappings. Returns a new buffer containing the filename that the caller must free.

uri_string :

The file: URI to convert

Returns :

A newly allocated string with the filename or NULL on failure

raptor_uri_uri_string_to_filename_fragment ()

char *              raptor_uri_uri_string_to_filename_fragment
                                                        (unsigned char *uri_string,
                                                         unsigned char **fragment_p);

Convert a file: URI to a filename and fragment.

Handles the OS-specific file: URIs to filename mappings. Returns a new buffer containing the filename that the caller must free.

If fragment_p is given, a new string containing the URI fragment is returned, or NULL if none is present

uri_string :

The file: URI to convert

fragment_p :

Address of pointer to store any URI fragment or NULL

Returns :

A newly allocated string with the filename or NULL on failure

raptor_uri_uri_string_is_file_uri ()

int                 raptor_uri_uri_string_is_file_uri   (unsigned char *uri_string);

Check if a URI string is a file: URI.

uri_string :

The URI string to check

Returns :

Non zero if URI string is a file: URI

raptor_uri_is_file_uri ()

int                 raptor_uri_is_file_uri              (unsigned char *uri_string);

Warning

raptor_uri_is_file_uri is deprecated and should not be used in newly-written code.

Check if a URI string is a file: URI.

deprecated: use raptor_uri_uri_string_is_file_uri() instead

uri_string :

The URI string to check

Returns :

Non zero if URI string is a file: URI

raptor_uri_to_relative_counted_uri_string ()

unsigned char*      raptor_uri_to_relative_counted_uri_string
                                                        (raptor_uri *base_uri,
                                                         raptor_uri *reference_uri,
                                                         size_t *length_p);

Get the counted relative URI string of a URI against a base URI.

raptor_init() MUST have been called before calling this function. Use raptor_uri_to_relative_counted_uri_string_v2() if using raptor_world APIs.

base_uri :

The base absolute URI to resolve against (or NULL)

reference_uri :

The reference absolute URI to use

length_p :

Location to store the length of the relative URI string or NULL

Returns :

A newly allocated relative URI string or NULL on failure

raptor_uri_to_relative_uri_string ()

unsigned char*      raptor_uri_to_relative_uri_string   (raptor_uri *base_uri,
                                                         raptor_uri *reference_uri);

Get the relative URI string of a URI against a base URI.

raptor_init() MUST have been called before calling this function. Use raptor_uri_to_relative_uri_string_v2() if using raptor_world APIs.

base_uri :

The base absolute URI to resolve against

reference_uri :

The reference absolute URI to use

Returns :

A newly allocated relative URI string or NULL on failure

raptor_uri_print ()

void                raptor_uri_print                    (const raptor_uri *uri,
                                                         FILE *stream);

Print a URI to a file handle.

raptor_init() MUST have been called before calling this function. Use raptor_uri_print_v2() if using raptor_world APIs.

uri :

URI to print

stream :

The file handle to print to

raptor_uri_to_counted_string ()

unsigned char*      raptor_uri_to_counted_string        (raptor_uri *uri,
                                                         size_t *len_p);

Get a new counted string for a URI.

If len_p is not NULL, the length of the string is stored in it.

The memory allocated must be freed by the caller and raptor_free_memory() should be used for best portability.

raptor_init() MUST have been called before calling this function. Use raptor_uri_to_counted_string_v2() if using raptor_world APIs.

uri :

raptor_uri object

len_p :

Pointer to length (or NULL)

Returns :

new string or NULL on failure

raptor_uri_to_string ()

unsigned char*      raptor_uri_to_string                (raptor_uri *uri);

Get a new string for a URI.

The memory allocated must be freed by the caller and raptor_free_memory() should be used for best portability.

raptor_init() MUST have been called before calling this function. Use raptor_uri_to_string_v2() if using raptor_world APIs.

uri :

raptor_uri object

Returns :

new string or NULL on failure

raptor_uri_set_handler ()

void                raptor_uri_set_handler              (const raptor_uri_handler *handler,
                                                         void *context);

Change the URI class implementation to the functions provided by the

The URI interface in handler->initialised should be either 1 or 2 (if raptor_uri_compare_func is implemented).

raptor_init() MUST have been called before calling this function. Use raptor_uri_set_handler_v2() if using raptor_world APIs.

handler :

URI handler structure

context :

URI handler context

raptor_uri_get_handler ()

void                raptor_uri_get_handler              (const raptor_uri_handler **handler,
                                                         void **context);

Return the current raptor URI class implementation handler and context

raptor_init() MUST have been called before calling this function. Use raptor_uri_get_handler_v2() if using raptor_world APIs.

handler :

URI handler to return

context :

URI context to return

raptor_iostream_write_uri ()

int                 raptor_iostream_write_uri           (raptor_iostream *iostr,
                                                         raptor_uri *uri);

Write a raptor URI to the iostream.

raptor_init() MUST have been called before calling this function. Use raptor_iostream_write_uri_v2() if using raptor_world APIs.

iostr :

raptor iostream

uri :

URI

Returns :

non-0 on failure
raptor-1.4.21/docs/html/parser-grddl.html0000644000175000017500000001402311331056234015175 00000000000000 GRDDL parser (name grddl)

GRDDL parser (name grddl)

A parser for the Gleaning Resource Descriptions from Dialects of Languages (GRDDL), W3C Proposed Recommendation of 2007-07-16 which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML or XML content into RDF/XML or other RDF syntax which can then be parsed.

The GRDDL parser is rather complex and different from the other parsers in that it retrieves URIs, reads HTML documents (possibly with errors), transforms the documents with XSLT and turns the result into a single graph. The default configuration of the GRDDL parser also reads microformats (hcard, hcalendar) and follows <link> tags that point to RDF/XML. Parts of the GRDDL process can be altered by configuration, which are describe below.

The URIs that are processed during GRDDL operations can be checked and skipped if required using a handler set with the raptor_parser_set_uri_filter() function. If the handler returns non-0, the URI is rejected. This uses raptor_www_set_uri_filter() internally.

If the value of feature RAPTOR_FEATURE_WWW_TIMEOUT if set to a number >0, it is used as the timeout in seconds for retrieving of URIs during GRDDL processing. This uses raptor_www_set_connection_timeout() internally.

The hardcoded support for hcard and hcalendar microformats can be disabled by setting parser feature RAPTOR_FEATURE_MICROFORMATS to 0 or using raptor_set_parser_strict() with a value of 1.

The GRDDL parser by default will try an XML parser on the content followed by a lax HTML parser. This can be disabled by setting parser feature RAPTOR_FEATURE_HTML_TAG_SOUP to 0 or using raptor_set_parser_strict() with a value of 1.

The GRDDL parser by default will try to look for an HTML <link> tag that points to RDF/XML. This can be disabled by setting parser feature RAPTOR_FEATURE_HTML_LINK to 0 or using raptor_set_parser_strict() with a value of 1.

raptor-1.4.21/docs/html/raptor.devhelp20000644000175000017500000017277311331056234014704 00000000000000 raptor-1.4.21/docs/html/up.png0000644000175000017500000000062611331056234013057 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2.E#IDATx=J@Fo] !+2[Z<@/9|t$D9nnBjBRIsI:H8UPN1fcsN95M㧖ɵ 束1~pEe$I 7nrDf!;`'ykI䲤sI_]y^^I>O>?YBIENDB`raptor-1.4.21/docs/html/raptor-section-xml.html0000644000175000017500000025000611331056234016361 00000000000000 XML

XML

XML — XML and XML Writer

Synopsis

typedef             raptor_xml_element;
raptor_xml_element* raptor_new_xml_element              (raptor_qname *name,
                                                         unsigned char *xml_language,
                                                         raptor_uri *xml_base);
raptor_xml_element* raptor_new_xml_element_from_namespace_local_name
                                                        (raptor_namespace *ns,
                                                         unsigned char *name,
                                                         unsigned char *xml_language,
                                                         raptor_uri *xml_base);
void                raptor_free_xml_element             (raptor_xml_element *element);
raptor_qname*       raptor_xml_element_get_name         (raptor_xml_element *xml_element);
raptor_qname**      raptor_xml_element_get_attributes   (raptor_xml_element *xml_element);
int                 raptor_xml_element_get_attributes_count
                                                        (raptor_xml_element *xml_element);
void                raptor_xml_element_set_attributes   (raptor_xml_element *xml_element,
                                                         raptor_qname **attributes,
                                                         int count);
int                 raptor_xml_element_declare_namespace
                                                        (raptor_xml_element *xml_element,
                                                         raptor_namespace *nspace);
int                 raptor_xml_element_is_empty         (raptor_xml_element *xml_element);
const unsigned char* raptor_xml_element_get_language    (raptor_xml_element *xml_element);
raptor_xml_writer*  raptor_new_xml_writer               (raptor_namespace_stack *nstack,
                                                         const raptor_uri_handler *uri_handler,
                                                         void *uri_context,
                                                         raptor_iostream *iostr,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data,
                                                         int canonicalize);
void                raptor_free_xml_writer              (raptor_xml_writer *xml_writer);
void                raptor_xml_writer_empty_element     (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);
void                raptor_xml_writer_start_element     (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);
void                raptor_xml_writer_end_element       (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);
void                raptor_xml_writer_cdata             (raptor_xml_writer *xml_writer,
                                                         unsigned char *s);
void                raptor_xml_writer_cdata_counted     (raptor_xml_writer *xml_writer,
                                                         unsigned char *s,
                                                         unsigned int len);
void                raptor_xml_writer_raw               (raptor_xml_writer *xml_writer,
                                                         unsigned char *s);
void                raptor_xml_writer_raw_counted       (raptor_xml_writer *xml_writer,
                                                         unsigned char *s,
                                                         unsigned int len);
void                raptor_xml_writer_comment           (raptor_xml_writer *xml_writer,
                                                         unsigned char *s);
void                raptor_xml_writer_comment_counted   (raptor_xml_writer *xml_writer,
                                                         unsigned char *s,
                                                         unsigned int len);
void                raptor_xml_writer_flush             (raptor_xml_writer *xml_writer);
void                raptor_xml_writer_newline           (raptor_xml_writer *xml_writer);
int                 raptor_xml_writer_features_enumerate
                                                        (const raptor_feature feature,
                                                         const char **name,
                                                         raptor_uri **uri,
                                                         const char **label);
int                 raptor_xml_writer_get_depth         (raptor_xml_writer *xml_writer);
int                 raptor_xml_writer_set_feature       (raptor_xml_writer *xml_writer,
                                                         raptor_feature feature,
                                                         int value);
int                 raptor_xml_writer_set_feature_string
                                                        (raptor_xml_writer *xml_writer,
                                                         raptor_feature feature,
                                                         unsigned char *value);
int                 raptor_xml_writer_get_feature       (raptor_xml_writer *xml_writer,
                                                         raptor_feature feature);
const unsigned char * raptor_xml_writer_get_feature_string
                                                        (raptor_xml_writer *xml_writer,
                                                         raptor_feature feature);
int                 raptor_iostream_write_xml_element   (raptor_iostream *iostr,
                                                         raptor_xml_element *element,
                                                         raptor_namespace_stack *nstack,
                                                         int is_empty,
                                                         int is_end,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data,
                                                         int depth);
typedef             raptor_xml_writer;
int                 raptor_xml_any_escape_string        (unsigned char *string,
                                                         size_t len,
                                                         unsigned char *buffer,
                                                         size_t length,
                                                         char quote,
                                                         int xml_version,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);
int                 raptor_xml_escape_string            (unsigned char *string,
                                                         size_t len,
                                                         unsigned char *buffer,
                                                         size_t length,
                                                         char quote,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);
int                 raptor_iostream_write_xml_any_escaped_string
                                                        (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len,
                                                         char quote,
                                                         int xml_version,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);
int                 raptor_iostream_write_xml_escaped_string
                                                        (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len,
                                                         char quote,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);
int                 raptor_xml_name_check               (unsigned char *string,
                                                         size_t length,
                                                         int xml_version);

Description

XML elements with optional attributes and an XML Writer class that can format raptor_xml_element into output forms, with optional "pretty printing" features such as indenting and collapsing empty elements.

Also includes a utility function raptor_xml_name_check for checking a name is legal in some XML version.

Details

raptor_xml_element

raptor_xml_element* raptor_xml_element;

Raptor XML Element class


raptor_new_xml_element ()

raptor_xml_element* raptor_new_xml_element              (raptor_qname *name,
                                                         unsigned char *xml_language,
                                                         raptor_uri *xml_base);

Constructor - create a new XML element from a QName

name :

The XML element name

xml_language :

the in-scope XML language (or NULL)

xml_base :

the in-scope XML base URI (or NULL)

Returns :

a new raptor_xml_element or NULL on failure

raptor_new_xml_element_from_namespace_local_name ()

raptor_xml_element* raptor_new_xml_element_from_namespace_local_name
                                                        (raptor_namespace *ns,
                                                         unsigned char *name,
                                                         unsigned char *xml_language,
                                                         raptor_uri *xml_base);

Constructor - create a new XML element from an XML namespace and a local name

Added in 1.4.16.

ns :

namespace

name :

the XML element local name

xml_language :

the in-scope XML language (or NULL)

xml_base :

base uri (or NULL)

Returns :

a new raptor_xml_element or NULL on failure

raptor_free_xml_element ()

void                raptor_free_xml_element             (raptor_xml_element *element);

Destructor - destroy a raptor_xml_element object.

element :

XML Element

raptor_xml_element_get_name ()

raptor_qname*       raptor_xml_element_get_name         (raptor_xml_element *xml_element);

Get the XML Name of an XML element

xml_element :

XML Element

Returns :

The Name.

raptor_xml_element_get_attributes ()

raptor_qname**      raptor_xml_element_get_attributes   (raptor_xml_element *xml_element);

Get the array of attributes on the XML element.

Use raptor_xml_element_get_attributes_count() to get the count of the array size.

xml_element :

XML Element

Returns :

the array of qnames or NULL if none are present.

raptor_xml_element_get_attributes_count ()

int                 raptor_xml_element_get_attributes_count
                                                        (raptor_xml_element *xml_element);

Get the number of attributes on the XML element.

xml_element :

XML Element

Returns :

Integer number of attributes - 0 or more.

raptor_xml_element_set_attributes ()

void                raptor_xml_element_set_attributes   (raptor_xml_element *xml_element,
                                                         raptor_qname **attributes,
                                                         int count);

Set the attributes on an XML element.

The attributes array becomes owned by the element after this function.

xml_element :

XML Element

attributes :

Array of XML Qname attributes with values

count :

Length of array

raptor_xml_element_declare_namespace ()

int                 raptor_xml_element_declare_namespace
                                                        (raptor_xml_element *xml_element,
                                                         raptor_namespace *nspace);

Declare a namespace on the XML Element.

xml_element :

XML Element

nspace :

raptor_namespace to declare

Returns :

non-0 if namespace cannot be declared

raptor_xml_element_is_empty ()

int                 raptor_xml_element_is_empty         (raptor_xml_element *xml_element);

Check if an XML Element is empty.

xml_element :

XML Element

Returns :

non-0 if the element is empty.

raptor_xml_element_get_language ()

const unsigned char* raptor_xml_element_get_language    (raptor_xml_element *xml_element);

Get the XML language of the element.

xml_element :

XML Element

Returns :

XML language or NULL if none in scope

raptor_new_xml_writer ()

raptor_xml_writer*  raptor_new_xml_writer               (raptor_namespace_stack *nstack,
                                                         const raptor_uri_handler *uri_handler,
                                                         void *uri_context,
                                                         raptor_iostream *iostr,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data,
                                                         int canonicalize);

Constructor - Create a new XML Writer writing XML to a raptor_iostream

uri_handler and uri_context parameters are ignored but are retained in the API for backwards compatibility. Internally the same uri handler as returned by raptor_uri_get_handler() will be used.

raptor_init() MUST have been called before calling this function. Use raptor_new_xml_writer_v2() if using raptor_world APIs.

nstack :

Namespace stack for the writer to start with (or NULL)

uri_handler :

URI handler function (ignored)

uri_context :

URI handler context data (ignored)

iostr :

I/O stream to write to

error_handler :

error handler function

error_data :

error handler data

canonicalize :

unused

Returns :

a new raptor_xml_writer object or NULL on failure

raptor_free_xml_writer ()

void                raptor_free_xml_writer              (raptor_xml_writer *xml_writer);

Destructor - Free XML Writer

xml_writer :

XML writer object

raptor_xml_writer_empty_element ()

void                raptor_xml_writer_empty_element     (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);

Write an empty XML element to the XML writer.

Closes any previous empty element if XML writer feature AUTO_EMPTY is enabled.

xml_writer :

XML writer object

element :

XML element object

raptor_xml_writer_start_element ()

void                raptor_xml_writer_start_element     (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);

Write a start XML element to the XML writer.

Closes any previous empty element if XML writer feature AUTO_EMPTY is enabled.

Indents the start element if XML writer feature AUTO_INDENT is enabled.

xml_writer :

XML writer object

element :

XML element object

raptor_xml_writer_end_element ()

void                raptor_xml_writer_end_element       (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);

Write an end XML element to the XML writer.

Indents the end element if XML writer feature AUTO_INDENT is enabled.

xml_writer :

XML writer object

element :

XML element object

raptor_xml_writer_cdata ()

void                raptor_xml_writer_cdata             (raptor_xml_writer *xml_writer,
                                                         unsigned char *s);

Write CDATA XML-escaped to the XML writer.

Closes any previous empty element if XML writer feature AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

string to XML escape and write

raptor_xml_writer_cdata_counted ()

void                raptor_xml_writer_cdata_counted     (raptor_xml_writer *xml_writer,
                                                         unsigned char *s,
                                                         unsigned int len);

Write counted CDATA XML-escaped to the XML writer.

Closes any previous empty element if XML writer feature AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

string to XML escape and write

len :

length of string

raptor_xml_writer_raw ()

void                raptor_xml_writer_raw               (raptor_xml_writer *xml_writer,
                                                         unsigned char *s);

Write a string raw to the XML writer.

Closes any previous empty element if XML writer feature AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

string to write

raptor_xml_writer_raw_counted ()

void                raptor_xml_writer_raw_counted       (raptor_xml_writer *xml_writer,
                                                         unsigned char *s,
                                                         unsigned int len);

Write a counted string raw to the XML writer.

Closes any previous empty element if XML writer feature AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

string to write

len :

length of string

raptor_xml_writer_comment ()

void                raptor_xml_writer_comment           (raptor_xml_writer *xml_writer,
                                                         unsigned char *s);

Write an XML comment to the XML writer.

Closes any previous empty element if XML writer feature AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

comment string to write

raptor_xml_writer_comment_counted ()

void                raptor_xml_writer_comment_counted   (raptor_xml_writer *xml_writer,
                                                         unsigned char *s,
                                                         unsigned int len);

Write a counted XML comment to the XML writer.

Closes any previous empty element if XML writer feature AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

comment string to write

len :

length of string

raptor_xml_writer_flush ()

void                raptor_xml_writer_flush             (raptor_xml_writer *xml_writer);

Finish the XML writer.

xml_writer :

XML writer object

raptor_xml_writer_newline ()

void                raptor_xml_writer_newline           (raptor_xml_writer *xml_writer);

Write a newline to the XML writer.

Indents the next line if XML writer feature AUTO_INDENT is enabled.

xml_writer :

XML writer object

raptor_xml_writer_features_enumerate ()

int                 raptor_xml_writer_features_enumerate
                                                        (const raptor_feature feature,
                                                         const char **name,
                                                         raptor_uri **uri,
                                                         const char **label);

Get list of xml_writer features.

If uri is not NULL, a pointer to a new raptor_uri is returned that must be freed by the caller with raptor_free_uri().

raptor_init() MUST have been called before calling this function. Use raptor_xml_writer_features_enumerate_v2() if using raptor_world APIs.

feature :

feature enumeration (0+)

name :

pointer to store feature short name (or NULL)

uri :

pointer to store feature URI (or NULL)

label :

pointer to feature label (or NULL)

Returns :

0 on success, <0 on failure, >0 if feature is unknown

raptor_xml_writer_get_depth ()

int                 raptor_xml_writer_get_depth         (raptor_xml_writer *xml_writer);

Get the current XML Writer element depth

xml_writer :

raptor_xml_writer xml writer object

Returns :

element stack depth

raptor_xml_writer_set_feature ()

int                 raptor_xml_writer_set_feature       (raptor_xml_writer *xml_writer,
                                                         raptor_feature feature,
                                                         int value);

Set xml_writer features with integer values.

The allowed features are available via raptor_features_enumerate().

xml_writer :

raptor_xml_writer xml_writer object

feature :

feature to set from enumerated raptor_feature values

value :

integer feature value (0 or larger)

Returns :

non 0 on failure or if the feature is unknown

raptor_xml_writer_set_feature_string ()

int                 raptor_xml_writer_set_feature_string
                                                        (raptor_xml_writer *xml_writer,
                                                         raptor_feature feature,
                                                         unsigned char *value);

Set xml_writer features with string values.

The allowed features are available via raptor_xml_writer_features_enumerate(). If the feature type is integer, the value is interpreted as an integer.

xml_writer :

raptor_xml_writer xml_writer object

feature :

feature to set from enumerated raptor_feature values

value :

feature value

Returns :

non 0 on failure or if the feature is unknown

raptor_xml_writer_get_feature ()

int                 raptor_xml_writer_get_feature       (raptor_xml_writer *xml_writer,
                                                         raptor_feature feature);

Get various xml_writer features.

The allowed features are available via raptor_features_enumerate().

Note: no feature value is negative

xml_writer :

raptor_xml_writer xml writer object

feature :

feature to get value

Returns :

feature value or < 0 for an illegal feature

raptor_xml_writer_get_feature_string ()

const unsigned char * raptor_xml_writer_get_feature_string
                                                        (raptor_xml_writer *xml_writer,
                                                         raptor_feature feature);

Get xml_writer features with string values.

The allowed features are available via raptor_features_enumerate().

xml_writer :

raptor_xml_writer xml writer object

feature :

feature to get value

Returns :

feature value or NULL for an illegal feature or no value

raptor_iostream_write_xml_element ()

int                 raptor_iostream_write_xml_element   (raptor_iostream *iostr,
                                                         raptor_xml_element *element,
                                                         raptor_namespace_stack *nstack,
                                                         int is_empty,
                                                         int is_end,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data,
                                                         int depth);

Write a formatted XML element to a raptor_iostream

iostr :

iostream object

element :

XML element to format

nstack :

Namespace stack context to use in formatting

is_empty :

non-0 if element is empty

is_end :

non-0 if this is an end element (else is a start element)

error_handler :

error handler function

error_data :

error handler function data

depth :

XML element depth

Returns :

non-0 on failure

raptor_xml_writer

raptor_xml_writer* raptor_xml_writer;

Raptor XML Writer class


raptor_xml_any_escape_string ()

int                 raptor_xml_any_escape_string        (unsigned char *string,
                                                         size_t len,
                                                         unsigned char *buffer,
                                                         size_t length,
                                                         char quote,
                                                         int xml_version,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);

Return an XML-escaped version a string.

Follows Canonical XML rules on Text Nodes and Attribute Nodes http://www.w3.org/TR/xml-c14nProcessingModel

Both: Replaces & and < with &amp; and &lt; respectively, preserving other characters.

Text Nodes: > is turned into &gt; #xD is turned into &#xD;

Attribute Nodes: > is generated not &gt. #x9, #xA and #xD are turned into &#x9;, &#xA; and &#xD; entities.

If quote is given it can be either of '\'' or '\"' which will be turned into &apos; or &quot; respectively. ASCII NUL ('\0') or any other character will not be escaped.

If buffer is NULL, no work is done but the size of buffer required is returned. The output in buffer remains in UTF-8.

If the input string is empty, a single NUL will be written to the buffer.

string :

string to XML escape (UTF-8)

len :

length of string

buffer :

the buffer to use for new string (UTF-8)

length :

buffer size

quote :

optional quote character to escape for attribute content, or 0

xml_version :

XML 1.0 (10) or XML 1.1 (11)

error_handler :

error handler function

error_data :

error handler user data

Returns :

the number of bytes required / used or <0 on failure.

raptor_xml_escape_string ()

int                 raptor_xml_escape_string            (unsigned char *string,
                                                         size_t len,
                                                         unsigned char *buffer,
                                                         size_t length,
                                                         char quote,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);

Return an XML 1.0-escaped version a string.

See raptor_xml_any_escape_string() for the conditions on parameters.

string :

string to XML 1.0 escape (UTF-8)

len :

length of string

buffer :

the buffer to use for new string (UTF-8)

length :

buffer size

quote :

optional quote character to escape for attribute content, or 0

error_handler :

error handler function

error_data :

error handler user data

Returns :

the number of bytes required / used or <0 on failure.

raptor_iostream_write_xml_any_escaped_string ()

int                 raptor_iostream_write_xml_any_escaped_string
                                                        (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len,
                                                         char quote,
                                                         int xml_version,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);

Write an XML-escaped version of a string to an iostream.

See raptor_xml_escape_string() for the escapes performed and the conditions on quote and string. XML 1.1 allows additional characters in XML such as U+0001 to U+001F inclusive.

iostr :

the raptor_iostream to write to

string :

string to XML escape (UTF-8)

len :

length of string

quote :

optional quote character to escape for attribute content, or 0

xml_version :

XML version - 10 (XML 1.0) or 11 (XML 1.1)

error_handler :

error handler function

error_data :

error handler data

Returns :

non 0 on failure

raptor_iostream_write_xml_escaped_string ()

int                 raptor_iostream_write_xml_escaped_string
                                                        (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len,
                                                         char quote,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);

Write an XML 1.0-escaped version of a string to an iostream.

See raptor_iostream_write_xml_any_escaped_string() for the escapes performed and the conditions on quote and string.

iostr :

the raptor_iostream to write to

string :

string to XML 1.0 escape (UTF-8)

len :

length of string

quote :

optional quote character to escape for attribute content, or 0

error_handler :

error handler function

error_data :

error handler data

Returns :

non 0 on failure

raptor_xml_name_check ()

int                 raptor_xml_name_check               (unsigned char *string,
                                                         size_t length,
                                                         int xml_version);

Check a string is a legal XML name (and legal UTF8).

xml_version is either 10 (for XML 1.0) or 11 for (XML 1.1). Any other version fails.

string :

UTF-8 name string

length :

length of string

xml_version :

XML version

Returns :

Non 0 if the string is a legal XML name
raptor-1.4.21/docs/html/raptor-section-www.html0000644000175000017500000013450711331056234016414 00000000000000 WWW

WWW

WWW — Retrieval of URI content from the web.

Synopsis

typedef             raptor_www;
void                raptor_www_init                     (void);
void                raptor_www_finish                   (void);
void                (*raptor_www_write_bytes_handler)   (raptor_www *www,
                                                         void *userdata,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);
void                (*raptor_www_content_type_handler)  (raptor_www *www,
                                                         void *userdata,
                                                         const char *content_type);
void                raptor_www_no_www_library_init_finish
                                                        (void);
raptor_www *        raptor_www_new                      (void);
raptor_www *        raptor_www_new_with_connection      (void *connection);
void                raptor_www_free                     (raptor_www *www);
void                raptor_www_set_user_agent           (raptor_www *www,
                                                         const char *user_agent);
void                raptor_www_set_proxy                (raptor_www *www,
                                                         const char *proxy);
void                raptor_www_set_http_accept          (raptor_www *www,
                                                         const char *value);
int                 raptor_www_set_http_cache_control   (raptor_www *www,
                                                         const char *cache_control);
void                raptor_www_set_write_bytes_handler  (raptor_www *www,
                                                         raptor_www_write_bytes_handler handler,
                                                         void *user_data);
void                raptor_www_set_connection_timeout   (raptor_www *www,
                                                         int timeout);
void                raptor_www_set_content_type_handler (raptor_www *www,
                                                         raptor_www_content_type_handler handler,
                                                         void *user_data);
void                raptor_www_set_error_handler        (raptor_www *www,
                                                         raptor_message_handler error_handler,
                                                         void *error_data);
int                 (*raptor_uri_filter_func)           (void *user_data,
                                                         raptor_uri *uri);
void                raptor_www_set_uri_filter           (raptor_www *www,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);
void                (*raptor_www_final_uri_handler)     (raptor_www *www,
                                                         void *userdata,
                                                         raptor_uri *final_uri);
raptor_uri*         raptor_www_get_final_uri            (raptor_www *www);
void                raptor_www_set_final_uri_handler    (raptor_www *www,
                                                         raptor_www_final_uri_handler handler,
                                                         void *user_data);
int                 raptor_www_fetch                    (raptor_www *www,
                                                         raptor_uri *uri);
int                 raptor_www_fetch_to_string          (raptor_www *www,
                                                         raptor_uri *uri,
                                                         void **string_p,
                                                         size_t *length_p,
                                                         void* (malloc_handlersize_t size) ());
void*               raptor_www_get_connection           (raptor_www *www);
void                raptor_www_abort                    (raptor_www *www,
                                                         const char *reason);

Description

Provides a wrapper to the resolution of URIs to give content using an underlying WWW-retrieval library. The content is delivered by callbacks and includes returning content type for handling content-negotation by the caller as well as chunks of byte content.

Details

raptor_www

raptor_www* raptor_www;

Raptor WWW class


raptor_www_init ()

void                raptor_www_init                     (void);

Initialise the WWW class.

Must be called before creating any raptor_www object.

See also: raptor_www_init_v2()


raptor_www_finish ()

void                raptor_www_finish                   (void);

Terminate the WWW class.

Must be called to clean any resources used by the WWW implementation.

See also: raptor_www_finish_v2()


raptor_www_write_bytes_handler ()

void                (*raptor_www_write_bytes_handler)   (raptor_www *www,
                                                         void *userdata,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);

Receiving bytes of data from WWW retrieval handler.

Set by raptor_www_set_write_bytes_handler().

www :

WWW object

userdata :

user data

ptr :

data pointer

size :

size of individual item

nmemb :

number of items

raptor_www_content_type_handler ()

void                (*raptor_www_content_type_handler)  (raptor_www *www,
                                                         void *userdata,
                                                         const char *content_type);

Receiving Content-Type: header from WWW retrieval handler.

Set by raptor_www_set_content_type_handler().

www :

WWW object

userdata :

user data

content_type :

content type seen

raptor_www_no_www_library_init_finish ()

void                raptor_www_no_www_library_init_finish
                                                        (void);

Do not initialise or finish the lower level WWW library.

If this is called then the raptor_www library will neither initialise or terminate the lower level WWW library. Usually in raptor_init either curl_global_init (for libcurl) are called and in raptor_finish curl_global_cleanup is called.

This allows the application finer control over these libraries such as setting other global options or potentially calling and terminating raptor several times. It does mean that applications which use this call must do their own extra work in order to allocate and free all resources to the system.

This function must be called before raptor_init.

See also: raptor_www_no_www_library_init_finish_v2()


raptor_www_new ()

raptor_www *        raptor_www_new                      (void);

Constructor - create a new raptor_www object.

raptor_init() MUST have been called before calling this function. Use raptor_www_new_v2() if using raptor_world APIs.

Returns :

a new raptor_www or NULL on failure.

raptor_www_new_with_connection ()

raptor_www *        raptor_www_new_with_connection      (void *connection);

Constructor - create a new raptor_www object over an existing WWW connection.

At present this only works with a libcurl CURL handle object when raptor is compiled with libcurl suppport. Otherwise the connection is ignored. This allows such things as setting up special flags on the curl handle before passing into the constructor.

raptor_init() MUST have been called before calling this function. Use raptor_www_new_with_connection_v2() if using raptor_world APIs.

connection :

external WWW connection object.

Returns :

a new raptor_www object or NULL on failure.

raptor_www_free ()

void                raptor_www_free                     (raptor_www *www);

Destructor - destroy a raptor_www object.

www :

WWW object.

raptor_www_set_user_agent ()

void                raptor_www_set_user_agent           (raptor_www *www,
                                                         const char *user_agent);

Set the user agent value, for HTTP requests typically.

www :

WWW object

user_agent :

User-Agent string

raptor_www_set_proxy ()

void                raptor_www_set_proxy                (raptor_www *www,
                                                         const char *proxy);

Set the proxy for the WWW object.

The proxy usually a string of the form http://server.domain:port.

www :

WWW object

proxy :

proxy string.

raptor_www_set_http_accept ()

void                raptor_www_set_http_accept          (raptor_www *www,
                                                         const char *value);

Set HTTP Accept header.

www :

raptor_www class

value :

Accept: header value or NULL to have an empty one.

raptor_www_set_http_cache_control ()

int                 raptor_www_set_http_cache_control   (raptor_www *www,
                                                         const char *cache_control);

Set HTTP Cache-Control:header (default none)

The cache_control value can be a string to set it, "" to send a blank header or NULL to not set the header at all.

www :

WWW object

cache_control :

Cache-Control header value (or NULL to disable)

Returns :

non-0 on failure

raptor_www_set_write_bytes_handler ()

void                raptor_www_set_write_bytes_handler  (raptor_www *www,
                                                         raptor_www_write_bytes_handler handler,
                                                         void *user_data);

Set the handler to receive bytes written by the raptor_www implementation.

www :

WWW object

handler :

bytes handler function

user_data :

bytes handler data

raptor_www_set_connection_timeout ()

void                raptor_www_set_connection_timeout   (raptor_www *www,
                                                         int timeout);

Set WWW connection timeout

www :

WWW object

timeout :

Timeout in seconds

raptor_www_set_content_type_handler ()

void                raptor_www_set_content_type_handler (raptor_www *www,
                                                         raptor_www_content_type_handler handler,
                                                         void *user_data);

Set the handler to receive the HTTP Content-Type header value.

This is called if or when the value is discovered during retrieval by the raptor_www implementation. Not all implementations provide access to this.

www :

WWW object

handler :

content type handler function

user_data :

content type handler data

raptor_www_set_error_handler ()

void                raptor_www_set_error_handler        (raptor_www *www,
                                                         raptor_message_handler error_handler,
                                                         void *error_data);

Set the error handler routine for the raptor_www class.

This takes the same arguments as the raptor_parser_set_error() and raptor_parser_set_warning_handler() methods.

www :

WWW object

error_handler :

error handler function

error_data :

error handler data

raptor_uri_filter_func ()

int                 (*raptor_uri_filter_func)           (void *user_data,
                                                         raptor_uri *uri);

Callback function for raptor_www_set_uri_filter

user_data :

user data

uri :

raptor_uri URI to check

Returns :

non-0 to filter the URI

raptor_www_set_uri_filter ()

void                raptor_www_set_uri_filter           (raptor_www *www,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);

Set URI filter function for WWW retrieval.

www :

WWW object

filter :

URI filter function

user_data :

User data to pass to filter function

raptor_www_final_uri_handler ()

void                (*raptor_www_final_uri_handler)     (raptor_www *www,
                                                         void *userdata,
                                                         raptor_uri *final_uri);

Receiving the final resolved URI from a WWW retrieval

Set by raptor_www_set_final_uri_handler().

www :

WWW object

userdata :

user data

final_uri :

final URI seen

raptor_www_get_final_uri ()

raptor_uri*         raptor_www_get_final_uri            (raptor_www *www);

Get the WWW final resolved URI.

This returns the URI used after any protocol redirection.

www :

raptor_www object

Returns :

a new URI or NULL if not known.

raptor_www_set_final_uri_handler ()

void                raptor_www_set_final_uri_handler    (raptor_www *www,
                                                         raptor_www_final_uri_handler handler,
                                                         void *user_data);

Set the handler to receive the HTTP Content-Type header value.

This is called if or when the value is discovered during retrieval by the raptor_www implementation. Not all implementations provide access to this.

www :

WWW object

handler :

content type handler function

user_data :

content type handler data

raptor_www_fetch ()

int                 raptor_www_fetch                    (raptor_www *www,
                                                         raptor_uri *uri);

Start a WWW content retrieval for the given URI, returning data via the write_bytes handler.

www :

WWW object

uri :

URI to read from

Returns :

non-0 on failure.

raptor_www_fetch_to_string ()

int                 raptor_www_fetch_to_string          (raptor_www *www,
                                                         raptor_uri *uri,
                                                         void **string_p,
                                                         size_t *length_p,
                                                         void* (malloc_handlersize_t size) ());

Start a WWW content retrieval for the given URI, returning the data in a new string.

If malloc_handler is null, raptor will allocate it using it's own memory allocator. *string_p is set to NULL on failure (and *length_p to 0 if length_p is not NULL).

www :

raptor_www object

uri :

raptor_uri to retrieve

string_p :

pointer to location to hold string

length_p :

pointer to location to hold length of string (or NULL)

malloc_handler :

pointer to malloc to use to make string (or NULL)

Returns :

non-0 on failure

raptor_www_get_connection ()

void*               raptor_www_get_connection           (raptor_www *www);

Get WWW library connection object.

Return the internal WWW connection handle. For libcurl, this returns the CURL handle and for libxml the context. Otherwise it returns NULL.

www :

raptor_www object

Returns :

connection pointer

raptor_www_abort ()

void                raptor_www_abort                    (raptor_www *www,
                                                         const char *reason);

Abort an ongoing raptor WWW operation and pass back a reason.

This is typically used within one of the raptor WWW handlers when retrieval need no longer continue due to another processing issue or error.

www :

WWW object

reason :

abort reason message
raptor-1.4.21/docs/html/raptor-section-iostream.html0000644000175000017500000021420611331056234017406 00000000000000 I/O Stream

I/O Stream

I/O Stream — Providing streaming I/O writing to files, strings or user code.

Synopsis

typedef             raptor_iostream;
int                 (*raptor_iostream_init_func)        (void *context);
void                (*raptor_iostream_finish_func)      (void *context);
int                 (*raptor_iostream_write_byte_func)  (void *context,
                                                         const int byte);
int                 (*raptor_iostream_write_bytes_func) (void *context,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);
void                (*raptor_iostream_write_end_func)   (void *context);
int                 (*raptor_iostream_read_bytes_func)  (void *context,
                                                         void *ptr,
                                                         size_t size,
                                                         size_t nmemb);
int                 (*raptor_iostream_read_eof_func)    (void *context);
                    raptor_iostream_handler;
                    raptor_iostream_handler2;
raptor_iostream*    raptor_new_iostream_from_handler2   (void *user_data,
                                                         const raptor_iostream_handler2 * const handler2);
raptor_iostream*    raptor_new_iostream_from_handler    (void *context,
                                                         const raptor_iostream_handler *handler);
raptor_iostream*    raptor_new_iostream_from_sink       (void);
raptor_iostream*    raptor_new_iostream_from_filename   (const char *filename);
raptor_iostream*    raptor_new_iostream_from_file_handle
                                                        (FILE *handle);
raptor_iostream*    raptor_new_iostream_from_string     (void *string,
                                                         size_t length);
raptor_iostream*    raptor_new_iostream_to_sink         (void);
raptor_iostream*    raptor_new_iostream_to_filename     (const char *filename);
raptor_iostream*    raptor_new_iostream_to_file_handle  (FILE *handle);
raptor_iostream*    raptor_new_iostream_to_string       (void **string_p,
                                                         size_t *length_p,
                                                         void* (malloc_handlersize_t size) ());
void                raptor_free_iostream                (raptor_iostream *iostr);
int                 raptor_iostream_format_hexadecimal  (raptor_iostream *iostr,
                                                         unsigned int integer,
                                                         int width);
size_t              raptor_iostream_get_bytes_written_count
                                                        (raptor_iostream *iostr);
int                 raptor_iostream_read_bytes          (raptor_iostream *iostr,
                                                         void *ptr,
                                                         size_t size,
                                                         size_t nmemb);
int                 raptor_iostream_read_eof            (raptor_iostream *iostr);
unsigned long       raptor_iostream_tell                (raptor_iostream *iostr);
int                 raptor_iostream_write_byte          (raptor_iostream *iostr,
                                                         const int byte);
int                 raptor_iostream_write_bytes         (raptor_iostream *iostr,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);
int                 raptor_iostream_write_counted_string
                                                        (raptor_iostream *iostr,
                                                         const void *string,
                                                         size_t len);
int                 raptor_iostream_write_decimal       (raptor_iostream *iostr,
                                                         int integer);
void                raptor_iostream_write_end           (raptor_iostream *iostr);
void                raptor_iostream_write_statement_ntriples
                                                        (raptor_iostream *iostr,
                                                         const raptor_statement *statement);
int                 raptor_iostream_write_string        (raptor_iostream *iostr,
                                                         const void *string);
int                 raptor_iostream_write_string_ntriples
                                                        (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len,
                                                         const char delim);
int                 raptor_iostream_write_string_python (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len,
                                                         const char delim,
                                                         int flags);
void                raptor_iostream_write_string_turtle (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len);
int                 raptor_iostream_write_stringbuffer  (raptor_iostream *iostr,
                                                         raptor_stringbuffer *sb);

Description

An class providing an I/O writer abstraction that allows generating output that can be stored or passed on to system files, strings allocated in memory (usually via raptor_stringbuffer), system file handles (FILE*) or to a user function.

Details

raptor_iostream

raptor_iostream* raptor_iostream;

Raptor I/O Stream class


raptor_iostream_init_func ()

int                 (*raptor_iostream_init_func)        (void *context);

Handler function for raptor_iostream initialising.

context :

stream context data

Returns :

non-0 on failure.

raptor_iostream_finish_func ()

void                (*raptor_iostream_finish_func)      (void *context);

Handler function for raptor_iostream terminating.

context :

stream context data

raptor_iostream_write_byte_func ()

int                 (*raptor_iostream_write_byte_func)  (void *context,
                                                         const int byte);

Handler function for implementing raptor_iostream_write_byte().

context :

stream context data

byte :

byte to write

Returns :

non-0 on failure.

raptor_iostream_write_bytes_func ()

int                 (*raptor_iostream_write_bytes_func) (void *context,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);

Handler function for implementing raptor_iostream_write_bytes().

context :

stream context data

ptr :

pointer to bytes to write

size :

size of item

nmemb :

number of items

Returns :

non-0 on failure.

raptor_iostream_write_end_func ()

void                (*raptor_iostream_write_end_func)   (void *context);

Handler function for implementing raptor_iostream_write_end().

context :

stream context data

raptor_iostream_read_bytes_func ()

int                 (*raptor_iostream_read_bytes_func)  (void *context,
                                                         void *ptr,
                                                         size_t size,
                                                         size_t nmemb);

Handler function for implementing raptor_iostream_read_bytes().

context :

stream context data

ptr :

pointer to buffer to read into

size :

size of buffer

nmemb :

number of items

Returns :

number of items read, 0 or < size on EOF, <0 on failure

raptor_iostream_read_eof_func ()

int                 (*raptor_iostream_read_eof_func)    (void *context);

Handler function for implementing raptor_iostream_read_eof().

context :

stream context data

Returns :

non-0 if EOF

raptor_iostream_handler

typedef struct {
  raptor_iostream_init_func         init;
  raptor_iostream_finish_func       finish;
  raptor_iostream_write_byte_func   write_byte;
  raptor_iostream_write_bytes_func  write_bytes;
  raptor_iostream_write_end_func    write_end;
} raptor_iostream_handler;

Warning

raptor_iostream_handler is deprecated and should not be used in newly-written code. Use raptor_iostream_handler2

I/O stream implementation handler structure.

raptor_iostream_init_func init;

initialisation handler - optional, called at most once

raptor_iostream_finish_func finish;

finishing handler - optional, called at most once

raptor_iostream_write_byte_func write_byte;

write byte handler - required (for writing)

raptor_iostream_write_bytes_func write_bytes;

write bytes handler - required (for writing)

raptor_iostream_write_end_func write_end;

write end handler - optional (for writing), called at most once

raptor_iostream_handler2

typedef struct {
  int version;

  /* V1 functions */
  raptor_iostream_init_func         init;
  raptor_iostream_finish_func       finish;
  raptor_iostream_write_byte_func   write_byte;
  raptor_iostream_write_bytes_func  write_bytes;
  raptor_iostream_write_end_func    write_end;

  /* V2 functions */
  raptor_iostream_read_bytes_func   read_bytes;
  raptor_iostream_read_eof_func     read_eof;
} raptor_iostream_handler2;

I/O stream implementation handler structure.

int version;

interface version. Presently 1 or 2.

raptor_iostream_init_func init;

initialisation handler - optional, called at most once (V1)

raptor_iostream_finish_func finish;

finishing handler - optional, called at most once (V1)

raptor_iostream_write_byte_func write_byte;

write byte handler - required (for writing) (V1)

raptor_iostream_write_bytes_func write_bytes;

write bytes handler - required (for writing) (V1)

raptor_iostream_write_end_func write_end;

write end handler - optional (for writing), called at most once (V1)

raptor_iostream_read_bytes_func read_bytes;

read bytes handler - required (for reading) (V2)

raptor_iostream_read_eof_func read_eof;

read EOF handler - required (for reading) (V2)

raptor_new_iostream_from_handler2 ()

raptor_iostream*    raptor_new_iostream_from_handler2   (void *user_data,
                                                         const raptor_iostream_handler2 * const handler2);

Create a new iostream over a user-defined handler

user_data :

pointer to context information to pass in to calls

handler2 :

pointer to handler methods

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_from_handler ()

raptor_iostream*    raptor_new_iostream_from_handler    (void *context,
                                                         const raptor_iostream_handler *handler);

Warning

raptor_new_iostream_from_handler is deprecated and should not be used in newly-written code.

Create a new iostream over a user-defined handler.

deprecated: Use raptor_new_iostream_from_handler2() instead

context :

pointer to context information to pass in to calls

handler :

pointer to handler methods

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_from_sink ()

raptor_iostream*    raptor_new_iostream_from_sink       (void);

Create a new read iostream from a sink.

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_from_filename ()

raptor_iostream*    raptor_new_iostream_from_filename   (const char *filename);

Constructor - create a new iostream reading from a filename.

filename :

Input filename to open and read from

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_from_file_handle ()

raptor_iostream*    raptor_new_iostream_from_file_handle
                                                        (FILE *handle);

Constructor - create a new iostream reading from a file_handle.

The handle must already be open for reading. NOTE: This does not fclose the handle when it is finished.

handle :

Input file_handle to open and read from

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_from_string ()

raptor_iostream*    raptor_new_iostream_from_string     (void *string,
                                                         size_t length);

Constructor - create a new iostream reading from a string.

string :

pointer to string

length :

length of string

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_to_sink ()

raptor_iostream*    raptor_new_iostream_to_sink         (void);

Create a new write iostream to a sink.

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_to_filename ()

raptor_iostream*    raptor_new_iostream_to_filename     (const char *filename);

Constructor - create a new iostream writing to a filename.

filename :

Output filename to open and write to

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_to_file_handle ()

raptor_iostream*    raptor_new_iostream_to_file_handle  (FILE *handle);

Constructor - create a new iostream writing to a FILE*.

The handle must already be open for writing. NOTE: This does not fclose the handle when it is finished.

handle :

FILE* handle to write to

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_to_string ()

raptor_iostream*    raptor_new_iostream_to_string       (void **string_p,
                                                         size_t *length_p,
                                                         void* (malloc_handlersize_t size) ());

Constructor - create a new iostream writing to a string.

If malloc_handler is null, raptor will allocate it using it's own memory allocator. *string_p is set to NULL on failure (and *length_p to 0 if length_p is not NULL).

string_p :

pointer to location to hold string

length_p :

pointer to location to hold length of string (or NULL)

malloc_handler :

pointer to malloc to use to make string (or NULL)

Returns :

new raptor_iostream object or NULL on failure

raptor_free_iostream ()

void                raptor_free_iostream                (raptor_iostream *iostr);

Destructor - destroy an iostream.

iostr :

iostream object

raptor_iostream_format_hexadecimal ()

int                 raptor_iostream_format_hexadecimal  (raptor_iostream *iostr,
                                                         unsigned int integer,
                                                         int width);

Write an integer in hexadecimal to the iostream.

Always 0-fills the entire field and writes in uppercase A-F

iostr :

raptor iostream

integer :

unsigned integer to format as hexadecimal

width :

field width

Returns :

non-0 on failure

raptor_iostream_get_bytes_written_count ()

size_t              raptor_iostream_get_bytes_written_count
                                                        (raptor_iostream *iostr);

Warning

raptor_iostream_get_bytes_written_count is deprecated and should not be used in newly-written code.

Get the number of bytes written to the iostream.

deprecated: Use raptor_iostream_tell() instead

iostr :

raptor iostream

Returns :

number of bytes written or 0 if none written so far

raptor_iostream_read_bytes ()

int                 raptor_iostream_read_bytes          (raptor_iostream *iostr,
                                                         void *ptr,
                                                         size_t size,
                                                         size_t nmemb);

Read bytes to the iostream.

iostr :

raptor iostream

ptr :

start of buffer to read objects into

size :

size of object

nmemb :

number of objects to read

Returns :

number of objects read, 0 or less than nmemb on EOF, <0 on failure

raptor_iostream_read_eof ()

int                 raptor_iostream_read_eof            (raptor_iostream *iostr);

Check if an read iostream has ended

iostr :

raptor read iostream

Returns :

non-0 if EOF (or not a read iostream)

raptor_iostream_tell ()

unsigned long       raptor_iostream_tell                (raptor_iostream *iostr);

Get the offset in the iostream.

iostr :

raptor iostream

Returns :

offset in iostream

raptor_iostream_write_byte ()

int                 raptor_iostream_write_byte          (raptor_iostream *iostr,
                                                         const int byte);

Write a byte to the iostream.

iostr :

raptor iostream

byte :

byte to write

Returns :

non-0 on failure

raptor_iostream_write_bytes ()

int                 raptor_iostream_write_bytes         (raptor_iostream *iostr,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);

Write bytes to the iostream.

iostr :

raptor iostream

ptr :

start of objects to write

size :

size of object

nmemb :

number of objects

Returns :

number of objects written or less than nmemb or 0 on failure

raptor_iostream_write_counted_string ()

int                 raptor_iostream_write_counted_string
                                                        (raptor_iostream *iostr,
                                                         const void *string,
                                                         size_t len);

Write a counted string to the iostream.

iostr :

raptor iostream

string :

string

len :

string length

Returns :

non-0 on failure

raptor_iostream_write_decimal ()

int                 raptor_iostream_write_decimal       (raptor_iostream *iostr,
                                                         int integer);

Write an integer in decimal to the iostream.

iostr :

raptor iostream

integer :

integer to format as decimal

Returns :

non-0 on failure

raptor_iostream_write_end ()

void                raptor_iostream_write_end           (raptor_iostream *iostr);

End writing to the iostream.

iostr :

raptor iostream

raptor_iostream_write_statement_ntriples ()

void                raptor_iostream_write_statement_ntriples
                                                        (raptor_iostream *iostr,
                                                         const raptor_statement *statement);

Write a raptor_statement formatted in N-Triples format to a raptor_iostream

raptor_init() MUST have been called before calling this function. Use raptor_iostream_write_statement_ntriples_v2() if using raptor_world APIs.

iostr :

raptor iostream

statement :

statement to write

raptor_iostream_write_string ()

int                 raptor_iostream_write_string        (raptor_iostream *iostr,
                                                         const void *string);

Write a NULL-terminated string to the iostream.

iostr :

raptor iostream

string :

string

Returns :

non-0 on failure

raptor_iostream_write_string_ntriples ()

int                 raptor_iostream_write_string_ntriples
                                                        (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len,
                                                         const char delim);

Write an UTF-8 string using N-Triples escapes to an iostream.

iostr :

raptor_iostream to write to

string :

UTF-8 string to write

len :

length of UTF-8 string

delim :

Terminating delimiter character for string (such as " or >) or \0 for no escaping.

Returns :

non-0 on failure such as bad UTF-8 encoding.

raptor_iostream_write_string_python ()

int                 raptor_iostream_write_string_python (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len,
                                                         const char delim,
                                                         int flags);

Write a UTF-8 string using Python-style escapes (N-Triples, Turtle, JSON) to an iostream.

iostr :

raptor_iostream to write to

string :

UTF-8 string to write

len :

length of UTF-8 string

delim :

Terminating delimiter character for string (such as " or >) or \0 for no escaping.

flags :

flags 0=N-Triples mode, 1=Turtle (allow raw UTF-8), 2=Turtle long string (allow raw UTF-8), 3=JSON

Returns :

non-0 on failure such as bad UTF-8 encoding.

raptor_iostream_write_string_turtle ()

void                raptor_iostream_write_string_turtle (raptor_iostream *iostr,
                                                         unsigned char *string,
                                                         size_t len);

Warning

raptor_iostream_write_string_turtle is deprecated and should not be used in newly-written code.

Write an UTF-8 string using Turtle "longString" triple quoting to an iostream.

deprecated: use raptor_iostream_write_string_python() instead

iostr :

raptor_iostream to write to

string :

UTF-8 string to write

len :

length of UTF-8 string

raptor_iostream_write_stringbuffer ()

int                 raptor_iostream_write_stringbuffer  (raptor_iostream *iostr,
                                                         raptor_stringbuffer *sb);

Write a stringbuffer to an iostream.

iostr :

raptor iostream

sb :

raptor_stringbuffer to write

Returns :

non-0 on failure
raptor-1.4.21/docs/html/tutorial-parser-features.html0000644000175000017500000001037511331056234017566 00000000000000 Parser features

Parser features

There are several options that can be set on parsers, called features. The exact list of features can be found via Querying Functionality or in the API reference for raptor_set_feature(). (This should be properly called raptor_parser_set_feature() as it only applies to raptor_parser objects).

Features are integer enumerations of the raptor_feature enum and have values that are either integers (often acting as booleans) or strings. The two functions that set features are:

  /* Set an integer (or boolean) valued feature */
  raptor_set_feature(rdf_parser, feature, 1);

  /* Set a string valued feature */
  raptor_set_feature_string(rdf_parser, feature, "abc");

There are also two corresponding functions for reading the values of parser features: raptor_get_feature() and raptor_get_feature_string() taken the feature enumeration parameter and returning the integer or string value correspondingly.

raptor-1.4.21/docs/html/raptor-parsers.html0000644000175000017500000001157611331056234015605 00000000000000 Parsers in Raptor (syntax to triples)

Parsers in Raptor (syntax to triples)

Introduction

This section describes the parsers that can be compiled into Raptor and their features. The exact parsers supported may vary by different builds of raptor and can be queried at run-time by use of the raptor_parsers_enumerate and raptor_syntaxes_enumerate functions

The optional features that may be set on parsers can also be queried at run-time iwth the raptor_features_enumerate function.

raptor-1.4.21/docs/html/tutorial-serializing.html0000644000175000017500000001306711331056234016777 00000000000000 Serializing RDF triples to a syntax raptor-1.4.21/docs/html/tutorial-serializer-features.html0000644000175000017500000001060211331056234020434 00000000000000 Serializer features

Serializer features

There are several options that can be set on serializers, called features. The exact list of features can be found via Querying Functionality or in the API reference for raptor_serializer_set_feature().

Features are integer enumerations of the raptor_feature enum and have values that are either integers (often acting as booleans) or strings. The two functions that set features are:

  /* Set an integer (or boolean) valued feature */
  raptor_serializer_set_feature(rdf_serializer, feature, 1);

  /* Set a string valued feature */
  raptor_serializer_set_feature_string(rdf_serializer, feature, "abc");

There are also two corresponding functions for reading the values of serializer features: raptor_serializer_get_feature() and raptor_serializer_get_feature_string() taken the feature enumeration parameter and returning the integer or string value correspondingly.

raptor-1.4.21/docs/html/parser-rdfa.html0000644000175000017500000000647111331056234015025 00000000000000 RDFa parser - (name rdfa)

RDFa parser - (name rdfa)

A parser for the RDFa syntax, W3C Candidate Recommendation 20 June 2008 which allows reading XHTML and XML as RDF triples by interpreting attributes on elements to describe which ones have RDF semantics. This is implemented via librdfa linked inside Raptor, written by Manu Sporny of Digital Bazaar, and licensed with the same license as Raptor.

This parser is beta quality and passes all but 4 of the RDFa tests as of Raptor 1.4.18.

raptor-1.4.21/docs/html/tutorial-serializer-to-destination.html0000644000175000017500000002304411331056234021563 00000000000000 Provide a destination for the serialized syntax

Provide a destination for the serialized syntax

The operation of turning RDF triples into a syntax has several alternatives from functions that do most of the work writing to a file or string to functions that allow passing in a raptor_iostream which can be entirely user-constructed.

Serialize to a filename (raptor_serialize_start_to_filename())

Serialize to a new filename (using raptor_new_iostream_to_filename() internally) and uses asf base URI, the file's URI.

  const char *filename="raptor.rdf";
  raptor_serialize_start_to_filename(rdf_serializer, filename);

Serialize to a string (raptor_serialize_start_to_string())

Serialize to a string that is allocated by the serializer (using raptor_new_iostream_to_string() internally). The resulting string is only constructed after raptor_serialize_end() is called and at that point it is assigned to the string pointer passed in, with the length written to the optional length pointer. This function takes an optional base URI but may be required by some serializers.

  raptor_uri* uri=raptor_new_uri("http://example.org/base");
  void *string;  /* destination for string */
  size_t length; /* length of constructed string */

  raptor_serialize_start_to_string(rdf_serializer, uri,
                                   &string, &length);

Serialize to a FILE* file handle (raptor_serialize_start_to_file_handle())

Serialize to an existing open C FILE* file handle (using raptor_new_iostream_to_file_handle() internally). The handle is not closed after serializing is finished. This function takes an optional base URI but may be required by some serializers.

  raptor_uri* uri=raptor_new_uri("http://example.org/base");
  FILE* fh=fopen("raptor.rdf", "wb");
  raptor_serialize_start_to_file_handle(rdf_serializer, uri, fh);

This is the most flexible serializing method as it allows writing to any raptor_iostream which can be constructed to build any form of user-generated structure via callbacks. The iostream remains owned by the caller that can continue to write to it after the serializing is finished (after raptor_serialize_end()) is called).

  raptor_uri* uri=raptor_new_uri("http://example.org/base");
  raptor_iostream* iostream = /* iostream initialized by some means */ ;

  raptor_serialize_start_to_iostream(rdf_serializer, uri, iostream);

  while( /* got RDF triples */ ) {
    raptor_statement* triple = /* ... triple made from somewhere ... */ ;
    raptor_serialize_statement(rdf_serializer,  triple);
  }
  raptor_serialize_end(rdf_serializer);

  raptor_free_serializer(rdf_serializer);

  /* ... write other stuff to iostream ... */

  raptor_free_iostream(iostream);

Serialize to an raptor_iostream and close iostream (raptor_serialize_start())

raptor_serialize_start() also serializes to an iostream like raptor_serialize_start_to_iostream() but it becomes the owner of the passed in raptor_iostream and destroys it at the end of serializing, so no further use of the iostream can be made by the caller.

raptor-1.4.21/docs/html/parser-ntriples.html0000644000175000017500000000603711331056234015747 00000000000000 N-Triples parser (name ntriples)

N-Triples parser (name ntriples)

A parser for the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.

raptor-1.4.21/docs/html/tutorial-parser-set-namespace-handler.html0000644000175000017500000000713711331056234022112 00000000000000 Set namespace declared handler

Set namespace declared handler

Raptor can report when namespace prefix/URIs are declared in during parsing a syntax such as those in XML, RDF/XML or Turtle. A handler function can be set to receive these declarations using the namespace handler method.

  raptor_namespace_handler namespaces_handler;

  raptor_set_namespace_handler(rdf_parser, user_data, namespaces_handler);

The namespaces_handler takes the following signature:

void
namespaces_handler(void* user_data, raptor_namespace *nspace) {
  /*  */
}

Note

This may be called multiple times with the same namespace, if the namespace is declared inside different XML sub-trees.

raptor-1.4.21/docs/html/serializer-ntriples.html0000644000175000017500000000621611331056234016623 00000000000000 N-Triples serializer - default (name ntriples)

N-Triples serializer - default (name ntriples)

A serializer to the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.

raptor-1.4.21/docs/html/raptor-section-sequence.html0000644000175000017500000007675411331056234017411 00000000000000 Sequence

Sequence

Sequence — Ordered sequence of items.

Synopsis

typedef             raptor_sequence;
raptor_sequence*    raptor_new_sequence                 (raptor_sequence_free_handler *free_handler,
                                                         raptor_sequence_print_handler *print_handler);
void                raptor_free_sequence                (raptor_sequence *seq);
void*               raptor_sequence_delete_at           (raptor_sequence *seq,
                                                         int idx);
int                 raptor_sequence_size                (raptor_sequence *seq);
int                 raptor_sequence_set_at              (raptor_sequence *seq,
                                                         int idx,
                                                         void *data);
int                 raptor_sequence_push                (raptor_sequence *seq,
                                                         void *data);
int                 raptor_sequence_shift               (raptor_sequence *seq,
                                                         void *data);
void*               raptor_sequence_get_at              (raptor_sequence *seq,
                                                         int idx);
void*               raptor_sequence_pop                 (raptor_sequence *seq);
void*               raptor_sequence_unshift             (raptor_sequence *seq);
int                 raptor_compare_strings              (const void *a,
                                                         const void *b);
void                raptor_sequence_sort                (raptor_sequence *seq,
                                                         int (compareconst void *, const void *) ());
void                raptor_sequence_print_string        (char *data,
                                                         FILE *fh);
void                raptor_sequence_print_uri           (char *data,
                                                         FILE *fh);
void                raptor_sequence_set_print_handler   (raptor_sequence *seq,
                                                         raptor_sequence_print_handler *print_handler);
void                raptor_sequence_print               (raptor_sequence *seq,
                                                         FILE *fh);
int                 raptor_sequence_join                (raptor_sequence *dest,
                                                         raptor_sequence *src);

Description

A utility class that provides access to small sequence of items that grow at the end and require quick ordered and indexed access. Can be used as a queue/FIFO but less efficiently than a stack where the items are added and removed from the end.

Details

raptor_sequence

raptor_sequence* raptor_sequence;

Raptor sequence class


raptor_new_sequence ()

raptor_sequence*    raptor_new_sequence                 (raptor_sequence_free_handler *free_handler,
                                                         raptor_sequence_print_handler *print_handler);

Constructor - create a new sequence with the given handlers.

free_handler :

handler to free a sequence item

print_handler :

handler to print a sequence item to a FILE*

Returns :

a new raptor_sequence or NULL on failure

raptor_free_sequence ()

void                raptor_free_sequence                (raptor_sequence *seq);

Destructor - free a raptor_sequence

seq :

sequence to destroy

raptor_sequence_delete_at ()

void*               raptor_sequence_delete_at           (raptor_sequence *seq,
                                                         int idx);

Remove an item from a position a sequence, returning it

The item at the offset idx in the sequence is replaced with a NULL pointer and any existing item is returned. The caller owns the resulting item.

seq :

sequence object

idx :

index into sequence to operate at

Returns :

NULL on failure

raptor_sequence_size ()

int                 raptor_sequence_size                (raptor_sequence *seq);

Get the number of items in a sequence.

seq :

sequence object

Returns :

the sequence size (>=0)

raptor_sequence_set_at ()

int                 raptor_sequence_set_at              (raptor_sequence *seq,
                                                         int idx,
                                                         void *data);

Replace/set an item in a sequence.

The item at the offset idx in the sequence is replaced with the new item data (which may be NULL). Any existing item is freed with the sequence's free_handler. If necessary the sequence is extended (with NULLs) to handle a larger offset.

The sequence takes ownership of the new data item. On failure, the item is freed immediately.

seq :

sequence object

idx :

index into sequence to operate at

data :

new data item.

Returns :

non-0 on failure

raptor_sequence_push ()

int                 raptor_sequence_push                (raptor_sequence *seq,
                                                         void *data);

Add an item to the end of the sequence.

The sequence takes ownership of the pushed item and frees it with the free_handler. On failure, the item is freed immediately.

seq :

sequence to add to

data :

item to add

Returns :

non-0 on failure

raptor_sequence_shift ()

int                 raptor_sequence_shift               (raptor_sequence *seq,
                                                         void *data);

Add an item to the start of the sequence.

The sequence takes ownership of the shifted item and frees it with the free_handler. On failure, the item is freed immediately.

seq :

sequence to add to

data :

item to add

Returns :

non-0 on failure

raptor_sequence_get_at ()

void*               raptor_sequence_get_at              (raptor_sequence *seq,
                                                         int idx);

Retrieve an item at offset index in the sequence.

This is efficient to perform. raptor_sequence is optimised to append/remove from the end of the sequence.

After this call the item is still owned by the sequence.

seq :

sequence to use

idx :

index of item to get

Returns :

the object or NULL if index is out of range (0... sequence size-1)

raptor_sequence_pop ()

void*               raptor_sequence_pop                 (raptor_sequence *seq);

Retrieve the item at the end of the sequence.

Ownership of the item is transferred to the caller, i.e. caller is responsible of freeing the item.

seq :

sequence to use

Returns :

the object or NULL if the sequence is empty

raptor_sequence_unshift ()

void*               raptor_sequence_unshift             (raptor_sequence *seq);

Retrieve the item at the start of the sequence.

Ownership of the item is transferred to the caller, i.e. caller is responsible of freeing the item.

seq :

sequence to use

Returns :

the object or NULL if the sequence is empty

raptor_compare_strings ()

int                 raptor_compare_strings              (const void *a,
                                                         const void *b);

Utility function for raptor_sequence_sort() to compare a sequence of strings.

a :

pointer first string

b :

pointer to second string

Returns :

comparison of a to b as strings

raptor_sequence_sort ()

void                raptor_sequence_sort                (raptor_sequence *seq,
                                                         int (compareconst void *, const void *) ());

The comparison function is compatible with that used for qsort() and provides the addresses of pointers to the data that must be dereferenced to get to the stored sequence data.

seq :

sequence to sort

compare :

comparison function

raptor_sequence_print_string ()

void                raptor_sequence_print_string        (char *data,
                                                         FILE *fh);

Helper function for printing a sequence of strings.

Intended for use as a raptor_sequence_print_handler passed into raptor_new_sequence().

data :

data item (a char*)

fh :

file handle to print to

raptor_sequence_print_uri ()

void                raptor_sequence_print_uri           (char *data,
                                                         FILE *fh);

Helper function for printing a sequence of URIs.

Intended for use as a raptor_sequence_print_handler passed into raptor_new_sequence().

raptor_init() MUST have been called before calling this function.

deprecated: Use raptor_uri_print() instead.

data :

data item (a raptor_uri)

fh :

file handle to print to

raptor_sequence_set_print_handler ()

void                raptor_sequence_set_print_handler   (raptor_sequence *seq,
                                                         raptor_sequence_print_handler *print_handler);

Set the print handler for the sequence.

This is set in the raptor_new_sequence() constructor and can be overridden here.

seq :

sequence

print_handler :

print handler

raptor_sequence_print ()

void                raptor_sequence_print               (raptor_sequence *seq,
                                                         FILE *fh);

Print the sequence contents using the print_handler to print the data items.

seq :

sequence to sort

fh :

file handle

raptor_sequence_join ()

int                 raptor_sequence_join                (raptor_sequence *dest,
                                                         raptor_sequence *src);

Join two sequences moving all items from one sequence to the end of another.

After this operation, sequence src will be empty (zero size) but will have the same item capacity as before.

dest :

raptor_sequence destination sequence

src :

raptor_sequence source sequence

Returns :

non-0 on failure
raptor-1.4.21/docs/html/raptor-section-general.html0000644000175000017500000012571311331056234017204 00000000000000 General

General

General — General library constants and utility functions

Synopsis

extern              const unsigned int raptor_version_major;
extern              const unsigned int raptor_version_minor;
extern              const unsigned int raptor_version_release;
extern              const unsigned int raptor_version_decimal;
void                (*raptor_simple_message_handler)    (void *user_data,
                                                         const char *message,
                                                         ...);
void                (*raptor_message_handler)           (void *user_data,
                                                         raptor_locator *locator,
                                                         const char *message);
void                (*raptor_statement_handler)         (void *user_data,
                                                         const raptor_statement *statement);
int                 raptor_parsers_enumerate            (unsigned int counter,
                                                         const char **name,
                                                         const char **label);
int                 raptor_syntaxes_enumerate           (unsigned int counter,
                                                         const char **name,
                                                         const char **label,
                                                         const char **mime_type,
                                                         unsigned char **uri_string);
int                 raptor_syntax_name_check            (const char *name);
const char*         raptor_guess_parser_name            (raptor_uri *uri,
                                                         const char *mime_type,
                                                         unsigned char *buffer,
                                                         size_t len,
                                                         unsigned char *identifier);
int                 raptor_serializers_enumerate        (unsigned int counter,
                                                         const char **name,
                                                         const char **label,
                                                         const char **mime_type,
                                                         unsigned char **uri_string);
int                 raptor_serializer_syntax_name_check (const char *name);
int                 raptor_print_ntriples_string        (FILE *stream,
                                                         unsigned char *string,
                                                         const char delim);
unsigned char*      raptor_ntriples_string_as_utf8_string
                                                        (raptor_parser *rdf_parser,
                                                         unsigned char *src,
                                                         int len,
                                                         size_t *dest_lenp);
const char*         raptor_ntriples_term_as_string      (raptor_ntriples_term_type term);
char*               raptor_vsnprintf                    (const char *message);
enum                raptor_log_level;
                    raptor_message_handler_closure;
                    raptor_error_handlers;
void                raptor_error_handlers_init          (raptor_error_handlers *error_handlers);
void                raptor_set_libxml_flags             (int flags);
void                raptor_set_libxslt_security_preferences
                                                        (void *security_preferences);

Description

How to get access to version numbers, set message and error handlers, list the parsed and serialized syntaxes provided in the library and various other utility functions.

Details

raptor_version_major

extern const unsigned int raptor_version_major;

Library major version number as a decimal integer.


raptor_version_minor

extern const unsigned int raptor_version_minor;

Library minor version number as a decimal integer.


raptor_version_release

extern const unsigned int raptor_version_release;

Library release version number as a decimal integer.


raptor_version_decimal

extern const unsigned int raptor_version_decimal;

Library full version as a decimal integer.

See also raptor_version_string.


raptor_simple_message_handler ()

void                (*raptor_simple_message_handler)    (void *user_data,
                                                         const char *message,
                                                         ...);

Simple message handler function.

Used by multiple functions including raptor_xml_escape_string(), raptor_iostream_write_xml_escaped_string(), raptor_new_qname(), raptor_qname_string_to_uri(), raptor_new_namespaces(), raptor_namespaces_init(), raptor_iostream_write_xml_element(), raptor_new_xml_writer().

user_data :

user data

message :

message to report

... :

arguments for message

raptor_message_handler ()

void                (*raptor_message_handler)           (void *user_data,
                                                         raptor_locator *locator,
                                                         const char *message);

Message with location handler function.

Used during parsing and serializing for errors and warnings that may include location information. Multiple handlers may be set for parsers and serializers by raptor_set_fatal_error_handler(), raptor_set_error_handler(), raptor_set_warning_handler(), raptor_serializer_set_error_handler() and raptor_serializer_set_warning_handler().

Also used by raptor_www_set_error_handler() for location-based errors in WWW retrieval.

user_data :

user data

locator :

location associated with message or NULL

message :

message to report

raptor_statement_handler ()

void                (*raptor_statement_handler)         (void *user_data,
                                                         const raptor_statement *statement);

Statement (triple) reporting handler function.

user_data :

user data

statement :

statement to report

raptor_parsers_enumerate ()

int                 raptor_parsers_enumerate            (unsigned int counter,
                                                         const char **name,
                                                         const char **label);

Get list of syntax parsers.

counter :

index to list of parsers

name :

pointer to store syntax name (or NULL)

label :

pointer to store syntax label (or NULL)

Returns :

non 0 on failure of if counter is out of range

raptor_syntaxes_enumerate ()

int                 raptor_syntaxes_enumerate           (unsigned int counter,
                                                         const char **name,
                                                         const char **label,
                                                         const char **mime_type,
                                                         unsigned char **uri_string);

Get information on syntaxes.

raptor_init() MUST have been called before calling this function. Use raptor_syntaxes_enumerate_v2() if using raptor_world APIs.

counter :

index into the list of syntaxes

name :

pointer to store the name of the syntax (or NULL)

label :

pointer to store syntax readable label (or NULL)

mime_type :

pointer to store syntax MIME Type (or NULL)

uri_string :

pointer to store syntax URI string (or NULL)

Returns :

non 0 on failure of if counter is out of range

raptor_syntax_name_check ()

int                 raptor_syntax_name_check            (const char *name);

Check name of a parser.

raptor_init() MUST have been called before calling this function. Use raptor_syntax_name_check_v2() if using raptor_world APIs.

name :

the syntax name

Returns :

non 0 if name is a known syntax name

raptor_guess_parser_name ()

const char*         raptor_guess_parser_name            (raptor_uri *uri,
                                                         const char *mime_type,
                                                         unsigned char *buffer,
                                                         size_t len,
                                                         unsigned char *identifier);

Guess a parser name for content.

Find a parser by scoring recognition of the syntax by a block of characters, the content identifier or a mime type. The content identifier is typically a filename or URI or some other identifier.

raptor_init() MUST have been called before calling this function. Use raptor_guess_parser_name_v2() if using raptor_world APIs.

uri :

URI identifying the syntax (or NULL)

mime_type :

mime type identifying the content (or NULL)

buffer :

buffer of content to guess (or NULL)

len :

length of buffer

identifier :

identifier of content (or NULL)

Returns :

a parser name or NULL if no guess could be made

raptor_serializers_enumerate ()

int                 raptor_serializers_enumerate        (unsigned int counter,
                                                         const char **name,
                                                         const char **label,
                                                         const char **mime_type,
                                                         unsigned char **uri_string);

Get information on syntax serializers.

raptor_init() MUST have been called before calling this function. Use raptor_serializers_enumerate_v2() if using raptor_world APIs.

counter :

index into the list of syntaxes

name :

pointer to store the name of the syntax (or NULL)

label :

pointer to store syntax readable label (or NULL)

mime_type :

pointer to store syntax MIME Type (or NULL)

uri_string :

pointer to store syntax URI string (or NULL)

Returns :

non 0 on failure of if counter is out of range

raptor_serializer_syntax_name_check ()

int                 raptor_serializer_syntax_name_check (const char *name);

Check name of a serializer.

raptor_init() MUST have been called before calling this function. Use raptor_serializer_syntax_name_check_v2() if using raptor_world APIs.

name :

the syntax name

Returns :

non 0 if name is a known syntax name

raptor_print_ntriples_string ()

int                 raptor_print_ntriples_string        (FILE *stream,
                                                         unsigned char *string,
                                                         const char delim);

Print an UTF-8 string using N-Triples escapes.

stream :

FILE* stream to print to

string :

UTF-8 string to print

delim :

Delimiter character for string (such as ") or \0 for no delim escaping.

Returns :

non-0 on failure such as bad UTF-8 encoding.

raptor_ntriples_string_as_utf8_string ()

unsigned char*      raptor_ntriples_string_as_utf8_string
                                                        (raptor_parser *rdf_parser,
                                                         unsigned char *src,
                                                         int len,
                                                         size_t *dest_lenp);

Warning

raptor_ntriples_string_as_utf8_string is deprecated and should not be used in newly-written code.

Turn an N-Triples string with escapes into a UTF-8 string.

deprecated: This requires use of parser internals and was never in the public API header.

rdf_parser :

parser object

src :

data to read from

len :

size of data

dest_lenp :

pointer to length of destination (out) or NULL

Returns :

a new UTF-8 string

raptor_ntriples_term_as_string ()

const char*         raptor_ntriples_term_as_string      (raptor_ntriples_term_type term);

Warning

raptor_ntriples_term_as_string is deprecated and should not be used in newly-written code.

Get a label for a raptor_ntriples_term_type.

deprecated: an internal debug function, do not use.

term :

N-Triples term.

Returns :

a pointer to a constant string.

raptor_vsnprintf ()

char*               raptor_vsnprintf                    (const char *message);

Format output for a variable arguments list.

This is a wrapper around system versions of vsnprintf with different call and return conventions.

message :

printf-style format string

Returns :

a newly allocated string as the format result or NULL on failure

enum raptor_log_level

typedef enum {
  RAPTOR_LOG_LEVEL_NONE,
  RAPTOR_LOG_LEVEL_FATAL,
  RAPTOR_LOG_LEVEL_ERROR,
  RAPTOR_LOG_LEVEL_WARNING,
  /* RAPTOR V2 FIXME - this enum list cannot be extended before V2
   * API is released else binary compatibility will be broken in the
   * #raptor_error_handlers structure - it causes an array to grow.
   */
  RAPTOR_LOG_LEVEL_LAST=RAPTOR_LOG_LEVEL_WARNING
} raptor_log_level;

Log levels

RAPTOR_LOG_LEVEL_NONE

Internal

RAPTOR_LOG_LEVEL_FATAL

Fatal error message

RAPTOR_LOG_LEVEL_ERROR

Error message

RAPTOR_LOG_LEVEL_WARNING

Warning message

RAPTOR_LOG_LEVEL_LAST

Internal

raptor_message_handler_closure

typedef struct {
  void *user_data;
  raptor_message_handler handler;
} raptor_message_handler_closure;

The combination of a message handler and the user data to send to it.

void *user_data;

user data for handler invocation

raptor_message_handler handler;

handler function

raptor_error_handlers

typedef struct {
  unsigned int magic;

  raptor_locator* locator;

  /* size of handlers array */
  raptor_log_level last_log_level;

  raptor_message_handler_closure handlers[RAPTOR_LOG_LEVEL_LAST+1];

  /* Raptor V2 FIXME - this should NOT be at the end of the structure
   * since it prevents increasing the size of the @handlers array but
   * it it is here to preserve Raptor V1 ABI.
   */
  raptor_world *world;
} raptor_error_handlers;

Error handlers structure

unsigned int magic;

magic value - must use raptor_error_handlers_init() to set this

raptor_locator *locator;

raptor locator of the error

raptor_log_level last_log_level;

number of log levels; size of handlers arrays

raptor_message_handler_closure handlers[RAPTOR_LOG_LEVEL_LAST+1];

user handlers per log level

raptor_world *world;

raptor_world object

raptor_error_handlers_init ()

void                raptor_error_handlers_init          (raptor_error_handlers *error_handlers);

Initialize raptor_error_handlers object statically.

raptor_init() MUST have been called before calling this function. Use raptor_error_handlers_init_v2() if using raptor_world APIs.

error_handlers :

error handlers object

raptor_set_libxml_flags ()

void                raptor_set_libxml_flags             (int flags);

Set common libxml library flags

If libxml is compiled into the library, flags is a bitmask taking an OR of values defined in raptor_libxml_flags

See the raptor_libxml_flags documentation for full details of what the flags mean.

flags :

flags

raptor_set_libxslt_security_preferences ()

void                raptor_set_libxslt_security_preferences
                                                        (void *security_preferences);

Set libxslt security preferences policy object

The security_preferences object will NOT become owned by Raptor

If libxslt is compiled into the library, security_preferences should be an xsltSecurityPrefsPtr and will be used to call xsltSetCtxtSecurityPrefs() when an XSLT engine is initialised.

If libxslt is not compiled in, the object set here is not used.

security_preferences :

security preferences (an xsltSecurityPrefsPtr)
raptor-1.4.21/docs/html/serializer-rss-1-0.html0000644000175000017500000000623111331056234016062 00000000000000 RSS 1.0 serializer (name rss-1.0)

RSS 1.0 serializer (name rss-1.0)

A serializer to the RDF Site Summary (RSS) 1.0 format for describing a syndication feed of items.

By default this only serializes the RDF triples that describe the RSS channel and items found. If serialiser feature 'rssTriples' is set to value 'rdf-xml' then any additional triples found will be included in the channel or item output.

raptor-1.4.21/docs/html/tutorial-parser-content.html0000644000175000017500000002273111331056234017421 00000000000000 Provide syntax content to parse

Provide syntax content to parse

The operation of turning syntax into RDF triples has several alternatives from functions that do most of the work starting from a URI to functions that allow passing in data buffers.

Parsing and MIME Types

The mime type of the retrieved content is not used to choose a parser unless the parser is of type guess. The guess parser will send an Accept: header for all known parser syntax mime types (if a URI request is made) and based on the response, including the identifiers used, pick the appropriate parser to execute. See raptor_guess_parser_name() for a full discussion of the inputs to the guessing.

Parse the content from a URI (raptor_parse_uri())

The URI is resolved and the content read from it and passed to the parser:

  raptor_parse_uri(rdf_parser, uri, base_uri);

The base_uri is optional (can be NULL) and will default to the uri.

Parse the content of a URI using an existing WWW connection (raptor_parse_uri_with_connection())

The URI is resolved using an existing WWW connection (for example a libcurl CURL handle) to allow for any existing WWW configuration to be reused. See raptor_www_new_with_connection for full details of how this works. The content is then read from the result of resolving the URI:

  raptor_parse_uri_with_connection(rdf_parser, uri, base_uri, connection);

The base_uri is optional (can be NULL) and will default to the uri.

Parse the content of a C FILE* (raptor_parse_file_stream())

Parsing can read from a C STDIO file handle:

  stream=fopen(filename, "rb");
  raptor_parse_file_stream(rdf_parser, stream, filename, base_uri);
  fclose(stream);

This function can use take an optional filename which is used in locator error messages. The base_uri may be required by some parsers and if NULL will cause the parsing to fail.

Parse the content of a file URI (raptor_parse_file())

Parsing can read from a URI known to be a file: URI:

  raptor_parse_file(rdf_parser, file_uri, base_uri);

This function requires that the file_uri is a file URI, that is raptor_uri_uri_string_is_file_uri( raptor_uri_as_string( file_uri) ) must be true. The base_uri may be required by some parsers and if NULL will cause the parsing to fail.

Parse chunks of syntax content provided by the application (raptor_start_parse() and raptor_parse_chunk())

  raptor_start_parse(rdf_parser, base_uri);
  while(/* not finished getting content */) {
    unsigned char *buffer;
    size_t buffer_len;
    /* obtain some syntax content in buffer of size buffer_len bytes */
    raptor_parse_chunk(rdf_parser, buffer, buffer_len, 0);
  }
  raptor_parse_chunk(rdf_parser, NULL, 0, 1); /* no data and is_end = 1 */

The base_uri argument to raptor_start_parse() may be required by some parsers and if NULL will cause the parsing to fail.

On the last raptor_parse_chunk() call, or after the loop is ended, the is_end parameter must be set to non-0. Content can be passed with the final call. If no content is present at the end (such as in some kind of end of file situation), then a 0-length buffer_len or NULL buffer can be used.

The minimal case is an entire parse in one chunk as follows:

  raptor_start_parse(rdf_parser, base_uri);
  raptor_parse_chunk(rdf_parser, buffer, buffer_len, 1); /* is_end = 1 */
raptor-1.4.21/docs/html/parser-trig.html0000644000175000017500000000572311331056234015055 00000000000000 TRiG parser (name trig)

TRiG parser (name trig)

A parser for the TriG - Turtle with Named Graphs syntax.

The parser is alpha quality and may not support the entire TRiG specification.

raptor-1.4.21/docs/html/tutorial-parsing.html0000644000175000017500000001566111331056234016124 00000000000000 Parsing syntaxes to RDF Triples raptor-1.4.21/docs/html/tutorial-serializer-destroy.html0000644000175000017500000000560711331056234020320 00000000000000 Destroy the serializer

Destroy the serializer

To tidy up, delete the serializer object as follows:

  raptor_free_serializer(rdf_serializer);

raptor-1.4.21/docs/html/reference-manual.html0000644000175000017500000002276011331056234016027 00000000000000 Part II. Raptor Reference Manual

Part II. Raptor Reference Manual

This part contains the Raptor Reference Manual which comprehensively describes every class and function of the API.

The previous part contains the Raptor Tutorial explaining how to use the API parts.

For the latest information, see the Raptor Home Page and the main document overview in this document tree.

Table of Contents

Parsers in Raptor (syntax to triples)
Introduction
GRDDL parser (name grddl)
Guess parser (name guess)
N-Triples parser (name ntriples)
RDFa parser - (name rdfa)
RDF/XML parser - default (name rdfxml)
RSS Tag Soup parser (name rss-tag-soup)
TRiG parser (name trig)
Turtle Terse RDF Triple Language parser (name turtle)
Serializers in Raptor (triples to syntax)
Introduction
Atom 1.0 serializer (name atom)
JSON serializers (name json and name json-triples)
N-Triples serializer - default (name ntriples)
RDF/XML serializer (name rdfxml)
RDF/XML (Abbreviated) serializer (name rdfxml-abbrev)
RDF/XML (XMP Profile) serializer (name rdfxml-xmp)
Turtle serializer (name turtle)
RSS 1.0 serializer (name rss-1.0)
GraphViz dot serializer (name dot)
Initialisation — Library startup, shutdown and configuration.
General — General library constants and utility functions
Memory — Memory handling functions
Constants — Constant values and strings
Features — Parser and Serializer features
I/O Stream — Providing streaming I/O writing to files, strings or user code.
Locator — Location information for errors, warnings and messages.
Parser — RDF parsers - from a syntax to RDF triples
SAX2 — SAX2 XML Parsing API with namespaces and base URI support.
Sequence — Ordered sequence of items.
Serializer — RDF serializers - from RDF triples to a syntax
String buffer — Append-only strings.
Triples — RDF Triples
Unicode — Unicode and UTF-8 utility functions.
URI Factory — Provide an implementation for the URI class.
URI — URI class and relative URI computation
WWW — Retrieval of URI content from the web.
XML Namespaces — Namespaces in XML include stacks of Namespaces
XML QName — XML Namespace-qualified names.
XML — XML and XML Writer
raptor-1.4.21/docs/html/tutorial-serializer-declare-namespace.html0000644000175000017500000001041611331056234022152 00000000000000 Declare namespaces

Declare namespaces

Raptor can use namespace prefix/URIs to abbreviate syntax in some syntaxes such as Turtle or any XML syntax including RDF/XML, RSS1.0 and Atom 1.0. These are declared with raptor_serialize_set_namespace() using a prefix and URI argument pair like this:

  const unsigned char* prefix="ex";
  raptor_uri* uri=raptor_new_uri("http://example.org");

  raptor_serialize_set_namespace(rdf_serializer, prefix, uri);

or raptor_serialize_set_namespace_from_namespace() from an existing namespace. This can be useful when connected up the the namespace declarations that are generated from a parser via a namespace handler set with raptor_set_namespace_handler()

like this:
  static void
  relay_namespaces(void* user_data, raptor_namespace *nspace)
  {
    raptor_serialize_set_namespace_from_namespace(rdf_serializer, nspace);
  }

  rdf_parser=raptor_new_parser(syntax_name);
  raptor_set_namespace_handler(rdf_parser, rdf_serializer, relay_namespaces);
raptor-1.4.21/docs/html/tutorial-parser-runtime-info.html0000644000175000017500000000636211331056234020365 00000000000000 Querying parser run-time information

Querying parser run-time information

raptor_get_locator() returns the raptor_locator for the current position in the input stream. The locator structure contains full information on the details of where in the file or URI the current parser has reached.

raptor-1.4.21/docs/html/raptor-section-serializer.html0000644000175000017500000014473711331056234017747 00000000000000 Serializer

Serializer

Serializer — RDF serializers - from RDF triples to a syntax

Synopsis

typedef             raptor_serializer;
raptor_serializer*  raptor_new_serializer               (const char *name);
void                raptor_free_serializer              (raptor_serializer *rdf_serializer);
int                 raptor_serialize_start              (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         raptor_iostream *iostream);
int                 raptor_serialize_start_to_iostream  (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         raptor_iostream *iostream);
int                 raptor_serialize_start_to_filename  (raptor_serializer *rdf_serializer,
                                                         const char *filename);
int                 raptor_serialize_start_to_string    (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         void **string_p,
                                                         size_t *length_p);
int                 raptor_serialize_start_to_file_handle
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         FILE *fh);
int                 raptor_serialize_set_namespace      (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         unsigned char *prefix);
int                 raptor_serialize_set_namespace_from_namespace
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_namespace *nspace);
int                 raptor_serialize_statement          (raptor_serializer *rdf_serializer,
                                                         const raptor_statement *statement);
int                 raptor_serialize_end                (raptor_serializer *rdf_serializer);
raptor_iostream*    raptor_serializer_get_iostream      (raptor_serializer *serializer);
void                raptor_serializer_set_error_handler (raptor_serializer *serializer,
                                                         void *user_data,
                                                         raptor_message_handler handler);
void                raptor_serializer_set_warning_handler
                                                        (raptor_serializer *serializer,
                                                         void *user_data,
                                                         raptor_message_handler handler);
raptor_locator*     raptor_serializer_get_locator       (raptor_serializer *rdf_serializer);
int                 raptor_serializer_features_enumerate
                                                        (const raptor_feature feature,
                                                         const char **name,
                                                         raptor_uri **uri,
                                                         const char **label);
int                 raptor_serializer_set_feature       (raptor_serializer *serializer,
                                                         raptor_feature feature,
                                                         int value);
int                 raptor_serializer_set_feature_string
                                                        (raptor_serializer *serializer,
                                                         raptor_feature feature,
                                                         unsigned char *value);
int                 raptor_serializer_get_feature       (raptor_serializer *serializer,
                                                         raptor_feature feature);
const unsigned char * raptor_serializer_get_feature_string
                                                        (raptor_serializer *serializer,
                                                         raptor_feature feature);
raptor_world*       raptor_serializer_get_world         (raptor_serializer *rdf_serializer);

Description

The serializing class that allows creating a serializer for writing a particular syntax to an output string, file, file handle or user function (via raptor_iostream).

There are also methods to deal with handling errors, warnings and returned triples as well as setting options (features) that can adjust how serializing is performed.

Details

raptor_serializer

raptor_serializer* raptor_serializer;

Raptor Serializer class


raptor_new_serializer ()

raptor_serializer*  raptor_new_serializer               (const char *name);

Constructor - create a new raptor_serializer object.

raptor_init() MUST have been called before calling this function. Use raptor_new_serializer_v2() if using raptor_world APIs.

name :

the serializer name

Returns :

a new raptor_serializer object or NULL on failure

raptor_free_serializer ()

void                raptor_free_serializer              (raptor_serializer *rdf_serializer);

Destructor - destroy a raptor_serializer object.

rdf_serializer :

raptor_serializer object

raptor_serialize_start ()

int                 raptor_serialize_start              (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         raptor_iostream *iostream);

Start serialization with given base URI

The passed in iostream becomes owned by the serializer and will be destroyed when the serializing is complete. Compare to raptor_serialize_start_to_iostream(). This function will be deprecated for raptor_serialize_start_to_iostream() in future.

rdf_serializer :

the raptor_serializer

uri :

base URI or NULL if no base URI is required

iostream :

raptor_iostream to write serialization to

Returns :

non-0 on failure.

raptor_serialize_start_to_iostream ()

int                 raptor_serialize_start_to_iostream  (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         raptor_iostream *iostream);

Start serialization to an iostream with given base URI

The passed in iostream does not becomes owned by the serializer and can be used by the caller after serializing is done. It must be destroyed by the caller. Compare to raptor_serialize_start() which will be deprecated in future.

rdf_serializer :

the raptor_serializer

uri :

base URI or NULL if no base URI is required

iostream :

raptor_iostream to write serialization to

Returns :

non-0 on failure.

raptor_serialize_start_to_filename ()

int                 raptor_serialize_start_to_filename  (raptor_serializer *rdf_serializer,
                                                         const char *filename);

Start serializing to a filename.

rdf_serializer :

the raptor_serializer

filename :

filename to serialize to

Returns :

non-0 on failure.

raptor_serialize_start_to_string ()

int                 raptor_serialize_start_to_string    (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         void **string_p,
                                                         size_t *length_p);

Start serializing to a string.

rdf_serializer :

the raptor_serializer

uri :

base URI or NULL if no base URI is required

string_p :

pointer to location to hold string

length_p :

pointer to location to hold length of string (or NULL)

Returns :

non-0 on failure.

raptor_serialize_start_to_file_handle ()

int                 raptor_serialize_start_to_file_handle
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         FILE *fh);

Start serializing to a FILE*.

NOTE: This does not fclose the handle when it is finished.

rdf_serializer :

the raptor_serializer

uri :

base URI or NULL if no base URI is required

fh :

FILE* to serialize to

Returns :

non-0 on failure.

raptor_serialize_set_namespace ()

int                 raptor_serialize_set_namespace      (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         unsigned char *prefix);

set a namespace uri/prefix mapping for serializing.

rdf_serializer :

the raptor_serializer

uri :

raptor_uri of namespace or NULL

prefix :

prefix to use or NULL

Returns :

non-0 on failure.

raptor_serialize_set_namespace_from_namespace ()

int                 raptor_serialize_set_namespace_from_namespace
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_namespace *nspace);

Set a namespace uri/prefix mapping for serializing from an existing namespace.

rdf_serializer :

the raptor_serializer

nspace :

raptor_namespace to set

Returns :

non-0 on failure.

raptor_serialize_statement ()

int                 raptor_serialize_statement          (raptor_serializer *rdf_serializer,
                                                         const raptor_statement *statement);

Serialize a statement.

rdf_serializer :

the raptor_serializer

statement :

raptor_statement to serialize to a syntax

Returns :

non-0 on failure.

raptor_serialize_end ()

int                 raptor_serialize_end                (raptor_serializer *rdf_serializer);

End a serialization.

rdf_serializer :

the raptor_serializer

Returns :

non-0 on failure.

raptor_serializer_get_iostream ()

raptor_iostream*    raptor_serializer_get_iostream      (raptor_serializer *serializer);

Get the current serializer iostream.

serializer :

raptor_serializer object

Returns :

the serializer's current iostream or NULL if

raptor_serializer_set_error_handler ()

void                raptor_serializer_set_error_handler (raptor_serializer *serializer,
                                                         void *user_data,
                                                         raptor_message_handler handler);

Set the serializer error handling function.

The function will receive callbacks when the serializer fails.

serializer :

the serializer

user_data :

user data to pass to function

handler :

pointer to the function

raptor_serializer_set_warning_handler ()

void                raptor_serializer_set_warning_handler
                                                        (raptor_serializer *serializer,
                                                         void *user_data,
                                                         raptor_message_handler handler);

Set the serializer warning handling function.

The function will receive callbacks when the serializer fails.

serializer :

the serializer

user_data :

user data to pass to function

handler :

pointer to the function

raptor_serializer_get_locator ()

raptor_locator*     raptor_serializer_get_locator       (raptor_serializer *rdf_serializer);

Get the serializer raptor locator object.

rdf_serializer :

raptor serializer

Returns :

raptor locator

raptor_serializer_features_enumerate ()

int                 raptor_serializer_features_enumerate
                                                        (const raptor_feature feature,
                                                         const char **name,
                                                         raptor_uri **uri,
                                                         const char **label);

Get list of serializer features.

If uri is not NULL, a pointer toa new raptor_uri is returned that must be freed by the caller with raptor_free_uri().

raptor_init() MUST have been called before calling this function. Use raptor_serializer_features_enumerate_v2() if using raptor_world APIs.

feature :

feature enumeration (0+)

name :

pointer to store feature short name (or NULL)

uri :

pointer to store feature URI (or NULL)

label :

pointer to feature label (or NULL)

Returns :

0 on success, <0 on failure, >0 if feature is unknown

raptor_serializer_set_feature ()

int                 raptor_serializer_set_feature       (raptor_serializer *serializer,
                                                         raptor_feature feature,
                                                         int value);

Set serializer features with integer values.

The allowed features are available via raptor_features_enumerate().

serializer :

raptor_serializer serializer object

feature :

feature to set from enumerated raptor_feature values

value :

integer feature value (0 or larger)

Returns :

non 0 on failure or if the feature is unknown

raptor_serializer_set_feature_string ()

int                 raptor_serializer_set_feature_string
                                                        (raptor_serializer *serializer,
                                                         raptor_feature feature,
                                                         unsigned char *value);

Set serializer features with string values.

The allowed features are available via raptor_serializer_features_enumerate(). If the feature type is integer, the value is interpreted as an integer.

serializer :

raptor_serializer serializer object

feature :

feature to set from enumerated raptor_feature values

value :

feature value

Returns :

non 0 on failure or if the feature is unknown

raptor_serializer_get_feature ()

int                 raptor_serializer_get_feature       (raptor_serializer *serializer,
                                                         raptor_feature feature);

Get various serializer features.

The allowed features are available via raptor_features_enumerate().

Note: no feature value is negative

serializer :

raptor_serializer serializer object

feature :

feature to get value

Returns :

feature value or < 0 for an illegal feature

raptor_serializer_get_feature_string ()

const unsigned char * raptor_serializer_get_feature_string
                                                        (raptor_serializer *serializer,
                                                         raptor_feature feature);

Get serializer features with string values.

The allowed features are available via raptor_features_enumerate().

serializer :

raptor_serializer serializer object

feature :

feature to get value

Returns :

feature value or NULL for an illegal feature or no value

raptor_serializer_get_world ()

raptor_world*       raptor_serializer_get_world         (raptor_serializer *rdf_serializer);

Get the raptor_world object associated with a serializer.

rdf_serializer :

raptor serializer

Returns :

raptor_world* pointer
raptor-1.4.21/docs/html/raptor-section-xml-qname.html0000644000175000017500000006731711331056234017473 00000000000000 XML QName

XML QName

XML QName — XML Namespace-qualified names.

Synopsis

typedef             raptor_qname;
raptor_qname*       raptor_new_qname                    (raptor_namespace_stack *nstack,
                                                         unsigned char *name,
                                                         unsigned char *value,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);
raptor_qname*       raptor_new_qname_from_namespace_local_name
                                                        (raptor_namespace *ns,
                                                         unsigned char *local_name,
                                                         unsigned char *value);
raptor_qname*       raptor_qname_copy                   (raptor_qname *qname);
void                raptor_free_qname                   (raptor_qname *name);
int                 raptor_qname_equal                  (raptor_qname *name1,
                                                         raptor_qname *name2);
raptor_uri*         raptor_qname_string_to_uri          (raptor_namespace_stack *nstack,
                                                         unsigned char *name,
                                                         size_t name_len,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);
int                 raptor_iostream_write_qname         (raptor_iostream *iostr,
                                                         raptor_qname *qname);
const unsigned char* raptor_qname_get_counted_value     (raptor_qname *name,
                                                         size_t *length_p);
const unsigned char* raptor_qname_get_local_name        (raptor_qname *name);
const raptor_namespace* raptor_qname_get_namespace      (raptor_qname *name);
const unsigned char* raptor_qname_get_value             (raptor_qname *name);
unsigned char*      raptor_qname_to_counted_name        (raptor_qname *qname,
                                                         size_t *length_p);

Description

Wraps an XML name inside an associated XML namespace in some XML document context (typically). Mostly used inside parsing XML to manage qnames for XML element and attribute names.

Details

raptor_qname

raptor_qname* raptor_qname;

Raptor XML qname class


raptor_new_qname ()

raptor_qname*       raptor_new_qname                    (raptor_namespace_stack *nstack,
                                                         unsigned char *name,
                                                         unsigned char *value,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);

Constructor - create a new XML qname.

Create a new qname from the local element/attribute name, with optional (attribute) value. The namespace stack is used to look up the name and find the namespace and generate the URI of the qname.

nstack :

namespace stack to look up for namespaces

name :

element or attribute name

value :

attribute value (else is an element)

error_handler :

function to call on an error

error_data :

user data for error function

Returns :

a new raptor_qname object or NULL on failure

raptor_new_qname_from_namespace_local_name ()

raptor_qname*       raptor_new_qname_from_namespace_local_name
                                                        (raptor_namespace *ns,
                                                         unsigned char *local_name,
                                                         unsigned char *value);

Constructor - create a new XML qname.

Create a new qname from the namespace and local element/attribute name, with optional (attribute) value.

raptor_init() MUST have been called before calling this function. Use raptor_new_qname_from_namespace_local_name_v2() if using raptor_world APIs.

ns :

namespace of qname (or NULL)

local_name :

element or attribute name

value :

attribute value (else is an element)

Returns :

a new raptor_qname object or NULL on failure

raptor_qname_copy ()

raptor_qname*       raptor_qname_copy                   (raptor_qname *qname);

Copy constructor - copy an existing XML qname.

qname :

existing qname

Returns :

a new raptor_qname object or NULL on failure

raptor_free_qname ()

void                raptor_free_qname                   (raptor_qname *name);

Destructor - destroy a raptor_qname object.

name :

raptor_qname object

raptor_qname_equal ()

int                 raptor_qname_equal                  (raptor_qname *name1,
                                                         raptor_qname *name2);

Compare two XML Qnames for equality.

name1 :

first raptor_qname

name2 :

second raptor_name

Returns :

non-0 if the qnames are equal.

raptor_qname_string_to_uri ()

raptor_uri*         raptor_qname_string_to_uri          (raptor_namespace_stack *nstack,
                                                         unsigned char *name,
                                                         size_t name_len,
                                                         raptor_simple_message_handler error_handler,
                                                         void *error_data);

Get the URI for a qname.

Utility function to turn a string representing a QName in the N3 style, into a new URI representing it. A NULL name or name ":" returns the default namespace URI. A name "p:" returns namespace name (URI) for the namespace with prefix "p".

Partially equivalent to qname=raptor_new_qname(nstack, name, NULL, error_handler, error_data); uri=raptor_uri_copy(qname->uri); raptor_free_qname(qname) but without making the qname, and it also handles the NULL and ":" name cases as well as error checking.

nstack :

raptor_namespace_stack to decode the namespace

name :

QName string or NULL

name_len :

QName string length

error_handler :

function to call on an error

error_data :

user data for error function

Returns :

new raptor_uri object or NULL on failure

raptor_iostream_write_qname ()

int                 raptor_iostream_write_qname         (raptor_iostream *iostr,
                                                         raptor_qname *qname);

Write a formatted qname to an iostream

iostr :

raptor iosteram

qname :

QName to write

Returns :

non-0 on failure

raptor_qname_get_counted_value ()

const unsigned char* raptor_qname_get_counted_value     (raptor_qname *name,
                                                         size_t *length_p);

Get the raptor_value of an XML QName.

name :

raptor_qname object

length_p :

pointer to variable to store length of name (or NULL)

Returns :

the value

raptor_qname_get_local_name ()

const unsigned char* raptor_qname_get_local_name        (raptor_qname *name);

Get the raptor_local_name of an XML QName.

name :

raptor_qname object

Returns :

the local_name

raptor_qname_get_namespace ()

const raptor_namespace* raptor_qname_get_namespace      (raptor_qname *name);

Get the raptor_namespace of an XML QName.

name :

raptor_qname object

Returns :

the namespace

raptor_qname_get_value ()

const unsigned char* raptor_qname_get_value             (raptor_qname *name);

Get the raptor_value of an XML QName.

name :

raptor_qname object

Returns :

the value

raptor_qname_to_counted_name ()

unsigned char*      raptor_qname_to_counted_name        (raptor_qname *qname,
                                                         size_t *length_p);

Get the string form of a QName name

qname :

QName to write

length_p :

pointer to variable to store length of name (or NULL)

Returns :

string or NULL on failure
raptor-1.4.21/docs/html/tutorial-parser-destroy.html0000644000175000017500000000544511331056234017443 00000000000000 Destroy the parser

Destroy the parser

To tidy up, delete the parser object as follows:

  raptor_free_parser(rdf_parser);

raptor-1.4.21/docs/html/tutorial-serializer-runtime-info.html0000644000175000017500000000711211331056234021234 00000000000000 Querying serializer run-time information

Querying serializer run-time information

raptor_serializer_get_iostream() gets the current serializer's raptor_iostream.

raptor_serializer_get_locator() returns the raptor_locator for the current position in the output stream. The locator structure contains full information on the details of where in the file or URI the current serializer has reached.

raptor-1.4.21/docs/tmpl/0000755000175000017500000000000011331056234012011 500000000000000raptor-1.4.21/docs/tmpl/section-xml-qname.sgml0000644000175000017500000000342511331056234016162 00000000000000 XML QName XML Namespace-qualified names. Wraps an XML name inside an associated XML namespace in some XML document context (typically). Mostly used inside parsing XML to manage qnames for XML element and attribute names. @nstack: @name: @value: @error_handler: @error_data: @Returns: @ns: @local_name: @value: @Returns: @qname: @Returns: @name: @name1: @name2: @Returns: @nstack: @name: @name_len: @error_handler: @error_data: @Returns: @iostr: @qname: @Returns: @name: @length_p: @Returns: @name: @Returns: @name: @Returns: @name: @Returns: @qname: @length_p: @Returns: raptor-1.4.21/docs/tmpl/section-serializer.sgml0000644000175000017500000000622211331056234016432 00000000000000 Serializer RDF serializers - from RDF triples to a syntax The serializing class that allows creating a serializer for writing a particular syntax to an output string, file, file handle or user function (via #raptor_iostream). There are also methods to deal with handling errors, warnings and returned triples as well as setting options (features) that can adjust how serializing is performed. @name: @Returns: @rdf_serializer: @rdf_serializer: @uri: @iostream: @Returns: @rdf_serializer: @uri: @iostream: @Returns: @rdf_serializer: @filename: @Returns: @rdf_serializer: @uri: @string_p: @length_p: @Returns: @rdf_serializer: @uri: @fh: @Returns: @rdf_serializer: @uri: @prefix: @Returns: @rdf_serializer: @nspace: @Returns: @rdf_serializer: @statement: @Returns: @rdf_serializer: @Returns: @serializer: @Returns: @serializer: @user_data: @handler: @serializer: @user_data: @handler: @rdf_serializer: @Returns: @feature: @name: @uri: @label: @Returns: @serializer: @feature: @value: @Returns: @serializer: @feature: @value: @Returns: @serializer: @feature: @Returns: @serializer: @feature: @Returns: @rdf_serializer: @Returns: raptor-1.4.21/docs/tmpl/section-feature.sgml0000644000175000017500000000417211331056234015716 00000000000000 Features Parser and Serializer features Optional parameters for #raptor_parser and #raptor_serializer objects that can be get and set. Utility functions also exist to enumerate them, their description and the parameter type taken. @RAPTOR_FEATURE_SCANNING: @RAPTOR_FEATURE_ASSUME_IS_RDF: @RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES: @RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES: @RAPTOR_FEATURE_ALLOW_BAGID: @RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST: @RAPTOR_FEATURE_NORMALIZE_LANGUAGE: @RAPTOR_FEATURE_NON_NFC_FATAL: @RAPTOR_FEATURE_WARN_OTHER_PARSETYPES: @RAPTOR_FEATURE_CHECK_RDF_ID: @RAPTOR_FEATURE_RELATIVE_URIS: @RAPTOR_FEATURE_START_URI: @RAPTOR_FEATURE_WRITER_AUTO_INDENT: @RAPTOR_FEATURE_WRITER_AUTO_EMPTY: @RAPTOR_FEATURE_WRITER_INDENT_WIDTH: @RAPTOR_FEATURE_WRITER_XML_VERSION: @RAPTOR_FEATURE_WRITER_XML_DECLARATION: @RAPTOR_FEATURE_NO_NET: @RAPTOR_FEATURE_RESOURCE_BORDER: @RAPTOR_FEATURE_LITERAL_BORDER: @RAPTOR_FEATURE_BNODE_BORDER: @RAPTOR_FEATURE_RESOURCE_FILL: @RAPTOR_FEATURE_LITERAL_FILL: @RAPTOR_FEATURE_BNODE_FILL: @RAPTOR_FEATURE_HTML_TAG_SOUP: @RAPTOR_FEATURE_MICROFORMATS: @RAPTOR_FEATURE_HTML_LINK: @RAPTOR_FEATURE_WWW_TIMEOUT: @RAPTOR_FEATURE_WRITE_BASE_URI: @RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: @RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: @RAPTOR_FEATURE_JSON_CALLBACK: @RAPTOR_FEATURE_JSON_EXTRA_DATA: @RAPTOR_FEATURE_RSS_TRIPLES: @RAPTOR_FEATURE_ATOM_ENTRY_URI: @RAPTOR_FEATURE_PREFIX_ELEMENTS: @RAPTOR_FEATURE_LAST: @Returns: @feature: @name: @uri: @label: @Returns: @uri: @Returns: @feature: @Returns: raptor-1.4.21/docs/tmpl/section-triples.sgml0000644000175000017500000000457011331056234015747 00000000000000 Triples RDF Triples Representation of RDF triples inside Raptor. They are a sequence of three #raptor_identifier which cover the RDF terms of URI (%RAPTOR_IDENTIFIER_TYPE_RESOURCE), Literal (%RAPTOR_IDENTIFIER_TYPE_LITERAL) and Blank Node (%RAPTOR_IDENTIFIER_TYPE_ANONYMOUS). Some other #raptor_identifer_type forms exist but are deprecated. @RAPTOR_GENID_TYPE_BNODEID: @RAPTOR_GENID_TYPE_BAGID: @RAPTOR_IDENTIFIER_TYPE_UNKNOWN: @RAPTOR_IDENTIFIER_TYPE_RESOURCE: @RAPTOR_IDENTIFIER_TYPE_ANONYMOUS: @RAPTOR_IDENTIFIER_TYPE_PREDICATE: @RAPTOR_IDENTIFIER_TYPE_ORDINAL: @RAPTOR_IDENTIFIER_TYPE_LITERAL: @RAPTOR_IDENTIFIER_TYPE_XML_LITERAL: @type: @uri: @uri_source: @ordinal: @is_malloced: @literal_datatype: @world: @type: @uri: @uri_source: @id: @literal: @literal_datatype: @literal_language: @Returns: @dest: @src: @Returns: @identifier: @subject: @subject_type: @predicate: @predicate_type: @object: @object_type: @object_literal_datatype: @s1: @s2: @Returns: @statement: @stream: @statement: @stream: @statement: @detailed: @stream: @term: @type: @literal_datatype: @literal_language: @len_p: @Returns: @term: @type: @literal_datatype: @literal_language: @Returns: raptor-1.4.21/docs/tmpl/section-uri-factory.sgml0000644000175000017500000000263311331056234016527 00000000000000 URI Factory Provide an implementation for the URI class. A factory that allows registering an implementation for the URI class to override the simple internal one (#raptor_uri are char*). Normally used by redland to replace #raptor_uri with #librdf_uri @context: @uri_string: @Returns: @context: @uri: @local_name: @Returns: @context: @base_uri: @uri_string: @Returns: @context: @name: @Returns: @context: @uri: @context: @uri1: @uri2: @Returns: @context: @uri: @Returns: @context: @uri1: @uri2: @Returns: raptor-1.4.21/docs/tmpl/raptor-unused.sgml0000644000175000017500000000000011331056234015413 00000000000000raptor-1.4.21/docs/tmpl/section-iostream.sgml0000644000175000017500000001107611331056234016107 00000000000000 I/O Stream Providing streaming I/O writing to files, strings or user code. An class providing an I/O writer abstraction that allows generating output that can be stored or passed on to system files, strings allocated in memory (usually via #raptor_stringbuffer), system file handles (FILE*) or to a user function. @context: @Returns: @context: @context: @byte: @Returns: @context: @ptr: @size: @nmemb: @Returns: @context: @context: @ptr: @size: @nmemb: @Returns: @context: @Returns: @init: @finish: @write_byte: @write_bytes: @write_end: @version: @init: @finish: @write_byte: @write_bytes: @write_end: @read_bytes: @read_eof: @user_data: @handler2: @Returns: @context: @handler: @Returns: @Returns: @filename: @Returns: @handle: @Returns: @string: @length: @Returns: @Returns: @filename: @Returns: @handle: @Returns: @string_p: @length_p: @malloc_handler: @Returns: @iostr: @iostr: @integer: @width: @Returns: @iostr: @Returns: @iostr: @ptr: @size: @nmemb: @Returns: @iostr: @Returns: @iostr: @Returns: @iostr: @byte: @Returns: @iostr: @ptr: @size: @nmemb: @Returns: @iostr: @string: @len: @Returns: @iostr: @integer: @Returns: @iostr: @iostr: @statement: @iostr: @string: @Returns: @iostr: @string: @len: @delim: @Returns: @iostr: @string: @len: @delim: @flags: @Returns: @iostr: @string: @len: @iostr: @sb: @Returns: raptor-1.4.21/docs/tmpl/section-uri.sgml0000644000175000017500000000707711331056234015071 00000000000000 URI URI class and relative URI computation A class for absolute URIs used inside raptor and relative URI computation utility functions used inside the main Redland #librdf_uri class. Only absolute URIs are provided, with no current access to internals of URIs such as URI scheme, path, authority. @new_uri: @new_uri_from_uri_local_name: @new_uri_relative_to_base: @new_uri_for_rdf_concept: @free_uri: @uri_equals: @uri_copy: @uri_as_string: @uri_as_counted_string: @initialised: @uri_compare: @uri_string: @Returns: @uri: @local_name: @Returns: @base_uri: @uri_string: @Returns: @base_uri: @id: @Returns: @name: @Returns: @uri: @uri1: @uri2: @Returns: @uri1: @uri2: @Returns: @uri: @Returns: @uri: @Returns: @uri: @len_p: @Returns: @old_uri: @Returns: @old_uri: @Returns: @base_uri: @reference_uri: @buffer: @length: @filename: @Returns: @uri_string: @Returns: @uri_string: @fragment_p: @Returns: @uri_string: @Returns: @uri_string: @Returns: @base_uri: @reference_uri: @length_p: @Returns: @base_uri: @reference_uri: @Returns: @uri: @stream: @uri: @len_p: @Returns: @uri: @Returns: @handler: @context: @handler: @context: @iostr: @uri: @Returns: raptor-1.4.21/docs/tmpl/section-sequence.sgml0000644000175000017500000000422011331056234016065 00000000000000 Sequence Ordered sequence of items. A utility class that provides access to small sequence of items that grow at the end and require quick ordered and indexed access. Can be used as a queue/FIFO but less efficiently than a stack where the items are added and removed from the end. @free_handler: @print_handler: @Returns: @seq: @seq: @idx: @Returns: @seq: @Returns: @seq: @idx: @data: @Returns: @seq: @data: @Returns: @seq: @data: @Returns: @seq: @idx: @Returns: @seq: @Returns: @seq: @Returns: @a: @b: @Returns: @seq: @compare: @data: @fh: @data: @fh: @seq: @print_handler: @seq: @fh: @dest: @src: @Returns: raptor-1.4.21/docs/tmpl/section-stringbuffer.sgml0000644000175000017500000000355511331056234016767 00000000000000 String buffer Append-only strings. A utility class that allows easy construction of strings that grow at the end by appending new strings. Primarily used for constructing/serializing syntaxes into strings by the #raptor_iostream and #raptor_serializer classes. @Returns: @stringbuffer: @stringbuffer: @string: @length: @do_copy: @Returns: @stringbuffer: @string: @do_copy: @Returns: @stringbuffer: @integer: @Returns: @stringbuffer: @append: @Returns: @stringbuffer: @string: @length: @do_copy: @Returns: @stringbuffer: @string: @do_copy: @Returns: @stringbuffer: @Returns: @stringbuffer: @Returns: @stringbuffer: @string: @length: @Returns: raptor-1.4.21/docs/tmpl/section-xml.sgml0000644000175000017500000001151711331056234015064 00000000000000 XML XML and XML Writer XML elements with optional attributes and an XML Writer class that can format #raptor_xml_element into output forms, with optional "pretty printing" features such as indenting and collapsing empty elements. Also includes a utility function #raptor_xml_name_check for checking a name is legal in some XML version. @name: @xml_language: @xml_base: @Returns: @ns: @name: @xml_language: @xml_base: @Returns: @element: @xml_element: @Returns: @xml_element: @Returns: @xml_element: @Returns: @xml_element: @attributes: @count: @xml_element: @nspace: @Returns: @xml_element: @Returns: @xml_element: @Returns: @nstack: @uri_handler: @uri_context: @iostr: @error_handler: @error_data: @canonicalize: @Returns: @xml_writer: @xml_writer: @element: @xml_writer: @element: @xml_writer: @element: @xml_writer: @s: @xml_writer: @s: @len: @xml_writer: @s: @xml_writer: @s: @len: @xml_writer: @s: @xml_writer: @s: @len: @xml_writer: @xml_writer: @feature: @name: @uri: @label: @Returns: @xml_writer: @Returns: @xml_writer: @feature: @value: @Returns: @xml_writer: @feature: @value: @Returns: @xml_writer: @feature: @Returns: @xml_writer: @feature: @Returns: @iostr: @element: @nstack: @is_empty: @is_end: @error_handler: @error_data: @depth: @Returns: @string: @len: @buffer: @length: @quote: @xml_version: @error_handler: @error_data: @Returns: @string: @len: @buffer: @length: @quote: @error_handler: @error_data: @Returns: @iostr: @string: @len: @quote: @xml_version: @error_handler: @error_data: @Returns: @iostr: @string: @len: @quote: @error_handler: @error_data: @Returns: @string: @length: @xml_version: @Returns: raptor-1.4.21/docs/tmpl/section-parser.sgml0000644000175000017500000001062511331056234015557 00000000000000 Parser RDF parsers - from a syntax to RDF triples The parsing class that allows creating a parser for reading from a particular syntax (or can guess and use contextual information) that will on demand generate RDF triples to a handler function, as chunks of syntax data are passed into the parser. Parsing can be done from strings in memory, files or from URIs on the web. There are also methods to deal with handling errors, warnings and returned triples as well as setting options (features) that can adjust how parsing is performed. @name: @Returns: @uri: @mime_type: @buffer: @len: @identifier: @Returns: @rdf_parser: @uri: @Returns: @parser: @parser: @user_data: @handler: @parser: @user_data: @handler: @parser: @user_data: @handler: @parser: @user_data: @handler: @parser: @user_data: @handler: @user_data: @graph: @parser: @user_data: @handler: @user_data: @nspace: @parser: @user_data: @handler: @rdf_parser: @Returns: @rdf_parser: @prefix: @base: @rdf_parser: @buffer: @len: @is_end: @Returns: @rdf_parser: @stream: @filename: @base_uri: @Returns: @rdf_parser: @uri: @base_uri: @Returns: @rdf_parser: @uri: @base_uri: @Returns: @rdf_parser: @uri: @base_uri: @connection: @Returns: @rdf_parser: @rdf_parser: @Returns: @rdf_parser: @Returns: @rdf_parser: @Returns: @rdf_parser: @Returns: @parser: @feature: @value: @Returns: @parser: @feature: @value: @Returns: @parser: @feature: @Returns: @parser: @feature: @Returns: @rdf_parser: @is_strict: @rdf_parser: @Returns: @parser: @filter: @user_data: @rdf_parser: @type: @Returns: @rdf_parser: @Returns: raptor-1.4.21/docs/tmpl/section-www.sgml0000644000175000017500000000605011331056234015104 00000000000000 WWW Retrieval of URI content from the web. Provides a wrapper to the resolution of URIs to give content using an underlying WWW-retrieval library. The content is delivered by callbacks and includes returning content type for handling content-negotation by the caller as well as chunks of byte content. @www: @userdata: @ptr: @size: @nmemb: @www: @userdata: @content_type: @Returns: @connection: @Returns: @www: @www: @user_agent: @www: @proxy: @www: @value: @www: @cache_control: @Returns: @www: @handler: @user_data: @www: @timeout: @www: @handler: @user_data: @www: @error_handler: @error_data: @user_data: @uri: @Returns: @www: @filter: @user_data: @www: @userdata: @final_uri: @www: @Returns: @www: @handler: @user_data: @www: @uri: @Returns: @www: @uri: @string_p: @length_p: @malloc_handler: @Returns: @www: @Returns: @www: @reason: raptor-1.4.21/docs/tmpl/section-unicode.sgml0000644000175000017500000000242011331056234015703 00000000000000 Unicode Unicode and UTF-8 utility functions. Functions to support converting to and from Unicode written in UTF-8 which is the native internal string format of all the redland libraries. Includes checking for Unicode names using either the XML 1.0 or XML 1.1 rules. @c: @output: @Returns: @output: @input: @length: @Returns: @c: @Returns: @c: @Returns: @c: @Returns: @c: @Returns: @string: @length: @Returns: raptor-1.4.21/docs/tmpl/section-world.sgml0000644000175000017500000000226311331056234015411 00000000000000 Initialisation Library startup, shutdown and configuration. How to initialise and terminate the library, set library-wide configuration flags and options. @Returns: @world: @RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE: @RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE: @world: @flags: @world: @security_preferences: @world: @Returns: raptor-1.4.21/docs/tmpl/section-constants.sgml0000644000175000017500000000141211331056234016271 00000000000000 Constants Constant values and strings Version numbers and often-used namespace URI strings. raptor-1.4.21/docs/tmpl/section-general.sgml0000644000175000017500000000563611331056234015706 00000000000000 General General library constants and utility functions How to get access to version numbers, set message and error handlers, list the parsed and serialized syntaxes provided in the library and various other utility functions. @user_data: @message: @Varargs: @user_data: @locator: @message: @user_data: @statement: @counter: @name: @label: @Returns: @counter: @name: @label: @mime_type: @uri_string: @Returns: @name: @Returns: @uri: @mime_type: @buffer: @len: @identifier: @Returns: @counter: @name: @label: @mime_type: @uri_string: @Returns: @name: @Returns: @stream: @string: @delim: @Returns: @rdf_parser: @src: @len: @dest_lenp: @Returns: @term: @Returns: @message: @Returns: @RAPTOR_LOG_LEVEL_NONE: @RAPTOR_LOG_LEVEL_FATAL: @RAPTOR_LOG_LEVEL_ERROR: @RAPTOR_LOG_LEVEL_WARNING: @RAPTOR_LOG_LEVEL_LAST: @user_data: @handler: @magic: @locator: @last_log_level: @handlers: @world: @error_handlers: @flags: @security_preferences: raptor-1.4.21/docs/tmpl/section-xml-namespace.sgml0000644000175000017500000000636011331056234017016 00000000000000 XML Namespaces Namespaces in XML include stacks of Namespaces Two classes that provide an XML namespace - short prefix (or none) and absolute URI (or none) to match the form xmlns...="..." seen in XML. A stack of namespaces #raptor_namespace_stack is also provided to handle in-scope namespace calculations that happen inside XML documents where inner namespaces can override outer ones. @nstack: @prefix: @ns_uri: @depth: @Returns: @uri_handler: @uri_context: @error_handler: @error_data: @defaults: @Returns: @nstack: @uri_handler: @uri_context: @error_handler: @error_data: @defaults: @Returns: @nstack: @nstack: @nstack: @nspace: @nstack: @prefix: @ns_uri_string: @depth: @Returns: @nstack: @depth: @nstack: @Returns: @nstack: @prefix: @prefix_length: @Returns: @nstack: @ns_uri: @Returns: @nstack: @nspace: @Returns: @nstack: @prefix: @ns_uri_string: @depth: @Returns: @ns: @nstack: @ns: @new_depth: @Returns: @ns: @Returns: @ns: @Returns: @ns: @length_p: @Returns: @ns: @length_p: @Returns: @iostr: @ns: @Returns: @string: @prefix: @uri_string: @Returns: @nstack: @uri: @xml_version: @Returns: raptor-1.4.21/docs/tmpl/section-unused.sgml0000644000175000017500000000231011331056234015556 00000000000000 Unused Unused Unused When defined before a function, indicates that the function has been deprecated and may be replaced in a future release. With some versions of gcc this may give a compilation warning. @string_index: @first_to_check_index: @RAPTOR_URI_SOURCE_UNKNOWN: @RAPTOR_URI_SOURCE_NOT_URI: @RAPTOR_URI_SOURCE_ELEMENT: @RAPTOR_URI_SOURCE_ATTRIBUTE: @RAPTOR_URI_SOURCE_ID: @RAPTOR_URI_SOURCE_URI: @RAPTOR_URI_SOURCE_GENERATED: @RAPTOR_URI_SOURCE_BLANK_ID: @RAPTOR_NTRIPLES_TERM_TYPE_URI_REF: @RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE: @RAPTOR_NTRIPLES_TERM_TYPE_LITERAL: raptor-1.4.21/docs/tmpl/section-memory.sgml0000644000175000017500000000132411331056234015567 00000000000000 Memory Memory handling functions Wrappers around the free, malloc and calloc functions but called from inside the library. Required by some systems to handle multiple-HEAPs and pass memory to and from the library. @ptr: @size: @Returns: @nmemb: @size: @Returns: raptor-1.4.21/docs/tmpl/section-sax2.sgml0000644000175000017500000000536411331056234015144 00000000000000 SAX2 SAX2 XML Parsing API with namespaces and base URI support. A class providing a SAX2 XML parsing API with XML namespaces and XML base support. @user_data: @error_handlers: @Returns: @sax2: @user_data: @xml_element: @user_data: @xml_element: @user_data: @xml_element: @s: @len: @user_data: @xml_element: @s: @len: @user_data: @xml_element: @s: @user_data: @entityName: @base: @systemId: @publicId: @notationName: @user_data: @context: @base: @systemId: @publicId: @Returns: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @base_uri: @sax2: @buffer: @len: @is_end: @Returns: @sax2: @Returns: @sax2: @Returns: raptor-1.4.21/docs/tmpl/section-locator.sgml0000644000175000017500000000226611331056234015730 00000000000000 Locator Location information for errors, warnings and messages. A small structure that can be optionally filled in when errors, warnings or other messages are generated and returned to user code. @uri: @file: @line: @column: @byte: @stream: @locator: @buffer: @length: @locator: @Returns: @locator: @Returns: @locator: @Returns: @locator: @Returns: @locator: @Returns: @locator: @Returns: raptor-1.4.21/docs/raptor.types0000644000175000017500000000000011331056234013340 00000000000000raptor-1.4.21/docs/libraptor.30000644000175000017500000030704211330672502013046 00000000000000.\" .\" libraptor.3 - Raptor library manual page .\" .\" Copyright (C) 2002-2010 David Beckett - http://www.dajobe.org/ .\" Copyright (C) 2002-2005 University of Bristol, UK .\" .TH libraptor 3 "2010-01-29" .\" Please adjust this date whenever revising the manpage. .SH NAME libraptor \- Raptor RDF parser and serializer library .SH SYNOPSIS .nf .B #include .br .br .BI raptor_init(); .br .BI "raptor_parser *" p =raptor_new_parser("rdfxml"); .br .BI raptor_set_statement_handler( p , NULL , print_triples ); .br .BI "raptor_uri *" file_uri =raptor_new_uri("http://example.org/"); .br .BI raptor_parse_file( p , file_uri , base_uri ); .br .BI raptor_parse_uri( p , uri , NULL ); .br .BI raptor_free_parser( p ); .br .BI raptor_free_uri( file_uri ); .br .BI raptor_finish(); .br .B cc file.c -lraptor .br .fi .SH DESCRIPTION The \fIRaptor\fP library provides a high-level interface to a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into syntaxes. .LP The supported parsing syntaxes include RDF/XML, N-Triples, Turtle, TRiG, RSS tag soup (including all RSS and Atoms), GRDDL, RDFa and the serializing syntaxes include RDF/XML (3 varieties), N-Triples, Turtle, RSS 1.0, Atom 1.0, GraphViz DOT and RDF/JSON. The RDF/XML parser can use either \fIexpat\fP or \fIlibxml\fP XML parsers for providing the SAX event stream. The library functions are arranged in an object-oriented style with constructors, destructors and method calls. The statements and error messages are delivered via callback functions. .LP Raptor contains a URI-reference parsing and resolving (not retrieval) class (raptor_uri) sufficient for dealing with URI-references inside RDF. This functionality is modular and can be transparently replaced with another existing and compatible URI implementation. .LP It also provides a URI-retrieval class (raptor_www) for wrapping existing library such as libcurl, libxml2 or BSD libfetch that provides full or partial retrieval of data from URIs and an I/O stream abstraction (raptor_iostream) for supportin serializing to a variety of outputs. .LP Raptor uses Unicode strings for RDF literals and URIs and preserves them throughout the library. It uses the UTF-8 encoding of Unicode at the API for passing in or returning Unicode strings. It is intended that the preservation of Unicode for URIs will support Internationalized Resource Identifiers (IRIs) which are still under development and standardisation. .SH "LIBRARY INITIALISATION AND CLEANUP" .IP "\fBraptor_init()\fR" .IP "\fBraptor_finish()\fR" Initialise and cleanup the library. These must be called before any raptor class such as raptor_parser, raptor_uri is created or used. Note: as of 1.4.19 these are wrappers around a static instance of the new \fBraptor_world\fP class. In Raptor 2.0 this initialisation and cleanup method will be removed. .IP "\fBvoid raptor_set_libxslt_security_preferences(void *\fIsecurity_preferences\fP)\fR" Set libxslt security preferences object. .IP "\fBvoid raptor_set_libxml_flags(int \fIflags\fP)\fR" Set libxml flags from the choices: \fBRAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE\fP: save/restore the libxml generic error handler when parsing and \fBRAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE: save/restore the libxml structured error handler when parsing. .SH "PARSER CLASS" This class provides the functionality of turning syntaxes into RDF triples - RDF parsing. .SH "PARSER CONSTRUCTORS" .IP "\fBraptor_parser* raptor_new_parser(name)\fR" Create a new raptor parser object for the parser with name \fIname\fP currently either "rdfxml", "turtle" or "rss-tag-soup" for the RSS Tag Soup parser. .IP "\fBraptor_parser* raptor_new_parser_for_content(raptor_uri *\fIuri\fP, const char *\fImime_type\fP, const unsigned char *\fIbuffer\fP, size_t \fIlen\fP, const unsigned char *\fIidentifier\fP)\fR" Create a new raptor parser object for a syntax identified by URI \fIuri\fR, MIME type \fImime_type\fR, some initial content \fIbuffer\fP of size \fIlen\fR or content with identifier \fIidentifier\fR. See the raptor_guess_parser_name description for further details. .SH "PARSER DESTRUCTOR" .IP "\fBvoid raptor_free_parser(raptor_parser *\fIparser\fB)\fR" Destroy a Raptor parser object. .SH "PARSER MESSAGE CALLBACK METHODS" Several methods can be registered for the parser that return a variable-argument message in the style of printf(3). These also return a \fIraptor_locator\fR that can contain URI, file, line, column and byte counts of where the message is about. This structure can be used with the raptor_format_locator, raptor_print_locator functions below or the structures fields directly, which are defined in raptor.h .IP "\fBvoid raptor_set_fatal_error_handler(raptor_parser* \fIparser, void *\fIuser_data, raptor_message_handler handler)\fR" Set the parser fatal error handler callback. .IP "\fBvoid raptor_set_error_handler(raptor_parser* \fIparser\fB, void *\fIuser_data\fB, raptor_message_handler \fIhandler\fB)\fR" Set the parser non-fatal error handler callback. .IP "\fBvoid raptor_set_warning_handler(raptor_parser* \fIparser\fB, void *\fIuser_data\fB, raptor_message_handler \fIhandler\fB)\fR" Set the parser warning message handler callback. .IP "\fBraptor_set_namespace_handler(raptor_parser* \fIparser\fP, void* \fIuser_data\fP, raptor_namespace_handler \fIhandler\fP)\fR" Set the namespace declaration handler callback. .SH "PARSER STATEMENT CALLBACK METHOD" The parser allows the registration of a callback function to return the statements to the application. .IP "\fBvoid raptor_set_statement_handler(raptor_parser* \fIparser\fB, void *\fIuser_data\fB, raptor_statement_handler \fIhandler\fB)\fR" Set the statement callback function for the parser. The \fIraptor_statement\fR structure is defined in raptor.h and includes fields for the subject, predicate, object of the statements along with their types and for literals, language and datatype. .SH "PARSER PARSING METHODS" These methods perform the entire parsing in one method. Statements warnings, errors and fatal errors are delivered via the registered statement, error etc. handler functions. .LP In both of these methods, the base URI is required for the RDF/XML parser (name "rdfxml") and Turtle parser (name "turtle"). The N-Triples parser (name "ntriples") or RSS Tag Soup parser (name "rss-tag-soup") do not use this. .IP "\fBint raptor_parse_file(raptor_parser* \fIparser\fB, raptor_uri *\fIuri\fB, raptor_uri *\fIbase_uri\fB)\fR" Parse the given filename (a URI like file:filename) according to the optional base URI \fIbase_uri\fR. If \fIuri\fR is NULL, read from standard input and \fIbase_uri\fP is then required. .IP "\fBint raptor_parse_file_stream(raptor_parser* \fIparser\fB, FILE* \fIstream\fB, const char* \fIfilename\fB, raptor_uri *\fIbase_uri\fB)\fR" Parse the given C FILE* stream according to the base URI \fIbase_uri\fP (required). \fIfilename\fP is optional and if given, is used for error messages via the raptor_locator structure. .IP "\fBint raptor_parse_uri(raptor_parser* \fIparser\fB, raptor_uri* \fIuri\fB, raptor_uri *\fIbase_uri\fB)\fR" Parse the URI according to the base URI \fIbase_uri\fR, or NULL if not needed. If no base URI is given, the \fIuri\fP is used. This method depends on the raptor_www subsystem (see \fBWWW Class\fR section below) and an existing underlying URI retrieval implementation such as libcurl, libxml or BSD libfetch to retrieve the content. .SH "PARSER CHUNKED PARSING METHODS" These methods perform the parsing in parts by working on multiple chunks of memory passed by the application. Statements warnings, errors and fatal errors are delivered via the registered statement, error etc. handler functions. .IP "\fBint raptor_start_parse(raptor_parser* \fIparser\fB, const char *\fIuri\fB)\fR" Start a parse of chunked content with the base URI \fIuri\fR or NULL if not needed. The base URI is required for the RDF/XML parser (name "rdfxml") and Turtle parser (name "turtle"). The N-Triples parser (name "ntriples") or RSS Tag Soup parser (name "rss-tag-soup") do not use this. .IP "\fBint raptor_parse_chunk(raptor_parser* \fIparser\fB, const unsigned char *buffer, size_t \fIlen\fB, int \fIis_end\fB)\fR" Parse the memory at \fIbuffer\fP of size \fIlen\fP returning statements via the statement handler callback. If \fIis_end\fP is non-zero, it indicates the end of the parsing stream. This method can only be called after \fBraptor_start_parse()\fP. .SH "PARSER UTILITY METHODS" .IP "\fBconst char* raptor_get_mime_type(raptor_parser* \fIrdf_parser\fB)\fR" Return the MIME type for the parser. .IP "\fBvoid raptor_set_parser_strict(raptor_parser *\fIparser\fB, int \fIis_strict\fB)\fR" Set the parser to strict (\fIis_strict\fP not zero) or lax (default) mode. The detail of the strictness can be controlled by raptor_set_feature. .IP "\fBint raptor_set_feature(raptor_parser *\fIparser\fB, raptor_feature \fIfeature\fB, int \fIvalue\fB)\fR" Set a parser feature \fIfeature\fP to a particular \fIvalue\fR. Returns non 0 on failure or if the feature is unknown. The current defined parser features are: \fIFeature Values\fP \fBRAPTOR_FEATURE_ALLOW_BAGID\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_ASSUME_IS_RDF\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_CHECK_RDF_ID\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_HTML_LINK\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_HTML_TAG_SOUP\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_MICROFORMATS\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_NON_NFC_FATAL\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_NORMALIZE_LANGUAGE\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_NO_NET\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_RELATIVE_URIS\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_SCANNING\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_WARN_OTHER_PARSETYPES\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_WWW_TIMEOUT\fP Integer \fBRAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL\fP String \fBRAPTOR_FEATURE_WWW_HTTP_USER_AGENT\fP String .P If the \fIallow_bagid\fP feature is true (default true) then the RDF/XML parser will support the rdf:bagID attribute that was removed from the RDF/XML language when it was revised. This support may be removed in future. .P If the \fIallow_non_ns_attributes\fP feature is true (default true), then the RDF/XML parser will allow non-XML namespaced attributes to be accepted as well as rdf: namespaced ones. For example, 'about' and 'ID' will be interpreted as if they were rdf:about and rdf:ID respectively. .P If the \fIallow_other_parsetypes\fP feature is true (default true) then the RDF/XML parser will allow unknown parsetypes to be present and will pass them on to the user. Unimplemented at present. .P If the \fIallow_rdf_type_rdf_list\fP feature is true (default false) then the RDF/XML parser will generate the idList rdf:type rdf:List triple in the handling of rdf:parseType="Collection". This triple was removed during the revising of RDF/XML after collections were initially added. .P If the \fIassume_is_rdf\fP feature is true (default false), then the RDF/XML parser will assume the content is RDF/XML, not require that rdf:RDF root element, and immediately interpret the content as RDF/XML. .P If the \fIcheck_rdf_id\fP feature is true (default true) then rdf:ID values will be checked for duplicates and cause an error if found. .P if the \fIhtml_link\fP feature is true (default true), look for head <link> to type rdf/xml for GRDDL parser .P If the \fIhtml_tag_soup\fP feature is true (default true), use a lax HTML parser if an XML parser fails when read HTML for GRDDL parser. .P If the \fImicroformats\fP feature is true (default true), look for microformats for GRDDL parser. .P If the \fInon_nfc_fatal\fP feature is true (default false) then illegal Unicode Normal Form C in literals will give a fatal error, otherwise it gives a warning. .P If the \fInormalize_language\fP feature is true (default true) then XML language values such as from xml:lang will be normalized to lowercase. .P If the \fIno_net\fP feature is true (default false) then network requests are denied. .P If the \fIscanning\fP feature is true (default false), then the RDF/XML parser will look for embedded rdf:RDF elements inside the XML content, and not require that the XML start with an rdf:RDF root element. .P If the \fIwww_timeout\fP feature is set to an integer larger than 0, it sets the timeout in seconds for internal WWW URI requests for the GRDDL parser. .P If the \fIwww_http_cache_control\fP feature is set to a string value (default none), it is sent as the value of the HTTP Cache-Control: header in requests. .P If the \fIwww_http_user_agent\fP feature is set to a string value, it is sent as the value of the HTTP User-Agent: header in requests. .IP "\fBraptor_parser_set_feature_string(raptor_parser *\fIparser\fP, raptor_feature \fIfeature\fP, const unsigned char *\fIvalue\fP)\fR" Set a parser feature \fIfeature\fP to a particular string \fIvalue\fP. Returns non 0 on failure or if the feature is unknown. The current defined parser features are given in \fBraptor_set_feature\fP and at present only take integer values. If an integer value feature is set with this function, \fIvalue\fP is interpreted as an integer and then that value is used. .IP "\fBint raptor_get_feature(raptor_parser* \fIparser\fB, raptor_feature \fIfeature\fB)\fR" Get parser feature integer values. The allowed \fIfeature\fP values and types are given under \fBraptor_features_enumerate\fP. .IP "\fBconst unsigned char* raptor_parser_get_feature_string(raptor_parser *\fIparser\fP, raptor_feature \fIfeature\fP)\fR" Get parser feature string values. The allowed \fIfeature\fP values and types are given under \fBraptor_features_enumerate\fP. .IP "\fBunsigned int raptor_get_feature_count(void)\fR" Get the count of features defined. Prefered to the compile time-only symbol \fBRAPTOR_FEATURE_LAST\fP which returns the maximum value, not the count. Added raptor_get_need_base_uri .IP "\fBint raptor_feature_value_type(const raptor_feature feature)\fR" Get a raptor feature value tyype - integer or string. .IP "\fBraptor_locator* raptor_get_locator(raptor_parser* \fIrdf_parser\fB)\fR" Return the current raptor_locator object for the parser. This is a public structure defined in raptor.h that can be used directly, or formatted via raptor_print_locator. .IP "\fBvoid raptor_get_name(raptor_parser *\fIparser\fB\fB)\fR" Return the string short name for the parser. .IP "\fBvoid raptor_get_label(raptor_parser *\fIparser\fB\fB)\fR" Return a string label for the parser. .IP "\fBvoid raptor_set_default_generate_id_parameters(raptor_parser* \fIrdf_parser\fB, char *\fIprefix\fB, int \fIbase\fB)\fR" Control the default method for generation of IDs for blank nodes and bags. The method uses a short string \fIprefix\fP and an integer \fIbase\fP to generate the identifier which is not guaranteed to be a strict concatenation. If \fIprefix\fP is NULL, the default is used. If base is less than 1, it is initialised to 1. .IP "\fBvoid raptor_set_generate_id_handler(raptor_parser* \fIparser\fB, void *\fIuser_data\fB, raptor_generate_id_handler \fIhandler\fB)\fR" Allow full customisation of the generated IDs by setting a callback \fIhandler\fP and associated \fIuser_data\fP that is called whenever a blank node or bag identifier is required. The memory returned is deallocated inside raptor. Some systems require this to be allocated inside the same library, in which case the \fBraptor_alloc_memory\fP function may be useful. .IP "\fBvoid raptor_parser_set_uri_filter(raptor_parser* \fIparser\fP, raptor_uri_filter_func \fIfilter\fP, void* \fIuser_data\fP)\fR" Set the URI filter function \fIfilter\fP for URIs retrieved during parsing by the the raptor_parser. .IP "\fBint raptor_get_need_base_uri(raptor_parser* \fIrdf_parser\fP)\fR" Get a boolean whether this parser needs a base URI to start parsing. .IP "\fBunsigned char* raptor_parser_generate_id(raptor_parser* \fIrdf_parser\fP, raptor_genid_type \fItype\fP)\fR" Generate an ID for a parser of type \fItype\fP, either \fBRAPTOR_GENID_TYPE_BNODEID\fP or \fBRAPTOR_GENID_TYPE_BAGID\fP. This uses any configuration set by \fBraptor_set_generate_id_handler\fP. .IP "\fBvoid raptor_set_graph_handler(raptor_parser* \fIparser\fP, void* \fIuser_data\fP, raptor_graph_handler \fIhandler\fP)\fR" Set the graph handler callback. .IP "\fBraptor_world* raptor_parser_get_world(raptor_parser* \fIrdf_parser\fP)\fR" Get the world object for the given \fIrdf_parser\fP. .SH "PARSER UTILITY FUNCTIONS" .IP "\fBint raptor_parsers_enumerate(const unsigned int \fIcounter\fB, const char **\fIname\fB, const char **\fIlabel\fB)\fR" Return the parser name/label for a parser with a given integer counter, returning non-zero if no such parser at that offset exists. The counter should start from 0 and be incremented by 1 until the function returns non-zero. .IP "\fBint raptor_syntaxes_enumerate(const unsigned int \fIcounter\fB, const char **name, const char **\fIlabel\fB, const char **\fImime_type\fB, const unsigned char **\fIuri-string\fB)\fR" Return the name, label, mime type or URI string (all optional) for a parser syntax with a given integer counter, returning non-zero if no such syntax parser at that offset exists. The counter should start from 0 and be incremented by 1 until the function returns non-zero. .IP "\fBint raptor_features_enumerate(const raptor_feature \fIfeature\fP, const char **\fIname\fP, raptor_uri **\fIuri\fP, const char **\fIlabel\fP)\fR" Return the name, URI, string label (all optional) for a parser \fIfeature\fP, returning non-zero if no such feature exists. .P Raptor features have URIs that are constructed from the URI \fIhttp://feature.librdf.org/raptor-\fP and the \fIname\fP so for example feature \fIscanForRDF\fP has URI \fIhttp://feature.librdf.org/raptor-scanForRDF\fP .IP "\fBint raptor_syntax_name_check(const char *\fIname\fP)\fR" Check \fIname\fP is a known syntax name. .IP "\fBconst char* raptor_guess_parser_name(raptor_uri *\fIuri\fP, const char *\fImime_type\fP, const unsigned char *\fIbuffer\fP, size_t \fIlen\fP, const unsigned char *\fIidentifier\fP)\fR" Guess a parser name for a syntax identified by URI \fIuri\fP, MIME type \fImime_type\fP, some initial content \fIbuffer\fP of size \fIlen\fP or with content identifier \fIidentifier\fP. All of these parameters are optional and only used if not NULL. The parser is chosen by scoring the hints that are given. .IP "\fBraptor_feature raptor_feature_from_uri(raptor_uri *\fIuri\fP)\fR" Turn a URI \fIuri\fP into a raptor feature identifier, or <0 if the feature is unknown. The URIs are described below raptor_set_feature. .SH "STATEMENT UTILITY FUNCTIONS" .IP "\fBint raptor_statement_compare(const raptor_statement *\fIs1\fP, const raptor_statement *\fIs2\fP)\fR" Compare two statements and return an ordering between them. .IP "\fBvoid raptor_print_statement(const raptor_statement* const \fIstatement\fB, FILE *\fIstream\fB)\fR" Print a raptor statement object in a simple format for debugging only. The format of this output is not guaranteed to remain the same between releases. .IP "\fBvoid raptor_print_statement_as_ntriples(const raptor_statement* \fIstatement\fB, FILE *\fIstream\fB)\fR" Print a raptor statement object in N-Triples format, using all the escapes as defined in .UR http://www.w3.org/TR/rdf-testcases/#ntriples http://www.w3.org/TR/rdf-testcases/#ntriples .UE .IP "\fBraptor_statement_part_as_counted_string(const void *\fIterm\fB, raptor_identifier_type \fItype\fB, raptor_uri* \fIliteral_datatype\fB, const unsigned char *\fIliteral_language\fB, size_t* \fIlen_p\fB)\fR" .IP "\fBchar* raptor_statement_part_as_string(const void *\fIterm\fB, raptor_identifier_type \fItype\fB, raptor_uri* \fIliteral_datatype\fB, const unsigned char *\fIliteral_language\fB)\fR" Turns part of raptor statement into N-Triples format, using all the escapes as defined in .UR http://www.w3.org/TR/rdf-testcases/#ntriples http://www.w3.org/TR/rdf-testcases/#ntriples .UE The part (subject, predicate, object) of the raptor_statement is passed in as \fIterm\fP, the part type (subject_type, predicate_type, object_type) is passed in as \fItype\fP. When the part is a literal, the \fIliteral_datatype\fP and \fIliteral_language\fP fields are set, otherwise NULL (usually object_datatype, object_literal_language). .IP If \fBraptor_statement_part_as_counted_string\fP is used, the length of the returned string is stored in *\fIlen_p\fP if not NULL. .SH "LOCATOR UTILITY FUNCTIONS" .IP "\fBint raptor_format_locator(char *\fIbuffer\fB, size_t \fIlength\fB, raptor_locator* \fIlocator\fB)\fR" This method takes a \fIraptor_locator\fP object as passed to an error, warning or other handler callback and formats it into the \fIbuffer\fP of size \fIlength\fP bytes. If \fIbuffer\fP is NULL or \fIlength\fP is insufficient for the size of the formatted locator, returns the number of additional bytes required in the buffer to write the locator. In particular, if this form is used: length=raptor_format_locator(NULL, 0, locator) it will return in \fIlength\fP the size of a buffer that can be allocated for \fIlocator\fP and a second call will perform the formatting: raptor_format_locator(buffer, length, locator) .IP "\fBvoid raptor_print_locator(FILE *\fIstream\fB, raptor_locator* \fIlocator\fB)\fR" This method takes a \fIraptor_locator\fP object as passed to an error, warning or other handler callback, formats and prints it to the given stdio \fIstream\fP. .IP "\fBint raptor_locator_line(raptor_locator *locator)\fR" Returns the line number in a locator structure or <0 if not available. .IP "\fBint raptor_locator_column(raptor_locator *locator)\fR" Returns the column number in a locator structure or <0 if not available. .IP "\fBint raptor_locator_byte(raptor_locator *locator)\fR" Returns the byte offset in a locator structure or <0 if not available. .IP "\fBconst char * raptor_locator_file(raptor_locator *locator)\fR" Returns the filename in a locator structure or NULL if not available. Note the returned pointer is to a shared string that must be copied if needed. .IP "\fBconst char * raptor_locator_uri(raptor_locator *locator)\fR" Returns the URI string in a locator structure or NULL if not available. Note this does not return a raptor_uri* pointer and the returned pointer is to a shared string that must be copied if needed. .SH "N-TRIPLES UTILITY FUNCTIONS" .IP "\fBvoid raptor_print_ntriples_string(FILE* \fIstream\fB, const char* \fIstring\fB, const char \fIdelim\fB)\fR" This is a standalone function that prints the given string according to N-Triples escaping rules, expecting to be terminated by delimiter \fIdelim\fP which is usually either ', \(dq or <. If a null delimiter \\0 is given, no extra escaping is performed. .IP "\fBint raptor_iostream_write_string_ntriples(raptor_iostream *\fIiostr\fP, const unsigned char *\fIstring\fP, size_t \fIlen\fP, const char \fIdelim\fP)\fR" Write an N-Triples encoded version of the given string to iostream \fIiostr\fP. If \fIdelim\fP is given, that is the ending delimeter of the encoded string and it will be escaped in the output as appropriate. Useful delim values are ', \(dq and >. If a null delimiter \\0 is given, no extra escaping is performed. .IP "int raptor_iostream_write_string_python(raptor_iostream *\fIiostr\fP, const unsigned char *\fIstring\fP, size_t \fIlen\fP, const char \fIdelim\fP, int \fIflags\fP)\fR" Write \fIstring\fP encoded to an iostream according to the delimeter \fIdelim\fP and encoding flags. The \fIflag\fP value selects formatting according to the appropriate Python-related languages such as N-Triples (0), Turtle (1), Turtle long quoted string (2), JSON (3). .IP "\fBvoid raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement)\fR" Write an N-Triples encoded version of the raptor_statement \fIstatement\fP to iostream \fIiostr\fP. .IP "\fBvoid raptor_iostream_write_string_turtle(raptor_iostream* \fIiostr\fP, const unsigned char* \fIstring\fP, size_t \fIlen\fP)\fR" DEPRECATED in 1.4.17 - use raptor_iostream_write_string_python instead. Write an UTF-8 \fIstring\fP of length \fIlen\fP using the Turtle "longString" triple quoting format to the iostream \fIiostr\fP. .IP "\fBconst char* raptor_ntriples_term_as_string (raptor_ntriples_term_type \fIterm\fP)\fR" Deprecated, for internal use. .SH "XML UTILITY FUNCTIONS" .IP "\fBint raptor_xml_any_escape_string(const unsigned char* \fIstring\fP, size_t \fIlen\fP, unsigned char* \fIbuffer\fP, size_t \fIlength\fP, char \fIquote\fP, int \fIxml_version\fP, raptor_simple_message_handler \fIerror_handler\fP, void* \fIerror_data\fP)\fR" .IP "\fBint raptor_xml_escape_string(const unsigned char *\fIstring\fB, size_t \fIlen\fB, unsigned char *\fIbuffer\fB, size_t \fIlength\fB, char \fIquote\fB, raptor_message_handler \fIerror_handler\fB, void *\fIerror_data\fB)\fR" Apply the XML escaping rules to the string given in (string, len) into the \fIbuffer\fP of size \fIlength\fP. If \fIquote\fP is given, the escaped content is for an XML attribute and the appropriate quote character \" or \' is used, otherwise it is XML element content (CDATA). The \fIerror_handler\fP method along with \fIerror_data\fP allow error reporting to be given. If buffer is NULL, returns the size of the buffer required to escape. Otherwise the return value is the number of bytes used or <0 on failure. .IP When an \fIxml_version\fP argument is present and has a value 10 (XML 1.0) or 11 (XML 1.1) then that version is used. The default with no argument is to generate XML 1.0. .IP "\fBint raptor_iostream_write_xml_any_escaped_string(raptor_iostream* \fIiostr\fP, const unsigned char* \fIstring\fP, size_t \fIlen\fP, char \fIquote\fP, int \fIxml_version\fP, raptor_simple_message_handler \fIerror_handler\fP, void* \fIerror_data\fP)\fR" .IP "\fBint raptor_iostream_write_xml_escaped_string(raptor_iostream* \fIiostr\fB, const unsigned char *\fIstring\fB, size_t \fIlen\fB, char \fIquote\fB, raptor_simple_message_handler \fIerror_handler\fB, void *\fIerror_data\fB)\fR" Write an XML-escaped version of the string given in (string, len) to iostream \fIiostr\fP. If \fIquote\fP is given, the escaped content is for an XML attribute and the appropriate quote character \" or \' is used, otherwise it is XML element content (CDATA). The \fIerror_handler\fP method along with \fIerror_data\fP allow error reporting to be given. .IP When an \fIxml_version\fP argument is present and has a value 10 (XML 1.0) or 11 (XML 1.1) then that version is used. The default with no argument is to generate XML 1.0. .IP "\fBint raptor_xml_name_check(const unsigned char *\fIstring\fP, size_t \fIlength\fP, int xml_version)\fR" Check that the given \fIstring\fP of \fIlength\fP bytes is a legal XML name according to XML 1.0 or XML 1.1. \fIxml_version\fP is set to 10 or 11 respectively. Returns non-zero if the name is legal. .SH "MEMORY UTILITY FUNCTIONS" .IP "\fBvoid raptor_free_memory(void *\fIptr\fP)\fR" Free memory allocated inside raptor. Some systems require memory allocated in a library to be deallocated inside that library. This function can be used in that situation to free memory allocated by raptor, such as the result of the \fI_to_\fP methods that return allocated memory such as \fBraptor_uri_to_filename\fP, \fBraptor_uri_to_string\fP, \fBraptor_uri_to_relative_counted_uri_string\fP, \fBraptor_uri_to_relative_uri_string\fP or \fBraptor_new_namespace_parts_from_string\fP. .IP "\fBvoid* raptor_alloc_memory(size_t \fIsize\fP)\fR" Allocate memory inside the raptor library. Some systems require memory allocated in a library to be deallocated inside that library. This function can be used in that situation to allocate memory for raptor to free later, such as inside the handler function declared with \fBraptor_set_generate_id_handler\fP which returns new memory. .IP "\fBvoid* raptor_calloc_memory(size_t \fInmemb\fP, size_t \fIsize\fP)\fR" Allocate zeroed array of items inside raptor. Some systems require memory allocated in a library to be deallocated inside that library. This function can be used in that situation to clear an array of allocated memory for raptor to use, for freeing later, such as inside the handler function declared with \fBraptor_set_generate_id_handler\fP which returns new memory. .SH "UNICODE UTILITY FUNCTIONS" .IP "\fBint raptor_unicode_char_to_utf8(raptor_unichar \fIc\fP, unsigned char *\fIoutput\fP)\fR" Turn a Unicode character into UTF8 bytes in \fIoutput\fP of size \fIc\fP bytes which must be of sufficient size. Returns the number of bytes encoded or <0 on failure. .IP "\fBint raptor_utf8_to_unicode_char(raptor_unichar *\fIoutput\fP, const unsigned char *\fIinput\fP, int \fIlength\fP)\fR" Decode a sequence UTF8 bytes in \fIinput\fP of size \fIlength\fP into a Unicode character in \fIoutput\fP returning the number of bytes used or <0 on failure. .IP "\fBint raptor_utf8_check(const unsigned char *\fIstring\fP, size_t \fIlen\fPgth)\fR" Check that a given \fIstring\fP is legal UTF-8 encoding and includes only legal Unicode characters U+0 to U+0x10ffff inclusive. Returns non-0 if the string is good. .IP "\fBint raptor_unicode_is_xml11_namestartchar(raptor_unichar \fIc\fP)\fR" .IP "\fBint raptor_unicode_is_xml10_namestartchar(raptor_unichar \fIc\fP)\fR" .IP "\fBint raptor_unicode_is_xml11_namechar(raptor_unichar \fIc\fP)\fR" .IP "\fBint raptor_unicode_is_xml10_namechar(raptor-unichar \fIc\fP)\fR" Check that given Unicode characters are allowed as XML 1.0 or XML 1.0 names - either as the starting character (\fB*_namestartchar\fP) or continuing character (\fB*_namechar\fP). Returns non-0 if the character is allowed. .SH "ERROR UTILITY FUNCTIONS" .IP "\fBvoid raptor_error_handlers_init(raptor_error_handlers* \fIerror_handlers\fP)\fR" Initialise an error_handlers structure after the log level handlers and user data pointers have been set. .SH "MISCELLANEOUS UTILITY FUNCTIONS" .IP "\fBchar* raptor_vsnprintf(const char *message, va_list arguments)\fR" Compatibility wrapper around vsnprintf. .SH "STATIC VARIABLES" There are several read-only static variables in the raptor library: .IP "\fBconst char * const raptor_short_copyright_string\fR" Short copyright string, suitable for one line. .IP "\fBconst char * const raptor_copyright_string\fR" Full copyright over several lines including URLs. .IP "\fBconst char * const raptor_version_string\fR" The version as a string .IP "\fBconst unsigned int raptor_version_major\fR" The major version number as an integer. .IP "\fBconst unsigned int raptor_version_minor\fR" The minor version number as an integer. .IP "\fBconst unsigned int raptor_version_release\fR" The release version number as an integer. .IP "\fBconst unsigned int raptor_version_decimal\fR" The version number as a single decimal. .IP "\fBconst char * const raptor_license_string\fR" The license string over several lines including URLs. .IP "\fBconst char * const raptor_home_url_string\fR" The home page URL as a string. .SH "SERIALIZER CLASS" This class provides the functionality of turning RDF triples into syntaxes - RDF serializing. .SH "SERIALIZER CONSTRUCTOR" .IP "\fBraptor_serializer* raptor_new_serializer(const char *\fIname\fP)\fR" Create a new raptor serializer object for the serializer with name \fIname\fR currently either "rdfxml" or "ntriples". or "rss-1.0" for the RSS 1.0 serializer. .SH "SERIALIZER DESTRUCTOR" .IP "\fBvoid raptor_free_serializer(raptor_serializer* \fIrdf_serializer\fB)\fR" Destroy a Raptor serializer object. .SH "SERIALIZER SERIALIZING METHODS" .IP "\fBint raptor_serialize_start(raptor_serializer* \fIrdf_serializer\fB, raptor_uri *\fIuri\fP, raptor_iostream *\fIiostream\fP)\fR" Start to serialize content using the given \fIiostream\fP to write to with optional base URI \fIuri\fP. The \fIiostream\fP becomes owned by the serializer object and is destroyed at the end of serializing when raptor_serialize_end() is called. Note that some syntaxes may refuse to serialize without a base URI, such as RDF/XML. .IP "\fBint raptor_serialize_start_to_iostream(raptor_serializer* \fIrdf_serializer\fP, raptor_uri* \fIuri\fP, raptor_iostream* \fIiostream\fP)\fR" Start to serialize content using the given \fIiostream\fP to write to with optional base URI \fIuri\fP. The \fIiostream\fP does NOT become owned by the serializer object and the caller may continue to write to it after serializing is finished. Note that some syntaxes may refuse to serialize without a base URI, such as RDF/XML. .IP "\fBint raptor_serialize_start_to_filename(raptor_serializer* \fIrdf_serializer\fB, const char *\fIfilename\fP)\fR" Start to serialize content to the file \fIfilename\fP which is opened for writing. The base URI is calculated from the file name. .IP "\fBint raptor_serialize_start_to_string(raptor_serializer* \fIrdf_serializer\fB, raptor_uri *\fIuri\fP, void **\fIstring_p\fP, size_t *\fIlength_p\fP)\fR" Start to serialize content to a string. \fIstring_p\fP must point to a void* pointer that will be used at the end of serializing to store the newly allocated string. \fIlength_p\fP if not NULL, it will be used to store the length of the new string. The serializing is done with optional base URI \fIuri\fP however some syntaxes may refuse to serialize without a base URI, such as RDF/XML. .IP "\fBint raptor_serialize_start_to_file_handle(raptor_serializer* \fIrdf_serializer\fB, raptor_uri *\fIuri\fP, FILE *\fIhandle\fP)\fR" Start to serialize content to the already open C Standard I/O FILE* \fIhandle\fP with the base URI \fIuri\fP, which is optional and may be NULL. Note that some syntaxes may refuse to serialize without a base URI, such as RDF/XML. .IP "\fBint raptor_serialize_statement(raptor_serializer* \fIrdf_serializer\fB, const raptor_statement *\fIstatement\fP)\fR" Serialize a single \fIstatement\fP using the serializer. .IP "\fBint raptor_serialize_end(raptor_serializer* \fIrdf_serializer\fB)\fR" End the serializing. This may close and delete resources used in serializing. No more calls to raptor_serialize_statement or raptor_serialize_end may be done at this point. .IP "\fBraptor_iostream* raptor_serializer_get_iostream(raptor_serializer *\fIserializer\fP)\fR" Return a pointer to the raptor_iostream* used by the serializer. .IP "\fBint raptor_serializer_set_namespace(raptor_serializer* \fIserializer\fP, raptor_uri *\fIuri\fP, const char *\fIprefix\fP)\fR" Set a suggested namespace URI/prefix mapping for use in serializing. .SH "SERIALIZER UTILITY METHODS" .IP "\fBvoid raptor_serializer_set_error_handler(raptor_serializer* \fIserializer\fB, void *\fIuser_data\fB, raptor_message_handler \fIhandler\fB)\fR" Set the serializer non-fatal error handler callback. .IP "\fBvoid raptor_serializer_set_warning_handler(raptor_serializer* \fIserializer\fB, void *\fIuser_data\fB, raptor_message_handler \fIhandler\fB)\fR" Set the serializer warning message handler callback. .IP "\fBraptor_locator* raptor_serializer_get_locator(raptor_serializer* \fIrdf_serializer\fB)\fR" Return the current raptor_locator object for the serializer. This is a public structure defined in raptor.h that can be used directly, or formatted via raptor_print_locator. .IP "\fBint raptor_serializer_set_feature(raptor_serializer *\fIserializer\fB, raptor_feature \fIfeature\fB, int \fIvalue\fB)\fR" Set a serializer feature \fIfeature\fP to a particular \fIvalue\fP. Returns non 0 on failure or if the feature is unknown. The current defined serializer features are: \fIFeature Values\fP \fBRAPTOR_FEATURE_RELATIVE_URIS\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_WRITE_BASE_URI\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_START_URI\fP URI String \fBRAPTOR_FEATURE_BNODE_BORDER\fP String \fBRAPTOR_FEATURE_BNODE_FILL\fP String \fBRAPTOR_FEATURE_JSON_CALLBACK\fP String \fBRAPTOR_FEATURE_JSON_EXTRA_DATA\fP String \fBRAPTOR_FEATURE_LITERAL_BORDER\fP String \fBRAPTOR_FEATURE_LITERAL_FILL\fP String \fBRAPTOR_FEATURE_RESOURCE_BORDER\fP String \fBRAPTOR_FEATURE_RESOURCE_FILL\fP String \fBRAPTOR_FEATURE_RSS_TRIPLES\fP String \fBRAPTOR_FEATURE_ATOM_ENTRY_URI\fP String .P If the \fIrelative_uris\fP feature is true (default false) then when serialising, preference is given to generating relative URIs where possible. .P If the \fIwrite_base_uri\fP feature is true (default true) then the atom, rdfxml, rdfxml-abbrev and turtle serializers will write an @base or xml:base directive in the output. .P If the \fIstart_uri\fP feature is set to a URI it is used by the serializer to start serializing from. .P If the \fIbnode_border\fP feature is set, the DOT serializer uses it as the bnode border colour. .P If the \fIbnode_fill\fP feature is set, the DOT serializer uses it as the bnode fill colour. .P If the \fIjson_callback\fP feature is set, the JSON serializers use it as the name of the callback to wrap the outer JSON object. .P If the \fIjson_extra_data\fP feature is set, the JSON serializers use it as extra data inside the outer JSON object. .P If the \fIliteral_border\fP feature is set, the DOT serializer uses it as the literal border colour. .P If the \fIliteral_fill\fP feature is set, the DOT serializer uses it as the literal fill colour. .P If the \fIresource_border\fP feature is set, the DOT serializer uses it as the resource border colour. .P If the \fIresource_fill\fP feature is set, the DOT serializer uses it as the resource fill colour. .P If the \fIrss_triples\fP feature is set to the string "rdf-xml" for the rss-1.0 serializer or "atom-triples" for the atom serializer, it writes extra rdf triples into the serialized output. .P If the \fIatom_entry_uri\fP feature is set to a URI string, it is used to trigger generation of an atom entry document for the atom serializer. .IP "\fBint raptor_serializer_get_feature(raptor_serializer* \fIserializer\fB, raptor_feature \fIfeature\fB)\fR" Get serializer features, the allowed \fIfeature\fP values are available .IP "\fBraptor_world* raptor_serializer_get_world(raptor_serializer* \fIrdf_serializer\fP)\fR" Get the world object for the given \fIrdf_serializer\fP. .SH "SERIALIZER UTILITY FUNCTIONS" .IP "\fBint raptor_serializers_enumerate(const unsigned \fIint counter\fB, const char **\fIname\fB, const char **\fIlabel\fB, const char **\fImime_type\fB, const unsigned char **\fIuri_string\fB)\fR" Return the serializer name/label for a serializer with a given integer counter, returning non-zero if no such parser at that offset exists. The counter should start from 0 and be incremented by 1 until the function returns non-zero. .IP "\fBint raptor_serializer_syntax_name_check(const char *\fIname\fB)\fR" Check \fIname\fP is a known serializer syntax name. .SH "URI CLASS" Raptor has a raptor_uri class must be used for manipulating and passing URI references. The default internal implementation uses char* strings for URIs, manipulating them and constructing them. This URI implementation can be replaced by any other that provides the equivalent functionality, using the \fBraptor_uri_set_handler\fP function. .SH "URI CONSTRUCTORS" There a several constructors for raptor_uri to build them from char* strings and existing raptor_uri objects. .IP "\fBraptor_uri* raptor_new_uri(const unsigned char* \fIuri_string\fB)\fR" Create a raptor URI from a string URI-reference \fIuri_string\fP. .IP "\fBraptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri* \fIuri\fB, const unsigned char* \fIlocal_name\fB)\fR" Create a raptor URI from a string URI-reference \fIlocal_name\fP relative to an existing URI-reference. This performs concatenation of the \fIlocal_name\fP to the \fIuri\fP and not relative URI resolution, which is done by the raptor_new_uri_relative_to_base constructor. .IP "\fBraptor_uri* raptor_new_uri_relative_to_base(raptor_uri* \fIbase_uri, const unsigned char* \fIuri_string\fB)\fR" Create a raptor URI from a string URI-reference \fIuri_string\fP using relative URI resolution to the \fIbase_uri\fP. .IP "\fBraptor_uri* raptor_new_uri_from_id(raptor_uri* \fIbase_uri\fB, const unsigned char* \fIid\fB)\fR" Create a raptor URI from a string RDF ID \fIid\fP concatenated to the \fIbase_uri\fP base URI. .IP "\fBraptor_uri* raptor_new_uri_for_rdf_concept(const char* \fIname\fB)\fR" Create a raptor URI for the RDF namespace concept \fIname\fP. .IP "\fBraptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* \fIold_uri\fB))\fR" Create a raptor URI suitable for use with xml:base (throw away fragment) .SH "URI DESTRUCTOR" .IP "\fBvoid raptor_free_uri(raptor_uri* \fIuri\fB)\fR" Destroy a raptor URI object. .SH "URI METHODS" .IP "\fBint raptor_uri_equals(raptor_uri* \fIuri1\fB, raptor_uri* \fIuri2\fB)\fR" Return non-zero if the given URIs are equal. .IP "\fBraptor_uri* raptor_uri_copy(raptor_uri* \fIuri\fB)\fR" Return a copy of the given raptor URI \fIuri\fP. .IP "\fBunsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p)\fR" .IP "\fBunsigned char* raptor_uri_as_string(raptor_uri* \fIuri\fB)\fR" Return a shared pointer to a string representation of the given raptor URI \fIuri\fP. This string is shared and must not be freed (otherwise see the \fBraptor_uri_to_*\fP methods below). If \fBraptor_uri_as_counted_string\fP is used, the length of the returned string is stored in *\fIlen_p\fP if not NULL. .IP "\fBunsigned char* raptor_uri_to_counted_string(raptor_uri *\fIuri\fP, size_t *\fIlen_p\fP)\fR" .IP "\fBunsigned char* raptor_uri_to_string(raptor_uri *\fIuri\fP)\fR" Return a to a newly alloced string representation of the given raptor URI \fIuri\fP. This string must be freed by the caller using \fBraptor_free_memory\fP. If \fBraptor_uri_to_counted_string\fP is used, the length of the returned string is stored in *\fIlen_p\fP if not NULL. .IP "\fBunsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *\fIbase_uri\fB, raptor_uri *\fIreference_uri\fB, size_t *\fIlength_p\fB)\fR" .IP "\fBunsigned char* raptor_uri_to_relative_uri_string(raptor_uri *\fIbase_uri\fB, raptor_uri *\fIreference_uri\fB)\fR" Return a new relative URI string of a URI \fIreference_uri\fI against a base URI \fIbase_uri\fP. The returned string must be freed with \fBraptor_free_memory\fP. If \fBraptor_uri_to_relative_counted_string\fP is used, the length of the returned string is stored in *\fIlen_p\fP if not NULL. .IP "\fBvoid raptor_uri_print(const raptor_uri* \fIuri\fP, FILE *\fIstream\fP)\fR" Print URI \fIuri\fP to the file handle \fIstream\fP. .IP "\fBint raptor_iostream_write_uri(raptor_iostream* \fIiostr\fP, raptor_uri* \fIuri\fP)\fR" Write the raptor_uri \fIuri\fP to the iostream \fIostr\fP. .SH "URI UTILITY FUNCTIONS" .IP "\fBvoid raptor_uri_resolve_uri_reference (const unsigned char* \fIbase_uri\fB, const unsigned char* \fIreference_uri\fB, char unsigned* \fIbuffer\fB, size_t \fIlength\fB)\fR" This is a standalone function that resolves the relative URI \fIreference_uri\fP against the base URI \fIbase_uri\fP according to the URI resolution rules in RFC2396. The resulting URI is stored in \fIbuffer\fP which is of \fIlength\fP bytes. If this is too small, no work will be done. .IP "\fBchar *raptor_uri_filename_to_uri_string(const unsigned char* \fIfilename\fB)\fR" This is a standalone function that turns a local filename (Windows or Unix style as appropriate for platform) into a URI string (file). The returned string must be freed by the caller. Some systems require memory allocated in a library to be deallocated inside that library in which case \fBraptor_free_memory\fP may be used. .IP "\fBchar *raptor_uri_uri_string_to_filename(const unsigned char* \fIuri_string\fB)\fR" .IP "\fBchar *raptor_uri_uri_string_to_filename(const unsigned char* \fIuri_string\fB, unsigned char **\fIfragment_p\fP)\fR" These are standalone functions that turn a URI string that represents a local filename (file:) into a filename, with optional URI fragment. If \fIfragment_p\fP is not NULL it points to the location to store a newly allocated string containing the fragment. The returned strings must be freed by the caller. Some systems require memory allocated in a library to be deallocated inside that library in which case \fBraptor_free_memory\fP may be used. .IP "\fBint raptor_uri_is_file_uri(const unsigned char* \fIuri_string\fB)\fR" DEPRECATED in 1.4.9. Returns non-zero if the given URI string represents a filename. Use \fBraptor_uri_uri_string_is_file_uri\fP in preference. .IP "\fBint raptor_uri_uri_string_is_file_uri(const unsigned char* \fIuri_string\fP)\fR" Returns non-zero if the given URI string represents a filename. .SH "URI CLASS IMPLEMENTATION" .IP "\fBvoid raptor_uri_set_handler(const raptor_uri_handler *\fIhandler\fB, void *\fIcontext\fB)\fR" Change the URI class implementation to the functions provided by the \fIhandler\fP URI implementation. The \fIcontext\fP user data is passed in to the handler URI implementation calls. .IP "\fBvoid raptor_uri_get_handler(raptor_uri_handler **\fIhandler\fB, void **\fIcontext\fB)\fR" Return the current raptor URI class implementation \fIhandler\fP and \fIcontext\fP .SH "WWW CLASS" This is a small wrapper class around existing WWW libraries in order to provide HTTP GET or better URI retrieval for Raptor. It is not intended to be a general purpose WWW retrieval interface. .SH "WWW CLASS INITIALISATION AND CLEANUP" .IP "\fBvoid raptor_www_init(void)\fR" .IP "\fBvoid raptor_www_finish(void)\fR" Initialise or terminate the raptor_www infrastructure. raptor_www_init and raptor_finish are called by raptor_init and raptor_finish respecitively, otherwise must be called once each. .IP NOTE Several of the WWW library implementations require once-only initialisation and termination functions to be called, however raptor cannot determine whether this is already done before the library is initialised in \fBraptor_www_init\fP or terminated in \fBraptor_www_finish\fP, so always performs it. This can be changed by \fBraptor_www_no_www_library_init_finish\fP. .IP "\fBvoid raptor_www_no_www_library_init_finish(void)\fR" If this is called before \fBraptor_www_init\fP, it will not call the underlying WWW library global initialise or terminate functions. The application code must perform both operations. .IP For example with curl, after this function is called, neither \fBcurl_global_init\fP nor \fBcurl_global_cleanup\fP will be called during \fBraptor_www_init\fP or \fBraptor_www_finish\fP respectively. .SH "WWW CONSTRUCTORS" .IP "\fBraptor_www *raptor_www_new(void)\fR" .IP "\fBraptor_www *raptor_www_new_with_connection(void* \fIconnection\fB)\fR" Create a raptor WWW object capable of URI retrieval. If \fIconnection\fP is given, it must match the connection object of the underlying WWW implementation. At present, this is only for libcurl, and allows you to re-use an existing curl handle, or use one which has been set up with some desired qualities. .SH "WWW DESTRUCTOR" .IP "\fBvoid raptor_www_free(raptor_www *\fIwww\fB)\fR" Destroy a raptor WWW object. .SH "WWW METHODS" .IP "\fBvoid raptor_www_set_user_agent(raptor_www *\fIwww\fB, const char *\fIuser_agent\fB)\fR" Set the HTTP User-Agent header value. .IP "\fBint raptor_www_set_http_cache_control(raptor_www* \fIwww\fP, const char* \fIcache_control\fP)\fR" Set the HTTP Cache-Control header value. .IP "\fBvoid raptor_www_set_proxy(raptor_www *\fIwww\fB, const char *\fIproxy\fB)\fR" Set the HTTP proxy - usually a string of the form http://server:port .IP "\fBraptor_www_set_write_bytes_handler(raptor_www *\fIwww\fB, raptor_www_write_bytes_handler \fIhandler\fB, void *\fIuser_data\fB)\fR" Set the handler to receive bytes written by the raptor_www implementation. .IP "\fBvoid raptor_www_set_content_type_handler(raptor_www *\fIwww\fB, raptor_www_content_type_handler \fIhandler\fB, void *\fIuser_data\fB)\fR" Set the handler to receive the HTTP Content-Type value, when/if discovered during retrieval by the raptor_www implementation. .IP "\fBvoid raptor_www_set_http_accept(raptor_www *\fIwww\fP, const char *\fIvalue\fP)\fR" Set the WWW HTTP Accept: header to \fIvalue\fP. If \fIvalue\fP is NULL, an empty header is sent. .IP "\fBvoid raptor_www_set_error_handler(raptor_www *www\fB, raptor_message_handler \fIerror_handler\fB, void *\fIerror_data\fB)\fR" Set the error handler routine for the raptor_www class. This takes the same arguments as the raptor_parser error, warning handler methods. .IP "\fBvoid raptor_www_set_uri_filter(raptor_www* \fIwww\fP, raptor_uri_filter_func \fIfilter\fP, void* \fIuser_data\fP)\fR" Set the URI filter function \fIfilter\fP for URIs retrieved by the raptor_www object. .IP "\fBvoid* raptor_www_get_connection(raptor_www *\fIwww\fB)\fR" Return the underlying WWW library connection object. For example, for libcurl this is the curl_handle. .IP "\fBvoid raptor_www_set_connection_timeout(raptor_www* \fIwww\fP, int \fItimeout\fP)\fR" Set the WWW connection \fItimeout\fP in seconds. .IP "\fBraptor_uri* raptor_www_get_final_uri(raptor_www* \fIwww\fP)\fR" Get the final URI from a WWW retrieval, which may include redirections. .SH "WWW ACTION METHODS" .IP "\fBint raptor_www_fetch(raptor_www *www, raptor_uri *uri)\fR" Retrieve the given URL, returning non zero on failure. .IP "\fBint raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size))\fR" Retrieve the given URL to a string. \fIstring_p\fP must point to a void* pointer that will be used to store the newly allocated string. \fIlength_p\fP if not NULL, it will be used to store the length of the new string. .IP "\fBvoid raptor_www_abort(raptor_www *www, const char *reason)\fR" Abort an ongoing raptor WWW operation. Typically used within one of the raptor WWW handlers. .SH "QNAME CLASS" This is a class for handling XML QNames consisting of the pair of (a URI from a namespace, a local name) along with an optional value -- useful for XML attributes. This is used with the raptor_namespace_stack and raptor_namespace classes to handle a stack of raptor_namespace that build on raptor_qname. .SH "QNAME CONSTRUCTORS" There are two constructors for raptor_qname to build qnames with optional values on a stack of names. .IP "\fBraptor_qname* raptor_new_qname(raptor_namespace_stack *\fInstack\fB, const unsigned char *\fIname\fB, const unsigned char *\fIvalue\fB, raptor_simple_message_handler \fIerror_handler\fB, void *\fIerror_data\fB)\fR" Create a raptor QName \fIname\fP (a possibly :-separated name) with name to be resolved against the given \fInstack\fP namespace stack. An optional \fIvalue\fP can be given, and if there is an error, the \fIerror_handler\fB and \fIerror_data\fP will be used to invoke the callback. .IP "\fBraptor_qname* raptor_new_qname_from_namespace_local_name (raptor_namespace *\fIns\fB, const unsigned char *\fIlocal_name\fB, const unsigned char *\fIvalue\fB)\fR" Create a raptor QName using the namespace name of the raptor_namespace \fIns\fP and the local name \fIlocal_name\fP, along with optional value \fIvalue\fP. Errors are reported using the error handling and data of the namespace. .IP "\fBraptor_qname* raptor_qname_copy(raptor_qname *\fIqname\fP)\fR" Create a raptor QName from an existing one, returning NULL on failure. .SH "QNAME DESTRUCTOR" .IP "\fBvoid raptor_free_qname(raptor_qname* \fIname\fB)\fR" Destroy a raptor qname object. .SH "QNAME METHODS" .IP "\fBint raptor_qname_equal(raptor_qname* \fIname1\fP, raptor_qname *\fIname2\fP)\fR" Return non-zero if the given QNames are equal. .IP "\fBint raptor_iostream_write_qname(raptor_iostream* \fIiostr\fP, raptor_qname *\fIqname\fP)\fR" Write the raptor_qname \fIqname\fP to the iostream \fIostr\fP. .IP "\fBconst unsigned char* raptor_qname_get_local_name(raptor_qname* \fIname\fP)\fR" Get the local name of the QName. .IP "\fBconst unsigned char* raptor_qname_get_value(raptor_qname* \fIname\fP)\fR" Get the value of the QName for an XML attribute QName. .IP "\fBconst unsigned char* raptor_qname_get_counted_value(raptor_qname* \fIname\fP, size_t* \fIlength_p\fP)\fR" Get the value fo the QName along with the length (if \fIlength_p\fP is not NULL) for an XML attribute QName. .IP "\fBunsigned char* raptor_qname_to_counted_name(raptor_qname* \fIqname\fP, size_t* \fIlength_p\fP)\fR" Get the formatted QName as a newly allocated counted string (if \fIlength_p\fP is not NULL). .SH "QNAME UTILITY FUNCTIONS" .IP "\fBraptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *\fInstack\fB, const unsigned char *\fIname\fB, size_t \fIname_len\fB, raptor_simple_message_handler \fIerror_handler\fB, void *\fIerror_data\fB)\fR" Return the URI corresponding to the QName according to the RDF method; concatenating the namespace's name (URI) with the local name. Takes the same arguments as \fBraptor_new_qname\fP but does not create a raptor_qname object. .IP "\fBraptor_namespace* raptor_qname_get_namespace(raptor_qname* \fIname\fB)\fR" Return the raptor_namespace used by the QName. Will never be NULL even for the default namespace in which case the URI of the returned namespace object will be NULL. .SH "NAMESPACE CLASS" An XML namespace class - each entry is on a stack and consists of a name (URI) and prefix. The prefix or the name but not both may be empty. If the prefix is empty, it defines the default prefix. If the name is empty, it undefines the given prefix. .SH "NAMESPACE CONSTRUCTORS" .IP "\fBraptor_namespace* raptor_new_namespace(raptor_namespace_stack *\fInstack\fP, const unsigned char *\fIprefix\fP, const unsigned char *\fIns_uri_string\fP, int \fIdepth\fP)\fR" .IP "\fBraptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *\fInstack\fP, const unsigned char *\fIprefix\fP, raptor_uri* \fIns_uri\fP, int \fIdepth\fP)\fR" Create a new raptor_namespace object on the given namespace stack \fInstack\fP with prefix \fIprefix\fP and namespace name either from URI string \fIns_uri_string\fP or from copying URI \fIns_uri\fP. .P If \fIprefix\fP is NULL, it defines the URI for the default namespace prefix. If the namespace name (\fIns_uri_string\fP or \fIns_uri\fP) is NULL, it undefines the given \fIprefix\fP in the current scope. Both prefix and URI may be NULL to undefine the default namespace. \fIdepth\fP signifies the position of the namespace on the stack; 0 is the bottom of the stack and generally the first depth for user namespace declarations. .P Namespaces declared on the same depth (such as on the same XML element, typically) can be handily freed with \fIraptor_namespaces_end_for_depth\fP method on the namespace stack class. .SH "NAMESPACE DESTRUCTOR" .IP "\fBvoid raptor_free_namespace(raptor_namespace *ns)\fR" Destroy a raptor namespace object. .SH "NAMESPACE METHODS" .IP "\fBraptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns)\fR" Return the namespace name (URI) of the namespace. .IP "\fBconst unsigned char* raptor_namespace_get_prefix(const raptor_namespace *ns)\fR" Return the prefix of the namespace. .IP "\fBconst unsigned char* raptor_namespace_get_counted_prefix(const raptor_namespace* \fIns\fP, size_t* \fIlength_p\fP)\fR" Return the prefix of the namespace as a string with optional count stored in the variable address \fIlength_p\fP if it is not NULL. .IP "\fBunsigned char *raptor_namespaces_format(const raptor_namespace *ns, size_t *length_p)\fR" Format the namespace as a string and return it as a new string, returning the length of the resulting string in \fIlength_p\fP if it is not NULL. The string format is suitable for emitting in XML to declare the namespace. .IP "\fBint raptor_iostream_write_namespace(raptor_iostream* \fIiostr\fP, raptor_namespace *\fIns\fP)\fR" Write a formatted namespace declaration like xmlns... to an iostream \fIiostr\fP. .SH "NAMESPACE UTILITY FUNCTIONS" .IP "\fBint raptor_namespace_copy(raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth)\fR" Copy the namespace from the current stack to the new one, \fInstack\fP at depth \fInew_depth\fP. .IP "\fBint raptor_new_namespace_parts_from_string(unsigned char *\fIstring\fP, unsigned char **\fIprefix\fP, unsigned char **\fIuri_string\fP)\fR" Parse \fIstring\fP with an XML-style namespace declaration like xmlns="", xmlns="uri", xmlns:prefix="" or xmlns:prefix="uri" into the strings pointed to by \fIprefix\fP string and a \fIuri_string\fP. Empty prefixes or namespace names return NULL pointers. Returned strings must be freed by the caller using \fBraptor_free_memory\fP. .SH "NAMESPACE STACK CLASS" A stack of raptor_namespace objects where the namespaces on top of the stack have wider scope and override earlier (lower) namespace declarations. Intended to match the XML namespace declaring semantics using xmlns attributes. .SH "NAMESPACE STACK CONSTRUCTORS" .IP "\fBraptor_namespace_stack* raptor_new_namespaces(raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults)\fR" .IP "\fBint raptor_namespaces_init(raptor_namespace_stack *nstack, raptor_uri_handler *handler, void *context, raptor_simple_message_handler error_handler, void *error_data, int defaults)\fR" Create or initialise a new raptor_namespace_stack object with the given URI and error handlers. \fBraptor_namespaces_new\fP allocates new memory for the namespace stack and \fBraptor_namespaces_init\fP initialises an existing declared \fInstack\fP, which could be statically allocated. Note that \fBraptor_uri_get_handler\fP can be useful to return the current raptor URI handler/context. The \fIdefaults\fP argument describes which default namespaces are declared in the empty stack. At present, 0 is none, 1 for just the XML namespace and 2 is for a typical set of namespaces used for RDF, RDFS, Dublin Core, OWL, ... that may vary over time. .IP In versions 1.4.16 or newer this returns an integer result, non-0 on failure. .SH "NAMESPACE STACK DESTRUCTORS" .IP "\fBvoid raptor_free_namespaces(raptor_namespace_stack *nstack)\fR" Destroy a namespace stack object, freeing the \fInstack\fP (goes with \fBraptor_new_namespaces\fP). .IP "\fBvoid raptor_namespaces_clear(raptor_namespace_stack *nstack)\fR" Clear a statically allocated namespace stack; does not free the \fInstack\fP. (goes with \fBraptor_namespaces_init\fP). .SH "NAMESPACE STACK METHODS" .IP "\fBvoid raptor_namespaces_start_namespace(raptor_namespace_stack *nstack, raptor_namespace *nspace)\fR" Start the given \fInspace\fR on the stack, at the depth already defined. .IP "\fBint raptor_namespaces_start_namespace_full(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *nspace, int depth)\fR" Create a new raptor_namespace and start it on the stack. See \fBraptor_new_namespace\fP for the meaning of the argumens. .IP "\fBvoid raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int depth)\fR" End (and free) all namespaces on the stack at the given \fIdepth\fP. .IP "\fBraptor_namespace* raptor_namespaces_get_default_namespace (raptor_namespace_stack *nstack)\fR" Return the current default raptor_namespace of the namespace stack or NULL if there is none. .IP "\fBraptor_namespace* raptor_namespaces_find_namespace_by_uri(raptor_namespace_stack *\fInstack\fP, raptor_uri *\fIns_uri\fP)\fR" Find the first namespace on the stack with the given uri \fIns_uri\fP or NULL if there is none. .IP "\fBraptor_namespace *raptor_namespaces_find_namespace_by_uri(raptor_namespace_stack *nstack, const unsigned char *prefix, int prefix_length)\fR" Find the first namespace on the stack with the given namespace \fIprefix\fP or NULL if there is none. .IP "\fBint raptor_namespaces_namespace_in_scope(raptor_namespace_stack *nstack, const raptor_namespace *nspace)\fR" Return non-zero if the raptor_namespace \fInspace\fP is declared on the stack; i.e. in scope if this is a stack of XML namespaces. .SH "NAMESPACE STACK UTILITY FUNCTIONS" .IP "\fBraptor_qname* raptor_namespaces_qname_from_uri(raptor_namespace_stack* \fInstack\fP, raptor_uri* \fIuri\fP, int \fIxml_version\fP)\fR" Create a raptor QName from the URI \fIuri\fP if the URI is squal one of the namespace URIs on the namespace stack \fInstack\fP URIs concatenated to a legal XML name for the given XML version. URIs are created and errors are reported using the namespace stack fields. Fails if it cannot be legally described with any of the namespaces. .SH "SEQUENCE CLASS" A class for ordered sequences of items, adding at either end of the sequence. The method names should be familiar to Perl users. .SH "SEQUENCE CONSTRUCTOR" .IP "\fBraptor_sequence* raptor_new_sequence(raptor_sequence_free_handler* \fIfree_handler\fP, raptor_sequence_print_handler* \fIprint_handler\fP)\fR" Create a new empty sequence, with optional handler for freeing elements (as used by \fBraptor_free_sequence\fP and printing out elements (used by \fBraptor_sequence_print\fP). .SH "SEQUENCE DESTRUCTOR" .IP "\fBvoid raptor_free_sequence(raptor_sequence* \fIseq\fP)\fR" Destoy a sequence object, freeing any items if the free handler was defined in the constructor. .SH "SEQUENCE METHODS" .IP "\fBint raptor_sequence_size(raptor_sequence* \fIseq\fP)\fR" Return the number of items in the sequence. .IP "\fBint raptor_sequence_set_at(raptor_sequence* \fIseq\fP, int \fIidx\fP, void *data)\fR" Set the sequence item at index \fIidx\fP to the value \fIdata\fP, extending it if necessary. .IP "\fBint raptor_sequence_push(raptor_sequence* \fIseq\fP, void *\fIdata\fP)\fR" Add item \fIdata\fP to the end of the sequence. .IP "\fBint raptor_sequence_shift(raptor_sequence* \fIseq\fP, void *\fIdata\fP)\fR" Add item \fIdata\fP to the start of the sequence. .IP "\fBvoid* raptor_sequence_get_at(raptor_sequence* \fIseq\fP, int \fIidx\fP)\fR" Get the sequence item at index \fIidx\fP or NULL if no such index exists. .IP "\fBvoid* raptor_sequence_pop(raptor_sequence* \fIseq\fP)\fR" Remove and return an item from the end of the sequence, or NULL if is empty. .IP "\fBvoid* raptor_sequence_unshift(raptor_sequence* \fIseq\fP)\fR" Remove and return an item from the start of the sequence, or NULL if is empty. .IP "\fBvoid raptor_sequence_sort(raptor_sequence* \fIseq\fP, int(*\fIcompare\fP)(const void *, const void *))\fR" Sort the sequence using the given comparison function \fIcompare\fP which is passed to qsort(3) internally. .IP "\fBint raptor_compare_strings(const void *\fIa\fP, const void *\fIb\fP)\fR" Helper function useful with \fBraptor_sequence_sort\fP. .IP "\fBvoid raptor_sequence_set_print_handler(raptor_sequence *\fIseq\fP, raptor_sequence_print_handler *\fIprint_handler\fP)\fR" Set the print handler for the sequence, an alternative to setting it in the constructor. .IP "\fBvoid raptor_sequence_print_string(char *\fIdata\fP, FILE *\fIfh\fP)\fR" Helper print handler function useful for printing out sequences of strings. .IP "\fBvoid raptor_sequence_print_uri(char *\fIdata\fP, FILE *\fIfh\fP)\fR" Helper print handler function useful for printing out sequences of raptor_uri* objects. .IP "\fBvoid raptor_sequence_print(raptor_sequence* \fIseq\fP, FILE* \fIfh\fP)\fR" Print out the sequence in a debug format to the given file handler \fIfh\fP. NOTE: The exact format is not guaranteed to remain the same between releases. .IP "\fBint raptor_sequence_join(raptor_sequence* \fIdest\fP, raptor_sequence *\fIsrc\fP)\fR" Join two sequences moving all items from sequence \fIsrc\fP to the end of sequence \fIdest\fP. After this operation, sequence \fIsrc\fP will be empty (zero size) but will have the same item capacity as before. .IP "\fBvoid* raptor_sequence_delete_at(raptor_sequence* \fIseq\fP, int \fIidx\fP)\fR" Remove an item from position \fIidx\fP in the sequence, returning it. .SH "STRINGBUFFER CLASS" A class for growing strings, small chunks at a time. .SH "STRINGBUFFER CONSTRUCTOR" .IP "\fBraptor_stringbuffer* raptor_new_stringbuffer(void)\fR" Create a new stringbuffer. .SH "STRINGBUFFER DESTRUCTOR" .IP "\fBvoid raptor_free_stringbuffer(raptor_stringbuffer* \fIstringbuffer\fP)\fR" Destroy a stringbuffer. .SH "STRINGBUFFER METHODS" .IP "\fBint raptor_stringbuffer_append_counted_string(raptor_stringbuffer* \fIstringbuffer\fP, const unsigned char *\fIstring\fP, size_t \fIlength\fP, int \fIdo_copy\fP)\fR" Append a \fIstring\fP of \fIlength\fP bytes to a stringbuffer, copying it only if \fIdo_copy\fP is non-0. .IP "\fBint raptor_stringbuffer_append_string(raptor_stringbuffer* \fIstringbuffer\fP, const unsigned char* \fIstring\fP, int \fIdo_copy\fP)\fR" Append a \fIstring\fP to a stringbuffer, copying it only if \fIdo_copy\fP is non-0. .IP "\fBint raptor_stringbuffer_append_decimal(raptor_stringbuffer* \fIstringbuffer\fP, int \fIinteger\fP)\fR" Append a formatted decimal \fIinteger\fP to a stringbuffer. .IP "\fBint raptor_stringbuffer_append_stringbuffer(raptor_stringbuffer* \fIstringbuffer\fP, raptor_stringbuffer* \fIappend\fP)\fR" Append a stringbuffer \fIappend\fP to a stringbuffer. The append stringbuffer is emptied but not destroyed. .IP "\fBint raptor_stringbuffer_prepend_counted_string(raptor_stringbuffer* \fIstringbuffer\fP, const unsigned char* \fIstring\fP, size_t \fIlength\fP, int \fIdo_copy\fP)\fR" Prepend a \fIstring\fP of \fIlength\fP bytes to the start of a stringbuffer, copying it only if \fIdo_copy\fP is non-0. .IP "\fBint raptor_stringbuffer_prepend_string(raptor_stringbuffer* \fIstringbuffer\fP, const unsigned char* \fIstring\fP, int \fIdo_copy\fP)\fR" Prepend a \fIstring\fP to the start of a stringbuffer, copying it only if \fIdo_copy\fP is non-0. .IP "\fBunsigned char * raptor_stringbuffer_as_string(raptor_stringbuffer* \fIstringbuffer\fP)\fR" Return the stringbuffer as a single string. The string is shared and should be copied if needed. .IP "\fBsize_t raptor_stringbuffer_length(raptor_stringbuffer* \fIstringbuffer\fP)\fR" Return the length of the stringbuffer. .IP "\fBint raptor_stringbuffer_copy_to_string(raptor_stringbuffer* stringbuffer, unsigned char *\fIstring\fP, size_t \fIlen\fPgth)\fR" Copy the stringbuffer into a single string buffer \fIstring\fP of size \fIlength\fP. Returns non-0 on failure. .SH "IOSTREAM CLASS" This class provides an I/O stream that can write to filenames, FILE*, strings and user-defined output via callbacks. .SH "IOSTREAM CONSTRUCTOR" .IP "\fBraptor_iostream* raptor_new_iostream_from_handler2(void* \fIcontext\fB, const raptor_iostream_handler2 *\fIhandler\fP)\fR" Create a new raptor read or write iostream from a user-defined raptor_iostream_handler2 \fIhandler\fP that is called with the passed-in \fIcontext\fP for the write operations. .IP "\fBraptor_iostream* raptor_new_iostream_from_handler(void* \fIcontext\fB, const raptor_iostream_handler *\fIhandler\fB)\fR" DEPRECATED in 1.4.17 - use \fBraptor_new_iostream_from_handler2()\fP with the new handler format. Create a new raptor read iostream from a user-defined raptor_iostream_handler \fIhandler\fP that is called with the passed-in \fIcontext\fP for the write operations. .IP "\fBraptor_iostream* raptor_new_iostream_to_sink(void)\fR" Create a new raptor write iostream that discards all written output. .IP "\fBraptor_iostream* raptor_new_iostream_to_filename(const char *\fIfilename\fB)\fR" Create a new raptor write iostream that creates and writes to a new file \fIfilename\fP. .IP "\fBraptor_iostream* raptor_new_iostream_to_file_handle(FILE *\fIhandle\fB)\fR" Create a new raptor write iostream that creates and writes to an existing, already opened, C Standard I/O handle FILE* \fIhandle\fP. .IP "\fBraptor_iostream* raptor_new_iostream_to_string(void **\fIstring_p\fB, size_t *\fIlength_p\fB, void *(*\fImalloc_handler\fB)(size_t size))\fR" Create a new raptor write iostream which creates a new string once raptor_free_iostream is called. The new string pointer is written in \fIstring\fP, the length in \fIlength_p\fP (if not NULL) and the memory allocation is made using the \fImalloc_handler\fP, or if NULL, raptor's default memory allocator. .IP "\fBraptor_iostream* raptor_new_iostream_from_sink(void)\fR" Create a new raptor read iostream that is immediately finished and returns end of file. .IP "\fBraptor_iostream* raptor_new_iostream_from_filename(const char *\fIfilename\fP)\fR" Create a new raptor read iostream from an existing file \fIfilename\fP. .IP "\fBraptor_iostream* raptor_new_iostream_from_file_handle(FILE *\fIhandle\fP)\fR" Create a new raptor read iostream from an already opened, C Standard I/O handle FILE* \fIhandler\fP. .IP "\fBraptor_iostream* raptor_new_iostream_from_string(void *\fIstring\fP, size_t \fIlength\fP)\fR" Create a new raptor read iostream reading from an existing \fIstring\fP of \fIlength\fP bytes. .SH "IOSTREAM DESTRUCTOR" .IP "\fBvoid raptor_free_iostream(raptor_iostream *\fIiostr\fB)\fR" Destroy a Raptor iostream object. .SH "IOSTREAM METHODS" .IP "\fBint raptor_iostream_write_bytes(raptor_iostream *\fIiostr\fB, const void *\fIptr\fB, size_t \fIsize\fB, size_t \fInmemb\fB)\fR" Write a counted set of elements to an iostream. \Inmemb\fP is the count of elements of size \fIsize\fP, starting at memory \fIptr\fP. Similar to fwrite(3) and write(2). .IP "\fBint raptor_iostream_write_byte(raptor_iostream *\fIiostr\fB, const int \fIbyte\fB)\fR" Write a single \fIbyte\fP an iostream. Similar to fputc(3). .IP "\fBvoid raptor_iostream_write_end(raptor_iostream *\fIiostr\fB)\fR" Finish writing to an iostream. .IP "\fBint raptor_iostream_write_string(raptor_iostream *\fIiostr\fB, const void *\fIstring\fB)\fR" Write a NUL-terminated \fIstring\fP to an iostream. Similar to fputs(3). .IP "\fBint raptor_iostream_write_counted_string(raptor_iostream *\fIiostr\fB, const void *\fIstring\fB, size_t \fIlen\fB)\fR" Write a \fIstring\fP of length \fIlen\fP to an iostream. .IP "\fBunsigned long raptor_iostream_tell(raptor_iostream *\fIiostr\fP)\fR" Return the byte offset into the iostream. .IP "\fBsize_t raptor_iostream_get_bytes_written_count(raptor_iostream *\fIiostr\fB)\fR" DEPRECATED in 1.4.17 for \fBraptor_iostream_tell()\fP. Return the number of bytes written so far to the iostream. .IP "\fBint raptor_iostream_write_decimal(raptor_iostream *\fIiostr\fB, int \fIinteger\fB)\fR" Write a decimal formatted integer \fIinteger\fP to the iostream. .IP "\fBint raptor_iostream_format_hexadecimal(raptor_iostream *\fIiostr\fB, unsigned int \fIinteger\fB, int \fIwidth\fB)\fR" Write a hexadecimal formatted unsigned \fIinteger\fP to the iostream, left-padded with '0's to \fIwidth\fR columns. .IP "\fBint raptor_iostream_write_stringbuffer(raptor_iostream* \fIiostr\fB, raptor_stringbuffer *\fIsb\fB)\fR" Write the stringbuffer to an iostream \fIiostr\fP. .IP "\fBint raptor_iostream_read_bytes(raptor_iostream* \fIiostr\fP, void *\fIptr\fP, size_t \fIsize\fP, size_t \fInmemb\fP)\fR" Read bytes from the iostream into buffer \fIptr\fP up to \fInmemb\fP elements of size \fIsize\fP. .IP "\fBint raptor_iostream_read_eof(raptor_iostream *\fIiostr\fP)\fR" Return non-0 if the iostream is finished. .SH "XML SAX2 READER CLASS" This class provides the functionality to generate SAX2 events from parsing XML content, including XML namespace support. .SH "XML SAX2 CONSTRUCTOR" .IP "\fBraptor_sax2* raptor_new_sax2(void *\fIuser_data\fP, raptor_error_handlers* \fIerror_handlers\fP)\fR" Create a new SAX2 XML reader with the given error handler object. .SH "XML WRITER DESTRUCTOR" .IP "\fBvoid raptor_free_sax2(raptor_sax2 *\fIsax2\fP)\fR" Destroy a SAX2 XML reader object. .SH "SAX2 SET HANDLER METHODS" .IP "\fBvoid raptor_sax2_set_start_element_handler(raptor_sax2 *\fIsax2\fP, raptor_sax2_start_element_handler \fIhandler\fP)\fR" Set the SAX2 start element \fIhandler\fP. .IP "\fBvoid raptor_sax2_set_end_element_handler(raptor_sax2 *\fIsax2\fP, raptor_sax2_end_element_handler \fIhandler\fP)\fR" Set the SAX2 end element \fIhandler\fP. .IP "\fBvoid raptor_sax2_set_characters_handler(raptor_sax2 *\fIsax2\fP, raptor_sax2_characters_handler \fIhandler\fP)\fR" Set the SAX2 character data element \fIhandler\fP. .IP "\fBvoid raptor_sax2_set_cdata_handler(raptor_sax2 *\fIsax2\fP, raptor_sax2_cdata_handler \fIhandler\fP)\fR" Set the SAX2 CDATA section element \fIhandler\fP. .IP "\fBvoid raptor_sax2_set_comment_handler(raptor_sax2 *\fIsax2\fP, raptor_sax2_comment_handler \fIhandler\fP)\fR" Set the SAX2 XML comment \fIhandler\fP. .IP "\fBvoid raptor_sax2_set_unparsed_entity_decl_handler(raptor_sax2 *\fIsax2\fP, raptor_sax2_unparsed_entity_decl_handler \fIhandler\fP)\fR" Set the SAX2 XML unparsed entity declaration \fIhandler\fP. .IP "\fBvoid raptor_sax2_set_external_entity_ref_handler(raptor_sax2 *\fIsax2\fP, raptor_sax2_external_entity_ref_handler \fIhandler\fP)\fR" Set the SAX2 XML external entity reference \fIhandler\fP. .IP "\fBvoid raptor_sax2_set_namespace_handler(raptor_sax2 *\fIsax2\fP, raptor_namespace_handler \fIhandler\fP)\fR" Set the SAX2 XML namespace declaration \fIhandler\fP when an XML namespace is declared. .SH "SAX2 PARSING METHODS" .IP "\fBvoid raptor_sax2_parse_start(raptor_sax2 *\fIsax2\fP, raptor_uri *\fIbase_uri\fP)\fR" Start a SAX2 parse of XML content with the base URI \fIuri\fR. .IP "\fBint raptor_sax2_parse_chunk(raptor_sax2 *\fIsax2\fP, const unsigned char *\fIbuffer\fP, size_t \fIlen\fP, int \fIis_end\fP)\fR" Parse the XML content in \fIbuffer\fP of size \fIlen\fP returning SAX2 events via handlers. If \fIis_end\fP is non-zero, it indicates the end of the parsing. This method can only be called after \fBraptor_sax2_parse_start()\fP. .SH "SAX2 SCOPE METHODS" .IP "\fBconst unsigned char* raptor_sax2_inscope_xml_language(raptor_sax2 *\fIsax2\fP)\fR" Get the current in-scope XML language (xml:lang) value. .IP "\fBraptor_uri* raptor_sax2_inscope_base_uri(raptor_sax2 *\fIsax2\fP)\fR" Get the current in-scope Base URI (xml:base or document or protocol) value. .SH "XML ELEMENT CLASS" This class provides an XML element that can be used with the XML Writer Class to generate XML documents. .SH "XML ELEMENT CONSTRUCTORS" .IP "\fBraptor_xml_element* raptor_new_xml_element(raptor_qname* \fIname\fP, const unsigned char* \fIxml_language\fP, raptor_uri* \fIxml_base\fP)\fR" Create a new XML element with the element name \fIname\fP in the context of xml:lang \fIxml_language\fP and base URI \fIxml_base\fP. .IP "\fBraptor_xml_element* raptor_new_xml_element_from_namespace_local_name(raptor_namespace *\fIns\fP, const unsigned char *\fIname\fP, const unsigned char* \fIxml_language\fP, raptor_uri* \fIxml_base\fP\fR" Create a new XML element based on the given XML \fInamespace\fP and \fIlocalname\fP in the context of xml:lang \fIxml_language\FP and base URI \fIxml_base\fP. .SH "XML ELEMENT DESTRUCTOR" .IP "\fBvoid raptor_free_xml_element(raptor_xml_element *\fIelement\fP)\fR" Destroy a XML element object. .SH "XML ELEMENT METHODS" .IP "\fBraptor_qname* raptor_xml_element_get_name(raptor_xml_element* \fIxml_element\fP)\fR" Get the XML element QName of XML element \fIxml_element\fP. .IP "\fBvoid raptor_xml_element_set_attributes(raptor_xml_element* \fIxml_element\fP, raptor_qname **\fIattributes\fP, int \fIcount\fP)\fR" Set the attributes on XML element \fIxml_element\fP to the array of QNames in array \fIattributes\fP of size \fIcount\fP. .IP "\fBraptor_qname** raptor_xml_element_get_attributes(raptor_xml_element* \fIxml_element\fP)\fR" Get the attributes of an XML element \fIxml_element\fP as an array of QNames. As set by \fBvoid raptor_xml_element_set_attributes\fP. .IP "\fBint raptor_xml_element_get_attributes_count(raptor_xml_element* \fIxml_element\fP)\fR" Get the number of attributes of an XML element \fIxml_element\fP as set by \fBvoid raptor_xml_element_set_attributes\fP. .IP "\fBint raptor_xml_element_declare_namespace(raptor_xml_element* \fIxml_element\fP, raptor_namespace* \fInspace\fP)\fR" Declare an XML namespace \fInspace\fP expliclitly on XML element \fIxml_element\fP. Namespaces used in the element or attribute names are automatically declared, this method allows additional ones to be done. .IP "\fBint raptor_xml_element_is_empty(raptor_xml_element*\fI xml_element\fP)" Return non-0 if the XML element is empty. .IP "\fBint raptor_iostream_write_xml_element(raptor_iostream* \fIiostr\fP, raptor_xml_element *\fIelement\fP, raptor_namespace_stack* \fInstack\fP, int \fIis_empty\fP, int \fIis_end\fP, raptor_simple_message_handler \fIerror_handler\fP, void* \fIerror_data\fP, int \fIdepth\fP)\fR" Write a XML element \fIxml_element\fP to iostream \fIostr\fP. This is done in context of an XML namespace stack \fInstack\fP and at depth \fIdepth\fP in the stack (see Namespace class constructors). .IP The element may be an empty element if \fIis_empty\fP is non-zero or may be a close element if \fIis_end\fP is non-zero (else is a start element). The \fIerror_handler\fP method along with \fIerror_data\fP allow error reporting to be given. .IP "\fBconst unsigned char* raptor_xml_element_get_language(raptor_xml_element* \fIxml_element\fP)\fR" Get the xml:lang language of the XML element. .SH "XML WRITER CLASS" This class provides the functionality to generate simple XML documents consisting of elements with attributes, character data and comments. The documents can be written to an iostream. .SH "XML WRITER CONSTRUCTOR" .IP "\fBraptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack* \fInstack\fP, raptor_uri_handler* \fIuri_handler\fP, void* \fIuri_context\fP, raptor_iostream* \fIiostr\fP, raptor_simple_message_handler \fIerror_handler\fP, void *\fIerror_data\fP, int \fIcanonicalize\fP)\fR" Create a new XML Writer writing to iostream \fIiostr\fP. The \fIerror_handler\fP method along with \fIerror_data\fP allow error reporting to be given. \fInstack\fP is either an existing namespace stack to be used or if NULL, a new one with only the XML namespace defined is created. Note that \fBraptor_uri_get_handler\fP can be useful to return the current raptor URI handler/context. \fIcanonicalize\fP is currently unused and should be set to 1 but may allow non-canonical XML writing to be allowed in future. .SH "XML WRITER DESTRUCTOR" .IP "\fBvoid raptor_free_xml_writer(raptor_xml_writer* \fIxml_writer\fP)\fR" Destroy a XML Writer object. .SH "XML WRITER METHODS" .IP "\fBvoid raptor_xml_writer_empty_element(raptor_xml_writer* \fIxml_writer\fP, raptor_xml_element *\fIelement\fP)\fR" Write XML element \fIelement\fP as an empty element (no element content) to the XML Writer \fIxml_writer\fP. .IP "\fBvoid raptor_xml_writer_start_element(raptor_xml_writer* \fIxml_writer\fP, raptor_xml_element *\fIelement\fP)\fR" Write a start element along with an attributes and namespace declarations for XML element \fIelement\fP to the XML Writer \fIxml_writer\fP. .IP "\fBvoid raptor_xml_writer_end_element(raptor_xml_writer* \fIxml_writer\fP, raptor_xml_element *\fIelement\fP)\fR" Write an end element form for XML element \fIelement\fP to the XML Writer \fIxml_writer\fP. .IP "\fBvoid raptor_xml_writer_cdata(raptor_xml_writer* \fIxml_writer\fP, const unsigned char *str)\fR" Write XML character data in \fIstr\fP to the XML Writer \fIxml_writer\fP. The characters in \fIstr\fP will be XML escaped. .IP "\fBvoid raptor_xml_writer_cdata_counted(raptor_xml_writer* \fIxml_writer\fP, const unsigned char* \fIstr\fP, unsigned int \fIlength\fP)\fR" Write XML character data in \fIstr\fP of length \fIlength\fP to the XML Writer \fIxml_writer\fP. The characters in \fIstr\fP will be XML escaped. .IP "\fBvoid raptor_xml_writer_raw(raptor_xml_writer* \fIxml_writer\fP, const unsigned char* \fIstr\fP)\fR" Write character data in \fIstr\fP \fIlength\fP to the XML Writer \fIxml_writer\fP without XML escaping. .IP "\fBvoid raptor_xml_writer_raw_counted(raptor_xml_writer* \fIxml_writer\fP, const unsigned char* \fIstr\fP, unsigned int \fIlength\fP)\fR" Write character data in \fIstr\fP of length \fIlength\fP to the XML Writer \fIxml_writer\fP without XML escaping. .IP "\fBvoid raptor_xml_writer_comment(raptor_xml_writer* \fIxml_writer\fP, const unsigned char* \fIstr\fP)\fR" Write an XML comment in \fIstr\fP to the XML Writer \fIxml_writer\fP. .IP "\fBvoid raptor_xml_writer_comment_counted(raptor_xml_writer* \fIxml_writer\fP, const unsigned char* \fIstr\fP, unsigned int \fIlength\fP)\fR" Write an XML comment in \fIstr\fP of length \fIlength\fP to the XML Writer \fIxml_writer\fP. .IP "\fBint raptor_xml_writer_features_enumerate(const raptor_feature \fIfeature\fP, const char **\fIname\fP, raptor_uri **\fIuri\fP, const char **\fIlabel\fP)\fR" Return the name, URI, string label (all optional) for an XML write \fIfeature\fP, returning non-zero if no such feature exists. .P Raptor features have URIs that are constructed from the URI \fIhttp://feature.librdf.org/raptor-\fP and the \fIname\fP so for example feature \fIscanForRDF\fP has URI \fIhttp://feature.librdf.org/raptor-scanForRDF\fP .IP "\fBint raptor_xml_writer_set_feature(raptor_xml_writer* \fIxml_writer\fP, raptor_feature \fIfeature\fP, int \fIvalue\fP)\fR" Set an XML writer feature \fIfeature\fP to a particular \fIvalue\fP. Returns non 0 on failure or if the feature is unknown. The current defined writer features are: \fIFeature Values\fP \fBRAPTOR_FEATURE_WRITER_AUTO_INDENT\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_WRITER_AUTO_EMPTY\fP Boolean (non 0 true) \fBRAPTOR_FEATURE_WRITER_INDENT_WIDTH\fP Integer \fBRAPTOR_FEATURE_WRITER_XML_DECLARATION\fP Boolean (non 0 true) .P If the \fIwriter_auto_indent\fP feature is set (default true), the XML writer will automatically indent the output. .P If the \fIwriter_auto_empty\fP feature is set (default true), the XML writer will automatically generate empty elements if a start/end element sequence has no content. .P If the \fIwriter_indent_width\fP feature is set (default 2) if the XML writer is outputing indented XML, it will use that many spaces. .P If the \fIwriter_xml_declaration\fP feature is set (default true) the XML declaration is written at the start of serialized XML. .IP "\fBint raptor_xml_writer_set_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature, const unsigned char *value)\fR" Set an XML writer feature \fIfeature\fP to a particular string \fIvalue\fP. Returns non 0 on failure or if the feature is unknown. The current defined XML writer features are given in \fBraptor_xml_writer_set_feature\fP and at present only take integer values. If an integer value feature is set with this function, \fIvalue\fP is interpreted as an integer and then that value is used. .IP "\fBint raptor_xml_writer_get_feature(raptor_xml_writer* \fIxml_writer\fP, raptor_feature \fIfeature\fP)\fR" Get XML writer feature integer values. The allowed \fIfeature\fP values and types are given under \fBraptor_xml_writer_features_enumerate\fP. .IP "\fBconst unsigned char *raptor_xml_writer_get_feature_string(raptor_xml_writer* \fIxml_writer\fP, raptor_feature \fIfeature\fP)\fR" Get XML writer feature string values. The allowed \fIfeature\fP values and types are given under \fBraptor_xml_writer_features_enumerate\fP. .IP "\fBint raptor_xml_writer_get_depth(raptor_xml_writer* \fIxml_writer\fP)\fR" Get the current XML writer element stack depth. .IP "\fBvoid raptor_xml_writer_flush(raptor_xml_writer* \fIxml_writer\fP)\fR" Flush the XML writer output for any pending writes. .IP "\fBvoid raptor_xml_writer_newline(raptor_xml_writer* \fIxml_writer\fP)\fR" Write a newline to the XML writer (which may trigger indenting before the next item). .SH "WORLD CLASS" This class stores the library state and configuration. It will be the main class for initialsiing and configuring the library in Raptor 2.0. .SH "WORLD CLASS CONSTRUCTOR" .IP "\fBraptor_world* raptor_new_world(void)\fR" Create a new raptor library object. .SH "WORLD CLASS DESTRUCTOR" .IP "\fBvoid raptor_free_world(raptor_world* \fIworld\fP)\fR" Destroy a raptor library object and free all resources. .SH "WORLD CLASS METHODS" .IP "\fBint raptor_world_open(raptor_world* \fIworld\fP)\fR" Start using a raptor library - allocate any dependent resources. This is optional. .IP "\fBvoid raptor_world_set_libxslt_security_preferences(raptor_world *\fIworld\fP, void *security_preferences)\fR" See \fBraptor_set_libxslt_security_preferences()\fP description. .IP "\fBvoid raptor_world_set_libxml_flags(raptor_world *\fIworld\fP, int flags)\fR" See \fBraptor_set_libxml_flags()\fP description. .SH API CHANGES .SS 1.4.21 No changes. .SS 1.4.20 No changes. .SS 1.4.19 Added \fBraptor_world\fP class to prepare for V2 API with constructor \fBraptor_new_world()\fP, destructor \fBraptor_free_world()\fP and methods \fBraptor_world_open()\fP, \fBraptor_world_set_libxslt_security_preferences()\fP and \fBraptor_world_set_libxml_flags()\fP. .LP The \fBraptor_identifier\fP, \fBraptor_error_handlers\fP structs both gained a raptor_world* pointer field. .LP Added \fBraptor_set_libxslt_security_preferences()\fP and \fBraptor_set_libxml_flags()\fP. .LP Added \fBraptor_libxml_flags\fP enum for flags for \fBraptor_world_set_libxml_flags()\fP and \fBraptor_set_libxml_flags()\fP. .LP Added \fBRAPTOR_FEATURE_PREFIX_ELEMENTS\fP .LP .SS 1.4.18 Added atom serializer .LP Added rdfa parser .LP Added serializer features \fBRAPTOR_FEATURE_RSS_TRIPLES\fP and \fBRAPTOR_FEATURE_ATOM_ENTRY_URI\fP .LP Added \fBraptor_qname_to_counted_name()\fP .LP Added \fBraptor_serialize_start_to_iostream()\fP .LP Added \fBraptor_sequence_delete_at()\fP .LP Added \fBraptor_xml_writer_newline()\fP .LP Added \fBraptor_xml_writer_flush()\fP .LP Added \fBraptor_xml_writer_get_depth()\fP .SS 1.4.17 Added SAX2 class \fBraptor_sax2\fP. Added new SAX2 API typedefs: \fBraptor_sax2_start_element_handler\fP, \fBraptor_sax2_end_element_handler\fP, \fBraptor_sax2_characters_handler\fP, \fBraptor_sax2_cdata_handler\fP, \fBraptor_sax2_comment_handler\fP, \fBraptor_sax2_unparsed_entity_decl_handler\fP and \fBraptor_sax2_external_entity_ref_handler\fP. Added new SAX2 API functions: \fBraptor_new_sax2()\fP, \fBraptor_free_sax2()\fP, \fBraptor_sax2_set_start_element_handler()\fP, \fBraptor_sax2_set_end_element_handler()\fP, \fBraptor_sax2_set_characters_handler()\fP, \fBraptor_sax2_set_cdata_handler()\fP, \fBraptor_sax2_set_comment_handler()\fP, \fBraptor_sax2_set_unparsed_entity_decl_handler()\fP, \fBraptor_sax2_set_external_entity_ref_handler()\fP, \fBraptor_sax2_set_namespace_handler()\fP, \fBraptor_sax2_parse_start()\fP, \fBraptor_sax2_parse_chunk()\fP, \fBraptor_sax2_inscope_xml_language()\fP and \fBraptor_sax2_inscope_base_uri()\fP .LP Added features \fBRAPTOR_FEATURE_WRITE_BASE_URI\fP, \fBRAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL\fP, \fBRAPTOR_FEATURE_WWW_HTTP_USER_AGENT\fP, \fBRAPTOR_FEATURE_JSON_CALLBACK\fP and \fBRAPTOR_FEATURE_JSON_EXTRA_DATA\fP .LP Added \fBraptor_handler_closure\fP structure for error handlers. .LP Added \fBraptor_statement_compare()\fP .LP Added \fBraptor_iostream_write_string_python()\fP and deprecated \fBraptor_iostream_write_string_turtle()\fP .LP \fBraptor_uri_set_handler()\fP, \fBraptor_uri_get_handler()\fP, \fBraptor_new_namespaces()\fP, \fBraptor_namespaces_init()\fP and \fBraptor_new_xml_writer()\fP now take const handler pointers. .LP Added \fBraptor_www_set_http_cache_control()\fP .LP Added QName class methods: \fBraptor_qname_get_local_name()\fP, \fBraptor_qname_get_value()\fP and \fBraptor_qname_get_counted_value()\fP .LP Added \fBraptor_iostream\fP read handler typedefs \fBraptor_iostream_read_bytes_func\fP, \fBraptor_iostream_read_eof_func\fP and added new structure \fBraptor_iostream_handler2\fP replacing deprecated \fBraptor_iostream_handler\fP. .LP Added \fBraptor_new_iostream_from_handler2()\fP replacing deprecated \fBraptor_new_iostream_from_handler()\fP .LP Added \fBraptor_new_iostream_from_sink()\fP, \fBraptor_new_iostream_from_filename()\fP, \fBraptor_new_iostream_from_file_handle()\fP and \fBraptor_new_iostream_from_string()\fP. .LP Added \fBraptor_iostream_tell\fP deprecating \fBraptor_iostream_get_bytes_written_count()\fP. .LP Added \fBraptor_iostream_read_bytes()\fP and \fBraptor_iostream_read_eof()\fP. .LP Added \fBraptor_xml_element_get_language()\fP. .LP Added new enum \fBraptor_log_level\fP. .LP Added new typedef \fBraptor_error_handlers\fP. and new function \fBraptor_error_handlers_init()\fP. .SS 1.4.16 \fBraptor_namespaces_init()\fP now returns an integer status .LP Added \fBraptor_new_xml_element_from_namespace_local_name()\fP .LP Added \fBraptor_uri_compare()\fP. .LP Added new features for the 'grddl' parser: \fBRAPTOR_FEATURE_HTML_TAG_SOUP\fP, \fBRAPTOR_FEATURE_MICROFORMATS\fP and \fBRAPTOR_FEATURE_HTML_LINK\fP. .LP Added parser feature \fBRAPTOR_FEATURE_WWW_TIMEOUT\fP .LP Added raptor_graph_handler typedef and \fBraptor_set_graph_handler()\fP .LP Added raptor_www_final_uri_handler typedef and \fBraptor_www_set_final_uri_handler()\fP .LP Added \fBraptor_www_set_connection_timeout()\fP .LP Added \fBraptor_www_get_final_uri()\fP .SS 1.4.15 No changes. .SS 1.4.14 Add two new exported strings raptor_license_string and raptor_home_url_string. .LP Added new features for the 'dot' serializer: \fBRAPTOR_FEATURE_RESOURCE_BORDER\fP, \fBRAPTOR_FEATURE_LITERAL_BORDER\fP, \fBRAPTOR_FEATURE_BNODE_BORDER\fP, \fBRAPTOR_FEATURE_RESOURCE_FILL\fP, \fBRAPTOR_FEATURE_LITERAL_FILL\fP and \fBRAPTOR_FEATURE_BNODE_FILL\fP .LP Added \fBraptor_parser_generate_id()\fP .LP Added \fBraptor_iostream_write_string_turtle()\fP .SS 1.4.13 No API changes. .SS 1.4.12 No API changes. .SS 1.4.11 Added \fBraptor_get_feature_count()\fP .LP Added \fBraptor_get_need_base_uri()\fP .LP Added parser feature \fBRAPTOR_FEATURE_NO_NET\fP .LP Added \fBraptor_www_set_uri_filter()\fP, \fBraptor_parser_set_uri_filter()\fP with filter type \fBraptor_uri_filter_func\fP .SS 1.4.10 No API changes. .SS 1.4.9 Added \fBraptor_parser_get_accept_header()\fP .LP Added \fBraptor_xml_element_is_empty()\fP .LP Added \fBraptor_qname_get_namespace()\fP .LP Added \fBraptor_iostream_write_uri()\fP .LP Added \fBraptor_namespaces_qname_from_uri()\fP. .LP Added \fBraptor_namespace_get_counted_prefix()\fP .LP Added \fBraptor_serialize_set_namespace_from_namespace()\fP .LP Deprecated \fBraptor_uri_is_file_uri()\fP for new \fBraptor_uri_string_is_file_uri()\fP. .LP Added \fBraptor_xml_element_get_attributes()\fP and \fBraptor_xml_element_get_attributes_count()\fP .SS 1.4.8 Added \fBraptor_set_namespace_handler()\fP. .LP Added XML 1.1 serializing support, feature \fBRAPTOR_FEATURE_WRITER_XML_VERSION\fP with shortname \fIxmlVersion\fP for serializer and xml writer classes to support it. Added XML writer feature \fBRAPTOR_FEATURE_WRITER_XML_DECLARATION\fP to control generation of the XML declaration. Added new functions \fBraptor_xml_any_escape_string()\fP and \fBraptor_iostream_write_xml_any_escaped_string()\fP to allow generating XML 1.1 or XML 1.0. .LP \fBRAPTOR_IDENTIFIER_TYPE_PREDICATE\fP will no longer be generated from version 1.4.9 onwards as the type of returned statement predicates. \fBRAPTOR_IDENTIFIER_TYPE_RESOURCE\fP will be returned. .LP \fBRAPTOR_IDENTIFIER_TYPE_ORDINAL\fP may no longer be generated from version 1.4.9 onwards, \fBRAPTOR_IDENTIFIER_TYPE_RESOURCE\fP may replace it. .SS 1.4.7 No changes. .SS 1.4.6 No changes. .SS 1.4.5 Deprecated \fBraptor_ntriples_string_as_utf8_string()\fP (never documented above) since it can only work with a raptor_parser object which makes it rather unusable alone. .P Added XML writer features and support functions \fBraptor_xml_writer_features_enumerate()\fP, \fBraptor_xml_writer_set_feature()\fP, \fBraptor_xml_writer_set_feature_string()\fP, \fBraptor_xml_writer_get_feature()\fP and \fBraptor_xml_writer_get_feature_string()\fP .SS 1.4.3 Added XML Writer class (\fBraptor_xml_writer\fP) and XML Element class (\fBraptor_xml_element\fP) .P Added \fBraptor_parser_get_feature_string()\fP, \fBraptor_parser_set_feature_string()\fP, \fBraptor_serializer_set_feature_string()\fP, \fBraptor_serializer_get_feature_string()\fP and \fBraptor_feature_value_type()\fP. .P Added \fBraptor_serializer_set_namespace\fP, \fBraptor_serializer_set_feature()\fP and \fBraptor_serializer_get_feature()\fP. .P Added \fBraptor_new_namespace_from_uri()\fP, \fBraptor_new_namespace_parts_from_string()\fP, Added \fBraptor_namespaces_find_namespace_by_uri()\fP. and \fBraptor_iostream_write_namespace()\fP to write a namespace declaration to an iostream. .P Added copy constructor \fBraptor_qname_copy()\fP and \fBraptor_iostream_write_qname()\fP to write a qname to an iostream. .P Added \fBraptor_sequence_join()\fP to join two sequences, leaving one empty. .P Added \fBraptor_iostream_write_stringbuffer()\fP to write a stringbuffer to an iostream. .P Added N-Triples \fBraptor_iostream_write_string_ntriples()\fP and \fBraptor_iostream_write_statement_ntriples()\fP utility functions for writing to raptor_iostreams. .P Added \fBraptor_uri_to_relative_counted_uri_string()\fP, \fBraptor_uri_to_relative_uri_string()\fP. \fBraptor_uri_print()\fP, \fBraptor_uri_to_counted_string()\fP and \fBraptor_uri_to_string()\fP .P Added unicode name checking utility functions for XML 1.0 and XML 1.1 name starting character and continued name character. \fBraptor_unicode_is_xml10_namestartchar\fP \fBraptor_unicode_is_xml10_namechar\fP, \fBraptor_unicode_is_xml11_namechar\fP and \fBraptor_unicode_is_xml11_namestartchar\fP. .P Added \fBraptor_xml_name_check\fP to check if a name is a legal XML 1.0 or 1.0 name. and \fBraptor_iostream_write_xml_escaped_string\fP to write an XML-escaped string to an iostream. .P Added UTF8-checking utility function \fBraptor_utf8_check\fP. .SS 1.4.2 No changes. .SS 1.4.1 The \fBraptor_xml_escape_string\fP now returns <0 on failure rather than 0, so that if an empty string is escaped, 0 bytes required is returned. .SS 1.4.0 Added new \fBraptor_serializer\fP class supporting RDF/XML (name \fBrdfxml\fP) and N-Triples (name \fBntriples\fP). .br Added new \fBraptor_iostream\fP class .br Added \fBraptor_stringbuffer_copy_to_string\fP to allow efficient copy-out of a constructed string. .br Added \fBraptor_www_fetch_to_string\fP to allow retrieving of web content as a single string. .SS 1.3.3 Added \fBraptor_calloc_memory\fP to provide a calloc inside raptor. .br Added feature check_rdf_id (see raptor_set_feature documentation). .SS 1.3.2 Added \fBraptor_alloc_memory\fP to allocate memory inside raptor. .LP Added accessor functions for the public raptor_locator structure: .LP \fBraptor_locator_line\fP .br \fBraptor_locator_column\fP .br \fBraptor_locator_byte\fP .br \fBraptor_locator_file\fP .br \fBraptor_locator_uri\fP .SS 1.3.1 Correct raptor_print_statement declaration argument statement to have one less 'const', to match the code. .SS 1.3.0 Added the following parser methods, utility methods and helper functions: .LP \fBraptor_new_parser_for_content (Parser class constructor)\fP .br \fBraptor_get_mime_type\fP .br \fBraptor_get_feature\fP .br \fBraptor_syntax_name_check\fP .br \fBraptor_guess_parser_name\fP .br \fBraptor_features_enumerate\fP .br \fBraptor_feature_from_uri\fP .br \fBraptor_www_set_http_accept (WWW class)\fP .LP Changed \fBraptor_set_feature\fP to now return an int success or failure. .LP Added the following functions: .br \fBraptor_free_memory\fP .br \fBraptor_unicode_char_to_utf8\fP .br \fBraptor_utf8_to_unicode_char\fP .br \fBraptor_vsnprintf\fP .LP Added the raptor_sequence class, its constructor, destructor, methods and helper functions. .LP Added the raptor_stringbuffer class and constructor, destructor and methods. .LP Deprecated \fBraptor_print_statement_detailed\fP always intended to be internal. .SS 1.2.0 Added \fBraptor_syntaxes_enumerate\fP to get full information on syntax mime type and URIs as well as name and label. .LP N-Triples Plus parser renamed to Turtle (name turtle) .SS 1.1.0 Added N-Triples Plus parser (name ntriples-plus) .LP Made URI class constructors, methods and factory methods as well as some other utility functions using or returning URIs or literals take unsigned char* rather than char*. The affected calls are: .LP URI factory methods changed to all take/return unsigned char* for URI strings: .br \fBraptor_new_uri_func\fP .br \fBraptor_new_uri_from_local_name_func\fP .br \fBraptor_new_uri_relative_to_base_func\fP .br \fBraptor_uri_as_string_func\fP .br \fBraptor_uri_as_counted_string_func\fP .LP Constructors and methods changed to take/return unsigned char* for URI strings: .br \fBraptor_statement_part_as_counted_string\fP .br \fBraptor_statement_part_as_string\fP .br \fBraptor_new_uri\fP .br \fBraptor_new_uri_from_uri_local_name\fP .br \fBraptor_new_uri_relative_to_base\fP .br \fBraptor_uri_as_string\fP .br \fBraptor_uri_as_counted_string\fP .br \fBraptor_print_ntriples_string\fP .LP Changed to use unsigned char* for URI strings, char* for filenames: .br \fBraptor_uri_resolve_uri_reference\fP .br \fBraptor_uri_filename_to_uri_string\fP .br \fBraptor_uri_uri_string_to_filename\fP .br \fBraptor_uri_uri_string_to_filename_fragment\fP .br \fBraptor_uri_is_file_uri\fP .LP Changed to return unsigned char* for UTF8 string: .br \fBraptor_ntriples_string_as_utf8_string\fP .LP Added \fBraptor_parsers_enumerate\fP to discover supported parsers. .LP Added \fBraptor_uri_uri_string_to_filename_fragment\fP with fragment arg to return the URI fragment. .LP Made the raptor_namespace, raptor_namespace_stack and raptor_qname class and APIs public. .LP Added feature non_nfc_fatal (see raptor_set_feature documentation). .SS 1.0.0 Removed the following deprecated methods and functions (see 0.9.6 changes for the new names): .br \fBraptor_free\fP, \fBraptor_new\fP, \fBraptor_ntriples_free\fP, \fBraptor_ntriples_new\fP, \fBraptor_ntriples_parse_file\fP, \fBraptor_ntriples_set_error_handler\fP, \fBraptor_ntriples_set_fatal_error_handler\fP, \fBraptor_ntriples_set_statement_handler\fP and \fBraptor_parser_abort\fP. .LP Added \fBraptor_parse_file_stream\fP for reading FILE* streams without necessarily having a file. .SS 0.9.12 Added \fBraptor_new_uri_for_retrieval\fP to turn URI references into URIs suitable for retrieval (no fragments). .SS 0.9.11 Added \fBraptor_get_name\fP and \fBraptor_get_label\fP. .LP \fBraptor_xml_escape_string\fP now takes error message handler, data pointer, loses parser argument. .LP Added \fBraptor_set_default_generate_id_parameters\fP and \fBraptor_set_generate_id_handler\fP to control the default generation of IDs, allow full customisation. .SS 0.9.10 Added \fBraptor_set_parser_strict\fP and \fBraptor_www_no_www_library_init_finish\fP. .LP \fBraptor_xml_escape_string\fP now takes an output string length pointer. .LP Added \fBraptor_statement_part_as_counted_string\fP, \fBraptor_statement_part_as_string and \fBraptor_parse_abort\fP. .LP Deprecated \fBraptor_parser_abort\fP. .SS 0.9.9 Added raptor_www class and all its constructors, destructor, methods, calls. .LP Added \fBraptor_parse_uri\fP, \fBraptor_parser_abort\fP, \fBraptor_ntriples_term_as_string\fP and \fBraptor_xml_escape_string\fP. .SS 0.9.7 \fBraptor_parse_chunk, \fBraptor_new_uri_from_id\fP, arguments are now unsigned char. .LP Added \fBraptor_new_uri_for_xmlbase\fP. .SS 0.9.6 In this version, the raptor/ntriples parser calling APIs were modified. The following table lists the changes: .ta \w'raptor_ntriples_set_fatal_error_handler 'u+\n(Spu .LP \fIOLD API NEW API (0.9.6+)\fP .br \fBraptor_new()\fP \fBraptor_new_parser("rdfxml")\fP .br \fBntriples_new()\fP \fBraptor_new_parser("ntriples")\fP .br \fBraptor_free\fP \fBraptor_free_parser\fP .br \fBntriples_free\fP \fBraptor_ntriples_parser\fP .br \fBraptor_ntriples_parse_file\fP \fBraptor_parse_file\fP .br \fBraptor_ntriples_set_error_handler\fP \fBraptor_set_error_handler\fP .br \fBraptor_ntriples_set_fatal_error_handler\fP \fBraptor_set_fatal_error_handler\fP .br \fBraptor_ntriples_set_statement_handler\fP \fBraptor_set_statement_handler\fP .br .SH "CONFORMING TO" \fIRDF/XML Syntax (Revised)\fP, Dave Beckett (ed.) W3C Recommendation, .UR http://www.w3.org/TR/rdf-syntax-grammar/ http://www.w3.org/TR/rdf-syntax-grammar/ .UE \fIN-Triples\fP, in \fIRDF Test Cases\fP, Jan Grant and Dave Beckett (eds.) W3C Recommendation, .UR http://www.w3.org/TR/rdf-testcases/#ntriples http://www.w3.org/TR/rdf-testcases/#ntriples .UE \fITurtle - Terse RDF Triple Language\fP, Dave Beckett, .UR http://www.dajobe.org/2004/01/turtle/ http://www.dajobe.org/2004/01/turtle/ .UE \fIRSS 0.91 spec revision 3\fP, Dan Libby, Netscape, .UR http://my.netscape.com/publish/formats/rss-spec-0.91.html http://my.netscape.com/publish/formats/rss-spec-0.91.html .UE \fIRDF Site Summary (RSS) 1.0\fP, .UR http://purl.org/rss/1.0/spec http://purl.org/rss/1.0/spec .UE \fIAtom 1.0 syndication format\fP, RFC 4287, .UR http://www.ietf.org/rfc/rfc4287.txt http://www.ietf.org/rfc/rfc4287.txt .UE \fIGleaning Resource Descriptions from Dialects of Languages (GRDDL)\fP, Dan Connolly (ed.), W3C Recommendation, 2007-09-11, .UR http://www.w3.org/TR/2007/REC-grddl-20070911/ http://www.w3.org/TR/2007/REC-grddl-20070911/ .UE \fIRDFa in XHTML: Syntax and Processing\fP, Ben Adida, Mark Birbeck, Shane McCarron, Steven Pemberton (eds.) W3C Recommendation, 2008-10-14, .UR http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/ http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/ .UE .SH SEE ALSO .BR rapper(1), raptor-config(1) .SH AUTHOR Dave Beckett - .UR http://www.dajobe.org/ http://www.dajobe.org/ .UE raptor-1.4.21/docs/raptor-tutorial-intro.xml0000644000175000017500000000127510416643343016013 00000000000000 Initialising and Finishing using the Library Raptor has a single initialising function and a single terminating function. The initialising function must be called before any other Raptor API functions are called: raptor_init(); ... raptor_finish(); It is safe to call these functions more than once. But don't do that! raptor-1.4.21/docs/raptor-tutorial-serializing.xml0000644000175000017500000003717711026646353017214 00000000000000 Serializing RDF triples to a syntax
Introduction The typical sequence of operations to serialize is to create a serializer object, set various callback and features, start the serializing, send some RDF triples to the serializer object, finish the serializing and destroy the serializer object.
Create the Serializer object The serializer can be created directly from a known name using raptor_new_serializer() such as rdfxml for the W3C Recommendation RDF/XML syntax: raptor_serializer* rdf_serializer; rdf_serializer = raptor_new_serializer("rdfxml"); or the name can be discovered from an enumeration as discussed in Querying Functionality
Serializer features There are several options that can be set on serializers, called features. The exact list of features can be found via Querying Functionality or in the API reference for raptor_serializer_set_feature(). Features are integer enumerations of the raptor_feature enum and have values that are either integers (often acting as booleans) or strings. The two functions that set features are: /* Set an integer (or boolean) valued feature */ raptor_serializer_set_feature(rdf_serializer, feature, 1); /* Set a string valued feature */ raptor_serializer_set_feature_string(rdf_serializer, feature, "abc"); There are also two corresponding functions for reading the values of serializer features: raptor_serializer_get_feature() and raptor_serializer_get_feature_string() taken the feature enumeration parameter and returning the integer or string value correspondingly.
Declare namespaces Raptor can use namespace prefix/URIs to abbreviate syntax in some syntaxes such as Turtle or any XML syntax including RDF/XML, RSS1.0 and Atom 1.0. These are declared with raptor_serialize_set_namespace() using a prefix and URI argument pair like this: const unsigned char* prefix="ex"; raptor_uri* uri=raptor_new_uri("http://example.org"); raptor_serialize_set_namespace(rdf_serializer, prefix, uri); or raptor_serialize_set_namespace_from_namespace() from an existing namespace. This can be useful when connected up the the namespace declarations that are generated from a parser via a namespace handler set with raptor_set_namespace_handler() like this: static void relay_namespaces(void* user_data, raptor_namespace *nspace) { raptor_serialize_set_namespace_from_namespace(rdf_serializer, nspace); } rdf_parser=raptor_new_parser(syntax_name); raptor_set_namespace_handler(rdf_parser, rdf_serializer, relay_namespaces);
Set error and warning handlers There are several other callback handlers that can be set on serializers. These can be set any time before serializing is started. Errors and warnings from serializing can be returned with functions that all take a callback of type raptor_message_handler and signature: void message_handler(void *user_data, raptor_locator* locator, const char *message) { /* do something with the message */ } returning the user data given, associated location information as a raptor_locator and the error/warning message itself. The locator structure contains full information on the details of where in the serialized file or URI the message occurred. The fatal error, error and warning handlers are all set with similar functions that take a handler as follows: raptor_serializer_set_error_handler(rdf_serializer, user_data, error_handler); raptor_serializer_set_warning_handler(rdf_serializer, user_data, warning_handler);
Provide a destination for the serialized syntax The operation of turning RDF triples into a syntax has several alternatives from functions that do most of the work writing to a file or string to functions that allow passing in a raptor_iostream which can be entirely user-constructed.
Serialize to a filename (<link linkend="raptor-serialize-start-to-filename"><function>raptor_serialize_start_to_filename()</function></link>) Serialize to a new filename (using raptor_new_iostream_to_filename() internally) and uses asf base URI, the file's URI. const char *filename="raptor.rdf"; raptor_serialize_start_to_filename(rdf_serializer, filename);
Serialize to a string (<link linkend="raptor-serialize-start-to-string"><function>raptor_serialize_start_to_string()</function></link>) Serialize to a string that is allocated by the serializer (using raptor_new_iostream_to_string() internally). The resulting string is only constructed after raptor_serialize_end() is called and at that point it is assigned to the string pointer passed in, with the length written to the optional length pointer. This function takes an optional base URI but may be required by some serializers. raptor_uri* uri=raptor_new_uri("http://example.org/base"); void *string; /* destination for string */ size_t length; /* length of constructed string */ raptor_serialize_start_to_string(rdf_serializer, uri, &string, &length);
Serialize to a FILE* file handle (<link linkend="raptor-serialize-start-to-file-handle"><function>raptor_serialize_start_to_file_handle()</function></link>) Serialize to an existing open C FILE* file handle (using raptor_new_iostream_to_file_handle() internally). The handle is not closed after serializing is finished. This function takes an optional base URI but may be required by some serializers. raptor_uri* uri=raptor_new_uri("http://example.org/base"); FILE* fh=fopen("raptor.rdf", "wb"); raptor_serialize_start_to_file_handle(rdf_serializer, uri, fh);
Serialize to an <link linkend="raptor-iostream"><type>raptor_iostream</type></link> (<link linkend="raptor-serialize-start-to-iostream"><function>raptor_serialize_start_to_iostream()</function></link>) This is the most flexible serializing method as it allows writing to any raptor_iostream which can be constructed to build any form of user-generated structure via callbacks. The iostream remains owned by the caller that can continue to write to it after the serializing is finished (after raptor_serialize_end()) is called). raptor_uri* uri=raptor_new_uri("http://example.org/base"); raptor_iostream* iostream = /* iostream initialized by some means */ ; raptor_serialize_start_to_iostream(rdf_serializer, uri, iostream); while( /* got RDF triples */ ) { raptor_statement* triple = /* ... triple made from somewhere ... */ ; raptor_serialize_statement(rdf_serializer, triple); } raptor_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); /* ... write other stuff to iostream ... */ raptor_free_iostream(iostream);
Serialize to an <link linkend="raptor-iostream"><type>raptor_iostream</type></link> and close iostream (<link linkend="raptor-serialize-start"><function>raptor_serialize_start()</function></link>) raptor_serialize_start() also serializes to an iostream like raptor_serialize_start_to_iostream() but it becomes the owner of the passed in raptor_iostream and destroys it at the end of serializing, so no further use of the iostream can be made by the caller.
Get or construct RDF Triples An raptor_statement can be made either by receiving them from a raptor_parser via parsing or can be constructed by hand. When constructing by hand, the raptor_statement structure should be allocated by the application and the fields filled in. Each triple has three parts. The subject can be a URI or blank node, the predicate can only be a URI and the object can be a URI, blank node or RDF literal. RDF literals can have either just a Unicode string, a Unicode string and a language or a Unicode string and a datatype URI. The triple part types are set as fields named like subject_type for describing field subject. So to initialise the subject of the triple, set the field statement.subject to point to a previously allocated raptor_uri* object (for URI) or char* (for blank node) and set statement.subject_type to RAPTOR_IDENTIFIER_TYPE_RESOURCE or RAPTOR_IDENTIFIER_TYPE_ANONYMOUS respectively. Triple predicates are always of type RAPTOR_IDENTIFIER_TYPE_RESOURCE. Triple objects are all all types given above and also RAPTOR_IDENTIFIER_TYPE_LITERAL which takes an unsigned char* pointer plus an optional language char* pointer in the object_literal_language field OR a a raptor_uri* literal datatype pointer in the object_literal_datatype field. The triple part types are described under raptor_identifier_type. <filename>rdfserialize.c</filename>: Serialize 1 triple to RDF/XML (Abbreviated) Compile it like this: $ gcc -o rdfserialize rdfserialize.c `raptor-config --cflags` `raptor-config --libs` and run it with an optional base URI argument $ ./rdfserialize <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://example.org/subject"> <ns0:predicate xmlns:ns0="http://example.org/" xml:lang="en">An example</ns0:predicate> </rdf:Description> </rdf:RDF>
Send RDF Triples to serializer Once the serializer has been started, RDF triples can be sent to it via the raptor_serialize_statement() function with a raptor_statement value. Once all triples are sent, the serializing must be finished with a call to raptor_serialize_end(). In particular, only at this point does the raptor_iostream get flushed or any string constructed for raptor_serialize_start_to_string(). /* start the serializing somehow */ while( /* got RDF triples */ ) { raptor_serialize_statement(rdf_serializer, triple); } raptor_serialize_end(rdf_serializer); /* now can use the serializing result (FILE, string, raptor_iostream) */
Querying serializer run-time information raptor_serializer_get_iostream() gets the current serializer's raptor_iostream. raptor_serializer_get_locator() returns the raptor_locator for the current position in the output stream. The locator structure contains full information on the details of where in the file or URI the current serializer has reached.
Destroy the serializer To tidy up, delete the serializer object as follows: raptor_free_serializer(rdf_serializer);
Serializing example code <filename>rdfcat.c</filename>: Read any RDF syntax and serialize to RDF/XML (Abbreviated) Compile it like this: $ gcc -o rdfcat rdfcat.c `raptor-config --cflags` `raptor-config --libs` and run it on an RDF file as: $ ./rdfcat raptor.rdf <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://usefulinc.com/ns/doap#"> <rdf:Description rdf:about=""> <foaf:maker> <foaf:Person> <foaf:name>Dave Beckett</foaf:name> ...
raptor-1.4.21/docs/raptor-docs.xml0000644000175000017500000001235211330672502013740 00000000000000 ]> Raptor RDF Syntax Parsing and Serializing Library Manual Manual for Raptor &version; Dave Beckett
http://www.dajobe.org/
This documentation is Free Software / Open Source - you can redistribute it and/or modify it under the same licenses as Raptor. It is licensed under the following three licenses as alternatives: GNU Lesser General Public License (LGPL) V2.1 or any newer version GNU General Public License (GPL) V2 or any newer version Apache License, V2.0 or any newer version You may not use this documentation except in compliance with at least one of the above three licenses. See the Raptor site for the full license terms. 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 Dave Beckett 2001 2002 2003 2004 2005 University of Bristol
Raptor Overview Raptor is a library for RDF syntax parsing and serializing providing APIs to turn syntax to and from RDF triples. It also includes supporting functionality for Unicode, UTF-8, URIs, WWW retrieval and XML writing. Raptor Tutorial This part describes how to use the Raptor APIs to turn syntaxes into RDF triples and RDF triples into syntaxes. The next part contains the Raptor Reference Manual which comprehensively describes every class and function of the API. For the latest information, see the Raptor Home Page and the main document overview in this document tree. Raptor Reference Manual This part contains the Raptor Reference Manual which comprehensively describes every class and function of the API. The previous part contains the Raptor Tutorial explaining how to use the API parts. For the latest information, see the Raptor Home Page and the main document overview in this document tree. Index
raptor-1.4.21/docs/version.xml0000644000175000017500000000000711331056120013153 000000000000001.4.21 raptor-1.4.21/docs/version.xml.in0000644000175000017500000000001210360131564013563 00000000000000@VERSION@ raptor-1.4.21/docs/raptor-serializers.xml0000644000175000017500000001272611330672502015351 00000000000000 Serializers in Raptor (triples to syntax)
Introduction This section describes the serializers that can be compiled into Raptor and their features. The exact serializers supported may vary by different builds of raptor and can be queried at run-time by use of the raptor_serializers_enumerate function The optional features that may be set on parsers can also be queried at run-time iwth the raptor_serializer_features_enumerate function.
Atom 1.0 serializer (name <literal>atom</literal>) A serializer to the Atom 1.0 syndication format defined in IETF RFC 4287. This serializes an RDF graph written in the RSS 1.0 data model to Atom 1.0 plus optionally writes extra RDF triples. The extra RDF triples are written into an at:md metadata block, along with at:feedmap and at:entrymap elements to describe the RSS 1.0 predicate to Atom 1.0 elements mappings for the feed and entry blocks respecively. The extra triples are enabled when serializer feature 'rssTriples' is set to string value 'atom-triples'.
JSON serializers (name <literal>json</literal> and name <literal>json-triples</literal>) Two serializers that write JSON in either a resource-centric format with name json and in a triple-dump format with name json-triples. The resource-centric format is based on the Talis RDF/JSON design and the triple-dump format based on the SPARQL query results in JSON design.
N-Triples serializer - default (name <literal>ntriples</literal>) A serializer to the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.
RDF/XML serializer (name <literal>rdfxml</literal>) A serializer to the standard RDF/XML syntax as revised by the W3C RDF Core working group. This writes a plain triple-based RDF/XML serialization with no optimisation or pretty-printing.
RDF/XML (Abbreviated) serializer (name <literal>rdfxml-abbrev</literal>) An RDF/XML serializer using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents.
RDF/XML (XMP Profile) serializer (name <literal>rdfxml-xmp</literal>) A serializer to the Adobe XMP profile of RDF/XML suitable for embedding inside an external document. Embedding means that the XML header is omitted, wheras for other XML serializings, it is always emitted.
Turtle serializer (name <literal>turtle</literal>) A serializer for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.
RSS 1.0 serializer (name <literal>rss-1.0</literal>) A serializer to the RDF Site Summary (RSS) 1.0 format for describing a syndication feed of items. By default this only serializes the RDF triples that describe the RSS channel and items found. If serialiser feature 'rssTriples' is set to value 'rdf-xml' then any additional triples found will be included in the channel or item output.
GraphViz dot serializer (name <literal>dot</literal>) A serializer to the GraphViz DOT format. This serializer has a set of associated serializer features that may be set to customise the output colors using raptor_serializer_set_feature() with the appropriate feature name and value as given below. RAPTOR_FEATURE_RESOURCE_BORDER Border color of resource nodes RAPTOR_FEATURE_LITERAL_BORDER Border color of literal nodes RAPTOR_FEATURE_BNODE_BORDER Border color of blank nodes RAPTOR_FEATURE_RESOURCE_FILL Fill color of resource nodes RAPTOR_FEATURE_LITERAL_FILL Fill color of literal nodes RAPTOR_FEATURE_BNODE_FILL Fill color of blank nodes
raptor-1.4.21/docs/Makefile.am0000644000175000017500000000606211230201540013003 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor docs # # Copyright (C) 2000-2006, David Beckett http://purl.org/net/dajobe/ # Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # The name of the module. DOC_MODULE=raptor # The top-level SGML file. DOC_MAIN_SGML_FILE=raptor-docs.xml # Extra options to supply to gtkdoc-scan SCAN_OPTIONS= --deprecated-guards="RAPTOR_DISABLE_DEPRECATED" # The directory containing the source code. Relative to $(srcdir) DOC_SOURCE_DIR=../src # Used for dependencies HFILE_GLOB=$(top_srcdir)/src/raptor.h CFILE_GLOB=$(top_srcdir)/src/raptor_*.c IGNORE_CFILES= \ n3_lexer.c \ n3_parser.c \ raptor_nfc_test.c \ raptor_rss_common.c \ raptor_xsd.c \ turtle_lexer.c \ turtle_parser.c \ turtle_common.c \ parsedate.c \ strcasecmp.c # Headers to ignore IGNORE_HFILES= \ n3_common.h \ n3_lexer.h \ n3_parser.h \ parsedate.h \ raptor_config.h \ raptor_internal.h \ raptor_nfc.h \ raptor_rss.h \ turtle_common.h \ turtle_lexer.h \ turtle_parser.h \ win32_raptor_config.h # CFLAGS and LDFLAGS for compiling scan program. Only needed # if $(DOC_MODULE).types is non-empty. AM_CPPFLAGS = GTKDOC_LIBS = # Extra options to supply to gtkdoc-mkdb MKDB_OPTIONS=--sgml-mode --output-format=xml --ignore-files="$(IGNORE_CFILES)" # Extra options to supply to gtkdoc-mktmpl MKTMPL_OPTIONS= # Non-autogenerated (XML, other) files to be included in $(DOC_MAIN_SGML_FILE) content_files = \ raptor-parsers.xml \ raptor-serializers.xml \ raptor-tutorial-intro.xml \ raptor-tutorial-querying-functionality.xml \ raptor-tutorial-parsing.xml \ raptor-tutorial-serializing.xml \ version.xml \ rdfprint.c \ rdfcat.c \ rdfserialize.c # Images to copy into HTML directory HTML_IMAGES = # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS= include $(top_srcdir)/gtk-doc.make man_MANS = libraptor.3 EXTRA_DIST+= \ libraptor.html \ $(man_MANS) \ version.xml.in if MAINTAINER_MODE libraptor.html: $(srcdir)/libraptor.3 $(srcdir)/../fix-groff-xhtml -groff -man -Thtml -P-l $< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(srcdir)/../fix-groff-xhtml $@ rdfcat.c: $(srcdir)/../examples/rdfcat.c $(install_sh_DATA) $? $@ rdfprint.c: $(srcdir)/../examples/rdfprint.c $(install_sh_DATA) $? $@ rdfserialize.c: $(srcdir)/../examples/rdfserialize.c $(install_sh_DATA) $? $@ raptor-tutorial-parsing.xml: rdfcat.c raptor-tutorial-serializing.xml: rdfprint.c rdfserialize.c endif raptor-1.4.21/docs/Makefile.in0000644000175000017500000006107211330704763013036 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor docs # # Copyright (C) 2000-2006, David Beckett http://purl.org/net/dajobe/ # Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/version.xml.in $(top_srcdir)/gtk-doc.make subdir = docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = version.xml CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man3dir = $(mandir)/man3 am__installdirs = "$(DESTDIR)$(man3dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module. DOC_MODULE = raptor # The top-level SGML file. DOC_MAIN_SGML_FILE = raptor-docs.xml # Extra options to supply to gtkdoc-scan SCAN_OPTIONS = --deprecated-guards="RAPTOR_DISABLE_DEPRECATED" # The directory containing the source code. Relative to $(srcdir) DOC_SOURCE_DIR = ../src # Used for dependencies HFILE_GLOB = $(top_srcdir)/src/raptor.h CFILE_GLOB = $(top_srcdir)/src/raptor_*.c IGNORE_CFILES = \ n3_lexer.c \ n3_parser.c \ raptor_nfc_test.c \ raptor_rss_common.c \ raptor_xsd.c \ turtle_lexer.c \ turtle_parser.c \ turtle_common.c \ parsedate.c \ strcasecmp.c # Headers to ignore IGNORE_HFILES = \ n3_common.h \ n3_lexer.h \ n3_parser.h \ parsedate.h \ raptor_config.h \ raptor_internal.h \ raptor_nfc.h \ raptor_rss.h \ turtle_common.h \ turtle_lexer.h \ turtle_parser.h \ win32_raptor_config.h # CFLAGS and LDFLAGS for compiling scan program. Only needed # if $(DOC_MODULE).types is non-empty. AM_CPPFLAGS = GTKDOC_LIBS = # Extra options to supply to gtkdoc-mkdb MKDB_OPTIONS = --sgml-mode --output-format=xml --ignore-files="$(IGNORE_CFILES)" # Extra options to supply to gtkdoc-mktmpl MKTMPL_OPTIONS = # Non-autogenerated (XML, other) files to be included in $(DOC_MAIN_SGML_FILE) content_files = \ raptor-parsers.xml \ raptor-serializers.xml \ raptor-tutorial-intro.xml \ raptor-tutorial-querying-functionality.xml \ raptor-tutorial-parsing.xml \ raptor-tutorial-serializing.xml \ version.xml \ rdfprint.c \ rdfcat.c \ rdfserialize.c # Images to copy into HTML directory HTML_IMAGES = # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS = @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt \ libraptor.html $(man_MANS) version.xml.in DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ pdf-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ $(srcdir)/pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp man_MANS = libraptor.3 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man3: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" @list=''; test -n "$(man3dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(MANS) all-local installdirs: for dir in "$(DESTDIR)$(man3dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man3 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local uninstall-man uninstall-man: uninstall-man3 .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man3 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-local uninstall-man uninstall-man3 @ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) @ENABLE_GTK_DOC_FALSE@all-local: docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) @cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true $(srcdir)/tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) @cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) @rm -rf $(srcdir)/html @mkdir $(srcdir)/html @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi; \ cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building PDF' @-chmod -R u+w $(srcdir) @rm -rf $(srcdir)/$(DOC_MODULE).pdf @mkpdf_imgdirs=""; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ fi; \ done; \ fi; \ cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: @installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs @MAINTAINER_MODE_TRUE@libraptor.html: $(srcdir)/libraptor.3 $(srcdir)/../fix-groff-xhtml @MAINTAINER_MODE_TRUE@ -groff -man -Thtml -P-l $< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(srcdir)/../fix-groff-xhtml $@ @MAINTAINER_MODE_TRUE@rdfcat.c: $(srcdir)/../examples/rdfcat.c @MAINTAINER_MODE_TRUE@ $(install_sh_DATA) $? $@ @MAINTAINER_MODE_TRUE@rdfprint.c: $(srcdir)/../examples/rdfprint.c @MAINTAINER_MODE_TRUE@ $(install_sh_DATA) $? $@ @MAINTAINER_MODE_TRUE@rdfserialize.c: $(srcdir)/../examples/rdfserialize.c @MAINTAINER_MODE_TRUE@ $(install_sh_DATA) $? $@ @MAINTAINER_MODE_TRUE@raptor-tutorial-parsing.xml: rdfcat.c @MAINTAINER_MODE_TRUE@raptor-tutorial-serializing.xml: rdfprint.c rdfserialize.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/docs/raptor-overrides.txt0000644000175000017500000000177610412161127015035 00000000000000 raptor_iostream raptor_iostream* raptor_iostream; raptor_namespace raptor_namespace* raptor_namespace; raptor_namespace_stack raptor_namespace_stack* raptor_namespace_stack; raptor_parser raptor_parser* raptor_parser; raptor_qname raptor_qname* raptor_qname; raptor_sequence raptor_sequence* raptor_sequence; raptor_serializer raptor_serializer* raptor_serializer; raptor_stringbuffer raptor_stringbuffer* raptor_stringbuffer; raptor_uri raptor_uri* raptor_uri; raptor_www raptor_www* raptor_www; raptor_xml_element raptor_xml_element* raptor_xml_element; raptor_xml_writer raptor_xml_writer* raptor_xml_writer; raptor-1.4.21/docs/rdfserialize.c0000644000175000017500000000277311303131412013604 00000000000000#include #include #include /* rdfserialize.c: serialize 1 triple to RDF/XML-Abbrev */ int main(int argc, char *argv[]) { raptor_serializer* rdf_serializer=NULL; unsigned char *uri_string; raptor_uri *base_uri; raptor_statement* triple; raptor_init(); uri_string=raptor_uri_filename_to_uri_string(argv[1]); base_uri=raptor_new_uri(uri_string); rdf_serializer=raptor_new_serializer("rdfxml-abbrev"); raptor_serialize_start_to_file_handle(rdf_serializer, base_uri, stdout); /* Make a triple with URI subject, URI predicate, literal object */ triple=(raptor_statement*)calloc(1, sizeof(raptor_statement)); triple->subject=(void*)raptor_new_uri((const unsigned char*)"http://example.org/subject"); triple->subject_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; triple->predicate=(void*)raptor_new_uri((const unsigned char*)"http://example.org/predicate"); triple->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; triple->object="An example literal"; triple->object_type=RAPTOR_IDENTIFIER_TYPE_LITERAL; triple->object_literal_language=(const unsigned char*)"en"; /* Write the triple */ raptor_serialize_statement(rdf_serializer, triple); /* Delete the triple */ raptor_free_uri((raptor_uri*)triple->subject); raptor_free_uri((raptor_uri*)triple->predicate); free(triple); raptor_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); raptor_free_uri(base_uri); raptor_free_memory(uri_string); raptor_finish(); return 0; } raptor-1.4.21/docs/raptor-tutorial-parsing.xml0000644000175000017500000005345010727065121016322 00000000000000 Parsing syntaxes to RDF Triples
Introduction The typical sequence of operations to parse is to create a parser object, set various callback and features, start the parsing, send some syntax content to the parser object, finish the parsing and destroy the parser object. Several parts of this process are optional, including actually using the triple results, which is useful as a syntax checking process.
Create the Parser object The parser can be created directly from a known name such as rdfxml for the W3C Recommendation RDF/XML syntax: raptor_parser* rdf_parser; rdf_parser = raptor_new_parser("rdfxml"); or the name can be discovered from an enumeration as discussed in Querying Functionality The parser can also be created by identifying the syntax by a URI, specifying the syntax by a MIME Type, providng an identifier for the content such as filename or URI string or giving some initial content bytes that can be used to guess. Using the raptor_new_parser_for_content() function, all of these can be given as optional parameters, using NULL or 0 for undefined parameters. The constructor will then use as much of this information as possible. raptor_parser* rdf_parser; Create a parser that reads the MIME Type for RDF/XML application/rdf+xml rdf_parser = raptor_new_parser_for_content(NULL, "application/rdf+xml", NULL, 0, NULL); Create a parser that can read a syntax identified by the URI for Turtle http://www.dajobe.org/2004/01/turtle/, which has no registered MIME Type at this date: syntax_uri = raptor_new_uri("http://www.dajobe.org/2004/01/turtle/"); rdf_parser = raptor_new_parser_for_content(syntax_uri, NULL, NULL, 0, NULL); Create a parser that recognises the identifier foo.rss: rdf_parser = raptor_new_parser_for_content(NULL, NULL, NULL, 0, "foo.rss"); Create a parser that recognises the content in buffer: rdf_parser = raptor_new_parser_for_content(NULL, NULL, buffer, len, NULL); Any of the constructor calls can return NULL if no matching parser could be found, or the construction failed in another way.
Parser features There are several options that can be set on parsers, called features. The exact list of features can be found via Querying Functionality or in the API reference for raptor_set_feature(). (This should be properly called raptor_parser_set_feature() as it only applies to raptor_parser objects). Features are integer enumerations of the raptor_feature enum and have values that are either integers (often acting as booleans) or strings. The two functions that set features are: /* Set an integer (or boolean) valued feature */ raptor_set_feature(rdf_parser, feature, 1); /* Set a string valued feature */ raptor_set_feature_string(rdf_parser, feature, "abc"); There are also two corresponding functions for reading the values of parser features: raptor_get_feature() and raptor_get_feature_string() taken the feature enumeration parameter and returning the integer or string value correspondingly.
Set RDF triple callback handler The main reason to parse a syntax is to get RDF triples returned and this is done by a callback function which is called with parameters of a user data pointer and the triple itself. The handler is set with raptor_set_statement_handler() as follows: void triples_handler(void* user_data, const raptor_statement* triple) { /* do something with the triple */ } raptor_set_statement_handler(rdf_parser, user_data, triples_handler); It is optional to set a handler function for triples, which does have some uses if just counting triples or validating a syntax.
Set fatal error, error and warning handlers There are several other callback handlers that can be set on parsers. These can be set any time before parsing is called. Errors and warnings from parsing can be returned with functions that all take a callback of type raptor_message_handler and signature: void message_handler(void *user_data, raptor_locator* locator, const char *message) { /* do something with the message */ } returning the user data given, associated location information as a raptor_locator and the error/warning message itself. The locator structure contains full information on the details of where in the file or URI the message occurred. The fatal error, error and warning handlers are all set with similar functions that take a handler as follows: raptor_set_fatal_error_handler(rdf_parser, user_data, fatal_handler); raptor_set_error_handler(rdf_parser, user_data, error_handler); raptor_set_warning_handler(rdf_parser, user_data, warning_handler); The program will terminate with abort() if the fatal error handler returns.
Set the identifier creator handler Identifiers are created in some parsers by generating them automatically or via hints given a syntax. Raptor can customise this process using a user-supplied identifier handler function. For example, in RDF/XML generated blank node identifiers and those those specified rdf:nodeID are passed through this process. Setting a handler allows the identifier generation mechanism to be fully replaced. A lighter alternative is to use raptor_set_default_generate_id_parameters() to adjust the default algorithm for generated identifiers. It is used as follows raptor_generate_id_handler id_handler; raptor_set_generate_id_handler(rdf_parser, user_data, id_handler); The id_handler takes the following signature: unsigned char* generate_id_handler(void* user_data, raptor_genid_type type, unsigned char* user_id) { /* return a new generated ID based on user_id (optional) */ } where the raptor_genid_type provides extra information on the identifier being created and user_id an optional user-supplied identifier, such as the value of a rdf:nodeID in RDF/XML.
Set namespace declared handler Raptor can report when namespace prefix/URIs are declared in during parsing a syntax such as those in XML, RDF/XML or Turtle. A handler function can be set to receive these declarations using the namespace handler method. raptor_namespace_handler namespaces_handler; raptor_set_namespace_handler(rdf_parser, user_data, namespaces_handler); The namespaces_handler takes the following signature: void namespaces_handler(void* user_data, raptor_namespace *nspace) { /* */ } This may be called multiple times with the same namespace, if the namespace is declared inside different XML sub-trees.
Set the parsing strictness raptor_set_parser_strict() allows setting of the parser strictness flag. The default is lax parsing, accepting older or deprecated syntax forms but may generate a warning. Setting to non-0 (true) will cause parser errors to be generated in these cases.
Provide syntax content to parse The operation of turning syntax into RDF triples has several alternatives from functions that do most of the work starting from a URI to functions that allow passing in data buffers. Parsing and MIME Types The mime type of the retrieved content is not used to choose a parser unless the parser is of type guess. The guess parser will send an Accept: header for all known parser syntax mime types (if a URI request is made) and based on the response, including the identifiers used, pick the appropriate parser to execute. See raptor_guess_parser_name() for a full discussion of the inputs to the guessing.
Parse the content from a URI (<link linkend="raptor-parse-uri"><function>raptor_parse_uri()</function></link>) The URI is resolved and the content read from it and passed to the parser: raptor_parse_uri(rdf_parser, uri, base_uri); The base_uri is optional (can be NULL) and will default to the uri.
Parse the content of a URI using an existing WWW connection (<link linkend="raptor-parse-uri-with-connection"><function>raptor_parse_uri_with_connection()</function></link>) The URI is resolved using an existing WWW connection (for example a libcurl CURL handle) to allow for any existing WWW configuration to be reused. See raptor_www_new_with_connection for full details of how this works. The content is then read from the result of resolving the URI: raptor_parse_uri_with_connection(rdf_parser, uri, base_uri, connection); The base_uri is optional (can be NULL) and will default to the uri.
Parse the content of a C <literal>FILE*</literal> (<link linkend="raptor-parse-file-stream"><function>raptor_parse_file_stream()</function></link>) Parsing can read from a C STDIO file handle: stream=fopen(filename, "rb"); raptor_parse_file_stream(rdf_parser, stream, filename, base_uri); fclose(stream); This function can use take an optional filename which is used in locator error messages. The base_uri may be required by some parsers and if NULL will cause the parsing to fail.
Parse the content of a file URI (<link linkend="raptor-parse-file"><function>raptor_parse_file()</function></link>) Parsing can read from a URI known to be a file: URI: raptor_parse_file(rdf_parser, file_uri, base_uri); This function requires that the file_uri is a file URI, that is raptor_uri_uri_string_is_file_uri( raptor_uri_as_string( file_uri) ) must be true. The base_uri may be required by some parsers and if NULL will cause the parsing to fail.
Parse chunks of syntax content provided by the application (<link linkend="raptor-start-parse"><function>raptor_start_parse()</function></link> and <link linkend="raptor-parse-chunk"><function>raptor_parse_chunk()</function></link>) raptor_start_parse(rdf_parser, base_uri); while(/* not finished getting content */) { unsigned char *buffer; size_t buffer_len; /* obtain some syntax content in buffer of size buffer_len bytes */ raptor_parse_chunk(rdf_parser, buffer, buffer_len, 0); } raptor_parse_chunk(rdf_parser, NULL, 0, 1); /* no data and is_end = 1 */ The base_uri argument to raptor_start_parse() may be required by some parsers and if NULL will cause the parsing to fail. On the last raptor_parse_chunk() call, or after the loop is ended, the is_end parameter must be set to non-0. Content can be passed with the final call. If no content is present at the end (such as in some kind of end of file situation), then a 0-length buffer_len or NULL buffer can be used. The minimal case is an entire parse in one chunk as follows: raptor_start_parse(rdf_parser, base_uri); raptor_parse_chunk(rdf_parser, buffer, buffer_len, 1); /* is_end = 1 */
Restrict parser network access Parsing can cause network requests to be performed, especially if a URI is given as an argument such as with raptor_parse_uri() however there may also be indirect requests such as with the GRDDL parser that retrieves URIs depending on the results of initial parse requests. The URIs requested may not be wanted to be fetched or need to be filtered, and this can be done in three ways.
Filtering parser network requests with feature <link linkend="RAPTOR-FEATURE-NO-NET:CAPS"><literal>RAPTOR_FEATURE_NO_NET</literal></link> The parser feature RAPTOR_FEATURE_NO_NET can be set with raptor_set_feature() and forbids all network requests. There is no customisation with this approach, for that see the URI filter in the next section. rdf_parser = raptor_new_parser("rdfxml"); /* Disable internal network requests */ raptor_set_feature(rdf_parser, RAPTOR_FEATURE_NO_NET, 1);
Filtering parser network requests with <link linkend="raptor-www-set-uri-filter"><function>raptor_www_set_uri_filter()</function></link> The raptor_www_set_uri_filter() allows setting of a filtering function to operate on all URIs retrieved by a WWW connection. This connection can be used in parsing when operated by hand. void write_bytes_handler(raptor_www* www, void *user_data, const void *ptr, size_t size, size_t nmemb) { { raptor_parser* rdf_parser=(raptor_parser*)user_data; raptor_parse_chunk(rdf_parser, (unsigned char*)ptr, size*nmemb, 0); } int uri_filter(void* filter_user_data, raptor_uri* uri) { /* return non-0 to forbid the request */ } int main(int argc, char *argv[]) { ... rdf_parser = raptor_new_parser("rdfxml"); www = raptor_new_www(); /* filter all URI requests */ raptor_www_set_uri_filter(www, uri_filter, filter_user_data); /* make WWW write bytes to parser */ raptor_www_set_write_bytes_handler(www, write_bytes_handler, rdf_parser); raptor_start_parse(rdf_parser, uri); raptor_www_fetch(www, uri); /* tell the parser that we are done */ raptor_parse_chunk(rdf_parser, NULL, 0, 1); raptor_www_free(www); raptor_free_parser(rdf_parser); ... }
Filtering parser network requests with <link linkend="raptor-parser-set-uri-filter"><function>raptor_parser_set_uri_filter()</function></link> The raptor_parser_set_uri_filter() allows setting of a filtering function to operate on all URIs that the parser sees. This operates on the internal raptor_www object used inside parsing to retrieve URIs, similar to that described in the previous section. int uri_filter(void* filter_user_data, raptor_uri* uri) { /* return non-0 to forbid the request */ } rdf_parser = raptor_new_parser("rdfxml"); raptor_parser_set_uri_filter(rdf_parser, uri_filter, filter_user_data); /* parse content as normal */ raptor_parse_uri(rdf_parser, uri, base_uri);
Setting timeout for parser network requests with feature <link linkend="RAPTOR-FEATURE-WWW-TIMEOUT:CAPS"><literal>RAPTOR_FEATURE_WWW_TIMEOUT</literal></link> If the value of feature RAPTOR_FEATURE_WWW_TIMEOUT if set to a number >0, it is used as the timeout in seconds for retrieving of URIs during parsing (primarily for GRDDL). This uses raptor_www_set_connection_timeout() internally. rdf_parser = raptor_new_parser("grddl"); /* set internal URI retrieval maximum time to 5 seconds */ raptor_set_feature(rdf_parser, RAPTOR_FEATURE_WWW_TIMEOUT , 5);
Querying parser static information These methods return information about the constructed parser implementation corresponding to the information available via raptor_syntaxes_enumerate() for all parsers. raptor_get_name() return the parser syntax name, raptor_get_label() the long label for the parser and raptor_get_mime_type() the primary MIME Type for the parser (there may be others that the parser will accept but this is the main one). raptor_parser_get_accept_header() returns a string that would be sent in an HTTP request Accept: header for the syntaxes accepted by this parser only.
Querying parser run-time information raptor_get_locator() returns the raptor_locator for the current position in the input stream. The locator structure contains full information on the details of where in the file or URI the current parser has reached.
Aborting parsing raptor_parse_abort() allows the current parsing to be aborted, at which point no further triples will be passed to callbacks and the parser will attempt to return control to the application. This is most useful when called inside a handler function which allows the application to decide to stop an active parsing.
Destroy the parser To tidy up, delete the parser object as follows: raptor_free_parser(rdf_parser);
Parsing example code <filename>rdfprint.c</filename>: Parse an RDF/XML file and print the triples Compile it like this: $ gcc -o rdfprint rdfprint.c `raptor-config --cflags` `raptor-config --libs` and run it on an RDF file as: $ ./rdfprint raptor.rdf _:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> . _:genid1 <http://usefulinc.com/ns/doap#name> "Raptor" . _:genid1 <http://usefulinc.com/ns/doap#homepage> <http://librdf.org/raptor/> . ...
raptor-1.4.21/docs/raptor-sections.txt0000644000175000017500000002536111331056234014661 00000000000000
section-world raptor_init raptor_finish raptor_world raptor_new_world raptor_free_world raptor_libxml_flags raptor_world_set_libxml_flags raptor_world_set_libxslt_security_preferences raptor_world_open
section-general raptor_version_major raptor_version_minor raptor_version_release raptor_version_decimal raptor_simple_message_handler raptor_message_handler raptor_statement_handler raptor_parsers_enumerate raptor_syntaxes_enumerate raptor_syntax_name_check raptor_guess_parser_name raptor_serializers_enumerate raptor_serializer_syntax_name_check raptor_print_ntriples_string raptor_ntriples_string_as_utf8_string raptor_ntriples_term_as_string raptor_vsnprintf raptor_log_level raptor_message_handler_closure raptor_error_handlers raptor_error_handlers_init raptor_set_libxml_flags raptor_set_libxslt_security_preferences
section-feature raptor_feature raptor_get_feature_count raptor_features_enumerate raptor_feature_from_uri raptor_feature_value_type
section-memory raptor_free_memory raptor_alloc_memory raptor_calloc_memory
section-triples raptor_genid_type raptor_identifier_type raptor_identifier raptor_new_identifier raptor_copy_identifier raptor_free_identifier raptor_statement raptor_statement_compare raptor_print_statement raptor_print_statement_as_ntriples raptor_print_statement_detailed raptor_statement_part_as_counted_string raptor_statement_part_as_string
section-constants raptor_rdf_namespace_uri_len raptor_xml_literal_datatype_uri_string_len RAPTOR_RDF_MS_URI RAPTOR_RDF_SCHEMA_URI RAPTOR_XMLSCHEMA_DATATYPES_URI RAPTOR_OWL_URI
section-parser raptor_parser raptor_new_parser raptor_new_parser_for_content raptor_start_parse raptor_free_parser raptor_set_fatal_error_handler raptor_set_error_handler raptor_set_warning_handler raptor_set_statement_handler raptor_set_generate_id_handler raptor_graph_handler raptor_set_graph_handler raptor_namespace_handler raptor_set_namespace_handler raptor_get_locator raptor_set_default_generate_id_parameters raptor_parse_chunk raptor_parse_file_stream raptor_parse_file raptor_parse_uri raptor_parse_uri_with_connection raptor_parse_abort raptor_get_name raptor_get_label raptor_get_mime_type raptor_get_need_base_uri raptor_set_feature raptor_parser_set_feature_string raptor_get_feature raptor_parser_get_feature_string raptor_set_parser_strict raptor_parser_get_accept_header raptor_parser_set_uri_filter raptor_parser_generate_id raptor_parser_get_world
section-locator raptor_locator raptor_print_locator raptor_format_locator raptor_locator_line raptor_locator_column raptor_locator_byte raptor_locator_file raptor_locator_uri
section-serializer raptor_serializer raptor_new_serializer raptor_free_serializer raptor_serialize_start raptor_serialize_start_to_iostream raptor_serialize_start_to_filename raptor_serialize_start_to_string raptor_serialize_start_to_file_handle raptor_serialize_set_namespace raptor_serialize_set_namespace_from_namespace raptor_serialize_statement raptor_serialize_end raptor_serializer_get_iostream raptor_serializer_set_error_handler raptor_serializer_set_warning_handler raptor_serializer_get_locator raptor_serializer_features_enumerate raptor_serializer_set_feature raptor_serializer_set_feature_string raptor_serializer_get_feature raptor_serializer_get_feature_string raptor_serializer_get_world
section-uri raptor_uri raptor_uri_handler raptor_new_uri raptor_new_uri_from_uri_local_name raptor_new_uri_relative_to_base raptor_new_uri_from_id raptor_new_uri_for_rdf_concept raptor_free_uri raptor_uri_compare raptor_uri_equals raptor_uri_copy raptor_uri_as_string raptor_uri_as_counted_string raptor_new_uri_for_xmlbase raptor_new_uri_for_retrieval raptor_uri_resolve_uri_reference raptor_uri_filename_to_uri_string raptor_uri_uri_string_to_filename raptor_uri_uri_string_to_filename_fragment raptor_uri_uri_string_is_file_uri raptor_uri_is_file_uri raptor_uri_to_relative_counted_uri_string raptor_uri_to_relative_uri_string raptor_uri_print raptor_uri_to_counted_string raptor_uri_to_string raptor_uri_set_handler raptor_uri_get_handler raptor_iostream_write_uri
section-uri-factory raptor_new_uri_func raptor_new_uri_from_uri_local_name_func raptor_new_uri_relative_to_base_func raptor_new_uri_for_rdf_concept_func raptor_free_uri_func raptor_uri_equals_func raptor_uri_copy_func raptor_uri_compare_func
section-stringbuffer raptor_stringbuffer raptor_new_stringbuffer raptor_free_stringbuffer raptor_stringbuffer_append_counted_string raptor_stringbuffer_append_string raptor_stringbuffer_append_decimal raptor_stringbuffer_append_stringbuffer raptor_stringbuffer_prepend_counted_string raptor_stringbuffer_prepend_string raptor_stringbuffer_as_string raptor_stringbuffer_length raptor_stringbuffer_copy_to_string
section-sequence raptor_sequence raptor_new_sequence raptor_free_sequence raptor_sequence_delete_at raptor_sequence_size raptor_sequence_set_at raptor_sequence_push raptor_sequence_shift raptor_sequence_get_at raptor_sequence_pop raptor_sequence_unshift raptor_compare_strings raptor_sequence_sort raptor_sequence_print_string raptor_sequence_print_uri raptor_sequence_set_print_handler raptor_sequence_print raptor_sequence_join
section-www raptor_www raptor_www_init raptor_www_finish raptor_www_write_bytes_handler raptor_www_content_type_handler raptor_www_no_www_library_init_finish raptor_www_new raptor_www_new_with_connection raptor_www_free raptor_www_set_user_agent raptor_www_set_proxy raptor_www_set_http_accept raptor_www_set_http_cache_control raptor_www_set_write_bytes_handler raptor_www_set_connection_timeout raptor_www_set_content_type_handler raptor_www_set_error_handler raptor_uri_filter_func raptor_www_set_uri_filter raptor_www_final_uri_handler raptor_www_get_final_uri raptor_www_set_final_uri_handler raptor_www_fetch raptor_www_fetch_to_string raptor_www_get_connection raptor_www_abort
section-iostream raptor_iostream raptor_iostream_init_func raptor_iostream_finish_func raptor_iostream_write_byte_func raptor_iostream_write_bytes_func raptor_iostream_write_end_func raptor_iostream_read_bytes_func raptor_iostream_read_eof_func raptor_iostream_handler raptor_iostream_handler2 raptor_new_iostream_from_handler2 raptor_new_iostream_from_handler raptor_new_iostream_from_sink raptor_new_iostream_from_filename raptor_new_iostream_from_file_handle raptor_new_iostream_from_string raptor_new_iostream_to_sink raptor_new_iostream_to_filename raptor_new_iostream_to_file_handle raptor_new_iostream_to_string raptor_free_iostream raptor_iostream_format_hexadecimal raptor_iostream_get_bytes_written_count raptor_iostream_read_bytes raptor_iostream_read_eof raptor_iostream_tell raptor_iostream_write_byte raptor_iostream_write_bytes raptor_iostream_write_counted_string raptor_iostream_write_decimal raptor_iostream_write_end raptor_iostream_write_statement_ntriples raptor_iostream_write_string raptor_iostream_write_string_ntriples raptor_iostream_write_string_python raptor_iostream_write_string_turtle raptor_iostream_write_stringbuffer
section-sax2 raptor_sax2 raptor_new_sax2 raptor_free_sax2 raptor_sax2_start_element_handler raptor_sax2_end_element_handler raptor_sax2_characters_handler raptor_sax2_cdata_handler raptor_sax2_comment_handler raptor_sax2_unparsed_entity_decl_handler raptor_sax2_external_entity_ref_handler raptor_sax2_set_start_element_handler raptor_sax2_set_end_element_handler raptor_sax2_set_characters_handler raptor_sax2_set_cdata_handler raptor_sax2_set_comment_handler raptor_sax2_set_unparsed_entity_decl_handler raptor_sax2_set_external_entity_ref_handler raptor_sax2_set_namespace_handler raptor_sax2_parse_start raptor_sax2_parse_chunk raptor_sax2_inscope_xml_language raptor_sax2_inscope_base_uri
section-xml raptor_xml_element raptor_new_xml_element raptor_new_xml_element_from_namespace_local_name raptor_free_xml_element raptor_xml_element_get_name raptor_xml_element_get_attributes raptor_xml_element_get_attributes_count raptor_xml_element_set_attributes raptor_xml_element_declare_namespace raptor_xml_element_is_empty raptor_xml_element_get_language raptor_new_xml_writer raptor_free_xml_writer raptor_xml_writer_empty_element raptor_xml_writer_start_element raptor_xml_writer_end_element raptor_xml_writer_cdata raptor_xml_writer_cdata_counted raptor_xml_writer_raw raptor_xml_writer_raw_counted raptor_xml_writer_comment raptor_xml_writer_comment_counted raptor_xml_writer_flush raptor_xml_writer_newline raptor_xml_writer_features_enumerate raptor_xml_writer_get_depth raptor_xml_writer_set_feature raptor_xml_writer_set_feature_string raptor_xml_writer_get_feature raptor_xml_writer_get_feature_string raptor_iostream_write_xml_element raptor_xml_writer raptor_xml_any_escape_string raptor_xml_escape_string raptor_iostream_write_xml_any_escaped_string raptor_iostream_write_xml_escaped_string raptor_xml_name_check
section-xml-qname raptor_qname raptor_new_qname raptor_new_qname_from_namespace_local_name raptor_qname_copy raptor_free_qname raptor_qname_equal raptor_qname_string_to_uri raptor_iostream_write_qname raptor_qname_get_counted_value raptor_qname_get_local_name raptor_qname_get_namespace raptor_qname_get_value raptor_qname_to_counted_name
section-xml-namespace raptor_namespace raptor_new_namespace_from_uri raptor_new_namespaces raptor_namespaces_init raptor_namespaces_clear raptor_free_namespaces raptor_namespaces_start_namespace raptor_namespaces_start_namespace_full raptor_namespaces_end_for_depth raptor_namespaces_get_default_namespace raptor_namespaces_find_namespace raptor_namespaces_find_namespace_by_uri raptor_namespaces_namespace_in_scope raptor_new_namespace raptor_free_namespace raptor_namespace_copy raptor_namespace_get_uri raptor_namespace_get_prefix raptor_namespace_get_counted_prefix raptor_namespaces_format raptor_iostream_write_namespace raptor_new_namespace_parts_from_string raptor_namespace_stack raptor_namespaces_qname_from_uri
section-unicode raptor_unichar raptor_unicode_char_to_utf8 raptor_utf8_to_unicode_char raptor_unicode_is_xml11_namestartchar raptor_unicode_is_xml10_namestartchar raptor_unicode_is_xml11_namechar raptor_unicode_is_xml10_namechar raptor_utf8_check
section-unused RAPTOR_API RAPTOR_DEPRECATED RAPTOR_PRINTF_FORMAT raptor_ntriples_parser raptor_uri_source raptor_ntriples_term_type
raptor-1.4.21/docs/rdfprint.c0000644000175000017500000000146111330672502012754 00000000000000#include #include /* rdfprint.c: print triples from parsing RDF/XML */ void print_triple(void* user_data, const raptor_statement* triple) { raptor_print_statement_as_ntriples(triple, stdout); fputc('\n', stdout); } int main(int argc, char *argv[]) { raptor_parser* rdf_parser=NULL; unsigned char *uri_string; raptor_uri *uri, *base_uri; raptor_init(); rdf_parser=raptor_new_parser("rdfxml"); raptor_set_statement_handler(rdf_parser, NULL, print_triple); uri_string=raptor_uri_filename_to_uri_string(argv[1]); uri=raptor_new_uri(uri_string); base_uri=raptor_uri_copy(uri); raptor_parse_file(rdf_parser, uri, base_uri); raptor_free_parser(rdf_parser); raptor_free_uri(base_uri); raptor_free_uri(uri); raptor_free_memory(uri_string); raptor_finish(); } raptor-1.4.21/docs/rdfcat.c0000644000175000017500000000250111330672502012363 00000000000000#include #include /* rdfcat.c: parse any RDF syntax and serialize to RDF/XML-Abbrev */ static raptor_serializer* rdf_serializer; void serialize_triple(void* user_data, const raptor_statement* triple) { raptor_serialize_statement(rdf_serializer, triple); } static void declare_namespace(void* user_data, raptor_namespace *nspace) { raptor_serialize_set_namespace_from_namespace(rdf_serializer, nspace); } int main(int argc, char *argv[]) { raptor_parser* rdf_parser=NULL; unsigned char *uri_string; raptor_uri *uri, *base_uri; raptor_init(); uri_string=raptor_uri_filename_to_uri_string(argv[1]); uri=raptor_new_uri(uri_string); base_uri=raptor_uri_copy(uri); /* Ask raptor to work out which parser to use */ rdf_parser=raptor_new_parser("guess"); raptor_set_statement_handler(rdf_parser, NULL, serialize_triple); raptor_set_namespace_handler(rdf_parser, NULL, declare_namespace); rdf_serializer=raptor_new_serializer("rdfxml-abbrev"); raptor_serialize_start_to_file_handle(rdf_serializer, base_uri, stdout); raptor_parse_file(rdf_parser, uri, base_uri); raptor_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); raptor_free_parser(rdf_parser); raptor_free_uri(base_uri); raptor_free_uri(uri); raptor_free_memory(uri_string); raptor_finish(); } raptor-1.4.21/docs/raptor-parsers.xml0000644000175000017500000002104311330672502014464 00000000000000 Parsers in Raptor (syntax to triples)
Introduction This section describes the parsers that can be compiled into Raptor and their features. The exact parsers supported may vary by different builds of raptor and can be queried at run-time by use of the raptor_parsers_enumerate and raptor_syntaxes_enumerate functions The optional features that may be set on parsers can also be queried at run-time iwth the raptor_features_enumerate function.
GRDDL parser (name <literal>grddl</literal>) A parser for the Gleaning Resource Descriptions from Dialects of Languages (GRDDL), W3C Proposed Recommendation of 2007-07-16 which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML or XML content into RDF/XML or other RDF syntax which can then be parsed. The GRDDL parser is rather complex and different from the other parsers in that it retrieves URIs, reads HTML documents (possibly with errors), transforms the documents with XSLT and turns the result into a single graph. The default configuration of the GRDDL parser also reads microformats (hcard, hcalendar) and follows <link> tags that point to RDF/XML. Parts of the GRDDL process can be altered by configuration, which are describe below. The URIs that are processed during GRDDL operations can be checked and skipped if required using a handler set with the raptor_parser_set_uri_filter() function. If the handler returns non-0, the URI is rejected. This uses raptor_www_set_uri_filter() internally. If the value of feature RAPTOR_FEATURE_WWW_TIMEOUT if set to a number >0, it is used as the timeout in seconds for retrieving of URIs during GRDDL processing. This uses raptor_www_set_connection_timeout() internally. The hardcoded support for hcard and hcalendar microformats can be disabled by setting parser feature RAPTOR_FEATURE_MICROFORMATS to 0 or using raptor_set_parser_strict() with a value of 1. The GRDDL parser by default will try an XML parser on the content followed by a lax HTML parser. This can be disabled by setting parser feature RAPTOR_FEATURE_HTML_TAG_SOUP to 0 or using raptor_set_parser_strict() with a value of 1. The GRDDL parser by default will try to look for an HTML <link> tag that points to RDF/XML. This can be disabled by setting parser feature RAPTOR_FEATURE_HTML_LINK to 0 or using raptor_set_parser_strict() with a value of 1.
Guess parser (name <literal>guess</literal>) This is a special parser that picks the actual parser to use based on the content type, the content bytes or the content identifier. The content name can be either from a local file or from a URI. If the protocol that delivered the content (such as HTTP) provided a Content Type (aka MIME Type) then this will be the primary means for identifying th ecotnent. The secondary means to identify the content are the bytes of the content (if available), otherwise the content identifier is used, which is the least reliable.
N-Triples parser (name <literal>ntriples</literal>) A parser for the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.
RDFa parser - (name <literal>rdfa</literal>) A parser for the RDFa syntax, W3C Candidate Recommendation 20 June 2008 which allows reading XHTML and XML as RDF triples by interpreting attributes on elements to describe which ones have RDF semantics. This is implemented via librdfa linked inside Raptor, written by Manu Sporny of Digital Bazaar, and licensed with the same license as Raptor. This parser is beta quality and passes all but 4 of the RDFa tests as of Raptor 1.4.18.
RDF/XML parser - default (name <literal>rdfxml</literal>) A parser for the standard RDF/XML syntax as revised by the W3C RDF Core working group. This is the default parser in Raptor. Features of this parser: Fully handles the RDF/XML syntax updates for XML Base, xml:lang, RDF datatyping and Collections. Handles all RDF vocabularies such as FOAF, RSS 1.0, Dublin Core, OWL, DOAP Handles rdf:resource / resource attributes Uses expat and/or (GNOME) libxml XML parsers as available or required
RSS Tag Soup parser (name <literal>rss-tag-soup</literal>) A parser for the multiple XML RSS formats that use the elements such as channel, item, title, description in different ways. This includes support for the Atom 1.0 syndication format defined in IETF RFC 4287 The parser attempts to turn the input into RSS 1.0 RDF triples in the RSS 1.0 model of a syndication feed. This includes triples for RSS Enclosures. True RSS 1.0 when wanted to be used as a full RDF vocabulary, is best parsed by the RDF/XML parser (name rdfxml).
TRiG parser (name <literal>trig</literal>) A parser for the TriG - Turtle with Named Graphs syntax. The parser is alpha quality and may not support the entire TRiG specification.
Turtle Terse RDF Triple Language parser (name <literal>turtle</literal>) A parser for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.
raptor-1.4.21/docs/raptor-tutorial-querying-functionality.xml0000644000175000017500000001014110471526124021377 00000000000000 Listing built-in functionality Raptor can be configured and compiled with support for different parsers and serializers. Lists of the functionality built into the library can be interrogated by means of enumerate functions. These take as input an int counter and return descriptions of the feature at that offset in the list. The descriptions are returned stored in the variables pointed to by the reference arguments of the **var form. The return value of the function is non-zero when the counter has gone too far. Listing Functionality with Enumeration List the parse syntaxes (parser names) int raptor_parsers_enumerate(const unsigned int counter, const char **name, const char **label); List the parse syntaxes (same as above but with more information) int raptor_syntaxes_enumerate(const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string); List the serializer syntaxes (serializer names) int raptor_serializers_enumerate(const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string); List the Parser features int raptor_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); List the Serializer features int raptor_serializer_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); List the XML Writer features int raptor_xml_writer_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); These functions can be called directly after raptor_init() has been called so can be used to find name parameters for creating parser and serializer instances. This is one way to find a parser (name) by it's MIME Type, the other is to use the mime_type parameter of the raptor_new_parser_for_content(). List all features of parsers with an enumerate function int i; for(i=0; i < RAPTOR_FEATURE_LAST; i++) { const char *name; raptor_uri *uri; const char *label; if(raptor_features_enumerate((raptor_feature)i, &name, &uri, &label)) continue; /* do something with name, uri and label */ } There are more examples of this usage in the source for the rapper utility in util/rapper.c. raptor-1.4.21/docs/libraptor.html0000644000175000017500000042010711330705012013637 00000000000000 Raptor RDF Parser Toolkit - Raptor API

Raptor RDF Parser Toolkit - Raptor API


NAME

libraptor − Raptor RDF parser and serializer library

SYNOPSIS

#include <raptor.h>

raptor_init();
raptor_parser *
p=raptor_new_parser("rdfxml");
raptor_set_statement_handler(
p,NULL,print_triples);
raptor_uri *
file_uri=raptor_new_uri("http://example.org/");
raptor_parse_file(
p,file_uri,base_uri);
raptor_parse_uri(
p,uri,NULL);
raptor_free_parser(
p);
raptor_free_uri(
file_uri);
raptor_finish();

cc file.c -lraptor

DESCRIPTION

The Raptor library provides a high-level interface to a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into syntaxes.

The supported parsing syntaxes include RDF/XML, N-Triples, Turtle, TRiG, RSS tag soup (including all RSS and Atoms), GRDDL, RDFa and the serializing syntaxes include RDF/XML (3 varieties), N-Triples, Turtle, RSS 1.0, Atom 1.0, GraphViz DOT and RDF/JSON. The RDF/XML parser can use either expat or libxml XML parsers for providing the SAX event stream. The library functions are arranged in an object-oriented style with constructors, destructors and method calls. The statements and error messages are delivered via callback functions.

Raptor contains a URI-reference parsing and resolving (not retrieval) class (raptor_uri) sufficient for dealing with URI-references inside RDF. This functionality is modular and can be transparently replaced with another existing and compatible URI implementation.

It also provides a URI-retrieval class (raptor_www) for wrapping existing library such as libcurl, libxml2 or BSD libfetch that provides full or partial retrieval of data from URIs and an I/O stream abstraction (raptor_iostream) for supportin serializing to a variety of outputs.

Raptor uses Unicode strings for RDF literals and URIs and preserves them throughout the library. It uses the UTF-8 encoding of Unicode at the API for passing in or returning Unicode strings. It is intended that the preservation of Unicode for URIs will support Internationalized Resource Identifiers (IRIs) which are still under development and standardisation.

LIBRARY INITIALISATION AND CLEANUP

raptor_init()
raptor_finish()

Initialise and cleanup the library. These must be called before any raptor class such as raptor_parser, raptor_uri is created or used. Note: as of 1.4.19 these are wrappers around a static instance of the new raptor_world class. In Raptor 2.0 this initialisation and cleanup method will be removed.

void raptor_set_libxslt_security_preferences(void
*
security_preferences)

Set libxslt security preferences object.

void raptor_set_libxml_flags(int flags)

Set libxml flags from the choices: RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE: save/restore the libxml generic error handler when parsing and RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE: save/restore the libxml structured error handler when parsing.

PARSER CLASS

This class provides the functionality of turning syntaxes into RDF triples - RDF parsing.

PARSER CONSTRUCTORS

raptor_parser* raptor_new_parser(name)

Create a new raptor parser object for the parser with name name currently either "rdfxml", "turtle" or "rss-tag-soup" for the RSS Tag Soup parser.

raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, const
char *
mime_type, const unsigned char *buffer, size_t len, const
unsigned char *
identifier)

Create a new raptor parser object for a syntax identified by URI uri, MIME type mime_type, some initial content buffer of size len or content with identifier identifier. See the raptor_guess_parser_name description for further details.

PARSER DESTRUCTOR

void raptor_free_parser(raptor_parser *parser)

Destroy a Raptor parser object.

PARSER MESSAGE CALLBACK METHODS

Several methods can be registered for the parser that return a variable-argument message in the style of printf(3). These also return a raptor_locator that can contain URI, file, line, column and byte counts of where the message is about. This structure can be used with the raptor_format_locator, raptor_print_locator functions below or the structures fields directly, which are defined in raptor.h
void raptor_set_fatal_error_handler(raptor_parser*
parser, void
*user_data, raptor_message_handler handler)

Set the parser fatal error handler callback.

void raptor_set_error_handler(raptor_parser* parser, void *user_data,
raptor_message_handler
handler)

Set the parser non-fatal error handler callback.

void raptor_set_warning_handler(raptor_parser* parser, void *user_data,
raptor_message_handler
handler)

Set the parser warning message handler callback.

raptor_set_namespace_handler(raptor_parser* parser, void* user_data,
raptor_namespace_handler
handler)

Set the namespace declaration handler callback.

PARSER STATEMENT CALLBACK METHOD

The parser allows the registration of a callback function to return the statements to the application.
void raptor_set_statement_handler(raptor_parser*
parser, void
*
user_data, raptor_statement_handler handler)

Set the statement callback function for the parser. The raptor_statement structure is defined in raptor.h and includes fields for the subject, predicate, object of the statements along with their types and for literals, language and datatype.

PARSER PARSING METHODS

These methods perform the entire parsing in one method. Statements warnings, errors and fatal errors are delivered via the registered statement, error etc. handler functions.

In both of these methods, the base URI is required for the RDF/XML parser (name "rdfxml") and Turtle parser (name "turtle"). The N-Triples parser (name "ntriples") or RSS Tag Soup parser (name "rss-tag-soup") do not use this.
int raptor_parse_file(raptor_parser*
parser, raptor_uri *uri,
raptor_uri *
base_uri)

Parse the given filename (a URI like file:filename) according to the optional base URI base_uri. If uri is NULL, read from standard input and base_uri is then required.

int raptor_parse_file_stream(raptor_parser* parser, FILE* stream, const
char*
filename, raptor_uri *base_uri)

Parse the given C FILE* stream according to the base URI base_uri (required). filename is optional and if given, is used for error messages via the raptor_locator structure.

int raptor_parse_uri(raptor_parser* parser, raptor_uri* uri,
raptor_uri *
base_uri)

Parse the URI according to the base URI base_uri, or NULL if not needed. If no base URI is given, the uri is used. This method depends on the raptor_www subsystem (see WWW Class section below) and an existing underlying URI retrieval implementation such as libcurl, libxml or BSD libfetch to retrieve the content.

PARSER CHUNKED PARSING METHODS

These methods perform the parsing in parts by working on multiple chunks of memory passed by the application. Statements warnings, errors and fatal errors are delivered via the registered statement, error etc. handler functions.
int raptor_start_parse(raptor_parser*
parser, const char *uri)

Start a parse of chunked content with the base URI uri or NULL if not needed. The base URI is required for the RDF/XML parser (name "rdfxml") and Turtle parser (name "turtle"). The N-Triples parser (name "ntriples") or RSS Tag Soup parser (name "rss-tag-soup") do not use this.

int raptor_parse_chunk(raptor_parser* parser, const unsigned char
*buffer, size_t
len, int is_end)

Parse the memory at buffer of size len returning statements via the statement handler callback. If is_end is non-zero, it indicates the end of the parsing stream. This method can only be called after raptor_start_parse().

PARSER UTILITY METHODS

const char* raptor_get_mime_type(raptor_parser* rdf_parser)

Return the MIME type for the parser.

void raptor_set_parser_strict(raptor_parser *parser, int is_strict)

Set the parser to strict (is_strict not zero) or lax (default) mode. The detail of the strictness can be controlled by raptor_set_feature.

int raptor_set_feature(raptor_parser *parser, raptor_feature feature,
int
value)

Set a parser feature feature to a particular value. Returns non 0 on failure or if the feature is unknown. The current defined parser features are:
Feature Values

RAPTOR_FEATURE_ALLOW_BAGID
Boolean (non 0 true)
RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES
Boolean (non 0 true)
RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES
Boolean (non 0 true)
RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST
Boolean (non 0 true)
RAPTOR_FEATURE_ASSUME_IS_RDF
Boolean (non 0 true)
RAPTOR_FEATURE_CHECK_RDF_ID
Boolean (non 0 true)
RAPTOR_FEATURE_HTML_LINK
Boolean (non 0 true)
RAPTOR_FEATURE_HTML_TAG_SOUP
Boolean (non 0 true)
RAPTOR_FEATURE_MICROFORMATS
Boolean (non 0 true)
RAPTOR_FEATURE_NON_NFC_FATAL
Boolean (non 0 true)
RAPTOR_FEATURE_NORMALIZE_LANGUAGE
Boolean (non 0 true)
RAPTOR_FEATURE_NO_NET
Boolean (non 0 true)
RAPTOR_FEATURE_RELATIVE_URIS
Boolean (non 0 true)
RAPTOR_FEATURE_SCANNING
Boolean (non 0 true)
RAPTOR_FEATURE_WARN_OTHER_PARSETYPES
Boolean (non 0 true)
RAPTOR_FEATURE_WWW_TIMEOUT
Integer
RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL
String
RAPTOR_FEATURE_WWW_HTTP_USER_AGENT
String

If the allow_bagid feature is true (default true) then the RDF/XML parser will support the rdf:bagID attribute that was removed from the RDF/XML language when it was revised. This support may be removed in future.

If the allow_non_ns_attributes feature is true (default true), then the RDF/XML parser will allow non-XML namespaced attributes to be accepted as well as rdf: namespaced ones. For example, ’about’ and ’ID’ will be interpreted as if they were rdf:about and rdf:ID respectively.

If the allow_other_parsetypes feature is true (default true) then the RDF/XML parser will allow unknown parsetypes to be present and will pass them on to the user. Unimplemented at present.

If the allow_rdf_type_rdf_list feature is true (default false) then the RDF/XML parser will generate the idList rdf:type rdf:List triple in the handling of rdf:parseType="Collection". This triple was removed during the revising of RDF/XML after collections were initially added.

If the assume_is_rdf feature is true (default false), then the RDF/XML parser will assume the content is RDF/XML, not require that rdf:RDF root element, and immediately interpret the content as RDF/XML.

If the check_rdf_id feature is true (default true) then rdf:ID values will be checked for duplicates and cause an error if found.

if the html_link feature is true (default true), look for head &lt;link&gt; to type rdf/xml for GRDDL parser

If the html_tag_soup feature is true (default true), use a lax HTML parser if an XML parser fails when read HTML for GRDDL parser.

If the microformats feature is true (default true), look for microformats for GRDDL parser.

If the non_nfc_fatal feature is true (default false) then illegal Unicode Normal Form C in literals will give a fatal error, otherwise it gives a warning.

If the normalize_language feature is true (default true) then XML language values such as from xml:lang will be normalized to lowercase.

If the no_net feature is true (default false) then network requests are denied.

If the scanning feature is true (default false), then the RDF/XML parser will look for embedded rdf:RDF elements inside the XML content, and not require that the XML start with an rdf:RDF root element.

If the www_timeout feature is set to an integer larger than 0, it sets the timeout in seconds for internal WWW URI requests for the GRDDL parser.

If the www_http_cache_control feature is set to a string value (default none), it is sent as the value of the HTTP Cache-Control: header in requests.

If the www_http_user_agent feature is set to a string value, it is sent as the value of the HTTP User-Agent: header in requests.
raptor_parser_set_feature_string(raptor_parser *
parser, raptor_feature
feature
, const unsigned char *value)

Set a parser feature feature to a particular string value. Returns non 0 on failure or if the feature is unknown. The current defined parser features are given in raptor_set_feature and at present only take integer values. If an integer value feature is set with this function, value is interpreted as an integer and then that value is used.

int raptor_get_feature(raptor_parser* parser, raptor_feature feature)

Get parser feature integer values. The allowed feature values and types are given under raptor_features_enumerate.

const unsigned char* raptor_parser_get_feature_string(raptor_parser
*
parser, raptor_feature feature)

Get parser feature string values. The allowed feature values and types are given under raptor_features_enumerate.

unsigned int raptor_get_feature_count(void)

Get the count of features defined. Prefered to the compile time-only symbol RAPTOR_FEATURE_LAST which returns the maximum value, not the count. Added raptor_get_need_base_uri

int raptor_feature_value_type(const raptor_feature feature)

Get a raptor feature value tyype - integer or string.

raptor_locator* raptor_get_locator(raptor_parser* rdf_parser)

Return the current raptor_locator object for the parser. This is a public structure defined in raptor.h that can be used directly, or formatted via raptor_print_locator.

void raptor_get_name(raptor_parser *parser)

Return the string short name for the parser.

void raptor_get_label(raptor_parser *parser)

Return a string label for the parser.

void raptor_set_default_generate_id_parameters(raptor_parser*
rdf_parser
, char *prefix, int base)

Control the default method for generation of IDs for blank nodes and bags. The method uses a short string prefix and an integer base to generate the identifier which is not guaranteed to be a strict concatenation. If prefix is NULL, the default is used. If base is less than 1, it is initialised to 1.

void raptor_set_generate_id_handler(raptor_parser* parser, void
*
user_data, raptor_generate_id_handler handler)

Allow full customisation of the generated IDs by setting a callback handler and associated user_data that is called whenever a blank node or bag identifier is required. The memory returned is deallocated inside raptor. Some systems require this to be allocated inside the same library, in which case the raptor_alloc_memory function may be useful.

void raptor_parser_set_uri_filter(raptor_parser* parser,
raptor_uri_filter_func
filter, void* user_data)

Set the URI filter function filter for URIs retrieved during parsing by the the raptor_parser.

int raptor_get_need_base_uri(raptor_parser* rdf_parser)

Get a boolean whether this parser needs a base URI to start parsing.

unsigned char* raptor_parser_generate_id(raptor_parser* rdf_parser,
raptor_genid_type
type)

Generate an ID for a parser of type type, either RAPTOR_GENID_TYPE_BNODEID or RAPTOR_GENID_TYPE_BAGID. This uses any configuration set by raptor_set_generate_id_handler.

void raptor_set_graph_handler(raptor_parser* parser, void* user_data,
raptor_graph_handler
handler)

Set the graph handler callback.

raptor_world* raptor_parser_get_world(raptor_parser* rdf_parser)

Get the world object for the given rdf_parser.

PARSER UTILITY FUNCTIONS

int raptor_parsers_enumerate(const unsigned int counter, const char
**
name, const char **label)

Return the parser name/label for a parser with a given integer counter, returning non-zero if no such parser at that offset exists. The counter should start from 0 and be incremented by 1 until the function returns non-zero.

int raptor_syntaxes_enumerate(const unsigned int counter, const char
**name, const char **
label, const char **mime_type, const unsigned char
**
uri-string)

Return the name, label, mime type or URI string (all optional) for a parser syntax with a given integer counter, returning non-zero if no such syntax parser at that offset exists. The counter should start from 0 and be incremented by 1 until the function returns non-zero.

int raptor_features_enumerate(const raptor_feature feature, const char
**
name, raptor_uri **uri, const char **label)

Return the name, URI, string label (all optional) for a parser feature, returning non-zero if no such feature exists.

Raptor features have URIs that are constructed from the URI http://feature.librdf.org/raptor- and the name so for example feature scanForRDF has URI http://feature.librdf.org/raptor-scanForRDF
int raptor_syntax_name_check(const char *
name)

Check name is a known syntax name.

const char* raptor_guess_parser_name(raptor_uri *uri, const char
*
mime_type, const unsigned char *buffer, size_t len, const unsigned
char *
identifier)

Guess a parser name for a syntax identified by URI uri, MIME type mime_type, some initial content buffer of size len or with content identifier identifier. All of these parameters are optional and only used if not NULL. The parser is chosen by scoring the hints that are given.

raptor_feature raptor_feature_from_uri(raptor_uri *uri)

Turn a URI uri into a raptor feature identifier, or <0 if the feature is unknown. The URIs are described below raptor_set_feature.

STATEMENT UTILITY FUNCTIONS

int raptor_statement_compare(const raptor_statement *s1, const
raptor_statement *
s2)

Compare two statements and return an ordering between them.

void raptor_print_statement(const raptor_statement* const statement,
FILE *
stream)

Print a raptor statement object in a simple format for debugging only. The format of this output is not guaranteed to remain the same between releases.

void raptor_print_statement_as_ntriples(const raptor_statement*
statement
, FILE *stream)

Print a raptor statement object in N-Triples format, using all the escapes as defined in http://www.w3.org/TR/rdf-testcases/#ntriples

raptor_statement_part_as_counted_string(const void *term,
raptor_identifier_type
type, raptor_uri* literal_datatype, const
unsigned char *
literal_language, size_t* len_p)
char* raptor_statement_part_as_string(const void *
term,
raptor_identifier_type
type, raptor_uri* literal_datatype, const
unsigned char *
literal_language)

Turns part of raptor statement into N-Triples format, using all the escapes as defined in http://www.w3.org/TR/rdf-testcases/#ntriples The part (subject, predicate, object) of the raptor_statement is passed in as term, the part type (subject_type, predicate_type, object_type) is passed in as type. When the part is a literal, the literal_datatype and literal_language fields are set, otherwise NULL (usually object_datatype, object_literal_language).

If raptor_statement_part_as_counted_string is used, the length of the returned string is stored in *len_p if not NULL.

LOCATOR UTILITY FUNCTIONS

int raptor_format_locator(char *buffer, size_t length, raptor_locator*
locator
)

This method takes a raptor_locator object as passed to an error, warning or other handler callback and formats it into the buffer of size length bytes. If buffer is NULL or length is insufficient for the size of the formatted locator, returns the number of additional bytes required in the buffer to write the locator.

In particular, if this form is used:
length=raptor_format_locator(NULL, 0, locator) it will return in length the size of a buffer that can be allocated for locator and a second call will perform the formatting:
raptor_format_locator(buffer, length, locator)

void raptor_print_locator(FILE *stream, raptor_locator* locator)

This method takes a raptor_locator object as passed to an error, warning or other handler callback, formats and prints it to the given stdio stream.

int raptor_locator_line(raptor_locator *locator)

Returns the line number in a locator structure or <0 if not available.

int raptor_locator_column(raptor_locator *locator)

Returns the column number in a locator structure or <0 if not available.

int raptor_locator_byte(raptor_locator *locator)

Returns the byte offset in a locator structure or <0 if not available.

const char * raptor_locator_file(raptor_locator *locator)

Returns the filename in a locator structure or NULL if not available. Note the returned pointer is to a shared string that must be copied if needed.

const char * raptor_locator_uri(raptor_locator *locator)

Returns the URI string in a locator structure or NULL if not available. Note this does not return a raptor_uri* pointer and the returned pointer is to a shared string that must be copied if needed.

N-TRIPLES UTILITY FUNCTIONS

void raptor_print_ntriples_string(FILE* stream, const char* string,
const char
delim)

This is a standalone function that prints the given string according to N-Triples escaping rules, expecting to be terminated by delimiter delim which is usually either ’, " or <. If a null delimiter \0 is given, no extra escaping is performed.

int raptor_iostream_write_string_ntriples(raptor_iostream *iostr, const
unsigned char *
string, size_t len, const char delim)

Write an N-Triples encoded version of the given string to iostream iostr. If delim is given, that is the ending delimeter of the encoded string and it will be escaped in the output as appropriate. Useful delim values are ’, " and >. If a null delimiter \0 is given, no extra escaping is performed.

int raptor_iostream_write_string_python(raptor_iostream *iostr, const
unsigned char *string, size_t len, const char delim, int flags)

Write string encoded to an iostream according to the delimeter delim and encoding flags. The flag value selects formatting according to the appropriate Python-related languages such as N-Triples (0), Turtle (1), Turtle long quoted string (2), JSON (3).

void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr,
const raptor_statement *statement)

Write an N-Triples encoded version of the raptor_statement statement to iostream iostr.

void raptor_iostream_write_string_turtle(raptor_iostream* iostr, const
unsigned char*
string, size_t len)

DEPRECATED in 1.4.17 - use raptor_iostream_write_string_python instead. Write an UTF-8 string of length len using the Turtle "longString" triple quoting format to the iostream iostr.

const char* raptor_ntriples_term_as_string (raptor_ntriples_term_type
term
)

Deprecated, for internal use.

XML UTILITY FUNCTIONS

int raptor_xml_any_escape_string(const unsigned char* string, size_t
len
, unsigned char* buffer, size_t length, char quote, int xml_version,
raptor_simple_message_handler
error_handler, void* error_data)
int raptor_xml_escape_string(const unsigned char *
string, size_t len,
unsigned char *
buffer, size_t length, char quote,
raptor_message_handler
error_handler, void *error_data)

Apply the XML escaping rules to the string given in (string, len) into the buffer of size length. If quote is given, the escaped content is for an XML attribute and the appropriate quote character XML element content (CDATA). The error_handler method along with error_data allow error reporting to be given. If buffer is NULL, returns the size of the buffer required to escape. Otherwise the return value is the number of bytes used or <0 on failure.

When an xml_version argument is present and has a value 10 (XML 1.0) or 11 (XML 1.1) then that version is used. The default with no argument is to generate XML 1.0.

int raptor_iostream_write_xml_any_escaped_string(raptor_iostream*
iostr
, const unsigned char* string, size_t len, char quote, int
xml_version
, raptor_simple_message_handler error_handler, void*
error_data
)
int raptor_iostream_write_xml_escaped_string(raptor_iostream*
iostr,
const unsigned char *
string, size_t len, char quote,
raptor_simple_message_handler
error_handler, void *error_data)

Write an XML-escaped version of the string given in (string, len) to iostream iostr. If quote is given, the escaped content is for an XML attribute and the appropriate quote character is used, otherwise it is XML element content (CDATA). The error_handler method along with error_data allow error reporting to be given.

When an xml_version argument is present and has a value 10 (XML 1.0) or 11 (XML 1.1) then that version is used. The default with no argument is to generate XML 1.0.

int raptor_xml_name_check(const unsigned char *string, size_t length,
int xml_version)

Check that the given string of length bytes is a legal XML name according to XML 1.0 or XML 1.1. xml_version is set to 10 or 11 respectively. Returns non-zero if the name is legal.

MEMORY UTILITY FUNCTIONS

void raptor_free_memory(void *ptr)

Free memory allocated inside raptor. Some systems require memory allocated in a library to be deallocated inside that library. This function can be used in that situation to free memory allocated by raptor, such as the result of the _to_ methods that return allocated memory such as raptor_uri_to_filename, raptor_uri_to_string, raptor_uri_to_relative_counted_uri_string, raptor_uri_to_relative_uri_string or raptor_new_namespace_parts_from_string.

void* raptor_alloc_memory(size_t size)

Allocate memory inside the raptor library. Some systems require memory allocated in a library to be deallocated inside that library. This function can be used in that situation to allocate memory for raptor to free later, such as inside the handler function declared with raptor_set_generate_id_handler which returns new memory.

void* raptor_calloc_memory(size_t nmemb, size_t size)

Allocate zeroed array of items inside raptor. Some systems require memory allocated in a library to be deallocated inside that library. This function can be used in that situation to clear an array of allocated memory for raptor to use, for freeing later, such as inside the handler function declared with raptor_set_generate_id_handler which returns new memory.

UNICODE UTILITY FUNCTIONS

int raptor_unicode_char_to_utf8(raptor_unichar c, unsigned char
*
output)

Turn a Unicode character into UTF8 bytes in output of size c bytes which must be of sufficient size. Returns the number of bytes encoded or <0 on failure.

int raptor_utf8_to_unicode_char(raptor_unichar *output, const unsigned
char *
input, int length)

Decode a sequence UTF8 bytes in input of size length into a Unicode character in output returning the number of bytes used or <0 on failure.

int raptor_utf8_check(const unsigned char *string, size_t length)

Check that a given string is legal UTF-8 encoding and includes only legal Unicode characters U+0 to U+0x10ffff inclusive. Returns non-0 if the string is good.

int raptor_unicode_is_xml11_namestartchar(raptor_unichar c)
int raptor_unicode_is_xml10_namestartchar(raptor_unichar
c)
int raptor_unicode_is_xml11_namechar(raptor_unichar
c)
int raptor_unicode_is_xml10_namechar(raptor-unichar
c)

Check that given Unicode characters are allowed as XML 1.0 or XML 1.0 names - either as the starting character (*_namestartchar) or continuing character (*_namechar). Returns non-0 if the character is allowed.

ERROR UTILITY FUNCTIONS

void raptor_error_handlers_init(raptor_error_handlers* error_handlers)

Initialise an error_handlers structure after the log level handlers and user data pointers have been set.

MISCELLANEOUS UTILITY FUNCTIONS

char* raptor_vsnprintf(const char *message, va_list arguments)

Compatibility wrapper around vsnprintf.

STATIC VARIABLES

There are several read-only static variables in the raptor library:
const char * const raptor_short_copyright_string

Short copyright string, suitable for one line.

const char * const raptor_copyright_string

Full copyright over several lines including URLs.

const char * const raptor_version_string

The version as a string

const unsigned int raptor_version_major

The major version number as an integer.

const unsigned int raptor_version_minor

The minor version number as an integer.

const unsigned int raptor_version_release

The release version number as an integer.

const unsigned int raptor_version_decimal

The version number as a single decimal.

const char * const raptor_license_string

The license string over several lines including URLs.

const char * const raptor_home_url_string

The home page URL as a string.

SERIALIZER CLASS

This class provides the functionality of turning RDF triples into syntaxes - RDF serializing.

SERIALIZER CONSTRUCTOR

raptor_serializer* raptor_new_serializer(const char *name)

Create a new raptor serializer object for the serializer with name name currently either "rdfxml" or "ntriples". or "rss-1.0" for the RSS 1.0 serializer.

SERIALIZER DESTRUCTOR

void raptor_free_serializer(raptor_serializer* rdf_serializer)

Destroy a Raptor serializer object.

SERIALIZER SERIALIZING METHODS

int raptor_serialize_start(raptor_serializer* rdf_serializer,
raptor_uri *
uri, raptor_iostream *iostream)

Start to serialize content using the given iostream to write to with optional base URI uri. The iostream becomes owned by the serializer object and is destroyed at the end of serializing when raptor_serialize_end() is called. Note that some syntaxes may refuse to serialize without a base URI, such as RDF/XML.

int raptor_serialize_start_to_iostream(raptor_serializer*
rdf_serializer
, raptor_uri* uri, raptor_iostream* iostream)

Start to serialize content using the given iostream to write to with optional base URI uri. The iostream does NOT become owned by the serializer object and the caller may continue to write to it after serializing is finished. Note that some syntaxes may refuse to serialize without a base URI, such as RDF/XML.

int raptor_serialize_start_to_filename(raptor_serializer*
rdf_serializer
, const char *filename)

Start to serialize content to the file filename which is opened for writing. The base URI is calculated from the file name.

int raptor_serialize_start_to_string(raptor_serializer* rdf_serializer,
raptor_uri *
uri, void **string_p, size_t *length_p)

Start to serialize content to a string. string_p must point to a void* pointer that will be used at the end of serializing to store the newly allocated string. length_p if not NULL, it will be used to store the length of the new string. The serializing is done with optional base URI uri however some syntaxes may refuse to serialize without a base URI, such as RDF/XML.

int raptor_serialize_start_to_file_handle(raptor_serializer*
rdf_serializer
, raptor_uri *uri, FILE *handle)

Start to serialize content to the already open C Standard I/O FILE* handle with the base URI uri, which is optional and may be NULL. Note that some syntaxes may refuse to serialize without a base URI, such as RDF/XML.

int raptor_serialize_statement(raptor_serializer* rdf_serializer, const
raptor_statement *
statement)

Serialize a single statement using the serializer.

int raptor_serialize_end(raptor_serializer* rdf_serializer)

End the serializing. This may close and delete resources used in serializing. No more calls to raptor_serialize_statement or raptor_serialize_end may be done at this point.

raptor_iostream* raptor_serializer_get_iostream(raptor_serializer
*
serializer)

Return a pointer to the raptor_iostream* used by the serializer.

int raptor_serializer_set_namespace(raptor_serializer* serializer,
raptor_uri *
uri, const char *prefix)

Set a suggested namespace URI/prefix mapping for use in serializing.

SERIALIZER UTILITY METHODS

void raptor_serializer_set_error_handler(raptor_serializer* serializer,
void *
user_data, raptor_message_handler handler)

Set the serializer non-fatal error handler callback.

void raptor_serializer_set_warning_handler(raptor_serializer*
serializer
, void *user_data, raptor_message_handler handler)

Set the serializer warning message handler callback.

raptor_locator* raptor_serializer_get_locator(raptor_serializer*
rdf_serializer
)

Return the current raptor_locator object for the serializer. This is a public structure defined in raptor.h that can be used directly, or formatted via raptor_print_locator.

int raptor_serializer_set_feature(raptor_serializer *serializer,
raptor_feature
feature, int value)

Set a serializer feature feature to a particular value. Returns non 0 on failure or if the feature is unknown. The current defined serializer features are:
Feature Values

RAPTOR_FEATURE_RELATIVE_URIS
Boolean (non 0 true)
RAPTOR_FEATURE_WRITE_BASE_URI
Boolean (non 0 true)
RAPTOR_FEATURE_START_URI
URI String
RAPTOR_FEATURE_BNODE_BORDER
String
RAPTOR_FEATURE_BNODE_FILL
String
RAPTOR_FEATURE_JSON_CALLBACK
String
RAPTOR_FEATURE_JSON_EXTRA_DATA
String
RAPTOR_FEATURE_LITERAL_BORDER
String
RAPTOR_FEATURE_LITERAL_FILL
String
RAPTOR_FEATURE_RESOURCE_BORDER
String
RAPTOR_FEATURE_RESOURCE_FILL
String
RAPTOR_FEATURE_RSS_TRIPLES
String
RAPTOR_FEATURE_ATOM_ENTRY_URI
String

If the relative_uris feature is true (default false) then when serialising, preference is given to generating relative URIs where possible.

If the write_base_uri feature is true (default true) then the atom, rdfxml, rdfxml-abbrev and turtle serializers will write an @base or xml:base directive in the output.

If the start_uri feature is set to a URI it is used by the serializer to start serializing from.

If the bnode_border feature is set, the DOT serializer uses it as the bnode border colour.

If the bnode_fill feature is set, the DOT serializer uses it as the bnode fill colour.

If the json_callback feature is set, the JSON serializers use it as the name of the callback to wrap the outer JSON object.

If the json_extra_data feature is set, the JSON serializers use it as extra data inside the outer JSON object.

If the literal_border feature is set, the DOT serializer uses it as the literal border colour.

If the literal_fill feature is set, the DOT serializer uses it as the literal fill colour.

If the resource_border feature is set, the DOT serializer uses it as the resource border colour.

If the resource_fill feature is set, the DOT serializer uses it as the resource fill colour.

If the rss_triples feature is set to the string "rdf-xml" for the rss-1.0 serializer or "atom-triples" for the atom serializer, it writes extra rdf triples into the serialized output.

If the atom_entry_uri feature is set to a URI string, it is used to trigger generation of an atom entry document for the atom serializer.
int raptor_serializer_get_feature(raptor_serializer*
serializer,
raptor_feature
feature)

Get serializer features, the allowed feature values are available

raptor_world* raptor_serializer_get_world(raptor_serializer*
rdf_serializer
)

Get the world object for the given rdf_serializer.

SERIALIZER UTILITY FUNCTIONS

int raptor_serializers_enumerate(const unsigned int counter, const char
**
name, const char **label, const char **mime_type, const unsigned char
**
uri_string)

Return the serializer name/label for a serializer with a given integer counter, returning non-zero if no such parser at that offset exists. The counter should start from 0 and be incremented by 1 until the function returns non-zero.

int raptor_serializer_syntax_name_check(const char *name)

Check name is a known serializer syntax name.

URI CLASS

Raptor has a raptor_uri class must be used for manipulating and passing URI references. The default internal implementation uses char* strings for URIs, manipulating them and constructing them. This URI implementation can be replaced by any other that provides the equivalent functionality, using the raptor_uri_set_handler function.

URI CONSTRUCTORS

There a several constructors for raptor_uri to build them from char* strings and existing raptor_uri objects.
raptor_uri* raptor_new_uri(const unsigned char*
uri_string)

Create a raptor URI from a string URI-reference uri_string.

raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri* uri, const
unsigned char*
local_name)

Create a raptor URI from a string URI-reference local_name relative to an existing URI-reference. This performs concatenation of the local_name to the uri and not relative URI resolution, which is done by the raptor_new_uri_relative_to_base constructor.

raptor_uri* raptor_new_uri_relative_to_base(raptor_uri* base_uri, const
unsigned char* uri_string
)

Create a raptor URI from a string URI-reference uri_string using relative URI resolution to the base_uri.

raptor_uri* raptor_new_uri_from_id(raptor_uri* base_uri, const unsigned
char*
id)

Create a raptor URI from a string RDF ID id concatenated to the base_uri base URI.

raptor_uri* raptor_new_uri_for_rdf_concept(const char* name)

Create a raptor URI for the RDF namespace concept name.

raptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* old_uri))

Create a raptor URI suitable for use with xml:base (throw away fragment)

URI DESTRUCTOR

void raptor_free_uri(raptor_uri* uri)

Destroy a raptor URI object.

URI METHODS

int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2)

Return non-zero if the given URIs are equal.

raptor_uri* raptor_uri_copy(raptor_uri* uri)

Return a copy of the given raptor URI uri.

unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t*
len_p)
unsigned char* raptor_uri_as_string(raptor_uri*
uri)

Return a shared pointer to a string representation of the given raptor URI uri. This string is shared and must not be freed (otherwise see the raptor_uri_to_* methods below). If raptor_uri_as_counted_string is used, the length of the returned string is stored in *len_p if not NULL.

unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t
*
len_p)
unsigned char* raptor_uri_to_string(raptor_uri *
uri)

Return a to a newly alloced string representation of the given raptor URI uri. This string must be freed by the caller using raptor_free_memory. If raptor_uri_to_counted_string is used, the length of the returned string is stored in *len_p if not NULL.

unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri
*
base_uri, raptor_uri *reference_uri, size_t *length_p)
unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *
base_uri,
raptor_uri *
reference_uri)

Return a new relative URI string of a URI reference_uri against a base URI base_uri. The returned string must be freed with raptor_free_memory. If raptor_uri_to_relative_counted_string is used, the length of the returned string is stored in *len_p if not NULL.

void raptor_uri_print(const raptor_uri* uri, FILE *stream)

Print URI uri to the file handle stream.

int raptor_iostream_write_uri(raptor_iostream* iostr, raptor_uri* uri)

Write the raptor_uri uri to the iostream ostr.

URI UTILITY FUNCTIONS

void raptor_uri_resolve_uri_reference (const unsigned char* base_uri,
const unsigned char*
reference_uri, char unsigned* buffer, size_t
length
)

This is a standalone function that resolves the relative URI reference_uri against the base URI base_uri according to the URI resolution rules in RFC2396. The resulting URI is stored in buffer which is of length bytes. If this is too small, no work will be done.

char *raptor_uri_filename_to_uri_string(const unsigned char* filename)

This is a standalone function that turns a local filename (Windows or Unix style as appropriate for platform) into a URI string (file).
The returned string must be freed by the caller. Some systems require memory allocated in a library to be deallocated inside that library in which case raptor_free_memory may be used.

char *raptor_uri_uri_string_to_filename(const unsigned char*
uri_string
)
char *raptor_uri_uri_string_to_filename(const unsigned char*

uri_string
, unsigned char **fragment_p)

These are standalone functions that turn a URI string that represents a local filename (file:) into a filename, with optional URI fragment. If fragment_p is not NULL it points to the location to store a newly allocated string containing the fragment. The returned strings must be freed by the caller. Some systems require memory allocated in a library to be deallocated inside that library in which case raptor_free_memory may be used.

int raptor_uri_is_file_uri(const unsigned char* uri_string)

DEPRECATED in 1.4.9. Returns non-zero if the given URI string represents a filename. Use raptor_uri_uri_string_is_file_uri in preference.

int raptor_uri_uri_string_is_file_uri(const unsigned char* uri_string)

Returns non-zero if the given URI string represents a filename.

URI CLASS IMPLEMENTATION

void raptor_uri_set_handler(const raptor_uri_handler *handler, void
*
context)

Change the URI class implementation to the functions provided by the handler URI implementation. The context user data is passed in to the handler URI implementation calls.

void raptor_uri_get_handler(raptor_uri_handler **handler, void
**
context)

Return the current raptor URI class implementation handler and context

WWW CLASS

This is a small wrapper class around existing WWW libraries in order to provide HTTP GET or better URI retrieval for Raptor. It is not intended to be a general purpose WWW retrieval interface.

WWW CLASS INITIALISATION AND CLEANUP

void raptor_www_init(void)
void raptor_www_finish(void)

Initialise or terminate the raptor_www infrastructure. raptor_www_init and raptor_finish are called by raptor_init and raptor_finish respecitively, otherwise must be called once each.

NOTE

Several of the WWW library implementations require once-only initialisation and termination functions to be called, however raptor cannot determine whether this is already done before the library is initialised in raptor_www_init or terminated in raptor_www_finish, so always performs it. This can be changed by raptor_www_no_www_library_init_finish.

void raptor_www_no_www_library_init_finish(void)

If this is called before raptor_www_init, it will not call the underlying WWW library global initialise or terminate functions. The application code must perform both operations.

For example with curl, after this function is called, neither curl_global_init nor curl_global_cleanup will be called during raptor_www_init or raptor_www_finish respectively.

WWW CONSTRUCTORS

raptor_www *raptor_www_new(void)
raptor_www *raptor_www_new_with_connection(void*
connection)

Create a raptor WWW object capable of URI retrieval. If connection is given, it must match the connection object of the underlying WWW implementation. At present, this is only for libcurl, and allows you to re-use an existing curl handle, or use one which has been set up with some desired qualities.

WWW DESTRUCTOR

void raptor_www_free(raptor_www *www)

Destroy a raptor WWW object.

WWW METHODS

void raptor_www_set_user_agent(raptor_www *www, const char *user_agent)

Set the HTTP User-Agent header value.

int raptor_www_set_http_cache_control(raptor_www* www, const char*
cache_control
)

Set the HTTP Cache-Control header value.

void raptor_www_set_proxy(raptor_www *www, const char *proxy)

Set the HTTP proxy - usually a string of the form http://server:port

raptor_www_set_write_bytes_handler(raptor_www *www,
raptor_www_write_bytes_handler
handler, void *user_data)

Set the handler to receive bytes written by the raptor_www implementation.

void raptor_www_set_content_type_handler(raptor_www *www,
raptor_www_content_type_handler
handler, void *user_data)

Set the handler to receive the HTTP Content-Type value, when/if discovered during retrieval by the raptor_www implementation.

void raptor_www_set_http_accept(raptor_www *www, const char *value)

Set the WWW HTTP Accept: header to value. If value is NULL, an empty header is sent.

void raptor_www_set_error_handler(raptor_www *www,
raptor_message_handler
error_handler, void *error_data)

Set the error handler routine for the raptor_www class. This takes the same arguments as the raptor_parser error, warning handler methods.

void raptor_www_set_uri_filter(raptor_www* www, raptor_uri_filter_func
filter
, void* user_data)

Set the URI filter function filter for URIs retrieved by the raptor_www object.

void* raptor_www_get_connection(raptor_www *www)

Return the underlying WWW library connection object. For example, for libcurl this is the curl_handle.

void raptor_www_set_connection_timeout(raptor_www* www, int timeout)

Set the WWW connection timeout in seconds.

raptor_uri* raptor_www_get_final_uri(raptor_www* www)

Get the final URI from a WWW retrieval, which may include redirections.

WWW ACTION METHODS

int raptor_www_fetch(raptor_www *www, raptor_uri *uri)

Retrieve the given URL, returning non zero on failure.

int raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void
**string_p, size_t *length_p, void *(*malloc_handler)(size_t size))

Retrieve the given URL to a string. string_p must point to a void* pointer that will be used to store the newly allocated string. length_p if not NULL, it will be used to store the length of the new string.

void raptor_www_abort(raptor_www *www, const char *reason)

Abort an ongoing raptor WWW operation. Typically used within one of the raptor WWW handlers.

QNAME CLASS

This is a class for handling XML QNames consisting of the pair of (a URI from a namespace, a local name) along with an optional value -- useful for XML attributes. This is used with the raptor_namespace_stack and raptor_namespace classes to handle a stack of raptor_namespace that build on raptor_qname.

QNAME CONSTRUCTORS

There are two constructors for raptor_qname to build qnames with optional values on a stack of names.
raptor_qname* raptor_new_qname(raptor_namespace_stack *
nstack, const
unsigned char *
name, const unsigned char *value,
raptor_simple_message_handler
error_handler, void *error_data)

Create a raptor QName name (a possibly :-separated name) with name to be resolved against the given nstack namespace stack. An optional value can be given, and if there is an error, the error_handler and error_data will be used to invoke the callback.

raptor_qname* raptor_new_qname_from_namespace_local_name
(raptor_namespace *
ns, const unsigned char *local_name, const unsigned
char *
value)

Create a raptor QName using the namespace name of the raptor_namespace ns and the local name local_name, along with optional value value. Errors are reported using the error handling and data of the namespace.

raptor_qname* raptor_qname_copy(raptor_qname *qname)

Create a raptor QName from an existing one, returning NULL on failure.

QNAME DESTRUCTOR

void raptor_free_qname(raptor_qname* name)

Destroy a raptor qname object.

QNAME METHODS

int raptor_qname_equal(raptor_qname* name1, raptor_qname *name2)

Return non-zero if the given QNames are equal.

int raptor_iostream_write_qname(raptor_iostream* iostr, raptor_qname
*
qname)

Write the raptor_qname qname to the iostream ostr.

const unsigned char* raptor_qname_get_local_name(raptor_qname* name)

Get the local name of the QName.

const unsigned char* raptor_qname_get_value(raptor_qname* name)

Get the value of the QName for an XML attribute QName.

const unsigned char* raptor_qname_get_counted_value(raptor_qname* name,
size_t*
length_p)

Get the value fo the QName along with the length (if length_p is not NULL) for an XML attribute QName.

unsigned char* raptor_qname_to_counted_name(raptor_qname* qname,
size_t*
length_p)

Get the formatted QName as a newly allocated counted string (if length_p is not NULL).

QNAME UTILITY FUNCTIONS

raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack,
const unsigned char *
name, size_t name_len,
raptor_simple_message_handler
error_handler, void *error_data)

Return the URI corresponding to the QName according to the RDF method; concatenating the namespace’s name (URI) with the local name. Takes the same arguments as raptor_new_qname but does not create a raptor_qname object.

raptor_namespace* raptor_qname_get_namespace(raptor_qname* name)

Return the raptor_namespace used by the QName. Will never be NULL even for the default namespace in which case the URI of the returned namespace object will be NULL.

NAMESPACE CLASS

An XML namespace class - each entry is on a stack and consists of a name (URI) and prefix. The prefix or the name but not both may be empty. If the prefix is empty, it defines the default prefix. If the name is empty, it undefines the given prefix.

NAMESPACE CONSTRUCTORS

raptor_namespace* raptor_new_namespace(raptor_namespace_stack *nstack,
const unsigned char *
prefix, const unsigned char *ns_uri_string, int
depth
)
raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack
*
nstack, const unsigned char *prefix, raptor_uri* ns_uri, int depth)

Create a new raptor_namespace object on the given namespace stack nstack with prefix prefix and namespace name either from URI string ns_uri_string or from copying URI ns_uri.

If prefix is NULL, it defines the URI for the default namespace prefix. If the namespace name (ns_uri_string or ns_uri) is NULL, it undefines the given prefix in the current scope. Both prefix and URI may be NULL to undefine the default namespace. depth signifies the position of the namespace on the stack; 0 is the bottom of the stack and generally the first depth for user namespace declarations.

Namespaces declared on the same depth (such as on the same XML element, typically) can be handily freed with raptor_namespaces_end_for_depth method on the namespace stack class.

NAMESPACE DESTRUCTOR

void raptor_free_namespace(raptor_namespace *ns)

Destroy a raptor namespace object.

NAMESPACE METHODS

raptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns)

Return the namespace name (URI) of the namespace.

const unsigned char* raptor_namespace_get_prefix(const raptor_namespace
*ns)

Return the prefix of the namespace.

const unsigned char* raptor_namespace_get_counted_prefix(const
raptor_namespace*
ns, size_t* length_p)

Return the prefix of the namespace as a string with optional count stored in the variable address length_p if it is not NULL.

unsigned char *raptor_namespaces_format(const raptor_namespace *ns,
size_t *length_p)

Format the namespace as a string and return it as a new string, returning the length of the resulting string in length_p if it is not NULL. The string format is suitable for emitting in XML to declare the namespace.

int raptor_iostream_write_namespace(raptor_iostream* iostr,
raptor_namespace *
ns)

Write a formatted namespace declaration like xmlns... to an iostream iostr.

NAMESPACE UTILITY FUNCTIONS

int raptor_namespace_copy(raptor_namespace_stack *nstack,
raptor_namespace *ns, int new_depth)

Copy the namespace from the current stack to the new one, nstack at depth new_depth.

int raptor_new_namespace_parts_from_string(unsigned char *string,
unsigned char **
prefix, unsigned char **uri_string)

Parse string with an XML-style namespace declaration like xmlns="", xmlns="uri", xmlns:prefix="" or xmlns:prefix="uri" into the strings pointed to by prefix string and a uri_string. Empty prefixes or namespace names return NULL pointers. Returned strings must be freed by the caller using raptor_free_memory.

NAMESPACE STACK CLASS

A stack of raptor_namespace objects where the namespaces on top of the stack have wider scope and override earlier (lower) namespace declarations. Intended to match the XML namespace declaring semantics using xmlns attributes.

NAMESPACE STACK CONSTRUCTORS

raptor_namespace_stack* raptor_new_namespaces(raptor_uri_handler
*uri_handler, void *uri_context, raptor_simple_message_handler
error_handler, void *error_data, int defaults)
int raptor_namespaces_init(raptor_namespace_stack *nstack,
raptor_uri_handler *handler, void *context,
raptor_simple_message_handler error_handler, void *error_data, int
defaults)

Create or initialise a new raptor_namespace_stack object with the given URI and error handlers. raptor_namespaces_new allocates new memory for the namespace stack and raptor_namespaces_init initialises an existing declared nstack, which could be statically allocated. Note that raptor_uri_get_handler can be useful to return the current raptor URI handler/context. The defaults argument describes which default namespaces are declared in the empty stack. At present, 0 is none, 1 for just the XML namespace and 2 is for a typical set of namespaces used for RDF, RDFS, Dublin Core, OWL, ... that may vary over time.

In versions 1.4.16 or newer this returns an integer result, non-0 on failure.

NAMESPACE STACK DESTRUCTORS

void raptor_free_namespaces(raptor_namespace_stack *nstack)

Destroy a namespace stack object, freeing the nstack (goes with raptor_new_namespaces).

void raptor_namespaces_clear(raptor_namespace_stack *nstack)

Clear a statically allocated namespace stack; does not free the nstack. (goes with raptor_namespaces_init).

NAMESPACE STACK METHODS

void raptor_namespaces_start_namespace(raptor_namespace_stack *nstack,
raptor_namespace *nspace)

Start the given nspace on the stack, at the depth already defined.

int raptor_namespaces_start_namespace_full(raptor_namespace_stack
*nstack, const unsigned char *prefix, const unsigned char *nspace, int
depth)

Create a new raptor_namespace and start it on the stack. See raptor_new_namespace for the meaning of the argumens.

void raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack,
int depth)

End (and free) all namespaces on the stack at the given depth.

raptor_namespace* raptor_namespaces_get_default_namespace
(raptor_namespace_stack *nstack)

Return the current default raptor_namespace of the namespace stack or NULL if there is none.

raptor_namespace*
raptor_namespaces_find_namespace_by_uri(raptor_namespace_stack *
nstack,
raptor_uri *
ns_uri)

Find the first namespace on the stack with the given uri ns_uri or NULL if there is none.

raptor_namespace
*raptor_namespaces_find_namespace_by_uri(raptor_namespace_stack
*nstack, const unsigned char *prefix, int prefix_length)

Find the first namespace on the stack with the given namespace prefix or NULL if there is none.

int raptor_namespaces_namespace_in_scope(raptor_namespace_stack
*nstack, const raptor_namespace *nspace)

Return non-zero if the raptor_namespace nspace is declared on the stack; i.e. in scope if this is a stack of XML namespaces.

NAMESPACE STACK UTILITY FUNCTIONS

raptor_qname* raptor_namespaces_qname_from_uri(raptor_namespace_stack*
nstack
, raptor_uri* uri, int xml_version)

Create a raptor QName from the URI uri if the URI is squal one of the namespace URIs on the namespace stack nstack URIs concatenated to a legal XML name for the given XML version. URIs are created and errors are reported using the namespace stack fields. Fails if it cannot be legally described with any of the namespaces.

SEQUENCE CLASS

A class for ordered sequences of items, adding at either end of the sequence. The method names should be familiar to Perl users.

SEQUENCE CONSTRUCTOR

raptor_sequence* raptor_new_sequence(raptor_sequence_free_handler*
free_handler
, raptor_sequence_print_handler* print_handler)

Create a new empty sequence, with optional handler for freeing elements (as used by raptor_free_sequence and printing out elements (used by raptor_sequence_print).

SEQUENCE DESTRUCTOR

void raptor_free_sequence(raptor_sequence* seq)

Destoy a sequence object, freeing any items if the free handler was defined in the constructor.

SEQUENCE METHODS

int raptor_sequence_size(raptor_sequence* seq)

Return the number of items in the sequence.

int raptor_sequence_set_at(raptor_sequence* seq, int idx, void *data)

Set the sequence item at index idx to the value data, extending it if necessary.

int raptor_sequence_push(raptor_sequence* seq, void *data)

Add item data to the end of the sequence.

int raptor_sequence_shift(raptor_sequence* seq, void *data)

Add item data to the start of the sequence.

void* raptor_sequence_get_at(raptor_sequence* seq, int idx)

Get the sequence item at index idx or NULL if no such index exists.

void* raptor_sequence_pop(raptor_sequence* seq)

Remove and return an item from the end of the sequence, or NULL if is empty.

void* raptor_sequence_unshift(raptor_sequence* seq)

Remove and return an item from the start of the sequence, or NULL if is empty.

void raptor_sequence_sort(raptor_sequence* seq, int(*compare)(const
void *, const void *))

Sort the sequence using the given comparison function compare which is passed to qsort(3) internally.

int raptor_compare_strings(const void *a, const void *b)

Helper function useful with raptor_sequence_sort.

void raptor_sequence_set_print_handler(raptor_sequence *seq,
raptor_sequence_print_handler *
print_handler)

Set the print handler for the sequence, an alternative to setting it in the constructor.

void raptor_sequence_print_string(char *data, FILE *fh)

Helper print handler function useful for printing out sequences of strings.

void raptor_sequence_print_uri(char *data, FILE *fh)

Helper print handler function useful for printing out sequences of raptor_uri* objects.

void raptor_sequence_print(raptor_sequence* seq, FILE* fh)

Print out the sequence in a debug format to the given file handler fh. NOTE: The exact format is not guaranteed to remain the same between releases.

int raptor_sequence_join(raptor_sequence* dest, raptor_sequence *src)

Join two sequences moving all items from sequence src to the end of sequence dest. After this operation, sequence src will be empty (zero size) but will have the same item capacity as before.

void* raptor_sequence_delete_at(raptor_sequence* seq, int idx)

Remove an item from position idx in the sequence, returning it.

STRINGBUFFER CLASS

A class for growing strings, small chunks at a time.

STRINGBUFFER CONSTRUCTOR

raptor_stringbuffer* raptor_new_stringbuffer(void)

Create a new stringbuffer.

STRINGBUFFER DESTRUCTOR

void raptor_free_stringbuffer(raptor_stringbuffer* stringbuffer)

Destroy a stringbuffer.

STRINGBUFFER METHODS

int raptor_stringbuffer_append_counted_string(raptor_stringbuffer*
stringbuffer
, const unsigned char *string, size_t length, int do_copy)

Append a string of length bytes to a stringbuffer, copying it only if do_copy is non-0.

int raptor_stringbuffer_append_string(raptor_stringbuffer*
stringbuffer
, const unsigned char* string, int do_copy)

Append a string to a stringbuffer, copying it only if do_copy is non-0.

int raptor_stringbuffer_append_decimal(raptor_stringbuffer*
stringbuffer
, int integer)

Append a formatted decimal integer to a stringbuffer.

int raptor_stringbuffer_append_stringbuffer(raptor_stringbuffer*
stringbuffer
, raptor_stringbuffer* append)

Append a stringbuffer append to a stringbuffer. The append stringbuffer is emptied but not destroyed.

int raptor_stringbuffer_prepend_counted_string(raptor_stringbuffer*
stringbuffer
, const unsigned char* string, size_t length, int do_copy)

Prepend a string of length bytes to the start of a stringbuffer, copying it only if do_copy is non-0.

int raptor_stringbuffer_prepend_string(raptor_stringbuffer*
stringbuffer
, const unsigned char* string, int do_copy)

Prepend a string to the start of a stringbuffer, copying it only if do_copy is non-0.

unsigned char * raptor_stringbuffer_as_string(raptor_stringbuffer*
stringbuffer
)

Return the stringbuffer as a single string. The string is shared and should be copied if needed.

size_t raptor_stringbuffer_length(raptor_stringbuffer* stringbuffer)

Return the length of the stringbuffer.

int raptor_stringbuffer_copy_to_string(raptor_stringbuffer*
stringbuffer, unsigned char *
string, size_t length)

Copy the stringbuffer into a single string buffer string of size length. Returns non-0 on failure.

IOSTREAM CLASS

This class provides an I/O stream that can write to filenames, FILE*, strings and user-defined output via callbacks.

IOSTREAM CONSTRUCTOR

raptor_iostream* raptor_new_iostream_from_handler2(void* context, const
raptor_iostream_handler2 *
handler)

Create a new raptor read or write iostream from a user-defined raptor_iostream_handler2 handler that is called with the passed-in context for the write operations.

raptor_iostream* raptor_new_iostream_from_handler(void* context, const
raptor_iostream_handler *
handler)

DEPRECATED in 1.4.17 - use raptor_new_iostream_from_handler2() with the new handler format. Create a new raptor read iostream from a user-defined raptor_iostream_handler handler that is called with the passed-in context for the write operations.

raptor_iostream* raptor_new_iostream_to_sink(void)

Create a new raptor write iostream that discards all written output.

raptor_iostream* raptor_new_iostream_to_filename(const char *filename)

Create a new raptor write iostream that creates and writes to a new file filename.

raptor_iostream* raptor_new_iostream_to_file_handle(FILE *handle)

Create a new raptor write iostream that creates and writes to an existing, already opened, C Standard I/O handle FILE* handle.

raptor_iostream* raptor_new_iostream_to_string(void **string_p, size_t
*
length_p, void *(*malloc_handler)(size_t size))

Create a new raptor write iostream which creates a new string once raptor_free_iostream is called. The new string pointer is written in string, the length in length_p (if not NULL) and the memory allocation is made using the malloc_handler, or if NULL, raptor’s default memory allocator.

raptor_iostream* raptor_new_iostream_from_sink(void)

Create a new raptor read iostream that is immediately finished and returns end of file.

raptor_iostream* raptor_new_iostream_from_filename(const char
*
filename)

Create a new raptor read iostream from an existing file filename.

raptor_iostream* raptor_new_iostream_from_file_handle(FILE *handle)

Create a new raptor read iostream from an already opened, C Standard I/O handle FILE* handler.

raptor_iostream* raptor_new_iostream_from_string(void *string, size_t
length
)

Create a new raptor read iostream reading from an existing string of length bytes.

IOSTREAM DESTRUCTOR

void raptor_free_iostream(raptor_iostream *iostr)

Destroy a Raptor iostream object.

IOSTREAM METHODS

int raptor_iostream_write_bytes(raptor_iostream *iostr, const void
*
ptr, size_t size, size_t nmemb)

Write a counted set of elements to an iostream. Inmemb is the count of elements of size size, starting at memory ptr. Similar to fwrite(3) and write(2).

int raptor_iostream_write_byte(raptor_iostream *iostr, const int byte)

Write a single byte an iostream. Similar to fputc(3).

void raptor_iostream_write_end(raptor_iostream *iostr)

Finish writing to an iostream.

int raptor_iostream_write_string(raptor_iostream *iostr, const void
*
string)

Write a NUL-terminated string to an iostream. Similar to fputs(3).

int raptor_iostream_write_counted_string(raptor_iostream *iostr, const
void *
string, size_t len)

Write a string of length len to an iostream.

unsigned long raptor_iostream_tell(raptor_iostream *iostr)

Return the byte offset into the iostream.

size_t raptor_iostream_get_bytes_written_count(raptor_iostream *iostr)

DEPRECATED in 1.4.17 for raptor_iostream_tell(). Return the number of bytes written so far to the iostream.

int raptor_iostream_write_decimal(raptor_iostream *iostr, int integer)

Write a decimal formatted integer integer to the iostream.

int raptor_iostream_format_hexadecimal(raptor_iostream *iostr, unsigned
int
integer, int width)

Write a hexadecimal formatted unsigned integer to the iostream, left-padded with ’0’s to width columns.

int raptor_iostream_write_stringbuffer(raptor_iostream* iostr,
raptor_stringbuffer *
sb)

Write the stringbuffer to an iostream iostr.

int raptor_iostream_read_bytes(raptor_iostream* iostr, void *ptr,
size_t
size, size_t nmemb)

Read bytes from the iostream into buffer ptr up to nmemb elements of size size.

int raptor_iostream_read_eof(raptor_iostream *iostr)

Return non-0 if the iostream is finished.

XML SAX2 READER CLASS

This class provides the functionality to generate SAX2 events from parsing XML content, including XML namespace support.

XML SAX2 CONSTRUCTOR

raptor_sax2* raptor_new_sax2(void *user_data, raptor_error_handlers*
error_handlers
)

Create a new SAX2 XML reader with the given error handler object.

XML WRITER DESTRUCTOR

void raptor_free_sax2(raptor_sax2 *sax2)

Destroy a SAX2 XML reader object.

SAX2 SET HANDLER METHODS

void raptor_sax2_set_start_element_handler(raptor_sax2 *sax2,
raptor_sax2_start_element_handler
handler)

Set the SAX2 start element handler.

void raptor_sax2_set_end_element_handler(raptor_sax2 *sax2,
raptor_sax2_end_element_handler
handler)

Set the SAX2 end element handler.

void raptor_sax2_set_characters_handler(raptor_sax2 *sax2,
raptor_sax2_characters_handler
handler)

Set the SAX2 character data element handler.

void raptor_sax2_set_cdata_handler(raptor_sax2 *sax2,
raptor_sax2_cdata_handler
handler)

Set the SAX2 CDATA section element handler.

void raptor_sax2_set_comment_handler(raptor_sax2 *sax2,
raptor_sax2_comment_handler
handler)

Set the SAX2 XML comment handler.

void raptor_sax2_set_unparsed_entity_decl_handler(raptor_sax2 *sax2,
raptor_sax2_unparsed_entity_decl_handler
handler)

Set the SAX2 XML unparsed entity declaration handler.

void raptor_sax2_set_external_entity_ref_handler(raptor_sax2 *sax2,
raptor_sax2_external_entity_ref_handler
handler)

Set the SAX2 XML external entity reference handler.

void raptor_sax2_set_namespace_handler(raptor_sax2 *sax2,
raptor_namespace_handler
handler)

Set the SAX2 XML namespace declaration handler when an XML namespace is declared.

SAX2 PARSING METHODS

void raptor_sax2_parse_start(raptor_sax2 *sax2, raptor_uri *base_uri)

Start a SAX2 parse of XML content with the base URI uri.

int raptor_sax2_parse_chunk(raptor_sax2 *sax2, const unsigned char
*
buffer, size_t len, int is_end)

Parse the XML content in buffer of size len returning SAX2 events via handlers. If is_end is non-zero, it indicates the end of the parsing. This method can only be called after raptor_sax2_parse_start().

SAX2 SCOPE METHODS

const unsigned char* raptor_sax2_inscope_xml_language(raptor_sax2
*
sax2)

Get the current in-scope XML language (xml:lang) value.

raptor_uri* raptor_sax2_inscope_base_uri(raptor_sax2 *sax2)

Get the current in-scope Base URI (xml:base or document or protocol) value.

XML ELEMENT CLASS

This class provides an XML element that can be used with the XML Writer Class to generate XML documents.

XML ELEMENT CONSTRUCTORS

raptor_xml_element* raptor_new_xml_element(raptor_qname* name, const
unsigned char*
xml_language, raptor_uri* xml_base)

Create a new XML element with the element name name in the context of xml:lang xml_language and base URI xml_base.

raptor_xml_element*
raptor_new_xml_element_from_namespace_local_name(raptor_namespace *
ns,
const unsigned char *
name, const unsigned char* xml_language,
raptor_uri*
xml_base

Create a new XML element based on the given XML namespace and localname in the context of xml:lang xml_language and base URI xml_base.

XML ELEMENT DESTRUCTOR

void raptor_free_xml_element(raptor_xml_element *element)

Destroy a XML element object.

XML ELEMENT METHODS

raptor_qname* raptor_xml_element_get_name(raptor_xml_element*
xml_element
)

Get the XML element QName of XML element xml_element.

void raptor_xml_element_set_attributes(raptor_xml_element* xml_element,
raptor_qname **
attributes, int count)

Set the attributes on XML element xml_element to the array of QNames in array attributes of size count.

raptor_qname** raptor_xml_element_get_attributes(raptor_xml_element*
xml_element
)

Get the attributes of an XML element xml_element as an array of QNames. As set by void raptor_xml_element_set_attributes.

int raptor_xml_element_get_attributes_count(raptor_xml_element*
xml_element
)

Get the number of attributes of an XML element xml_element as set by void raptor_xml_element_set_attributes.

int raptor_xml_element_declare_namespace(raptor_xml_element*
xml_element
, raptor_namespace* nspace)

Declare an XML namespace nspace expliclitly on XML element xml_element. Namespaces used in the element or attribute names are automatically declared, this method allows additional ones to be done.

int raptor_xml_element_is_empty(raptor_xml_element* xml_element)

Return non-0 if the XML element is empty.

int raptor_iostream_write_xml_element(raptor_iostream* iostr,
raptor_xml_element *
element, raptor_namespace_stack* nstack, int
is_empty
, int is_end, raptor_simple_message_handler error_handler,
void*
error_data, int depth)

Write a XML element xml_element to iostream ostr. This is done in context of an XML namespace stack nstack and at depth depth in the stack (see Namespace class constructors).

The element may be an empty element if is_empty is non-zero or may be a close element if is_end is non-zero (else is a start element). The error_handler method along with error_data allow error reporting to be given.

const unsigned char*
raptor_xml_element_get_language(raptor_xml_element*
xml_element)

Get the xml:lang language of the XML element.

XML WRITER CLASS

This class provides the functionality to generate simple XML documents consisting of elements with attributes, character data and comments. The documents can be written to an iostream.

XML WRITER CONSTRUCTOR

raptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack*
nstack
, raptor_uri_handler* uri_handler, void* uri_context,
raptor_iostream*
iostr, raptor_simple_message_handler error_handler,
void *
error_data, int canonicalize)

Create a new XML Writer writing to iostream iostr. The error_handler method along with error_data allow error reporting to be given. nstack is either an existing namespace stack to be used or if NULL, a new one with only the XML namespace defined is created. Note that raptor_uri_get_handler can be useful to return the current raptor URI handler/context. canonicalize is currently unused and should be set to 1 but may allow non-canonical XML writing to be allowed in future.

XML WRITER DESTRUCTOR

void raptor_free_xml_writer(raptor_xml_writer* xml_writer)

Destroy a XML Writer object.

XML WRITER METHODS

void raptor_xml_writer_empty_element(raptor_xml_writer* xml_writer,
raptor_xml_element *
element)

Write XML element element as an empty element (no element content) to the XML Writer xml_writer.

void raptor_xml_writer_start_element(raptor_xml_writer* xml_writer,
raptor_xml_element *
element)

Write a start element along with an attributes and namespace declarations for XML element element to the XML Writer xml_writer.

void raptor_xml_writer_end_element(raptor_xml_writer* xml_writer,
raptor_xml_element *
element)

Write an end element form for XML element element to the XML Writer xml_writer.

void raptor_xml_writer_cdata(raptor_xml_writer* xml_writer, const
unsigned char *str)

Write XML character data in str to the XML Writer xml_writer. The characters in str will be XML escaped.

void raptor_xml_writer_cdata_counted(raptor_xml_writer* xml_writer,
const unsigned char*
str, unsigned int length)

Write XML character data in str of length length to the XML Writer xml_writer. The characters in str will be XML escaped.

void raptor_xml_writer_raw(raptor_xml_writer* xml_writer, const
unsigned char*
str)

Write character data in str length to the XML Writer xml_writer without XML escaping.

void raptor_xml_writer_raw_counted(raptor_xml_writer* xml_writer, const
unsigned char*
str, unsigned int length)

Write character data in str of length length to the XML Writer xml_writer without XML escaping.

void raptor_xml_writer_comment(raptor_xml_writer* xml_writer, const
unsigned char*
str)

Write an XML comment in str to the XML Writer xml_writer.

void raptor_xml_writer_comment_counted(raptor_xml_writer* xml_writer,
const unsigned char*
str, unsigned int length)

Write an XML comment in str of length length to the XML Writer xml_writer.

int raptor_xml_writer_features_enumerate(const raptor_feature feature,
const char **
name, raptor_uri **uri, const char **label)

Return the name, URI, string label (all optional) for an XML write feature, returning non-zero if no such feature exists.

Raptor features have URIs that are constructed from the URI http://feature.librdf.org/raptor- and the name so for example feature scanForRDF has URI http://feature.librdf.org/raptor-scanForRDF
int raptor_xml_writer_set_feature(raptor_xml_writer*
xml_writer,
raptor_feature
feature, int value)

Set an XML writer feature feature to a particular value. Returns non 0 on failure or if the feature is unknown. The current defined writer features are:
Feature Values

RAPTOR_FEATURE_WRITER_AUTO_INDENT
Boolean (non 0 true)
RAPTOR_FEATURE_WRITER_AUTO_EMPTY
Boolean (non 0 true)
RAPTOR_FEATURE_WRITER_INDENT_WIDTH
Integer
RAPTOR_FEATURE_WRITER_XML_DECLARATION
Boolean (non 0 true)

If the writer_auto_indent feature is set (default true), the XML writer will automatically indent the output.

If the writer_auto_empty feature is set (default true), the XML writer will automatically generate empty elements if a start/end element sequence has no content.

If the writer_indent_width feature is set (default 2) if the XML writer is outputing indented XML, it will use that many spaces.

If the writer_xml_declaration feature is set (default true) the XML declaration is written at the start of serialized XML.
int raptor_xml_writer_set_feature_string(raptor_xml_writer *xml_writer,
raptor_feature feature, const unsigned char *value)

Set an XML writer feature feature to a particular string value. Returns non 0 on failure or if the feature is unknown. The current defined XML writer features are given in raptor_xml_writer_set_feature and at present only take integer values. If an integer value feature is set with this function, value is interpreted as an integer and then that value is used.

int raptor_xml_writer_get_feature(raptor_xml_writer* xml_writer,
raptor_feature
feature)

Get XML writer feature integer values. The allowed feature values and types are given under raptor_xml_writer_features_enumerate.

const unsigned char
*raptor_xml_writer_get_feature_string(raptor_xml_writer*
xml_writer,
raptor_feature
feature)

Get XML writer feature string values. The allowed feature values and types are given under raptor_xml_writer_features_enumerate.

int raptor_xml_writer_get_depth(raptor_xml_writer* xml_writer)

Get the current XML writer element stack depth.

void raptor_xml_writer_flush(raptor_xml_writer* xml_writer)

Flush the XML writer output for any pending writes.

void raptor_xml_writer_newline(raptor_xml_writer* xml_writer)

Write a newline to the XML writer (which may trigger indenting before the next item).

WORLD CLASS

This class stores the library state and configuration. It will be the main class for initialsiing and configuring the library in Raptor 2.0.

WORLD CLASS CONSTRUCTOR

raptor_world* raptor_new_world(void)

Create a new raptor library object.

WORLD CLASS DESTRUCTOR

void raptor_free_world(raptor_world* world)

Destroy a raptor library object and free all resources.

WORLD CLASS METHODS

int raptor_world_open(raptor_world* world)

Start using a raptor library - allocate any dependent resources. This is optional.

void raptor_world_set_libxslt_security_preferences(raptor_world *world,
void *security_preferences)

See raptor_set_libxslt_security_preferences() description.

void raptor_world_set_libxml_flags(raptor_world *world, int flags)

See raptor_set_libxml_flags() description.

API CHANGES

1.4.21
No changes.

1.4.20
No changes.

1.4.19
Added raptor_world class to prepare for V2 API with constructor raptor_new_world(), destructor raptor_free_world() and methods raptor_world_open(), raptor_world_set_libxslt_security_preferences() and raptor_world_set_libxml_flags().

The raptor_identifier, raptor_error_handlers structs both gained a raptor_world* pointer field.

Added raptor_set_libxslt_security_preferences() and raptor_set_libxml_flags().

Added raptor_libxml_flags enum for flags for raptor_world_set_libxml_flags() and raptor_set_libxml_flags().

Added RAPTOR_FEATURE_PREFIX_ELEMENTS

1.4.18
Added atom serializer

Added rdfa parser

Added serializer features RAPTOR_FEATURE_RSS_TRIPLES and RAPTOR_FEATURE_ATOM_ENTRY_URI

Added raptor_qname_to_counted_name()

Added raptor_serialize_start_to_iostream()

Added raptor_sequence_delete_at()

Added raptor_xml_writer_newline()

Added raptor_xml_writer_flush()

Added raptor_xml_writer_get_depth()

1.4.17
Added SAX2 class raptor_sax2. Added new SAX2 API typedefs: raptor_sax2_start_element_handler, raptor_sax2_end_element_handler, raptor_sax2_characters_handler, raptor_sax2_cdata_handler, raptor_sax2_comment_handler, raptor_sax2_unparsed_entity_decl_handler and raptor_sax2_external_entity_ref_handler. Added new SAX2 API functions: raptor_new_sax2(), raptor_free_sax2(), raptor_sax2_set_start_element_handler(), raptor_sax2_set_end_element_handler(), raptor_sax2_set_characters_handler(), raptor_sax2_set_cdata_handler(), raptor_sax2_set_comment_handler(), raptor_sax2_set_unparsed_entity_decl_handler(), raptor_sax2_set_external_entity_ref_handler(), raptor_sax2_set_namespace_handler(), raptor_sax2_parse_start(), raptor_sax2_parse_chunk(), raptor_sax2_inscope_xml_language() and raptor_sax2_inscope_base_uri()

Added features RAPTOR_FEATURE_WRITE_BASE_URI, RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL, RAPTOR_FEATURE_WWW_HTTP_USER_AGENT, RAPTOR_FEATURE_JSON_CALLBACK and RAPTOR_FEATURE_JSON_EXTRA_DATA

Added raptor_handler_closure structure for error handlers.

Added raptor_statement_compare()

Added raptor_iostream_write_string_python() and deprecated raptor_iostream_write_string_turtle()

raptor_uri_set_handler(), raptor_uri_get_handler(), raptor_new_namespaces(), raptor_namespaces_init() and raptor_new_xml_writer() now take const handler pointers.

Added raptor_www_set_http_cache_control()

Added QName class methods: raptor_qname_get_local_name(), raptor_qname_get_value() and raptor_qname_get_counted_value()

Added raptor_iostream read handler typedefs raptor_iostream_read_bytes_func, raptor_iostream_read_eof_func and added new structure raptor_iostream_handler2 replacing deprecated raptor_iostream_handler.

Added raptor_new_iostream_from_handler2() replacing deprecated raptor_new_iostream_from_handler()

Added raptor_new_iostream_from_sink(), raptor_new_iostream_from_filename(), raptor_new_iostream_from_file_handle() and raptor_new_iostream_from_string().

Added raptor_iostream_tell deprecating raptor_iostream_get_bytes_written_count().

Added raptor_iostream_read_bytes() and raptor_iostream_read_eof().

Added raptor_xml_element_get_language().

Added new enum raptor_log_level.

Added new typedef raptor_error_handlers. and new function raptor_error_handlers_init().

1.4.16
raptor_namespaces_init()
now returns an integer status

Added raptor_new_xml_element_from_namespace_local_name()

Added raptor_uri_compare().

Added new features for the ’grddl’ parser: RAPTOR_FEATURE_HTML_TAG_SOUP, RAPTOR_FEATURE_MICROFORMATS and RAPTOR_FEATURE_HTML_LINK.

Added parser feature RAPTOR_FEATURE_WWW_TIMEOUT

Added raptor_graph_handler typedef and raptor_set_graph_handler()

Added raptor_www_final_uri_handler typedef and raptor_www_set_final_uri_handler()

Added raptor_www_set_connection_timeout()

Added raptor_www_get_final_uri()

1.4.15
No changes.

1.4.14
Add two new exported strings raptor_license_string and raptor_home_url_string.

Added new features for the ’dot’ serializer: RAPTOR_FEATURE_RESOURCE_BORDER, RAPTOR_FEATURE_LITERAL_BORDER, RAPTOR_FEATURE_BNODE_BORDER, RAPTOR_FEATURE_RESOURCE_FILL, RAPTOR_FEATURE_LITERAL_FILL and RAPTOR_FEATURE_BNODE_FILL

Added raptor_parser_generate_id()

Added raptor_iostream_write_string_turtle()

1.4.13
No API changes.

1.4.12
No API changes.

1.4.11
Added raptor_get_feature_count()

Added raptor_get_need_base_uri()

Added parser feature RAPTOR_FEATURE_NO_NET

Added raptor_www_set_uri_filter(), raptor_parser_set_uri_filter() with filter type raptor_uri_filter_func

1.4.10
No API changes.

1.4.9
Added raptor_parser_get_accept_header()

Added raptor_xml_element_is_empty()

Added raptor_qname_get_namespace()

Added raptor_iostream_write_uri()

Added raptor_namespaces_qname_from_uri().

Added raptor_namespace_get_counted_prefix()

Added raptor_serialize_set_namespace_from_namespace()

Deprecated raptor_uri_is_file_uri() for new raptor_uri_string_is_file_uri().

Added raptor_xml_element_get_attributes() and raptor_xml_element_get_attributes_count()

1.4.8
Added raptor_set_namespace_handler().

Added XML 1.1 serializing support, feature RAPTOR_FEATURE_WRITER_XML_VERSION with shortname xmlVersion for serializer and xml writer classes to support it. Added XML writer feature RAPTOR_FEATURE_WRITER_XML_DECLARATION to control generation of the XML declaration. Added new functions raptor_xml_any_escape_string() and raptor_iostream_write_xml_any_escaped_string() to allow generating XML 1.1 or XML 1.0.

RAPTOR_IDENTIFIER_TYPE_PREDICATE will no longer be generated from version 1.4.9 onwards as the type of returned statement predicates. RAPTOR_IDENTIFIER_TYPE_RESOURCE will be returned.

RAPTOR_IDENTIFIER_TYPE_ORDINAL may no longer be generated from version 1.4.9 onwards, RAPTOR_IDENTIFIER_TYPE_RESOURCE may replace it.

1.4.7
No changes.

1.4.6
No changes.

1.4.5
Deprecated raptor_ntriples_string_as_utf8_string() (never documented above) since it can only work with a raptor_parser object which makes it rather unusable alone.

Added XML writer features and support functions raptor_xml_writer_features_enumerate(), raptor_xml_writer_set_feature(), raptor_xml_writer_set_feature_string(), raptor_xml_writer_get_feature() and raptor_xml_writer_get_feature_string()

1.4.3
Added XML Writer class (raptor_xml_writer) and XML Element class (raptor_xml_element)

Added raptor_parser_get_feature_string(), raptor_parser_set_feature_string(), raptor_serializer_set_feature_string(), raptor_serializer_get_feature_string() and raptor_feature_value_type().

Added raptor_serializer_set_namespace, raptor_serializer_set_feature() and raptor_serializer_get_feature().

Added raptor_new_namespace_from_uri(), raptor_new_namespace_parts_from_string(), Added raptor_namespaces_find_namespace_by_uri(). and raptor_iostream_write_namespace() to write a namespace declaration to an iostream.

Added copy constructor raptor_qname_copy() and raptor_iostream_write_qname() to write a qname to an iostream.

Added raptor_sequence_join() to join two sequences, leaving one empty.

Added raptor_iostream_write_stringbuffer() to write a stringbuffer to an iostream.

Added N-Triples raptor_iostream_write_string_ntriples() and raptor_iostream_write_statement_ntriples() utility functions for writing to raptor_iostreams.

Added raptor_uri_to_relative_counted_uri_string(), raptor_uri_to_relative_uri_string(). raptor_uri_print(), raptor_uri_to_counted_string() and raptor_uri_to_string()

Added unicode name checking utility functions for XML 1.0 and XML 1.1 name starting character and continued name character. raptor_unicode_is_xml10_namestartchar raptor_unicode_is_xml10_namechar, raptor_unicode_is_xml11_namechar and raptor_unicode_is_xml11_namestartchar.

Added raptor_xml_name_check to check if a name is a legal XML 1.0 or 1.0 name. and raptor_iostream_write_xml_escaped_string to write an XML-escaped string to an iostream.

Added UTF8-checking utility function raptor_utf8_check.

1.4.2
No changes.

1.4.1
The raptor_xml_escape_string now returns <0 on failure rather than 0, so that if an empty string is escaped, 0 bytes required is returned.

1.4.0
Added new raptor_serializer class supporting RDF/XML (name rdfxml) and N-Triples (name ntriples).
Added new raptor_iostream class
Added raptor_stringbuffer_copy_to_string to allow efficient copy-out of a constructed string.
Added raptor_www_fetch_to_string to allow retrieving of web content as a single string.

1.3.3
Added raptor_calloc_memory to provide a calloc inside raptor.
Added feature check_rdf_id (see raptor_set_feature documentation).

1.3.2
Added raptor_alloc_memory to allocate memory inside raptor.

Added accessor functions for the public raptor_locator structure:

raptor_locator_line
raptor_locator_column
raptor_locator_byte
raptor_locator_file
raptor_locator_uri

1.3.1
Correct raptor_print_statement declaration argument statement to have one less ’const’, to match the code.

1.3.0
Added the following parser methods, utility methods and helper functions:

raptor_new_parser_for_content (Parser class constructor)
raptor_get_mime_type
raptor_get_feature
raptor_syntax_name_check
raptor_guess_parser_name
raptor_features_enumerate
raptor_feature_from_uri
raptor_www_set_http_accept (WWW class)

Changed raptor_set_feature to now return an int success or failure.

Added the following functions:
raptor_free_memory
raptor_unicode_char_to_utf8
raptor_utf8_to_unicode_char
raptor_vsnprintf

Added the raptor_sequence class, its constructor, destructor, methods and helper functions.

Added the raptor_stringbuffer class and constructor, destructor and methods.

Deprecated raptor_print_statement_detailed always intended to be internal.

1.2.0
Added raptor_syntaxes_enumerate to get full information on syntax mime type and URIs as well as name and label.

N-Triples Plus parser renamed to Turtle (name turtle)

1.1.0
Added N-Triples Plus parser (name ntriples-plus)

Made URI class constructors, methods and factory methods as well as some other utility functions using or returning URIs or literals take unsigned char* rather than char*. The affected calls are:

URI factory methods changed to all take/return unsigned char* for URI strings:
raptor_new_uri_func
raptor_new_uri_from_local_name_func
raptor_new_uri_relative_to_base_func
raptor_uri_as_string_func
raptor_uri_as_counted_string_func

Constructors and methods changed to take/return unsigned char* for URI strings:
raptor_statement_part_as_counted_string
raptor_statement_part_as_string
raptor_new_uri
raptor_new_uri_from_uri_local_name
raptor_new_uri_relative_to_base
raptor_uri_as_string
raptor_uri_as_counted_string
raptor_print_ntriples_string

Changed to use unsigned char* for URI strings, char* for filenames:
raptor_uri_resolve_uri_reference
raptor_uri_filename_to_uri_string
raptor_uri_uri_string_to_filename
raptor_uri_uri_string_to_filename_fragment
raptor_uri_is_file_uri

Changed to return unsigned char* for UTF8 string:
raptor_ntriples_string_as_utf8_string

Added raptor_parsers_enumerate to discover supported parsers.

Added raptor_uri_uri_string_to_filename_fragment with fragment arg to return the URI fragment.

Made the raptor_namespace, raptor_namespace_stack and raptor_qname class and APIs public.

Added feature non_nfc_fatal (see raptor_set_feature documentation).

1.0.0
Removed the following deprecated methods and functions (see 0.9.6 changes for the new names):
raptor_free
, raptor_new, raptor_ntriples_free, raptor_ntriples_new, raptor_ntriples_parse_file, raptor_ntriples_set_error_handler, raptor_ntriples_set_fatal_error_handler, raptor_ntriples_set_statement_handler and raptor_parser_abort.

Added raptor_parse_file_stream for reading FILE* streams without necessarily having a file.

0.9.12
Added raptor_new_uri_for_retrieval to turn URI references into URIs suitable for retrieval (no fragments).

0.9.11
Added raptor_get_name and raptor_get_label.

raptor_xml_escape_string now takes error message handler, data pointer, loses parser argument.

Added raptor_set_default_generate_id_parameters and raptor_set_generate_id_handler to control the default generation of IDs, allow full customisation.

0.9.10
Added raptor_set_parser_strict and raptor_www_no_www_library_init_finish.

raptor_xml_escape_string now takes an output string length pointer.

Added raptor_statement_part_as_counted_string, raptor_statement_part_as_string and raptor_parse_abort.

Deprecated raptor_parser_abort.

0.9.9
Added raptor_www class and all its constructors, destructor, methods, calls.

Added raptor_parse_uri, raptor_parser_abort, raptor_ntriples_term_as_string and raptor_xml_escape_string.

0.9.7
raptor_parse_chunk, raptor_new_uri_from_id, arguments are now unsigned char.

Added raptor_new_uri_for_xmlbase.

0.9.6
In this version, the raptor/ntriples parser calling APIs were modified. The following table lists the changes:

OLD API

NEW API (0.9.6+)

raptor_new()

raptor_new_parser("rdfxml")

ntriples_new()

raptor_new_parser("ntriples")

raptor_free

raptor_free_parser

ntriples_free

raptor_ntriples_parser

raptor_ntriples_parse_file

raptor_parse_file

raptor_ntriples_set_error_handler

raptor_set_error_handler

raptor_ntriples_set_fatal_error_handler

raptor_set_fatal_error_handler

raptor_ntriples_set_statement_handler

raptor_set_statement_handler

CONFORMING TO

RDF/XML Syntax (Revised), Dave Beckett (ed.) W3C Recommendation, http://www.w3.org/TR/rdf-syntax-grammar/

N-Triples, in RDF Test Cases, Jan Grant and Dave Beckett (eds.) W3C Recommendation, http://www.w3.org/TR/rdf-testcases/#ntriples

Turtle - Terse RDF Triple Language, Dave Beckett, http://www.dajobe.org/2004/01/turtle/

RSS 0.91 spec revision 3, Dan Libby, Netscape, http://my.netscape.com/publish/formats/rss-spec-0.91.html

RDF Site Summary (RSS) 1.0, http://purl.org/rss/1.0/spec

Atom 1.0 syndication format, RFC 4287, http://www.ietf.org/rfc/rfc4287.txt

Gleaning Resource Descriptions from Dialects of Languages (GRDDL), Dan Connolly (ed.), W3C Recommendation, 2007-09-11, http://www.w3.org/TR/2007/REC-grddl-20070911/

RDFa in XHTML: Syntax and Processing, Ben Adida, Mark Birbeck, Shane McCarron, Steven Pemberton (eds.)
W3C Recommendation, 2008-10-14, http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/

SEE ALSO

rapper(1),raptor-config(1)

AUTHOR

Dave Beckett - http://www.dajobe.org/


Copyright 2002-2010 Dave Beckett
2002-2010 University of Bristol

raptor-1.4.21/LICENSE-2.0.txt0000644000175000017500000002613610360131567012161 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. raptor-1.4.21/raptor.rdf.in0000644000175000017500000000702711330672502012445 00000000000000 Raptor Raptor RDF Parser Toolkit Library. is a free software / Open Source C library that provides a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into a syntax. The supported parsing syntaxes are RDF/XML, N-Triples, TRiG, Turtle, RSS tag soup including all versions of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and XML. The serializing syntaxes are RDF/XML (regular, and abbreviated), N-Triples, RSS 1.0, Atom 1.0, XMP, Turtle, GraphViz DOT and JSON. Dave Beckett 970987f991961f2553a1bf2574166fa29befbccb stable 2005-02-01 @VERSION@ Dave Beckett 970987f991961f2553a1bf2574166fa29befbccb raptor-1.4.21/build/0000755000175000017500000000000011331056234011204 500000000000000raptor-1.4.21/build/compile0000755000175000017500000000727111330704763012517 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use `[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor-1.4.21/build/depcomp0000755000175000017500000004426711330704764012525 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor-1.4.21/build/gtk-doc.m40000644000175000017500000000417511330704757012736 00000000000000dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl check for tools we added during development AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) if test x$enable_gtk_doc = xyes; then ifelse([$1],[], [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], [build documentation in html format [[default=yes]]]),, [enable_gtk_doc_html=yes]) AC_ARG_ENABLE([gtk-doc-pdf], AS_HELP_STRING([--enable-gtk-doc-pdf], [build documentation in pdf format [[default=no]]]),, [enable_gtk_doc_pdf=no]) if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) ]) raptor-1.4.21/build/ltmain.sh0000755000175000017500000073337711330704756013003 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6b Debian-2.2.6b-2" TIMESTAMP="" package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 raptor-1.4.21/build/libtool.m40000644000175000017500000077464711330704756013073 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) raptor-1.4.21/build/config.guess0000755000175000017500000013105411330704763013456 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: raptor-1.4.21/build/install-sh0000755000175000017500000003253711330704763013150 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor-1.4.21/build/config.sub0000755000175000017500000010242511330704763013121 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: raptor-1.4.21/build/missing0000755000175000017500000002623311330704763012537 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor-1.4.21/build/ltversion.m40000644000175000017500000000127711330704757013433 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) raptor-1.4.21/build/lt~obsolete.m40000644000175000017500000001311311330704757013750 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) raptor-1.4.21/build/ltoptions.m40000644000175000017500000002724211330704756013440 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) raptor-1.4.21/build/ltsugar.m40000644000175000017500000001042411330704756013060 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) raptor-1.4.21/aclocal.m40000644000175000017500000012653511330704762011706 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, [m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # (`yes' being less verbose, `no' or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [ --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0')]) case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([build/gtk-doc.m4]) m4_include([build/libtool.m4]) m4_include([build/ltoptions.m4]) m4_include([build/ltsugar.m4]) m4_include([build/ltversion.m4]) m4_include([build/lt~obsolete.m4]) raptor-1.4.21/NOTICE0000644000175000017500000000026410360131567010737 00000000000000This product includes Redland software (http://librdf.org/) developed at the Institute for Learning and Research Technology, University of Bristol, UK (http://www.bristol.ac.uk/). raptor-1.4.21/NEWS.html0000644000175000017500000007444711330744113011506 00000000000000 Raptor RDF Parser Library - News

Raptor RDF Parser Library - News

2010-01-30 Raptor Version 1.4.21 Released

This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break is underway.
RDFa parser buffer management problems were fixed
Turtle parser and serializer now use QNames correctly against specification
RDF/XML parser now resets correctly to detect duplicate rdf:IDs
Made a few other minor bug and build fixes
Fixed reported issues: 0000318, 0000319, 0000326, 0000331, 0000332 and 0000337

See the Raptor 1.4.21 Release Notes for the full details of the changes.

2009-11-28 Raptor Version 1.4.20 Released

Turtle serializing performance improvement by Chris Cannam
librdfa RDFa parser updates to fix empty datatype, xml:lang and 1-char prefixes by Manu Sporny
Fix a crash when the GRDDL parser reported errors
Enable large file support for 32-bit systems
Several resilience improvements by Lauri Aalto
Other minor portability and bug fixes
Fixed reported issues: 0000306 0000307 0000310 and 0000312.

See the Raptor 1.4.20 Release Notes for the full details of the changes.

2009-07-19 Raptor Version 1.4.19 Released

Many improvements to RSS tag soup (RSSes and Atom) parser and the RSS 1.0 and Atom serializers
Several fixes and improvements to the N-Triples, RDFa and RDF/XML parsers and Turtle serializer
Improved the use and configuration of static libxml functions for better compatibility
Several Win32 portability fixes - Lou Sakey
Many internal changes for upcoming Raptor V2 - primarily by Lauri Aalto
Many other fixes and resilience improvements.
Fixed reported issues: 0000259, 0000262, 0000263, 0000266, 0000269, 0000270, 0000276, 0000277, 0000287, 0000288, 0000289, 0000290, 0000293, 0000296, 0000299 and 0000303.

WARNING: FUTURE ABI and API CHANGES. The next release of raptor 1.4.x will include bug fixes only and no new features. New development will move to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering.

See the Raptor 1.4.19 Release Notes for the full details of the changes.

2008-06-25 Raptor Version 1.4.18 Released

Added an RDFa parser using an embedded version of librdfa by Manu Sporny of Digital Bazaar.
Added an Atom 1.0 (RFC 4287) serializer with several output parameters.
Improved RSS 1.0 serializer functionality and resilience.
Added new API methods for qname, serializer, sequence and XML writer classes.
Many other fixes and resilience improvements.
Fixed reported issues: 0000186 and 0000255.

See the Raptor 1.4.18 Release Notes for the full details of the changes.

2008-03-30 Raptor Version 1.4.17 Released

Added two new JSON serializers: resource-centric 'json' (Talis RDF/JSON) and triple-centric 'json-triples'
Added a new public XML SAX2 API class
Added a new error handling structure
Made the I/O Stream class support reading
Added several new API methods.
Made several fixes, portability and resilience improvements.
Fixed reported issues: 0000252 and 0000245.

See the Raptor 1.4.17 Release Notes for the full details of the changes.

2007-10-01 Raptor Version 1.4.16 Released

100% support for the GRDDL W3C Recommendation of 2007-09-11
Turtle parser and serializer were updated to support @base from Turtle 2007-09-11.
Turtle and RDF/XML serializers had performance improvements for large graphs.
Added a TRiG Parser based on Turtle with named graph support.
Several other API changes, fixed and improvements were made.
Fixed reported issues: 0000188, 0000192, 0000194, 0000195, 0000207, 0000210, 0000214, 0000216, 0000217, 0000232, 0000237, 0000238 and 0000239
Many other fixes and improvements.

See the Raptor 1.4.16 Release Notes for the full details of the changes.

2007-03-26 Raptor Version 1.4.15 Released

GRDDL parser substantially updated to support the GRDDL W3C Working Draft 2 March 2007
Errors for XML parsing and URI 404s are reported much better
Fixed reported issues: #0000174, #0000177, #0000178, #0000180
Many other minor fixes and improvements.

See the Raptor 1.4.15 Release Notes for the full details of the changes.

2007-01-31 Raptor Version 1.4.14 Released

New Turtle serializer by Dave Robillard based on the existing RDF/XML-Abbrev serializer.
New GraphViz DOT format serializer by Evan Nemerson.
GRDDL parser now does namespace and profile URI recursion and has other improvements and fixes.
Fixed reported issues: #0000032, #0000141, #0000143, #0000148, #0000155 and #0000157
Many other fixes and improvements.

See the Raptor 1.4.14 Release Notes for the full details of the changes.

2006-10-22 Raptor Version 1.4.13 Released

Fixed a memory leak in reusing the XML writer
Fixed reported issues: #0000134
Minor updates and fixes to tutorial, configuration and build

See the Raptor 1.4.13 Release Notes for the full details of the changes.

2006-08-27 Raptor Version 1.4.12 Released

Restore serializer enumeration ordering back to that of 1.4.10 which was causing Redland problems when writing type 'application/rdf+xml'.

See the Raptor 1.4.12 Release Notes for the gory details.

2006-08-26 Raptor Version 1.4.11 Released

Added network request filtering for parsers
Improved the GRDDL parser to read Embedded RDF and HCalendar
The Guess parser can now be reused to do multiple guesses
The RSS 1.0 Serializer now works again
Fixed reported issues: #0000014, #0000041, #0000089, #0000091 , #0000110 and #0000112
Made several other changes, fixes and improvements.

See the Raptor 1.4.11 Release Notes for the full details of the changes.

2006-07-14 Raptor Version 1.4.10 Released

Fixed a crash with RSS Tag Soup parser generating triples too late
Fixed a crash with the RDF/XML parser and serializer if a comment was seen outside an element
Parsers no longer generate any triple parts of type RAPTOR_IDENTIFIER_TYPE_ORDINAL

See the Raptor 1.4.10 Release Notes for the full details of the changes.

2006-04-22 Raptor Version 1.4.9 Released

Raptor Tutorial added covering parsing and serializing with examples
Raptor Reference Manual now covers 100% of the public API
rapper can now pretty-print RDF using namespaces as hints
Turtle parser gains boolean literals
Requests for content now send appropriate Accept: headers
No longer require libxml for rss-tag-soup parser
Various Win32 fixes and VC build files updates (John Barstow)
Many other bug fixes and changes were made.

NOTE: Generation of RAPTOR_IDENTIFIER_TYPE_PREDICATE was removed as deprecated in 1.4.8.

See the Raptor 1.4.9 Release Notes for the full details of the changes.

2006-01-03 Raptor Version 1.4.8 Released

RSS Tag Soup parser now reads Atom 1.0 and rewrites old Atom 0.3 terms
Added a guess parser that picks the parser to use based on protocol information such as HTTP Content-Type
Created an enhanced API reference manual with gtk-doc
Serializers to build can now be selected at configure time
Parsers can now return the namespace prefix/URIs seen in parsing
Turtle parser update to version 2006-01-02 (announcement)
Fix for URI resolution bugs (win32 fix by John Barstow)
Several parser bug fixes for RDF/XML, RSS and GRDDL
RDF/XML serializers and XML writer can write XML 1.0 or XML 1.1
Added an alpha Atom 1.0 serializer
Added an Adobe XMP (RDF/XML profile) serializer
Internal source reorganisation
Many other changes, fixes and improvements.

NOTE: Raptor will be switching to use Subversion for version control after the 1.4.8 release. See the Redland Subversion site or the online Raptor installation notes for the latest information.

See the Raptor 1.4.8 Release Notes for the full details of the changes.

2005-06-08 Raptor Version 1.4.7 Released

Fix crashes in the RSS tag soup parser / serializer (Suzan Foster)
Fix a crash in the RDF/XML serializers with bad URI predicates.

See the Raptor 1.4.7 Release Notes for the full details of the changes.

2005-05-19 Raptor Version 1.4.6 Released

Added a Gleaning Resource Descriptions from Dialects of Languages (GRDDL) parser for reading XHTML and XML as RDF triples
Updated RSS enclosures support in RSS tag soup parser and RSS 1.0 serializer (Suzan Foster)
Fixed several crashes with RSS tag soup parser, RDF/XML-abbrev serializer.
The turtle parser now accepts """long literals"""

See the Raptor 1.4.6 Release Notes for the full details of the changes.

2005-02-06 Raptor Version 1.4.5 Released

Added an RDF/XML with abbreviations serializer (Steve Shepard)
Handle RSS 1.1 in RSS tag soup parser
More fixes for broken OSX libxml2

See the Raptor 1.4.5 Release Notes for the full details of the changes.

2005-01-15 Raptor Version 1.4.4 Released

Fixed crashes in RSS tag soup parser and RSS 1.0 serializer
Handle RSS 0.9 namespace in RSS tag soup parser
Portability fixes for Win32 (Dave Viner)

See the Raptor 1.4.4 Release Notes for the full details of the changes.

2005-01-03 Raptor Version 1.4.3 Released

New XML Writer API
Improved RDF/XML serializer allowing user namespace declarations and writing relative URIs where possible
New RSS 1.0 serializer
Updated RSS tag soup parser
URI class can write relative URIs (Patch from René Puls)
Many other API changes

See the Raptor 1.4.3 Release Notes for the full details of the changes.

2004-11-01 Raptor Version 1.4.2 Released

Fix raptor_xml_escape_string error return.

See the Raptor 1.4.2 Release Notes for the full details of the changes.

2004-10-29 Raptor Version 1.4.1 Released

Fixed crashes in URI decoding and RSS enclosures.

See the Raptor 1.4.1 Release Notes for the full details of the changes.

2004-10-24 Raptor Version 1.4.0 Released

Added a serializing class for writing RDF triples as a syntax
Added serializers for RDF/XML and N-Triples
Added an I/O stream class for aiding writing
Added RSS enclosure support to RSS Tag Soup parser (Suzan Foster)

See the Raptor 1.4.0 Release Notes for the full details of the changes.

2004-09-20 Raptor Version 1.3.3 Released

License changed to LGPL 2.1/Apache 2
Added a new Unicode NFC checker
Rewritten URI parsing and resolving code
Added configure selection of RDF parsers
Updated the RSS Tag Soup parser to handle Atom 0.3
Updated the Turtle parser to handle large documents (Geoff Chappell)
Added a parser feature to disable rdf:ID duplicate checking
Updated rdf:ID duplicate value checking implementation
Portability fixes for building on win32 (Chris Pointon)

See the Raptor 1.3.3 Release Notes for the full details of the changes.

2004-07-21 Raptor Version 1.3.2 Released

Added support for compiling against expat source trees (Mark Smith)
Added raptor_alloc_memory to allocate memory in raptor, typically needed by handler routines on win32.
Make errors in fetching WWW content pass to the main error handler.
Added accessor functions for parts of the raptor_locator structure (Edd Dumbill)
Disabled the broken Unicode NFC checking via GNOME glib for this release.

See the Raptor 1.3.2 Release Notes for the full details of the changes.

2004-06-12 Raptor Version 1.3.1 Released

Correct raptor_print_statement declaration argument statement to have one less 'const', to match the code.
raptor.h now includes stdarg.h
Portability fixes for win32
Updates to Turtle parser to only allow language with non-datatyped literals; allow a '_' immediately after a ':' in qnames and make bare ':' work.
Added a warning for unknown rdf:parseType values, when parsing in lax mode. This is controlled by a new parser feature warn_other_parsetypes
The Turtle parser was fixed to re-initialise correctly when performing multiple parsings
Fixes to the file: URI support for %-escaping and for Win32 filenames

See the Raptor 1.3.1 Release Notes for the full details of the changes.

2004-05-11 Raptor Version 1.3.0 Released

Updated Turtle parser to fix the collections syntax, add integer literals and allow - in names.
Added support for guessing a parser from content or identifiers
Completed parser feature support
Added sending HTTP Accept: headers for WWW retrieval when possible
Added new utility sequence and stringbuffer classes
Several other functions added and improvements made.

See the Raptor 1.3.0 Release Notes for the full details of the changes.

2004-01-24 Raptor Version 1.2.0 Released

Added a Turtle parser (was N-Triples Plus) now with collections.
Added raptor_syntaxes_enumerate to get syntax name, label, mime_type or uri_string of all known parsers.
Added WWW access via BSD libfetch if available.
Updated the GNOME GUI grapper program to report errors and warnings

2003-12-31 Raptor Version 1.1.0 Released

Added an N-Triples Plus parser
Updated for RDF/XML Revised Working Draft (10 October 2003) allowing rdf:RDF to be optional by default. No further changes were needed for RDF/XML Revised Proposed Recommendation (15 December 2003)
Made URI class constructors, methods and factory methods as well as some other utility functions using or returning URIs or literals take unsigned char* rather than char*.
Added the XML namespace, XML namespace stack and XML qname classes to the public API.
Added a function to discover supported parsers.
Fixes for line number counting in N-Triples
Added support for libxml2 SAX2 API for 2.6.0 and later.
The N-Triples parser now uses the generate ID code.
Added configure options for XML 1.1 names and disabling NFC check code.

2003-09-08 Raptor Version 1.0.0 Released

Several long-deprecated functions were removed and consequently the library shared version number was increased to 1
Fixed scanning for rdf:RDF so that RDF/XML in other XML works, such as in SVG
raptor-config --libs now works, added --libtool-libs and --version-decimal
Check N-Triples legal Unicode character range #x0-#x10FFFF
Normalize RDF/XML xml:lang and N-Triples language to lowercase on input
Worked around libxml2 bug causing a crash on some error reporting
Added raptor_parse_file_stream for parsing a C FILE*
Tidied rapper utility argument handling, added --version

2003-08-25 Raptor Version 0.9.12 Released

Fix some XML memory leaks in Exclusive XML Canonicalization.
Stop parsing RSS tag soup after a user abort
Improved N-Triples syntax checking.
Crash fixes for 64 bit Alpha/Sparc Linux/Solaris (varargs, size_t)
Fixed some other minor memory leaks with rdf:datatype and rdf:ID attributes.

2003-07-29 Raptor Version 0.9.11 Released

Completely handles the revised RDF/XML syntax (including post W3C Last Call changes)
Added Unicode Normal Form C (NFC) checking for literals (requires GNOME glib 2.0 at present)
Added Exclusive XML Canonicalization for XML Literals
Added many more checks for bad syntax (mostly illegal property attributes)
Updated parseType="Collection" triples after RDF Core WG change
Added an experimental RSS Tag Soup parser to read any pile of XML that has elements such as channel, image, item tags with title, description etc inside them into coherent RSS 1.0 RDF triples. (Requires libxml 2.5.0 or newer)
API: Added new methods raptor_get_name, raptor_get_label.
API: Added new methods raptor_set_default_generate_id_parameters and raptor_set_generate_id_handler to control generation of IDs.
API: Modified utility function raptor_xml_escape_string arguments.
Ripped out ISO 3166 country code parts since commercial use might be subject to a license fee.
Improvements to GTK example 'grapper'.
Several internal reorganisations for pulling out a SAX2 API, XML C14N.
Other minor bug fixes.

2003-04-17 Raptor Version 0.9.10 Released

Added parser lax / strict modes. lax is the default.
rdf:bagID now generates a warning in lax mode, an error in strict
Added raptor_www_no_www_library_init_finish to allow disabling of WWW library startup/shutdown.
Added raptor_parse_abort to abort parsing inside a callback.
Added a GTK GUI example program grapper
Other minor bug fixes.

2003-03-28 Raptor Version 0.9.9 Released

Performance improvements - uses less memory, less repeated small malloc/free sequences, faster for larger files.
Added WWW retrieval - can parse from an URI as well as files, given either libcurl or libxml2 is available.
Minor bug fixes.
Various Win32 configure, building patches
Sources updated to use autoconf 1.6+, automake 2.52+
More debian packaging updates.

2003-02-13 Raptor Version 0.9.8 Released

Minor bug fixes (synchronising with Redland 0.9.12 release).
Fixed crashing on empty files
Fixed accepting illegal xmlns:prefix="" (prefix without URI not allowed)
N-Triples bnodeIDs can now have '0's
Utility program rdfdump renamed to rapper; name conflicted with a common Linux utility.

2002-12-20 Raptor Version 0.9.7 Released

Passes about 90% of RDF Core WG Test Cases
All memory leaks fixed
Portability fixes - compilers, scripts, auto* tools, libxml2 version
rdf:ID syntax and duplicates checked
rdf:bagID supported
Added more conformance tests, errors and warnings.

2002-11-02 Raptor Version 0.9.6 Released

Calling API changed to provide a common interface to the RDF parsers. The libraptor.3 manual page describes the changes.
Added support for RDF datatyped literals in RDF/XML with rdf:datatype attribute on property elements and N-Triples with the "string"^^<datatypeURIref>.
Added support for rdf:parseType="Collection" for RDF Collections
URI class allows swappable implementation by applications.
URI class now handles file: URIs for Win32 and Unix conventions.
Fixes to enable it to work on Apple OSX 10.1, 10.2 (also tested working on Linux/x86, Solaris/sparc, FreeBSD/x86)
Many internal changes to support API changes, allow it to work with Redland when compiled as a separate library
Reorganised source into separate modules - URI, xml parser, ntriples parser, XML namespaces, XML qnames, locator.
More resilience with XML errors and XML parser errors - none of libxml2's XML test suite examples crash raptor.
N-Triples parser recovers gracefully from errors in content
Packing for debian included
Added manual pages libraptor.3 and rapper.1
Added raptor-config script for compiling with the library.

2002-06-08 Raptor Version 0.9.5 Released

Many bugs fixed
Added full relative URI resolving
Work around bugs in libxml and expat (older versions)
Support libxml with the use of entities in the document
Support xml:lang passing to application

2002-03-27 Raptor Version 0.9.4 Released

XML Base support (xml:base) added
xml:lang support added with N-Triples lang-string support
All N-Triples string escapes implemented
N-Triples support with XML literals - xml("<foo/>") and plain "foo"
removed all special code for containers; treated as regular typedNodes
rdf:parseType="Literal" now working
Builds as shared and static libraries
Conformance test suite added

2001-08-21 Raptor Version 0.9.3 Released

N-Triples parser added
rdf:parseType="Literal" works much better (Aaron Michal and me)
DAML collections support added (Aaron Michal)
Win32 patch added - I can't confirm my merge didn't break this (Aaron Michal)
N-Triples updated to support CR, LF and CR LF endings
Make parser generated ids appear distinguised from regular URIs
Added N-Triples output
Made rdf:type, rdf:value as property attributes work
Made empty typed nodes work
GNOME xml / libxml error location (line, column) values corrected.

2001-07-03 Raptor Version 0.9.2 Released

Now called Raptor

2001-06-06 Raptor Version 0.9.1 Released

Many bug fixes
Updates for Redland API changes
Fixed rdf:parsetype="Literal" buffer overrun
Added better XML parser auto-detection for various expats and libxml

2001-01-22 Raptor Version 0.9.0 Released

First release


Copyright (C) 2001-2010 Dave Beckett
Copyright (C) 2001-2005 University of Bristol

raptor-1.4.21/tests/0000755000175000017500000000000011331056234011247 500000000000000raptor-1.4.21/tests/rdfa/0000755000175000017500000000000011331056235012164 500000000000000raptor-1.4.21/tests/rdfa/0048.xhtml0000644000175000017500000000070111014346357013560 00000000000000 Test 0048

John Doe

raptor-1.4.21/tests/rdfa/0054.xhtml0000644000175000017500000000070411014346357013560 00000000000000 Test 0054

This document was authored and published by Fabien Gandon.

raptor-1.4.21/tests/rdfa/0100.xhtml0000644000175000017500000000137311026745016013551 00000000000000 Test 0100

Some text here in bold and an svg rectangle:

raptor-1.4.21/tests/rdfa/0060.xhtml0000644000175000017500000000070711014346357013560 00000000000000 Test 0060

松本 后子

raptor-1.4.21/tests/rdfa/0107.xhtml0000644000175000017500000000051111026745016013551 00000000000000 Test 0107 raptor-1.4.21/tests/rdfa/0010.xhtml0000644000175000017500000000071111014346357013546 00000000000000 Test 0010

raptor-1.4.21/tests/rdfa/0067.xhtml0000644000175000017500000000055611014346357013571 00000000000000 Test 0067

This is test #67.

raptor-1.4.21/tests/rdfa/0017.xhtml0000644000175000017500000000104511016367733013561 00000000000000 Test 0017

Manu Sporny knows Ralph Swick.

raptor-1.4.21/tests/rdfa/0073.xhtml0000644000175000017500000000077211014346357013566 00000000000000 Test 0073

This article was written by Jane.

raptor-1.4.21/tests/rdfa/0023.xhtml0000644000175000017500000000066011014346357013555 00000000000000 Test 0023
This photo was taken by Mark Birbeck
raptor-1.4.21/tests/rdfa/0086.xhtml0000644000175000017500000000066411014346357013572 00000000000000 Test 0086

mailto:ivan@w3.org

raptor-1.4.21/tests/rdfa/0036.xhtml0000644000175000017500000000105711014346357013562 00000000000000 Test 0036
A photo depicting Michael
raptor-1.4.21/tests/rdfa/0092.xhtml0000644000175000017500000000115411016367733013565 00000000000000 Test 0092
Author: Albert Einstein

E = mc2: The Most Urgent Problem of Our Time

raptor-1.4.21/tests/rdfa/0042.xhtml0000644000175000017500000000070311016367733013557 00000000000000 Test 0042
A photo depicting Michael
raptor-1.4.21/tests/rdfa/0099.xhtml0000644000175000017500000000171511026745016013572 00000000000000 Test 0099

We put thirty spokes together and call it a wheel; But it is on the space where there is nothing that the usefulness of the wheel depends. We turn clay to make a vessel; But it is on the space where there is nothing that the usefulness of the vessel depends. We pierce doors and windows to make a house; And it is on these spaces where there is nothing that the usefulness of the house depends. Therefore just as we take advantage of what is, we should recognize the usefulness of what is not. Lao Tzu: Tao Te Ching

raptor-1.4.21/tests/rdfa/0049.xhtml0000644000175000017500000000066011014346357013565 00000000000000 Test 0049

John Doe

raptor-1.4.21/tests/rdfa/0055.xhtml0000644000175000017500000000074411014346357013565 00000000000000 Test 0055

This document was authored and published by Fabien Gandon.

raptor-1.4.21/tests/rdfa/0101.xhtml0000644000175000017500000000141111026745016013543 00000000000000 Test 0101

Du texte ici en gras et un rectangle en svg:

raptor-1.4.21/tests/rdfa/0061.xhtml0000644000175000017500000000066511014346357013564 00000000000000 Test 0061

This is the first chapter in a series of chapters.

raptor-1.4.21/tests/rdfa/0108.xhtml0000644000175000017500000000070411016367733013563 00000000000000 Test 0108

ελληνικό άσπρο διάστημα

raptor-1.4.21/tests/rdfa/0011.xhtml0000644000175000017500000000075211014346357013554 00000000000000 Test 0011
Author: Albert Einstein

E = mc2: The Most Urgent Problem of Our Time

raptor-1.4.21/tests/rdfa/0068.xhtml0000644000175000017500000000067111014346357013570 00000000000000 Test 0068

The previous test was Test 0067.

raptor-1.4.21/tests/rdfa/0018.xhtml0000644000175000017500000000071611014346357013563 00000000000000 Test 0018

This photo was taken by Mark Birbeck.

raptor-1.4.21/tests/rdfa/0074.xhtml0000644000175000017500000000075211014346357013565 00000000000000 Test 0074

This article was written by Jane.

raptor-1.4.21/tests/rdfa/0080.xhtml0000644000175000017500000000076411014346357013565 00000000000000 Test 0080

Dan Brickley

raptor-1.4.21/tests/rdfa/1001.out0000644000175000017500000000176011014346357013227 00000000000000 . "Weekend off in Iona" . "2006-10-21"^^ . "2006-10-23"^^ . . "Iona, UK" . raptor-1.4.21/tests/rdfa/0030.xhtml0000644000175000017500000000075011014346357013553 00000000000000 Test 0030

This document is licensed under a Creative Commons License .

raptor-1.4.21/tests/rdfa/0087.xhtml0000644000175000017500000000360711014346357013573 00000000000000 Test 0087

alternate appendix bookmark cite chapter contents copyright glossary help icon index last license meta next p3pv1 prev role section subsection start stylesheet up

raptor-1.4.21/tests/rdfa/0037.xhtml0000644000175000017500000000114011014346357013554 00000000000000 Test 0037
A photo depicting Michael
raptor-1.4.21/tests/rdfa/0093.xhtml0000644000175000017500000000112711016367733013566 00000000000000 Test 0093
Author: Albert Einstein

E = mc2: The Most Urgent Problem of Our Time

raptor-1.4.21/tests/rdfa/0056.xhtml0000644000175000017500000000074611014346357013570 00000000000000 Test 0056

Mark Birbeck

raptor-1.4.21/tests/rdfa/0102.xhtml0000644000175000017500000000142711026745016013553 00000000000000 Test 0102

Du texte ici en gras et un rectangle en svg:

raptor-1.4.21/tests/rdfa/0006.xhtml0000644000175000017500000000101211014346357013546 00000000000000 Test 0006

This photo was taken by Mark Birbeck.

raptor-1.4.21/tests/rdfa/0062.xhtml0000644000175000017500000000071211014346357013556 00000000000000 Test 0062

This is unit test #62. The next unit test is #63.

raptor-1.4.21/tests/rdfa/0109.xhtml0000644000175000017500000000107411016367733013565 00000000000000 Test 0109

This is Test 0109.

raptor-1.4.21/tests/rdfa/0012.xhtml0000644000175000017500000000063411014346357013554 00000000000000 Test 0012

raptor-1.4.21/tests/rdfa/0069.xhtml0000644000175000017500000000067611014346357013576 00000000000000 Test 0069

The next test will be .

raptor-1.4.21/tests/rdfa/0019.xhtml0000644000175000017500000000066411014346357013566 00000000000000 Test 0019
raptor-1.4.21/tests/rdfa/0075.xhtml0000644000175000017500000000107611014346357013566 00000000000000 Test 0075

This page is under a Creative Commons Attribution-No Derivatives 3.0 license.

raptor-1.4.21/tests/rdfa/0025.xhtml0000644000175000017500000000077711014346357013570 00000000000000 Test 0025

This paper was written by Ben Adida.

raptor-1.4.21/tests/rdfa/0081.xhtml0000644000175000017500000000107111014346357013556 00000000000000 Test 0081

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

raptor-1.4.21/tests/rdfa/0031.xhtml0000644000175000017500000000074111014346357013554 00000000000000 Test 0031

The book Weaving the Web (hardcover) has the ISBN 0752820907.

raptor-1.4.21/tests/rdfa/0088.xhtml0000644000175000017500000000077611016367733013603 00000000000000 Test 0088

Dan Brickley

Dan Brickley again:-)

raptor-1.4.21/tests/rdfa/0038.xhtml0000644000175000017500000000074511014346357013567 00000000000000 Test 0038
A photo depicting Michael
raptor-1.4.21/tests/rdfa/0094.xhtml0000644000175000017500000000116111016367733013565 00000000000000 Test 0094
Author: Albert Einstein

E = mc2: The Most Urgent Problem of Our Time

raptor-1.4.21/tests/rdfa/0050.xhtml0000644000175000017500000000061511014346357013555 00000000000000 Test 0050

John Doe

raptor-1.4.21/tests/rdfa/0057.xhtml0000644000175000017500000000104411014346357013561 00000000000000 Test 0057

Mark Birbeck

Ivan Herman

raptor-1.4.21/tests/rdfa/0103.xhtml0000644000175000017500000000134011026745016013546 00000000000000 Test 0103

Some text here in bold and an svg rectangle:

raptor-1.4.21/tests/rdfa/0007.xhtml0000644000175000017500000000107611014346357013561 00000000000000 Test 0007

This photo was taken by Mark Birbeck.

raptor-1.4.21/tests/rdfa/0063.xhtml0000644000175000017500000000067311014346357013565 00000000000000 Test 0063

This is the 63rd test. The next test is #64.

raptor-1.4.21/tests/rdfa/0013.xhtml0000644000175000017500000000065411014346357013557 00000000000000 Test 0013

raptor-1.4.21/tests/rdfa/0172.xhtml0000644000175000017500000000073011304322760013552 00000000000000 Test 0172

A plain literal with a lang tag.

raptor-1.4.21/tests/rdfa/Makefile.am0000644000175000017500000001543311304322761014146 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDFA tests # # Copyright (C) 2008, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # BASE_URI=http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/ TEST_FILES= 0001.xhtml 0006.xhtml 0007.xhtml 0008.xhtml 0009.xhtml \ 0010.xhtml 0011.xhtml 0012.xhtml 0013.xhtml 0014.xhtml 0015.xhtml \ 0017.xhtml 0018.xhtml 0019.xhtml 0020.xhtml 0021.xhtml 0023.xhtml \ 0025.xhtml 0026.xhtml 0027.xhtml 0029.xhtml 0030.xhtml 0031.xhtml \ 0032.xhtml 0033.xhtml 0034.xhtml 0035.xhtml 0036.xhtml 0037.xhtml \ 0038.xhtml 0039.xhtml 0040.xhtml 0041.xhtml 0042.xhtml 0046.xhtml \ 0047.xhtml 0048.xhtml 0049.xhtml 0050.xhtml 0051.xhtml 0052.xhtml \ 0053.xhtml 0054.xhtml 0055.xhtml 0056.xhtml 0057.xhtml 0058.xhtml \ 0059.xhtml 0060.xhtml 0061.xhtml 0062.xhtml 0063.xhtml 0064.xhtml \ 0065.xhtml 0066.xhtml 0067.xhtml 0068.xhtml 0069.xhtml 0070.xhtml \ 0071.xhtml 0072.xhtml 0073.xhtml 0074.xhtml 0075.xhtml 0076.xhtml \ 0077.xhtml 0078.xhtml 0079.xhtml 0080.xhtml 0081.xhtml 0082.xhtml \ 0083.xhtml 0084.xhtml 0085.xhtml 0086.xhtml 0087.xhtml 0088.xhtml \ 0089.xhtml 0090.xhtml 0091.xhtml 0092.xhtml 0093.xhtml 0094.xhtml \ 0099.xhtml 0100.xhtml 0101.xhtml 0102.xhtml 0103.xhtml 0104.xhtml \ 0105.xhtml 0106.xhtml 0107.xhtml 0108.xhtml 0109.xhtml 0110.xhtml \ 0111.xhtml 0112.xhtml 1001.xhtml TEST_UNAPPROVED_FILES = 0172.xhtml 0173.xhtml 0174.xhtml TEST_OUT_FILES = 0001.out 0006.out 0007.out 0008.out 0009.out \ 0010.out 0011.out 0012.out 0013.out 0014.out 0015.out 0017.out \ 0018.out 0019.out 0020.out 0021.out 0023.out 0025.out 0026.out \ 0027.out 0029.out 0030.out 0031.out 0032.out 0033.out 0034.out \ 0035.out 0036.out 0037.out 0038.out 0039.out 0040.out 0041.out \ 0042.out 0046.out 0047.out 0048.out 0049.out 0050.out 0051.out \ 0052.out 0053.out 0054.out 0055.out 0056.out 0057.out 0058.out \ 0059.out 0060.out 0061.out 0062.out 0063.out 0064.out 0065.out \ 0066.out 0067.out 0068.out 0069.out 0070.out 0071.out 0072.out \ 0073.out 0074.out 0075.out 0076.out 0077.out 0078.out 0079.out \ 0080.out 0081.out 0082.out 0083.out 0084.out 0085.out 0086.out \ 0087.out 0088.out 0089.out 0090.out 0091.out 0092.out 0093.out \ 0094.out 0099.out 0100.out 0101.out 0102.out 0103.out 0104.out \ 0105.out 0106.out 0107.out 0108.out 0109.out 0110.out 0111.out \ 0112.out 1001.out TEST_UNAPPROVED_OUT_FILES = 0172.out 0173.out 0174.out TEST_BAD_FILES= ALL_TEST_FILES= \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_OUT_FILES) \ $(TEST_UNAPPROVED_FILES) \ $(TEST_UNAPPROVED_OUT_FILES) # Expected test failures: # 0094.xhtml - XML namespaces are in a different order to expected output # 0101.xhtml - XML namespaces are in a different order to expected output # 0102.xhtml - XML namespaces are in a different order to expected output # 0103.xhtml - XML namespaces are in a different order to expected output # (Add a space to the start of this string) EXPECTED_FAILURES=" 0094.xhtml 0101.xhtml 0102.xhtml 0103.xhtml" EXPECTED_UNAPPROVED_FAILURES=" " EXTRA_DIST = $(ALL_TEST_FILES) build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: @RAPTOR_PARSER_RDFA_TRUE@check-local: check-rdfa check-unapproved-rdfa check-rdfa: build-rdfdiff build-rapper $(TEST_FILES) @set +e; result=0; failures=; failure_count=0; \ $(ECHO) "Testing RDFA"; \ for test in $(TEST_FILES); do \ name=`basename $$test .xhtml` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ baseuri=$(BASE_URI)$$test; \ $(top_builddir)/utils/rapper -f noNet -q -i rdfa -I $$baseuri -o ntriples $(srcdir)/$$test > $$name-res.nt 2> $$name.err; \ status1=$$?; \ $(top_builddir)/utils/rdfdiff -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "Triple counts: expected: `wc -l < $(srcdir)/$$name.out` got: `wc -l < $$name-res.nt` "; \ $(ECHO) $(top_builddir)/utils/rapper -f noNet -q -i rdfa -I $$baseuri -o ntriples $(srcdir)/$$test '>' $$name-res.nt; \ $(ECHO) $(top_builddir)/utils/rdfdiff -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt '>' $$name.res; \ cat $$name.err $$name.res; \ failures="$$failures $$test"; \ failure_count=`expr $$failure_count + 1`; \ fi; \ rm -f $$name-res.nt $$name.res $$name.err; \ done; \ if test "X$$failures" != X; then \ echo "$$failure_count tests FAILED: $$failures"; \ if test "$$failures" = $(EXPECTED_FAILURES); then \ echo "Ignoring expected failures"; \ result=0; \ fi; \ fi; \ set -e; exit $$result check-unapproved-rdfa: build-rdfdiff build-rapper $(TEST_UNAPPROVED_FILES) @set +e; result=0; failures=; failure_count=0; \ $(ECHO) "Testing unapproved RDFA"; \ for test in $(TEST_UNAPPROVED_FILES); do \ name=`basename $$test .xhtml` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ baseuri=$(BASE_URI)$$test; \ $(top_builddir)/utils/rapper -f noNet -q -i rdfa -I $$baseuri -o ntriples $(srcdir)/$$test > $$name-res.nt 2> $$name.err; \ status1=$$?; \ $(top_builddir)/utils/rdfdiff -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "Triple counts: expected: `wc -l < $(srcdir)/$$name.out` got: `wc -l < $$name-res.nt` "; \ $(ECHO) $(top_builddir)/utils/rapper -f noNet -q -i rdfa -I $$baseuri -o ntriples $(srcdir)/$$test '>' $$name-res.nt; \ $(ECHO) $(top_builddir)/utils/rdfdiff -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt '>' $$name.res; \ cat $$name.err $$name.res; \ failures="$$failures $$test"; \ failure_count=`expr $$failure_count + 1`; \ fi; \ rm -f $$name-res.nt $$name.res $$name.err; \ done; \ if test "X$$failures" != X; then \ echo "$$failure_count tests FAILED: $$failures"; \ if test "$$failures" = $(EXPECTED_UNAPPROVED_FAILURES); then \ echo "Ignoring expected failures"; \ result=0; \ fi; \ fi; \ set -e; exit $$result raptor-1.4.21/tests/rdfa/Makefile.in0000644000175000017500000004226211330704764014165 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDFA tests # # Copyright (C) 2008, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/rdfa DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ BASE_URI = http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/ TEST_FILES = 0001.xhtml 0006.xhtml 0007.xhtml 0008.xhtml 0009.xhtml \ 0010.xhtml 0011.xhtml 0012.xhtml 0013.xhtml 0014.xhtml 0015.xhtml \ 0017.xhtml 0018.xhtml 0019.xhtml 0020.xhtml 0021.xhtml 0023.xhtml \ 0025.xhtml 0026.xhtml 0027.xhtml 0029.xhtml 0030.xhtml 0031.xhtml \ 0032.xhtml 0033.xhtml 0034.xhtml 0035.xhtml 0036.xhtml 0037.xhtml \ 0038.xhtml 0039.xhtml 0040.xhtml 0041.xhtml 0042.xhtml 0046.xhtml \ 0047.xhtml 0048.xhtml 0049.xhtml 0050.xhtml 0051.xhtml 0052.xhtml \ 0053.xhtml 0054.xhtml 0055.xhtml 0056.xhtml 0057.xhtml 0058.xhtml \ 0059.xhtml 0060.xhtml 0061.xhtml 0062.xhtml 0063.xhtml 0064.xhtml \ 0065.xhtml 0066.xhtml 0067.xhtml 0068.xhtml 0069.xhtml 0070.xhtml \ 0071.xhtml 0072.xhtml 0073.xhtml 0074.xhtml 0075.xhtml 0076.xhtml \ 0077.xhtml 0078.xhtml 0079.xhtml 0080.xhtml 0081.xhtml 0082.xhtml \ 0083.xhtml 0084.xhtml 0085.xhtml 0086.xhtml 0087.xhtml 0088.xhtml \ 0089.xhtml 0090.xhtml 0091.xhtml 0092.xhtml 0093.xhtml 0094.xhtml \ 0099.xhtml 0100.xhtml 0101.xhtml 0102.xhtml 0103.xhtml 0104.xhtml \ 0105.xhtml 0106.xhtml 0107.xhtml 0108.xhtml 0109.xhtml 0110.xhtml \ 0111.xhtml 0112.xhtml 1001.xhtml TEST_UNAPPROVED_FILES = 0172.xhtml 0173.xhtml 0174.xhtml TEST_OUT_FILES = 0001.out 0006.out 0007.out 0008.out 0009.out \ 0010.out 0011.out 0012.out 0013.out 0014.out 0015.out 0017.out \ 0018.out 0019.out 0020.out 0021.out 0023.out 0025.out 0026.out \ 0027.out 0029.out 0030.out 0031.out 0032.out 0033.out 0034.out \ 0035.out 0036.out 0037.out 0038.out 0039.out 0040.out 0041.out \ 0042.out 0046.out 0047.out 0048.out 0049.out 0050.out 0051.out \ 0052.out 0053.out 0054.out 0055.out 0056.out 0057.out 0058.out \ 0059.out 0060.out 0061.out 0062.out 0063.out 0064.out 0065.out \ 0066.out 0067.out 0068.out 0069.out 0070.out 0071.out 0072.out \ 0073.out 0074.out 0075.out 0076.out 0077.out 0078.out 0079.out \ 0080.out 0081.out 0082.out 0083.out 0084.out 0085.out 0086.out \ 0087.out 0088.out 0089.out 0090.out 0091.out 0092.out 0093.out \ 0094.out 0099.out 0100.out 0101.out 0102.out 0103.out 0104.out \ 0105.out 0106.out 0107.out 0108.out 0109.out 0110.out 0111.out \ 0112.out 1001.out TEST_UNAPPROVED_OUT_FILES = 0172.out 0173.out 0174.out TEST_BAD_FILES = ALL_TEST_FILES = \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_OUT_FILES) \ $(TEST_UNAPPROVED_FILES) \ $(TEST_UNAPPROVED_OUT_FILES) # Expected test failures: # 0094.xhtml - XML namespaces are in a different order to expected output # 0101.xhtml - XML namespaces are in a different order to expected output # 0102.xhtml - XML namespaces are in a different order to expected output # 0103.xhtml - XML namespaces are in a different order to expected output # (Add a space to the start of this string) EXPECTED_FAILURES = " 0094.xhtml 0101.xhtml 0102.xhtml 0103.xhtml" EXPECTED_UNAPPROVED_FAILURES = " " EXTRA_DIST = $(ALL_TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/rdfa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/rdfa/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: @RAPTOR_PARSER_RDFA_TRUE@check-local: check-rdfa check-unapproved-rdfa check-rdfa: build-rdfdiff build-rapper $(TEST_FILES) @set +e; result=0; failures=; failure_count=0; \ $(ECHO) "Testing RDFA"; \ for test in $(TEST_FILES); do \ name=`basename $$test .xhtml` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ baseuri=$(BASE_URI)$$test; \ $(top_builddir)/utils/rapper -f noNet -q -i rdfa -I $$baseuri -o ntriples $(srcdir)/$$test > $$name-res.nt 2> $$name.err; \ status1=$$?; \ $(top_builddir)/utils/rdfdiff -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "Triple counts: expected: `wc -l < $(srcdir)/$$name.out` got: `wc -l < $$name-res.nt` "; \ $(ECHO) $(top_builddir)/utils/rapper -f noNet -q -i rdfa -I $$baseuri -o ntriples $(srcdir)/$$test '>' $$name-res.nt; \ $(ECHO) $(top_builddir)/utils/rdfdiff -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt '>' $$name.res; \ cat $$name.err $$name.res; \ failures="$$failures $$test"; \ failure_count=`expr $$failure_count + 1`; \ fi; \ rm -f $$name-res.nt $$name.res $$name.err; \ done; \ if test "X$$failures" != X; then \ echo "$$failure_count tests FAILED: $$failures"; \ if test "$$failures" = $(EXPECTED_FAILURES); then \ echo "Ignoring expected failures"; \ result=0; \ fi; \ fi; \ set -e; exit $$result check-unapproved-rdfa: build-rdfdiff build-rapper $(TEST_UNAPPROVED_FILES) @set +e; result=0; failures=; failure_count=0; \ $(ECHO) "Testing unapproved RDFA"; \ for test in $(TEST_UNAPPROVED_FILES); do \ name=`basename $$test .xhtml` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ baseuri=$(BASE_URI)$$test; \ $(top_builddir)/utils/rapper -f noNet -q -i rdfa -I $$baseuri -o ntriples $(srcdir)/$$test > $$name-res.nt 2> $$name.err; \ status1=$$?; \ $(top_builddir)/utils/rdfdiff -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "Triple counts: expected: `wc -l < $(srcdir)/$$name.out` got: `wc -l < $$name-res.nt` "; \ $(ECHO) $(top_builddir)/utils/rapper -f noNet -q -i rdfa -I $$baseuri -o ntriples $(srcdir)/$$test '>' $$name-res.nt; \ $(ECHO) $(top_builddir)/utils/rdfdiff -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt '>' $$name.res; \ cat $$name.err $$name.res; \ failures="$$failures $$test"; \ failure_count=`expr $$failure_count + 1`; \ fi; \ rm -f $$name-res.nt $$name.res $$name.err; \ done; \ if test "X$$failures" != X; then \ echo "$$failure_count tests FAILED: $$failures"; \ if test "$$failures" = $(EXPECTED_UNAPPROVED_FAILURES); then \ echo "Ignoring expected failures"; \ result=0; \ fi; \ fi; \ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/tests/rdfa/0076.xhtml0000644000175000017500000000355211014346357013570 00000000000000 Test 0076

alternate appendix bookmark cite chapter contents copyright glossary help index last license meta p3pv1 role section subsection start stylesheet up

raptor-1.4.21/tests/rdfa/0026.xhtml0000644000175000017500000000066211014346357013562 00000000000000 Test 0026

raptor-1.4.21/tests/rdfa/0082.xhtml0000644000175000017500000000111211014346357013553 00000000000000 Test 0082

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

raptor-1.4.21/tests/rdfa/0032.xhtml0000644000175000017500000000104611014346357013554 00000000000000 Test 0032

The book Weaving the Web (hardcover) has the ISBN 0752820907.

raptor-1.4.21/tests/rdfa/0089.xhtml0000644000175000017500000000073111014346357013570 00000000000000 Test 0089
example image
raptor-1.4.21/tests/rdfa/0039.xhtml0000644000175000017500000000105711016367733013570 00000000000000 Test 0039
A photo depicting Michael
raptor-1.4.21/tests/rdfa/0051.xhtml0000644000175000017500000000060311014346357013553 00000000000000 Test 0051

John Doe

raptor-1.4.21/tests/rdfa/0001.xhtml0000644000175000017500000000064011014346357013547 00000000000000 Test 0001

This photo was taken by Mark Birbeck.

raptor-1.4.21/tests/rdfa/0058.xhtml0000644000175000017500000000100411014346357013556 00000000000000 Test 0058

Mark Birbeck

Ivan Herman

raptor-1.4.21/tests/rdfa/0104.xhtml0000644000175000017500000000120511026745016013547 00000000000000 Test 0104

The word "interfenestration" has 17 characters.

raptor-1.4.21/tests/rdfa/0008.xhtml0000644000175000017500000000074511014346357013564 00000000000000 Test 0008

This document is licensed under a Creative Commons .

raptor-1.4.21/tests/rdfa/0064.xhtml0000644000175000017500000000066511014346357013567 00000000000000 Test 0064

Michael knows Manu.

raptor-1.4.21/tests/rdfa/0110.xhtml0000644000175000017500000000050211026745016013543 00000000000000 Test 0110 ]]> <div xmlns="http://www.w3.org/1999/xhtml"> html description 4 </div> 2007-10-01T06:56:58Z raptor-1.4.21/tests/feeds/test03.rdf0000644000175000017500000000560111170016742014077 00000000000000 example feed with 3 items 2006-03-28T20:57:15Z bob bob@bob.com http://bob.com/ 2006-03-28T17:05:01-05:00 blog item title 2006-02 the summary of the item
a literal XML atom:content with tags and newlines
2006-03-03T23:59:59Z 2006-03-03T12:00:005Z
blog item title 2006-02 a content:encoded description with tags and newlines]]> 2006-02-02T00:00:02Z blog item title 2006-01
The atom:summary description including tags over several lines.
2006-01-01T00:00:01Z
blog item title 2005-12 the rss description text/html 2005-12-12T00:00:00Z
raptor-1.4.21/tests/feeds/Makefile.am0000644000175000017500000001446211227672754014337 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Feed tests # # Copyright (C) 2009, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # Input RDF/XML (atom model) files - rdfxml parser TEST_IN_RDF_ATOMS= test01.rdf test02.rdf test03.rdf # Input Atom 1.0 (atom model) files - rss-tag-soup parser TEST_IN_ATOMS= test04.atom test05.atom # Output files in Turtle (after parsing) and Atom (after serializing) OUT_RDF_TTLS= $(TEST_IN_RDF_ATOMS:.rdf=.ttl) OUT_ATOM_TTLS= $(TEST_IN_ATOMS:.atom=.ttl) OUT_RDF_ATOMS= $(TEST_IN_RDF_ATOMS:.rdf=.atom) # Expected results for above EXPECTED_TTLS= $(OUT_RDF_TTLS:.ttl=-result.ttl) $(OUT_ATOM_TTLS:.ttl=-result.ttl) EXPECTED_ATOMS= $(OUT_RDF_ATOMS:.atom=-result.atom) # Files generated during testing (to delete/clean) OUT_TTLS = $(OUT_RDF_TTLS) $(OUT_ATOM_TTLS) OUT_ATOMS = $(OUT_RDF_ATOMS) EXTRA_DIST = \ $(TEST_IN_RDF_ATOMS) $(TEST_IN_ATOMS) \ $(EXPECTED_TTLS) $(EXPECTED_ATOMS) \ atom.rng atom.rnc CLEANFILES = $(OUT_ATOMS) $(OUT_TTLS) errors.log RAPPER = $(top_builddir)/utils/rapper build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) FEED_TESTS= if RAPTOR_PARSER_RDFXML FEED_TESTS += check-rdfxml-to-turtle endif if RAPTOR_PARSER_RSS FEED_TESTS += check-atom-to-turtle endif if RAPTOR_SERIALIZER_ATOM FEED_TESTS += check-serialize-atom endif if MAINTAINER_MODE FEED_TESTS += check-validate-atom endif check-local: build-rapper $(FEED_TESTS) # Parse from RDF/XML and Serialize to Turtle check-rdfxml-to-turtle: $(TEST_IN_RDF_ATOMS) @set +e; result=0; \ $(ECHO) "Testing RDF/XML to Turtle"; \ for test in $?; do \ parser=rdfxml; \ name=`basename $$test .rdf` ; \ turtle="$$name.ttl"; \ expected="$$name-result.ttl"; \ opts="-f writeBaseURI=0"; \ if test $$name = test01; then \ baseuri="http://example.org/whatsnew"; \ elif test $$name = test02; then \ baseuri="http://example.org/news/"; \ elif test $$name = test03; then \ baseuri="http://example.org"; \ fi; \ opts="-q -i $$parser -o turtle $$opts -O $$baseuri"; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(RAPPER) $$opts file:$(srcdir)/$$test > $$turtle 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(ECHO) "FAILED with code $$status"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$turtle >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$turtle; result=1; \ fi; \ rm -f errors.log ; \ done; \ set -e; exit $$result # Parser from Atom and Serialize to Turtle check-atom-to-turtle: $(TEST_IN_ATOMS) @set +e; result=0; \ $(ECHO) "Testing Atom to Turtle"; \ for test in $?; do \ parser=rss-tag-soup; \ name=`basename $$test .atom` ; \ turtle="$$name.ttl"; \ expected="$$name-result.ttl"; \ opts="-f writeBaseURI=0"; \ baseuri="http://www.example.org/blog/"; \ if test $$name = test04; then \ baseuri="http://www.example.org/blog/"; \ fi; \ opts="-q -i $$parser -o turtle $$opts -O $$baseuri"; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(RAPPER) $$opts file:$(srcdir)/$$test > $$turtle 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(ECHO) "FAILED with code $$status"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$turtle >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$turtle; result=1; \ fi; \ rm -f errors.log ; \ done; \ set -e; exit $$result # Parser from Turtle and Serialize to Atom check-serialize-atom: $(OUT_RDF_TTLS) @set +e; result=0; \ $(ECHO) "Testing Turtle to Atom XML"; \ for test in $(OUT_RDF_TTLS); do \ name=`basename $$test .ttl` ; \ atom="$$name.atom"; \ expected="$$name-result.atom"; \ opts="-f writeBaseURI=0 -f rssTriples=atom-triples"; \ if test $$name = test01; then \ baseuri="http://example.org/whatsnew"; \ opts="$$opts -f atomEntryUri=http://example.org/2006/03/28/blog-item"; \ elif test $$name = test02; then \ baseuri="http://example.org/news/"; \ elif test $$name = test03; then \ baseuri="http://example.org"; \ fi; \ opts="-q -i turtle -o atom $$opts -I $$baseuri -O $$baseuri"; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(RAPPER) $$opts file:$$test > $$atom 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(ECHO) "FAILED with code $$status"; \ $(ECHO) "$(RAPPER) $$opts file:$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$atom >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$atom; result=1; \ fi; \ rm -f errors.log ; \ done; \ set -e; exit $$result if MAINTAINER_MODE SUFFIXES = .rng .rnc .rnc.rng: trang $? $@ check-validate-atom: $(srcdir)/atom.rng $(OUT_ATOMS) $(TEST_IN_ATOMS) @set +e; result=0; \ $(ECHO) "Validating Atom XML with RelaxNG"; \ for atom in $(OUT_ATOMS) $(TEST_IN_ATOMS); do \ $(ECHO) $(ECHO_N) "Validating $$atom $(ECHO_C)"; \ jing $(srcdir)/atom.rng $$atom > errors.log 2>&1; \ status=$$?; \ if test $$status != 0; then \ $(ECHO) "FAILED with code $$status"; result=1; \ $(ECHO) jing $(srcdir)/atom.rng $$atom; \ sed -e "s,^.*$$atom,$$atom," errors.log ; \ result=1 ; \ else \ $(ECHO) "ok"; \ fi; \ rm -f errors.log; \ done; \ set -e; exit $$result endif raptor-1.4.21/tests/feeds/Makefile.in0000644000175000017500000004237511330704764014344 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Feed tests # # Copyright (C) 2009, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @RAPTOR_PARSER_RDFXML_TRUE@am__append_1 = check-rdfxml-to-turtle @RAPTOR_PARSER_RSS_TRUE@am__append_2 = check-atom-to-turtle @RAPTOR_SERIALIZER_ATOM_TRUE@am__append_3 = check-serialize-atom @MAINTAINER_MODE_TRUE@am__append_4 = check-validate-atom subdir = tests/feeds DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Input RDF/XML (atom model) files - rdfxml parser TEST_IN_RDF_ATOMS = test01.rdf test02.rdf test03.rdf # Input Atom 1.0 (atom model) files - rss-tag-soup parser TEST_IN_ATOMS = test04.atom test05.atom # Output files in Turtle (after parsing) and Atom (after serializing) OUT_RDF_TTLS = $(TEST_IN_RDF_ATOMS:.rdf=.ttl) OUT_ATOM_TTLS = $(TEST_IN_ATOMS:.atom=.ttl) OUT_RDF_ATOMS = $(TEST_IN_RDF_ATOMS:.rdf=.atom) # Expected results for above EXPECTED_TTLS = $(OUT_RDF_TTLS:.ttl=-result.ttl) $(OUT_ATOM_TTLS:.ttl=-result.ttl) EXPECTED_ATOMS = $(OUT_RDF_ATOMS:.atom=-result.atom) # Files generated during testing (to delete/clean) OUT_TTLS = $(OUT_RDF_TTLS) $(OUT_ATOM_TTLS) OUT_ATOMS = $(OUT_RDF_ATOMS) EXTRA_DIST = \ $(TEST_IN_RDF_ATOMS) $(TEST_IN_ATOMS) \ $(EXPECTED_TTLS) $(EXPECTED_ATOMS) \ atom.rng atom.rnc CLEANFILES = $(OUT_ATOMS) $(OUT_TTLS) errors.log RAPPER = $(top_builddir)/utils/rapper FEED_TESTS = $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) @MAINTAINER_MODE_TRUE@SUFFIXES = .rng .rnc all: all-am .SUFFIXES: .SUFFIXES: .rng .rnc $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/feeds/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/feeds/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: build-rapper $(FEED_TESTS) # Parse from RDF/XML and Serialize to Turtle check-rdfxml-to-turtle: $(TEST_IN_RDF_ATOMS) @set +e; result=0; \ $(ECHO) "Testing RDF/XML to Turtle"; \ for test in $?; do \ parser=rdfxml; \ name=`basename $$test .rdf` ; \ turtle="$$name.ttl"; \ expected="$$name-result.ttl"; \ opts="-f writeBaseURI=0"; \ if test $$name = test01; then \ baseuri="http://example.org/whatsnew"; \ elif test $$name = test02; then \ baseuri="http://example.org/news/"; \ elif test $$name = test03; then \ baseuri="http://example.org"; \ fi; \ opts="-q -i $$parser -o turtle $$opts -O $$baseuri"; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(RAPPER) $$opts file:$(srcdir)/$$test > $$turtle 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(ECHO) "FAILED with code $$status"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$turtle >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$turtle; result=1; \ fi; \ rm -f errors.log ; \ done; \ set -e; exit $$result # Parser from Atom and Serialize to Turtle check-atom-to-turtle: $(TEST_IN_ATOMS) @set +e; result=0; \ $(ECHO) "Testing Atom to Turtle"; \ for test in $?; do \ parser=rss-tag-soup; \ name=`basename $$test .atom` ; \ turtle="$$name.ttl"; \ expected="$$name-result.ttl"; \ opts="-f writeBaseURI=0"; \ baseuri="http://www.example.org/blog/"; \ if test $$name = test04; then \ baseuri="http://www.example.org/blog/"; \ fi; \ opts="-q -i $$parser -o turtle $$opts -O $$baseuri"; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(RAPPER) $$opts file:$(srcdir)/$$test > $$turtle 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(ECHO) "FAILED with code $$status"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$turtle >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$turtle; result=1; \ fi; \ rm -f errors.log ; \ done; \ set -e; exit $$result # Parser from Turtle and Serialize to Atom check-serialize-atom: $(OUT_RDF_TTLS) @set +e; result=0; \ $(ECHO) "Testing Turtle to Atom XML"; \ for test in $(OUT_RDF_TTLS); do \ name=`basename $$test .ttl` ; \ atom="$$name.atom"; \ expected="$$name-result.atom"; \ opts="-f writeBaseURI=0 -f rssTriples=atom-triples"; \ if test $$name = test01; then \ baseuri="http://example.org/whatsnew"; \ opts="$$opts -f atomEntryUri=http://example.org/2006/03/28/blog-item"; \ elif test $$name = test02; then \ baseuri="http://example.org/news/"; \ elif test $$name = test03; then \ baseuri="http://example.org"; \ fi; \ opts="-q -i turtle -o atom $$opts -I $$baseuri -O $$baseuri"; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(RAPPER) $$opts file:$$test > $$atom 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(ECHO) "FAILED with code $$status"; \ $(ECHO) "$(RAPPER) $$opts file:$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$atom >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ $(ECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$atom; result=1; \ fi; \ rm -f errors.log ; \ done; \ set -e; exit $$result @MAINTAINER_MODE_TRUE@.rnc.rng: @MAINTAINER_MODE_TRUE@ trang $? $@ @MAINTAINER_MODE_TRUE@check-validate-atom: $(srcdir)/atom.rng $(OUT_ATOMS) $(TEST_IN_ATOMS) @MAINTAINER_MODE_TRUE@ @set +e; result=0; \ @MAINTAINER_MODE_TRUE@ $(ECHO) "Validating Atom XML with RelaxNG"; \ @MAINTAINER_MODE_TRUE@ for atom in $(OUT_ATOMS) $(TEST_IN_ATOMS); do \ @MAINTAINER_MODE_TRUE@ $(ECHO) $(ECHO_N) "Validating $$atom $(ECHO_C)"; \ @MAINTAINER_MODE_TRUE@ jing $(srcdir)/atom.rng $$atom > errors.log 2>&1; \ @MAINTAINER_MODE_TRUE@ status=$$?; \ @MAINTAINER_MODE_TRUE@ if test $$status != 0; then \ @MAINTAINER_MODE_TRUE@ $(ECHO) "FAILED with code $$status"; result=1; \ @MAINTAINER_MODE_TRUE@ $(ECHO) jing $(srcdir)/atom.rng $$atom; \ @MAINTAINER_MODE_TRUE@ sed -e "s,^.*$$atom,$$atom," errors.log ; \ @MAINTAINER_MODE_TRUE@ result=1 ; \ @MAINTAINER_MODE_TRUE@ else \ @MAINTAINER_MODE_TRUE@ $(ECHO) "ok"; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ rm -f errors.log; \ @MAINTAINER_MODE_TRUE@ done; \ @MAINTAINER_MODE_TRUE@ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/tests/feeds/test01-result.atom0000644000175000017500000000173411161524046015602 00000000000000 http://example.org/2006/03/28/blog-item atomic blog item title 2006-03-28T20:57:15Z rss:description here Example raptor-1.4.21/tests/feeds/test01-result.ttl0000644000175000017500000000244311303121536015436 00000000000000@prefix rdf: . @prefix atom: . @prefix content: . @prefix dc: . @prefix enc: . @prefix rss091: . @prefix : . <2006/03/28/blog-item> dc:creator [ dc:title "Example" ; a dc:Person ] ; dc:date "2006-03-28T20:57:15Z" ; :description "rss:description here" ; :link "http://example.org/2006/03/28/blog-item" ; :title "Original blog item title 2006-03" ; a :item ; atom:summary """
The atom:summary description including tags over several lines.
"""^^rdf:XMLLiteral ; atom:title "atomic blog item title" ; atom:updated "2006-03-28T20:57:15Z" . <> dc:date "2006-03-28T17:05:01-05:00" ; :items [ rdf:_1 <2006/03/28/blog-item> ; a rdf:Seq ] ; :link "http://example.org/whatsnew" ; :title "example feed with 1 item" ; a :channel ; atom:author "example" ; atom:email "example@example.com" ; atom:title "atomic title" ; atom:updated "2006-03-28T20:57:15Z" ; atom:uri "http://example.com/" . raptor-1.4.21/tests/feeds/test02-result.atom0000644000175000017500000000522611227654651015614 00000000000000 http://example.org/news/ Example News 2008-03-30T05:52:06Z unknown atom:id atom:updated atom:rights atom:title atom:summary atom:id atom:updated atom:rights atom:title atom:summary rss091:pubDate rss:description http://example.org/news/2008-03-30 News for 2008-03-30 2008-03-30T06:07:28Z
html description 2
http://example.org/news/2007-10-01 News for 2007-10-01 2007-10-01T06:56:58Z
html description 4
raptor-1.4.21/tests/feeds/test02-result.ttl0000644000175000017500000000221411303121536015433 00000000000000@prefix rdf: . @prefix content: . @prefix dc: . @prefix : . <> dc:date "2008-03-30T05:52:06Z" ; :description "Example News feed." ; :items [ rdf:_1 <2008-03-30> ; rdf:_2 <2007-10-01> ; a rdf:Seq ] ; :link "http://example.org/news/" ; :title "Example News" ; a :channel . <2007-10-01> dc:date "2007-10-01T06:56:58Z" ; :description """
html description 4
""" ; :link "http://example.org/news/2007-10-01" ; content:encoded """
html description 3
""" ; :title "News for 2007-10-01" ; a :item . <2008-03-30> dc:date "2008-03-30T06:07:28Z" ; :description """
html description 2
""" ; :link "http://example.org/news/2008-03-30" ; content:encoded """
html description 1
""" ; :title "News for 2008-03-30" ; a :item . raptor-1.4.21/tests/feeds/test04.atom0000644000175000017500000000314311203022666014263 00000000000000 http://www.example.org/blog/index.atom Kim Doe Blog subtitle Kim Doe me@example.org http://www.example.org/blog/ 2006-04-02T22:15:25-04:00 tag:example.org,2004:2217 Blah Blah

Blah blah

Blah blah summary. 2006-04-02T07:06:12-04:00
tag:example.org,2004:2216 More stuff
More stuff
2006-04-01T08:03:19-05:00
raptor-1.4.21/tests/feeds/test03-result.ttl0000644000175000017500000000360111303121536015435 00000000000000@prefix rdf: . @prefix atom: . @prefix content: . @prefix dc: . @prefix at: . @prefix : . dc:date "2005-12-12T00:00:00Z" ; :description "the rss description" ; :title "blog item title 2005-12" ; at:contentType "text/html" ; a :item ; atom:content . dc:date "2006-01-01T00:00:01Z" ; :title "blog item title 2006-01" ; a :item ; atom:summary """
The atom:summary description including tags over several lines.
"""^^rdf:XMLLiteral . dc:date "2006-02-02T00:00:02Z" ; content:encoded """
a content:encoded description with tags and newlines
""" ; :title "blog item title 2006-02" ; a :item . dc:date "2006-03-03T12:00:005Z" ; :description "the summary of the item" ; :title "blog item title 2006-02" ; a :item ; atom:content """
a literal XML atom:content with tags and newlines
"""^^rdf:XMLLiteral ; atom:updated "2006-03-03T23:59:59Z" . dc:date "2006-03-28T17:05:01-05:00" ; :items [ rdf:_1 ; rdf:_2 ; rdf:_3 ; rdf:_4 ; a rdf:Seq ] ; :title "example feed with 3 items" ; a :channel ; atom:author "bob" ; atom:email "bob@bob.com" ; atom:updated "2006-03-28T20:57:15Z" ; atom:uri "http://bob.com/" . raptor-1.4.21/tests/feeds/test05.atom0000644000175000017500000000050011170016742014257 00000000000000 http://www.example.org/blog/index.atom Kim Doe Kim Doe 2009-01-01T00:00:00-00:00 raptor-1.4.21/tests/grddl/0000755000175000017500000000000011331056235012344 500000000000000raptor-1.4.21/tests/grddl/test-01.out0000644000175000017500000000026010677565706014234 00000000000000_:genid1 "Triple from data-01.rdf" . _:genid2 "Triple from data-02.rdf" . raptor-1.4.21/tests/grddl/test-01.html0000644000175000017500000000145510677602636014372 00000000000000 GRDDL link genid test raptor-1.4.21/tests/grddl/Makefile.am0000644000175000017500000000377110751217672014341 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor GRDDL tests # # Copyright (C) 2007, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # TEST_FILES=test-01.html TEST_BAD_FILES= TEST_OUT_FILES=test-01.out TEST_DATA_FILES=\ data-01.rdf data-02.rdf data-01.nt ALL_TEST_FILES= \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_OUT_FILES) \ $(TEST_DATA_FILES) EXTRA_DIST = $(ALL_TEST_FILES) build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: @RAPTOR_PARSER_GRDDL_TRUE@check-local: check-grddl check-grddl: build-rapper $(TEST_FILES) @result=0; \ $(ECHO) "Testing GRDDL"; \ for test in $(TEST_FILES); do \ name=`basename $$test .html` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -f noNet -q -i grddl -o ntriples $(srcdir)/$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(ECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(ECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(ECHO) "ok"; \ fi; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ if test $$status != 1 ; then \ rm -f $$name.res $$name.err; \ fi; \ done; \ exit $$result raptor-1.4.21/tests/grddl/Makefile.in0000644000175000017500000003063011330704764014341 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor GRDDL tests # # Copyright (C) 2007, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/grddl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TEST_FILES = test-01.html TEST_BAD_FILES = TEST_OUT_FILES = test-01.out TEST_DATA_FILES = \ data-01.rdf data-02.rdf data-01.nt ALL_TEST_FILES = \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_OUT_FILES) \ $(TEST_DATA_FILES) EXTRA_DIST = $(ALL_TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/grddl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/grddl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: @RAPTOR_PARSER_GRDDL_TRUE@check-local: check-grddl check-grddl: build-rapper $(TEST_FILES) @result=0; \ $(ECHO) "Testing GRDDL"; \ for test in $(TEST_FILES); do \ name=`basename $$test .html` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -f noNet -q -i grddl -o ntriples $(srcdir)/$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(ECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(ECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(ECHO) "ok"; \ fi; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ if test $$status != 1 ; then \ rm -f $$name.res $$name.err; \ fi; \ done; \ exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/tests/grddl/data-01.nt0000644000175000017500000000001510677565706013776 00000000000000# No Triples raptor-1.4.21/tests/grddl/data-01.rdf0000644000175000017500000000031210677565706014130 00000000000000 Triple from data-01.rdf raptor-1.4.21/tests/grddl/data-02.rdf0000644000175000017500000000031210677565706014131 00000000000000 Triple from data-02.rdf raptor-1.4.21/tests/empty.c0000644000175000017500000000176210360143323012474 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * empty.c - Raptor empty file test * * Copyright (C) 2004-2006, David Beckett http://purl.org/net/dajobe/ * Copyright (C) 2004-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #include int main(int argc, char *argv[]); int main(int argc, char *argv[]) { return 0; } raptor-1.4.21/tests/Makefile.am0000644000175000017500000000253011156125305013224 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor tests # # Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # TESTS=raptor_empty_test$(EXEEXT) AM_CPPFLAGS=-I$(top_srcdir)/src AM_CFLAGS= -I$(top_builddir)/src @CFLAGS@ $(MEM) AM_LDFLAGS=$(top_builddir)/src/libraptor.la $(MEM_LIBS) EXTRA_PROGRAMS=$(TESTS) CLEANFILES=$(TESTS) raptor_empty_test_SOURCES=empty.c # Used to make N-triples output consistent BASE_URI=http://librdf.org/raptor/tests/ SUBDIRS = rdfxml ntriples turtle trig grddl rdfa feeds $(top_builddir)/src/libraptor.la: cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libraptor.la raptor-1.4.21/tests/Makefile.in0000644000175000017500000006101211330704764013243 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor tests # # Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_raptor_empty_test_OBJECTS = empty.$(OBJEXT) raptor_empty_test_OBJECTS = $(am_raptor_empty_test_OBJECTS) raptor_empty_test_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(raptor_empty_test_SOURCES) DIST_SOURCES = $(raptor_empty_test_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = raptor_empty_test$(EXEEXT) AM_CPPFLAGS = -I$(top_srcdir)/src AM_CFLAGS = -I$(top_builddir)/src @CFLAGS@ $(MEM) AM_LDFLAGS = $(top_builddir)/src/libraptor.la $(MEM_LIBS) EXTRA_PROGRAMS = $(TESTS) CLEANFILES = $(TESTS) raptor_empty_test_SOURCES = empty.c # Used to make N-triples output consistent BASE_URI = http://librdf.org/raptor/tests/ SUBDIRS = rdfxml ntriples turtle trig grddl rdfa feeds all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): raptor_empty_test$(EXEEXT): $(raptor_empty_test_OBJECTS) $(raptor_empty_test_DEPENDENCIES) @rm -f raptor_empty_test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(raptor_empty_test_OBJECTS) $(raptor_empty_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/empty.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-TESTS check-am clean clean-generic \ clean-libtool ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am $(top_builddir)/src/libraptor.la: cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libraptor.la # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/tests/rdfxml/0000755000175000017500000000000011331056234012543 500000000000000raptor-1.4.21/tests/rdfxml/daml-oil.out0000644000175000017500000010164411113423026014713 00000000000000 "$Id: daml+oil.daml,v 1.7 2001/06/06 01:38:21 mdean Exp $" . . . "Class" . "\n The class of all \"object\" classes\n " . . . "Datatype" . "\n The class of all datatype classes\n " . . . "Thing" . "\n The most general (object) class in DAML.\n This is equal to the union of any class and its complement.\n " . _:genid1 . _:genid1 . . _:genid3 . _:genid3 _:genid2 . _:genid1 _:genid3 . _:genid2 . _:genid2 . _:genid3 . _:genid1 . . "Nothing" . "the class with no things in it." . . . "equivalentTo" . "\n for equivalentTo(X, Y), read X is an equivalent term to Y.\n " . . "sameClassAs" . "\n for sameClassAs(X, Y), read X is an equivalent class to Y.\n cf OIL Equivalent\n " . . . . . . "samePropertyAs" . "\n for samePropertyAs(P, R), read P is an equivalent property to R.\n " . . . . "sameIndividualAs" . "\n for sameIndividualAs(a, b), read a is the same individual as b.\n " . . . . . "disjointWith" . "\n for disjointWith(X, Y) read: X and Y have no members in common.\n cf OIL Disjoint\n " . . . . "differentIndividualFrom" . "\n for differentIndividualFrom(a, b), read a is not the same individual as b.\n " . . . . "unionOf" . "\n for unionOf(X, Y) read: X is the union of the classes in the list Y;\n i.e. if something is in any of the classes in Y, it's in X, and vice versa.\n cf OIL OR\n " . . . . "disjointUnionOf" . "\n for disjointUnionOf(X, Y) read: X is the disjoint union of the classes in\n the list Y: (a) for any c1 and c2 in Y, disjointWith(c1, c2),\n and (b) unionOf(X, Y). i.e. if something is in any of the classes in Y, it's\n in X, and vice versa.\n cf OIL disjoint-covered\n " . . . . "intersectionOf" . "\n for intersectionOf(X, Y) read: X is the intersection of the classes in the list Y;\n i.e. if something is in all the classes in Y, then it's in X, and vice versa.\n cf OIL AND\n " . . . . "complementOf" . "\n for complementOf(X, Y) read: X is the complement of Y; if something is in Y,\n then it's not in X, and vice versa.\n cf OIL NOT\n " . . . . "oneOf" . "\n for oneOf(C, L) read everything in C is one of the\n things in L;\n This lets us define classes by enumerating the members.\n cf OIL OneOf\n " . . . . "Restriction" . "\n something is in the class R if it satisfies the attached restrictions, \n and vice versa.\n " . . . "onProperty" . "\n for onProperty(R, P), read:\n R is a restricted with respect to property P.\n " . . . . "toClass" . "\n for onProperty(R, P) and toClass(R, X), read:\n i is in class R if and only if for all j, P(i, j) implies type(j, X).\n cf OIL ValueType\n " . . . . "hasValue" . "\n for onProperty(R, P) and hasValue(R, V), read:\n i is in class R if and only if P(i, V).\n cf OIL HasFiller\n " . . . "hasClass" . "\n for onProperty(R, P) and hasClass(R, X), read:\n i is in class R if and only if for some j, P(i, j) and type(j, X).\n cf OIL HasValue\n " . . . . "minCardinality" . "\n for onProperty(R, P) and minCardinality(R, n), read:\n i is in class R if and only if there are at least n distinct j with P(i, j).\n cf OIL MinCardinality\n " . . . . "maxCardinality" . "\n for onProperty(R, P) and maxCardinality(R, n), read:\n i is in class R if and only if there are at most n distinct j with P(i, j).\n cf OIL MaxCardinality\n " . . . . "cardinality" . "\n for onProperty(R, P) and cardinality(R, n), read:\n i is in class R if and only if there are exactly n distinct j with P(i, j).\n cf OIL Cardinality\n " . . . . "hasClassQ" . "\n property for specifying class restriction with cardinalityQ constraints\n " . . . . "minCardinality" . "\n for onProperty(R, P), minCardinalityQ(R, n) and hasClassQ(R, X), read:\n i is in class R if and only if there are at least n distinct j with P(i, j) \n and type(j, X).\n cf OIL MinCardinality\n " . . . . "maxCardinality" . "\n for onProperty(R, P), maxCardinalityQ(R, n) and hasClassQ(R, X), read:\n i is in class R if and only if there are at most n distinct j with P(i, j)\n and type(j, X).\n cf OIL MaxCardinality\n " . . . . "cardinality" . "\n for onProperty(R, P), cardinalityQ(R, n) and hasClassQ(R, X), read:\n i is in class R if and only if there are exactly n distinct j with P(i, j)\n and type(j, X).\n cf OIL Cardinality\n " . . . . "ObjectProperty" . "\n if P is an ObjectProperty, and P(x, y), then y is an object.\n " . . . "DatatypeProperty" . "\n if P is a DatatypeProperty, and P(x, y), then y is a data value.\n " . . . "inverseOf" . "\n for inverseOf(R, S) read: R is the inverse of S; i.e.\n if R(x, y) then S(y, x) and vice versa.\n cf OIL inverseRelationOf\n " . . . . "TransitiveProperty" . "\n if P is a TransitiveProperty, then if P(x, y) and P(y, z) then P(x, z).\n cf OIL TransitiveProperty.\n " . . . "UniqueProperty" . "\n compare with maxCardinality=1; e.g. integer successor:\n if P is a UniqueProperty, then if P(x, y) and P(x, z) then y=z.\n cf OIL FunctionalProperty.\n " . . . "UnambiguousProperty" . "\n if P is an UnambiguousProperty, then if P(x, y) and P(z, y) then x=z.\n aka injective. e.g. if firstBorne(m, Susan)\n and firstBorne(n, Susan) then m and n are the same.\n " . . . . . "\n the empty list; this used to be called Empty.\n " . . . . . . . "\n for item(L, I) read: I is an item in L; either first(L, I)\n or item(R, I) where rest(L, R).\n " . . . "Ontology" . "\n An Ontology is a document that describes\n a vocabulary of terms for communication between\n (human and) automated agents.\n " . . "versionInfo" . "\n generally, a string giving information about this\n version; e.g. RCS/CVS keywords\n " . . "imports" . "\n for imports(X, Y) read: X imports Y;\n i.e. X asserts the* contents of Y by reference;\n i.e. if imports(X, Y) and you believe X and Y says something,\n then you should believe it.\n Note: \"the contents\" is, in the general case,\n an il-formed definite description. Different\n interactions with a resource may expose contents\n that vary with time, data format, preferred language,\n requestor credentials, etc. So for \"the contents\",\n read \"any contents\".\n " . . . . . . . . . . . . . . . . . . . . . . . . . . . . raptor-1.4.21/tests/rdfxml/daml-oil.rdf0000644000175000017500000003756311113423026014667 00000000000000 $Id: daml+oil.daml,v 1.7 2001/06/06 01:38:21 mdean Exp $ Class The class of all "object" classes Datatype The class of all datatype classes Thing The most general (object) class in DAML. This is equal to the union of any class and its complement. Nothing the class with no things in it. equivalentTo for equivalentTo(X, Y), read X is an equivalent term to Y. sameClassAs for sameClassAs(X, Y), read X is an equivalent class to Y. cf OIL Equivalent samePropertyAs for samePropertyAs(P, R), read P is an equivalent property to R. sameIndividualAs for sameIndividualAs(a, b), read a is the same individual as b. disjointWith for disjointWith(X, Y) read: X and Y have no members in common. cf OIL Disjoint differentIndividualFrom for differentIndividualFrom(a, b), read a is not the same individual as b. unionOf for unionOf(X, Y) read: X is the union of the classes in the list Y; i.e. if something is in any of the classes in Y, it's in X, and vice versa. cf OIL OR disjointUnionOf for disjointUnionOf(X, Y) read: X is the disjoint union of the classes in the list Y: (a) for any c1 and c2 in Y, disjointWith(c1, c2), and (b) unionOf(X, Y). i.e. if something is in any of the classes in Y, it's in X, and vice versa. cf OIL disjoint-covered intersectionOf for intersectionOf(X, Y) read: X is the intersection of the classes in the list Y; i.e. if something is in all the classes in Y, then it's in X, and vice versa. cf OIL AND complementOf for complementOf(X, Y) read: X is the complement of Y; if something is in Y, then it's not in X, and vice versa. cf OIL NOT oneOf for oneOf(C, L) read everything in C is one of the things in L; This lets us define classes by enumerating the members. cf OIL OneOf Restriction something is in the class R if it satisfies the attached restrictions, and vice versa. onProperty for onProperty(R, P), read: R is a restricted with respect to property P. toClass for onProperty(R, P) and toClass(R, X), read: i is in class R if and only if for all j, P(i, j) implies type(j, X). cf OIL ValueType hasValue for onProperty(R, P) and hasValue(R, V), read: i is in class R if and only if P(i, V). cf OIL HasFiller hasClass for onProperty(R, P) and hasClass(R, X), read: i is in class R if and only if for some j, P(i, j) and type(j, X). cf OIL HasValue minCardinality for onProperty(R, P) and minCardinality(R, n), read: i is in class R if and only if there are at least n distinct j with P(i, j). cf OIL MinCardinality maxCardinality for onProperty(R, P) and maxCardinality(R, n), read: i is in class R if and only if there are at most n distinct j with P(i, j). cf OIL MaxCardinality cardinality for onProperty(R, P) and cardinality(R, n), read: i is in class R if and only if there are exactly n distinct j with P(i, j). cf OIL Cardinality hasClassQ property for specifying class restriction with cardinalityQ constraints minCardinality for onProperty(R, P), minCardinalityQ(R, n) and hasClassQ(R, X), read: i is in class R if and only if there are at least n distinct j with P(i, j) and type(j, X). cf OIL MinCardinality maxCardinality for onProperty(R, P), maxCardinalityQ(R, n) and hasClassQ(R, X), read: i is in class R if and only if there are at most n distinct j with P(i, j) and type(j, X). cf OIL MaxCardinality cardinality for onProperty(R, P), cardinalityQ(R, n) and hasClassQ(R, X), read: i is in class R if and only if there are exactly n distinct j with P(i, j) and type(j, X). cf OIL Cardinality ObjectProperty if P is an ObjectProperty, and P(x, y), then y is an object. DatatypeProperty if P is a DatatypeProperty, and P(x, y), then y is a data value. inverseOf for inverseOf(R, S) read: R is the inverse of S; i.e. if R(x, y) then S(y, x) and vice versa. cf OIL inverseRelationOf TransitiveProperty if P is a TransitiveProperty, then if P(x, y) and P(y, z) then P(x, z). cf OIL TransitiveProperty. UniqueProperty compare with maxCardinality=1; e.g. integer successor: if P is a UniqueProperty, then if P(x, y) and P(x, z) then y=z. cf OIL FunctionalProperty. UnambiguousProperty if P is an UnambiguousProperty, then if P(x, y) and P(z, y) then x=z. aka injective. e.g. if firstBorne(m, Susan) and firstBorne(n, Susan) then m and n are the same. the empty list; this used to be called Empty. for item(L, I) read: I is an item in L; either first(L, I) or item(R, I) where rest(L, R). Ontology An Ontology is a document that describes a vocabulary of terms for communication between (human and) automated agents. versionInfo generally, a string giving information about this version; e.g. RCS/CVS keywords imports for imports(X, Y) read: X imports Y; i.e. X asserts the* contents of Y by reference; i.e. if imports(X, Y) and you believe X and Y says something, then you should believe it. Note: "the contents" is, in the general case, an il-formed definite description. Different interactions with a resource may expose contents that vary with time, data format, preferred language, requestor credentials, etc. So for "the contents", read "any contents". raptor-1.4.21/tests/rdfxml/ex-59.nt0000644000175000017500000000010311113423026013662 00000000000000 "value" . raptor-1.4.21/tests/rdfxml/ex-60.nt0000644000175000017500000000015511113423026013661 00000000000000 . raptor-1.4.21/tests/rdfxml/bad-00.rdf0000644000175000017500000000066211113423026014122 00000000000000 raptor-1.4.21/tests/rdfxml/bad-01.rdf0000644000175000017500000000072611113423026014124 00000000000000 val1 val2 raptor-1.4.21/tests/rdfxml/bad-02.rdf0000644000175000017500000000052511113423026014122 00000000000000 bar1 bar2 raptor-1.4.21/tests/rdfxml/bad-03.rdf0000644000175000017500000000053611113423026014125 00000000000000 bar1 bar2 raptor-1.4.21/tests/rdfxml/bad-04.rdf0000644000175000017500000000044411113423026014124 00000000000000 bar2 raptor-1.4.21/tests/rdfxml/bad-05.rdf0000644000175000017500000000066411113423026014131 00000000000000 raptor-1.4.21/tests/rdfxml/bad-06.rdf0000644000175000017500000000061411113423026014125 00000000000000 val raptor-1.4.21/tests/rdfxml/bad-07.rdf0000644000175000017500000000067011113423026014130 00000000000000 val raptor-1.4.21/tests/rdfxml/bad-08.rdf0000644000175000017500000000073411113423026014132 00000000000000 val2 raptor-1.4.21/tests/rdfxml/bad-09.rdf0000644000175000017500000000100011113423026014116 00000000000000 raptor-1.4.21/tests/rdfxml/bad-10.rdf0000644000175000017500000000000011113423026014105 00000000000000raptor-1.4.21/tests/rdfxml/bad-11.rdf0000644000175000017500000000056311113423026014124 00000000000000 raptor-1.4.21/tests/rdfxml/bad-12.rdf0000644000175000017500000000040011113423026014113 00000000000000 raptor-1.4.21/tests/rdfxml/bad-13.rdf0000644000175000017500000000050711113423026014124 00000000000000 raptor-1.4.21/tests/rdfxml/bad-14.rdf0000644000175000017500000000047211113423026014126 00000000000000 raptor-1.4.21/tests/rdfxml/bad-15.rdf0000644000175000017500000000103211113423026014120 00000000000000 raptor-1.4.21/tests/rdfxml/bad-16.rdf0000644000175000017500000000103711113423026014126 00000000000000 raptor-1.4.21/tests/rdfxml/bad-17.rdf0000644000175000017500000000111311113423026014122 00000000000000 raptor-1.4.21/tests/rdfxml/bad-18.rdf0000644000175000017500000000031211113423026014123 00000000000000 raptor-1.4.21/tests/rdfxml/bad-19.rdf0000644000175000017500000000044511113423026014133 00000000000000 content raptor-1.4.21/tests/rdfxml/bad-20.rdf0000644000175000017500000000030011113423026014111 00000000000000 raptor-1.4.21/tests/rdfxml/bad-21.rdf0000644000175000017500000000055111113423026014122 00000000000000 foo raptor-1.4.21/tests/rdfxml/bad-22.rdf0000644000175000017500000000045011113423026014121 00000000000000 raptor-1.4.21/tests/rdfxml/bad-23.rdf0000644000175000017500000000044711113423026014130 00000000000000 raptor-1.4.21/tests/rdfxml/rdfs-namespace.out0000644000175000017500000004416611113423026016112 00000000000000 . . "Resource"@en . "The class resource, everything." . . . "type"@en . "Indicates membership of a class" . . . . . "Class"@en . "The concept of Class" . . . . "subClassOf"@en . "Indicates membership of a class" . . . . . "subPropertyOf"@en . "Indicates specialization of properties" . . . . . "Property"@en . "The concept of a property." . . . . "comment"@en . "Use this for descriptions" . . . . . "label"@en . "Provides a human-readable version of a resource name." . . . . . "domain"@en . "A domain class for a property type" . . . . . "range"@en . "A range class for a property type" . . . . . "seeAlso"@en . "A resource that provides information about the subject resource" . . . . . . . "isDefinedBy"@en . "Indicates the namespace of a resource" . . . . . "Literal"@en . "This represents the set of atomic values, eg. textual strings." . . . "Statement"@en . . "The class of RDF statements." . . . "subject"@en . "The subject of an RDF statement." . . . . . "predicate"@en . "the predicate of an RDF statement." . . . . . "object"@en . "The object of an RDF statement." . . . . "Container"@en . . "This represents the set Containers." . . . "Bag"@en . "An unordered collection."@en . . . . "Seq"@en . "An ordered collection."@en . . . . "Alt"@en . "A collection of alternatives."@en . . . . "ContainerMembershipProperty"@en . "The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'." . . . . "member"@en . "a member of a container" . . . . "value"@en . "Identifies the principal value (usually a string) of a property when the property value is a structured resource" . . . raptor-1.4.21/tests/rdfxml/rdfs-namespace.rdf0000644000175000017500000002353111113423026016047 00000000000000 Resource The class resource, everything. type Indicates membership of a class Class The concept of Class subClassOf Indicates membership of a class subPropertyOf Indicates specialization of properties Property The concept of a property. comment Use this for descriptions label Provides a human-readable version of a resource name. domain A domain class for a property type range A range class for a property type seeAlso A resource that provides information about the subject resource isDefinedBy Indicates the namespace of a resource Literal This represents the set of atomic values, eg. textual strings. Statement The class of RDF statements. subject The subject of an RDF statement. predicate the predicate of an RDF statement. object The object of an RDF statement. Container This represents the set Containers. Bag An unordered collection. Seq An ordered collection. Alt A collection of alternatives. ContainerMembershipProperty The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'. member a member of a container value Identifies the principal value (usually a string) of a property when the property value is a structured resource raptor-1.4.21/tests/rdfxml/warn-00.out0000644000175000017500000000122511113423026014373 00000000000000 . "text" . _:genid1 . _:genid1 . _:genid1 . _:genid1 . _:genid1 "text" . raptor-1.4.21/tests/rdfxml/warn-00.rdf0000644000175000017500000000060011113423026014333 00000000000000 text raptor-1.4.21/tests/rdfxml/warn-02.out0000644000175000017500000000000011113423026014363 00000000000000raptor-1.4.21/tests/rdfxml/warn-02.rdf0000644000175000017500000000040311113423026014336 00000000000000 raptor-1.4.21/tests/rdfxml/warn-04.out0000644000175000017500000000030011113423026014370 00000000000000 . "bar" . raptor-1.4.21/tests/rdfxml/warn-04.rdf0000644000175000017500000000047411113423026014350 00000000000000 bar raptor-1.4.21/tests/rdfxml/warn-05.out0000644000175000017500000000012211113423026014373 00000000000000 "bar" . raptor-1.4.21/tests/rdfxml/warn-05.rdf0000644000175000017500000000043111113423026014342 00000000000000 bar raptor-1.4.21/tests/rdfxml/warn-06.out0000644000175000017500000000012311113423026014375 00000000000000 "blah" . raptor-1.4.21/tests/rdfxml/warn-06.rdf0000644000175000017500000000042411113423026014345 00000000000000 raptor-1.4.21/tests/rdfxml/warn-07.out0000644000175000017500000000133411113423026014403 00000000000000 "\n prop1name\n "^^ . "\n \n \n \n "^^ . raptor-1.4.21/tests/rdfxml/warn-07.rdf0000644000175000017500000000126011113423026014345 00000000000000 prop1name raptor-1.4.21/tests/rdfxml/ex-38-rdfxmla.out0000644000175000017500000000134611302562553015523 00000000000000 raptor-1.4.21/tests/rdfxml/Makefile.am0000644000175000017500000003213711303121536014522 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDF/XML tests # # Copyright (C) 2000-2008, David Beckett http://purl.org/net/dajobe/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # These are errors in strict mode, warnings in lax - for now RDF_BAGID_TEST_FILES=ex-03.rdf ex-42.rdf ex-43.rdf ex-44.rdf ex-45.rdf RDF_TEST_FILES=ex-00.rdf ex-01.rdf ex-02.rdf ex-04.rdf ex-05.rdf \ ex-06.rdf ex-07.rdf ex-08.rdf ex-09.rdf ex-10.rdf ex-11.rdf ex-12.rdf \ ex-13.rdf ex-14.rdf ex-15.rdf ex-16.rdf ex-17.rdf ex-18.rdf \ ex-20.rdf ex-21.rdf ex-22.rdf ex-23.rdf ex-24.rdf ex-25.rdf ex-26.rdf \ ex-27.rdf ex-28.rdf ex-29.rdf ex-30.rdf ex-31.rdf ex-32.rdf ex-33.rdf \ ex-34.rdf ex-35.rdf ex-36.rdf ex-37.rdf ex-38.rdf ex-39.rdf ex-40.rdf \ ex-41.rdf ex-46.rdf ex-47.rdf ex-48.rdf ex-49.rdf ex-51.rdf \ ex-53.rdf ex-54.rdf ex-56.rdf ex-57.rdf ex-58.rdf ex-61.rdf \ 22-rdf-syntax-ns.rdf rdfs-namespace.rdf rdf-schema.rdf \ owl-schema.rdf daml-oil.rdf wine.rdf # ex-55 fails with libxml2 # libxml2 bug report: http://bugs.gnome.org/show_bug.cgi?id=159219 RDF_MAYFAIL_XML_TEST_FILES=ex-55.rdf RDF_BAD_TEST_FILES=bad-00.rdf bad-01.rdf bad-02.rdf bad-03.rdf \ bad-04.rdf bad-05.rdf bad-06.rdf bad-07.rdf bad-08.rdf bad-09.rdf \ bad-10.rdf bad-11.rdf bad-12.rdf bad-13.rdf bad-14.rdf bad-18.rdf \ bad-19.rdf bad-20.rdf bad-21.rdf bad-22.rdf bad-23.rdf RDF_BAD_NFC_TEST_FILES=bad-15.rdf bad-16.rdf bad-17.rdf RDF_WARN_TEST_FILES=warn-00.rdf warn-02.rdf warn-04.rdf \ warn-05.rdf warn-06.rdf warn-07.rdf \ $(RDF_BAGID_TEST_FILES) RDF_ASSUME_TEST_FILES=ex-19.rdf RDF_SCAN_TEST_FILES=ex-52.svg RDF_OUT_FILES=ex-00.out ex-01.out ex-02.out ex-03.out ex-04.out ex-05.out \ ex-06.out ex-07.out ex-08.out ex-09.out ex-10.out ex-11.out ex-12.out \ ex-13.out ex-14.out ex-15.out ex-16.out ex-17.out ex-18.out \ ex-20.out ex-21.out ex-22.out ex-23.out ex-24.out ex-25.out ex-26.out \ ex-27.out ex-28.out ex-29.out ex-30.out ex-31.out ex-32.out ex-33.out \ ex-34.out ex-35.out ex-36.out ex-37.out ex-38.out ex-39.out ex-40.out \ ex-41.out ex-42.out ex-43.out ex-44.out ex-45.out ex-46.out ex-47.out \ ex-48.out ex-49.out ex-51.out ex-53.out ex-54.out ex-55.out ex-56.out \ ex-57.out ex-58.out ex-61.out \ 22-rdf-syntax-ns.out rdfs-namespace.out rdf-schema.out \ owl-schema.out daml-oil.out wine.out RDF_HACK_OUT_FILES=ex-38-rdfxmla.out RDF_MAYFAIL_XML_OUT_FILES=ex-55.rdf RDF_WARN_OUT_FILES=warn-00.out warn-02.out warn-04.out \ warn-05.out warn-06.out warn-07.out RDF_ASSUME_OUT_FILES=ex-19.out RDF_SCAN_OUT_FILES=ex-52.out RDF_SERIALIZE_TEST_FILES=ex-59.nt ex-60.nt RDF_SERIALIZE_OUT_FILES=ex-59.rdf ex-60.rdf # Used to make N-triples output consistent BASE_URI=http://librdf.org/raptor/tests/ # for 22-rdf-syntax-ns.rdf RDF_NS_URI=http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.rdf (2002-04-30) and rdf-schema.rdf (2000-03-27) RDFS_NS_URI=http://www.w3.org/2000/01/rdf-schema OWL_DOC_URI="http://www.w3.org/2002/07/owl" DAML_OIL_DOC_URI="http://www.daml.org/2001/03/daml+oil" OWL_WINE_URI="http://www.w3.org/TR/owl-guide/wine.rdf" EXTRA_DIST = \ $(RDF_TEST_FILES) \ $(RDF_MAYFAIL_XML_TEST_FILES) \ $(RDF_ASSUME_TEST_FILES) \ $(RDF_SCAN_TEST_FILES) \ $(RDF_BAD_TEST_FILES) \ $(RDF_BAD_NFC_TEST_FILES) \ $(RDF_WARN_TEST_FILES) \ $(RDF_OUT_FILES) \ $(RDF_MAYFAIL_XML_OUT_FILES) \ $(RDF_ASSUME_OUT_FILES) \ $(RDF_SCAN_OUT_FILES) \ $(RDF_WARN_OUT_FILES) \ $(RDF_SERIALIZE_TEST_FILES) \ $(RDF_SERIALIZE_OUT_FILES) \ $(RDF_HACK_OUT_FILES) build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: build-rapper \ check-rdf check-mayfail-xml-rdf check-assume-rdf check-scan-rdf \ check-bad-rdf check-bad-nfc-rdf check-warn-rdf \ check-rdfdiff check-rdfxml check-rdfxmla check-rdf: build-rapper $(RDF_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ if test $$name = 22-rdf-syntax-ns; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace -o $$name = rdf-schema; then \ baseuri=$(RDFS_NS_URI); \ elif test $$name = owl-schema; then \ baseuri=$(OWL_DOC_URI); \ elif test $$name = daml-oil; then \ baseuri=$(DAML_OIL_DOC_URI); \ elif test $$name = wine; then \ baseuri=$(OWL_WINE_URI); \ else \ baseuri=$(BASE_URI)$$name.rdf; \ fi; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(ECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(ECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(ECHO) "ok"; \ fi; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result check-assume-rdf: build-rapper $(RDF_ASSUME_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdf/xml known by context"; \ for test in $(RDF_ASSUME_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -a -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ done; \ set -e; exit $$result check-scan-rdf: build-rapper $(RDF_SCAN_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdf/xml inside other XML"; \ for test in $(RDF_SCAN_TEST_FILES); do \ name=`echo $$test | sed -e 's/\..*//'` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -s -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ done; \ set -e; exit $$result check-mayfail-xml-rdf: build-rapper $(RDF_MAYFAIL_XML_TEST_FILES) @set +e; \ $(ECHO) "Testing rdf/xml (may fail due to XML parser bugs)"; \ for test in $(RDF_MAYFAIL_XML_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(ECHO) FAILED returned status $$status; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(ECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(ECHO) "ok"; \ fi; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit 0 check-bad-rdf: build-rapper $(RDF_BAD_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing that bad rdf/xml fails"; \ for test in $(RDF_BAD_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(ECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(ECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-bad-nfc-rdf: build-rapper $(RDF_BAD_NFC_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing that rdf/xml with bad Unicode NFC fails"; \ for test in $(RDF_BAD_NFC_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -m strict -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(ECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(ECHO) "FAILED - parsing succeeded but should have failed (NFC test)"; \ cat $$name.res; result=0; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-warn-rdf: build-rapper $(RDF_WARN_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdf/xml with warnings"; \ for test in $(RDF_WARN_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "FAILED - parsing failed when should have warned"; \ cat $$name.res; grep Error $$name.err; result=1; \ elif test $$status -eq 2 ; then \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-rdfdiff: build-rdfdiff $(RDF_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdfdiff with legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rdfdiff $(srcdir)/$$test $(srcdir)/$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ cat $$name.err; result=1; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result check-rdfxml: build-rapper $(RDF_SERIALIZE_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdfxml serialization with legal rdf/xml"; \ for test in $(RDF_SERIALIZE_TEST_FILES); do \ name=`basename $$test .nt` ; \ baseuri=-; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i ntriples -o rdfxml $(srcdir)/$$test $$baseuri > $$name-rdfxml.rdf 2> $$name.err; \ if cmp $(srcdir)/$$name.rdf $$name-rdfxml.rdf >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.rdf $$name-rdfxml.rdf; result=1; \ fi; \ rm -f $$name-rdfxml.rdf $$name.res $$name.err; \ done; \ set -e; exit $$result check-rdfxmla: build-rdfdiff build-rapper $(RDF_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdfxml-abbrev serialization with legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=-; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o rdfxml-abbrev $(srcdir)/$$test $$baseuri > $$name-rdfxmla.rdf 2> $$name.err; \ status1=$$?; \ if test $$test = ex-38.rdf; then \ diff $(srcdir)/ex-38-rdfxmla.out $$name-rdfxmla.rdf > $$name.res 2> $$name.err; \ status2=$$?; \ else \ $(top_builddir)/utils/rdfdiff $(srcdir)/$$test $$name-rdfxmla.rdf > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ echo $(top_builddir)/utils/rapper -q -o rdfxml-abbrev $(srcdir)/$$test $$baseuri '>' $$name-rdfxmla.rdf; \ status1=$$?; \ echo $(top_builddir)/utils/rdfdiff $(srcdir)/$$test $$name-rdfxmla.rdf '>' $$name.res; \ echo "rapper + rdfdiff output:"; cat $$name.err; result=1; \ fi; \ rm -f $$name-rdfxmla.rdf $$name.res $$name.err; \ done; \ set -e; exit $$result print-rdf-test-files: @echo $(RDF_TEST_FILES) | tr ' ' '\012' raptor-1.4.21/tests/rdfxml/Makefile.in0000644000175000017500000005703011330704764014544 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDF/XML tests # # Copyright (C) 2000-2008, David Beckett http://purl.org/net/dajobe/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/rdfxml DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # These are errors in strict mode, warnings in lax - for now RDF_BAGID_TEST_FILES = ex-03.rdf ex-42.rdf ex-43.rdf ex-44.rdf ex-45.rdf RDF_TEST_FILES = ex-00.rdf ex-01.rdf ex-02.rdf ex-04.rdf ex-05.rdf \ ex-06.rdf ex-07.rdf ex-08.rdf ex-09.rdf ex-10.rdf ex-11.rdf ex-12.rdf \ ex-13.rdf ex-14.rdf ex-15.rdf ex-16.rdf ex-17.rdf ex-18.rdf \ ex-20.rdf ex-21.rdf ex-22.rdf ex-23.rdf ex-24.rdf ex-25.rdf ex-26.rdf \ ex-27.rdf ex-28.rdf ex-29.rdf ex-30.rdf ex-31.rdf ex-32.rdf ex-33.rdf \ ex-34.rdf ex-35.rdf ex-36.rdf ex-37.rdf ex-38.rdf ex-39.rdf ex-40.rdf \ ex-41.rdf ex-46.rdf ex-47.rdf ex-48.rdf ex-49.rdf ex-51.rdf \ ex-53.rdf ex-54.rdf ex-56.rdf ex-57.rdf ex-58.rdf ex-61.rdf \ 22-rdf-syntax-ns.rdf rdfs-namespace.rdf rdf-schema.rdf \ owl-schema.rdf daml-oil.rdf wine.rdf # ex-55 fails with libxml2 # libxml2 bug report: http://bugs.gnome.org/show_bug.cgi?id=159219 RDF_MAYFAIL_XML_TEST_FILES = ex-55.rdf RDF_BAD_TEST_FILES = bad-00.rdf bad-01.rdf bad-02.rdf bad-03.rdf \ bad-04.rdf bad-05.rdf bad-06.rdf bad-07.rdf bad-08.rdf bad-09.rdf \ bad-10.rdf bad-11.rdf bad-12.rdf bad-13.rdf bad-14.rdf bad-18.rdf \ bad-19.rdf bad-20.rdf bad-21.rdf bad-22.rdf bad-23.rdf RDF_BAD_NFC_TEST_FILES = bad-15.rdf bad-16.rdf bad-17.rdf RDF_WARN_TEST_FILES = warn-00.rdf warn-02.rdf warn-04.rdf \ warn-05.rdf warn-06.rdf warn-07.rdf \ $(RDF_BAGID_TEST_FILES) RDF_ASSUME_TEST_FILES = ex-19.rdf RDF_SCAN_TEST_FILES = ex-52.svg RDF_OUT_FILES = ex-00.out ex-01.out ex-02.out ex-03.out ex-04.out ex-05.out \ ex-06.out ex-07.out ex-08.out ex-09.out ex-10.out ex-11.out ex-12.out \ ex-13.out ex-14.out ex-15.out ex-16.out ex-17.out ex-18.out \ ex-20.out ex-21.out ex-22.out ex-23.out ex-24.out ex-25.out ex-26.out \ ex-27.out ex-28.out ex-29.out ex-30.out ex-31.out ex-32.out ex-33.out \ ex-34.out ex-35.out ex-36.out ex-37.out ex-38.out ex-39.out ex-40.out \ ex-41.out ex-42.out ex-43.out ex-44.out ex-45.out ex-46.out ex-47.out \ ex-48.out ex-49.out ex-51.out ex-53.out ex-54.out ex-55.out ex-56.out \ ex-57.out ex-58.out ex-61.out \ 22-rdf-syntax-ns.out rdfs-namespace.out rdf-schema.out \ owl-schema.out daml-oil.out wine.out RDF_HACK_OUT_FILES = ex-38-rdfxmla.out RDF_MAYFAIL_XML_OUT_FILES = ex-55.rdf RDF_WARN_OUT_FILES = warn-00.out warn-02.out warn-04.out \ warn-05.out warn-06.out warn-07.out RDF_ASSUME_OUT_FILES = ex-19.out RDF_SCAN_OUT_FILES = ex-52.out RDF_SERIALIZE_TEST_FILES = ex-59.nt ex-60.nt RDF_SERIALIZE_OUT_FILES = ex-59.rdf ex-60.rdf # Used to make N-triples output consistent BASE_URI = http://librdf.org/raptor/tests/ # for 22-rdf-syntax-ns.rdf RDF_NS_URI = http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.rdf (2002-04-30) and rdf-schema.rdf (2000-03-27) RDFS_NS_URI = http://www.w3.org/2000/01/rdf-schema OWL_DOC_URI = "http://www.w3.org/2002/07/owl" DAML_OIL_DOC_URI = "http://www.daml.org/2001/03/daml+oil" OWL_WINE_URI = "http://www.w3.org/TR/owl-guide/wine.rdf" EXTRA_DIST = \ $(RDF_TEST_FILES) \ $(RDF_MAYFAIL_XML_TEST_FILES) \ $(RDF_ASSUME_TEST_FILES) \ $(RDF_SCAN_TEST_FILES) \ $(RDF_BAD_TEST_FILES) \ $(RDF_BAD_NFC_TEST_FILES) \ $(RDF_WARN_TEST_FILES) \ $(RDF_OUT_FILES) \ $(RDF_MAYFAIL_XML_OUT_FILES) \ $(RDF_ASSUME_OUT_FILES) \ $(RDF_SCAN_OUT_FILES) \ $(RDF_WARN_OUT_FILES) \ $(RDF_SERIALIZE_TEST_FILES) \ $(RDF_SERIALIZE_OUT_FILES) \ $(RDF_HACK_OUT_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/rdfxml/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/rdfxml/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: build-rapper \ check-rdf check-mayfail-xml-rdf check-assume-rdf check-scan-rdf \ check-bad-rdf check-bad-nfc-rdf check-warn-rdf \ check-rdfdiff check-rdfxml check-rdfxmla check-rdf: build-rapper $(RDF_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ if test $$name = 22-rdf-syntax-ns; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace -o $$name = rdf-schema; then \ baseuri=$(RDFS_NS_URI); \ elif test $$name = owl-schema; then \ baseuri=$(OWL_DOC_URI); \ elif test $$name = daml-oil; then \ baseuri=$(DAML_OIL_DOC_URI); \ elif test $$name = wine; then \ baseuri=$(OWL_WINE_URI); \ else \ baseuri=$(BASE_URI)$$name.rdf; \ fi; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(ECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(ECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(ECHO) "ok"; \ fi; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result check-assume-rdf: build-rapper $(RDF_ASSUME_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdf/xml known by context"; \ for test in $(RDF_ASSUME_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -a -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ done; \ set -e; exit $$result check-scan-rdf: build-rapper $(RDF_SCAN_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdf/xml inside other XML"; \ for test in $(RDF_SCAN_TEST_FILES); do \ name=`echo $$test | sed -e 's/\..*//'` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -s -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ done; \ set -e; exit $$result check-mayfail-xml-rdf: build-rapper $(RDF_MAYFAIL_XML_TEST_FILES) @set +e; \ $(ECHO) "Testing rdf/xml (may fail due to XML parser bugs)"; \ for test in $(RDF_MAYFAIL_XML_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(ECHO) FAILED returned status $$status; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(ECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(ECHO) "ok"; \ fi; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit 0 check-bad-rdf: build-rapper $(RDF_BAD_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing that bad rdf/xml fails"; \ for test in $(RDF_BAD_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(ECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(ECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-bad-nfc-rdf: build-rapper $(RDF_BAD_NFC_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing that rdf/xml with bad Unicode NFC fails"; \ for test in $(RDF_BAD_NFC_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -m strict -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(ECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(ECHO) "FAILED - parsing succeeded but should have failed (NFC test)"; \ cat $$name.res; result=0; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-warn-rdf: build-rapper $(RDF_WARN_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdf/xml with warnings"; \ for test in $(RDF_WARN_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "FAILED - parsing failed when should have warned"; \ cat $$name.res; grep Error $$name.err; result=1; \ elif test $$status -eq 2 ; then \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-rdfdiff: build-rdfdiff $(RDF_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdfdiff with legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rdfdiff $(srcdir)/$$test $(srcdir)/$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ cat $$name.err; result=1; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result check-rdfxml: build-rapper $(RDF_SERIALIZE_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdfxml serialization with legal rdf/xml"; \ for test in $(RDF_SERIALIZE_TEST_FILES); do \ name=`basename $$test .nt` ; \ baseuri=-; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i ntriples -o rdfxml $(srcdir)/$$test $$baseuri > $$name-rdfxml.rdf 2> $$name.err; \ if cmp $(srcdir)/$$name.rdf $$name-rdfxml.rdf >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.rdf $$name-rdfxml.rdf; result=1; \ fi; \ rm -f $$name-rdfxml.rdf $$name.res $$name.err; \ done; \ set -e; exit $$result check-rdfxmla: build-rdfdiff build-rapper $(RDF_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing rdfxml-abbrev serialization with legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=-; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o rdfxml-abbrev $(srcdir)/$$test $$baseuri > $$name-rdfxmla.rdf 2> $$name.err; \ status1=$$?; \ if test $$test = ex-38.rdf; then \ diff $(srcdir)/ex-38-rdfxmla.out $$name-rdfxmla.rdf > $$name.res 2> $$name.err; \ status2=$$?; \ else \ $(top_builddir)/utils/rdfdiff $(srcdir)/$$test $$name-rdfxmla.rdf > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ echo $(top_builddir)/utils/rapper -q -o rdfxml-abbrev $(srcdir)/$$test $$baseuri '>' $$name-rdfxmla.rdf; \ status1=$$?; \ echo $(top_builddir)/utils/rdfdiff $(srcdir)/$$test $$name-rdfxmla.rdf '>' $$name.res; \ echo "rapper + rdfdiff output:"; cat $$name.err; result=1; \ fi; \ rm -f $$name-rdfxmla.rdf $$name.res $$name.err; \ done; \ set -e; exit $$result print-rdf-test-files: @echo $(RDF_TEST_FILES) | tr ' ' '\012' # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/tests/rdfxml/rdf-schema.out0000644000175000017500000004227411113423026015231 00000000000000 . "Resource"@en . "Ressource"@fr . "The most general class" . . "type"@en . "type"@fr . "Indicates membership of a class" . . . "comment"@en . "commentaire"@fr . . "Use this for descriptions" . . . . "label"@en . "label"@fr . . "Provides a human-readable version of a resource name." . . . "Class"@en . "Classe"@fr . "The concept of Class" . . . "subClassOf"@en . "sousClasseDe"@fr . "Indicates membership of a class" . . . . "subPropertyOf"@en . "sousPropri\u00E9t\u00E9De"@fr . "Indicates specialization of properties" . . . . "seeAlso"@en . "voirAussi"@fr . "Indicates a resource that provides information about the subject resource." . . . . . . "isDefinedBy"@en . "esD\u00E9finiPar"@fr . "Indicates a resource containing and defining the subject resource." . . . . "ConstraintResource"@en . "RessourceContrainte"@fr . . . "Resources used to express RDF Schema constraints." . . "ConstraintProperty"@en . "Propri\u00E9t\u00E9Contrainte"@fr . . . "Properties used to express RDF Schema constraints." . . "domain"@en . "domaine"@fr . "This is how we associate a class with properties that its instances can have" . . "range"@en . "\u00E9tendue"@fr . "Properties that can be used in a schema to provide constraints" . . . . "Property"@en . "Propri\u00E9t\u00E9"@fr . "The concept of a property." . . . "Literal"@en . "Litt\u00E9ral"@fr . . "This represents the set of atomic values, eg. textual strings." . . "Statement"@en . "D\u00E9claration"@fr . . "This represents the set of reified statements." . . "subject"@en . "sujet"@fr . . . . "predicate"@en . "pr\u00E9dicat"@fr . . . . . "object"@en . "objet"@fr . . . "Container"@en . "Enveloppe"@fr . . "This represents the set Containers." . . "Bag"@en . "Ensemble"@fr . . . "Sequence"@en . "S\u00E9quence"@fr . . . "Alt"@en . "Choix"@fr . . . "ContainerMembershipProperty"@en . . . "object"@en . "value"@fr . . raptor-1.4.21/tests/rdfxml/rdf-schema.rdf0000644000175000017500000001731411113423026015172 00000000000000 Resource Ressource The most general class type type Indicates membership of a class comment commentaire Use this for descriptions label label Provides a human-readable version of a resource name. Class Classe The concept of Class subClassOf sousClasseDe Indicates membership of a class subPropertyOf sousPropriétéDe Indicates specialization of properties seeAlso voirAussi Indicates a resource that provides information about the subject resource. isDefinedBy esDéfiniPar Indicates a resource containing and defining the subject resource. ConstraintResource RessourceContrainte Resources used to express RDF Schema constraints. ConstraintProperty PropriétéContrainte Properties used to express RDF Schema constraints. domain domaine This is how we associate a class with properties that its instances can have range étendue Properties that can be used in a schema to provide constraints Property Propriété The concept of a property. Literal Littéral This represents the set of atomic values, eg. textual strings. Statement Déclaration This represents the set of reified statements. subject sujet predicate prédicat object objet Container Enveloppe This represents the set Containers. Bag Ensemble Sequence Séquence Alt Choix ContainerMembershipProperty object value raptor-1.4.21/tests/rdfxml/ex-00.out0000644000175000017500000000012411113423026014035 00000000000000_:genid1 . raptor-1.4.21/tests/rdfxml/ex-00.rdf0000644000175000017500000000031211113423026014000 00000000000000 raptor-1.4.21/tests/rdfxml/ex-01.out0000644000175000017500000000025011113423026014036 00000000000000_:genid1 . _:genid2 . raptor-1.4.21/tests/rdfxml/ex-01.rdf0000644000175000017500000000032711113423026014007 00000000000000 raptor-1.4.21/tests/rdfxml/ex-02.out0000644000175000017500000000000011113423026014030 00000000000000raptor-1.4.21/tests/rdfxml/ex-02.rdf0000644000175000017500000000052411113423026014007 00000000000000 raptor-1.4.21/tests/rdfxml/ex-03.out0000644000175000017500000000020111113423026014034 00000000000000 . raptor-1.4.21/tests/rdfxml/ex-03.rdf0000644000175000017500000000071011113423026014005 00000000000000 raptor-1.4.21/tests/rdfxml/ex-04.out0000644000175000017500000000035411113423026014046 00000000000000_:genid1 . _:genid1 "a" . _:genid1 "b" . raptor-1.4.21/tests/rdfxml/ex-04.rdf0000644000175000017500000000027411113423026014013 00000000000000 raptor-1.4.21/tests/rdfxml/ex-05.out0000644000175000017500000000044711113423026014052 00000000000000_:genid1 . _:genid1 "a" . _:genid1 "b" . _:genid1 "foo" . raptor-1.4.21/tests/rdfxml/ex-05.rdf0000644000175000017500000000042111113423026014006 00000000000000 raptor-1.4.21/tests/rdfxml/ex-06.out0000644000175000017500000000071611113423026014052 00000000000000_:genid1 . _:genid1 . _:genid1 . _:genid1 . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-06.rdf0000644000175000017500000000076311113423026014020 00000000000000 raptor-1.4.21/tests/rdfxml/ex-07.out0000644000175000017500000000050511113423026014047 00000000000000_:genid1 . _:genid1 "some literal text"^^ . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-07.rdf0000644000175000017500000000062111113423026014012 00000000000000 some literal text raptor-1.4.21/tests/rdfxml/ex-08.out0000644000175000017500000000071311113423026014051 00000000000000 "err" . "hmm" . "umm" . "apple" . "banana" . "pear" . raptor-1.4.21/tests/rdfxml/ex-08.rdf0000644000175000017500000000066411113423026014022 00000000000000 raptor-1.4.21/tests/rdfxml/ex-09.out0000644000175000017500000000042511113423026014052 00000000000000 . "content" . "blah" . raptor-1.4.21/tests/rdfxml/ex-09.rdf0000644000175000017500000000043111113423026014013 00000000000000 content blah raptor-1.4.21/tests/rdfxml/ex-10.out0000644000175000017500000000104411113423026014040 00000000000000 . _:genid1 . _:genid1 . _:genid1 . _:genid1 . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-10.rdf0000644000175000017500000000100611113423026014002 00000000000000 raptor-1.4.21/tests/rdfxml/ex-11.out0000644000175000017500000000045611113423026014047 00000000000000 "\n some markup\n blah\n "^^ . raptor-1.4.21/tests/rdfxml/ex-11.rdf0000644000175000017500000000075511113423026014015 00000000000000 some markup blah raptor-1.4.21/tests/rdfxml/ex-12.out0000644000175000017500000000155111113423026014045 00000000000000_:genid1 . _:genid1 . _:genid2 . _:genid2 . _:genid1 _:genid2 . _:genid3 . _:genid3 . _:genid2 _:genid3 . _:genid3 . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-12.rdf0000644000175000017500000000106111113423026014005 00000000000000 raptor-1.4.21/tests/rdfxml/ex-13.out0000644000175000017500000000032611113423026014045 00000000000000_:genid2 "jd8734djr08347jyd4" . _:genid1 _:genid2 . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-13.rdf0000644000175000017500000000117111113423026014010 00000000000000 jd8734djr08347jyd4 raptor-1.4.21/tests/rdfxml/ex-14.out0000644000175000017500000000062711113423026014052 00000000000000 . "John Doe" . "New York" . "19010101" . raptor-1.4.21/tests/rdfxml/ex-14.rdf0000644000175000017500000000116111113423026014010 00000000000000 John Doe New York 19010101 raptor-1.4.21/tests/rdfxml/ex-15.out0000644000175000017500000000016311113423026014046 00000000000000 . raptor-1.4.21/tests/rdfxml/ex-15.rdf0000644000175000017500000000046411113423026014016 00000000000000 raptor-1.4.21/tests/rdfxml/ex-16.out0000644000175000017500000000014311113423026014045 00000000000000 "the content" . raptor-1.4.21/tests/rdfxml/ex-16.rdf0000644000175000017500000000044511113423026014016 00000000000000 raptor-1.4.21/tests/rdfxml/ex-17.out0000644000175000017500000000010411113423026014043 00000000000000 "" . raptor-1.4.21/tests/rdfxml/ex-17.rdf0000644000175000017500000000041711113423026014016 00000000000000 raptor-1.4.21/tests/rdfxml/ex-18.out0000644000175000017500000000010711113423026014047 00000000000000 "Example" . raptor-1.4.21/tests/rdfxml/ex-18.rdf0000644000175000017500000000045311113423026014017 00000000000000 Example raptor-1.4.21/tests/rdfxml/ex-19.out0000644000175000017500000000015311113423026014051 00000000000000 . raptor-1.4.21/tests/rdfxml/ex-19.rdf0000644000175000017500000000025611113423026014021 00000000000000 raptor-1.4.21/tests/rdfxml/ex-20.out0000644000175000017500000000016611113423026014045 00000000000000 . raptor-1.4.21/tests/rdfxml/ex-20.rdf0000644000175000017500000000046411113423026014012 00000000000000 raptor-1.4.21/tests/rdfxml/ex-21.out0000644000175000017500000000103011113423026014035 00000000000000 "val1" . "val2" . . "val1" . _:genid1 . _:genid1 "http://example.org/thing3" . _:genid1 "val1" . raptor-1.4.21/tests/rdfxml/ex-21.rdf0000644000175000017500000000072311113423026014011 00000000000000 raptor-1.4.21/tests/rdfxml/ex-22.out0000644000175000017500000000066411113423026014052 00000000000000_:genid1 . . "value" . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-22.rdf0000644000175000017500000000046611113423026014016 00000000000000 value raptor-1.4.21/tests/rdfxml/ex-23.out0000644000175000017500000000113011113423026014040 00000000000000_:genid1 . _:genid3 . _:genid2 _:genid3 . _:genid4 . _:genid2 _:genid4 . _:genid5 . _:genid2 _:genid5 . _:genid1 _:genid2 . raptor-1.4.21/tests/rdfxml/ex-23.rdf0000644000175000017500000000150311113423026014010 00000000000000 raptor-1.4.21/tests/rdfxml/ex-24.out0000644000175000017500000000076211113423026014053 00000000000000_:genid2 . _:genid2 _:genid1 . _:genid1 . _:genid1 . _:genid2 . _:genid2 . raptor-1.4.21/tests/rdfxml/ex-24.rdf0000644000175000017500000000070311113423026014012 00000000000000 raptor-1.4.21/tests/rdfxml/ex-25.out0000644000175000017500000000050211113423026014044 00000000000000 "1" . "_1" . "2" . "_3" . raptor-1.4.21/tests/rdfxml/ex-25.rdf0000644000175000017500000000055511113423026014020 00000000000000 1 _1 2 _3 raptor-1.4.21/tests/rdfxml/ex-26.out0000644000175000017500000000025311113423026014050 00000000000000 . "content" . raptor-1.4.21/tests/rdfxml/ex-26.rdf0000644000175000017500000000052611113423026014017 00000000000000 ]> content raptor-1.4.21/tests/rdfxml/ex-27.out0000644000175000017500000000054511113423026014055 00000000000000_:genid1 "prop1name" . _:genid1 . _:genid2 "prop2name" . _:genid2 . _:genid3 "prop3name" . _:genid3 . raptor-1.4.21/tests/rdfxml/ex-27.rdf0000644000175000017500000000073411113423026014021 00000000000000 prop1name prop2name prop3name raptor-1.4.21/tests/rdfxml/ex-28.out0000644000175000017500000000027211113423026014053 00000000000000_:genid1 "foo" . _:genid1 . "literal" . raptor-1.4.21/tests/rdfxml/ex-28.rdf0000644000175000017500000000053411113423026014020 00000000000000 foo literal raptor-1.4.21/tests/rdfxml/ex-29.out0000644000175000017500000000031111113423026014046 00000000000000 "chat"@en . "chat"@fr . "chat" . raptor-1.4.21/tests/rdfxml/ex-29.rdf0000644000175000017500000000060611113423026014021 00000000000000 chat chat chat raptor-1.4.21/tests/rdfxml/ex-30.out0000644000175000017500000000010311113423026014035 00000000000000 "blah" . raptor-1.4.21/tests/rdfxml/ex-30.rdf0000644000175000017500000000057511113423026014016 00000000000000 blah raptor-1.4.21/tests/rdfxml/ex-31.out0000644000175000017500000000052511113423026014046 00000000000000_:genid1 "foo" . _:genid1 "blah" . _:genid1 . "2" . "_3" . raptor-1.4.21/tests/rdfxml/ex-31.rdf0000644000175000017500000000070211113423026014007 00000000000000 foo blah 2 _3 raptor-1.4.21/tests/rdfxml/ex-32.out0000644000175000017500000000023311113423026014043 00000000000000 "literal" . . raptor-1.4.21/tests/rdfxml/ex-32.rdf0000644000175000017500000000053711113423026014016 00000000000000 raptor-1.4.21/tests/rdfxml/ex-33.out0000644000175000017500000000025311113423026014046 00000000000000_:genid1 "literal2" . _:genid1 "literal3" . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-33.rdf0000644000175000017500000000057311113423026014017 00000000000000 raptor-1.4.21/tests/rdfxml/ex-34.out0000644000175000017500000000131611113423026014050 00000000000000_:genid2 . _:genid2 _:genid1 . _:genid1 . _:genid4 . _:genid4 _:genid3 . _:genid2 _:genid4 . _:genid3 . _:genid4 . _:genid2 . raptor-1.4.21/tests/rdfxml/ex-34.rdf0000644000175000017500000000112111113423026014006 00000000000000 raptor-1.4.21/tests/rdfxml/ex-35.out0000644000175000017500000000015111113423026014045 00000000000000 . raptor-1.4.21/tests/rdfxml/ex-35.rdf0000644000175000017500000000055311113423026014017 00000000000000 raptor-1.4.21/tests/rdfxml/ex-36.out0000644000175000017500000000055111113423026014052 00000000000000_:genid1 . _:genid1 . _:genid1 . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-36.rdf0000644000175000017500000000065111113423026014017 00000000000000 raptor-1.4.21/tests/rdfxml/ex-37.out0000644000175000017500000000023511113423026014052 00000000000000_:genid1 . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-37.rdf0000644000175000017500000000057611113423026014026 00000000000000 raptor-1.4.21/tests/rdfxml/ex-38.out0000644000175000017500000000145711113423026014062 00000000000000_:genid1 . _:genid1 . _:genid1 . _:genid1 . . . . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-38.rdf0000644000175000017500000000074411113423026014024 00000000000000 raptor-1.4.21/tests/rdfxml/ex-39.out0000644000175000017500000000103211113423026014050 00000000000000_:genid2 _:genid1 . _:genid1 . _:genid4 _:genid3 . _:genid2 _:genid4 . _:genid3 . _:genid4 . _:genid2 . raptor-1.4.21/tests/rdfxml/ex-39.rdf0000644000175000017500000000103011113423026014012 00000000000000 raptor-1.4.21/tests/rdfxml/ex-40.out0000644000175000017500000000010611113423026014041 00000000000000 "value" . raptor-1.4.21/tests/rdfxml/ex-40.rdf0000644000175000017500000000043711113423026014014 00000000000000 raptor-1.4.21/tests/rdfxml/ex-41.out0000644000175000017500000000046511113423026014052 00000000000000 "val1"^^ . "val2"^^ . "val3"^^ . raptor-1.4.21/tests/rdfxml/ex-41.rdf0000644000175000017500000000100311113423026014003 00000000000000 val1 val2 val3 raptor-1.4.21/tests/rdfxml/ex-42.out0000644000175000017500000000414311113423026014050 00000000000000 . "val1" . . . . . "val1" . "val2" . . . . . "val2" . "val3"@en . . . . . "val3"@en . raptor-1.4.21/tests/rdfxml/ex-42.rdf0000644000175000017500000000077611113423026014024 00000000000000 val1 val2 val3 raptor-1.4.21/tests/rdfxml/ex-43.out0000644000175000017500000000122711113423026014051 00000000000000 . "val1" . _:genid1 . _:genid1 . _:genid1 . _:genid1 . _:genid1 "val1" . raptor-1.4.21/tests/rdfxml/ex-43.rdf0000644000175000017500000000056011113423026014014 00000000000000 val1 raptor-1.4.21/tests/rdfxml/ex-44.out0000644000175000017500000000127211113423026014052 00000000000000 . _:genid1 "val2" . _:genid2 . _:genid2 . _:genid2 _:genid1 . _:genid2 . _:genid2 "val2" . _:genid1 . raptor-1.4.21/tests/rdfxml/ex-44.rdf0000644000175000017500000000060611113423026014016 00000000000000 raptor-1.4.21/tests/rdfxml/ex-45.out0000644000175000017500000000030411113423026014046 00000000000000 . "" . raptor-1.4.21/tests/rdfxml/ex-45.rdf0000644000175000017500000000054211113423026014016 00000000000000 raptor-1.4.21/tests/rdfxml/ex-46.out0000644000175000017500000001324011113423026014052 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . . "abc" . "abc" . "abc" . "abc" . _:node2 . _:node1 . "apples" . "pears"^^ . "oranges"^^ . "10"^^ . raptor-1.4.21/tests/rdfxml/ex-46.rdf0000644000175000017500000001040511113423026014016 00000000000000 ]> apples pears oranges 10 raptor-1.4.21/tests/rdfxml/ex-47.out0000644000175000017500000000462311113423026014060 00000000000000 . . . . . . . . . . . . . . . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . raptor-1.4.21/tests/rdfxml/ex-47.rdf0000644000175000017500000000445511113423026014027 00000000000000 ]> raptor-1.4.21/tests/rdfxml/ex-48.out0000644000175000017500000000125611113423026014060 00000000000000 " & "^^ . " < "^^ . " > "^^ . ">&<"^^ . "<ex:notaprop>"^^ . raptor-1.4.21/tests/rdfxml/ex-48.rdf0000644000175000017500000000120411113423026014015 00000000000000 & < > >&< <ex:notaprop> raptor-1.4.21/tests/rdfxml/ex-49.out0000644000175000017500000000120011113423026014046 00000000000000 " hmm "^^ . " "^^ . " "^^ . " \"> "^^ . raptor-1.4.21/tests/rdfxml/ex-49.rdf0000644000175000017500000000116611113423026014025 00000000000000 hmm raptor-1.4.21/tests/rdfxml/ex-51.out0000644000175000017500000000016711113423026014052 00000000000000 ""^^ . raptor-1.4.21/tests/rdfxml/ex-51.rdf0000644000175000017500000000047111113423026014014 00000000000000 raptor-1.4.21/tests/rdfxml/ex-52.out0000644000175000017500000000030711113423026014047 00000000000000 "Simple Example" . "2002-10-05" . raptor-1.4.21/tests/rdfxml/ex-52.svg0000644000175000017500000000142511113423026014041 00000000000000 Simple Example 2002-10-05 raptor-1.4.21/tests/rdfxml/ex-53.out0000644000175000017500000000013211113423026014044 00000000000000_:genid1 . raptor-1.4.21/tests/rdfxml/ex-53.rdf0000644000175000017500000000004711113423026014015 00000000000000 raptor-1.4.21/tests/rdfxml/ex-54.out0000644000175000017500000000025111113423026014047 00000000000000 "They\u2019re artistic\u2026uhm, bugs, at the very least."^^ . raptor-1.4.21/tests/rdfxml/ex-54.rdf0000644000175000017500000000050311113423026014013 00000000000000 They’re artistic…uhm, bugs, at the very least. raptor-1.4.21/tests/rdfxml/wine.out0000644000175000017500000103006311113423026014154 00000000000000 . "An example OWL ontology" . . . . "Derived from the DAML Wine ontology at \n http://ontolingua.stanford.edu/doc/chimaera/ontologies/wines.daml\n Substantially changed, in particular the Region based relations.\n " . "Wine Ontology" . . . _:genid1 . _:genid1 . _:genid1 "1"^^ . _:genid1 . _:genid2 . _:genid2 . _:genid2 . _:genid2 . _:genid3 . _:genid3 . _:genid3 "1"^^ . _:genid3 . _:genid4 . _:genid4 . _:genid4 "1"^^ . _:genid4 . _:genid5 . _:genid5 . _:genid5 "1"^^ . _:genid5 . _:genid6 . _:genid6 . _:genid6 "1"^^ . _:genid6 . _:genid7 . _:genid7 . _:genid7 "1"^^ . _:genid7 . _:genid8 . _:genid8 . _:genid8 . _:genid8 . "wine"@en . "vin"@fr . . _:genid9 . _:genid9 . _:genid9 "1"^^ . _:genid9 . . . . _:genid10 . . _:genid12 _:genid11 . _:genid10 _:genid12 . _:genid11 . _:genid11 . _:genid11 . _:genid12 . _:genid10 . . _:genid13 . . _:genid15 _:genid14 . _:genid13 _:genid15 . _:genid14 . _:genid14 . _:genid14 . _:genid15 . _:genid13 . . _:genid16 . . _:genid18 _:genid17 . _:genid16 _:genid18 . _:genid17 . _:genid17 . _:genid19 . _:genid20 . . _:genid21 . _:genid20 _:genid21 . . _:genid21 . _:genid19 _:genid20 . _:genid17 _:genid19 . _:genid18 . _:genid16 . . _:genid22 . . _:genid23 . _:genid22 _:genid23 . . _:genid23 . _:genid22 . . _:genid24 . _:genid24 . _:genid25 . _:genid26 . . _:genid27 . _:genid26 _:genid27 . . _:genid28 . _:genid27 _:genid28 . . _:genid28 . _:genid25 _:genid26 . _:genid24 _:genid25 . _:genid24 . . _:genid29 . . _:genid30 . _:genid29 _:genid30 . . _:genid30 . _:genid29 . . _:genid31 . _:genid31 . _:genid31 . _:genid31 . _:genid32 . _:genid32 . _:genid32 "1"^^ . _:genid32 . . _:genid33 . . _:genid34 . _:genid33 _:genid34 . . _:genid34 . _:genid33 . . _:genid35 . _:genid35 . _:genid36 . _:genid37 . . _:genid38 . _:genid37 _:genid38 . . _:genid38 . _:genid36 _:genid37 . _:genid35 _:genid36 . _:genid35 . . . . . . . . . . . . . . . "1998"^^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _:genid39 . . _:genid41 _:genid40 . _:genid39 _:genid41 . _:genid40 . _:genid40 . _:genid40 . _:genid43 _:genid42 . _:genid41 _:genid43 . _:genid42 . _:genid42 . _:genid42 "1"^^ . _:genid43 . _:genid39 . . _:genid44 . _:genid44 . _:genid44 . _:genid44 . _:genid45 . _:genid45 . _:genid45 . _:genid45 . _:genid46 . _:genid46 . _:genid47 . _:genid48 . . _:genid49 . _:genid48 _:genid49 . . _:genid49 . _:genid47 _:genid48 . _:genid46 _:genid47 . _:genid46 . _:genid50 . _:genid50 . _:genid51 . _:genid52 . . _:genid53 . _:genid52 _:genid53 . . _:genid53 . _:genid51 _:genid52 . _:genid50 _:genid51 . _:genid50 . . . "Made WineDescriptor unionType of tastes and color" . _:genid54 . . _:genid55 . _:genid54 _:genid55 . . _:genid55 . _:genid54 . . . . . _:genid56 . . _:genid57 . _:genid56 _:genid57 . . _:genid58 . _:genid57 _:genid58 . . _:genid58 . _:genid56 . . . _:genid59 . . _:genid60 . _:genid59 _:genid60 . . _:genid61 . _:genid60 _:genid61 . . _:genid61 . _:genid59 . . . _:genid62 . . _:genid63 . _:genid62 _:genid63 . . _:genid64 . _:genid63 _:genid64 . . _:genid64 . _:genid62 . . . _:genid65 . . _:genid66 . _:genid65 _:genid66 . . _:genid67 . _:genid66 _:genid67 . . _:genid67 . _:genid65 . . . _:genid68 . . _:genid70 _:genid69 . _:genid68 _:genid70 . _:genid69 . _:genid69 . _:genid69 . _:genid70 . _:genid68 . . _:genid71 . _:genid71 . _:genid71 . _:genid71 . _:genid72 . _:genid72 . _:genid72 "1"^^ . _:genid72 . . _:genid73 . . _:genid75 _:genid74 . _:genid73 _:genid75 . _:genid74 . _:genid74 . _:genid74 . _:genid75 . _:genid73 . . _:genid76 . . _:genid78 _:genid77 . _:genid76 _:genid78 . _:genid77 . _:genid77 . _:genid77 . _:genid78 . _:genid76 . . . _:genid79 . _:genid79 . _:genid79 . _:genid79 . _:genid80 . _:genid80 . _:genid81 . _:genid82 . . _:genid83 . _:genid82 _:genid83 . . _:genid83 . _:genid81 _:genid82 . _:genid80 _:genid81 . _:genid80 . _:genid84 . . _:genid86 _:genid85 . _:genid84 _:genid86 . _:genid85 . _:genid85 . _:genid85 . _:genid86 . _:genid84 . . _:genid87 . _:genid87 . _:genid87 . _:genid87 . _:genid88 . _:genid88 . _:genid88 . _:genid88 . _:genid89 . _:genid89 . _:genid89 . _:genid89 . _:genid90 . _:genid90 . _:genid90 "1"^^ . _:genid90 . _:genid91 . . _:genid93 _:genid92 . _:genid91 _:genid93 . _:genid92 . _:genid92 . _:genid92 . _:genid93 . _:genid91 . . _:genid94 . _:genid94 . _:genid94 . _:genid94 . _:genid95 . _:genid95 . _:genid96 . _:genid97 . . _:genid98 . _:genid97 _:genid98 . . _:genid98 . _:genid96 _:genid97 . _:genid95 _:genid96 . _:genid95 . _:genid99 . . _:genid101 _:genid100 . _:genid99 _:genid101 . _:genid100 . _:genid100 . _:genid102 . _:genid103 . . _:genid104 . _:genid103 _:genid104 . . _:genid104 . _:genid102 _:genid103 . _:genid100 _:genid102 . _:genid101 . _:genid99 . . _:genid105 . . _:genid107 _:genid106 . _:genid105 _:genid107 . _:genid106 . _:genid106 . _:genid106 . _:genid109 _:genid108 . _:genid107 _:genid109 . _:genid108 . _:genid108 . _:genid108 "1"^^ . _:genid109 . _:genid105 . . _:genid110 . . _:genid112 _:genid111 . _:genid110 _:genid112 . _:genid111 . _:genid111 . _:genid111 . _:genid114 _:genid113 . _:genid112 _:genid114 . _:genid113 . _:genid113 . _:genid113 "1"^^ . _:genid114 . _:genid110 . . . . _:genid115 . _:genid115 . _:genid115 . _:genid115 . _:genid116 . _:genid116 . _:genid116 . _:genid116 . _:genid117 . _:genid117 . _:genid117 . _:genid117 . . _:genid118 . _:genid118 . _:genid118 . _:genid118 . _:genid119 . _:genid119 . _:genid119 . _:genid119 . _:genid120 . _:genid120 . _:genid120 . _:genid120 . _:genid121 . _:genid121 . _:genid121 . _:genid121 . _:genid122 . _:genid122 . _:genid122 "1"^^ . _:genid122 . _:genid123 . . _:genid125 _:genid124 . _:genid123 _:genid125 . _:genid124 . _:genid124 . _:genid124 . _:genid125 . _:genid123 . . _:genid126 . . _:genid128 _:genid127 . _:genid126 _:genid128 . _:genid127 . _:genid127 . _:genid127 . _:genid128 . _:genid126 . . _:genid129 . _:genid129 . _:genid129 . _:genid129 . _:genid130 . . _:genid132 _:genid131 . _:genid130 _:genid132 . _:genid131 . _:genid131 . _:genid131 . _:genid134 _:genid133 . _:genid132 _:genid134 . _:genid133 . _:genid133 . _:genid133 "1"^^ . _:genid134 . _:genid130 . . _:genid135 . . _:genid137 _:genid136 . _:genid135 _:genid137 . _:genid136 . _:genid136 . _:genid136 . _:genid137 . _:genid135 . . _:genid138 . . _:genid140 _:genid139 . _:genid138 _:genid140 . _:genid139 . _:genid139 . _:genid139 . _:genid140 . _:genid138 . . _:genid141 . _:genid141 . _:genid141 . _:genid141 . _:genid142 . _:genid142 . _:genid142 "1"^^ . _:genid142 . _:genid143 . . _:genid144 . _:genid143 _:genid144 . . _:genid144 . _:genid143 . . _:genid145 . _:genid145 . _:genid146 . _:genid147 . . _:genid148 . _:genid147 _:genid148 . . _:genid148 . _:genid146 _:genid147 . _:genid145 _:genid146 . _:genid145 . _:genid149 . . _:genid150 . _:genid149 _:genid150 . . _:genid150 . _:genid149 . . . _:genid151 . _:genid151 . _:genid151 . _:genid151 . _:genid152 . _:genid152 . _:genid152 . _:genid152 . _:genid153 . _:genid153 . _:genid153 . _:genid153 . _:genid154 . _:genid154 . _:genid154 . _:genid154 . . _:genid155 . _:genid155 . _:genid155 . _:genid155 . _:genid156 . . _:genid158 _:genid157 . _:genid156 _:genid158 . _:genid157 . _:genid157 . _:genid157 . _:genid160 _:genid159 . _:genid158 _:genid160 . _:genid159 . _:genid159 . _:genid159 "1"^^ . _:genid160 . _:genid156 . . _:genid161 . _:genid161 . _:genid161 . _:genid161 . _:genid162 . . _:genid164 _:genid163 . _:genid162 _:genid164 . _:genid163 . _:genid163 . _:genid163 . _:genid166 _:genid165 . _:genid164 _:genid166 . _:genid165 . _:genid165 . _:genid165 "1"^^ . _:genid166 . _:genid162 . . _:genid167 . _:genid167 . _:genid167 . _:genid167 . _:genid168 . _:genid168 . _:genid168 . _:genid168 . _:genid169 . _:genid169 . _:genid170 . _:genid171 . . _:genid172 . _:genid171 _:genid172 . . _:genid172 . _:genid170 _:genid171 . _:genid169 _:genid170 . _:genid169 . _:genid173 . _:genid173 . _:genid174 . _:genid175 . . _:genid176 . _:genid175 _:genid176 . . _:genid176 . _:genid174 _:genid175 . _:genid173 _:genid174 . _:genid173 . _:genid177 . . _:genid179 _:genid178 . _:genid177 _:genid179 . _:genid178 . _:genid178 . _:genid178 . _:genid181 _:genid180 . _:genid179 _:genid181 . _:genid180 . _:genid180 . _:genid180 "1"^^ . _:genid181 . _:genid177 . . _:genid182 . _:genid182 . _:genid182 . _:genid182 . _:genid183 . _:genid183 . _:genid183 . _:genid183 . _:genid184 . _:genid184 . _:genid184 . _:genid184 . _:genid185 . _:genid185 . _:genid185 "1"^^ . _:genid185 . _:genid186 . . _:genid188 _:genid187 . _:genid186 _:genid188 . _:genid187 . _:genid187 . _:genid187 . _:genid188 . _:genid186 . . _:genid189 . _:genid189 . _:genid189 . _:genid189 . _:genid190 . _:genid190 . _:genid190 . _:genid190 . _:genid191 . _:genid191 . _:genid191 . _:genid191 . _:genid192 . _:genid192 . _:genid192 . _:genid192 . _:genid193 . _:genid193 . _:genid193 "1"^^ . _:genid193 . _:genid194 . . _:genid196 _:genid195 . _:genid194 _:genid196 . _:genid195 . _:genid195 . _:genid195 . _:genid196 . _:genid194 . . _:genid197 . _:genid197 . _:genid197 . _:genid197 . _:genid198 . . _:genid200 _:genid199 . _:genid198 _:genid200 . _:genid199 . _:genid199 . _:genid199 . _:genid200 . _:genid198 . . _:genid201 . _:genid201 . _:genid201 . _:genid201 . _:genid202 . _:genid202 . _:genid202 . _:genid202 . _:genid203 . _:genid203 . _:genid204 . _:genid205 . . _:genid206 . _:genid205 _:genid206 . . _:genid206 . _:genid204 _:genid205 . _:genid203 _:genid204 . _:genid203 . _:genid207 . _:genid207 . _:genid208 . _:genid209 . . _:genid210 . _:genid209 _:genid210 . . _:genid210 . _:genid208 _:genid209 . _:genid207 _:genid208 . _:genid207 . _:genid211 . . _:genid213 _:genid212 . _:genid211 _:genid213 . _:genid212 . _:genid212 . _:genid212 . _:genid215 _:genid214 . _:genid213 _:genid215 . _:genid214 . _:genid214 . _:genid214 "1"^^ . _:genid215 . _:genid211 . . _:genid216 . _:genid216 . _:genid216 . _:genid216 . _:genid217 . . _:genid219 _:genid218 . _:genid217 _:genid219 . _:genid218 . _:genid218 . _:genid220 . _:genid221 . . _:genid222 . _:genid221 _:genid222 . . _:genid223 . _:genid222 _:genid223 . . _:genid224 . _:genid223 _:genid224 . . _:genid225 . _:genid224 _:genid225 . . _:genid225 . _:genid220 _:genid221 . _:genid218 _:genid220 . _:genid227 _:genid226 . _:genid219 _:genid227 . _:genid226 . _:genid226 . _:genid226 "2"^^ . _:genid227 . _:genid217 . . . . _:genid228 . _:genid228 . _:genid228 . _:genid228 . _:genid229 . _:genid229 . _:genid229 . _:genid229 . _:genid230 . . _:genid232 _:genid231 . _:genid230 _:genid232 . _:genid231 . _:genid231 . _:genid231 . _:genid232 . _:genid230 . . _:genid233 . _:genid233 . _:genid233 . _:genid233 . _:genid234 . _:genid234 . _:genid234 . _:genid234 . _:genid235 . _:genid235 . _:genid235 "1"^^ . _:genid235 . _:genid236 . . _:genid238 _:genid237 . _:genid236 _:genid238 . _:genid237 . _:genid237 . _:genid237 . _:genid238 . _:genid236 . . . . _:genid239 . . _:genid241 _:genid240 . _:genid239 _:genid241 . _:genid240 . _:genid240 . _:genid240 . _:genid241 . _:genid239 . . . . _:genid242 . _:genid242 . _:genid242 . _:genid242 . _:genid243 . _:genid243 . _:genid244 . _:genid245 . . _:genid246 . _:genid245 _:genid246 . . _:genid246 . _:genid244 _:genid245 . _:genid243 _:genid244 . _:genid243 . . _:genid247 . . _:genid249 _:genid248 . _:genid247 _:genid249 . _:genid248 . _:genid248 . _:genid248 . _:genid249 . _:genid247 . . . _:genid250 . _:genid250 . _:genid251 . _:genid252 . . _:genid253 . _:genid252 _:genid253 . . _:genid253 . _:genid251 _:genid252 . _:genid250 _:genid251 . _:genid250 . _:genid254 . _:genid254 . _:genid255 . _:genid256 . . _:genid257 . _:genid256 _:genid257 . . _:genid257 . _:genid255 _:genid256 . _:genid254 _:genid255 . _:genid254 . _:genid258 . . _:genid259 . _:genid258 _:genid259 . . _:genid261 _:genid260 . _:genid259 _:genid261 . _:genid260 . _:genid260 . _:genid260 . _:genid261 . _:genid258 . . _:genid262 . . _:genid264 _:genid263 . _:genid262 _:genid264 . _:genid263 . _:genid263 . _:genid263 . _:genid264 . _:genid262 . . _:genid265 . . _:genid267 _:genid266 . _:genid265 _:genid267 . _:genid266 . _:genid266 . _:genid266 . _:genid269 _:genid268 . _:genid267 _:genid269 . _:genid268 . _:genid268 . _:genid268 "1"^^ . _:genid269 . _:genid265 . . _:genid270 . . _:genid272 _:genid271 . _:genid270 _:genid272 . _:genid271 . _:genid271 . _:genid271 . _:genid272 . _:genid270 . . . _:genid273 . . _:genid275 _:genid274 . _:genid273 _:genid275 . _:genid274 . _:genid274 . _:genid274 . _:genid275 . _:genid273 . . . _:genid276 . _:genid276 . _:genid277 . _:genid278 . . _:genid279 . _:genid278 _:genid279 . . _:genid279 . _:genid277 _:genid278 . _:genid276 _:genid277 . _:genid276 . . _:genid280 . . _:genid282 _:genid281 . _:genid280 _:genid282 . _:genid281 . _:genid281 . _:genid281 . _:genid282 . _:genid280 . . _:genid283 . . _:genid284 . _:genid283 _:genid284 . . _:genid284 . _:genid283 . . _:genid285 . _:genid285 . _:genid285 . _:genid285 . _:genid286 . _:genid286 . _:genid286 . _:genid286 . _:genid287 . _:genid287 . _:genid288 . _:genid289 . . _:genid290 . _:genid289 _:genid290 . . _:genid290 . _:genid288 _:genid289 . _:genid287 _:genid288 . _:genid287 . _:genid291 . . _:genid293 _:genid292 . _:genid291 _:genid293 . _:genid292 . _:genid292 . _:genid292 . _:genid293 . _:genid291 . . _:genid294 . . _:genid295 . _:genid294 _:genid295 . . _:genid295 . _:genid294 . . . _:genid296 . _:genid296 . _:genid297 . _:genid298 . . _:genid299 . _:genid298 _:genid299 . . _:genid299 . _:genid297 _:genid298 . _:genid296 _:genid297 . _:genid296 . . _:genid300 . _:genid300 . _:genid300 . _:genid300 . _:genid301 . . _:genid303 _:genid302 . _:genid301 _:genid303 . _:genid302 . _:genid302 . _:genid302 . _:genid303 . _:genid301 . . . _:genid304 . _:genid304 . _:genid304 . _:genid304 . _:genid305 . _:genid305 . _:genid305 . _:genid305 . _:genid306 . _:genid306 . _:genid306 . _:genid306 . _:genid307 . _:genid307 . _:genid307 . _:genid307 . _:genid308 . _:genid308 . _:genid308 . _:genid308 . _:genid309 . _:genid309 . _:genid310 . _:genid311 . . _:genid312 . _:genid311 _:genid312 . . _:genid312 . _:genid310 _:genid311 . _:genid309 _:genid310 . _:genid309 . . _:genid313 . _:genid313 . _:genid313 . _:genid313 . _:genid314 . _:genid314 . _:genid314 . _:genid314 . _:genid315 . _:genid315 . _:genid316 . _:genid317 . . _:genid318 . _:genid317 _:genid318 . . _:genid318 . _:genid316 _:genid317 . _:genid315 _:genid316 . _:genid315 . _:genid319 . _:genid319 . _:genid320 . _:genid321 . . _:genid322 . _:genid321 _:genid322 . . _:genid322 . _:genid320 _:genid321 . _:genid319 _:genid320 . _:genid319 . _:genid323 . . _:genid325 _:genid324 . _:genid323 _:genid325 . _:genid324 . _:genid324 . _:genid324 . _:genid327 _:genid326 . _:genid325 _:genid327 . _:genid326 . _:genid326 . _:genid326 "1"^^ . _:genid327 . _:genid323 . . _:genid328 . _:genid328 . _:genid328 . _:genid328 . _:genid329 . _:genid329 . _:genid330 . _:genid331 . . _:genid332 . _:genid331 _:genid332 . . _:genid332 . _:genid330 _:genid331 . _:genid329 _:genid330 . _:genid329 . _:genid333 . _:genid333 . _:genid334 . _:genid335 . . _:genid336 . _:genid335 _:genid336 . . _:genid336 . _:genid334 _:genid335 . _:genid333 _:genid334 . _:genid333 . _:genid337 . . _:genid339 _:genid338 . _:genid337 _:genid339 . _:genid338 . _:genid338 . _:genid338 . _:genid341 _:genid340 . _:genid339 _:genid341 . _:genid340 . _:genid340 . _:genid340 "1"^^ . _:genid341 . _:genid337 . . . . . . _:genid342 . . _:genid344 _:genid343 . _:genid342 _:genid344 . _:genid343 . _:genid343 . _:genid343 . _:genid344 . _:genid342 . . _:genid345 . . _:genid347 _:genid346 . _:genid345 _:genid347 . _:genid346 . _:genid346 . _:genid346 . _:genid347 . _:genid345 . . _:genid348 . _:genid348 . _:genid348 . _:genid348 . _:genid349 . _:genid349 . _:genid349 . _:genid349 . _:genid350 . _:genid350 . _:genid351 . _:genid352 . . _:genid353 . _:genid352 _:genid353 . . _:genid353 . _:genid351 _:genid352 . _:genid350 _:genid351 . _:genid350 . _:genid354 . _:genid354 . _:genid355 . _:genid356 . . _:genid357 . _:genid356 _:genid357 . . _:genid357 . _:genid355 _:genid356 . _:genid354 _:genid355 . _:genid354 . _:genid358 . . _:genid360 _:genid359 . _:genid358 _:genid360 . _:genid359 . _:genid359 . _:genid359 . _:genid362 _:genid361 . _:genid360 _:genid362 . _:genid361 . _:genid361 . _:genid361 "1"^^ . _:genid362 . _:genid358 . . _:genid363 . _:genid363 . _:genid363 . _:genid363 . _:genid364 . _:genid364 . _:genid364 . _:genid364 . _:genid365 . _:genid365 . _:genid365 . _:genid365 . _:genid366 . _:genid366 . _:genid366 . _:genid366 . _:genid367 . . _:genid369 _:genid368 . _:genid367 _:genid369 . _:genid368 . _:genid368 . _:genid368 . _:genid371 _:genid370 . _:genid369 _:genid371 . _:genid370 . _:genid370 . _:genid370 "1"^^ . _:genid371 . _:genid367 . . _:genid372 . . _:genid374 _:genid373 . _:genid372 _:genid374 . _:genid373 . _:genid373 . _:genid373 . _:genid374 . _:genid372 . _:genid375 . _:genid375 . _:genid375 . _:genid375 . . . . . . _:genid376 . . _:genid378 _:genid377 . _:genid376 _:genid378 . _:genid377 . _:genid377 . _:genid377 . _:genid378 . _:genid376 . . _:genid379 . _:genid379 . _:genid379 . _:genid379 . _:genid380 . _:genid380 . _:genid380 . _:genid380 . _:genid381 . _:genid381 . _:genid381 . _:genid381 . _:genid382 . _:genid382 . _:genid382 . _:genid382 . _:genid383 . _:genid383 . _:genid383 . _:genid383 . _:genid384 . _:genid384 . _:genid384 "1"^^ . _:genid384 . _:genid385 . . _:genid387 _:genid386 . _:genid385 _:genid387 . _:genid386 . _:genid386 . _:genid386 . _:genid387 . _:genid385 . . . _:genid388 . _:genid388 . _:genid388 . _:genid388 . _:genid389 . _:genid389 . _:genid389 . _:genid389 . _:genid390 . _:genid390 . _:genid390 . _:genid390 . _:genid391 . _:genid391 . _:genid391 . _:genid391 . _:genid392 . . _:genid394 _:genid393 . _:genid392 _:genid394 . _:genid393 . _:genid393 . _:genid393 . _:genid394 . _:genid392 . . _:genid395 . . _:genid397 _:genid396 . _:genid395 _:genid397 . _:genid396 . _:genid396 . _:genid396 . _:genid397 . _:genid395 . . _:genid398 . . _:genid400 _:genid399 . _:genid398 _:genid400 . _:genid399 . _:genid399 . _:genid399 . _:genid400 . _:genid398 . . . . . . . . . . . . . . . . _:genid401 . _:genid402 . . _:genid403 . _:genid402 _:genid403 . . _:genid404 . _:genid403 _:genid404 . . _:genid404 . _:genid401 _:genid402 . _:genid405 . _:genid406 . . _:genid407 . _:genid406 _:genid407 . . _:genid408 . _:genid407 _:genid408 . . _:genid408 . _:genid405 _:genid406 . _:genid409 . _:genid410 . . _:genid411 . _:genid410 _:genid411 . . _:genid412 . _:genid411 _:genid412 . . _:genid412 . _:genid409 _:genid410 . _:genid413 . _:genid414 . . _:genid415 . _:genid414 _:genid415 . . _:genid416 . _:genid415 _:genid416 . . _:genid416 . _:genid413 _:genid414 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _:genid417 . _:genid418 . . _:genid419 . _:genid418 _:genid419 . . _:genid420 . _:genid419 _:genid420 . . _:genid421 . _:genid420 _:genid421 . . _:genid422 . _:genid421 _:genid422 . . _:genid423 . _:genid422 _:genid423 . . _:genid424 . _:genid423 _:genid424 . . _:genid425 . _:genid424 _:genid425 . . _:genid426 . _:genid425 _:genid426 . . _:genid427 . _:genid426 _:genid427 . . _:genid428 . _:genid427 _:genid428 . . _:genid429 . _:genid428 _:genid429 . . _:genid430 . _:genid429 _:genid430 . . _:genid431 . _:genid430 _:genid431 . . _:genid432 . _:genid431 _:genid432 . . _:genid433 . _:genid432 _:genid433 . . _:genid434 . _:genid433 _:genid434 . . _:genid435 . _:genid434 _:genid435 . . _:genid436 . _:genid435 _:genid436 . . _:genid437 . _:genid436 _:genid437 . . _:genid438 . _:genid437 _:genid438 . . _:genid439 . _:genid438 _:genid439 . . _:genid440 . _:genid439 _:genid440 . . _:genid441 . _:genid440 _:genid441 . . _:genid442 . _:genid441 _:genid442 . . _:genid443 . _:genid442 _:genid443 . . _:genid444 . _:genid443 _:genid444 . . _:genid445 . _:genid444 _:genid445 . . _:genid446 . _:genid445 _:genid446 . . _:genid447 . _:genid446 _:genid447 . . _:genid448 . _:genid447 _:genid448 . . _:genid449 . _:genid448 _:genid449 . . _:genid450 . _:genid449 _:genid450 . . _:genid451 . _:genid450 _:genid451 . . _:genid452 . _:genid451 _:genid452 . . _:genid453 . _:genid452 _:genid453 . . _:genid454 . _:genid453 _:genid454 . . _:genid455 . _:genid454 _:genid455 . . _:genid456 . _:genid455 _:genid456 . . _:genid457 . _:genid456 _:genid457 . . _:genid458 . _:genid457 _:genid458 . . _:genid458 . _:genid417 _:genid418 . raptor-1.4.21/tests/rdfxml/wine.rdf0000644000175000017500000023061611113423026014125 00000000000000 ]> An example OWL ontology Derived from the DAML Wine ontology at http://ontolingua.stanford.edu/doc/chimaera/ontologies/wines.daml Substantially changed, in particular the Region based relations. Wine Ontology 1 1 1 1 1 1 wine vin 1 1 1998 1 Made WineDescriptor unionType of tastes and color 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 raptor-1.4.21/tests/rdfxml/ex-55.out0000644000175000017500000000026211113423026014052 00000000000000 "abc" . "def" . raptor-1.4.21/tests/rdfxml/ex-55.rdf0000644000175000017500000000050611113423026014017 00000000000000 ]> &bar; raptor-1.4.21/tests/rdfxml/ex-56.out0000644000175000017500000000015011113423026014047 00000000000000 "val"^^ . raptor-1.4.21/tests/rdfxml/ex-56.rdf0000644000175000017500000000043511113423026014021 00000000000000 val raptor-1.4.21/tests/rdfxml/22-rdf-syntax-ns.out0000644000175000017500000000711311113423026016147 00000000000000 . "A triple consisting of a predicate, a subject, and an object." . . "A name of a property, defining specific meaning for the property" . . "An unordered collection" . . "An ordered collection" . . "A collection of alternatives" . . "Identifies the property used in a statement when representing the statement in reified form" . . . . "Identifies the resource that a statement is describing when representing the statement in reified form" . . . "Identifies the object of a statement when representing the statement in reified form" . . "Identifies the Class of a resource" . . "Identifies the principal value (usually a string) of a property when the property value is a structured resource" . raptor-1.4.21/tests/rdfxml/22-rdf-syntax-ns.rdf0000644000175000017500000000304011113423026016106 00000000000000 raptor-1.4.21/tests/rdfxml/ex-57.out0000644000175000017500000000014711113423026014056 00000000000000 ""^^ . raptor-1.4.21/tests/rdfxml/ex-57.rdf0000644000175000017500000000107111113423026014017 00000000000000 raptor-1.4.21/tests/rdfxml/ex-58.out0000644000175000017500000000043311113423026014055 00000000000000 "World Wide Web Consortium" . . . raptor-1.4.21/tests/rdfxml/ex-58.rdf0000644000175000017500000000105711113423026014024 00000000000000 World Wide Web Consortium raptor-1.4.21/tests/rdfxml/ex-59.rdf0000644000175000017500000000041011113423026014015 00000000000000 value raptor-1.4.21/tests/rdfxml/ex-60.rdf0000644000175000017500000000047011113423026014013 00000000000000 raptor-1.4.21/tests/rdfxml/ex-61.out0000644000175000017500000000013011113423026014041 00000000000000 "one" . raptor-1.4.21/tests/rdfxml/ex-61.rdf0000644000175000017500000000031411113423026014011 00000000000000 raptor-1.4.21/tests/rdfxml/owl-schema.out0000644000175000017500000005161111113423026015252 00000000000000 . . . . . . "This file specifies in RDF Schema format the\n built-in classes and properties that together form the basis of\n the RDF/XML syntax of OWL Full, OWL DL and OWL Lite.\n We do not expect people to import this file\n explicitly into their ontology. People that do import this file\n should expect their ontology to be an OWL Full ontology. \n " . "$Id: owl.rdf,v 1.5 2003/08/19 15:07:19 connolly Exp $" . "$Id: owl.rdf,v 1.5 2003/08/19 15:07:19 connolly Exp $" . . "Class" . . . "Thing" . _:genid1 . . _:genid3 _:genid2 . _:genid1 _:genid3 . _:genid2 . _:genid2 . _:genid3 . _:genid1 . . "Nothing" . . . "equivalentClass" . . . . . "disjointWith" . . . . "equivalentProperty" . . . "sameAs" . . . . "differentFrom" . . . . "AllDifferent" . . "distinctMembers" . . . . "unionOf" . . . . "intersectionOf" . . . . "complementOf" . . . . "oneOf" . . . . "Restriction" . . . "onProperty" . . . . "allValuesFrom" . . . . "hasValue" . . . "someValuesFrom" . . . . "minCardinality" . . . . "maxCardinality" . . . . "cardinality" . . . . "ObjectProperty" . . . "DatatypeProperty" . . . "inverseOf" . . . . "TransitiveProperty" . . . "SymmetricProperty" . . . "FunctionalProperty" . . . "InverseFunctionalProperty" . . . . . . . . . "Ontology" . . . . "imports" . . . . . "versionInfo" . . . "priorVersion" . . . . . "backwardCompatibleWitesh" . . . . . "incompatibleWith" . . . . . "DeprecatedClass" . . . "DeprecatedProperty" . . . "DataRange" . raptor-1.4.21/tests/rdfxml/owl-schema.rdf0000644000175000017500000002053611113423026015220 00000000000000 ]> This file specifies in RDF Schema format the built-in classes and properties that together form the basis of the RDF/XML syntax of OWL Full, OWL DL and OWL Lite. We do not expect people to import this file explicitly into their ontology. People that do import this file should expect their ontology to be an OWL Full ontology. $Id: owl.rdf,v 1.5 2003/08/19 15:07:19 connolly Exp $ $Id: owl.rdf,v 1.5 2003/08/19 15:07:19 connolly Exp $ Class Thing Nothing equivalentClass disjointWith equivalentProperty sameAs differentFrom AllDifferent distinctMembers unionOf intersectionOf complementOf oneOf Restriction onProperty allValuesFrom hasValue someValuesFrom minCardinality maxCardinality cardinality ObjectProperty DatatypeProperty inverseOf TransitiveProperty SymmetricProperty FunctionalProperty InverseFunctionalProperty Ontology imports versionInfo priorVersion backwardCompatibleWitesh incompatibleWith DeprecatedClass DeprecatedProperty DataRange raptor-1.4.21/tests/turtle/0000755000175000017500000000000011331056235012567 500000000000000raptor-1.4.21/tests/turtle/bad-00.ttl0000644000175000017500000000005610674751730014213 00000000000000# prefix name must end in a : @prefix a <#> . raptor-1.4.21/tests/turtle/bad-01.ttl0000644000175000017500000000015010674751730014207 00000000000000# Forbidden by RDF - predicate cannot be blank @prefix : . :a [ :b :c ] :d . raptor-1.4.21/tests/turtle/bad-02.ttl0000644000175000017500000000014110674751730014210 00000000000000# Forbidden by RDF - predicate cannot be blank @prefix : . :a [] :b . raptor-1.4.21/tests/turtle/bad-03.ttl0000644000175000017500000000012310674751730014211 00000000000000# 'a' only allowed as a predicate @prefix : . a :a :b . raptor-1.4.21/tests/turtle/bad-04.ttl0000644000175000017500000000015710674751730014221 00000000000000# No comma is allowed in collections @prefix : . :a :b ( "apple", "banana" ) . raptor-1.4.21/tests/turtle/bad-05.ttl0000644000175000017500000000013710674751730014220 00000000000000# N3 {}s are not in Turtle @prefix : . { :a :b :c . } :d :e . raptor-1.4.21/tests/turtle/bad-06.ttl0000644000175000017500000000013310674751730014215 00000000000000# is and of are not in turtle @prefix : . :a is :b of :c . raptor-1.4.21/tests/turtle/bad-07.ttl0000644000175000017500000000013410674751730014217 00000000000000# paths are not in turtle @prefix : . :a.:b.:c . :a^:b^:c . raptor-1.4.21/tests/turtle/bad-08.ttl0000644000175000017500000000006210674751730014220 00000000000000@keywords something. # @keywords is not in turtle raptor-1.4.21/tests/turtle/bad-09.ttl0000644000175000017500000000012210674751730014216 00000000000000# implies is not in turtle @prefix : . :a => :b . raptor-1.4.21/tests/turtle/bad-10.ttl0000644000175000017500000000012510674751730014211 00000000000000# equivalence is not in turtle @prefix : . :a = :b . raptor-1.4.21/tests/turtle/bad-11.ttl0000644000175000017500000000012410674751730014211 00000000000000# @forAll is not in turtle @prefix : . @forAll :x . raptor-1.4.21/tests/turtle/bad-12.ttl0000644000175000017500000000012610674751730014214 00000000000000# @forSome is not in turtle @prefix : . @forSome :x . raptor-1.4.21/tests/turtle/bad-13.ttl0000644000175000017500000000011510674751730014213 00000000000000# <= is not in turtle @prefix : . :a <= :b . raptor-1.4.21/tests/turtle/bad-14.ttl0000644000175000017500000000016310674751730014217 00000000000000# Test long literals with missing end @prefix : . :a :b """a long literal with newlines raptor-1.4.21/tests/turtle/bad-17.ttl0000644000175000017500000000014610725557363014226 00000000000000# Bad '-quoted long literal @prefix : . :a :b 'John said: "Hello World!"' . raptor-1.4.21/tests/turtle/bad-18.ttl0000644000175000017500000000015410725557363014226 00000000000000# Bad '''-quoted long literal @prefix : . :a :b '''John said: "Hello World!"''' . raptor-1.4.21/tests/turtle/bad-19.ttl0000644000175000017500000000012010735307727014216 00000000000000# Bad () in predicate position @prefix : . :a () :b . raptor-1.4.21/tests/turtle/bad-20.ttl0000644000175000017500000000010511330672502014175 00000000000000# Escape end-of-file @prefix : . :a :b """\raptor-1.4.21/tests/turtle/bad-21.ttl0000644000175000017500000000016311330672502014202 00000000000000# Turtle spec does not allow . in namespace prefix (token prefixName) @prefix foo.bar: . raptor-1.4.21/tests/turtle/bad-22.ttl0000644000175000017500000000022511330672502014202 00000000000000# Turtle spec does not allow . in namespace name (token name) @prefix ex: . ex:not.allowed ex:not.allowed ex:not.allowed . raptor-1.4.21/tests/turtle/test-32-out.ttl0000644000175000017500000000024011176653104015243 00000000000000@prefix rdf: . @prefix ex: . ex:node1 rdf:value (ex:item1 ex:item2 ) . raptor-1.4.21/tests/turtle/rdfs-namespace.out0000644000175000017500000004373110674751730016153 00000000000000 . "Indicates membership of a class" . . . "type"@en . . . "A collection of alternatives."@en . . "Alt"@en . . . "An unordered collection."@en . . "Bag"@en . . . "The concept of a property." . . "Property"@en . . . "An ordered collection."@en . . "Seq"@en . . . "The class of RDF statements." . . "Statement"@en . . . "The object of an RDF statement." . . . "object"@en . . "the predicate of an RDF statement." . . . "predicate"@en . . . "The subject of an RDF statement." . . . "subject"@en . . . "Identifies the principal value (usually a string) of a property when the property value is a structured resource" . . . "value"@en . . . "The concept of Class" . . "Class"@en . . . "This represents the set Containers." . . "Container"@en . . . "The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'." . . "ContainerMembershipProperty"@en . . . "This represents the set of atomic values, eg. textual strings." . . "Literal"@en . . "The class resource, everything." . . "Resource"@en . . "Use this for descriptions" . . . "comment"@en . . . "A domain class for a property type" . . . "domain"@en . . . "Indicates the namespace of a resource" . . . "isDefinedBy"@en . . . . "Provides a human-readable version of a resource name." . . . "label"@en . . . "a member of a container" . . . "member"@en . . "A range class for a property type" . . . "range"@en . . . "A resource that provides information about the subject resource" . . . "seeAlso"@en . . . "Indicates membership of a class" . . . "subClassOf"@en . . . "Indicates specialization of properties" . . . "subPropertyOf"@en . . raptor-1.4.21/tests/turtle/rdfs-namespace.ttl0000644000175000017500000001043510674751730016142 00000000000000# RDFS Namespace document converted into Turtle @prefix : . @prefix rdf: . rdf:type a rdf:Property; :comment "Indicates membership of a class"; :domain :Resource; :isDefinedBy rdf:; :label "type"@en; :range :Class . rdf:Alt a :Class; :comment "A collection of alternatives."@en; :isDefinedBy rdf:; :label "Alt"@en; :subClassOf :Container . rdf:Bag a :Class; :comment "An unordered collection."@en; :isDefinedBy rdf:; :label "Bag"@en; :subClassOf :Container . rdf:Property a :Class; :comment "The concept of a property."; :isDefinedBy rdf:; :label "Property"@en; :subClassOf :Resource . rdf:Seq a :Class; :comment "An ordered collection."@en; :isDefinedBy rdf:; :label "Seq"@en; :subClassOf :Container . rdf:Statement a :Class; :comment "The class of RDF statements."; :isDefinedBy rdf:; :label "Statement"@en; :subClassOf :Resource . rdf:object a rdf:Property; :comment "The object of an RDF statement."; :domain rdf:Statement; :isDefinedBy rdf:; :label "object"@en . rdf:predicate a rdf:Property; :comment "the predicate of an RDF statement."; :domain rdf:Statement; :isDefinedBy rdf:; :label "predicate"@en; :range rdf:Property . rdf:subject a rdf:Property; :comment "The subject of an RDF statement."; :domain rdf:Statement; :isDefinedBy rdf:; :label "subject"@en; :range :Resource . rdf:value a rdf:Property; :comment "Identifies the principal value (usually a string) of a property when the property value is a structured resource"; :domain :Resource; :isDefinedBy rdf:; :label "value"@en . : :seeAlso . :Class a :Class; :comment "The concept of Class"; :isDefinedBy :; :label "Class"@en; :subClassOf :Resource . :Container a :Class; :comment "This represents the set Containers."; :isDefinedBy :; :label "Container"@en; :subClassOf :Resource . :ContainerMembershipProperty a :Class; :comment "The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'."; :isDefinedBy :; :label "ContainerMembershipProperty"@en; :subClassOf rdf:Property . :Literal a :Class; :comment "This represents the set of atomic values, eg. textual strings."; :isDefinedBy :; :label "Literal"@en . :Resource a :Class; :comment "The class resource, everything."; :isDefinedBy :; :label "Resource"@en . :comment a rdf:Property; :comment "Use this for descriptions"; :domain :Resource; :isDefinedBy :; :label "comment"@en; :range :Literal . :domain a rdf:Property; :comment "A domain class for a property type"; :domain rdf:Property; :isDefinedBy :; :label "domain"@en; :range :Class . :isDefinedBy a rdf:Property; :comment "Indicates the namespace of a resource"; :domain :Resource; :isDefinedBy :; :label "isDefinedBy"@en; :range :Resource; :subPropertyOf :seeAlso . :label a rdf:Property; :comment "Provides a human-readable version of a resource name."; :domain :Resource; :isDefinedBy :; :label "label"@en; :range :Literal . :member a rdf:Property; :comment "a member of a container"; :domain :Container; :isDefinedBy :; :label "member"@en . :range a rdf:Property; :comment "A range class for a property type"; :domain rdf:Property; :isDefinedBy :; :label "range"@en; :range :Class . :seeAlso a rdf:Property; :comment "A resource that provides information about the subject resource"; :domain :Resource; :isDefinedBy :; :label "seeAlso"@en; :range :Resource . :subClassOf a rdf:Property; :comment "Indicates membership of a class"; :domain :Class; :isDefinedBy :; :label "subClassOf"@en; :range :Class . :subPropertyOf a rdf:Property; :comment "Indicates specialization of properties"; :domain rdf:Property; :isDefinedBy :; :label "subPropertyOf"@en; :range rdf:Property . raptor-1.4.21/tests/turtle/test-34-out.ttl0000644000175000017500000000043211330732216015242 00000000000000@base . @prefix rdf: <../../../../../1999/02/22-rdf-syntax-ns#> . @prefix dbpedia: . . raptor-1.4.21/tests/turtle/test-28-out.ttl0000644000175000017500000000105110767362013015252 00000000000000@base . @prefix rdf: <../../../../../1999/02/22-rdf-syntax-ns#> . 1, 1., 1.0, 1.000000000, 1.2345678901234567890123457890, 2.23400000000000000000005, 2.2340000000000000000005, 2.234000000000000000005, 2.23400000000000000005, 2.2340000000000000005, 2.234000000000000005, 2.23400000000000005, 2.2340000000000005, 2.234000000000005, 2.23400000000005, 2.2340000000005, 2.234000000005, 2.23400000005, 2.2340000005, 2.234000005, 2.3, 2.345 . raptor-1.4.21/tests/turtle/test-00.out0000644000175000017500000000021110674751730014441 00000000000000_:genid1 . raptor-1.4.21/tests/turtle/test-00.ttl0000644000175000017500000000003310674751730014437 00000000000000@prefix : <#> . [] :x :y . raptor-1.4.21/tests/turtle/test-01.out0000644000175000017500000000041310674751730014446 00000000000000 . . . raptor-1.4.21/tests/turtle/test-01.ttl0000644000175000017500000000027310674751730014446 00000000000000# Test @prefix and qnames @prefix : . @prefix a: . @prefix b: . :a :b :c . a:a a:b a:c . :a a:a b:a . raptor-1.4.21/tests/turtle/test-02.out0000644000175000017500000000040210674751730014445 00000000000000 . . . raptor-1.4.21/tests/turtle/test-02.ttl0000644000175000017500000000013010674751730014437 00000000000000# Test , operator @prefix : . :a :b :c, :d, :e . raptor-1.4.21/tests/turtle/test-03.out0000644000175000017500000000040210674751730014446 00000000000000 . . . raptor-1.4.21/tests/turtle/test-03.ttl0000644000175000017500000000013210674751730014442 00000000000000# Test ; operator @prefix : . :a :b :c ; :d :e ; :f :g . raptor-1.4.21/tests/turtle/test-04.out0000644000175000017500000000020610674751730014451 00000000000000_:genid1 . _:genid2 . raptor-1.4.21/tests/turtle/test-04.ttl0000644000175000017500000000016010674751730014444 00000000000000# Test empty [] operator; not allowed as predicate @prefix : . [] :a :b . :c :d [] . raptor-1.4.21/tests/turtle/test-05.out0000644000175000017500000000041410674751730014453 00000000000000_:genid1 . _:genid1 . _:genid2 . _:genid2 . raptor-1.4.21/tests/turtle/test-05.ttl0000644000175000017500000000020210674751730014442 00000000000000# Test non empty [] operator; not allowed as predicate @prefix : . [ :a :b ] :c :d . :e :f [ :g :h ] . raptor-1.4.21/tests/turtle/test-06.out0000644000175000017500000000015410674751730014455 00000000000000 . raptor-1.4.21/tests/turtle/test-06.ttl0000644000175000017500000000012310674751730014445 00000000000000# 'a' only allowed as a predicate @prefix : . :a a :b . raptor-1.4.21/tests/turtle/test-07.out0000644000175000017500000000061610674751730014461 00000000000000_:genid1 "banana" . _:genid1 . _:genid2 "apple" . _:genid2 _:genid1 . _:genid2 . raptor-1.4.21/tests/turtle/test-07.ttl0000644000175000017500000000011210674751730014444 00000000000000@prefix : . :a :b ( "apple" "banana" ) . raptor-1.4.21/tests/turtle/test-08.out0000644000175000017500000000016510674751730014461 00000000000000 . raptor-1.4.21/tests/turtle/test-08.ttl0000644000175000017500000000007110674751730014451 00000000000000@prefix : . :a :b ( ) . raptor-1.4.21/tests/turtle/test-09.out0000644000175000017500000000060410674751730014460 00000000000000_:hasParent . _:genid1 . _:genid1 _:hasParent . _:genid1 "2"^^ . raptor-1.4.21/tests/turtle/test-09.ttl0000644000175000017500000000042410674751730014454 00000000000000# Test integer datatyped literals using an OWL cardinality constraint @prefix owl: . # based on examples in the OWL Reference _:hasParent a owl:ObjectProperty . [] a owl:Restriction ; owl:onProperty _:hasParent ; owl:maxCardinality 2 . raptor-1.4.21/tests/turtle/test-10.out0000644000175000017500000000101510711544452014436 00000000000000 "000000"^^ . "0"^^ . "000001"^^ . "2"^^ . "4"^^ . raptor-1.4.21/tests/turtle/test-10.ttl0000644000175000017500000000044710674751730014451 00000000000000 000000 . 0 . 000001 . 2 . 4 . raptor-1.4.21/tests/turtle/test-11.out0000644000175000017500000000044010674751730014447 00000000000000 "a" . "b" . "c" . "d" . raptor-1.4.21/tests/turtle/test-11.ttl0000644000175000017500000000051310674751730014444 00000000000000# Tests for - and _ in names, qnames @prefix ex1: . @prefix ex-2: . @prefix ex3_: . @prefix ex4-: . ex1:foo-bar ex1:foo_bar "a" . ex-2:foo-bar ex-2:foo_bar "b" . ex3_:foo-bar ex3_:foo_bar "c" . ex4-:foo-bar ex4-:foo_bar "d" . raptor-1.4.21/tests/turtle/test-12.out0000644000175000017500000000045610674751730014457 00000000000000 "1" . "2" . "def" . "678" . raptor-1.4.21/tests/turtle/test-12.ttl0000644000175000017500000000044010674751730014444 00000000000000# Tests for rdf:_ and other qnames starting with _ @prefix rdf: . @prefix ex: . @prefix : . ex:foo rdf:_1 "1" . ex:foo rdf:_2 "2" . ex:foo :_abc "def" . ex:foo :_345 "678" . raptor-1.4.21/tests/turtle/test-13.out0000644000175000017500000000017210674751730014453 00000000000000_:genid1 _:genid2 . . raptor-1.4.21/tests/turtle/test-13.ttl0000644000175000017500000000012210674751730014442 00000000000000# Test for : allowed @prefix : . [] : [] . : : : . raptor-1.4.21/tests/turtle/test-14.out0000644000175000017500000337631210674751730014473 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . raptor-1.4.21/tests/turtle/test-14.ttl0000644000175000017500000064730710674751730014471 00000000000000# 10000 triples, more than the default Bison stack size @prefix : . :a1 :a1 :a1. :a2 :a2 :a2. :a3 :a3 :a3. :a4 :a4 :a4. :a5 :a5 :a5. :a6 :a6 :a6. :a7 :a7 :a7. :a8 :a8 :a8. :a9 :a9 :a9. :a10 :a10 :a10. :a11 :a11 :a11. :a12 :a12 :a12. :a13 :a13 :a13. :a14 :a14 :a14. :a15 :a15 :a15. :a16 :a16 :a16. :a17 :a17 :a17. :a18 :a18 :a18. :a19 :a19 :a19. :a20 :a20 :a20. :a21 :a21 :a21. :a22 :a22 :a22. :a23 :a23 :a23. :a24 :a24 :a24. :a25 :a25 :a25. :a26 :a26 :a26. :a27 :a27 :a27. :a28 :a28 :a28. :a29 :a29 :a29. :a30 :a30 :a30. :a31 :a31 :a31. :a32 :a32 :a32. :a33 :a33 :a33. :a34 :a34 :a34. :a35 :a35 :a35. :a36 :a36 :a36. :a37 :a37 :a37. :a38 :a38 :a38. :a39 :a39 :a39. :a40 :a40 :a40. :a41 :a41 :a41. :a42 :a42 :a42. :a43 :a43 :a43. :a44 :a44 :a44. :a45 :a45 :a45. :a46 :a46 :a46. :a47 :a47 :a47. :a48 :a48 :a48. :a49 :a49 :a49. :a50 :a50 :a50. :a51 :a51 :a51. :a52 :a52 :a52. :a53 :a53 :a53. :a54 :a54 :a54. :a55 :a55 :a55. :a56 :a56 :a56. :a57 :a57 :a57. :a58 :a58 :a58. :a59 :a59 :a59. :a60 :a60 :a60. :a61 :a61 :a61. :a62 :a62 :a62. :a63 :a63 :a63. :a64 :a64 :a64. :a65 :a65 :a65. :a66 :a66 :a66. :a67 :a67 :a67. :a68 :a68 :a68. :a69 :a69 :a69. :a70 :a70 :a70. :a71 :a71 :a71. :a72 :a72 :a72. :a73 :a73 :a73. :a74 :a74 :a74. :a75 :a75 :a75. :a76 :a76 :a76. :a77 :a77 :a77. :a78 :a78 :a78. :a79 :a79 :a79. :a80 :a80 :a80. :a81 :a81 :a81. :a82 :a82 :a82. :a83 :a83 :a83. :a84 :a84 :a84. :a85 :a85 :a85. :a86 :a86 :a86. :a87 :a87 :a87. :a88 :a88 :a88. :a89 :a89 :a89. :a90 :a90 :a90. :a91 :a91 :a91. :a92 :a92 :a92. :a93 :a93 :a93. :a94 :a94 :a94. :a95 :a95 :a95. :a96 :a96 :a96. :a97 :a97 :a97. :a98 :a98 :a98. :a99 :a99 :a99. :a100 :a100 :a100. :a101 :a101 :a101. :a102 :a102 :a102. :a103 :a103 :a103. :a104 :a104 :a104. :a105 :a105 :a105. :a106 :a106 :a106. :a107 :a107 :a107. :a108 :a108 :a108. :a109 :a109 :a109. :a110 :a110 :a110. :a111 :a111 :a111. :a112 :a112 :a112. :a113 :a113 :a113. :a114 :a114 :a114. :a115 :a115 :a115. :a116 :a116 :a116. :a117 :a117 :a117. :a118 :a118 :a118. :a119 :a119 :a119. :a120 :a120 :a120. :a121 :a121 :a121. :a122 :a122 :a122. :a123 :a123 :a123. :a124 :a124 :a124. :a125 :a125 :a125. :a126 :a126 :a126. :a127 :a127 :a127. :a128 :a128 :a128. :a129 :a129 :a129. :a130 :a130 :a130. :a131 :a131 :a131. :a132 :a132 :a132. :a133 :a133 :a133. :a134 :a134 :a134. :a135 :a135 :a135. :a136 :a136 :a136. :a137 :a137 :a137. :a138 :a138 :a138. :a139 :a139 :a139. :a140 :a140 :a140. :a141 :a141 :a141. :a142 :a142 :a142. :a143 :a143 :a143. :a144 :a144 :a144. :a145 :a145 :a145. :a146 :a146 :a146. :a147 :a147 :a147. :a148 :a148 :a148. :a149 :a149 :a149. :a150 :a150 :a150. :a151 :a151 :a151. :a152 :a152 :a152. :a153 :a153 :a153. :a154 :a154 :a154. :a155 :a155 :a155. :a156 :a156 :a156. :a157 :a157 :a157. :a158 :a158 :a158. :a159 :a159 :a159. :a160 :a160 :a160. :a161 :a161 :a161. :a162 :a162 :a162. :a163 :a163 :a163. :a164 :a164 :a164. :a165 :a165 :a165. :a166 :a166 :a166. :a167 :a167 :a167. :a168 :a168 :a168. :a169 :a169 :a169. :a170 :a170 :a170. :a171 :a171 :a171. :a172 :a172 :a172. :a173 :a173 :a173. :a174 :a174 :a174. :a175 :a175 :a175. :a176 :a176 :a176. :a177 :a177 :a177. :a178 :a178 :a178. :a179 :a179 :a179. :a180 :a180 :a180. :a181 :a181 :a181. :a182 :a182 :a182. :a183 :a183 :a183. :a184 :a184 :a184. :a185 :a185 :a185. :a186 :a186 :a186. :a187 :a187 :a187. :a188 :a188 :a188. :a189 :a189 :a189. :a190 :a190 :a190. :a191 :a191 :a191. :a192 :a192 :a192. :a193 :a193 :a193. :a194 :a194 :a194. :a195 :a195 :a195. :a196 :a196 :a196. :a197 :a197 :a197. :a198 :a198 :a198. :a199 :a199 :a199. :a200 :a200 :a200. :a201 :a201 :a201. :a202 :a202 :a202. :a203 :a203 :a203. :a204 :a204 :a204. :a205 :a205 :a205. :a206 :a206 :a206. :a207 :a207 :a207. :a208 :a208 :a208. :a209 :a209 :a209. :a210 :a210 :a210. :a211 :a211 :a211. :a212 :a212 :a212. :a213 :a213 :a213. :a214 :a214 :a214. :a215 :a215 :a215. :a216 :a216 :a216. :a217 :a217 :a217. :a218 :a218 :a218. :a219 :a219 :a219. :a220 :a220 :a220. :a221 :a221 :a221. :a222 :a222 :a222. :a223 :a223 :a223. :a224 :a224 :a224. :a225 :a225 :a225. :a226 :a226 :a226. :a227 :a227 :a227. :a228 :a228 :a228. :a229 :a229 :a229. :a230 :a230 :a230. :a231 :a231 :a231. :a232 :a232 :a232. :a233 :a233 :a233. :a234 :a234 :a234. :a235 :a235 :a235. :a236 :a236 :a236. :a237 :a237 :a237. :a238 :a238 :a238. :a239 :a239 :a239. :a240 :a240 :a240. :a241 :a241 :a241. :a242 :a242 :a242. :a243 :a243 :a243. :a244 :a244 :a244. :a245 :a245 :a245. :a246 :a246 :a246. :a247 :a247 :a247. :a248 :a248 :a248. :a249 :a249 :a249. :a250 :a250 :a250. :a251 :a251 :a251. :a252 :a252 :a252. :a253 :a253 :a253. :a254 :a254 :a254. :a255 :a255 :a255. :a256 :a256 :a256. :a257 :a257 :a257. :a258 :a258 :a258. :a259 :a259 :a259. :a260 :a260 :a260. :a261 :a261 :a261. :a262 :a262 :a262. :a263 :a263 :a263. :a264 :a264 :a264. :a265 :a265 :a265. :a266 :a266 :a266. :a267 :a267 :a267. :a268 :a268 :a268. :a269 :a269 :a269. :a270 :a270 :a270. :a271 :a271 :a271. :a272 :a272 :a272. :a273 :a273 :a273. :a274 :a274 :a274. :a275 :a275 :a275. :a276 :a276 :a276. :a277 :a277 :a277. :a278 :a278 :a278. :a279 :a279 :a279. :a280 :a280 :a280. :a281 :a281 :a281. :a282 :a282 :a282. :a283 :a283 :a283. :a284 :a284 :a284. :a285 :a285 :a285. :a286 :a286 :a286. :a287 :a287 :a287. :a288 :a288 :a288. :a289 :a289 :a289. :a290 :a290 :a290. :a291 :a291 :a291. :a292 :a292 :a292. :a293 :a293 :a293. :a294 :a294 :a294. :a295 :a295 :a295. :a296 :a296 :a296. :a297 :a297 :a297. :a298 :a298 :a298. :a299 :a299 :a299. :a300 :a300 :a300. :a301 :a301 :a301. :a302 :a302 :a302. :a303 :a303 :a303. :a304 :a304 :a304. :a305 :a305 :a305. :a306 :a306 :a306. :a307 :a307 :a307. :a308 :a308 :a308. :a309 :a309 :a309. :a310 :a310 :a310. :a311 :a311 :a311. :a312 :a312 :a312. :a313 :a313 :a313. :a314 :a314 :a314. :a315 :a315 :a315. :a316 :a316 :a316. :a317 :a317 :a317. :a318 :a318 :a318. :a319 :a319 :a319. :a320 :a320 :a320. :a321 :a321 :a321. :a322 :a322 :a322. :a323 :a323 :a323. :a324 :a324 :a324. :a325 :a325 :a325. :a326 :a326 :a326. :a327 :a327 :a327. :a328 :a328 :a328. :a329 :a329 :a329. :a330 :a330 :a330. :a331 :a331 :a331. :a332 :a332 :a332. :a333 :a333 :a333. :a334 :a334 :a334. :a335 :a335 :a335. :a336 :a336 :a336. :a337 :a337 :a337. :a338 :a338 :a338. :a339 :a339 :a339. :a340 :a340 :a340. :a341 :a341 :a341. :a342 :a342 :a342. :a343 :a343 :a343. :a344 :a344 :a344. :a345 :a345 :a345. :a346 :a346 :a346. :a347 :a347 :a347. :a348 :a348 :a348. :a349 :a349 :a349. :a350 :a350 :a350. :a351 :a351 :a351. :a352 :a352 :a352. :a353 :a353 :a353. :a354 :a354 :a354. :a355 :a355 :a355. :a356 :a356 :a356. :a357 :a357 :a357. :a358 :a358 :a358. :a359 :a359 :a359. :a360 :a360 :a360. :a361 :a361 :a361. :a362 :a362 :a362. :a363 :a363 :a363. :a364 :a364 :a364. :a365 :a365 :a365. :a366 :a366 :a366. :a367 :a367 :a367. :a368 :a368 :a368. :a369 :a369 :a369. :a370 :a370 :a370. :a371 :a371 :a371. :a372 :a372 :a372. :a373 :a373 :a373. :a374 :a374 :a374. :a375 :a375 :a375. :a376 :a376 :a376. :a377 :a377 :a377. :a378 :a378 :a378. :a379 :a379 :a379. :a380 :a380 :a380. :a381 :a381 :a381. :a382 :a382 :a382. :a383 :a383 :a383. :a384 :a384 :a384. :a385 :a385 :a385. :a386 :a386 :a386. :a387 :a387 :a387. :a388 :a388 :a388. :a389 :a389 :a389. :a390 :a390 :a390. :a391 :a391 :a391. :a392 :a392 :a392. :a393 :a393 :a393. :a394 :a394 :a394. :a395 :a395 :a395. :a396 :a396 :a396. :a397 :a397 :a397. :a398 :a398 :a398. :a399 :a399 :a399. :a400 :a400 :a400. :a401 :a401 :a401. :a402 :a402 :a402. :a403 :a403 :a403. :a404 :a404 :a404. :a405 :a405 :a405. :a406 :a406 :a406. :a407 :a407 :a407. :a408 :a408 :a408. :a409 :a409 :a409. :a410 :a410 :a410. :a411 :a411 :a411. :a412 :a412 :a412. :a413 :a413 :a413. :a414 :a414 :a414. :a415 :a415 :a415. :a416 :a416 :a416. :a417 :a417 :a417. :a418 :a418 :a418. :a419 :a419 :a419. :a420 :a420 :a420. :a421 :a421 :a421. :a422 :a422 :a422. :a423 :a423 :a423. :a424 :a424 :a424. :a425 :a425 :a425. :a426 :a426 :a426. :a427 :a427 :a427. :a428 :a428 :a428. :a429 :a429 :a429. :a430 :a430 :a430. :a431 :a431 :a431. :a432 :a432 :a432. :a433 :a433 :a433. :a434 :a434 :a434. :a435 :a435 :a435. :a436 :a436 :a436. :a437 :a437 :a437. :a438 :a438 :a438. :a439 :a439 :a439. :a440 :a440 :a440. :a441 :a441 :a441. :a442 :a442 :a442. :a443 :a443 :a443. :a444 :a444 :a444. :a445 :a445 :a445. :a446 :a446 :a446. :a447 :a447 :a447. :a448 :a448 :a448. :a449 :a449 :a449. :a450 :a450 :a450. :a451 :a451 :a451. :a452 :a452 :a452. :a453 :a453 :a453. :a454 :a454 :a454. :a455 :a455 :a455. :a456 :a456 :a456. :a457 :a457 :a457. :a458 :a458 :a458. :a459 :a459 :a459. :a460 :a460 :a460. :a461 :a461 :a461. :a462 :a462 :a462. :a463 :a463 :a463. :a464 :a464 :a464. :a465 :a465 :a465. :a466 :a466 :a466. :a467 :a467 :a467. :a468 :a468 :a468. :a469 :a469 :a469. :a470 :a470 :a470. :a471 :a471 :a471. :a472 :a472 :a472. :a473 :a473 :a473. :a474 :a474 :a474. :a475 :a475 :a475. :a476 :a476 :a476. :a477 :a477 :a477. :a478 :a478 :a478. :a479 :a479 :a479. :a480 :a480 :a480. :a481 :a481 :a481. :a482 :a482 :a482. :a483 :a483 :a483. :a484 :a484 :a484. :a485 :a485 :a485. :a486 :a486 :a486. :a487 :a487 :a487. :a488 :a488 :a488. :a489 :a489 :a489. :a490 :a490 :a490. :a491 :a491 :a491. :a492 :a492 :a492. :a493 :a493 :a493. :a494 :a494 :a494. :a495 :a495 :a495. :a496 :a496 :a496. :a497 :a497 :a497. :a498 :a498 :a498. :a499 :a499 :a499. :a500 :a500 :a500. :a501 :a501 :a501. :a502 :a502 :a502. :a503 :a503 :a503. :a504 :a504 :a504. :a505 :a505 :a505. :a506 :a506 :a506. :a507 :a507 :a507. :a508 :a508 :a508. :a509 :a509 :a509. :a510 :a510 :a510. :a511 :a511 :a511. :a512 :a512 :a512. :a513 :a513 :a513. :a514 :a514 :a514. :a515 :a515 :a515. :a516 :a516 :a516. :a517 :a517 :a517. :a518 :a518 :a518. :a519 :a519 :a519. :a520 :a520 :a520. :a521 :a521 :a521. :a522 :a522 :a522. :a523 :a523 :a523. :a524 :a524 :a524. :a525 :a525 :a525. :a526 :a526 :a526. :a527 :a527 :a527. :a528 :a528 :a528. :a529 :a529 :a529. :a530 :a530 :a530. :a531 :a531 :a531. :a532 :a532 :a532. :a533 :a533 :a533. :a534 :a534 :a534. :a535 :a535 :a535. :a536 :a536 :a536. :a537 :a537 :a537. :a538 :a538 :a538. :a539 :a539 :a539. :a540 :a540 :a540. :a541 :a541 :a541. :a542 :a542 :a542. :a543 :a543 :a543. :a544 :a544 :a544. :a545 :a545 :a545. :a546 :a546 :a546. :a547 :a547 :a547. :a548 :a548 :a548. :a549 :a549 :a549. :a550 :a550 :a550. :a551 :a551 :a551. :a552 :a552 :a552. :a553 :a553 :a553. :a554 :a554 :a554. :a555 :a555 :a555. :a556 :a556 :a556. :a557 :a557 :a557. :a558 :a558 :a558. :a559 :a559 :a559. :a560 :a560 :a560. :a561 :a561 :a561. :a562 :a562 :a562. :a563 :a563 :a563. :a564 :a564 :a564. :a565 :a565 :a565. :a566 :a566 :a566. :a567 :a567 :a567. :a568 :a568 :a568. :a569 :a569 :a569. :a570 :a570 :a570. :a571 :a571 :a571. :a572 :a572 :a572. :a573 :a573 :a573. :a574 :a574 :a574. :a575 :a575 :a575. :a576 :a576 :a576. :a577 :a577 :a577. :a578 :a578 :a578. :a579 :a579 :a579. :a580 :a580 :a580. :a581 :a581 :a581. :a582 :a582 :a582. :a583 :a583 :a583. :a584 :a584 :a584. :a585 :a585 :a585. :a586 :a586 :a586. :a587 :a587 :a587. :a588 :a588 :a588. :a589 :a589 :a589. :a590 :a590 :a590. :a591 :a591 :a591. :a592 :a592 :a592. :a593 :a593 :a593. :a594 :a594 :a594. :a595 :a595 :a595. :a596 :a596 :a596. :a597 :a597 :a597. :a598 :a598 :a598. :a599 :a599 :a599. :a600 :a600 :a600. :a601 :a601 :a601. :a602 :a602 :a602. :a603 :a603 :a603. :a604 :a604 :a604. :a605 :a605 :a605. :a606 :a606 :a606. :a607 :a607 :a607. :a608 :a608 :a608. :a609 :a609 :a609. :a610 :a610 :a610. :a611 :a611 :a611. :a612 :a612 :a612. :a613 :a613 :a613. :a614 :a614 :a614. :a615 :a615 :a615. :a616 :a616 :a616. :a617 :a617 :a617. :a618 :a618 :a618. :a619 :a619 :a619. :a620 :a620 :a620. :a621 :a621 :a621. :a622 :a622 :a622. :a623 :a623 :a623. :a624 :a624 :a624. :a625 :a625 :a625. :a626 :a626 :a626. :a627 :a627 :a627. :a628 :a628 :a628. :a629 :a629 :a629. :a630 :a630 :a630. :a631 :a631 :a631. :a632 :a632 :a632. :a633 :a633 :a633. :a634 :a634 :a634. :a635 :a635 :a635. :a636 :a636 :a636. :a637 :a637 :a637. :a638 :a638 :a638. :a639 :a639 :a639. :a640 :a640 :a640. :a641 :a641 :a641. :a642 :a642 :a642. :a643 :a643 :a643. :a644 :a644 :a644. :a645 :a645 :a645. :a646 :a646 :a646. :a647 :a647 :a647. :a648 :a648 :a648. :a649 :a649 :a649. :a650 :a650 :a650. :a651 :a651 :a651. :a652 :a652 :a652. :a653 :a653 :a653. :a654 :a654 :a654. :a655 :a655 :a655. :a656 :a656 :a656. :a657 :a657 :a657. :a658 :a658 :a658. :a659 :a659 :a659. :a660 :a660 :a660. :a661 :a661 :a661. :a662 :a662 :a662. :a663 :a663 :a663. :a664 :a664 :a664. :a665 :a665 :a665. :a666 :a666 :a666. :a667 :a667 :a667. :a668 :a668 :a668. :a669 :a669 :a669. :a670 :a670 :a670. :a671 :a671 :a671. :a672 :a672 :a672. :a673 :a673 :a673. :a674 :a674 :a674. :a675 :a675 :a675. :a676 :a676 :a676. :a677 :a677 :a677. :a678 :a678 :a678. :a679 :a679 :a679. :a680 :a680 :a680. :a681 :a681 :a681. :a682 :a682 :a682. :a683 :a683 :a683. :a684 :a684 :a684. :a685 :a685 :a685. :a686 :a686 :a686. :a687 :a687 :a687. :a688 :a688 :a688. :a689 :a689 :a689. :a690 :a690 :a690. :a691 :a691 :a691. :a692 :a692 :a692. :a693 :a693 :a693. :a694 :a694 :a694. :a695 :a695 :a695. :a696 :a696 :a696. :a697 :a697 :a697. :a698 :a698 :a698. :a699 :a699 :a699. :a700 :a700 :a700. :a701 :a701 :a701. :a702 :a702 :a702. :a703 :a703 :a703. :a704 :a704 :a704. :a705 :a705 :a705. :a706 :a706 :a706. :a707 :a707 :a707. :a708 :a708 :a708. :a709 :a709 :a709. :a710 :a710 :a710. :a711 :a711 :a711. :a712 :a712 :a712. :a713 :a713 :a713. :a714 :a714 :a714. :a715 :a715 :a715. :a716 :a716 :a716. :a717 :a717 :a717. :a718 :a718 :a718. :a719 :a719 :a719. :a720 :a720 :a720. :a721 :a721 :a721. :a722 :a722 :a722. :a723 :a723 :a723. :a724 :a724 :a724. :a725 :a725 :a725. :a726 :a726 :a726. :a727 :a727 :a727. :a728 :a728 :a728. :a729 :a729 :a729. :a730 :a730 :a730. :a731 :a731 :a731. :a732 :a732 :a732. :a733 :a733 :a733. :a734 :a734 :a734. :a735 :a735 :a735. :a736 :a736 :a736. :a737 :a737 :a737. :a738 :a738 :a738. :a739 :a739 :a739. :a740 :a740 :a740. :a741 :a741 :a741. :a742 :a742 :a742. :a743 :a743 :a743. :a744 :a744 :a744. :a745 :a745 :a745. :a746 :a746 :a746. :a747 :a747 :a747. :a748 :a748 :a748. :a749 :a749 :a749. :a750 :a750 :a750. :a751 :a751 :a751. :a752 :a752 :a752. :a753 :a753 :a753. :a754 :a754 :a754. :a755 :a755 :a755. :a756 :a756 :a756. :a757 :a757 :a757. :a758 :a758 :a758. :a759 :a759 :a759. :a760 :a760 :a760. :a761 :a761 :a761. :a762 :a762 :a762. :a763 :a763 :a763. :a764 :a764 :a764. :a765 :a765 :a765. :a766 :a766 :a766. :a767 :a767 :a767. :a768 :a768 :a768. :a769 :a769 :a769. :a770 :a770 :a770. :a771 :a771 :a771. :a772 :a772 :a772. :a773 :a773 :a773. :a774 :a774 :a774. :a775 :a775 :a775. :a776 :a776 :a776. :a777 :a777 :a777. :a778 :a778 :a778. :a779 :a779 :a779. :a780 :a780 :a780. :a781 :a781 :a781. :a782 :a782 :a782. :a783 :a783 :a783. :a784 :a784 :a784. :a785 :a785 :a785. :a786 :a786 :a786. :a787 :a787 :a787. :a788 :a788 :a788. :a789 :a789 :a789. :a790 :a790 :a790. :a791 :a791 :a791. :a792 :a792 :a792. :a793 :a793 :a793. :a794 :a794 :a794. :a795 :a795 :a795. :a796 :a796 :a796. :a797 :a797 :a797. :a798 :a798 :a798. :a799 :a799 :a799. :a800 :a800 :a800. :a801 :a801 :a801. :a802 :a802 :a802. :a803 :a803 :a803. :a804 :a804 :a804. :a805 :a805 :a805. :a806 :a806 :a806. :a807 :a807 :a807. :a808 :a808 :a808. :a809 :a809 :a809. :a810 :a810 :a810. :a811 :a811 :a811. :a812 :a812 :a812. :a813 :a813 :a813. :a814 :a814 :a814. :a815 :a815 :a815. :a816 :a816 :a816. :a817 :a817 :a817. :a818 :a818 :a818. :a819 :a819 :a819. :a820 :a820 :a820. :a821 :a821 :a821. :a822 :a822 :a822. :a823 :a823 :a823. :a824 :a824 :a824. :a825 :a825 :a825. :a826 :a826 :a826. :a827 :a827 :a827. :a828 :a828 :a828. :a829 :a829 :a829. :a830 :a830 :a830. :a831 :a831 :a831. :a832 :a832 :a832. :a833 :a833 :a833. :a834 :a834 :a834. :a835 :a835 :a835. :a836 :a836 :a836. :a837 :a837 :a837. :a838 :a838 :a838. :a839 :a839 :a839. :a840 :a840 :a840. :a841 :a841 :a841. :a842 :a842 :a842. :a843 :a843 :a843. :a844 :a844 :a844. :a845 :a845 :a845. :a846 :a846 :a846. :a847 :a847 :a847. :a848 :a848 :a848. :a849 :a849 :a849. :a850 :a850 :a850. :a851 :a851 :a851. :a852 :a852 :a852. :a853 :a853 :a853. :a854 :a854 :a854. :a855 :a855 :a855. :a856 :a856 :a856. :a857 :a857 :a857. :a858 :a858 :a858. :a859 :a859 :a859. :a860 :a860 :a860. :a861 :a861 :a861. :a862 :a862 :a862. :a863 :a863 :a863. :a864 :a864 :a864. :a865 :a865 :a865. :a866 :a866 :a866. :a867 :a867 :a867. :a868 :a868 :a868. :a869 :a869 :a869. :a870 :a870 :a870. :a871 :a871 :a871. :a872 :a872 :a872. :a873 :a873 :a873. :a874 :a874 :a874. :a875 :a875 :a875. :a876 :a876 :a876. :a877 :a877 :a877. :a878 :a878 :a878. :a879 :a879 :a879. :a880 :a880 :a880. :a881 :a881 :a881. :a882 :a882 :a882. :a883 :a883 :a883. :a884 :a884 :a884. :a885 :a885 :a885. :a886 :a886 :a886. :a887 :a887 :a887. :a888 :a888 :a888. :a889 :a889 :a889. :a890 :a890 :a890. :a891 :a891 :a891. :a892 :a892 :a892. :a893 :a893 :a893. :a894 :a894 :a894. :a895 :a895 :a895. :a896 :a896 :a896. :a897 :a897 :a897. :a898 :a898 :a898. :a899 :a899 :a899. :a900 :a900 :a900. :a901 :a901 :a901. :a902 :a902 :a902. :a903 :a903 :a903. :a904 :a904 :a904. :a905 :a905 :a905. :a906 :a906 :a906. :a907 :a907 :a907. :a908 :a908 :a908. :a909 :a909 :a909. :a910 :a910 :a910. :a911 :a911 :a911. :a912 :a912 :a912. :a913 :a913 :a913. :a914 :a914 :a914. :a915 :a915 :a915. :a916 :a916 :a916. :a917 :a917 :a917. :a918 :a918 :a918. :a919 :a919 :a919. :a920 :a920 :a920. :a921 :a921 :a921. :a922 :a922 :a922. :a923 :a923 :a923. :a924 :a924 :a924. :a925 :a925 :a925. :a926 :a926 :a926. :a927 :a927 :a927. :a928 :a928 :a928. :a929 :a929 :a929. :a930 :a930 :a930. :a931 :a931 :a931. :a932 :a932 :a932. :a933 :a933 :a933. :a934 :a934 :a934. :a935 :a935 :a935. :a936 :a936 :a936. :a937 :a937 :a937. :a938 :a938 :a938. :a939 :a939 :a939. :a940 :a940 :a940. :a941 :a941 :a941. :a942 :a942 :a942. :a943 :a943 :a943. :a944 :a944 :a944. :a945 :a945 :a945. :a946 :a946 :a946. :a947 :a947 :a947. :a948 :a948 :a948. :a949 :a949 :a949. :a950 :a950 :a950. :a951 :a951 :a951. :a952 :a952 :a952. :a953 :a953 :a953. :a954 :a954 :a954. :a955 :a955 :a955. :a956 :a956 :a956. :a957 :a957 :a957. :a958 :a958 :a958. :a959 :a959 :a959. :a960 :a960 :a960. :a961 :a961 :a961. :a962 :a962 :a962. :a963 :a963 :a963. :a964 :a964 :a964. :a965 :a965 :a965. :a966 :a966 :a966. :a967 :a967 :a967. :a968 :a968 :a968. :a969 :a969 :a969. :a970 :a970 :a970. :a971 :a971 :a971. :a972 :a972 :a972. :a973 :a973 :a973. :a974 :a974 :a974. :a975 :a975 :a975. :a976 :a976 :a976. :a977 :a977 :a977. :a978 :a978 :a978. :a979 :a979 :a979. :a980 :a980 :a980. :a981 :a981 :a981. :a982 :a982 :a982. :a983 :a983 :a983. :a984 :a984 :a984. :a985 :a985 :a985. :a986 :a986 :a986. :a987 :a987 :a987. :a988 :a988 :a988. :a989 :a989 :a989. :a990 :a990 :a990. :a991 :a991 :a991. :a992 :a992 :a992. :a993 :a993 :a993. :a994 :a994 :a994. :a995 :a995 :a995. :a996 :a996 :a996. :a997 :a997 :a997. :a998 :a998 :a998. :a999 :a999 :a999. :a1000 :a1000 :a1000. :a1001 :a1001 :a1001. :a1002 :a1002 :a1002. :a1003 :a1003 :a1003. :a1004 :a1004 :a1004. :a1005 :a1005 :a1005. :a1006 :a1006 :a1006. :a1007 :a1007 :a1007. :a1008 :a1008 :a1008. :a1009 :a1009 :a1009. :a1010 :a1010 :a1010. :a1011 :a1011 :a1011. :a1012 :a1012 :a1012. :a1013 :a1013 :a1013. :a1014 :a1014 :a1014. :a1015 :a1015 :a1015. :a1016 :a1016 :a1016. :a1017 :a1017 :a1017. :a1018 :a1018 :a1018. :a1019 :a1019 :a1019. :a1020 :a1020 :a1020. :a1021 :a1021 :a1021. :a1022 :a1022 :a1022. :a1023 :a1023 :a1023. :a1024 :a1024 :a1024. :a1025 :a1025 :a1025. :a1026 :a1026 :a1026. :a1027 :a1027 :a1027. :a1028 :a1028 :a1028. :a1029 :a1029 :a1029. :a1030 :a1030 :a1030. :a1031 :a1031 :a1031. :a1032 :a1032 :a1032. :a1033 :a1033 :a1033. :a1034 :a1034 :a1034. :a1035 :a1035 :a1035. :a1036 :a1036 :a1036. :a1037 :a1037 :a1037. :a1038 :a1038 :a1038. :a1039 :a1039 :a1039. :a1040 :a1040 :a1040. :a1041 :a1041 :a1041. :a1042 :a1042 :a1042. :a1043 :a1043 :a1043. :a1044 :a1044 :a1044. :a1045 :a1045 :a1045. :a1046 :a1046 :a1046. :a1047 :a1047 :a1047. :a1048 :a1048 :a1048. :a1049 :a1049 :a1049. :a1050 :a1050 :a1050. :a1051 :a1051 :a1051. :a1052 :a1052 :a1052. :a1053 :a1053 :a1053. :a1054 :a1054 :a1054. :a1055 :a1055 :a1055. :a1056 :a1056 :a1056. :a1057 :a1057 :a1057. :a1058 :a1058 :a1058. :a1059 :a1059 :a1059. :a1060 :a1060 :a1060. :a1061 :a1061 :a1061. :a1062 :a1062 :a1062. :a1063 :a1063 :a1063. :a1064 :a1064 :a1064. :a1065 :a1065 :a1065. :a1066 :a1066 :a1066. :a1067 :a1067 :a1067. :a1068 :a1068 :a1068. :a1069 :a1069 :a1069. :a1070 :a1070 :a1070. :a1071 :a1071 :a1071. :a1072 :a1072 :a1072. :a1073 :a1073 :a1073. :a1074 :a1074 :a1074. :a1075 :a1075 :a1075. :a1076 :a1076 :a1076. :a1077 :a1077 :a1077. :a1078 :a1078 :a1078. :a1079 :a1079 :a1079. :a1080 :a1080 :a1080. :a1081 :a1081 :a1081. :a1082 :a1082 :a1082. :a1083 :a1083 :a1083. :a1084 :a1084 :a1084. :a1085 :a1085 :a1085. :a1086 :a1086 :a1086. :a1087 :a1087 :a1087. :a1088 :a1088 :a1088. :a1089 :a1089 :a1089. :a1090 :a1090 :a1090. :a1091 :a1091 :a1091. :a1092 :a1092 :a1092. :a1093 :a1093 :a1093. :a1094 :a1094 :a1094. :a1095 :a1095 :a1095. :a1096 :a1096 :a1096. :a1097 :a1097 :a1097. :a1098 :a1098 :a1098. :a1099 :a1099 :a1099. :a1100 :a1100 :a1100. :a1101 :a1101 :a1101. :a1102 :a1102 :a1102. :a1103 :a1103 :a1103. :a1104 :a1104 :a1104. :a1105 :a1105 :a1105. :a1106 :a1106 :a1106. :a1107 :a1107 :a1107. :a1108 :a1108 :a1108. :a1109 :a1109 :a1109. :a1110 :a1110 :a1110. :a1111 :a1111 :a1111. :a1112 :a1112 :a1112. :a1113 :a1113 :a1113. :a1114 :a1114 :a1114. :a1115 :a1115 :a1115. :a1116 :a1116 :a1116. :a1117 :a1117 :a1117. :a1118 :a1118 :a1118. :a1119 :a1119 :a1119. :a1120 :a1120 :a1120. :a1121 :a1121 :a1121. :a1122 :a1122 :a1122. :a1123 :a1123 :a1123. :a1124 :a1124 :a1124. :a1125 :a1125 :a1125. :a1126 :a1126 :a1126. :a1127 :a1127 :a1127. :a1128 :a1128 :a1128. :a1129 :a1129 :a1129. :a1130 :a1130 :a1130. :a1131 :a1131 :a1131. :a1132 :a1132 :a1132. :a1133 :a1133 :a1133. :a1134 :a1134 :a1134. :a1135 :a1135 :a1135. :a1136 :a1136 :a1136. :a1137 :a1137 :a1137. :a1138 :a1138 :a1138. :a1139 :a1139 :a1139. :a1140 :a1140 :a1140. :a1141 :a1141 :a1141. :a1142 :a1142 :a1142. :a1143 :a1143 :a1143. :a1144 :a1144 :a1144. :a1145 :a1145 :a1145. :a1146 :a1146 :a1146. :a1147 :a1147 :a1147. :a1148 :a1148 :a1148. :a1149 :a1149 :a1149. :a1150 :a1150 :a1150. :a1151 :a1151 :a1151. :a1152 :a1152 :a1152. :a1153 :a1153 :a1153. :a1154 :a1154 :a1154. :a1155 :a1155 :a1155. :a1156 :a1156 :a1156. :a1157 :a1157 :a1157. :a1158 :a1158 :a1158. :a1159 :a1159 :a1159. :a1160 :a1160 :a1160. :a1161 :a1161 :a1161. :a1162 :a1162 :a1162. :a1163 :a1163 :a1163. :a1164 :a1164 :a1164. :a1165 :a1165 :a1165. :a1166 :a1166 :a1166. :a1167 :a1167 :a1167. :a1168 :a1168 :a1168. :a1169 :a1169 :a1169. :a1170 :a1170 :a1170. :a1171 :a1171 :a1171. :a1172 :a1172 :a1172. :a1173 :a1173 :a1173. :a1174 :a1174 :a1174. :a1175 :a1175 :a1175. :a1176 :a1176 :a1176. :a1177 :a1177 :a1177. :a1178 :a1178 :a1178. :a1179 :a1179 :a1179. :a1180 :a1180 :a1180. :a1181 :a1181 :a1181. :a1182 :a1182 :a1182. :a1183 :a1183 :a1183. :a1184 :a1184 :a1184. :a1185 :a1185 :a1185. :a1186 :a1186 :a1186. :a1187 :a1187 :a1187. :a1188 :a1188 :a1188. :a1189 :a1189 :a1189. :a1190 :a1190 :a1190. :a1191 :a1191 :a1191. :a1192 :a1192 :a1192. :a1193 :a1193 :a1193. :a1194 :a1194 :a1194. :a1195 :a1195 :a1195. :a1196 :a1196 :a1196. :a1197 :a1197 :a1197. :a1198 :a1198 :a1198. :a1199 :a1199 :a1199. :a1200 :a1200 :a1200. :a1201 :a1201 :a1201. :a1202 :a1202 :a1202. :a1203 :a1203 :a1203. :a1204 :a1204 :a1204. :a1205 :a1205 :a1205. :a1206 :a1206 :a1206. :a1207 :a1207 :a1207. :a1208 :a1208 :a1208. :a1209 :a1209 :a1209. :a1210 :a1210 :a1210. :a1211 :a1211 :a1211. :a1212 :a1212 :a1212. :a1213 :a1213 :a1213. :a1214 :a1214 :a1214. :a1215 :a1215 :a1215. :a1216 :a1216 :a1216. :a1217 :a1217 :a1217. :a1218 :a1218 :a1218. :a1219 :a1219 :a1219. :a1220 :a1220 :a1220. :a1221 :a1221 :a1221. :a1222 :a1222 :a1222. :a1223 :a1223 :a1223. :a1224 :a1224 :a1224. :a1225 :a1225 :a1225. :a1226 :a1226 :a1226. :a1227 :a1227 :a1227. :a1228 :a1228 :a1228. :a1229 :a1229 :a1229. :a1230 :a1230 :a1230. :a1231 :a1231 :a1231. :a1232 :a1232 :a1232. :a1233 :a1233 :a1233. :a1234 :a1234 :a1234. :a1235 :a1235 :a1235. :a1236 :a1236 :a1236. :a1237 :a1237 :a1237. :a1238 :a1238 :a1238. :a1239 :a1239 :a1239. :a1240 :a1240 :a1240. :a1241 :a1241 :a1241. :a1242 :a1242 :a1242. :a1243 :a1243 :a1243. :a1244 :a1244 :a1244. :a1245 :a1245 :a1245. :a1246 :a1246 :a1246. :a1247 :a1247 :a1247. :a1248 :a1248 :a1248. :a1249 :a1249 :a1249. :a1250 :a1250 :a1250. :a1251 :a1251 :a1251. :a1252 :a1252 :a1252. :a1253 :a1253 :a1253. :a1254 :a1254 :a1254. :a1255 :a1255 :a1255. :a1256 :a1256 :a1256. :a1257 :a1257 :a1257. :a1258 :a1258 :a1258. :a1259 :a1259 :a1259. :a1260 :a1260 :a1260. :a1261 :a1261 :a1261. :a1262 :a1262 :a1262. :a1263 :a1263 :a1263. :a1264 :a1264 :a1264. :a1265 :a1265 :a1265. :a1266 :a1266 :a1266. :a1267 :a1267 :a1267. :a1268 :a1268 :a1268. :a1269 :a1269 :a1269. :a1270 :a1270 :a1270. :a1271 :a1271 :a1271. :a1272 :a1272 :a1272. :a1273 :a1273 :a1273. :a1274 :a1274 :a1274. :a1275 :a1275 :a1275. :a1276 :a1276 :a1276. :a1277 :a1277 :a1277. :a1278 :a1278 :a1278. :a1279 :a1279 :a1279. :a1280 :a1280 :a1280. :a1281 :a1281 :a1281. :a1282 :a1282 :a1282. :a1283 :a1283 :a1283. :a1284 :a1284 :a1284. :a1285 :a1285 :a1285. :a1286 :a1286 :a1286. :a1287 :a1287 :a1287. :a1288 :a1288 :a1288. :a1289 :a1289 :a1289. :a1290 :a1290 :a1290. :a1291 :a1291 :a1291. :a1292 :a1292 :a1292. :a1293 :a1293 :a1293. :a1294 :a1294 :a1294. :a1295 :a1295 :a1295. :a1296 :a1296 :a1296. :a1297 :a1297 :a1297. :a1298 :a1298 :a1298. :a1299 :a1299 :a1299. :a1300 :a1300 :a1300. :a1301 :a1301 :a1301. :a1302 :a1302 :a1302. :a1303 :a1303 :a1303. :a1304 :a1304 :a1304. :a1305 :a1305 :a1305. :a1306 :a1306 :a1306. :a1307 :a1307 :a1307. :a1308 :a1308 :a1308. :a1309 :a1309 :a1309. :a1310 :a1310 :a1310. :a1311 :a1311 :a1311. :a1312 :a1312 :a1312. :a1313 :a1313 :a1313. :a1314 :a1314 :a1314. :a1315 :a1315 :a1315. :a1316 :a1316 :a1316. :a1317 :a1317 :a1317. :a1318 :a1318 :a1318. :a1319 :a1319 :a1319. :a1320 :a1320 :a1320. :a1321 :a1321 :a1321. :a1322 :a1322 :a1322. :a1323 :a1323 :a1323. :a1324 :a1324 :a1324. :a1325 :a1325 :a1325. :a1326 :a1326 :a1326. :a1327 :a1327 :a1327. :a1328 :a1328 :a1328. :a1329 :a1329 :a1329. :a1330 :a1330 :a1330. :a1331 :a1331 :a1331. :a1332 :a1332 :a1332. :a1333 :a1333 :a1333. :a1334 :a1334 :a1334. :a1335 :a1335 :a1335. :a1336 :a1336 :a1336. :a1337 :a1337 :a1337. :a1338 :a1338 :a1338. :a1339 :a1339 :a1339. :a1340 :a1340 :a1340. :a1341 :a1341 :a1341. :a1342 :a1342 :a1342. :a1343 :a1343 :a1343. :a1344 :a1344 :a1344. :a1345 :a1345 :a1345. :a1346 :a1346 :a1346. :a1347 :a1347 :a1347. :a1348 :a1348 :a1348. :a1349 :a1349 :a1349. :a1350 :a1350 :a1350. :a1351 :a1351 :a1351. :a1352 :a1352 :a1352. :a1353 :a1353 :a1353. :a1354 :a1354 :a1354. :a1355 :a1355 :a1355. :a1356 :a1356 :a1356. :a1357 :a1357 :a1357. :a1358 :a1358 :a1358. :a1359 :a1359 :a1359. :a1360 :a1360 :a1360. :a1361 :a1361 :a1361. :a1362 :a1362 :a1362. :a1363 :a1363 :a1363. :a1364 :a1364 :a1364. :a1365 :a1365 :a1365. :a1366 :a1366 :a1366. :a1367 :a1367 :a1367. :a1368 :a1368 :a1368. :a1369 :a1369 :a1369. :a1370 :a1370 :a1370. :a1371 :a1371 :a1371. :a1372 :a1372 :a1372. :a1373 :a1373 :a1373. :a1374 :a1374 :a1374. :a1375 :a1375 :a1375. :a1376 :a1376 :a1376. :a1377 :a1377 :a1377. :a1378 :a1378 :a1378. :a1379 :a1379 :a1379. :a1380 :a1380 :a1380. :a1381 :a1381 :a1381. :a1382 :a1382 :a1382. :a1383 :a1383 :a1383. :a1384 :a1384 :a1384. :a1385 :a1385 :a1385. :a1386 :a1386 :a1386. :a1387 :a1387 :a1387. :a1388 :a1388 :a1388. :a1389 :a1389 :a1389. :a1390 :a1390 :a1390. :a1391 :a1391 :a1391. :a1392 :a1392 :a1392. :a1393 :a1393 :a1393. :a1394 :a1394 :a1394. :a1395 :a1395 :a1395. :a1396 :a1396 :a1396. :a1397 :a1397 :a1397. :a1398 :a1398 :a1398. :a1399 :a1399 :a1399. :a1400 :a1400 :a1400. :a1401 :a1401 :a1401. :a1402 :a1402 :a1402. :a1403 :a1403 :a1403. :a1404 :a1404 :a1404. :a1405 :a1405 :a1405. :a1406 :a1406 :a1406. :a1407 :a1407 :a1407. :a1408 :a1408 :a1408. :a1409 :a1409 :a1409. :a1410 :a1410 :a1410. :a1411 :a1411 :a1411. :a1412 :a1412 :a1412. :a1413 :a1413 :a1413. :a1414 :a1414 :a1414. :a1415 :a1415 :a1415. :a1416 :a1416 :a1416. :a1417 :a1417 :a1417. :a1418 :a1418 :a1418. :a1419 :a1419 :a1419. :a1420 :a1420 :a1420. :a1421 :a1421 :a1421. :a1422 :a1422 :a1422. :a1423 :a1423 :a1423. :a1424 :a1424 :a1424. :a1425 :a1425 :a1425. :a1426 :a1426 :a1426. :a1427 :a1427 :a1427. :a1428 :a1428 :a1428. :a1429 :a1429 :a1429. :a1430 :a1430 :a1430. :a1431 :a1431 :a1431. :a1432 :a1432 :a1432. :a1433 :a1433 :a1433. :a1434 :a1434 :a1434. :a1435 :a1435 :a1435. :a1436 :a1436 :a1436. :a1437 :a1437 :a1437. :a1438 :a1438 :a1438. :a1439 :a1439 :a1439. :a1440 :a1440 :a1440. :a1441 :a1441 :a1441. :a1442 :a1442 :a1442. :a1443 :a1443 :a1443. :a1444 :a1444 :a1444. :a1445 :a1445 :a1445. :a1446 :a1446 :a1446. :a1447 :a1447 :a1447. :a1448 :a1448 :a1448. :a1449 :a1449 :a1449. :a1450 :a1450 :a1450. :a1451 :a1451 :a1451. :a1452 :a1452 :a1452. :a1453 :a1453 :a1453. :a1454 :a1454 :a1454. :a1455 :a1455 :a1455. :a1456 :a1456 :a1456. :a1457 :a1457 :a1457. :a1458 :a1458 :a1458. :a1459 :a1459 :a1459. :a1460 :a1460 :a1460. :a1461 :a1461 :a1461. :a1462 :a1462 :a1462. :a1463 :a1463 :a1463. :a1464 :a1464 :a1464. :a1465 :a1465 :a1465. :a1466 :a1466 :a1466. :a1467 :a1467 :a1467. :a1468 :a1468 :a1468. :a1469 :a1469 :a1469. :a1470 :a1470 :a1470. :a1471 :a1471 :a1471. :a1472 :a1472 :a1472. :a1473 :a1473 :a1473. :a1474 :a1474 :a1474. :a1475 :a1475 :a1475. :a1476 :a1476 :a1476. :a1477 :a1477 :a1477. :a1478 :a1478 :a1478. :a1479 :a1479 :a1479. :a1480 :a1480 :a1480. :a1481 :a1481 :a1481. :a1482 :a1482 :a1482. :a1483 :a1483 :a1483. :a1484 :a1484 :a1484. :a1485 :a1485 :a1485. :a1486 :a1486 :a1486. :a1487 :a1487 :a1487. :a1488 :a1488 :a1488. :a1489 :a1489 :a1489. :a1490 :a1490 :a1490. :a1491 :a1491 :a1491. :a1492 :a1492 :a1492. :a1493 :a1493 :a1493. :a1494 :a1494 :a1494. :a1495 :a1495 :a1495. :a1496 :a1496 :a1496. :a1497 :a1497 :a1497. :a1498 :a1498 :a1498. :a1499 :a1499 :a1499. :a1500 :a1500 :a1500. :a1501 :a1501 :a1501. :a1502 :a1502 :a1502. :a1503 :a1503 :a1503. :a1504 :a1504 :a1504. :a1505 :a1505 :a1505. :a1506 :a1506 :a1506. :a1507 :a1507 :a1507. :a1508 :a1508 :a1508. :a1509 :a1509 :a1509. :a1510 :a1510 :a1510. :a1511 :a1511 :a1511. :a1512 :a1512 :a1512. :a1513 :a1513 :a1513. :a1514 :a1514 :a1514. :a1515 :a1515 :a1515. :a1516 :a1516 :a1516. :a1517 :a1517 :a1517. :a1518 :a1518 :a1518. :a1519 :a1519 :a1519. :a1520 :a1520 :a1520. :a1521 :a1521 :a1521. :a1522 :a1522 :a1522. :a1523 :a1523 :a1523. :a1524 :a1524 :a1524. :a1525 :a1525 :a1525. :a1526 :a1526 :a1526. :a1527 :a1527 :a1527. :a1528 :a1528 :a1528. :a1529 :a1529 :a1529. :a1530 :a1530 :a1530. :a1531 :a1531 :a1531. :a1532 :a1532 :a1532. :a1533 :a1533 :a1533. :a1534 :a1534 :a1534. :a1535 :a1535 :a1535. :a1536 :a1536 :a1536. :a1537 :a1537 :a1537. :a1538 :a1538 :a1538. :a1539 :a1539 :a1539. :a1540 :a1540 :a1540. :a1541 :a1541 :a1541. :a1542 :a1542 :a1542. :a1543 :a1543 :a1543. :a1544 :a1544 :a1544. :a1545 :a1545 :a1545. :a1546 :a1546 :a1546. :a1547 :a1547 :a1547. :a1548 :a1548 :a1548. :a1549 :a1549 :a1549. :a1550 :a1550 :a1550. :a1551 :a1551 :a1551. :a1552 :a1552 :a1552. :a1553 :a1553 :a1553. :a1554 :a1554 :a1554. :a1555 :a1555 :a1555. :a1556 :a1556 :a1556. :a1557 :a1557 :a1557. :a1558 :a1558 :a1558. :a1559 :a1559 :a1559. :a1560 :a1560 :a1560. :a1561 :a1561 :a1561. :a1562 :a1562 :a1562. :a1563 :a1563 :a1563. :a1564 :a1564 :a1564. :a1565 :a1565 :a1565. :a1566 :a1566 :a1566. :a1567 :a1567 :a1567. :a1568 :a1568 :a1568. :a1569 :a1569 :a1569. :a1570 :a1570 :a1570. :a1571 :a1571 :a1571. :a1572 :a1572 :a1572. :a1573 :a1573 :a1573. :a1574 :a1574 :a1574. :a1575 :a1575 :a1575. :a1576 :a1576 :a1576. :a1577 :a1577 :a1577. :a1578 :a1578 :a1578. :a1579 :a1579 :a1579. :a1580 :a1580 :a1580. :a1581 :a1581 :a1581. :a1582 :a1582 :a1582. :a1583 :a1583 :a1583. :a1584 :a1584 :a1584. :a1585 :a1585 :a1585. :a1586 :a1586 :a1586. :a1587 :a1587 :a1587. :a1588 :a1588 :a1588. :a1589 :a1589 :a1589. :a1590 :a1590 :a1590. :a1591 :a1591 :a1591. :a1592 :a1592 :a1592. :a1593 :a1593 :a1593. :a1594 :a1594 :a1594. :a1595 :a1595 :a1595. :a1596 :a1596 :a1596. :a1597 :a1597 :a1597. :a1598 :a1598 :a1598. :a1599 :a1599 :a1599. :a1600 :a1600 :a1600. :a1601 :a1601 :a1601. :a1602 :a1602 :a1602. :a1603 :a1603 :a1603. :a1604 :a1604 :a1604. :a1605 :a1605 :a1605. :a1606 :a1606 :a1606. :a1607 :a1607 :a1607. :a1608 :a1608 :a1608. :a1609 :a1609 :a1609. :a1610 :a1610 :a1610. :a1611 :a1611 :a1611. :a1612 :a1612 :a1612. :a1613 :a1613 :a1613. :a1614 :a1614 :a1614. :a1615 :a1615 :a1615. :a1616 :a1616 :a1616. :a1617 :a1617 :a1617. :a1618 :a1618 :a1618. :a1619 :a1619 :a1619. :a1620 :a1620 :a1620. :a1621 :a1621 :a1621. :a1622 :a1622 :a1622. :a1623 :a1623 :a1623. :a1624 :a1624 :a1624. :a1625 :a1625 :a1625. :a1626 :a1626 :a1626. :a1627 :a1627 :a1627. :a1628 :a1628 :a1628. :a1629 :a1629 :a1629. :a1630 :a1630 :a1630. :a1631 :a1631 :a1631. :a1632 :a1632 :a1632. :a1633 :a1633 :a1633. :a1634 :a1634 :a1634. :a1635 :a1635 :a1635. :a1636 :a1636 :a1636. :a1637 :a1637 :a1637. :a1638 :a1638 :a1638. :a1639 :a1639 :a1639. :a1640 :a1640 :a1640. :a1641 :a1641 :a1641. :a1642 :a1642 :a1642. :a1643 :a1643 :a1643. :a1644 :a1644 :a1644. :a1645 :a1645 :a1645. :a1646 :a1646 :a1646. :a1647 :a1647 :a1647. :a1648 :a1648 :a1648. :a1649 :a1649 :a1649. :a1650 :a1650 :a1650. :a1651 :a1651 :a1651. :a1652 :a1652 :a1652. :a1653 :a1653 :a1653. :a1654 :a1654 :a1654. :a1655 :a1655 :a1655. :a1656 :a1656 :a1656. :a1657 :a1657 :a1657. :a1658 :a1658 :a1658. :a1659 :a1659 :a1659. :a1660 :a1660 :a1660. :a1661 :a1661 :a1661. :a1662 :a1662 :a1662. :a1663 :a1663 :a1663. :a1664 :a1664 :a1664. :a1665 :a1665 :a1665. :a1666 :a1666 :a1666. :a1667 :a1667 :a1667. :a1668 :a1668 :a1668. :a1669 :a1669 :a1669. :a1670 :a1670 :a1670. :a1671 :a1671 :a1671. :a1672 :a1672 :a1672. :a1673 :a1673 :a1673. :a1674 :a1674 :a1674. :a1675 :a1675 :a1675. :a1676 :a1676 :a1676. :a1677 :a1677 :a1677. :a1678 :a1678 :a1678. :a1679 :a1679 :a1679. :a1680 :a1680 :a1680. :a1681 :a1681 :a1681. :a1682 :a1682 :a1682. :a1683 :a1683 :a1683. :a1684 :a1684 :a1684. :a1685 :a1685 :a1685. :a1686 :a1686 :a1686. :a1687 :a1687 :a1687. :a1688 :a1688 :a1688. :a1689 :a1689 :a1689. :a1690 :a1690 :a1690. :a1691 :a1691 :a1691. :a1692 :a1692 :a1692. :a1693 :a1693 :a1693. :a1694 :a1694 :a1694. :a1695 :a1695 :a1695. :a1696 :a1696 :a1696. :a1697 :a1697 :a1697. :a1698 :a1698 :a1698. :a1699 :a1699 :a1699. :a1700 :a1700 :a1700. :a1701 :a1701 :a1701. :a1702 :a1702 :a1702. :a1703 :a1703 :a1703. :a1704 :a1704 :a1704. :a1705 :a1705 :a1705. :a1706 :a1706 :a1706. :a1707 :a1707 :a1707. :a1708 :a1708 :a1708. :a1709 :a1709 :a1709. :a1710 :a1710 :a1710. :a1711 :a1711 :a1711. :a1712 :a1712 :a1712. :a1713 :a1713 :a1713. :a1714 :a1714 :a1714. :a1715 :a1715 :a1715. :a1716 :a1716 :a1716. :a1717 :a1717 :a1717. :a1718 :a1718 :a1718. :a1719 :a1719 :a1719. :a1720 :a1720 :a1720. :a1721 :a1721 :a1721. :a1722 :a1722 :a1722. :a1723 :a1723 :a1723. :a1724 :a1724 :a1724. :a1725 :a1725 :a1725. :a1726 :a1726 :a1726. :a1727 :a1727 :a1727. :a1728 :a1728 :a1728. :a1729 :a1729 :a1729. :a1730 :a1730 :a1730. :a1731 :a1731 :a1731. :a1732 :a1732 :a1732. :a1733 :a1733 :a1733. :a1734 :a1734 :a1734. :a1735 :a1735 :a1735. :a1736 :a1736 :a1736. :a1737 :a1737 :a1737. :a1738 :a1738 :a1738. :a1739 :a1739 :a1739. :a1740 :a1740 :a1740. :a1741 :a1741 :a1741. :a1742 :a1742 :a1742. :a1743 :a1743 :a1743. :a1744 :a1744 :a1744. :a1745 :a1745 :a1745. :a1746 :a1746 :a1746. :a1747 :a1747 :a1747. :a1748 :a1748 :a1748. :a1749 :a1749 :a1749. :a1750 :a1750 :a1750. :a1751 :a1751 :a1751. :a1752 :a1752 :a1752. :a1753 :a1753 :a1753. :a1754 :a1754 :a1754. :a1755 :a1755 :a1755. :a1756 :a1756 :a1756. :a1757 :a1757 :a1757. :a1758 :a1758 :a1758. :a1759 :a1759 :a1759. :a1760 :a1760 :a1760. :a1761 :a1761 :a1761. :a1762 :a1762 :a1762. :a1763 :a1763 :a1763. :a1764 :a1764 :a1764. :a1765 :a1765 :a1765. :a1766 :a1766 :a1766. :a1767 :a1767 :a1767. :a1768 :a1768 :a1768. :a1769 :a1769 :a1769. :a1770 :a1770 :a1770. :a1771 :a1771 :a1771. :a1772 :a1772 :a1772. :a1773 :a1773 :a1773. :a1774 :a1774 :a1774. :a1775 :a1775 :a1775. :a1776 :a1776 :a1776. :a1777 :a1777 :a1777. :a1778 :a1778 :a1778. :a1779 :a1779 :a1779. :a1780 :a1780 :a1780. :a1781 :a1781 :a1781. :a1782 :a1782 :a1782. :a1783 :a1783 :a1783. :a1784 :a1784 :a1784. :a1785 :a1785 :a1785. :a1786 :a1786 :a1786. :a1787 :a1787 :a1787. :a1788 :a1788 :a1788. :a1789 :a1789 :a1789. :a1790 :a1790 :a1790. :a1791 :a1791 :a1791. :a1792 :a1792 :a1792. :a1793 :a1793 :a1793. :a1794 :a1794 :a1794. :a1795 :a1795 :a1795. :a1796 :a1796 :a1796. :a1797 :a1797 :a1797. :a1798 :a1798 :a1798. :a1799 :a1799 :a1799. :a1800 :a1800 :a1800. :a1801 :a1801 :a1801. :a1802 :a1802 :a1802. :a1803 :a1803 :a1803. :a1804 :a1804 :a1804. :a1805 :a1805 :a1805. :a1806 :a1806 :a1806. :a1807 :a1807 :a1807. :a1808 :a1808 :a1808. :a1809 :a1809 :a1809. :a1810 :a1810 :a1810. :a1811 :a1811 :a1811. :a1812 :a1812 :a1812. :a1813 :a1813 :a1813. :a1814 :a1814 :a1814. :a1815 :a1815 :a1815. :a1816 :a1816 :a1816. :a1817 :a1817 :a1817. :a1818 :a1818 :a1818. :a1819 :a1819 :a1819. :a1820 :a1820 :a1820. :a1821 :a1821 :a1821. :a1822 :a1822 :a1822. :a1823 :a1823 :a1823. :a1824 :a1824 :a1824. :a1825 :a1825 :a1825. :a1826 :a1826 :a1826. :a1827 :a1827 :a1827. :a1828 :a1828 :a1828. :a1829 :a1829 :a1829. :a1830 :a1830 :a1830. :a1831 :a1831 :a1831. :a1832 :a1832 :a1832. :a1833 :a1833 :a1833. :a1834 :a1834 :a1834. :a1835 :a1835 :a1835. :a1836 :a1836 :a1836. :a1837 :a1837 :a1837. :a1838 :a1838 :a1838. :a1839 :a1839 :a1839. :a1840 :a1840 :a1840. :a1841 :a1841 :a1841. :a1842 :a1842 :a1842. :a1843 :a1843 :a1843. :a1844 :a1844 :a1844. :a1845 :a1845 :a1845. :a1846 :a1846 :a1846. :a1847 :a1847 :a1847. :a1848 :a1848 :a1848. :a1849 :a1849 :a1849. :a1850 :a1850 :a1850. :a1851 :a1851 :a1851. :a1852 :a1852 :a1852. :a1853 :a1853 :a1853. :a1854 :a1854 :a1854. :a1855 :a1855 :a1855. :a1856 :a1856 :a1856. :a1857 :a1857 :a1857. :a1858 :a1858 :a1858. :a1859 :a1859 :a1859. :a1860 :a1860 :a1860. :a1861 :a1861 :a1861. :a1862 :a1862 :a1862. :a1863 :a1863 :a1863. :a1864 :a1864 :a1864. :a1865 :a1865 :a1865. :a1866 :a1866 :a1866. :a1867 :a1867 :a1867. :a1868 :a1868 :a1868. :a1869 :a1869 :a1869. :a1870 :a1870 :a1870. :a1871 :a1871 :a1871. :a1872 :a1872 :a1872. :a1873 :a1873 :a1873. :a1874 :a1874 :a1874. :a1875 :a1875 :a1875. :a1876 :a1876 :a1876. :a1877 :a1877 :a1877. :a1878 :a1878 :a1878. :a1879 :a1879 :a1879. :a1880 :a1880 :a1880. :a1881 :a1881 :a1881. :a1882 :a1882 :a1882. :a1883 :a1883 :a1883. :a1884 :a1884 :a1884. :a1885 :a1885 :a1885. :a1886 :a1886 :a1886. :a1887 :a1887 :a1887. :a1888 :a1888 :a1888. :a1889 :a1889 :a1889. :a1890 :a1890 :a1890. :a1891 :a1891 :a1891. :a1892 :a1892 :a1892. :a1893 :a1893 :a1893. :a1894 :a1894 :a1894. :a1895 :a1895 :a1895. :a1896 :a1896 :a1896. :a1897 :a1897 :a1897. :a1898 :a1898 :a1898. :a1899 :a1899 :a1899. :a1900 :a1900 :a1900. :a1901 :a1901 :a1901. :a1902 :a1902 :a1902. :a1903 :a1903 :a1903. :a1904 :a1904 :a1904. :a1905 :a1905 :a1905. :a1906 :a1906 :a1906. :a1907 :a1907 :a1907. :a1908 :a1908 :a1908. :a1909 :a1909 :a1909. :a1910 :a1910 :a1910. :a1911 :a1911 :a1911. :a1912 :a1912 :a1912. :a1913 :a1913 :a1913. :a1914 :a1914 :a1914. :a1915 :a1915 :a1915. :a1916 :a1916 :a1916. :a1917 :a1917 :a1917. :a1918 :a1918 :a1918. :a1919 :a1919 :a1919. :a1920 :a1920 :a1920. :a1921 :a1921 :a1921. :a1922 :a1922 :a1922. :a1923 :a1923 :a1923. :a1924 :a1924 :a1924. :a1925 :a1925 :a1925. :a1926 :a1926 :a1926. :a1927 :a1927 :a1927. :a1928 :a1928 :a1928. :a1929 :a1929 :a1929. :a1930 :a1930 :a1930. :a1931 :a1931 :a1931. :a1932 :a1932 :a1932. :a1933 :a1933 :a1933. :a1934 :a1934 :a1934. :a1935 :a1935 :a1935. :a1936 :a1936 :a1936. :a1937 :a1937 :a1937. :a1938 :a1938 :a1938. :a1939 :a1939 :a1939. :a1940 :a1940 :a1940. :a1941 :a1941 :a1941. :a1942 :a1942 :a1942. :a1943 :a1943 :a1943. :a1944 :a1944 :a1944. :a1945 :a1945 :a1945. :a1946 :a1946 :a1946. :a1947 :a1947 :a1947. :a1948 :a1948 :a1948. :a1949 :a1949 :a1949. :a1950 :a1950 :a1950. :a1951 :a1951 :a1951. :a1952 :a1952 :a1952. :a1953 :a1953 :a1953. :a1954 :a1954 :a1954. :a1955 :a1955 :a1955. :a1956 :a1956 :a1956. :a1957 :a1957 :a1957. :a1958 :a1958 :a1958. :a1959 :a1959 :a1959. :a1960 :a1960 :a1960. :a1961 :a1961 :a1961. :a1962 :a1962 :a1962. :a1963 :a1963 :a1963. :a1964 :a1964 :a1964. :a1965 :a1965 :a1965. :a1966 :a1966 :a1966. :a1967 :a1967 :a1967. :a1968 :a1968 :a1968. :a1969 :a1969 :a1969. :a1970 :a1970 :a1970. :a1971 :a1971 :a1971. :a1972 :a1972 :a1972. :a1973 :a1973 :a1973. :a1974 :a1974 :a1974. :a1975 :a1975 :a1975. :a1976 :a1976 :a1976. :a1977 :a1977 :a1977. :a1978 :a1978 :a1978. :a1979 :a1979 :a1979. :a1980 :a1980 :a1980. :a1981 :a1981 :a1981. :a1982 :a1982 :a1982. :a1983 :a1983 :a1983. :a1984 :a1984 :a1984. :a1985 :a1985 :a1985. :a1986 :a1986 :a1986. :a1987 :a1987 :a1987. :a1988 :a1988 :a1988. :a1989 :a1989 :a1989. :a1990 :a1990 :a1990. :a1991 :a1991 :a1991. :a1992 :a1992 :a1992. :a1993 :a1993 :a1993. :a1994 :a1994 :a1994. :a1995 :a1995 :a1995. :a1996 :a1996 :a1996. :a1997 :a1997 :a1997. :a1998 :a1998 :a1998. :a1999 :a1999 :a1999. :a2000 :a2000 :a2000. :a2001 :a2001 :a2001. :a2002 :a2002 :a2002. :a2003 :a2003 :a2003. :a2004 :a2004 :a2004. :a2005 :a2005 :a2005. :a2006 :a2006 :a2006. :a2007 :a2007 :a2007. :a2008 :a2008 :a2008. :a2009 :a2009 :a2009. :a2010 :a2010 :a2010. :a2011 :a2011 :a2011. :a2012 :a2012 :a2012. :a2013 :a2013 :a2013. :a2014 :a2014 :a2014. :a2015 :a2015 :a2015. :a2016 :a2016 :a2016. :a2017 :a2017 :a2017. :a2018 :a2018 :a2018. :a2019 :a2019 :a2019. :a2020 :a2020 :a2020. :a2021 :a2021 :a2021. :a2022 :a2022 :a2022. :a2023 :a2023 :a2023. :a2024 :a2024 :a2024. :a2025 :a2025 :a2025. :a2026 :a2026 :a2026. :a2027 :a2027 :a2027. :a2028 :a2028 :a2028. :a2029 :a2029 :a2029. :a2030 :a2030 :a2030. :a2031 :a2031 :a2031. :a2032 :a2032 :a2032. :a2033 :a2033 :a2033. :a2034 :a2034 :a2034. :a2035 :a2035 :a2035. :a2036 :a2036 :a2036. :a2037 :a2037 :a2037. :a2038 :a2038 :a2038. :a2039 :a2039 :a2039. :a2040 :a2040 :a2040. :a2041 :a2041 :a2041. :a2042 :a2042 :a2042. :a2043 :a2043 :a2043. :a2044 :a2044 :a2044. :a2045 :a2045 :a2045. :a2046 :a2046 :a2046. :a2047 :a2047 :a2047. :a2048 :a2048 :a2048. :a2049 :a2049 :a2049. :a2050 :a2050 :a2050. :a2051 :a2051 :a2051. :a2052 :a2052 :a2052. :a2053 :a2053 :a2053. :a2054 :a2054 :a2054. :a2055 :a2055 :a2055. :a2056 :a2056 :a2056. :a2057 :a2057 :a2057. :a2058 :a2058 :a2058. :a2059 :a2059 :a2059. :a2060 :a2060 :a2060. :a2061 :a2061 :a2061. :a2062 :a2062 :a2062. :a2063 :a2063 :a2063. :a2064 :a2064 :a2064. :a2065 :a2065 :a2065. :a2066 :a2066 :a2066. :a2067 :a2067 :a2067. :a2068 :a2068 :a2068. :a2069 :a2069 :a2069. :a2070 :a2070 :a2070. :a2071 :a2071 :a2071. :a2072 :a2072 :a2072. :a2073 :a2073 :a2073. :a2074 :a2074 :a2074. :a2075 :a2075 :a2075. :a2076 :a2076 :a2076. :a2077 :a2077 :a2077. :a2078 :a2078 :a2078. :a2079 :a2079 :a2079. :a2080 :a2080 :a2080. :a2081 :a2081 :a2081. :a2082 :a2082 :a2082. :a2083 :a2083 :a2083. :a2084 :a2084 :a2084. :a2085 :a2085 :a2085. :a2086 :a2086 :a2086. :a2087 :a2087 :a2087. :a2088 :a2088 :a2088. :a2089 :a2089 :a2089. :a2090 :a2090 :a2090. :a2091 :a2091 :a2091. :a2092 :a2092 :a2092. :a2093 :a2093 :a2093. :a2094 :a2094 :a2094. :a2095 :a2095 :a2095. :a2096 :a2096 :a2096. :a2097 :a2097 :a2097. :a2098 :a2098 :a2098. :a2099 :a2099 :a2099. :a2100 :a2100 :a2100. :a2101 :a2101 :a2101. :a2102 :a2102 :a2102. :a2103 :a2103 :a2103. :a2104 :a2104 :a2104. :a2105 :a2105 :a2105. :a2106 :a2106 :a2106. :a2107 :a2107 :a2107. :a2108 :a2108 :a2108. :a2109 :a2109 :a2109. :a2110 :a2110 :a2110. :a2111 :a2111 :a2111. :a2112 :a2112 :a2112. :a2113 :a2113 :a2113. :a2114 :a2114 :a2114. :a2115 :a2115 :a2115. :a2116 :a2116 :a2116. :a2117 :a2117 :a2117. :a2118 :a2118 :a2118. :a2119 :a2119 :a2119. :a2120 :a2120 :a2120. :a2121 :a2121 :a2121. :a2122 :a2122 :a2122. :a2123 :a2123 :a2123. :a2124 :a2124 :a2124. :a2125 :a2125 :a2125. :a2126 :a2126 :a2126. :a2127 :a2127 :a2127. :a2128 :a2128 :a2128. :a2129 :a2129 :a2129. :a2130 :a2130 :a2130. :a2131 :a2131 :a2131. :a2132 :a2132 :a2132. :a2133 :a2133 :a2133. :a2134 :a2134 :a2134. :a2135 :a2135 :a2135. :a2136 :a2136 :a2136. :a2137 :a2137 :a2137. :a2138 :a2138 :a2138. :a2139 :a2139 :a2139. :a2140 :a2140 :a2140. :a2141 :a2141 :a2141. :a2142 :a2142 :a2142. :a2143 :a2143 :a2143. :a2144 :a2144 :a2144. :a2145 :a2145 :a2145. :a2146 :a2146 :a2146. :a2147 :a2147 :a2147. :a2148 :a2148 :a2148. :a2149 :a2149 :a2149. :a2150 :a2150 :a2150. :a2151 :a2151 :a2151. :a2152 :a2152 :a2152. :a2153 :a2153 :a2153. :a2154 :a2154 :a2154. :a2155 :a2155 :a2155. :a2156 :a2156 :a2156. :a2157 :a2157 :a2157. :a2158 :a2158 :a2158. :a2159 :a2159 :a2159. :a2160 :a2160 :a2160. :a2161 :a2161 :a2161. :a2162 :a2162 :a2162. :a2163 :a2163 :a2163. :a2164 :a2164 :a2164. :a2165 :a2165 :a2165. :a2166 :a2166 :a2166. :a2167 :a2167 :a2167. :a2168 :a2168 :a2168. :a2169 :a2169 :a2169. :a2170 :a2170 :a2170. :a2171 :a2171 :a2171. :a2172 :a2172 :a2172. :a2173 :a2173 :a2173. :a2174 :a2174 :a2174. :a2175 :a2175 :a2175. :a2176 :a2176 :a2176. :a2177 :a2177 :a2177. :a2178 :a2178 :a2178. :a2179 :a2179 :a2179. :a2180 :a2180 :a2180. :a2181 :a2181 :a2181. :a2182 :a2182 :a2182. :a2183 :a2183 :a2183. :a2184 :a2184 :a2184. :a2185 :a2185 :a2185. :a2186 :a2186 :a2186. :a2187 :a2187 :a2187. :a2188 :a2188 :a2188. :a2189 :a2189 :a2189. :a2190 :a2190 :a2190. :a2191 :a2191 :a2191. :a2192 :a2192 :a2192. :a2193 :a2193 :a2193. :a2194 :a2194 :a2194. :a2195 :a2195 :a2195. :a2196 :a2196 :a2196. :a2197 :a2197 :a2197. :a2198 :a2198 :a2198. :a2199 :a2199 :a2199. :a2200 :a2200 :a2200. :a2201 :a2201 :a2201. :a2202 :a2202 :a2202. :a2203 :a2203 :a2203. :a2204 :a2204 :a2204. :a2205 :a2205 :a2205. :a2206 :a2206 :a2206. :a2207 :a2207 :a2207. :a2208 :a2208 :a2208. :a2209 :a2209 :a2209. :a2210 :a2210 :a2210. :a2211 :a2211 :a2211. :a2212 :a2212 :a2212. :a2213 :a2213 :a2213. :a2214 :a2214 :a2214. :a2215 :a2215 :a2215. :a2216 :a2216 :a2216. :a2217 :a2217 :a2217. :a2218 :a2218 :a2218. :a2219 :a2219 :a2219. :a2220 :a2220 :a2220. :a2221 :a2221 :a2221. :a2222 :a2222 :a2222. :a2223 :a2223 :a2223. :a2224 :a2224 :a2224. :a2225 :a2225 :a2225. :a2226 :a2226 :a2226. :a2227 :a2227 :a2227. :a2228 :a2228 :a2228. :a2229 :a2229 :a2229. :a2230 :a2230 :a2230. :a2231 :a2231 :a2231. :a2232 :a2232 :a2232. :a2233 :a2233 :a2233. :a2234 :a2234 :a2234. :a2235 :a2235 :a2235. :a2236 :a2236 :a2236. :a2237 :a2237 :a2237. :a2238 :a2238 :a2238. :a2239 :a2239 :a2239. :a2240 :a2240 :a2240. :a2241 :a2241 :a2241. :a2242 :a2242 :a2242. :a2243 :a2243 :a2243. :a2244 :a2244 :a2244. :a2245 :a2245 :a2245. :a2246 :a2246 :a2246. :a2247 :a2247 :a2247. :a2248 :a2248 :a2248. :a2249 :a2249 :a2249. :a2250 :a2250 :a2250. :a2251 :a2251 :a2251. :a2252 :a2252 :a2252. :a2253 :a2253 :a2253. :a2254 :a2254 :a2254. :a2255 :a2255 :a2255. :a2256 :a2256 :a2256. :a2257 :a2257 :a2257. :a2258 :a2258 :a2258. :a2259 :a2259 :a2259. :a2260 :a2260 :a2260. :a2261 :a2261 :a2261. :a2262 :a2262 :a2262. :a2263 :a2263 :a2263. :a2264 :a2264 :a2264. :a2265 :a2265 :a2265. :a2266 :a2266 :a2266. :a2267 :a2267 :a2267. :a2268 :a2268 :a2268. :a2269 :a2269 :a2269. :a2270 :a2270 :a2270. :a2271 :a2271 :a2271. :a2272 :a2272 :a2272. :a2273 :a2273 :a2273. :a2274 :a2274 :a2274. :a2275 :a2275 :a2275. :a2276 :a2276 :a2276. :a2277 :a2277 :a2277. :a2278 :a2278 :a2278. :a2279 :a2279 :a2279. :a2280 :a2280 :a2280. :a2281 :a2281 :a2281. :a2282 :a2282 :a2282. :a2283 :a2283 :a2283. :a2284 :a2284 :a2284. :a2285 :a2285 :a2285. :a2286 :a2286 :a2286. :a2287 :a2287 :a2287. :a2288 :a2288 :a2288. :a2289 :a2289 :a2289. :a2290 :a2290 :a2290. :a2291 :a2291 :a2291. :a2292 :a2292 :a2292. :a2293 :a2293 :a2293. :a2294 :a2294 :a2294. :a2295 :a2295 :a2295. :a2296 :a2296 :a2296. :a2297 :a2297 :a2297. :a2298 :a2298 :a2298. :a2299 :a2299 :a2299. :a2300 :a2300 :a2300. :a2301 :a2301 :a2301. :a2302 :a2302 :a2302. :a2303 :a2303 :a2303. :a2304 :a2304 :a2304. :a2305 :a2305 :a2305. :a2306 :a2306 :a2306. :a2307 :a2307 :a2307. :a2308 :a2308 :a2308. :a2309 :a2309 :a2309. :a2310 :a2310 :a2310. :a2311 :a2311 :a2311. :a2312 :a2312 :a2312. :a2313 :a2313 :a2313. :a2314 :a2314 :a2314. :a2315 :a2315 :a2315. :a2316 :a2316 :a2316. :a2317 :a2317 :a2317. :a2318 :a2318 :a2318. :a2319 :a2319 :a2319. :a2320 :a2320 :a2320. :a2321 :a2321 :a2321. :a2322 :a2322 :a2322. :a2323 :a2323 :a2323. :a2324 :a2324 :a2324. :a2325 :a2325 :a2325. :a2326 :a2326 :a2326. :a2327 :a2327 :a2327. :a2328 :a2328 :a2328. :a2329 :a2329 :a2329. :a2330 :a2330 :a2330. :a2331 :a2331 :a2331. :a2332 :a2332 :a2332. :a2333 :a2333 :a2333. :a2334 :a2334 :a2334. :a2335 :a2335 :a2335. :a2336 :a2336 :a2336. :a2337 :a2337 :a2337. :a2338 :a2338 :a2338. :a2339 :a2339 :a2339. :a2340 :a2340 :a2340. :a2341 :a2341 :a2341. :a2342 :a2342 :a2342. :a2343 :a2343 :a2343. :a2344 :a2344 :a2344. :a2345 :a2345 :a2345. :a2346 :a2346 :a2346. :a2347 :a2347 :a2347. :a2348 :a2348 :a2348. :a2349 :a2349 :a2349. :a2350 :a2350 :a2350. :a2351 :a2351 :a2351. :a2352 :a2352 :a2352. :a2353 :a2353 :a2353. :a2354 :a2354 :a2354. :a2355 :a2355 :a2355. :a2356 :a2356 :a2356. :a2357 :a2357 :a2357. :a2358 :a2358 :a2358. :a2359 :a2359 :a2359. :a2360 :a2360 :a2360. :a2361 :a2361 :a2361. :a2362 :a2362 :a2362. :a2363 :a2363 :a2363. :a2364 :a2364 :a2364. :a2365 :a2365 :a2365. :a2366 :a2366 :a2366. :a2367 :a2367 :a2367. :a2368 :a2368 :a2368. :a2369 :a2369 :a2369. :a2370 :a2370 :a2370. :a2371 :a2371 :a2371. :a2372 :a2372 :a2372. :a2373 :a2373 :a2373. :a2374 :a2374 :a2374. :a2375 :a2375 :a2375. :a2376 :a2376 :a2376. :a2377 :a2377 :a2377. :a2378 :a2378 :a2378. :a2379 :a2379 :a2379. :a2380 :a2380 :a2380. :a2381 :a2381 :a2381. :a2382 :a2382 :a2382. :a2383 :a2383 :a2383. :a2384 :a2384 :a2384. :a2385 :a2385 :a2385. :a2386 :a2386 :a2386. :a2387 :a2387 :a2387. :a2388 :a2388 :a2388. :a2389 :a2389 :a2389. :a2390 :a2390 :a2390. :a2391 :a2391 :a2391. :a2392 :a2392 :a2392. :a2393 :a2393 :a2393. :a2394 :a2394 :a2394. :a2395 :a2395 :a2395. :a2396 :a2396 :a2396. :a2397 :a2397 :a2397. :a2398 :a2398 :a2398. :a2399 :a2399 :a2399. :a2400 :a2400 :a2400. :a2401 :a2401 :a2401. :a2402 :a2402 :a2402. :a2403 :a2403 :a2403. :a2404 :a2404 :a2404. :a2405 :a2405 :a2405. :a2406 :a2406 :a2406. :a2407 :a2407 :a2407. :a2408 :a2408 :a2408. :a2409 :a2409 :a2409. :a2410 :a2410 :a2410. :a2411 :a2411 :a2411. :a2412 :a2412 :a2412. :a2413 :a2413 :a2413. :a2414 :a2414 :a2414. :a2415 :a2415 :a2415. :a2416 :a2416 :a2416. :a2417 :a2417 :a2417. :a2418 :a2418 :a2418. :a2419 :a2419 :a2419. :a2420 :a2420 :a2420. :a2421 :a2421 :a2421. :a2422 :a2422 :a2422. :a2423 :a2423 :a2423. :a2424 :a2424 :a2424. :a2425 :a2425 :a2425. :a2426 :a2426 :a2426. :a2427 :a2427 :a2427. :a2428 :a2428 :a2428. :a2429 :a2429 :a2429. :a2430 :a2430 :a2430. :a2431 :a2431 :a2431. :a2432 :a2432 :a2432. :a2433 :a2433 :a2433. :a2434 :a2434 :a2434. :a2435 :a2435 :a2435. :a2436 :a2436 :a2436. :a2437 :a2437 :a2437. :a2438 :a2438 :a2438. :a2439 :a2439 :a2439. :a2440 :a2440 :a2440. :a2441 :a2441 :a2441. :a2442 :a2442 :a2442. :a2443 :a2443 :a2443. :a2444 :a2444 :a2444. :a2445 :a2445 :a2445. :a2446 :a2446 :a2446. :a2447 :a2447 :a2447. :a2448 :a2448 :a2448. :a2449 :a2449 :a2449. :a2450 :a2450 :a2450. :a2451 :a2451 :a2451. :a2452 :a2452 :a2452. :a2453 :a2453 :a2453. :a2454 :a2454 :a2454. :a2455 :a2455 :a2455. :a2456 :a2456 :a2456. :a2457 :a2457 :a2457. :a2458 :a2458 :a2458. :a2459 :a2459 :a2459. :a2460 :a2460 :a2460. :a2461 :a2461 :a2461. :a2462 :a2462 :a2462. :a2463 :a2463 :a2463. :a2464 :a2464 :a2464. :a2465 :a2465 :a2465. :a2466 :a2466 :a2466. :a2467 :a2467 :a2467. :a2468 :a2468 :a2468. :a2469 :a2469 :a2469. :a2470 :a2470 :a2470. :a2471 :a2471 :a2471. :a2472 :a2472 :a2472. :a2473 :a2473 :a2473. :a2474 :a2474 :a2474. :a2475 :a2475 :a2475. :a2476 :a2476 :a2476. :a2477 :a2477 :a2477. :a2478 :a2478 :a2478. :a2479 :a2479 :a2479. :a2480 :a2480 :a2480. :a2481 :a2481 :a2481. :a2482 :a2482 :a2482. :a2483 :a2483 :a2483. :a2484 :a2484 :a2484. :a2485 :a2485 :a2485. :a2486 :a2486 :a2486. :a2487 :a2487 :a2487. :a2488 :a2488 :a2488. :a2489 :a2489 :a2489. :a2490 :a2490 :a2490. :a2491 :a2491 :a2491. :a2492 :a2492 :a2492. :a2493 :a2493 :a2493. :a2494 :a2494 :a2494. :a2495 :a2495 :a2495. :a2496 :a2496 :a2496. :a2497 :a2497 :a2497. :a2498 :a2498 :a2498. :a2499 :a2499 :a2499. :a2500 :a2500 :a2500. :a2501 :a2501 :a2501. :a2502 :a2502 :a2502. :a2503 :a2503 :a2503. :a2504 :a2504 :a2504. :a2505 :a2505 :a2505. :a2506 :a2506 :a2506. :a2507 :a2507 :a2507. :a2508 :a2508 :a2508. :a2509 :a2509 :a2509. :a2510 :a2510 :a2510. :a2511 :a2511 :a2511. :a2512 :a2512 :a2512. :a2513 :a2513 :a2513. :a2514 :a2514 :a2514. :a2515 :a2515 :a2515. :a2516 :a2516 :a2516. :a2517 :a2517 :a2517. :a2518 :a2518 :a2518. :a2519 :a2519 :a2519. :a2520 :a2520 :a2520. :a2521 :a2521 :a2521. :a2522 :a2522 :a2522. :a2523 :a2523 :a2523. :a2524 :a2524 :a2524. :a2525 :a2525 :a2525. :a2526 :a2526 :a2526. :a2527 :a2527 :a2527. :a2528 :a2528 :a2528. :a2529 :a2529 :a2529. :a2530 :a2530 :a2530. :a2531 :a2531 :a2531. :a2532 :a2532 :a2532. :a2533 :a2533 :a2533. :a2534 :a2534 :a2534. :a2535 :a2535 :a2535. :a2536 :a2536 :a2536. :a2537 :a2537 :a2537. :a2538 :a2538 :a2538. :a2539 :a2539 :a2539. :a2540 :a2540 :a2540. :a2541 :a2541 :a2541. :a2542 :a2542 :a2542. :a2543 :a2543 :a2543. :a2544 :a2544 :a2544. :a2545 :a2545 :a2545. :a2546 :a2546 :a2546. :a2547 :a2547 :a2547. :a2548 :a2548 :a2548. :a2549 :a2549 :a2549. :a2550 :a2550 :a2550. :a2551 :a2551 :a2551. :a2552 :a2552 :a2552. :a2553 :a2553 :a2553. :a2554 :a2554 :a2554. :a2555 :a2555 :a2555. :a2556 :a2556 :a2556. :a2557 :a2557 :a2557. :a2558 :a2558 :a2558. :a2559 :a2559 :a2559. :a2560 :a2560 :a2560. :a2561 :a2561 :a2561. :a2562 :a2562 :a2562. :a2563 :a2563 :a2563. :a2564 :a2564 :a2564. :a2565 :a2565 :a2565. :a2566 :a2566 :a2566. :a2567 :a2567 :a2567. :a2568 :a2568 :a2568. :a2569 :a2569 :a2569. :a2570 :a2570 :a2570. :a2571 :a2571 :a2571. :a2572 :a2572 :a2572. :a2573 :a2573 :a2573. :a2574 :a2574 :a2574. :a2575 :a2575 :a2575. :a2576 :a2576 :a2576. :a2577 :a2577 :a2577. :a2578 :a2578 :a2578. :a2579 :a2579 :a2579. :a2580 :a2580 :a2580. :a2581 :a2581 :a2581. :a2582 :a2582 :a2582. :a2583 :a2583 :a2583. :a2584 :a2584 :a2584. :a2585 :a2585 :a2585. :a2586 :a2586 :a2586. :a2587 :a2587 :a2587. :a2588 :a2588 :a2588. :a2589 :a2589 :a2589. :a2590 :a2590 :a2590. :a2591 :a2591 :a2591. :a2592 :a2592 :a2592. :a2593 :a2593 :a2593. :a2594 :a2594 :a2594. :a2595 :a2595 :a2595. :a2596 :a2596 :a2596. :a2597 :a2597 :a2597. :a2598 :a2598 :a2598. :a2599 :a2599 :a2599. :a2600 :a2600 :a2600. :a2601 :a2601 :a2601. :a2602 :a2602 :a2602. :a2603 :a2603 :a2603. :a2604 :a2604 :a2604. :a2605 :a2605 :a2605. :a2606 :a2606 :a2606. :a2607 :a2607 :a2607. :a2608 :a2608 :a2608. :a2609 :a2609 :a2609. :a2610 :a2610 :a2610. :a2611 :a2611 :a2611. :a2612 :a2612 :a2612. :a2613 :a2613 :a2613. :a2614 :a2614 :a2614. :a2615 :a2615 :a2615. :a2616 :a2616 :a2616. :a2617 :a2617 :a2617. :a2618 :a2618 :a2618. :a2619 :a2619 :a2619. :a2620 :a2620 :a2620. :a2621 :a2621 :a2621. :a2622 :a2622 :a2622. :a2623 :a2623 :a2623. :a2624 :a2624 :a2624. :a2625 :a2625 :a2625. :a2626 :a2626 :a2626. :a2627 :a2627 :a2627. :a2628 :a2628 :a2628. :a2629 :a2629 :a2629. :a2630 :a2630 :a2630. :a2631 :a2631 :a2631. :a2632 :a2632 :a2632. :a2633 :a2633 :a2633. :a2634 :a2634 :a2634. :a2635 :a2635 :a2635. :a2636 :a2636 :a2636. :a2637 :a2637 :a2637. :a2638 :a2638 :a2638. :a2639 :a2639 :a2639. :a2640 :a2640 :a2640. :a2641 :a2641 :a2641. :a2642 :a2642 :a2642. :a2643 :a2643 :a2643. :a2644 :a2644 :a2644. :a2645 :a2645 :a2645. :a2646 :a2646 :a2646. :a2647 :a2647 :a2647. :a2648 :a2648 :a2648. :a2649 :a2649 :a2649. :a2650 :a2650 :a2650. :a2651 :a2651 :a2651. :a2652 :a2652 :a2652. :a2653 :a2653 :a2653. :a2654 :a2654 :a2654. :a2655 :a2655 :a2655. :a2656 :a2656 :a2656. :a2657 :a2657 :a2657. :a2658 :a2658 :a2658. :a2659 :a2659 :a2659. :a2660 :a2660 :a2660. :a2661 :a2661 :a2661. :a2662 :a2662 :a2662. :a2663 :a2663 :a2663. :a2664 :a2664 :a2664. :a2665 :a2665 :a2665. :a2666 :a2666 :a2666. :a2667 :a2667 :a2667. :a2668 :a2668 :a2668. :a2669 :a2669 :a2669. :a2670 :a2670 :a2670. :a2671 :a2671 :a2671. :a2672 :a2672 :a2672. :a2673 :a2673 :a2673. :a2674 :a2674 :a2674. :a2675 :a2675 :a2675. :a2676 :a2676 :a2676. :a2677 :a2677 :a2677. :a2678 :a2678 :a2678. :a2679 :a2679 :a2679. :a2680 :a2680 :a2680. :a2681 :a2681 :a2681. :a2682 :a2682 :a2682. :a2683 :a2683 :a2683. :a2684 :a2684 :a2684. :a2685 :a2685 :a2685. :a2686 :a2686 :a2686. :a2687 :a2687 :a2687. :a2688 :a2688 :a2688. :a2689 :a2689 :a2689. :a2690 :a2690 :a2690. :a2691 :a2691 :a2691. :a2692 :a2692 :a2692. :a2693 :a2693 :a2693. :a2694 :a2694 :a2694. :a2695 :a2695 :a2695. :a2696 :a2696 :a2696. :a2697 :a2697 :a2697. :a2698 :a2698 :a2698. :a2699 :a2699 :a2699. :a2700 :a2700 :a2700. :a2701 :a2701 :a2701. :a2702 :a2702 :a2702. :a2703 :a2703 :a2703. :a2704 :a2704 :a2704. :a2705 :a2705 :a2705. :a2706 :a2706 :a2706. :a2707 :a2707 :a2707. :a2708 :a2708 :a2708. :a2709 :a2709 :a2709. :a2710 :a2710 :a2710. :a2711 :a2711 :a2711. :a2712 :a2712 :a2712. :a2713 :a2713 :a2713. :a2714 :a2714 :a2714. :a2715 :a2715 :a2715. :a2716 :a2716 :a2716. :a2717 :a2717 :a2717. :a2718 :a2718 :a2718. :a2719 :a2719 :a2719. :a2720 :a2720 :a2720. :a2721 :a2721 :a2721. :a2722 :a2722 :a2722. :a2723 :a2723 :a2723. :a2724 :a2724 :a2724. :a2725 :a2725 :a2725. :a2726 :a2726 :a2726. :a2727 :a2727 :a2727. :a2728 :a2728 :a2728. :a2729 :a2729 :a2729. :a2730 :a2730 :a2730. :a2731 :a2731 :a2731. :a2732 :a2732 :a2732. :a2733 :a2733 :a2733. :a2734 :a2734 :a2734. :a2735 :a2735 :a2735. :a2736 :a2736 :a2736. :a2737 :a2737 :a2737. :a2738 :a2738 :a2738. :a2739 :a2739 :a2739. :a2740 :a2740 :a2740. :a2741 :a2741 :a2741. :a2742 :a2742 :a2742. :a2743 :a2743 :a2743. :a2744 :a2744 :a2744. :a2745 :a2745 :a2745. :a2746 :a2746 :a2746. :a2747 :a2747 :a2747. :a2748 :a2748 :a2748. :a2749 :a2749 :a2749. :a2750 :a2750 :a2750. :a2751 :a2751 :a2751. :a2752 :a2752 :a2752. :a2753 :a2753 :a2753. :a2754 :a2754 :a2754. :a2755 :a2755 :a2755. :a2756 :a2756 :a2756. :a2757 :a2757 :a2757. :a2758 :a2758 :a2758. :a2759 :a2759 :a2759. :a2760 :a2760 :a2760. :a2761 :a2761 :a2761. :a2762 :a2762 :a2762. :a2763 :a2763 :a2763. :a2764 :a2764 :a2764. :a2765 :a2765 :a2765. :a2766 :a2766 :a2766. :a2767 :a2767 :a2767. :a2768 :a2768 :a2768. :a2769 :a2769 :a2769. :a2770 :a2770 :a2770. :a2771 :a2771 :a2771. :a2772 :a2772 :a2772. :a2773 :a2773 :a2773. :a2774 :a2774 :a2774. :a2775 :a2775 :a2775. :a2776 :a2776 :a2776. :a2777 :a2777 :a2777. :a2778 :a2778 :a2778. :a2779 :a2779 :a2779. :a2780 :a2780 :a2780. :a2781 :a2781 :a2781. :a2782 :a2782 :a2782. :a2783 :a2783 :a2783. :a2784 :a2784 :a2784. :a2785 :a2785 :a2785. :a2786 :a2786 :a2786. :a2787 :a2787 :a2787. :a2788 :a2788 :a2788. :a2789 :a2789 :a2789. :a2790 :a2790 :a2790. :a2791 :a2791 :a2791. :a2792 :a2792 :a2792. :a2793 :a2793 :a2793. :a2794 :a2794 :a2794. :a2795 :a2795 :a2795. :a2796 :a2796 :a2796. :a2797 :a2797 :a2797. :a2798 :a2798 :a2798. :a2799 :a2799 :a2799. :a2800 :a2800 :a2800. :a2801 :a2801 :a2801. :a2802 :a2802 :a2802. :a2803 :a2803 :a2803. :a2804 :a2804 :a2804. :a2805 :a2805 :a2805. :a2806 :a2806 :a2806. :a2807 :a2807 :a2807. :a2808 :a2808 :a2808. :a2809 :a2809 :a2809. :a2810 :a2810 :a2810. :a2811 :a2811 :a2811. :a2812 :a2812 :a2812. :a2813 :a2813 :a2813. :a2814 :a2814 :a2814. :a2815 :a2815 :a2815. :a2816 :a2816 :a2816. :a2817 :a2817 :a2817. :a2818 :a2818 :a2818. :a2819 :a2819 :a2819. :a2820 :a2820 :a2820. :a2821 :a2821 :a2821. :a2822 :a2822 :a2822. :a2823 :a2823 :a2823. :a2824 :a2824 :a2824. :a2825 :a2825 :a2825. :a2826 :a2826 :a2826. :a2827 :a2827 :a2827. :a2828 :a2828 :a2828. :a2829 :a2829 :a2829. :a2830 :a2830 :a2830. :a2831 :a2831 :a2831. :a2832 :a2832 :a2832. :a2833 :a2833 :a2833. :a2834 :a2834 :a2834. :a2835 :a2835 :a2835. :a2836 :a2836 :a2836. :a2837 :a2837 :a2837. :a2838 :a2838 :a2838. :a2839 :a2839 :a2839. :a2840 :a2840 :a2840. :a2841 :a2841 :a2841. :a2842 :a2842 :a2842. :a2843 :a2843 :a2843. :a2844 :a2844 :a2844. :a2845 :a2845 :a2845. :a2846 :a2846 :a2846. :a2847 :a2847 :a2847. :a2848 :a2848 :a2848. :a2849 :a2849 :a2849. :a2850 :a2850 :a2850. :a2851 :a2851 :a2851. :a2852 :a2852 :a2852. :a2853 :a2853 :a2853. :a2854 :a2854 :a2854. :a2855 :a2855 :a2855. :a2856 :a2856 :a2856. :a2857 :a2857 :a2857. :a2858 :a2858 :a2858. :a2859 :a2859 :a2859. :a2860 :a2860 :a2860. :a2861 :a2861 :a2861. :a2862 :a2862 :a2862. :a2863 :a2863 :a2863. :a2864 :a2864 :a2864. :a2865 :a2865 :a2865. :a2866 :a2866 :a2866. :a2867 :a2867 :a2867. :a2868 :a2868 :a2868. :a2869 :a2869 :a2869. :a2870 :a2870 :a2870. :a2871 :a2871 :a2871. :a2872 :a2872 :a2872. :a2873 :a2873 :a2873. :a2874 :a2874 :a2874. :a2875 :a2875 :a2875. :a2876 :a2876 :a2876. :a2877 :a2877 :a2877. :a2878 :a2878 :a2878. :a2879 :a2879 :a2879. :a2880 :a2880 :a2880. :a2881 :a2881 :a2881. :a2882 :a2882 :a2882. :a2883 :a2883 :a2883. :a2884 :a2884 :a2884. :a2885 :a2885 :a2885. :a2886 :a2886 :a2886. :a2887 :a2887 :a2887. :a2888 :a2888 :a2888. :a2889 :a2889 :a2889. :a2890 :a2890 :a2890. :a2891 :a2891 :a2891. :a2892 :a2892 :a2892. :a2893 :a2893 :a2893. :a2894 :a2894 :a2894. :a2895 :a2895 :a2895. :a2896 :a2896 :a2896. :a2897 :a2897 :a2897. :a2898 :a2898 :a2898. :a2899 :a2899 :a2899. :a2900 :a2900 :a2900. :a2901 :a2901 :a2901. :a2902 :a2902 :a2902. :a2903 :a2903 :a2903. :a2904 :a2904 :a2904. :a2905 :a2905 :a2905. :a2906 :a2906 :a2906. :a2907 :a2907 :a2907. :a2908 :a2908 :a2908. :a2909 :a2909 :a2909. :a2910 :a2910 :a2910. :a2911 :a2911 :a2911. :a2912 :a2912 :a2912. :a2913 :a2913 :a2913. :a2914 :a2914 :a2914. :a2915 :a2915 :a2915. :a2916 :a2916 :a2916. :a2917 :a2917 :a2917. :a2918 :a2918 :a2918. :a2919 :a2919 :a2919. :a2920 :a2920 :a2920. :a2921 :a2921 :a2921. :a2922 :a2922 :a2922. :a2923 :a2923 :a2923. :a2924 :a2924 :a2924. :a2925 :a2925 :a2925. :a2926 :a2926 :a2926. :a2927 :a2927 :a2927. :a2928 :a2928 :a2928. :a2929 :a2929 :a2929. :a2930 :a2930 :a2930. :a2931 :a2931 :a2931. :a2932 :a2932 :a2932. :a2933 :a2933 :a2933. :a2934 :a2934 :a2934. :a2935 :a2935 :a2935. :a2936 :a2936 :a2936. :a2937 :a2937 :a2937. :a2938 :a2938 :a2938. :a2939 :a2939 :a2939. :a2940 :a2940 :a2940. :a2941 :a2941 :a2941. :a2942 :a2942 :a2942. :a2943 :a2943 :a2943. :a2944 :a2944 :a2944. :a2945 :a2945 :a2945. :a2946 :a2946 :a2946. :a2947 :a2947 :a2947. :a2948 :a2948 :a2948. :a2949 :a2949 :a2949. :a2950 :a2950 :a2950. :a2951 :a2951 :a2951. :a2952 :a2952 :a2952. :a2953 :a2953 :a2953. :a2954 :a2954 :a2954. :a2955 :a2955 :a2955. :a2956 :a2956 :a2956. :a2957 :a2957 :a2957. :a2958 :a2958 :a2958. :a2959 :a2959 :a2959. :a2960 :a2960 :a2960. :a2961 :a2961 :a2961. :a2962 :a2962 :a2962. :a2963 :a2963 :a2963. :a2964 :a2964 :a2964. :a2965 :a2965 :a2965. :a2966 :a2966 :a2966. :a2967 :a2967 :a2967. :a2968 :a2968 :a2968. :a2969 :a2969 :a2969. :a2970 :a2970 :a2970. :a2971 :a2971 :a2971. :a2972 :a2972 :a2972. :a2973 :a2973 :a2973. :a2974 :a2974 :a2974. :a2975 :a2975 :a2975. :a2976 :a2976 :a2976. :a2977 :a2977 :a2977. :a2978 :a2978 :a2978. :a2979 :a2979 :a2979. :a2980 :a2980 :a2980. :a2981 :a2981 :a2981. :a2982 :a2982 :a2982. :a2983 :a2983 :a2983. :a2984 :a2984 :a2984. :a2985 :a2985 :a2985. :a2986 :a2986 :a2986. :a2987 :a2987 :a2987. :a2988 :a2988 :a2988. :a2989 :a2989 :a2989. :a2990 :a2990 :a2990. :a2991 :a2991 :a2991. :a2992 :a2992 :a2992. :a2993 :a2993 :a2993. :a2994 :a2994 :a2994. :a2995 :a2995 :a2995. :a2996 :a2996 :a2996. :a2997 :a2997 :a2997. :a2998 :a2998 :a2998. :a2999 :a2999 :a2999. :a3000 :a3000 :a3000. :a3001 :a3001 :a3001. :a3002 :a3002 :a3002. :a3003 :a3003 :a3003. :a3004 :a3004 :a3004. :a3005 :a3005 :a3005. :a3006 :a3006 :a3006. :a3007 :a3007 :a3007. :a3008 :a3008 :a3008. :a3009 :a3009 :a3009. :a3010 :a3010 :a3010. :a3011 :a3011 :a3011. :a3012 :a3012 :a3012. :a3013 :a3013 :a3013. :a3014 :a3014 :a3014. :a3015 :a3015 :a3015. :a3016 :a3016 :a3016. :a3017 :a3017 :a3017. :a3018 :a3018 :a3018. :a3019 :a3019 :a3019. :a3020 :a3020 :a3020. :a3021 :a3021 :a3021. :a3022 :a3022 :a3022. :a3023 :a3023 :a3023. :a3024 :a3024 :a3024. :a3025 :a3025 :a3025. :a3026 :a3026 :a3026. :a3027 :a3027 :a3027. :a3028 :a3028 :a3028. :a3029 :a3029 :a3029. :a3030 :a3030 :a3030. :a3031 :a3031 :a3031. :a3032 :a3032 :a3032. :a3033 :a3033 :a3033. :a3034 :a3034 :a3034. :a3035 :a3035 :a3035. :a3036 :a3036 :a3036. :a3037 :a3037 :a3037. :a3038 :a3038 :a3038. :a3039 :a3039 :a3039. :a3040 :a3040 :a3040. :a3041 :a3041 :a3041. :a3042 :a3042 :a3042. :a3043 :a3043 :a3043. :a3044 :a3044 :a3044. :a3045 :a3045 :a3045. :a3046 :a3046 :a3046. :a3047 :a3047 :a3047. :a3048 :a3048 :a3048. :a3049 :a3049 :a3049. :a3050 :a3050 :a3050. :a3051 :a3051 :a3051. :a3052 :a3052 :a3052. :a3053 :a3053 :a3053. :a3054 :a3054 :a3054. :a3055 :a3055 :a3055. :a3056 :a3056 :a3056. :a3057 :a3057 :a3057. :a3058 :a3058 :a3058. :a3059 :a3059 :a3059. :a3060 :a3060 :a3060. :a3061 :a3061 :a3061. :a3062 :a3062 :a3062. :a3063 :a3063 :a3063. :a3064 :a3064 :a3064. :a3065 :a3065 :a3065. :a3066 :a3066 :a3066. :a3067 :a3067 :a3067. :a3068 :a3068 :a3068. :a3069 :a3069 :a3069. :a3070 :a3070 :a3070. :a3071 :a3071 :a3071. :a3072 :a3072 :a3072. :a3073 :a3073 :a3073. :a3074 :a3074 :a3074. :a3075 :a3075 :a3075. :a3076 :a3076 :a3076. :a3077 :a3077 :a3077. :a3078 :a3078 :a3078. :a3079 :a3079 :a3079. :a3080 :a3080 :a3080. :a3081 :a3081 :a3081. :a3082 :a3082 :a3082. :a3083 :a3083 :a3083. :a3084 :a3084 :a3084. :a3085 :a3085 :a3085. :a3086 :a3086 :a3086. :a3087 :a3087 :a3087. :a3088 :a3088 :a3088. :a3089 :a3089 :a3089. :a3090 :a3090 :a3090. :a3091 :a3091 :a3091. :a3092 :a3092 :a3092. :a3093 :a3093 :a3093. :a3094 :a3094 :a3094. :a3095 :a3095 :a3095. :a3096 :a3096 :a3096. :a3097 :a3097 :a3097. :a3098 :a3098 :a3098. :a3099 :a3099 :a3099. :a3100 :a3100 :a3100. :a3101 :a3101 :a3101. :a3102 :a3102 :a3102. :a3103 :a3103 :a3103. :a3104 :a3104 :a3104. :a3105 :a3105 :a3105. :a3106 :a3106 :a3106. :a3107 :a3107 :a3107. :a3108 :a3108 :a3108. :a3109 :a3109 :a3109. :a3110 :a3110 :a3110. :a3111 :a3111 :a3111. :a3112 :a3112 :a3112. :a3113 :a3113 :a3113. :a3114 :a3114 :a3114. :a3115 :a3115 :a3115. :a3116 :a3116 :a3116. :a3117 :a3117 :a3117. :a3118 :a3118 :a3118. :a3119 :a3119 :a3119. :a3120 :a3120 :a3120. :a3121 :a3121 :a3121. :a3122 :a3122 :a3122. :a3123 :a3123 :a3123. :a3124 :a3124 :a3124. :a3125 :a3125 :a3125. :a3126 :a3126 :a3126. :a3127 :a3127 :a3127. :a3128 :a3128 :a3128. :a3129 :a3129 :a3129. :a3130 :a3130 :a3130. :a3131 :a3131 :a3131. :a3132 :a3132 :a3132. :a3133 :a3133 :a3133. :a3134 :a3134 :a3134. :a3135 :a3135 :a3135. :a3136 :a3136 :a3136. :a3137 :a3137 :a3137. :a3138 :a3138 :a3138. :a3139 :a3139 :a3139. :a3140 :a3140 :a3140. :a3141 :a3141 :a3141. :a3142 :a3142 :a3142. :a3143 :a3143 :a3143. :a3144 :a3144 :a3144. :a3145 :a3145 :a3145. :a3146 :a3146 :a3146. :a3147 :a3147 :a3147. :a3148 :a3148 :a3148. :a3149 :a3149 :a3149. :a3150 :a3150 :a3150. :a3151 :a3151 :a3151. :a3152 :a3152 :a3152. :a3153 :a3153 :a3153. :a3154 :a3154 :a3154. :a3155 :a3155 :a3155. :a3156 :a3156 :a3156. :a3157 :a3157 :a3157. :a3158 :a3158 :a3158. :a3159 :a3159 :a3159. :a3160 :a3160 :a3160. :a3161 :a3161 :a3161. :a3162 :a3162 :a3162. :a3163 :a3163 :a3163. :a3164 :a3164 :a3164. :a3165 :a3165 :a3165. :a3166 :a3166 :a3166. :a3167 :a3167 :a3167. :a3168 :a3168 :a3168. :a3169 :a3169 :a3169. :a3170 :a3170 :a3170. :a3171 :a3171 :a3171. :a3172 :a3172 :a3172. :a3173 :a3173 :a3173. :a3174 :a3174 :a3174. :a3175 :a3175 :a3175. :a3176 :a3176 :a3176. :a3177 :a3177 :a3177. :a3178 :a3178 :a3178. :a3179 :a3179 :a3179. :a3180 :a3180 :a3180. :a3181 :a3181 :a3181. :a3182 :a3182 :a3182. :a3183 :a3183 :a3183. :a3184 :a3184 :a3184. :a3185 :a3185 :a3185. :a3186 :a3186 :a3186. :a3187 :a3187 :a3187. :a3188 :a3188 :a3188. :a3189 :a3189 :a3189. :a3190 :a3190 :a3190. :a3191 :a3191 :a3191. :a3192 :a3192 :a3192. :a3193 :a3193 :a3193. :a3194 :a3194 :a3194. :a3195 :a3195 :a3195. :a3196 :a3196 :a3196. :a3197 :a3197 :a3197. :a3198 :a3198 :a3198. :a3199 :a3199 :a3199. :a3200 :a3200 :a3200. :a3201 :a3201 :a3201. :a3202 :a3202 :a3202. :a3203 :a3203 :a3203. :a3204 :a3204 :a3204. :a3205 :a3205 :a3205. :a3206 :a3206 :a3206. :a3207 :a3207 :a3207. :a3208 :a3208 :a3208. :a3209 :a3209 :a3209. :a3210 :a3210 :a3210. :a3211 :a3211 :a3211. :a3212 :a3212 :a3212. :a3213 :a3213 :a3213. :a3214 :a3214 :a3214. :a3215 :a3215 :a3215. :a3216 :a3216 :a3216. :a3217 :a3217 :a3217. :a3218 :a3218 :a3218. :a3219 :a3219 :a3219. :a3220 :a3220 :a3220. :a3221 :a3221 :a3221. :a3222 :a3222 :a3222. :a3223 :a3223 :a3223. :a3224 :a3224 :a3224. :a3225 :a3225 :a3225. :a3226 :a3226 :a3226. :a3227 :a3227 :a3227. :a3228 :a3228 :a3228. :a3229 :a3229 :a3229. :a3230 :a3230 :a3230. :a3231 :a3231 :a3231. :a3232 :a3232 :a3232. :a3233 :a3233 :a3233. :a3234 :a3234 :a3234. :a3235 :a3235 :a3235. :a3236 :a3236 :a3236. :a3237 :a3237 :a3237. :a3238 :a3238 :a3238. :a3239 :a3239 :a3239. :a3240 :a3240 :a3240. :a3241 :a3241 :a3241. :a3242 :a3242 :a3242. :a3243 :a3243 :a3243. :a3244 :a3244 :a3244. :a3245 :a3245 :a3245. :a3246 :a3246 :a3246. :a3247 :a3247 :a3247. :a3248 :a3248 :a3248. :a3249 :a3249 :a3249. :a3250 :a3250 :a3250. :a3251 :a3251 :a3251. :a3252 :a3252 :a3252. :a3253 :a3253 :a3253. :a3254 :a3254 :a3254. :a3255 :a3255 :a3255. :a3256 :a3256 :a3256. :a3257 :a3257 :a3257. :a3258 :a3258 :a3258. :a3259 :a3259 :a3259. :a3260 :a3260 :a3260. :a3261 :a3261 :a3261. :a3262 :a3262 :a3262. :a3263 :a3263 :a3263. :a3264 :a3264 :a3264. :a3265 :a3265 :a3265. :a3266 :a3266 :a3266. :a3267 :a3267 :a3267. :a3268 :a3268 :a3268. :a3269 :a3269 :a3269. :a3270 :a3270 :a3270. :a3271 :a3271 :a3271. :a3272 :a3272 :a3272. :a3273 :a3273 :a3273. :a3274 :a3274 :a3274. :a3275 :a3275 :a3275. :a3276 :a3276 :a3276. :a3277 :a3277 :a3277. :a3278 :a3278 :a3278. :a3279 :a3279 :a3279. :a3280 :a3280 :a3280. :a3281 :a3281 :a3281. :a3282 :a3282 :a3282. :a3283 :a3283 :a3283. :a3284 :a3284 :a3284. :a3285 :a3285 :a3285. :a3286 :a3286 :a3286. :a3287 :a3287 :a3287. :a3288 :a3288 :a3288. :a3289 :a3289 :a3289. :a3290 :a3290 :a3290. :a3291 :a3291 :a3291. :a3292 :a3292 :a3292. :a3293 :a3293 :a3293. :a3294 :a3294 :a3294. :a3295 :a3295 :a3295. :a3296 :a3296 :a3296. :a3297 :a3297 :a3297. :a3298 :a3298 :a3298. :a3299 :a3299 :a3299. :a3300 :a3300 :a3300. :a3301 :a3301 :a3301. :a3302 :a3302 :a3302. :a3303 :a3303 :a3303. :a3304 :a3304 :a3304. :a3305 :a3305 :a3305. :a3306 :a3306 :a3306. :a3307 :a3307 :a3307. :a3308 :a3308 :a3308. :a3309 :a3309 :a3309. :a3310 :a3310 :a3310. :a3311 :a3311 :a3311. :a3312 :a3312 :a3312. :a3313 :a3313 :a3313. :a3314 :a3314 :a3314. :a3315 :a3315 :a3315. :a3316 :a3316 :a3316. :a3317 :a3317 :a3317. :a3318 :a3318 :a3318. :a3319 :a3319 :a3319. :a3320 :a3320 :a3320. :a3321 :a3321 :a3321. :a3322 :a3322 :a3322. :a3323 :a3323 :a3323. :a3324 :a3324 :a3324. :a3325 :a3325 :a3325. :a3326 :a3326 :a3326. :a3327 :a3327 :a3327. :a3328 :a3328 :a3328. :a3329 :a3329 :a3329. :a3330 :a3330 :a3330. :a3331 :a3331 :a3331. :a3332 :a3332 :a3332. :a3333 :a3333 :a3333. :a3334 :a3334 :a3334. :a3335 :a3335 :a3335. :a3336 :a3336 :a3336. :a3337 :a3337 :a3337. :a3338 :a3338 :a3338. :a3339 :a3339 :a3339. :a3340 :a3340 :a3340. :a3341 :a3341 :a3341. :a3342 :a3342 :a3342. :a3343 :a3343 :a3343. :a3344 :a3344 :a3344. :a3345 :a3345 :a3345. :a3346 :a3346 :a3346. :a3347 :a3347 :a3347. :a3348 :a3348 :a3348. :a3349 :a3349 :a3349. :a3350 :a3350 :a3350. :a3351 :a3351 :a3351. :a3352 :a3352 :a3352. :a3353 :a3353 :a3353. :a3354 :a3354 :a3354. :a3355 :a3355 :a3355. :a3356 :a3356 :a3356. :a3357 :a3357 :a3357. :a3358 :a3358 :a3358. :a3359 :a3359 :a3359. :a3360 :a3360 :a3360. :a3361 :a3361 :a3361. :a3362 :a3362 :a3362. :a3363 :a3363 :a3363. :a3364 :a3364 :a3364. :a3365 :a3365 :a3365. :a3366 :a3366 :a3366. :a3367 :a3367 :a3367. :a3368 :a3368 :a3368. :a3369 :a3369 :a3369. :a3370 :a3370 :a3370. :a3371 :a3371 :a3371. :a3372 :a3372 :a3372. :a3373 :a3373 :a3373. :a3374 :a3374 :a3374. :a3375 :a3375 :a3375. :a3376 :a3376 :a3376. :a3377 :a3377 :a3377. :a3378 :a3378 :a3378. :a3379 :a3379 :a3379. :a3380 :a3380 :a3380. :a3381 :a3381 :a3381. :a3382 :a3382 :a3382. :a3383 :a3383 :a3383. :a3384 :a3384 :a3384. :a3385 :a3385 :a3385. :a3386 :a3386 :a3386. :a3387 :a3387 :a3387. :a3388 :a3388 :a3388. :a3389 :a3389 :a3389. :a3390 :a3390 :a3390. :a3391 :a3391 :a3391. :a3392 :a3392 :a3392. :a3393 :a3393 :a3393. :a3394 :a3394 :a3394. :a3395 :a3395 :a3395. :a3396 :a3396 :a3396. :a3397 :a3397 :a3397. :a3398 :a3398 :a3398. :a3399 :a3399 :a3399. :a3400 :a3400 :a3400. :a3401 :a3401 :a3401. :a3402 :a3402 :a3402. :a3403 :a3403 :a3403. :a3404 :a3404 :a3404. :a3405 :a3405 :a3405. :a3406 :a3406 :a3406. :a3407 :a3407 :a3407. :a3408 :a3408 :a3408. :a3409 :a3409 :a3409. :a3410 :a3410 :a3410. :a3411 :a3411 :a3411. :a3412 :a3412 :a3412. :a3413 :a3413 :a3413. :a3414 :a3414 :a3414. :a3415 :a3415 :a3415. :a3416 :a3416 :a3416. :a3417 :a3417 :a3417. :a3418 :a3418 :a3418. :a3419 :a3419 :a3419. :a3420 :a3420 :a3420. :a3421 :a3421 :a3421. :a3422 :a3422 :a3422. :a3423 :a3423 :a3423. :a3424 :a3424 :a3424. :a3425 :a3425 :a3425. :a3426 :a3426 :a3426. :a3427 :a3427 :a3427. :a3428 :a3428 :a3428. :a3429 :a3429 :a3429. :a3430 :a3430 :a3430. :a3431 :a3431 :a3431. :a3432 :a3432 :a3432. :a3433 :a3433 :a3433. :a3434 :a3434 :a3434. :a3435 :a3435 :a3435. :a3436 :a3436 :a3436. :a3437 :a3437 :a3437. :a3438 :a3438 :a3438. :a3439 :a3439 :a3439. :a3440 :a3440 :a3440. :a3441 :a3441 :a3441. :a3442 :a3442 :a3442. :a3443 :a3443 :a3443. :a3444 :a3444 :a3444. :a3445 :a3445 :a3445. :a3446 :a3446 :a3446. :a3447 :a3447 :a3447. :a3448 :a3448 :a3448. :a3449 :a3449 :a3449. :a3450 :a3450 :a3450. :a3451 :a3451 :a3451. :a3452 :a3452 :a3452. :a3453 :a3453 :a3453. :a3454 :a3454 :a3454. :a3455 :a3455 :a3455. :a3456 :a3456 :a3456. :a3457 :a3457 :a3457. :a3458 :a3458 :a3458. :a3459 :a3459 :a3459. :a3460 :a3460 :a3460. :a3461 :a3461 :a3461. :a3462 :a3462 :a3462. :a3463 :a3463 :a3463. :a3464 :a3464 :a3464. :a3465 :a3465 :a3465. :a3466 :a3466 :a3466. :a3467 :a3467 :a3467. :a3468 :a3468 :a3468. :a3469 :a3469 :a3469. :a3470 :a3470 :a3470. :a3471 :a3471 :a3471. :a3472 :a3472 :a3472. :a3473 :a3473 :a3473. :a3474 :a3474 :a3474. :a3475 :a3475 :a3475. :a3476 :a3476 :a3476. :a3477 :a3477 :a3477. :a3478 :a3478 :a3478. :a3479 :a3479 :a3479. :a3480 :a3480 :a3480. :a3481 :a3481 :a3481. :a3482 :a3482 :a3482. :a3483 :a3483 :a3483. :a3484 :a3484 :a3484. :a3485 :a3485 :a3485. :a3486 :a3486 :a3486. :a3487 :a3487 :a3487. :a3488 :a3488 :a3488. :a3489 :a3489 :a3489. :a3490 :a3490 :a3490. :a3491 :a3491 :a3491. :a3492 :a3492 :a3492. :a3493 :a3493 :a3493. :a3494 :a3494 :a3494. :a3495 :a3495 :a3495. :a3496 :a3496 :a3496. :a3497 :a3497 :a3497. :a3498 :a3498 :a3498. :a3499 :a3499 :a3499. :a3500 :a3500 :a3500. :a3501 :a3501 :a3501. :a3502 :a3502 :a3502. :a3503 :a3503 :a3503. :a3504 :a3504 :a3504. :a3505 :a3505 :a3505. :a3506 :a3506 :a3506. :a3507 :a3507 :a3507. :a3508 :a3508 :a3508. :a3509 :a3509 :a3509. :a3510 :a3510 :a3510. :a3511 :a3511 :a3511. :a3512 :a3512 :a3512. :a3513 :a3513 :a3513. :a3514 :a3514 :a3514. :a3515 :a3515 :a3515. :a3516 :a3516 :a3516. :a3517 :a3517 :a3517. :a3518 :a3518 :a3518. :a3519 :a3519 :a3519. :a3520 :a3520 :a3520. :a3521 :a3521 :a3521. :a3522 :a3522 :a3522. :a3523 :a3523 :a3523. :a3524 :a3524 :a3524. :a3525 :a3525 :a3525. :a3526 :a3526 :a3526. :a3527 :a3527 :a3527. :a3528 :a3528 :a3528. :a3529 :a3529 :a3529. :a3530 :a3530 :a3530. :a3531 :a3531 :a3531. :a3532 :a3532 :a3532. :a3533 :a3533 :a3533. :a3534 :a3534 :a3534. :a3535 :a3535 :a3535. :a3536 :a3536 :a3536. :a3537 :a3537 :a3537. :a3538 :a3538 :a3538. :a3539 :a3539 :a3539. :a3540 :a3540 :a3540. :a3541 :a3541 :a3541. :a3542 :a3542 :a3542. :a3543 :a3543 :a3543. :a3544 :a3544 :a3544. :a3545 :a3545 :a3545. :a3546 :a3546 :a3546. :a3547 :a3547 :a3547. :a3548 :a3548 :a3548. :a3549 :a3549 :a3549. :a3550 :a3550 :a3550. :a3551 :a3551 :a3551. :a3552 :a3552 :a3552. :a3553 :a3553 :a3553. :a3554 :a3554 :a3554. :a3555 :a3555 :a3555. :a3556 :a3556 :a3556. :a3557 :a3557 :a3557. :a3558 :a3558 :a3558. :a3559 :a3559 :a3559. :a3560 :a3560 :a3560. :a3561 :a3561 :a3561. :a3562 :a3562 :a3562. :a3563 :a3563 :a3563. :a3564 :a3564 :a3564. :a3565 :a3565 :a3565. :a3566 :a3566 :a3566. :a3567 :a3567 :a3567. :a3568 :a3568 :a3568. :a3569 :a3569 :a3569. :a3570 :a3570 :a3570. :a3571 :a3571 :a3571. :a3572 :a3572 :a3572. :a3573 :a3573 :a3573. :a3574 :a3574 :a3574. :a3575 :a3575 :a3575. :a3576 :a3576 :a3576. :a3577 :a3577 :a3577. :a3578 :a3578 :a3578. :a3579 :a3579 :a3579. :a3580 :a3580 :a3580. :a3581 :a3581 :a3581. :a3582 :a3582 :a3582. :a3583 :a3583 :a3583. :a3584 :a3584 :a3584. :a3585 :a3585 :a3585. :a3586 :a3586 :a3586. :a3587 :a3587 :a3587. :a3588 :a3588 :a3588. :a3589 :a3589 :a3589. :a3590 :a3590 :a3590. :a3591 :a3591 :a3591. :a3592 :a3592 :a3592. :a3593 :a3593 :a3593. :a3594 :a3594 :a3594. :a3595 :a3595 :a3595. :a3596 :a3596 :a3596. :a3597 :a3597 :a3597. :a3598 :a3598 :a3598. :a3599 :a3599 :a3599. :a3600 :a3600 :a3600. :a3601 :a3601 :a3601. :a3602 :a3602 :a3602. :a3603 :a3603 :a3603. :a3604 :a3604 :a3604. :a3605 :a3605 :a3605. :a3606 :a3606 :a3606. :a3607 :a3607 :a3607. :a3608 :a3608 :a3608. :a3609 :a3609 :a3609. :a3610 :a3610 :a3610. :a3611 :a3611 :a3611. :a3612 :a3612 :a3612. :a3613 :a3613 :a3613. :a3614 :a3614 :a3614. :a3615 :a3615 :a3615. :a3616 :a3616 :a3616. :a3617 :a3617 :a3617. :a3618 :a3618 :a3618. :a3619 :a3619 :a3619. :a3620 :a3620 :a3620. :a3621 :a3621 :a3621. :a3622 :a3622 :a3622. :a3623 :a3623 :a3623. :a3624 :a3624 :a3624. :a3625 :a3625 :a3625. :a3626 :a3626 :a3626. :a3627 :a3627 :a3627. :a3628 :a3628 :a3628. :a3629 :a3629 :a3629. :a3630 :a3630 :a3630. :a3631 :a3631 :a3631. :a3632 :a3632 :a3632. :a3633 :a3633 :a3633. :a3634 :a3634 :a3634. :a3635 :a3635 :a3635. :a3636 :a3636 :a3636. :a3637 :a3637 :a3637. :a3638 :a3638 :a3638. :a3639 :a3639 :a3639. :a3640 :a3640 :a3640. :a3641 :a3641 :a3641. :a3642 :a3642 :a3642. :a3643 :a3643 :a3643. :a3644 :a3644 :a3644. :a3645 :a3645 :a3645. :a3646 :a3646 :a3646. :a3647 :a3647 :a3647. :a3648 :a3648 :a3648. :a3649 :a3649 :a3649. :a3650 :a3650 :a3650. :a3651 :a3651 :a3651. :a3652 :a3652 :a3652. :a3653 :a3653 :a3653. :a3654 :a3654 :a3654. :a3655 :a3655 :a3655. :a3656 :a3656 :a3656. :a3657 :a3657 :a3657. :a3658 :a3658 :a3658. :a3659 :a3659 :a3659. :a3660 :a3660 :a3660. :a3661 :a3661 :a3661. :a3662 :a3662 :a3662. :a3663 :a3663 :a3663. :a3664 :a3664 :a3664. :a3665 :a3665 :a3665. :a3666 :a3666 :a3666. :a3667 :a3667 :a3667. :a3668 :a3668 :a3668. :a3669 :a3669 :a3669. :a3670 :a3670 :a3670. :a3671 :a3671 :a3671. :a3672 :a3672 :a3672. :a3673 :a3673 :a3673. :a3674 :a3674 :a3674. :a3675 :a3675 :a3675. :a3676 :a3676 :a3676. :a3677 :a3677 :a3677. :a3678 :a3678 :a3678. :a3679 :a3679 :a3679. :a3680 :a3680 :a3680. :a3681 :a3681 :a3681. :a3682 :a3682 :a3682. :a3683 :a3683 :a3683. :a3684 :a3684 :a3684. :a3685 :a3685 :a3685. :a3686 :a3686 :a3686. :a3687 :a3687 :a3687. :a3688 :a3688 :a3688. :a3689 :a3689 :a3689. :a3690 :a3690 :a3690. :a3691 :a3691 :a3691. :a3692 :a3692 :a3692. :a3693 :a3693 :a3693. :a3694 :a3694 :a3694. :a3695 :a3695 :a3695. :a3696 :a3696 :a3696. :a3697 :a3697 :a3697. :a3698 :a3698 :a3698. :a3699 :a3699 :a3699. :a3700 :a3700 :a3700. :a3701 :a3701 :a3701. :a3702 :a3702 :a3702. :a3703 :a3703 :a3703. :a3704 :a3704 :a3704. :a3705 :a3705 :a3705. :a3706 :a3706 :a3706. :a3707 :a3707 :a3707. :a3708 :a3708 :a3708. :a3709 :a3709 :a3709. :a3710 :a3710 :a3710. :a3711 :a3711 :a3711. :a3712 :a3712 :a3712. :a3713 :a3713 :a3713. :a3714 :a3714 :a3714. :a3715 :a3715 :a3715. :a3716 :a3716 :a3716. :a3717 :a3717 :a3717. :a3718 :a3718 :a3718. :a3719 :a3719 :a3719. :a3720 :a3720 :a3720. :a3721 :a3721 :a3721. :a3722 :a3722 :a3722. :a3723 :a3723 :a3723. :a3724 :a3724 :a3724. :a3725 :a3725 :a3725. :a3726 :a3726 :a3726. :a3727 :a3727 :a3727. :a3728 :a3728 :a3728. :a3729 :a3729 :a3729. :a3730 :a3730 :a3730. :a3731 :a3731 :a3731. :a3732 :a3732 :a3732. :a3733 :a3733 :a3733. :a3734 :a3734 :a3734. :a3735 :a3735 :a3735. :a3736 :a3736 :a3736. :a3737 :a3737 :a3737. :a3738 :a3738 :a3738. :a3739 :a3739 :a3739. :a3740 :a3740 :a3740. :a3741 :a3741 :a3741. :a3742 :a3742 :a3742. :a3743 :a3743 :a3743. :a3744 :a3744 :a3744. :a3745 :a3745 :a3745. :a3746 :a3746 :a3746. :a3747 :a3747 :a3747. :a3748 :a3748 :a3748. :a3749 :a3749 :a3749. :a3750 :a3750 :a3750. :a3751 :a3751 :a3751. :a3752 :a3752 :a3752. :a3753 :a3753 :a3753. :a3754 :a3754 :a3754. :a3755 :a3755 :a3755. :a3756 :a3756 :a3756. :a3757 :a3757 :a3757. :a3758 :a3758 :a3758. :a3759 :a3759 :a3759. :a3760 :a3760 :a3760. :a3761 :a3761 :a3761. :a3762 :a3762 :a3762. :a3763 :a3763 :a3763. :a3764 :a3764 :a3764. :a3765 :a3765 :a3765. :a3766 :a3766 :a3766. :a3767 :a3767 :a3767. :a3768 :a3768 :a3768. :a3769 :a3769 :a3769. :a3770 :a3770 :a3770. :a3771 :a3771 :a3771. :a3772 :a3772 :a3772. :a3773 :a3773 :a3773. :a3774 :a3774 :a3774. :a3775 :a3775 :a3775. :a3776 :a3776 :a3776. :a3777 :a3777 :a3777. :a3778 :a3778 :a3778. :a3779 :a3779 :a3779. :a3780 :a3780 :a3780. :a3781 :a3781 :a3781. :a3782 :a3782 :a3782. :a3783 :a3783 :a3783. :a3784 :a3784 :a3784. :a3785 :a3785 :a3785. :a3786 :a3786 :a3786. :a3787 :a3787 :a3787. :a3788 :a3788 :a3788. :a3789 :a3789 :a3789. :a3790 :a3790 :a3790. :a3791 :a3791 :a3791. :a3792 :a3792 :a3792. :a3793 :a3793 :a3793. :a3794 :a3794 :a3794. :a3795 :a3795 :a3795. :a3796 :a3796 :a3796. :a3797 :a3797 :a3797. :a3798 :a3798 :a3798. :a3799 :a3799 :a3799. :a3800 :a3800 :a3800. :a3801 :a3801 :a3801. :a3802 :a3802 :a3802. :a3803 :a3803 :a3803. :a3804 :a3804 :a3804. :a3805 :a3805 :a3805. :a3806 :a3806 :a3806. :a3807 :a3807 :a3807. :a3808 :a3808 :a3808. :a3809 :a3809 :a3809. :a3810 :a3810 :a3810. :a3811 :a3811 :a3811. :a3812 :a3812 :a3812. :a3813 :a3813 :a3813. :a3814 :a3814 :a3814. :a3815 :a3815 :a3815. :a3816 :a3816 :a3816. :a3817 :a3817 :a3817. :a3818 :a3818 :a3818. :a3819 :a3819 :a3819. :a3820 :a3820 :a3820. :a3821 :a3821 :a3821. :a3822 :a3822 :a3822. :a3823 :a3823 :a3823. :a3824 :a3824 :a3824. :a3825 :a3825 :a3825. :a3826 :a3826 :a3826. :a3827 :a3827 :a3827. :a3828 :a3828 :a3828. :a3829 :a3829 :a3829. :a3830 :a3830 :a3830. :a3831 :a3831 :a3831. :a3832 :a3832 :a3832. :a3833 :a3833 :a3833. :a3834 :a3834 :a3834. :a3835 :a3835 :a3835. :a3836 :a3836 :a3836. :a3837 :a3837 :a3837. :a3838 :a3838 :a3838. :a3839 :a3839 :a3839. :a3840 :a3840 :a3840. :a3841 :a3841 :a3841. :a3842 :a3842 :a3842. :a3843 :a3843 :a3843. :a3844 :a3844 :a3844. :a3845 :a3845 :a3845. :a3846 :a3846 :a3846. :a3847 :a3847 :a3847. :a3848 :a3848 :a3848. :a3849 :a3849 :a3849. :a3850 :a3850 :a3850. :a3851 :a3851 :a3851. :a3852 :a3852 :a3852. :a3853 :a3853 :a3853. :a3854 :a3854 :a3854. :a3855 :a3855 :a3855. :a3856 :a3856 :a3856. :a3857 :a3857 :a3857. :a3858 :a3858 :a3858. :a3859 :a3859 :a3859. :a3860 :a3860 :a3860. :a3861 :a3861 :a3861. :a3862 :a3862 :a3862. :a3863 :a3863 :a3863. :a3864 :a3864 :a3864. :a3865 :a3865 :a3865. :a3866 :a3866 :a3866. :a3867 :a3867 :a3867. :a3868 :a3868 :a3868. :a3869 :a3869 :a3869. :a3870 :a3870 :a3870. :a3871 :a3871 :a3871. :a3872 :a3872 :a3872. :a3873 :a3873 :a3873. :a3874 :a3874 :a3874. :a3875 :a3875 :a3875. :a3876 :a3876 :a3876. :a3877 :a3877 :a3877. :a3878 :a3878 :a3878. :a3879 :a3879 :a3879. :a3880 :a3880 :a3880. :a3881 :a3881 :a3881. :a3882 :a3882 :a3882. :a3883 :a3883 :a3883. :a3884 :a3884 :a3884. :a3885 :a3885 :a3885. :a3886 :a3886 :a3886. :a3887 :a3887 :a3887. :a3888 :a3888 :a3888. :a3889 :a3889 :a3889. :a3890 :a3890 :a3890. :a3891 :a3891 :a3891. :a3892 :a3892 :a3892. :a3893 :a3893 :a3893. :a3894 :a3894 :a3894. :a3895 :a3895 :a3895. :a3896 :a3896 :a3896. :a3897 :a3897 :a3897. :a3898 :a3898 :a3898. :a3899 :a3899 :a3899. :a3900 :a3900 :a3900. :a3901 :a3901 :a3901. :a3902 :a3902 :a3902. :a3903 :a3903 :a3903. :a3904 :a3904 :a3904. :a3905 :a3905 :a3905. :a3906 :a3906 :a3906. :a3907 :a3907 :a3907. :a3908 :a3908 :a3908. :a3909 :a3909 :a3909. :a3910 :a3910 :a3910. :a3911 :a3911 :a3911. :a3912 :a3912 :a3912. :a3913 :a3913 :a3913. :a3914 :a3914 :a3914. :a3915 :a3915 :a3915. :a3916 :a3916 :a3916. :a3917 :a3917 :a3917. :a3918 :a3918 :a3918. :a3919 :a3919 :a3919. :a3920 :a3920 :a3920. :a3921 :a3921 :a3921. :a3922 :a3922 :a3922. :a3923 :a3923 :a3923. :a3924 :a3924 :a3924. :a3925 :a3925 :a3925. :a3926 :a3926 :a3926. :a3927 :a3927 :a3927. :a3928 :a3928 :a3928. :a3929 :a3929 :a3929. :a3930 :a3930 :a3930. :a3931 :a3931 :a3931. :a3932 :a3932 :a3932. :a3933 :a3933 :a3933. :a3934 :a3934 :a3934. :a3935 :a3935 :a3935. :a3936 :a3936 :a3936. :a3937 :a3937 :a3937. :a3938 :a3938 :a3938. :a3939 :a3939 :a3939. :a3940 :a3940 :a3940. :a3941 :a3941 :a3941. :a3942 :a3942 :a3942. :a3943 :a3943 :a3943. :a3944 :a3944 :a3944. :a3945 :a3945 :a3945. :a3946 :a3946 :a3946. :a3947 :a3947 :a3947. :a3948 :a3948 :a3948. :a3949 :a3949 :a3949. :a3950 :a3950 :a3950. :a3951 :a3951 :a3951. :a3952 :a3952 :a3952. :a3953 :a3953 :a3953. :a3954 :a3954 :a3954. :a3955 :a3955 :a3955. :a3956 :a3956 :a3956. :a3957 :a3957 :a3957. :a3958 :a3958 :a3958. :a3959 :a3959 :a3959. :a3960 :a3960 :a3960. :a3961 :a3961 :a3961. :a3962 :a3962 :a3962. :a3963 :a3963 :a3963. :a3964 :a3964 :a3964. :a3965 :a3965 :a3965. :a3966 :a3966 :a3966. :a3967 :a3967 :a3967. :a3968 :a3968 :a3968. :a3969 :a3969 :a3969. :a3970 :a3970 :a3970. :a3971 :a3971 :a3971. :a3972 :a3972 :a3972. :a3973 :a3973 :a3973. :a3974 :a3974 :a3974. :a3975 :a3975 :a3975. :a3976 :a3976 :a3976. :a3977 :a3977 :a3977. :a3978 :a3978 :a3978. :a3979 :a3979 :a3979. :a3980 :a3980 :a3980. :a3981 :a3981 :a3981. :a3982 :a3982 :a3982. :a3983 :a3983 :a3983. :a3984 :a3984 :a3984. :a3985 :a3985 :a3985. :a3986 :a3986 :a3986. :a3987 :a3987 :a3987. :a3988 :a3988 :a3988. :a3989 :a3989 :a3989. :a3990 :a3990 :a3990. :a3991 :a3991 :a3991. :a3992 :a3992 :a3992. :a3993 :a3993 :a3993. :a3994 :a3994 :a3994. :a3995 :a3995 :a3995. :a3996 :a3996 :a3996. :a3997 :a3997 :a3997. :a3998 :a3998 :a3998. :a3999 :a3999 :a3999. :a4000 :a4000 :a4000. :a4001 :a4001 :a4001. :a4002 :a4002 :a4002. :a4003 :a4003 :a4003. :a4004 :a4004 :a4004. :a4005 :a4005 :a4005. :a4006 :a4006 :a4006. :a4007 :a4007 :a4007. :a4008 :a4008 :a4008. :a4009 :a4009 :a4009. :a4010 :a4010 :a4010. :a4011 :a4011 :a4011. :a4012 :a4012 :a4012. :a4013 :a4013 :a4013. :a4014 :a4014 :a4014. :a4015 :a4015 :a4015. :a4016 :a4016 :a4016. :a4017 :a4017 :a4017. :a4018 :a4018 :a4018. :a4019 :a4019 :a4019. :a4020 :a4020 :a4020. :a4021 :a4021 :a4021. :a4022 :a4022 :a4022. :a4023 :a4023 :a4023. :a4024 :a4024 :a4024. :a4025 :a4025 :a4025. :a4026 :a4026 :a4026. :a4027 :a4027 :a4027. :a4028 :a4028 :a4028. :a4029 :a4029 :a4029. :a4030 :a4030 :a4030. :a4031 :a4031 :a4031. :a4032 :a4032 :a4032. :a4033 :a4033 :a4033. :a4034 :a4034 :a4034. :a4035 :a4035 :a4035. :a4036 :a4036 :a4036. :a4037 :a4037 :a4037. :a4038 :a4038 :a4038. :a4039 :a4039 :a4039. :a4040 :a4040 :a4040. :a4041 :a4041 :a4041. :a4042 :a4042 :a4042. :a4043 :a4043 :a4043. :a4044 :a4044 :a4044. :a4045 :a4045 :a4045. :a4046 :a4046 :a4046. :a4047 :a4047 :a4047. :a4048 :a4048 :a4048. :a4049 :a4049 :a4049. :a4050 :a4050 :a4050. :a4051 :a4051 :a4051. :a4052 :a4052 :a4052. :a4053 :a4053 :a4053. :a4054 :a4054 :a4054. :a4055 :a4055 :a4055. :a4056 :a4056 :a4056. :a4057 :a4057 :a4057. :a4058 :a4058 :a4058. :a4059 :a4059 :a4059. :a4060 :a4060 :a4060. :a4061 :a4061 :a4061. :a4062 :a4062 :a4062. :a4063 :a4063 :a4063. :a4064 :a4064 :a4064. :a4065 :a4065 :a4065. :a4066 :a4066 :a4066. :a4067 :a4067 :a4067. :a4068 :a4068 :a4068. :a4069 :a4069 :a4069. :a4070 :a4070 :a4070. :a4071 :a4071 :a4071. :a4072 :a4072 :a4072. :a4073 :a4073 :a4073. :a4074 :a4074 :a4074. :a4075 :a4075 :a4075. :a4076 :a4076 :a4076. :a4077 :a4077 :a4077. :a4078 :a4078 :a4078. :a4079 :a4079 :a4079. :a4080 :a4080 :a4080. :a4081 :a4081 :a4081. :a4082 :a4082 :a4082. :a4083 :a4083 :a4083. :a4084 :a4084 :a4084. :a4085 :a4085 :a4085. :a4086 :a4086 :a4086. :a4087 :a4087 :a4087. :a4088 :a4088 :a4088. :a4089 :a4089 :a4089. :a4090 :a4090 :a4090. :a4091 :a4091 :a4091. :a4092 :a4092 :a4092. :a4093 :a4093 :a4093. :a4094 :a4094 :a4094. :a4095 :a4095 :a4095. :a4096 :a4096 :a4096. :a4097 :a4097 :a4097. :a4098 :a4098 :a4098. :a4099 :a4099 :a4099. :a4100 :a4100 :a4100. :a4101 :a4101 :a4101. :a4102 :a4102 :a4102. :a4103 :a4103 :a4103. :a4104 :a4104 :a4104. :a4105 :a4105 :a4105. :a4106 :a4106 :a4106. :a4107 :a4107 :a4107. :a4108 :a4108 :a4108. :a4109 :a4109 :a4109. :a4110 :a4110 :a4110. :a4111 :a4111 :a4111. :a4112 :a4112 :a4112. :a4113 :a4113 :a4113. :a4114 :a4114 :a4114. :a4115 :a4115 :a4115. :a4116 :a4116 :a4116. :a4117 :a4117 :a4117. :a4118 :a4118 :a4118. :a4119 :a4119 :a4119. :a4120 :a4120 :a4120. :a4121 :a4121 :a4121. :a4122 :a4122 :a4122. :a4123 :a4123 :a4123. :a4124 :a4124 :a4124. :a4125 :a4125 :a4125. :a4126 :a4126 :a4126. :a4127 :a4127 :a4127. :a4128 :a4128 :a4128. :a4129 :a4129 :a4129. :a4130 :a4130 :a4130. :a4131 :a4131 :a4131. :a4132 :a4132 :a4132. :a4133 :a4133 :a4133. :a4134 :a4134 :a4134. :a4135 :a4135 :a4135. :a4136 :a4136 :a4136. :a4137 :a4137 :a4137. :a4138 :a4138 :a4138. :a4139 :a4139 :a4139. :a4140 :a4140 :a4140. :a4141 :a4141 :a4141. :a4142 :a4142 :a4142. :a4143 :a4143 :a4143. :a4144 :a4144 :a4144. :a4145 :a4145 :a4145. :a4146 :a4146 :a4146. :a4147 :a4147 :a4147. :a4148 :a4148 :a4148. :a4149 :a4149 :a4149. :a4150 :a4150 :a4150. :a4151 :a4151 :a4151. :a4152 :a4152 :a4152. :a4153 :a4153 :a4153. :a4154 :a4154 :a4154. :a4155 :a4155 :a4155. :a4156 :a4156 :a4156. :a4157 :a4157 :a4157. :a4158 :a4158 :a4158. :a4159 :a4159 :a4159. :a4160 :a4160 :a4160. :a4161 :a4161 :a4161. :a4162 :a4162 :a4162. :a4163 :a4163 :a4163. :a4164 :a4164 :a4164. :a4165 :a4165 :a4165. :a4166 :a4166 :a4166. :a4167 :a4167 :a4167. :a4168 :a4168 :a4168. :a4169 :a4169 :a4169. :a4170 :a4170 :a4170. :a4171 :a4171 :a4171. :a4172 :a4172 :a4172. :a4173 :a4173 :a4173. :a4174 :a4174 :a4174. :a4175 :a4175 :a4175. :a4176 :a4176 :a4176. :a4177 :a4177 :a4177. :a4178 :a4178 :a4178. :a4179 :a4179 :a4179. :a4180 :a4180 :a4180. :a4181 :a4181 :a4181. :a4182 :a4182 :a4182. :a4183 :a4183 :a4183. :a4184 :a4184 :a4184. :a4185 :a4185 :a4185. :a4186 :a4186 :a4186. :a4187 :a4187 :a4187. :a4188 :a4188 :a4188. :a4189 :a4189 :a4189. :a4190 :a4190 :a4190. :a4191 :a4191 :a4191. :a4192 :a4192 :a4192. :a4193 :a4193 :a4193. :a4194 :a4194 :a4194. :a4195 :a4195 :a4195. :a4196 :a4196 :a4196. :a4197 :a4197 :a4197. :a4198 :a4198 :a4198. :a4199 :a4199 :a4199. :a4200 :a4200 :a4200. :a4201 :a4201 :a4201. :a4202 :a4202 :a4202. :a4203 :a4203 :a4203. :a4204 :a4204 :a4204. :a4205 :a4205 :a4205. :a4206 :a4206 :a4206. :a4207 :a4207 :a4207. :a4208 :a4208 :a4208. :a4209 :a4209 :a4209. :a4210 :a4210 :a4210. :a4211 :a4211 :a4211. :a4212 :a4212 :a4212. :a4213 :a4213 :a4213. :a4214 :a4214 :a4214. :a4215 :a4215 :a4215. :a4216 :a4216 :a4216. :a4217 :a4217 :a4217. :a4218 :a4218 :a4218. :a4219 :a4219 :a4219. :a4220 :a4220 :a4220. :a4221 :a4221 :a4221. :a4222 :a4222 :a4222. :a4223 :a4223 :a4223. :a4224 :a4224 :a4224. :a4225 :a4225 :a4225. :a4226 :a4226 :a4226. :a4227 :a4227 :a4227. :a4228 :a4228 :a4228. :a4229 :a4229 :a4229. :a4230 :a4230 :a4230. :a4231 :a4231 :a4231. :a4232 :a4232 :a4232. :a4233 :a4233 :a4233. :a4234 :a4234 :a4234. :a4235 :a4235 :a4235. :a4236 :a4236 :a4236. :a4237 :a4237 :a4237. :a4238 :a4238 :a4238. :a4239 :a4239 :a4239. :a4240 :a4240 :a4240. :a4241 :a4241 :a4241. :a4242 :a4242 :a4242. :a4243 :a4243 :a4243. :a4244 :a4244 :a4244. :a4245 :a4245 :a4245. :a4246 :a4246 :a4246. :a4247 :a4247 :a4247. :a4248 :a4248 :a4248. :a4249 :a4249 :a4249. :a4250 :a4250 :a4250. :a4251 :a4251 :a4251. :a4252 :a4252 :a4252. :a4253 :a4253 :a4253. :a4254 :a4254 :a4254. :a4255 :a4255 :a4255. :a4256 :a4256 :a4256. :a4257 :a4257 :a4257. :a4258 :a4258 :a4258. :a4259 :a4259 :a4259. :a4260 :a4260 :a4260. :a4261 :a4261 :a4261. :a4262 :a4262 :a4262. :a4263 :a4263 :a4263. :a4264 :a4264 :a4264. :a4265 :a4265 :a4265. :a4266 :a4266 :a4266. :a4267 :a4267 :a4267. :a4268 :a4268 :a4268. :a4269 :a4269 :a4269. :a4270 :a4270 :a4270. :a4271 :a4271 :a4271. :a4272 :a4272 :a4272. :a4273 :a4273 :a4273. :a4274 :a4274 :a4274. :a4275 :a4275 :a4275. :a4276 :a4276 :a4276. :a4277 :a4277 :a4277. :a4278 :a4278 :a4278. :a4279 :a4279 :a4279. :a4280 :a4280 :a4280. :a4281 :a4281 :a4281. :a4282 :a4282 :a4282. :a4283 :a4283 :a4283. :a4284 :a4284 :a4284. :a4285 :a4285 :a4285. :a4286 :a4286 :a4286. :a4287 :a4287 :a4287. :a4288 :a4288 :a4288. :a4289 :a4289 :a4289. :a4290 :a4290 :a4290. :a4291 :a4291 :a4291. :a4292 :a4292 :a4292. :a4293 :a4293 :a4293. :a4294 :a4294 :a4294. :a4295 :a4295 :a4295. :a4296 :a4296 :a4296. :a4297 :a4297 :a4297. :a4298 :a4298 :a4298. :a4299 :a4299 :a4299. :a4300 :a4300 :a4300. :a4301 :a4301 :a4301. :a4302 :a4302 :a4302. :a4303 :a4303 :a4303. :a4304 :a4304 :a4304. :a4305 :a4305 :a4305. :a4306 :a4306 :a4306. :a4307 :a4307 :a4307. :a4308 :a4308 :a4308. :a4309 :a4309 :a4309. :a4310 :a4310 :a4310. :a4311 :a4311 :a4311. :a4312 :a4312 :a4312. :a4313 :a4313 :a4313. :a4314 :a4314 :a4314. :a4315 :a4315 :a4315. :a4316 :a4316 :a4316. :a4317 :a4317 :a4317. :a4318 :a4318 :a4318. :a4319 :a4319 :a4319. :a4320 :a4320 :a4320. :a4321 :a4321 :a4321. :a4322 :a4322 :a4322. :a4323 :a4323 :a4323. :a4324 :a4324 :a4324. :a4325 :a4325 :a4325. :a4326 :a4326 :a4326. :a4327 :a4327 :a4327. :a4328 :a4328 :a4328. :a4329 :a4329 :a4329. :a4330 :a4330 :a4330. :a4331 :a4331 :a4331. :a4332 :a4332 :a4332. :a4333 :a4333 :a4333. :a4334 :a4334 :a4334. :a4335 :a4335 :a4335. :a4336 :a4336 :a4336. :a4337 :a4337 :a4337. :a4338 :a4338 :a4338. :a4339 :a4339 :a4339. :a4340 :a4340 :a4340. :a4341 :a4341 :a4341. :a4342 :a4342 :a4342. :a4343 :a4343 :a4343. :a4344 :a4344 :a4344. :a4345 :a4345 :a4345. :a4346 :a4346 :a4346. :a4347 :a4347 :a4347. :a4348 :a4348 :a4348. :a4349 :a4349 :a4349. :a4350 :a4350 :a4350. :a4351 :a4351 :a4351. :a4352 :a4352 :a4352. :a4353 :a4353 :a4353. :a4354 :a4354 :a4354. :a4355 :a4355 :a4355. :a4356 :a4356 :a4356. :a4357 :a4357 :a4357. :a4358 :a4358 :a4358. :a4359 :a4359 :a4359. :a4360 :a4360 :a4360. :a4361 :a4361 :a4361. :a4362 :a4362 :a4362. :a4363 :a4363 :a4363. :a4364 :a4364 :a4364. :a4365 :a4365 :a4365. :a4366 :a4366 :a4366. :a4367 :a4367 :a4367. :a4368 :a4368 :a4368. :a4369 :a4369 :a4369. :a4370 :a4370 :a4370. :a4371 :a4371 :a4371. :a4372 :a4372 :a4372. :a4373 :a4373 :a4373. :a4374 :a4374 :a4374. :a4375 :a4375 :a4375. :a4376 :a4376 :a4376. :a4377 :a4377 :a4377. :a4378 :a4378 :a4378. :a4379 :a4379 :a4379. :a4380 :a4380 :a4380. :a4381 :a4381 :a4381. :a4382 :a4382 :a4382. :a4383 :a4383 :a4383. :a4384 :a4384 :a4384. :a4385 :a4385 :a4385. :a4386 :a4386 :a4386. :a4387 :a4387 :a4387. :a4388 :a4388 :a4388. :a4389 :a4389 :a4389. :a4390 :a4390 :a4390. :a4391 :a4391 :a4391. :a4392 :a4392 :a4392. :a4393 :a4393 :a4393. :a4394 :a4394 :a4394. :a4395 :a4395 :a4395. :a4396 :a4396 :a4396. :a4397 :a4397 :a4397. :a4398 :a4398 :a4398. :a4399 :a4399 :a4399. :a4400 :a4400 :a4400. :a4401 :a4401 :a4401. :a4402 :a4402 :a4402. :a4403 :a4403 :a4403. :a4404 :a4404 :a4404. :a4405 :a4405 :a4405. :a4406 :a4406 :a4406. :a4407 :a4407 :a4407. :a4408 :a4408 :a4408. :a4409 :a4409 :a4409. :a4410 :a4410 :a4410. :a4411 :a4411 :a4411. :a4412 :a4412 :a4412. :a4413 :a4413 :a4413. :a4414 :a4414 :a4414. :a4415 :a4415 :a4415. :a4416 :a4416 :a4416. :a4417 :a4417 :a4417. :a4418 :a4418 :a4418. :a4419 :a4419 :a4419. :a4420 :a4420 :a4420. :a4421 :a4421 :a4421. :a4422 :a4422 :a4422. :a4423 :a4423 :a4423. :a4424 :a4424 :a4424. :a4425 :a4425 :a4425. :a4426 :a4426 :a4426. :a4427 :a4427 :a4427. :a4428 :a4428 :a4428. :a4429 :a4429 :a4429. :a4430 :a4430 :a4430. :a4431 :a4431 :a4431. :a4432 :a4432 :a4432. :a4433 :a4433 :a4433. :a4434 :a4434 :a4434. :a4435 :a4435 :a4435. :a4436 :a4436 :a4436. :a4437 :a4437 :a4437. :a4438 :a4438 :a4438. :a4439 :a4439 :a4439. :a4440 :a4440 :a4440. :a4441 :a4441 :a4441. :a4442 :a4442 :a4442. :a4443 :a4443 :a4443. :a4444 :a4444 :a4444. :a4445 :a4445 :a4445. :a4446 :a4446 :a4446. :a4447 :a4447 :a4447. :a4448 :a4448 :a4448. :a4449 :a4449 :a4449. :a4450 :a4450 :a4450. :a4451 :a4451 :a4451. :a4452 :a4452 :a4452. :a4453 :a4453 :a4453. :a4454 :a4454 :a4454. :a4455 :a4455 :a4455. :a4456 :a4456 :a4456. :a4457 :a4457 :a4457. :a4458 :a4458 :a4458. :a4459 :a4459 :a4459. :a4460 :a4460 :a4460. :a4461 :a4461 :a4461. :a4462 :a4462 :a4462. :a4463 :a4463 :a4463. :a4464 :a4464 :a4464. :a4465 :a4465 :a4465. :a4466 :a4466 :a4466. :a4467 :a4467 :a4467. :a4468 :a4468 :a4468. :a4469 :a4469 :a4469. :a4470 :a4470 :a4470. :a4471 :a4471 :a4471. :a4472 :a4472 :a4472. :a4473 :a4473 :a4473. :a4474 :a4474 :a4474. :a4475 :a4475 :a4475. :a4476 :a4476 :a4476. :a4477 :a4477 :a4477. :a4478 :a4478 :a4478. :a4479 :a4479 :a4479. :a4480 :a4480 :a4480. :a4481 :a4481 :a4481. :a4482 :a4482 :a4482. :a4483 :a4483 :a4483. :a4484 :a4484 :a4484. :a4485 :a4485 :a4485. :a4486 :a4486 :a4486. :a4487 :a4487 :a4487. :a4488 :a4488 :a4488. :a4489 :a4489 :a4489. :a4490 :a4490 :a4490. :a4491 :a4491 :a4491. :a4492 :a4492 :a4492. :a4493 :a4493 :a4493. :a4494 :a4494 :a4494. :a4495 :a4495 :a4495. :a4496 :a4496 :a4496. :a4497 :a4497 :a4497. :a4498 :a4498 :a4498. :a4499 :a4499 :a4499. :a4500 :a4500 :a4500. :a4501 :a4501 :a4501. :a4502 :a4502 :a4502. :a4503 :a4503 :a4503. :a4504 :a4504 :a4504. :a4505 :a4505 :a4505. :a4506 :a4506 :a4506. :a4507 :a4507 :a4507. :a4508 :a4508 :a4508. :a4509 :a4509 :a4509. :a4510 :a4510 :a4510. :a4511 :a4511 :a4511. :a4512 :a4512 :a4512. :a4513 :a4513 :a4513. :a4514 :a4514 :a4514. :a4515 :a4515 :a4515. :a4516 :a4516 :a4516. :a4517 :a4517 :a4517. :a4518 :a4518 :a4518. :a4519 :a4519 :a4519. :a4520 :a4520 :a4520. :a4521 :a4521 :a4521. :a4522 :a4522 :a4522. :a4523 :a4523 :a4523. :a4524 :a4524 :a4524. :a4525 :a4525 :a4525. :a4526 :a4526 :a4526. :a4527 :a4527 :a4527. :a4528 :a4528 :a4528. :a4529 :a4529 :a4529. :a4530 :a4530 :a4530. :a4531 :a4531 :a4531. :a4532 :a4532 :a4532. :a4533 :a4533 :a4533. :a4534 :a4534 :a4534. :a4535 :a4535 :a4535. :a4536 :a4536 :a4536. :a4537 :a4537 :a4537. :a4538 :a4538 :a4538. :a4539 :a4539 :a4539. :a4540 :a4540 :a4540. :a4541 :a4541 :a4541. :a4542 :a4542 :a4542. :a4543 :a4543 :a4543. :a4544 :a4544 :a4544. :a4545 :a4545 :a4545. :a4546 :a4546 :a4546. :a4547 :a4547 :a4547. :a4548 :a4548 :a4548. :a4549 :a4549 :a4549. :a4550 :a4550 :a4550. :a4551 :a4551 :a4551. :a4552 :a4552 :a4552. :a4553 :a4553 :a4553. :a4554 :a4554 :a4554. :a4555 :a4555 :a4555. :a4556 :a4556 :a4556. :a4557 :a4557 :a4557. :a4558 :a4558 :a4558. :a4559 :a4559 :a4559. :a4560 :a4560 :a4560. :a4561 :a4561 :a4561. :a4562 :a4562 :a4562. :a4563 :a4563 :a4563. :a4564 :a4564 :a4564. :a4565 :a4565 :a4565. :a4566 :a4566 :a4566. :a4567 :a4567 :a4567. :a4568 :a4568 :a4568. :a4569 :a4569 :a4569. :a4570 :a4570 :a4570. :a4571 :a4571 :a4571. :a4572 :a4572 :a4572. :a4573 :a4573 :a4573. :a4574 :a4574 :a4574. :a4575 :a4575 :a4575. :a4576 :a4576 :a4576. :a4577 :a4577 :a4577. :a4578 :a4578 :a4578. :a4579 :a4579 :a4579. :a4580 :a4580 :a4580. :a4581 :a4581 :a4581. :a4582 :a4582 :a4582. :a4583 :a4583 :a4583. :a4584 :a4584 :a4584. :a4585 :a4585 :a4585. :a4586 :a4586 :a4586. :a4587 :a4587 :a4587. :a4588 :a4588 :a4588. :a4589 :a4589 :a4589. :a4590 :a4590 :a4590. :a4591 :a4591 :a4591. :a4592 :a4592 :a4592. :a4593 :a4593 :a4593. :a4594 :a4594 :a4594. :a4595 :a4595 :a4595. :a4596 :a4596 :a4596. :a4597 :a4597 :a4597. :a4598 :a4598 :a4598. :a4599 :a4599 :a4599. :a4600 :a4600 :a4600. :a4601 :a4601 :a4601. :a4602 :a4602 :a4602. :a4603 :a4603 :a4603. :a4604 :a4604 :a4604. :a4605 :a4605 :a4605. :a4606 :a4606 :a4606. :a4607 :a4607 :a4607. :a4608 :a4608 :a4608. :a4609 :a4609 :a4609. :a4610 :a4610 :a4610. :a4611 :a4611 :a4611. :a4612 :a4612 :a4612. :a4613 :a4613 :a4613. :a4614 :a4614 :a4614. :a4615 :a4615 :a4615. :a4616 :a4616 :a4616. :a4617 :a4617 :a4617. :a4618 :a4618 :a4618. :a4619 :a4619 :a4619. :a4620 :a4620 :a4620. :a4621 :a4621 :a4621. :a4622 :a4622 :a4622. :a4623 :a4623 :a4623. :a4624 :a4624 :a4624. :a4625 :a4625 :a4625. :a4626 :a4626 :a4626. :a4627 :a4627 :a4627. :a4628 :a4628 :a4628. :a4629 :a4629 :a4629. :a4630 :a4630 :a4630. :a4631 :a4631 :a4631. :a4632 :a4632 :a4632. :a4633 :a4633 :a4633. :a4634 :a4634 :a4634. :a4635 :a4635 :a4635. :a4636 :a4636 :a4636. :a4637 :a4637 :a4637. :a4638 :a4638 :a4638. :a4639 :a4639 :a4639. :a4640 :a4640 :a4640. :a4641 :a4641 :a4641. :a4642 :a4642 :a4642. :a4643 :a4643 :a4643. :a4644 :a4644 :a4644. :a4645 :a4645 :a4645. :a4646 :a4646 :a4646. :a4647 :a4647 :a4647. :a4648 :a4648 :a4648. :a4649 :a4649 :a4649. :a4650 :a4650 :a4650. :a4651 :a4651 :a4651. :a4652 :a4652 :a4652. :a4653 :a4653 :a4653. :a4654 :a4654 :a4654. :a4655 :a4655 :a4655. :a4656 :a4656 :a4656. :a4657 :a4657 :a4657. :a4658 :a4658 :a4658. :a4659 :a4659 :a4659. :a4660 :a4660 :a4660. :a4661 :a4661 :a4661. :a4662 :a4662 :a4662. :a4663 :a4663 :a4663. :a4664 :a4664 :a4664. :a4665 :a4665 :a4665. :a4666 :a4666 :a4666. :a4667 :a4667 :a4667. :a4668 :a4668 :a4668. :a4669 :a4669 :a4669. :a4670 :a4670 :a4670. :a4671 :a4671 :a4671. :a4672 :a4672 :a4672. :a4673 :a4673 :a4673. :a4674 :a4674 :a4674. :a4675 :a4675 :a4675. :a4676 :a4676 :a4676. :a4677 :a4677 :a4677. :a4678 :a4678 :a4678. :a4679 :a4679 :a4679. :a4680 :a4680 :a4680. :a4681 :a4681 :a4681. :a4682 :a4682 :a4682. :a4683 :a4683 :a4683. :a4684 :a4684 :a4684. :a4685 :a4685 :a4685. :a4686 :a4686 :a4686. :a4687 :a4687 :a4687. :a4688 :a4688 :a4688. :a4689 :a4689 :a4689. :a4690 :a4690 :a4690. :a4691 :a4691 :a4691. :a4692 :a4692 :a4692. :a4693 :a4693 :a4693. :a4694 :a4694 :a4694. :a4695 :a4695 :a4695. :a4696 :a4696 :a4696. :a4697 :a4697 :a4697. :a4698 :a4698 :a4698. :a4699 :a4699 :a4699. :a4700 :a4700 :a4700. :a4701 :a4701 :a4701. :a4702 :a4702 :a4702. :a4703 :a4703 :a4703. :a4704 :a4704 :a4704. :a4705 :a4705 :a4705. :a4706 :a4706 :a4706. :a4707 :a4707 :a4707. :a4708 :a4708 :a4708. :a4709 :a4709 :a4709. :a4710 :a4710 :a4710. :a4711 :a4711 :a4711. :a4712 :a4712 :a4712. :a4713 :a4713 :a4713. :a4714 :a4714 :a4714. :a4715 :a4715 :a4715. :a4716 :a4716 :a4716. :a4717 :a4717 :a4717. :a4718 :a4718 :a4718. :a4719 :a4719 :a4719. :a4720 :a4720 :a4720. :a4721 :a4721 :a4721. :a4722 :a4722 :a4722. :a4723 :a4723 :a4723. :a4724 :a4724 :a4724. :a4725 :a4725 :a4725. :a4726 :a4726 :a4726. :a4727 :a4727 :a4727. :a4728 :a4728 :a4728. :a4729 :a4729 :a4729. :a4730 :a4730 :a4730. :a4731 :a4731 :a4731. :a4732 :a4732 :a4732. :a4733 :a4733 :a4733. :a4734 :a4734 :a4734. :a4735 :a4735 :a4735. :a4736 :a4736 :a4736. :a4737 :a4737 :a4737. :a4738 :a4738 :a4738. :a4739 :a4739 :a4739. :a4740 :a4740 :a4740. :a4741 :a4741 :a4741. :a4742 :a4742 :a4742. :a4743 :a4743 :a4743. :a4744 :a4744 :a4744. :a4745 :a4745 :a4745. :a4746 :a4746 :a4746. :a4747 :a4747 :a4747. :a4748 :a4748 :a4748. :a4749 :a4749 :a4749. :a4750 :a4750 :a4750. :a4751 :a4751 :a4751. :a4752 :a4752 :a4752. :a4753 :a4753 :a4753. :a4754 :a4754 :a4754. :a4755 :a4755 :a4755. :a4756 :a4756 :a4756. :a4757 :a4757 :a4757. :a4758 :a4758 :a4758. :a4759 :a4759 :a4759. :a4760 :a4760 :a4760. :a4761 :a4761 :a4761. :a4762 :a4762 :a4762. :a4763 :a4763 :a4763. :a4764 :a4764 :a4764. :a4765 :a4765 :a4765. :a4766 :a4766 :a4766. :a4767 :a4767 :a4767. :a4768 :a4768 :a4768. :a4769 :a4769 :a4769. :a4770 :a4770 :a4770. :a4771 :a4771 :a4771. :a4772 :a4772 :a4772. :a4773 :a4773 :a4773. :a4774 :a4774 :a4774. :a4775 :a4775 :a4775. :a4776 :a4776 :a4776. :a4777 :a4777 :a4777. :a4778 :a4778 :a4778. :a4779 :a4779 :a4779. :a4780 :a4780 :a4780. :a4781 :a4781 :a4781. :a4782 :a4782 :a4782. :a4783 :a4783 :a4783. :a4784 :a4784 :a4784. :a4785 :a4785 :a4785. :a4786 :a4786 :a4786. :a4787 :a4787 :a4787. :a4788 :a4788 :a4788. :a4789 :a4789 :a4789. :a4790 :a4790 :a4790. :a4791 :a4791 :a4791. :a4792 :a4792 :a4792. :a4793 :a4793 :a4793. :a4794 :a4794 :a4794. :a4795 :a4795 :a4795. :a4796 :a4796 :a4796. :a4797 :a4797 :a4797. :a4798 :a4798 :a4798. :a4799 :a4799 :a4799. :a4800 :a4800 :a4800. :a4801 :a4801 :a4801. :a4802 :a4802 :a4802. :a4803 :a4803 :a4803. :a4804 :a4804 :a4804. :a4805 :a4805 :a4805. :a4806 :a4806 :a4806. :a4807 :a4807 :a4807. :a4808 :a4808 :a4808. :a4809 :a4809 :a4809. :a4810 :a4810 :a4810. :a4811 :a4811 :a4811. :a4812 :a4812 :a4812. :a4813 :a4813 :a4813. :a4814 :a4814 :a4814. :a4815 :a4815 :a4815. :a4816 :a4816 :a4816. :a4817 :a4817 :a4817. :a4818 :a4818 :a4818. :a4819 :a4819 :a4819. :a4820 :a4820 :a4820. :a4821 :a4821 :a4821. :a4822 :a4822 :a4822. :a4823 :a4823 :a4823. :a4824 :a4824 :a4824. :a4825 :a4825 :a4825. :a4826 :a4826 :a4826. :a4827 :a4827 :a4827. :a4828 :a4828 :a4828. :a4829 :a4829 :a4829. :a4830 :a4830 :a4830. :a4831 :a4831 :a4831. :a4832 :a4832 :a4832. :a4833 :a4833 :a4833. :a4834 :a4834 :a4834. :a4835 :a4835 :a4835. :a4836 :a4836 :a4836. :a4837 :a4837 :a4837. :a4838 :a4838 :a4838. :a4839 :a4839 :a4839. :a4840 :a4840 :a4840. :a4841 :a4841 :a4841. :a4842 :a4842 :a4842. :a4843 :a4843 :a4843. :a4844 :a4844 :a4844. :a4845 :a4845 :a4845. :a4846 :a4846 :a4846. :a4847 :a4847 :a4847. :a4848 :a4848 :a4848. :a4849 :a4849 :a4849. :a4850 :a4850 :a4850. :a4851 :a4851 :a4851. :a4852 :a4852 :a4852. :a4853 :a4853 :a4853. :a4854 :a4854 :a4854. :a4855 :a4855 :a4855. :a4856 :a4856 :a4856. :a4857 :a4857 :a4857. :a4858 :a4858 :a4858. :a4859 :a4859 :a4859. :a4860 :a4860 :a4860. :a4861 :a4861 :a4861. :a4862 :a4862 :a4862. :a4863 :a4863 :a4863. :a4864 :a4864 :a4864. :a4865 :a4865 :a4865. :a4866 :a4866 :a4866. :a4867 :a4867 :a4867. :a4868 :a4868 :a4868. :a4869 :a4869 :a4869. :a4870 :a4870 :a4870. :a4871 :a4871 :a4871. :a4872 :a4872 :a4872. :a4873 :a4873 :a4873. :a4874 :a4874 :a4874. :a4875 :a4875 :a4875. :a4876 :a4876 :a4876. :a4877 :a4877 :a4877. :a4878 :a4878 :a4878. :a4879 :a4879 :a4879. :a4880 :a4880 :a4880. :a4881 :a4881 :a4881. :a4882 :a4882 :a4882. :a4883 :a4883 :a4883. :a4884 :a4884 :a4884. :a4885 :a4885 :a4885. :a4886 :a4886 :a4886. :a4887 :a4887 :a4887. :a4888 :a4888 :a4888. :a4889 :a4889 :a4889. :a4890 :a4890 :a4890. :a4891 :a4891 :a4891. :a4892 :a4892 :a4892. :a4893 :a4893 :a4893. :a4894 :a4894 :a4894. :a4895 :a4895 :a4895. :a4896 :a4896 :a4896. :a4897 :a4897 :a4897. :a4898 :a4898 :a4898. :a4899 :a4899 :a4899. :a4900 :a4900 :a4900. :a4901 :a4901 :a4901. :a4902 :a4902 :a4902. :a4903 :a4903 :a4903. :a4904 :a4904 :a4904. :a4905 :a4905 :a4905. :a4906 :a4906 :a4906. :a4907 :a4907 :a4907. :a4908 :a4908 :a4908. :a4909 :a4909 :a4909. :a4910 :a4910 :a4910. :a4911 :a4911 :a4911. :a4912 :a4912 :a4912. :a4913 :a4913 :a4913. :a4914 :a4914 :a4914. :a4915 :a4915 :a4915. :a4916 :a4916 :a4916. :a4917 :a4917 :a4917. :a4918 :a4918 :a4918. :a4919 :a4919 :a4919. :a4920 :a4920 :a4920. :a4921 :a4921 :a4921. :a4922 :a4922 :a4922. :a4923 :a4923 :a4923. :a4924 :a4924 :a4924. :a4925 :a4925 :a4925. :a4926 :a4926 :a4926. :a4927 :a4927 :a4927. :a4928 :a4928 :a4928. :a4929 :a4929 :a4929. :a4930 :a4930 :a4930. :a4931 :a4931 :a4931. :a4932 :a4932 :a4932. :a4933 :a4933 :a4933. :a4934 :a4934 :a4934. :a4935 :a4935 :a4935. :a4936 :a4936 :a4936. :a4937 :a4937 :a4937. :a4938 :a4938 :a4938. :a4939 :a4939 :a4939. :a4940 :a4940 :a4940. :a4941 :a4941 :a4941. :a4942 :a4942 :a4942. :a4943 :a4943 :a4943. :a4944 :a4944 :a4944. :a4945 :a4945 :a4945. :a4946 :a4946 :a4946. :a4947 :a4947 :a4947. :a4948 :a4948 :a4948. :a4949 :a4949 :a4949. :a4950 :a4950 :a4950. :a4951 :a4951 :a4951. :a4952 :a4952 :a4952. :a4953 :a4953 :a4953. :a4954 :a4954 :a4954. :a4955 :a4955 :a4955. :a4956 :a4956 :a4956. :a4957 :a4957 :a4957. :a4958 :a4958 :a4958. :a4959 :a4959 :a4959. :a4960 :a4960 :a4960. :a4961 :a4961 :a4961. :a4962 :a4962 :a4962. :a4963 :a4963 :a4963. :a4964 :a4964 :a4964. :a4965 :a4965 :a4965. :a4966 :a4966 :a4966. :a4967 :a4967 :a4967. :a4968 :a4968 :a4968. :a4969 :a4969 :a4969. :a4970 :a4970 :a4970. :a4971 :a4971 :a4971. :a4972 :a4972 :a4972. :a4973 :a4973 :a4973. :a4974 :a4974 :a4974. :a4975 :a4975 :a4975. :a4976 :a4976 :a4976. :a4977 :a4977 :a4977. :a4978 :a4978 :a4978. :a4979 :a4979 :a4979. :a4980 :a4980 :a4980. :a4981 :a4981 :a4981. :a4982 :a4982 :a4982. :a4983 :a4983 :a4983. :a4984 :a4984 :a4984. :a4985 :a4985 :a4985. :a4986 :a4986 :a4986. :a4987 :a4987 :a4987. :a4988 :a4988 :a4988. :a4989 :a4989 :a4989. :a4990 :a4990 :a4990. :a4991 :a4991 :a4991. :a4992 :a4992 :a4992. :a4993 :a4993 :a4993. :a4994 :a4994 :a4994. :a4995 :a4995 :a4995. :a4996 :a4996 :a4996. :a4997 :a4997 :a4997. :a4998 :a4998 :a4998. :a4999 :a4999 :a4999. :a5000 :a5000 :a5000. :a5001 :a5001 :a5001. :a5002 :a5002 :a5002. :a5003 :a5003 :a5003. :a5004 :a5004 :a5004. :a5005 :a5005 :a5005. :a5006 :a5006 :a5006. :a5007 :a5007 :a5007. :a5008 :a5008 :a5008. :a5009 :a5009 :a5009. :a5010 :a5010 :a5010. :a5011 :a5011 :a5011. :a5012 :a5012 :a5012. :a5013 :a5013 :a5013. :a5014 :a5014 :a5014. :a5015 :a5015 :a5015. :a5016 :a5016 :a5016. :a5017 :a5017 :a5017. :a5018 :a5018 :a5018. :a5019 :a5019 :a5019. :a5020 :a5020 :a5020. :a5021 :a5021 :a5021. :a5022 :a5022 :a5022. :a5023 :a5023 :a5023. :a5024 :a5024 :a5024. :a5025 :a5025 :a5025. :a5026 :a5026 :a5026. :a5027 :a5027 :a5027. :a5028 :a5028 :a5028. :a5029 :a5029 :a5029. :a5030 :a5030 :a5030. :a5031 :a5031 :a5031. :a5032 :a5032 :a5032. :a5033 :a5033 :a5033. :a5034 :a5034 :a5034. :a5035 :a5035 :a5035. :a5036 :a5036 :a5036. :a5037 :a5037 :a5037. :a5038 :a5038 :a5038. :a5039 :a5039 :a5039. :a5040 :a5040 :a5040. :a5041 :a5041 :a5041. :a5042 :a5042 :a5042. :a5043 :a5043 :a5043. :a5044 :a5044 :a5044. :a5045 :a5045 :a5045. :a5046 :a5046 :a5046. :a5047 :a5047 :a5047. :a5048 :a5048 :a5048. :a5049 :a5049 :a5049. :a5050 :a5050 :a5050. :a5051 :a5051 :a5051. :a5052 :a5052 :a5052. :a5053 :a5053 :a5053. :a5054 :a5054 :a5054. :a5055 :a5055 :a5055. :a5056 :a5056 :a5056. :a5057 :a5057 :a5057. :a5058 :a5058 :a5058. :a5059 :a5059 :a5059. :a5060 :a5060 :a5060. :a5061 :a5061 :a5061. :a5062 :a5062 :a5062. :a5063 :a5063 :a5063. :a5064 :a5064 :a5064. :a5065 :a5065 :a5065. :a5066 :a5066 :a5066. :a5067 :a5067 :a5067. :a5068 :a5068 :a5068. :a5069 :a5069 :a5069. :a5070 :a5070 :a5070. :a5071 :a5071 :a5071. :a5072 :a5072 :a5072. :a5073 :a5073 :a5073. :a5074 :a5074 :a5074. :a5075 :a5075 :a5075. :a5076 :a5076 :a5076. :a5077 :a5077 :a5077. :a5078 :a5078 :a5078. :a5079 :a5079 :a5079. :a5080 :a5080 :a5080. :a5081 :a5081 :a5081. :a5082 :a5082 :a5082. :a5083 :a5083 :a5083. :a5084 :a5084 :a5084. :a5085 :a5085 :a5085. :a5086 :a5086 :a5086. :a5087 :a5087 :a5087. :a5088 :a5088 :a5088. :a5089 :a5089 :a5089. :a5090 :a5090 :a5090. :a5091 :a5091 :a5091. :a5092 :a5092 :a5092. :a5093 :a5093 :a5093. :a5094 :a5094 :a5094. :a5095 :a5095 :a5095. :a5096 :a5096 :a5096. :a5097 :a5097 :a5097. :a5098 :a5098 :a5098. :a5099 :a5099 :a5099. :a5100 :a5100 :a5100. :a5101 :a5101 :a5101. :a5102 :a5102 :a5102. :a5103 :a5103 :a5103. :a5104 :a5104 :a5104. :a5105 :a5105 :a5105. :a5106 :a5106 :a5106. :a5107 :a5107 :a5107. :a5108 :a5108 :a5108. :a5109 :a5109 :a5109. :a5110 :a5110 :a5110. :a5111 :a5111 :a5111. :a5112 :a5112 :a5112. :a5113 :a5113 :a5113. :a5114 :a5114 :a5114. :a5115 :a5115 :a5115. :a5116 :a5116 :a5116. :a5117 :a5117 :a5117. :a5118 :a5118 :a5118. :a5119 :a5119 :a5119. :a5120 :a5120 :a5120. :a5121 :a5121 :a5121. :a5122 :a5122 :a5122. :a5123 :a5123 :a5123. :a5124 :a5124 :a5124. :a5125 :a5125 :a5125. :a5126 :a5126 :a5126. :a5127 :a5127 :a5127. :a5128 :a5128 :a5128. :a5129 :a5129 :a5129. :a5130 :a5130 :a5130. :a5131 :a5131 :a5131. :a5132 :a5132 :a5132. :a5133 :a5133 :a5133. :a5134 :a5134 :a5134. :a5135 :a5135 :a5135. :a5136 :a5136 :a5136. :a5137 :a5137 :a5137. :a5138 :a5138 :a5138. :a5139 :a5139 :a5139. :a5140 :a5140 :a5140. :a5141 :a5141 :a5141. :a5142 :a5142 :a5142. :a5143 :a5143 :a5143. :a5144 :a5144 :a5144. :a5145 :a5145 :a5145. :a5146 :a5146 :a5146. :a5147 :a5147 :a5147. :a5148 :a5148 :a5148. :a5149 :a5149 :a5149. :a5150 :a5150 :a5150. :a5151 :a5151 :a5151. :a5152 :a5152 :a5152. :a5153 :a5153 :a5153. :a5154 :a5154 :a5154. :a5155 :a5155 :a5155. :a5156 :a5156 :a5156. :a5157 :a5157 :a5157. :a5158 :a5158 :a5158. :a5159 :a5159 :a5159. :a5160 :a5160 :a5160. :a5161 :a5161 :a5161. :a5162 :a5162 :a5162. :a5163 :a5163 :a5163. :a5164 :a5164 :a5164. :a5165 :a5165 :a5165. :a5166 :a5166 :a5166. :a5167 :a5167 :a5167. :a5168 :a5168 :a5168. :a5169 :a5169 :a5169. :a5170 :a5170 :a5170. :a5171 :a5171 :a5171. :a5172 :a5172 :a5172. :a5173 :a5173 :a5173. :a5174 :a5174 :a5174. :a5175 :a5175 :a5175. :a5176 :a5176 :a5176. :a5177 :a5177 :a5177. :a5178 :a5178 :a5178. :a5179 :a5179 :a5179. :a5180 :a5180 :a5180. :a5181 :a5181 :a5181. :a5182 :a5182 :a5182. :a5183 :a5183 :a5183. :a5184 :a5184 :a5184. :a5185 :a5185 :a5185. :a5186 :a5186 :a5186. :a5187 :a5187 :a5187. :a5188 :a5188 :a5188. :a5189 :a5189 :a5189. :a5190 :a5190 :a5190. :a5191 :a5191 :a5191. :a5192 :a5192 :a5192. :a5193 :a5193 :a5193. :a5194 :a5194 :a5194. :a5195 :a5195 :a5195. :a5196 :a5196 :a5196. :a5197 :a5197 :a5197. :a5198 :a5198 :a5198. :a5199 :a5199 :a5199. :a5200 :a5200 :a5200. :a5201 :a5201 :a5201. :a5202 :a5202 :a5202. :a5203 :a5203 :a5203. :a5204 :a5204 :a5204. :a5205 :a5205 :a5205. :a5206 :a5206 :a5206. :a5207 :a5207 :a5207. :a5208 :a5208 :a5208. :a5209 :a5209 :a5209. :a5210 :a5210 :a5210. :a5211 :a5211 :a5211. :a5212 :a5212 :a5212. :a5213 :a5213 :a5213. :a5214 :a5214 :a5214. :a5215 :a5215 :a5215. :a5216 :a5216 :a5216. :a5217 :a5217 :a5217. :a5218 :a5218 :a5218. :a5219 :a5219 :a5219. :a5220 :a5220 :a5220. :a5221 :a5221 :a5221. :a5222 :a5222 :a5222. :a5223 :a5223 :a5223. :a5224 :a5224 :a5224. :a5225 :a5225 :a5225. :a5226 :a5226 :a5226. :a5227 :a5227 :a5227. :a5228 :a5228 :a5228. :a5229 :a5229 :a5229. :a5230 :a5230 :a5230. :a5231 :a5231 :a5231. :a5232 :a5232 :a5232. :a5233 :a5233 :a5233. :a5234 :a5234 :a5234. :a5235 :a5235 :a5235. :a5236 :a5236 :a5236. :a5237 :a5237 :a5237. :a5238 :a5238 :a5238. :a5239 :a5239 :a5239. :a5240 :a5240 :a5240. :a5241 :a5241 :a5241. :a5242 :a5242 :a5242. :a5243 :a5243 :a5243. :a5244 :a5244 :a5244. :a5245 :a5245 :a5245. :a5246 :a5246 :a5246. :a5247 :a5247 :a5247. :a5248 :a5248 :a5248. :a5249 :a5249 :a5249. :a5250 :a5250 :a5250. :a5251 :a5251 :a5251. :a5252 :a5252 :a5252. :a5253 :a5253 :a5253. :a5254 :a5254 :a5254. :a5255 :a5255 :a5255. :a5256 :a5256 :a5256. :a5257 :a5257 :a5257. :a5258 :a5258 :a5258. :a5259 :a5259 :a5259. :a5260 :a5260 :a5260. :a5261 :a5261 :a5261. :a5262 :a5262 :a5262. :a5263 :a5263 :a5263. :a5264 :a5264 :a5264. :a5265 :a5265 :a5265. :a5266 :a5266 :a5266. :a5267 :a5267 :a5267. :a5268 :a5268 :a5268. :a5269 :a5269 :a5269. :a5270 :a5270 :a5270. :a5271 :a5271 :a5271. :a5272 :a5272 :a5272. :a5273 :a5273 :a5273. :a5274 :a5274 :a5274. :a5275 :a5275 :a5275. :a5276 :a5276 :a5276. :a5277 :a5277 :a5277. :a5278 :a5278 :a5278. :a5279 :a5279 :a5279. :a5280 :a5280 :a5280. :a5281 :a5281 :a5281. :a5282 :a5282 :a5282. :a5283 :a5283 :a5283. :a5284 :a5284 :a5284. :a5285 :a5285 :a5285. :a5286 :a5286 :a5286. :a5287 :a5287 :a5287. :a5288 :a5288 :a5288. :a5289 :a5289 :a5289. :a5290 :a5290 :a5290. :a5291 :a5291 :a5291. :a5292 :a5292 :a5292. :a5293 :a5293 :a5293. :a5294 :a5294 :a5294. :a5295 :a5295 :a5295. :a5296 :a5296 :a5296. :a5297 :a5297 :a5297. :a5298 :a5298 :a5298. :a5299 :a5299 :a5299. :a5300 :a5300 :a5300. :a5301 :a5301 :a5301. :a5302 :a5302 :a5302. :a5303 :a5303 :a5303. :a5304 :a5304 :a5304. :a5305 :a5305 :a5305. :a5306 :a5306 :a5306. :a5307 :a5307 :a5307. :a5308 :a5308 :a5308. :a5309 :a5309 :a5309. :a5310 :a5310 :a5310. :a5311 :a5311 :a5311. :a5312 :a5312 :a5312. :a5313 :a5313 :a5313. :a5314 :a5314 :a5314. :a5315 :a5315 :a5315. :a5316 :a5316 :a5316. :a5317 :a5317 :a5317. :a5318 :a5318 :a5318. :a5319 :a5319 :a5319. :a5320 :a5320 :a5320. :a5321 :a5321 :a5321. :a5322 :a5322 :a5322. :a5323 :a5323 :a5323. :a5324 :a5324 :a5324. :a5325 :a5325 :a5325. :a5326 :a5326 :a5326. :a5327 :a5327 :a5327. :a5328 :a5328 :a5328. :a5329 :a5329 :a5329. :a5330 :a5330 :a5330. :a5331 :a5331 :a5331. :a5332 :a5332 :a5332. :a5333 :a5333 :a5333. :a5334 :a5334 :a5334. :a5335 :a5335 :a5335. :a5336 :a5336 :a5336. :a5337 :a5337 :a5337. :a5338 :a5338 :a5338. :a5339 :a5339 :a5339. :a5340 :a5340 :a5340. :a5341 :a5341 :a5341. :a5342 :a5342 :a5342. :a5343 :a5343 :a5343. :a5344 :a5344 :a5344. :a5345 :a5345 :a5345. :a5346 :a5346 :a5346. :a5347 :a5347 :a5347. :a5348 :a5348 :a5348. :a5349 :a5349 :a5349. :a5350 :a5350 :a5350. :a5351 :a5351 :a5351. :a5352 :a5352 :a5352. :a5353 :a5353 :a5353. :a5354 :a5354 :a5354. :a5355 :a5355 :a5355. :a5356 :a5356 :a5356. :a5357 :a5357 :a5357. :a5358 :a5358 :a5358. :a5359 :a5359 :a5359. :a5360 :a5360 :a5360. :a5361 :a5361 :a5361. :a5362 :a5362 :a5362. :a5363 :a5363 :a5363. :a5364 :a5364 :a5364. :a5365 :a5365 :a5365. :a5366 :a5366 :a5366. :a5367 :a5367 :a5367. :a5368 :a5368 :a5368. :a5369 :a5369 :a5369. :a5370 :a5370 :a5370. :a5371 :a5371 :a5371. :a5372 :a5372 :a5372. :a5373 :a5373 :a5373. :a5374 :a5374 :a5374. :a5375 :a5375 :a5375. :a5376 :a5376 :a5376. :a5377 :a5377 :a5377. :a5378 :a5378 :a5378. :a5379 :a5379 :a5379. :a5380 :a5380 :a5380. :a5381 :a5381 :a5381. :a5382 :a5382 :a5382. :a5383 :a5383 :a5383. :a5384 :a5384 :a5384. :a5385 :a5385 :a5385. :a5386 :a5386 :a5386. :a5387 :a5387 :a5387. :a5388 :a5388 :a5388. :a5389 :a5389 :a5389. :a5390 :a5390 :a5390. :a5391 :a5391 :a5391. :a5392 :a5392 :a5392. :a5393 :a5393 :a5393. :a5394 :a5394 :a5394. :a5395 :a5395 :a5395. :a5396 :a5396 :a5396. :a5397 :a5397 :a5397. :a5398 :a5398 :a5398. :a5399 :a5399 :a5399. :a5400 :a5400 :a5400. :a5401 :a5401 :a5401. :a5402 :a5402 :a5402. :a5403 :a5403 :a5403. :a5404 :a5404 :a5404. :a5405 :a5405 :a5405. :a5406 :a5406 :a5406. :a5407 :a5407 :a5407. :a5408 :a5408 :a5408. :a5409 :a5409 :a5409. :a5410 :a5410 :a5410. :a5411 :a5411 :a5411. :a5412 :a5412 :a5412. :a5413 :a5413 :a5413. :a5414 :a5414 :a5414. :a5415 :a5415 :a5415. :a5416 :a5416 :a5416. :a5417 :a5417 :a5417. :a5418 :a5418 :a5418. :a5419 :a5419 :a5419. :a5420 :a5420 :a5420. :a5421 :a5421 :a5421. :a5422 :a5422 :a5422. :a5423 :a5423 :a5423. :a5424 :a5424 :a5424. :a5425 :a5425 :a5425. :a5426 :a5426 :a5426. :a5427 :a5427 :a5427. :a5428 :a5428 :a5428. :a5429 :a5429 :a5429. :a5430 :a5430 :a5430. :a5431 :a5431 :a5431. :a5432 :a5432 :a5432. :a5433 :a5433 :a5433. :a5434 :a5434 :a5434. :a5435 :a5435 :a5435. :a5436 :a5436 :a5436. :a5437 :a5437 :a5437. :a5438 :a5438 :a5438. :a5439 :a5439 :a5439. :a5440 :a5440 :a5440. :a5441 :a5441 :a5441. :a5442 :a5442 :a5442. :a5443 :a5443 :a5443. :a5444 :a5444 :a5444. :a5445 :a5445 :a5445. :a5446 :a5446 :a5446. :a5447 :a5447 :a5447. :a5448 :a5448 :a5448. :a5449 :a5449 :a5449. :a5450 :a5450 :a5450. :a5451 :a5451 :a5451. :a5452 :a5452 :a5452. :a5453 :a5453 :a5453. :a5454 :a5454 :a5454. :a5455 :a5455 :a5455. :a5456 :a5456 :a5456. :a5457 :a5457 :a5457. :a5458 :a5458 :a5458. :a5459 :a5459 :a5459. :a5460 :a5460 :a5460. :a5461 :a5461 :a5461. :a5462 :a5462 :a5462. :a5463 :a5463 :a5463. :a5464 :a5464 :a5464. :a5465 :a5465 :a5465. :a5466 :a5466 :a5466. :a5467 :a5467 :a5467. :a5468 :a5468 :a5468. :a5469 :a5469 :a5469. :a5470 :a5470 :a5470. :a5471 :a5471 :a5471. :a5472 :a5472 :a5472. :a5473 :a5473 :a5473. :a5474 :a5474 :a5474. :a5475 :a5475 :a5475. :a5476 :a5476 :a5476. :a5477 :a5477 :a5477. :a5478 :a5478 :a5478. :a5479 :a5479 :a5479. :a5480 :a5480 :a5480. :a5481 :a5481 :a5481. :a5482 :a5482 :a5482. :a5483 :a5483 :a5483. :a5484 :a5484 :a5484. :a5485 :a5485 :a5485. :a5486 :a5486 :a5486. :a5487 :a5487 :a5487. :a5488 :a5488 :a5488. :a5489 :a5489 :a5489. :a5490 :a5490 :a5490. :a5491 :a5491 :a5491. :a5492 :a5492 :a5492. :a5493 :a5493 :a5493. :a5494 :a5494 :a5494. :a5495 :a5495 :a5495. :a5496 :a5496 :a5496. :a5497 :a5497 :a5497. :a5498 :a5498 :a5498. :a5499 :a5499 :a5499. :a5500 :a5500 :a5500. :a5501 :a5501 :a5501. :a5502 :a5502 :a5502. :a5503 :a5503 :a5503. :a5504 :a5504 :a5504. :a5505 :a5505 :a5505. :a5506 :a5506 :a5506. :a5507 :a5507 :a5507. :a5508 :a5508 :a5508. :a5509 :a5509 :a5509. :a5510 :a5510 :a5510. :a5511 :a5511 :a5511. :a5512 :a5512 :a5512. :a5513 :a5513 :a5513. :a5514 :a5514 :a5514. :a5515 :a5515 :a5515. :a5516 :a5516 :a5516. :a5517 :a5517 :a5517. :a5518 :a5518 :a5518. :a5519 :a5519 :a5519. :a5520 :a5520 :a5520. :a5521 :a5521 :a5521. :a5522 :a5522 :a5522. :a5523 :a5523 :a5523. :a5524 :a5524 :a5524. :a5525 :a5525 :a5525. :a5526 :a5526 :a5526. :a5527 :a5527 :a5527. :a5528 :a5528 :a5528. :a5529 :a5529 :a5529. :a5530 :a5530 :a5530. :a5531 :a5531 :a5531. :a5532 :a5532 :a5532. :a5533 :a5533 :a5533. :a5534 :a5534 :a5534. :a5535 :a5535 :a5535. :a5536 :a5536 :a5536. :a5537 :a5537 :a5537. :a5538 :a5538 :a5538. :a5539 :a5539 :a5539. :a5540 :a5540 :a5540. :a5541 :a5541 :a5541. :a5542 :a5542 :a5542. :a5543 :a5543 :a5543. :a5544 :a5544 :a5544. :a5545 :a5545 :a5545. :a5546 :a5546 :a5546. :a5547 :a5547 :a5547. :a5548 :a5548 :a5548. :a5549 :a5549 :a5549. :a5550 :a5550 :a5550. :a5551 :a5551 :a5551. :a5552 :a5552 :a5552. :a5553 :a5553 :a5553. :a5554 :a5554 :a5554. :a5555 :a5555 :a5555. :a5556 :a5556 :a5556. :a5557 :a5557 :a5557. :a5558 :a5558 :a5558. :a5559 :a5559 :a5559. :a5560 :a5560 :a5560. :a5561 :a5561 :a5561. :a5562 :a5562 :a5562. :a5563 :a5563 :a5563. :a5564 :a5564 :a5564. :a5565 :a5565 :a5565. :a5566 :a5566 :a5566. :a5567 :a5567 :a5567. :a5568 :a5568 :a5568. :a5569 :a5569 :a5569. :a5570 :a5570 :a5570. :a5571 :a5571 :a5571. :a5572 :a5572 :a5572. :a5573 :a5573 :a5573. :a5574 :a5574 :a5574. :a5575 :a5575 :a5575. :a5576 :a5576 :a5576. :a5577 :a5577 :a5577. :a5578 :a5578 :a5578. :a5579 :a5579 :a5579. :a5580 :a5580 :a5580. :a5581 :a5581 :a5581. :a5582 :a5582 :a5582. :a5583 :a5583 :a5583. :a5584 :a5584 :a5584. :a5585 :a5585 :a5585. :a5586 :a5586 :a5586. :a5587 :a5587 :a5587. :a5588 :a5588 :a5588. :a5589 :a5589 :a5589. :a5590 :a5590 :a5590. :a5591 :a5591 :a5591. :a5592 :a5592 :a5592. :a5593 :a5593 :a5593. :a5594 :a5594 :a5594. :a5595 :a5595 :a5595. :a5596 :a5596 :a5596. :a5597 :a5597 :a5597. :a5598 :a5598 :a5598. :a5599 :a5599 :a5599. :a5600 :a5600 :a5600. :a5601 :a5601 :a5601. :a5602 :a5602 :a5602. :a5603 :a5603 :a5603. :a5604 :a5604 :a5604. :a5605 :a5605 :a5605. :a5606 :a5606 :a5606. :a5607 :a5607 :a5607. :a5608 :a5608 :a5608. :a5609 :a5609 :a5609. :a5610 :a5610 :a5610. :a5611 :a5611 :a5611. :a5612 :a5612 :a5612. :a5613 :a5613 :a5613. :a5614 :a5614 :a5614. :a5615 :a5615 :a5615. :a5616 :a5616 :a5616. :a5617 :a5617 :a5617. :a5618 :a5618 :a5618. :a5619 :a5619 :a5619. :a5620 :a5620 :a5620. :a5621 :a5621 :a5621. :a5622 :a5622 :a5622. :a5623 :a5623 :a5623. :a5624 :a5624 :a5624. :a5625 :a5625 :a5625. :a5626 :a5626 :a5626. :a5627 :a5627 :a5627. :a5628 :a5628 :a5628. :a5629 :a5629 :a5629. :a5630 :a5630 :a5630. :a5631 :a5631 :a5631. :a5632 :a5632 :a5632. :a5633 :a5633 :a5633. :a5634 :a5634 :a5634. :a5635 :a5635 :a5635. :a5636 :a5636 :a5636. :a5637 :a5637 :a5637. :a5638 :a5638 :a5638. :a5639 :a5639 :a5639. :a5640 :a5640 :a5640. :a5641 :a5641 :a5641. :a5642 :a5642 :a5642. :a5643 :a5643 :a5643. :a5644 :a5644 :a5644. :a5645 :a5645 :a5645. :a5646 :a5646 :a5646. :a5647 :a5647 :a5647. :a5648 :a5648 :a5648. :a5649 :a5649 :a5649. :a5650 :a5650 :a5650. :a5651 :a5651 :a5651. :a5652 :a5652 :a5652. :a5653 :a5653 :a5653. :a5654 :a5654 :a5654. :a5655 :a5655 :a5655. :a5656 :a5656 :a5656. :a5657 :a5657 :a5657. :a5658 :a5658 :a5658. :a5659 :a5659 :a5659. :a5660 :a5660 :a5660. :a5661 :a5661 :a5661. :a5662 :a5662 :a5662. :a5663 :a5663 :a5663. :a5664 :a5664 :a5664. :a5665 :a5665 :a5665. :a5666 :a5666 :a5666. :a5667 :a5667 :a5667. :a5668 :a5668 :a5668. :a5669 :a5669 :a5669. :a5670 :a5670 :a5670. :a5671 :a5671 :a5671. :a5672 :a5672 :a5672. :a5673 :a5673 :a5673. :a5674 :a5674 :a5674. :a5675 :a5675 :a5675. :a5676 :a5676 :a5676. :a5677 :a5677 :a5677. :a5678 :a5678 :a5678. :a5679 :a5679 :a5679. :a5680 :a5680 :a5680. :a5681 :a5681 :a5681. :a5682 :a5682 :a5682. :a5683 :a5683 :a5683. :a5684 :a5684 :a5684. :a5685 :a5685 :a5685. :a5686 :a5686 :a5686. :a5687 :a5687 :a5687. :a5688 :a5688 :a5688. :a5689 :a5689 :a5689. :a5690 :a5690 :a5690. :a5691 :a5691 :a5691. :a5692 :a5692 :a5692. :a5693 :a5693 :a5693. :a5694 :a5694 :a5694. :a5695 :a5695 :a5695. :a5696 :a5696 :a5696. :a5697 :a5697 :a5697. :a5698 :a5698 :a5698. :a5699 :a5699 :a5699. :a5700 :a5700 :a5700. :a5701 :a5701 :a5701. :a5702 :a5702 :a5702. :a5703 :a5703 :a5703. :a5704 :a5704 :a5704. :a5705 :a5705 :a5705. :a5706 :a5706 :a5706. :a5707 :a5707 :a5707. :a5708 :a5708 :a5708. :a5709 :a5709 :a5709. :a5710 :a5710 :a5710. :a5711 :a5711 :a5711. :a5712 :a5712 :a5712. :a5713 :a5713 :a5713. :a5714 :a5714 :a5714. :a5715 :a5715 :a5715. :a5716 :a5716 :a5716. :a5717 :a5717 :a5717. :a5718 :a5718 :a5718. :a5719 :a5719 :a5719. :a5720 :a5720 :a5720. :a5721 :a5721 :a5721. :a5722 :a5722 :a5722. :a5723 :a5723 :a5723. :a5724 :a5724 :a5724. :a5725 :a5725 :a5725. :a5726 :a5726 :a5726. :a5727 :a5727 :a5727. :a5728 :a5728 :a5728. :a5729 :a5729 :a5729. :a5730 :a5730 :a5730. :a5731 :a5731 :a5731. :a5732 :a5732 :a5732. :a5733 :a5733 :a5733. :a5734 :a5734 :a5734. :a5735 :a5735 :a5735. :a5736 :a5736 :a5736. :a5737 :a5737 :a5737. :a5738 :a5738 :a5738. :a5739 :a5739 :a5739. :a5740 :a5740 :a5740. :a5741 :a5741 :a5741. :a5742 :a5742 :a5742. :a5743 :a5743 :a5743. :a5744 :a5744 :a5744. :a5745 :a5745 :a5745. :a5746 :a5746 :a5746. :a5747 :a5747 :a5747. :a5748 :a5748 :a5748. :a5749 :a5749 :a5749. :a5750 :a5750 :a5750. :a5751 :a5751 :a5751. :a5752 :a5752 :a5752. :a5753 :a5753 :a5753. :a5754 :a5754 :a5754. :a5755 :a5755 :a5755. :a5756 :a5756 :a5756. :a5757 :a5757 :a5757. :a5758 :a5758 :a5758. :a5759 :a5759 :a5759. :a5760 :a5760 :a5760. :a5761 :a5761 :a5761. :a5762 :a5762 :a5762. :a5763 :a5763 :a5763. :a5764 :a5764 :a5764. :a5765 :a5765 :a5765. :a5766 :a5766 :a5766. :a5767 :a5767 :a5767. :a5768 :a5768 :a5768. :a5769 :a5769 :a5769. :a5770 :a5770 :a5770. :a5771 :a5771 :a5771. :a5772 :a5772 :a5772. :a5773 :a5773 :a5773. :a5774 :a5774 :a5774. :a5775 :a5775 :a5775. :a5776 :a5776 :a5776. :a5777 :a5777 :a5777. :a5778 :a5778 :a5778. :a5779 :a5779 :a5779. :a5780 :a5780 :a5780. :a5781 :a5781 :a5781. :a5782 :a5782 :a5782. :a5783 :a5783 :a5783. :a5784 :a5784 :a5784. :a5785 :a5785 :a5785. :a5786 :a5786 :a5786. :a5787 :a5787 :a5787. :a5788 :a5788 :a5788. :a5789 :a5789 :a5789. :a5790 :a5790 :a5790. :a5791 :a5791 :a5791. :a5792 :a5792 :a5792. :a5793 :a5793 :a5793. :a5794 :a5794 :a5794. :a5795 :a5795 :a5795. :a5796 :a5796 :a5796. :a5797 :a5797 :a5797. :a5798 :a5798 :a5798. :a5799 :a5799 :a5799. :a5800 :a5800 :a5800. :a5801 :a5801 :a5801. :a5802 :a5802 :a5802. :a5803 :a5803 :a5803. :a5804 :a5804 :a5804. :a5805 :a5805 :a5805. :a5806 :a5806 :a5806. :a5807 :a5807 :a5807. :a5808 :a5808 :a5808. :a5809 :a5809 :a5809. :a5810 :a5810 :a5810. :a5811 :a5811 :a5811. :a5812 :a5812 :a5812. :a5813 :a5813 :a5813. :a5814 :a5814 :a5814. :a5815 :a5815 :a5815. :a5816 :a5816 :a5816. :a5817 :a5817 :a5817. :a5818 :a5818 :a5818. :a5819 :a5819 :a5819. :a5820 :a5820 :a5820. :a5821 :a5821 :a5821. :a5822 :a5822 :a5822. :a5823 :a5823 :a5823. :a5824 :a5824 :a5824. :a5825 :a5825 :a5825. :a5826 :a5826 :a5826. :a5827 :a5827 :a5827. :a5828 :a5828 :a5828. :a5829 :a5829 :a5829. :a5830 :a5830 :a5830. :a5831 :a5831 :a5831. :a5832 :a5832 :a5832. :a5833 :a5833 :a5833. :a5834 :a5834 :a5834. :a5835 :a5835 :a5835. :a5836 :a5836 :a5836. :a5837 :a5837 :a5837. :a5838 :a5838 :a5838. :a5839 :a5839 :a5839. :a5840 :a5840 :a5840. :a5841 :a5841 :a5841. :a5842 :a5842 :a5842. :a5843 :a5843 :a5843. :a5844 :a5844 :a5844. :a5845 :a5845 :a5845. :a5846 :a5846 :a5846. :a5847 :a5847 :a5847. :a5848 :a5848 :a5848. :a5849 :a5849 :a5849. :a5850 :a5850 :a5850. :a5851 :a5851 :a5851. :a5852 :a5852 :a5852. :a5853 :a5853 :a5853. :a5854 :a5854 :a5854. :a5855 :a5855 :a5855. :a5856 :a5856 :a5856. :a5857 :a5857 :a5857. :a5858 :a5858 :a5858. :a5859 :a5859 :a5859. :a5860 :a5860 :a5860. :a5861 :a5861 :a5861. :a5862 :a5862 :a5862. :a5863 :a5863 :a5863. :a5864 :a5864 :a5864. :a5865 :a5865 :a5865. :a5866 :a5866 :a5866. :a5867 :a5867 :a5867. :a5868 :a5868 :a5868. :a5869 :a5869 :a5869. :a5870 :a5870 :a5870. :a5871 :a5871 :a5871. :a5872 :a5872 :a5872. :a5873 :a5873 :a5873. :a5874 :a5874 :a5874. :a5875 :a5875 :a5875. :a5876 :a5876 :a5876. :a5877 :a5877 :a5877. :a5878 :a5878 :a5878. :a5879 :a5879 :a5879. :a5880 :a5880 :a5880. :a5881 :a5881 :a5881. :a5882 :a5882 :a5882. :a5883 :a5883 :a5883. :a5884 :a5884 :a5884. :a5885 :a5885 :a5885. :a5886 :a5886 :a5886. :a5887 :a5887 :a5887. :a5888 :a5888 :a5888. :a5889 :a5889 :a5889. :a5890 :a5890 :a5890. :a5891 :a5891 :a5891. :a5892 :a5892 :a5892. :a5893 :a5893 :a5893. :a5894 :a5894 :a5894. :a5895 :a5895 :a5895. :a5896 :a5896 :a5896. :a5897 :a5897 :a5897. :a5898 :a5898 :a5898. :a5899 :a5899 :a5899. :a5900 :a5900 :a5900. :a5901 :a5901 :a5901. :a5902 :a5902 :a5902. :a5903 :a5903 :a5903. :a5904 :a5904 :a5904. :a5905 :a5905 :a5905. :a5906 :a5906 :a5906. :a5907 :a5907 :a5907. :a5908 :a5908 :a5908. :a5909 :a5909 :a5909. :a5910 :a5910 :a5910. :a5911 :a5911 :a5911. :a5912 :a5912 :a5912. :a5913 :a5913 :a5913. :a5914 :a5914 :a5914. :a5915 :a5915 :a5915. :a5916 :a5916 :a5916. :a5917 :a5917 :a5917. :a5918 :a5918 :a5918. :a5919 :a5919 :a5919. :a5920 :a5920 :a5920. :a5921 :a5921 :a5921. :a5922 :a5922 :a5922. :a5923 :a5923 :a5923. :a5924 :a5924 :a5924. :a5925 :a5925 :a5925. :a5926 :a5926 :a5926. :a5927 :a5927 :a5927. :a5928 :a5928 :a5928. :a5929 :a5929 :a5929. :a5930 :a5930 :a5930. :a5931 :a5931 :a5931. :a5932 :a5932 :a5932. :a5933 :a5933 :a5933. :a5934 :a5934 :a5934. :a5935 :a5935 :a5935. :a5936 :a5936 :a5936. :a5937 :a5937 :a5937. :a5938 :a5938 :a5938. :a5939 :a5939 :a5939. :a5940 :a5940 :a5940. :a5941 :a5941 :a5941. :a5942 :a5942 :a5942. :a5943 :a5943 :a5943. :a5944 :a5944 :a5944. :a5945 :a5945 :a5945. :a5946 :a5946 :a5946. :a5947 :a5947 :a5947. :a5948 :a5948 :a5948. :a5949 :a5949 :a5949. :a5950 :a5950 :a5950. :a5951 :a5951 :a5951. :a5952 :a5952 :a5952. :a5953 :a5953 :a5953. :a5954 :a5954 :a5954. :a5955 :a5955 :a5955. :a5956 :a5956 :a5956. :a5957 :a5957 :a5957. :a5958 :a5958 :a5958. :a5959 :a5959 :a5959. :a5960 :a5960 :a5960. :a5961 :a5961 :a5961. :a5962 :a5962 :a5962. :a5963 :a5963 :a5963. :a5964 :a5964 :a5964. :a5965 :a5965 :a5965. :a5966 :a5966 :a5966. :a5967 :a5967 :a5967. :a5968 :a5968 :a5968. :a5969 :a5969 :a5969. :a5970 :a5970 :a5970. :a5971 :a5971 :a5971. :a5972 :a5972 :a5972. :a5973 :a5973 :a5973. :a5974 :a5974 :a5974. :a5975 :a5975 :a5975. :a5976 :a5976 :a5976. :a5977 :a5977 :a5977. :a5978 :a5978 :a5978. :a5979 :a5979 :a5979. :a5980 :a5980 :a5980. :a5981 :a5981 :a5981. :a5982 :a5982 :a5982. :a5983 :a5983 :a5983. :a5984 :a5984 :a5984. :a5985 :a5985 :a5985. :a5986 :a5986 :a5986. :a5987 :a5987 :a5987. :a5988 :a5988 :a5988. :a5989 :a5989 :a5989. :a5990 :a5990 :a5990. :a5991 :a5991 :a5991. :a5992 :a5992 :a5992. :a5993 :a5993 :a5993. :a5994 :a5994 :a5994. :a5995 :a5995 :a5995. :a5996 :a5996 :a5996. :a5997 :a5997 :a5997. :a5998 :a5998 :a5998. :a5999 :a5999 :a5999. :a6000 :a6000 :a6000. :a6001 :a6001 :a6001. :a6002 :a6002 :a6002. :a6003 :a6003 :a6003. :a6004 :a6004 :a6004. :a6005 :a6005 :a6005. :a6006 :a6006 :a6006. :a6007 :a6007 :a6007. :a6008 :a6008 :a6008. :a6009 :a6009 :a6009. :a6010 :a6010 :a6010. :a6011 :a6011 :a6011. :a6012 :a6012 :a6012. :a6013 :a6013 :a6013. :a6014 :a6014 :a6014. :a6015 :a6015 :a6015. :a6016 :a6016 :a6016. :a6017 :a6017 :a6017. :a6018 :a6018 :a6018. :a6019 :a6019 :a6019. :a6020 :a6020 :a6020. :a6021 :a6021 :a6021. :a6022 :a6022 :a6022. :a6023 :a6023 :a6023. :a6024 :a6024 :a6024. :a6025 :a6025 :a6025. :a6026 :a6026 :a6026. :a6027 :a6027 :a6027. :a6028 :a6028 :a6028. :a6029 :a6029 :a6029. :a6030 :a6030 :a6030. :a6031 :a6031 :a6031. :a6032 :a6032 :a6032. :a6033 :a6033 :a6033. :a6034 :a6034 :a6034. :a6035 :a6035 :a6035. :a6036 :a6036 :a6036. :a6037 :a6037 :a6037. :a6038 :a6038 :a6038. :a6039 :a6039 :a6039. :a6040 :a6040 :a6040. :a6041 :a6041 :a6041. :a6042 :a6042 :a6042. :a6043 :a6043 :a6043. :a6044 :a6044 :a6044. :a6045 :a6045 :a6045. :a6046 :a6046 :a6046. :a6047 :a6047 :a6047. :a6048 :a6048 :a6048. :a6049 :a6049 :a6049. :a6050 :a6050 :a6050. :a6051 :a6051 :a6051. :a6052 :a6052 :a6052. :a6053 :a6053 :a6053. :a6054 :a6054 :a6054. :a6055 :a6055 :a6055. :a6056 :a6056 :a6056. :a6057 :a6057 :a6057. :a6058 :a6058 :a6058. :a6059 :a6059 :a6059. :a6060 :a6060 :a6060. :a6061 :a6061 :a6061. :a6062 :a6062 :a6062. :a6063 :a6063 :a6063. :a6064 :a6064 :a6064. :a6065 :a6065 :a6065. :a6066 :a6066 :a6066. :a6067 :a6067 :a6067. :a6068 :a6068 :a6068. :a6069 :a6069 :a6069. :a6070 :a6070 :a6070. :a6071 :a6071 :a6071. :a6072 :a6072 :a6072. :a6073 :a6073 :a6073. :a6074 :a6074 :a6074. :a6075 :a6075 :a6075. :a6076 :a6076 :a6076. :a6077 :a6077 :a6077. :a6078 :a6078 :a6078. :a6079 :a6079 :a6079. :a6080 :a6080 :a6080. :a6081 :a6081 :a6081. :a6082 :a6082 :a6082. :a6083 :a6083 :a6083. :a6084 :a6084 :a6084. :a6085 :a6085 :a6085. :a6086 :a6086 :a6086. :a6087 :a6087 :a6087. :a6088 :a6088 :a6088. :a6089 :a6089 :a6089. :a6090 :a6090 :a6090. :a6091 :a6091 :a6091. :a6092 :a6092 :a6092. :a6093 :a6093 :a6093. :a6094 :a6094 :a6094. :a6095 :a6095 :a6095. :a6096 :a6096 :a6096. :a6097 :a6097 :a6097. :a6098 :a6098 :a6098. :a6099 :a6099 :a6099. :a6100 :a6100 :a6100. :a6101 :a6101 :a6101. :a6102 :a6102 :a6102. :a6103 :a6103 :a6103. :a6104 :a6104 :a6104. :a6105 :a6105 :a6105. :a6106 :a6106 :a6106. :a6107 :a6107 :a6107. :a6108 :a6108 :a6108. :a6109 :a6109 :a6109. :a6110 :a6110 :a6110. :a6111 :a6111 :a6111. :a6112 :a6112 :a6112. :a6113 :a6113 :a6113. :a6114 :a6114 :a6114. :a6115 :a6115 :a6115. :a6116 :a6116 :a6116. :a6117 :a6117 :a6117. :a6118 :a6118 :a6118. :a6119 :a6119 :a6119. :a6120 :a6120 :a6120. :a6121 :a6121 :a6121. :a6122 :a6122 :a6122. :a6123 :a6123 :a6123. :a6124 :a6124 :a6124. :a6125 :a6125 :a6125. :a6126 :a6126 :a6126. :a6127 :a6127 :a6127. :a6128 :a6128 :a6128. :a6129 :a6129 :a6129. :a6130 :a6130 :a6130. :a6131 :a6131 :a6131. :a6132 :a6132 :a6132. :a6133 :a6133 :a6133. :a6134 :a6134 :a6134. :a6135 :a6135 :a6135. :a6136 :a6136 :a6136. :a6137 :a6137 :a6137. :a6138 :a6138 :a6138. :a6139 :a6139 :a6139. :a6140 :a6140 :a6140. :a6141 :a6141 :a6141. :a6142 :a6142 :a6142. :a6143 :a6143 :a6143. :a6144 :a6144 :a6144. :a6145 :a6145 :a6145. :a6146 :a6146 :a6146. :a6147 :a6147 :a6147. :a6148 :a6148 :a6148. :a6149 :a6149 :a6149. :a6150 :a6150 :a6150. :a6151 :a6151 :a6151. :a6152 :a6152 :a6152. :a6153 :a6153 :a6153. :a6154 :a6154 :a6154. :a6155 :a6155 :a6155. :a6156 :a6156 :a6156. :a6157 :a6157 :a6157. :a6158 :a6158 :a6158. :a6159 :a6159 :a6159. :a6160 :a6160 :a6160. :a6161 :a6161 :a6161. :a6162 :a6162 :a6162. :a6163 :a6163 :a6163. :a6164 :a6164 :a6164. :a6165 :a6165 :a6165. :a6166 :a6166 :a6166. :a6167 :a6167 :a6167. :a6168 :a6168 :a6168. :a6169 :a6169 :a6169. :a6170 :a6170 :a6170. :a6171 :a6171 :a6171. :a6172 :a6172 :a6172. :a6173 :a6173 :a6173. :a6174 :a6174 :a6174. :a6175 :a6175 :a6175. :a6176 :a6176 :a6176. :a6177 :a6177 :a6177. :a6178 :a6178 :a6178. :a6179 :a6179 :a6179. :a6180 :a6180 :a6180. :a6181 :a6181 :a6181. :a6182 :a6182 :a6182. :a6183 :a6183 :a6183. :a6184 :a6184 :a6184. :a6185 :a6185 :a6185. :a6186 :a6186 :a6186. :a6187 :a6187 :a6187. :a6188 :a6188 :a6188. :a6189 :a6189 :a6189. :a6190 :a6190 :a6190. :a6191 :a6191 :a6191. :a6192 :a6192 :a6192. :a6193 :a6193 :a6193. :a6194 :a6194 :a6194. :a6195 :a6195 :a6195. :a6196 :a6196 :a6196. :a6197 :a6197 :a6197. :a6198 :a6198 :a6198. :a6199 :a6199 :a6199. :a6200 :a6200 :a6200. :a6201 :a6201 :a6201. :a6202 :a6202 :a6202. :a6203 :a6203 :a6203. :a6204 :a6204 :a6204. :a6205 :a6205 :a6205. :a6206 :a6206 :a6206. :a6207 :a6207 :a6207. :a6208 :a6208 :a6208. :a6209 :a6209 :a6209. :a6210 :a6210 :a6210. :a6211 :a6211 :a6211. :a6212 :a6212 :a6212. :a6213 :a6213 :a6213. :a6214 :a6214 :a6214. :a6215 :a6215 :a6215. :a6216 :a6216 :a6216. :a6217 :a6217 :a6217. :a6218 :a6218 :a6218. :a6219 :a6219 :a6219. :a6220 :a6220 :a6220. :a6221 :a6221 :a6221. :a6222 :a6222 :a6222. :a6223 :a6223 :a6223. :a6224 :a6224 :a6224. :a6225 :a6225 :a6225. :a6226 :a6226 :a6226. :a6227 :a6227 :a6227. :a6228 :a6228 :a6228. :a6229 :a6229 :a6229. :a6230 :a6230 :a6230. :a6231 :a6231 :a6231. :a6232 :a6232 :a6232. :a6233 :a6233 :a6233. :a6234 :a6234 :a6234. :a6235 :a6235 :a6235. :a6236 :a6236 :a6236. :a6237 :a6237 :a6237. :a6238 :a6238 :a6238. :a6239 :a6239 :a6239. :a6240 :a6240 :a6240. :a6241 :a6241 :a6241. :a6242 :a6242 :a6242. :a6243 :a6243 :a6243. :a6244 :a6244 :a6244. :a6245 :a6245 :a6245. :a6246 :a6246 :a6246. :a6247 :a6247 :a6247. :a6248 :a6248 :a6248. :a6249 :a6249 :a6249. :a6250 :a6250 :a6250. :a6251 :a6251 :a6251. :a6252 :a6252 :a6252. :a6253 :a6253 :a6253. :a6254 :a6254 :a6254. :a6255 :a6255 :a6255. :a6256 :a6256 :a6256. :a6257 :a6257 :a6257. :a6258 :a6258 :a6258. :a6259 :a6259 :a6259. :a6260 :a6260 :a6260. :a6261 :a6261 :a6261. :a6262 :a6262 :a6262. :a6263 :a6263 :a6263. :a6264 :a6264 :a6264. :a6265 :a6265 :a6265. :a6266 :a6266 :a6266. :a6267 :a6267 :a6267. :a6268 :a6268 :a6268. :a6269 :a6269 :a6269. :a6270 :a6270 :a6270. :a6271 :a6271 :a6271. :a6272 :a6272 :a6272. :a6273 :a6273 :a6273. :a6274 :a6274 :a6274. :a6275 :a6275 :a6275. :a6276 :a6276 :a6276. :a6277 :a6277 :a6277. :a6278 :a6278 :a6278. :a6279 :a6279 :a6279. :a6280 :a6280 :a6280. :a6281 :a6281 :a6281. :a6282 :a6282 :a6282. :a6283 :a6283 :a6283. :a6284 :a6284 :a6284. :a6285 :a6285 :a6285. :a6286 :a6286 :a6286. :a6287 :a6287 :a6287. :a6288 :a6288 :a6288. :a6289 :a6289 :a6289. :a6290 :a6290 :a6290. :a6291 :a6291 :a6291. :a6292 :a6292 :a6292. :a6293 :a6293 :a6293. :a6294 :a6294 :a6294. :a6295 :a6295 :a6295. :a6296 :a6296 :a6296. :a6297 :a6297 :a6297. :a6298 :a6298 :a6298. :a6299 :a6299 :a6299. :a6300 :a6300 :a6300. :a6301 :a6301 :a6301. :a6302 :a6302 :a6302. :a6303 :a6303 :a6303. :a6304 :a6304 :a6304. :a6305 :a6305 :a6305. :a6306 :a6306 :a6306. :a6307 :a6307 :a6307. :a6308 :a6308 :a6308. :a6309 :a6309 :a6309. :a6310 :a6310 :a6310. :a6311 :a6311 :a6311. :a6312 :a6312 :a6312. :a6313 :a6313 :a6313. :a6314 :a6314 :a6314. :a6315 :a6315 :a6315. :a6316 :a6316 :a6316. :a6317 :a6317 :a6317. :a6318 :a6318 :a6318. :a6319 :a6319 :a6319. :a6320 :a6320 :a6320. :a6321 :a6321 :a6321. :a6322 :a6322 :a6322. :a6323 :a6323 :a6323. :a6324 :a6324 :a6324. :a6325 :a6325 :a6325. :a6326 :a6326 :a6326. :a6327 :a6327 :a6327. :a6328 :a6328 :a6328. :a6329 :a6329 :a6329. :a6330 :a6330 :a6330. :a6331 :a6331 :a6331. :a6332 :a6332 :a6332. :a6333 :a6333 :a6333. :a6334 :a6334 :a6334. :a6335 :a6335 :a6335. :a6336 :a6336 :a6336. :a6337 :a6337 :a6337. :a6338 :a6338 :a6338. :a6339 :a6339 :a6339. :a6340 :a6340 :a6340. :a6341 :a6341 :a6341. :a6342 :a6342 :a6342. :a6343 :a6343 :a6343. :a6344 :a6344 :a6344. :a6345 :a6345 :a6345. :a6346 :a6346 :a6346. :a6347 :a6347 :a6347. :a6348 :a6348 :a6348. :a6349 :a6349 :a6349. :a6350 :a6350 :a6350. :a6351 :a6351 :a6351. :a6352 :a6352 :a6352. :a6353 :a6353 :a6353. :a6354 :a6354 :a6354. :a6355 :a6355 :a6355. :a6356 :a6356 :a6356. :a6357 :a6357 :a6357. :a6358 :a6358 :a6358. :a6359 :a6359 :a6359. :a6360 :a6360 :a6360. :a6361 :a6361 :a6361. :a6362 :a6362 :a6362. :a6363 :a6363 :a6363. :a6364 :a6364 :a6364. :a6365 :a6365 :a6365. :a6366 :a6366 :a6366. :a6367 :a6367 :a6367. :a6368 :a6368 :a6368. :a6369 :a6369 :a6369. :a6370 :a6370 :a6370. :a6371 :a6371 :a6371. :a6372 :a6372 :a6372. :a6373 :a6373 :a6373. :a6374 :a6374 :a6374. :a6375 :a6375 :a6375. :a6376 :a6376 :a6376. :a6377 :a6377 :a6377. :a6378 :a6378 :a6378. :a6379 :a6379 :a6379. :a6380 :a6380 :a6380. :a6381 :a6381 :a6381. :a6382 :a6382 :a6382. :a6383 :a6383 :a6383. :a6384 :a6384 :a6384. :a6385 :a6385 :a6385. :a6386 :a6386 :a6386. :a6387 :a6387 :a6387. :a6388 :a6388 :a6388. :a6389 :a6389 :a6389. :a6390 :a6390 :a6390. :a6391 :a6391 :a6391. :a6392 :a6392 :a6392. :a6393 :a6393 :a6393. :a6394 :a6394 :a6394. :a6395 :a6395 :a6395. :a6396 :a6396 :a6396. :a6397 :a6397 :a6397. :a6398 :a6398 :a6398. :a6399 :a6399 :a6399. :a6400 :a6400 :a6400. :a6401 :a6401 :a6401. :a6402 :a6402 :a6402. :a6403 :a6403 :a6403. :a6404 :a6404 :a6404. :a6405 :a6405 :a6405. :a6406 :a6406 :a6406. :a6407 :a6407 :a6407. :a6408 :a6408 :a6408. :a6409 :a6409 :a6409. :a6410 :a6410 :a6410. :a6411 :a6411 :a6411. :a6412 :a6412 :a6412. :a6413 :a6413 :a6413. :a6414 :a6414 :a6414. :a6415 :a6415 :a6415. :a6416 :a6416 :a6416. :a6417 :a6417 :a6417. :a6418 :a6418 :a6418. :a6419 :a6419 :a6419. :a6420 :a6420 :a6420. :a6421 :a6421 :a6421. :a6422 :a6422 :a6422. :a6423 :a6423 :a6423. :a6424 :a6424 :a6424. :a6425 :a6425 :a6425. :a6426 :a6426 :a6426. :a6427 :a6427 :a6427. :a6428 :a6428 :a6428. :a6429 :a6429 :a6429. :a6430 :a6430 :a6430. :a6431 :a6431 :a6431. :a6432 :a6432 :a6432. :a6433 :a6433 :a6433. :a6434 :a6434 :a6434. :a6435 :a6435 :a6435. :a6436 :a6436 :a6436. :a6437 :a6437 :a6437. :a6438 :a6438 :a6438. :a6439 :a6439 :a6439. :a6440 :a6440 :a6440. :a6441 :a6441 :a6441. :a6442 :a6442 :a6442. :a6443 :a6443 :a6443. :a6444 :a6444 :a6444. :a6445 :a6445 :a6445. :a6446 :a6446 :a6446. :a6447 :a6447 :a6447. :a6448 :a6448 :a6448. :a6449 :a6449 :a6449. :a6450 :a6450 :a6450. :a6451 :a6451 :a6451. :a6452 :a6452 :a6452. :a6453 :a6453 :a6453. :a6454 :a6454 :a6454. :a6455 :a6455 :a6455. :a6456 :a6456 :a6456. :a6457 :a6457 :a6457. :a6458 :a6458 :a6458. :a6459 :a6459 :a6459. :a6460 :a6460 :a6460. :a6461 :a6461 :a6461. :a6462 :a6462 :a6462. :a6463 :a6463 :a6463. :a6464 :a6464 :a6464. :a6465 :a6465 :a6465. :a6466 :a6466 :a6466. :a6467 :a6467 :a6467. :a6468 :a6468 :a6468. :a6469 :a6469 :a6469. :a6470 :a6470 :a6470. :a6471 :a6471 :a6471. :a6472 :a6472 :a6472. :a6473 :a6473 :a6473. :a6474 :a6474 :a6474. :a6475 :a6475 :a6475. :a6476 :a6476 :a6476. :a6477 :a6477 :a6477. :a6478 :a6478 :a6478. :a6479 :a6479 :a6479. :a6480 :a6480 :a6480. :a6481 :a6481 :a6481. :a6482 :a6482 :a6482. :a6483 :a6483 :a6483. :a6484 :a6484 :a6484. :a6485 :a6485 :a6485. :a6486 :a6486 :a6486. :a6487 :a6487 :a6487. :a6488 :a6488 :a6488. :a6489 :a6489 :a6489. :a6490 :a6490 :a6490. :a6491 :a6491 :a6491. :a6492 :a6492 :a6492. :a6493 :a6493 :a6493. :a6494 :a6494 :a6494. :a6495 :a6495 :a6495. :a6496 :a6496 :a6496. :a6497 :a6497 :a6497. :a6498 :a6498 :a6498. :a6499 :a6499 :a6499. :a6500 :a6500 :a6500. :a6501 :a6501 :a6501. :a6502 :a6502 :a6502. :a6503 :a6503 :a6503. :a6504 :a6504 :a6504. :a6505 :a6505 :a6505. :a6506 :a6506 :a6506. :a6507 :a6507 :a6507. :a6508 :a6508 :a6508. :a6509 :a6509 :a6509. :a6510 :a6510 :a6510. :a6511 :a6511 :a6511. :a6512 :a6512 :a6512. :a6513 :a6513 :a6513. :a6514 :a6514 :a6514. :a6515 :a6515 :a6515. :a6516 :a6516 :a6516. :a6517 :a6517 :a6517. :a6518 :a6518 :a6518. :a6519 :a6519 :a6519. :a6520 :a6520 :a6520. :a6521 :a6521 :a6521. :a6522 :a6522 :a6522. :a6523 :a6523 :a6523. :a6524 :a6524 :a6524. :a6525 :a6525 :a6525. :a6526 :a6526 :a6526. :a6527 :a6527 :a6527. :a6528 :a6528 :a6528. :a6529 :a6529 :a6529. :a6530 :a6530 :a6530. :a6531 :a6531 :a6531. :a6532 :a6532 :a6532. :a6533 :a6533 :a6533. :a6534 :a6534 :a6534. :a6535 :a6535 :a6535. :a6536 :a6536 :a6536. :a6537 :a6537 :a6537. :a6538 :a6538 :a6538. :a6539 :a6539 :a6539. :a6540 :a6540 :a6540. :a6541 :a6541 :a6541. :a6542 :a6542 :a6542. :a6543 :a6543 :a6543. :a6544 :a6544 :a6544. :a6545 :a6545 :a6545. :a6546 :a6546 :a6546. :a6547 :a6547 :a6547. :a6548 :a6548 :a6548. :a6549 :a6549 :a6549. :a6550 :a6550 :a6550. :a6551 :a6551 :a6551. :a6552 :a6552 :a6552. :a6553 :a6553 :a6553. :a6554 :a6554 :a6554. :a6555 :a6555 :a6555. :a6556 :a6556 :a6556. :a6557 :a6557 :a6557. :a6558 :a6558 :a6558. :a6559 :a6559 :a6559. :a6560 :a6560 :a6560. :a6561 :a6561 :a6561. :a6562 :a6562 :a6562. :a6563 :a6563 :a6563. :a6564 :a6564 :a6564. :a6565 :a6565 :a6565. :a6566 :a6566 :a6566. :a6567 :a6567 :a6567. :a6568 :a6568 :a6568. :a6569 :a6569 :a6569. :a6570 :a6570 :a6570. :a6571 :a6571 :a6571. :a6572 :a6572 :a6572. :a6573 :a6573 :a6573. :a6574 :a6574 :a6574. :a6575 :a6575 :a6575. :a6576 :a6576 :a6576. :a6577 :a6577 :a6577. :a6578 :a6578 :a6578. :a6579 :a6579 :a6579. :a6580 :a6580 :a6580. :a6581 :a6581 :a6581. :a6582 :a6582 :a6582. :a6583 :a6583 :a6583. :a6584 :a6584 :a6584. :a6585 :a6585 :a6585. :a6586 :a6586 :a6586. :a6587 :a6587 :a6587. :a6588 :a6588 :a6588. :a6589 :a6589 :a6589. :a6590 :a6590 :a6590. :a6591 :a6591 :a6591. :a6592 :a6592 :a6592. :a6593 :a6593 :a6593. :a6594 :a6594 :a6594. :a6595 :a6595 :a6595. :a6596 :a6596 :a6596. :a6597 :a6597 :a6597. :a6598 :a6598 :a6598. :a6599 :a6599 :a6599. :a6600 :a6600 :a6600. :a6601 :a6601 :a6601. :a6602 :a6602 :a6602. :a6603 :a6603 :a6603. :a6604 :a6604 :a6604. :a6605 :a6605 :a6605. :a6606 :a6606 :a6606. :a6607 :a6607 :a6607. :a6608 :a6608 :a6608. :a6609 :a6609 :a6609. :a6610 :a6610 :a6610. :a6611 :a6611 :a6611. :a6612 :a6612 :a6612. :a6613 :a6613 :a6613. :a6614 :a6614 :a6614. :a6615 :a6615 :a6615. :a6616 :a6616 :a6616. :a6617 :a6617 :a6617. :a6618 :a6618 :a6618. :a6619 :a6619 :a6619. :a6620 :a6620 :a6620. :a6621 :a6621 :a6621. :a6622 :a6622 :a6622. :a6623 :a6623 :a6623. :a6624 :a6624 :a6624. :a6625 :a6625 :a6625. :a6626 :a6626 :a6626. :a6627 :a6627 :a6627. :a6628 :a6628 :a6628. :a6629 :a6629 :a6629. :a6630 :a6630 :a6630. :a6631 :a6631 :a6631. :a6632 :a6632 :a6632. :a6633 :a6633 :a6633. :a6634 :a6634 :a6634. :a6635 :a6635 :a6635. :a6636 :a6636 :a6636. :a6637 :a6637 :a6637. :a6638 :a6638 :a6638. :a6639 :a6639 :a6639. :a6640 :a6640 :a6640. :a6641 :a6641 :a6641. :a6642 :a6642 :a6642. :a6643 :a6643 :a6643. :a6644 :a6644 :a6644. :a6645 :a6645 :a6645. :a6646 :a6646 :a6646. :a6647 :a6647 :a6647. :a6648 :a6648 :a6648. :a6649 :a6649 :a6649. :a6650 :a6650 :a6650. :a6651 :a6651 :a6651. :a6652 :a6652 :a6652. :a6653 :a6653 :a6653. :a6654 :a6654 :a6654. :a6655 :a6655 :a6655. :a6656 :a6656 :a6656. :a6657 :a6657 :a6657. :a6658 :a6658 :a6658. :a6659 :a6659 :a6659. :a6660 :a6660 :a6660. :a6661 :a6661 :a6661. :a6662 :a6662 :a6662. :a6663 :a6663 :a6663. :a6664 :a6664 :a6664. :a6665 :a6665 :a6665. :a6666 :a6666 :a6666. :a6667 :a6667 :a6667. :a6668 :a6668 :a6668. :a6669 :a6669 :a6669. :a6670 :a6670 :a6670. :a6671 :a6671 :a6671. :a6672 :a6672 :a6672. :a6673 :a6673 :a6673. :a6674 :a6674 :a6674. :a6675 :a6675 :a6675. :a6676 :a6676 :a6676. :a6677 :a6677 :a6677. :a6678 :a6678 :a6678. :a6679 :a6679 :a6679. :a6680 :a6680 :a6680. :a6681 :a6681 :a6681. :a6682 :a6682 :a6682. :a6683 :a6683 :a6683. :a6684 :a6684 :a6684. :a6685 :a6685 :a6685. :a6686 :a6686 :a6686. :a6687 :a6687 :a6687. :a6688 :a6688 :a6688. :a6689 :a6689 :a6689. :a6690 :a6690 :a6690. :a6691 :a6691 :a6691. :a6692 :a6692 :a6692. :a6693 :a6693 :a6693. :a6694 :a6694 :a6694. :a6695 :a6695 :a6695. :a6696 :a6696 :a6696. :a6697 :a6697 :a6697. :a6698 :a6698 :a6698. :a6699 :a6699 :a6699. :a6700 :a6700 :a6700. :a6701 :a6701 :a6701. :a6702 :a6702 :a6702. :a6703 :a6703 :a6703. :a6704 :a6704 :a6704. :a6705 :a6705 :a6705. :a6706 :a6706 :a6706. :a6707 :a6707 :a6707. :a6708 :a6708 :a6708. :a6709 :a6709 :a6709. :a6710 :a6710 :a6710. :a6711 :a6711 :a6711. :a6712 :a6712 :a6712. :a6713 :a6713 :a6713. :a6714 :a6714 :a6714. :a6715 :a6715 :a6715. :a6716 :a6716 :a6716. :a6717 :a6717 :a6717. :a6718 :a6718 :a6718. :a6719 :a6719 :a6719. :a6720 :a6720 :a6720. :a6721 :a6721 :a6721. :a6722 :a6722 :a6722. :a6723 :a6723 :a6723. :a6724 :a6724 :a6724. :a6725 :a6725 :a6725. :a6726 :a6726 :a6726. :a6727 :a6727 :a6727. :a6728 :a6728 :a6728. :a6729 :a6729 :a6729. :a6730 :a6730 :a6730. :a6731 :a6731 :a6731. :a6732 :a6732 :a6732. :a6733 :a6733 :a6733. :a6734 :a6734 :a6734. :a6735 :a6735 :a6735. :a6736 :a6736 :a6736. :a6737 :a6737 :a6737. :a6738 :a6738 :a6738. :a6739 :a6739 :a6739. :a6740 :a6740 :a6740. :a6741 :a6741 :a6741. :a6742 :a6742 :a6742. :a6743 :a6743 :a6743. :a6744 :a6744 :a6744. :a6745 :a6745 :a6745. :a6746 :a6746 :a6746. :a6747 :a6747 :a6747. :a6748 :a6748 :a6748. :a6749 :a6749 :a6749. :a6750 :a6750 :a6750. :a6751 :a6751 :a6751. :a6752 :a6752 :a6752. :a6753 :a6753 :a6753. :a6754 :a6754 :a6754. :a6755 :a6755 :a6755. :a6756 :a6756 :a6756. :a6757 :a6757 :a6757. :a6758 :a6758 :a6758. :a6759 :a6759 :a6759. :a6760 :a6760 :a6760. :a6761 :a6761 :a6761. :a6762 :a6762 :a6762. :a6763 :a6763 :a6763. :a6764 :a6764 :a6764. :a6765 :a6765 :a6765. :a6766 :a6766 :a6766. :a6767 :a6767 :a6767. :a6768 :a6768 :a6768. :a6769 :a6769 :a6769. :a6770 :a6770 :a6770. :a6771 :a6771 :a6771. :a6772 :a6772 :a6772. :a6773 :a6773 :a6773. :a6774 :a6774 :a6774. :a6775 :a6775 :a6775. :a6776 :a6776 :a6776. :a6777 :a6777 :a6777. :a6778 :a6778 :a6778. :a6779 :a6779 :a6779. :a6780 :a6780 :a6780. :a6781 :a6781 :a6781. :a6782 :a6782 :a6782. :a6783 :a6783 :a6783. :a6784 :a6784 :a6784. :a6785 :a6785 :a6785. :a6786 :a6786 :a6786. :a6787 :a6787 :a6787. :a6788 :a6788 :a6788. :a6789 :a6789 :a6789. :a6790 :a6790 :a6790. :a6791 :a6791 :a6791. :a6792 :a6792 :a6792. :a6793 :a6793 :a6793. :a6794 :a6794 :a6794. :a6795 :a6795 :a6795. :a6796 :a6796 :a6796. :a6797 :a6797 :a6797. :a6798 :a6798 :a6798. :a6799 :a6799 :a6799. :a6800 :a6800 :a6800. :a6801 :a6801 :a6801. :a6802 :a6802 :a6802. :a6803 :a6803 :a6803. :a6804 :a6804 :a6804. :a6805 :a6805 :a6805. :a6806 :a6806 :a6806. :a6807 :a6807 :a6807. :a6808 :a6808 :a6808. :a6809 :a6809 :a6809. :a6810 :a6810 :a6810. :a6811 :a6811 :a6811. :a6812 :a6812 :a6812. :a6813 :a6813 :a6813. :a6814 :a6814 :a6814. :a6815 :a6815 :a6815. :a6816 :a6816 :a6816. :a6817 :a6817 :a6817. :a6818 :a6818 :a6818. :a6819 :a6819 :a6819. :a6820 :a6820 :a6820. :a6821 :a6821 :a6821. :a6822 :a6822 :a6822. :a6823 :a6823 :a6823. :a6824 :a6824 :a6824. :a6825 :a6825 :a6825. :a6826 :a6826 :a6826. :a6827 :a6827 :a6827. :a6828 :a6828 :a6828. :a6829 :a6829 :a6829. :a6830 :a6830 :a6830. :a6831 :a6831 :a6831. :a6832 :a6832 :a6832. :a6833 :a6833 :a6833. :a6834 :a6834 :a6834. :a6835 :a6835 :a6835. :a6836 :a6836 :a6836. :a6837 :a6837 :a6837. :a6838 :a6838 :a6838. :a6839 :a6839 :a6839. :a6840 :a6840 :a6840. :a6841 :a6841 :a6841. :a6842 :a6842 :a6842. :a6843 :a6843 :a6843. :a6844 :a6844 :a6844. :a6845 :a6845 :a6845. :a6846 :a6846 :a6846. :a6847 :a6847 :a6847. :a6848 :a6848 :a6848. :a6849 :a6849 :a6849. :a6850 :a6850 :a6850. :a6851 :a6851 :a6851. :a6852 :a6852 :a6852. :a6853 :a6853 :a6853. :a6854 :a6854 :a6854. :a6855 :a6855 :a6855. :a6856 :a6856 :a6856. :a6857 :a6857 :a6857. :a6858 :a6858 :a6858. :a6859 :a6859 :a6859. :a6860 :a6860 :a6860. :a6861 :a6861 :a6861. :a6862 :a6862 :a6862. :a6863 :a6863 :a6863. :a6864 :a6864 :a6864. :a6865 :a6865 :a6865. :a6866 :a6866 :a6866. :a6867 :a6867 :a6867. :a6868 :a6868 :a6868. :a6869 :a6869 :a6869. :a6870 :a6870 :a6870. :a6871 :a6871 :a6871. :a6872 :a6872 :a6872. :a6873 :a6873 :a6873. :a6874 :a6874 :a6874. :a6875 :a6875 :a6875. :a6876 :a6876 :a6876. :a6877 :a6877 :a6877. :a6878 :a6878 :a6878. :a6879 :a6879 :a6879. :a6880 :a6880 :a6880. :a6881 :a6881 :a6881. :a6882 :a6882 :a6882. :a6883 :a6883 :a6883. :a6884 :a6884 :a6884. :a6885 :a6885 :a6885. :a6886 :a6886 :a6886. :a6887 :a6887 :a6887. :a6888 :a6888 :a6888. :a6889 :a6889 :a6889. :a6890 :a6890 :a6890. :a6891 :a6891 :a6891. :a6892 :a6892 :a6892. :a6893 :a6893 :a6893. :a6894 :a6894 :a6894. :a6895 :a6895 :a6895. :a6896 :a6896 :a6896. :a6897 :a6897 :a6897. :a6898 :a6898 :a6898. :a6899 :a6899 :a6899. :a6900 :a6900 :a6900. :a6901 :a6901 :a6901. :a6902 :a6902 :a6902. :a6903 :a6903 :a6903. :a6904 :a6904 :a6904. :a6905 :a6905 :a6905. :a6906 :a6906 :a6906. :a6907 :a6907 :a6907. :a6908 :a6908 :a6908. :a6909 :a6909 :a6909. :a6910 :a6910 :a6910. :a6911 :a6911 :a6911. :a6912 :a6912 :a6912. :a6913 :a6913 :a6913. :a6914 :a6914 :a6914. :a6915 :a6915 :a6915. :a6916 :a6916 :a6916. :a6917 :a6917 :a6917. :a6918 :a6918 :a6918. :a6919 :a6919 :a6919. :a6920 :a6920 :a6920. :a6921 :a6921 :a6921. :a6922 :a6922 :a6922. :a6923 :a6923 :a6923. :a6924 :a6924 :a6924. :a6925 :a6925 :a6925. :a6926 :a6926 :a6926. :a6927 :a6927 :a6927. :a6928 :a6928 :a6928. :a6929 :a6929 :a6929. :a6930 :a6930 :a6930. :a6931 :a6931 :a6931. :a6932 :a6932 :a6932. :a6933 :a6933 :a6933. :a6934 :a6934 :a6934. :a6935 :a6935 :a6935. :a6936 :a6936 :a6936. :a6937 :a6937 :a6937. :a6938 :a6938 :a6938. :a6939 :a6939 :a6939. :a6940 :a6940 :a6940. :a6941 :a6941 :a6941. :a6942 :a6942 :a6942. :a6943 :a6943 :a6943. :a6944 :a6944 :a6944. :a6945 :a6945 :a6945. :a6946 :a6946 :a6946. :a6947 :a6947 :a6947. :a6948 :a6948 :a6948. :a6949 :a6949 :a6949. :a6950 :a6950 :a6950. :a6951 :a6951 :a6951. :a6952 :a6952 :a6952. :a6953 :a6953 :a6953. :a6954 :a6954 :a6954. :a6955 :a6955 :a6955. :a6956 :a6956 :a6956. :a6957 :a6957 :a6957. :a6958 :a6958 :a6958. :a6959 :a6959 :a6959. :a6960 :a6960 :a6960. :a6961 :a6961 :a6961. :a6962 :a6962 :a6962. :a6963 :a6963 :a6963. :a6964 :a6964 :a6964. :a6965 :a6965 :a6965. :a6966 :a6966 :a6966. :a6967 :a6967 :a6967. :a6968 :a6968 :a6968. :a6969 :a6969 :a6969. :a6970 :a6970 :a6970. :a6971 :a6971 :a6971. :a6972 :a6972 :a6972. :a6973 :a6973 :a6973. :a6974 :a6974 :a6974. :a6975 :a6975 :a6975. :a6976 :a6976 :a6976. :a6977 :a6977 :a6977. :a6978 :a6978 :a6978. :a6979 :a6979 :a6979. :a6980 :a6980 :a6980. :a6981 :a6981 :a6981. :a6982 :a6982 :a6982. :a6983 :a6983 :a6983. :a6984 :a6984 :a6984. :a6985 :a6985 :a6985. :a6986 :a6986 :a6986. :a6987 :a6987 :a6987. :a6988 :a6988 :a6988. :a6989 :a6989 :a6989. :a6990 :a6990 :a6990. :a6991 :a6991 :a6991. :a6992 :a6992 :a6992. :a6993 :a6993 :a6993. :a6994 :a6994 :a6994. :a6995 :a6995 :a6995. :a6996 :a6996 :a6996. :a6997 :a6997 :a6997. :a6998 :a6998 :a6998. :a6999 :a6999 :a6999. :a7000 :a7000 :a7000. :a7001 :a7001 :a7001. :a7002 :a7002 :a7002. :a7003 :a7003 :a7003. :a7004 :a7004 :a7004. :a7005 :a7005 :a7005. :a7006 :a7006 :a7006. :a7007 :a7007 :a7007. :a7008 :a7008 :a7008. :a7009 :a7009 :a7009. :a7010 :a7010 :a7010. :a7011 :a7011 :a7011. :a7012 :a7012 :a7012. :a7013 :a7013 :a7013. :a7014 :a7014 :a7014. :a7015 :a7015 :a7015. :a7016 :a7016 :a7016. :a7017 :a7017 :a7017. :a7018 :a7018 :a7018. :a7019 :a7019 :a7019. :a7020 :a7020 :a7020. :a7021 :a7021 :a7021. :a7022 :a7022 :a7022. :a7023 :a7023 :a7023. :a7024 :a7024 :a7024. :a7025 :a7025 :a7025. :a7026 :a7026 :a7026. :a7027 :a7027 :a7027. :a7028 :a7028 :a7028. :a7029 :a7029 :a7029. :a7030 :a7030 :a7030. :a7031 :a7031 :a7031. :a7032 :a7032 :a7032. :a7033 :a7033 :a7033. :a7034 :a7034 :a7034. :a7035 :a7035 :a7035. :a7036 :a7036 :a7036. :a7037 :a7037 :a7037. :a7038 :a7038 :a7038. :a7039 :a7039 :a7039. :a7040 :a7040 :a7040. :a7041 :a7041 :a7041. :a7042 :a7042 :a7042. :a7043 :a7043 :a7043. :a7044 :a7044 :a7044. :a7045 :a7045 :a7045. :a7046 :a7046 :a7046. :a7047 :a7047 :a7047. :a7048 :a7048 :a7048. :a7049 :a7049 :a7049. :a7050 :a7050 :a7050. :a7051 :a7051 :a7051. :a7052 :a7052 :a7052. :a7053 :a7053 :a7053. :a7054 :a7054 :a7054. :a7055 :a7055 :a7055. :a7056 :a7056 :a7056. :a7057 :a7057 :a7057. :a7058 :a7058 :a7058. :a7059 :a7059 :a7059. :a7060 :a7060 :a7060. :a7061 :a7061 :a7061. :a7062 :a7062 :a7062. :a7063 :a7063 :a7063. :a7064 :a7064 :a7064. :a7065 :a7065 :a7065. :a7066 :a7066 :a7066. :a7067 :a7067 :a7067. :a7068 :a7068 :a7068. :a7069 :a7069 :a7069. :a7070 :a7070 :a7070. :a7071 :a7071 :a7071. :a7072 :a7072 :a7072. :a7073 :a7073 :a7073. :a7074 :a7074 :a7074. :a7075 :a7075 :a7075. :a7076 :a7076 :a7076. :a7077 :a7077 :a7077. :a7078 :a7078 :a7078. :a7079 :a7079 :a7079. :a7080 :a7080 :a7080. :a7081 :a7081 :a7081. :a7082 :a7082 :a7082. :a7083 :a7083 :a7083. :a7084 :a7084 :a7084. :a7085 :a7085 :a7085. :a7086 :a7086 :a7086. :a7087 :a7087 :a7087. :a7088 :a7088 :a7088. :a7089 :a7089 :a7089. :a7090 :a7090 :a7090. :a7091 :a7091 :a7091. :a7092 :a7092 :a7092. :a7093 :a7093 :a7093. :a7094 :a7094 :a7094. :a7095 :a7095 :a7095. :a7096 :a7096 :a7096. :a7097 :a7097 :a7097. :a7098 :a7098 :a7098. :a7099 :a7099 :a7099. :a7100 :a7100 :a7100. :a7101 :a7101 :a7101. :a7102 :a7102 :a7102. :a7103 :a7103 :a7103. :a7104 :a7104 :a7104. :a7105 :a7105 :a7105. :a7106 :a7106 :a7106. :a7107 :a7107 :a7107. :a7108 :a7108 :a7108. :a7109 :a7109 :a7109. :a7110 :a7110 :a7110. :a7111 :a7111 :a7111. :a7112 :a7112 :a7112. :a7113 :a7113 :a7113. :a7114 :a7114 :a7114. :a7115 :a7115 :a7115. :a7116 :a7116 :a7116. :a7117 :a7117 :a7117. :a7118 :a7118 :a7118. :a7119 :a7119 :a7119. :a7120 :a7120 :a7120. :a7121 :a7121 :a7121. :a7122 :a7122 :a7122. :a7123 :a7123 :a7123. :a7124 :a7124 :a7124. :a7125 :a7125 :a7125. :a7126 :a7126 :a7126. :a7127 :a7127 :a7127. :a7128 :a7128 :a7128. :a7129 :a7129 :a7129. :a7130 :a7130 :a7130. :a7131 :a7131 :a7131. :a7132 :a7132 :a7132. :a7133 :a7133 :a7133. :a7134 :a7134 :a7134. :a7135 :a7135 :a7135. :a7136 :a7136 :a7136. :a7137 :a7137 :a7137. :a7138 :a7138 :a7138. :a7139 :a7139 :a7139. :a7140 :a7140 :a7140. :a7141 :a7141 :a7141. :a7142 :a7142 :a7142. :a7143 :a7143 :a7143. :a7144 :a7144 :a7144. :a7145 :a7145 :a7145. :a7146 :a7146 :a7146. :a7147 :a7147 :a7147. :a7148 :a7148 :a7148. :a7149 :a7149 :a7149. :a7150 :a7150 :a7150. :a7151 :a7151 :a7151. :a7152 :a7152 :a7152. :a7153 :a7153 :a7153. :a7154 :a7154 :a7154. :a7155 :a7155 :a7155. :a7156 :a7156 :a7156. :a7157 :a7157 :a7157. :a7158 :a7158 :a7158. :a7159 :a7159 :a7159. :a7160 :a7160 :a7160. :a7161 :a7161 :a7161. :a7162 :a7162 :a7162. :a7163 :a7163 :a7163. :a7164 :a7164 :a7164. :a7165 :a7165 :a7165. :a7166 :a7166 :a7166. :a7167 :a7167 :a7167. :a7168 :a7168 :a7168. :a7169 :a7169 :a7169. :a7170 :a7170 :a7170. :a7171 :a7171 :a7171. :a7172 :a7172 :a7172. :a7173 :a7173 :a7173. :a7174 :a7174 :a7174. :a7175 :a7175 :a7175. :a7176 :a7176 :a7176. :a7177 :a7177 :a7177. :a7178 :a7178 :a7178. :a7179 :a7179 :a7179. :a7180 :a7180 :a7180. :a7181 :a7181 :a7181. :a7182 :a7182 :a7182. :a7183 :a7183 :a7183. :a7184 :a7184 :a7184. :a7185 :a7185 :a7185. :a7186 :a7186 :a7186. :a7187 :a7187 :a7187. :a7188 :a7188 :a7188. :a7189 :a7189 :a7189. :a7190 :a7190 :a7190. :a7191 :a7191 :a7191. :a7192 :a7192 :a7192. :a7193 :a7193 :a7193. :a7194 :a7194 :a7194. :a7195 :a7195 :a7195. :a7196 :a7196 :a7196. :a7197 :a7197 :a7197. :a7198 :a7198 :a7198. :a7199 :a7199 :a7199. :a7200 :a7200 :a7200. :a7201 :a7201 :a7201. :a7202 :a7202 :a7202. :a7203 :a7203 :a7203. :a7204 :a7204 :a7204. :a7205 :a7205 :a7205. :a7206 :a7206 :a7206. :a7207 :a7207 :a7207. :a7208 :a7208 :a7208. :a7209 :a7209 :a7209. :a7210 :a7210 :a7210. :a7211 :a7211 :a7211. :a7212 :a7212 :a7212. :a7213 :a7213 :a7213. :a7214 :a7214 :a7214. :a7215 :a7215 :a7215. :a7216 :a7216 :a7216. :a7217 :a7217 :a7217. :a7218 :a7218 :a7218. :a7219 :a7219 :a7219. :a7220 :a7220 :a7220. :a7221 :a7221 :a7221. :a7222 :a7222 :a7222. :a7223 :a7223 :a7223. :a7224 :a7224 :a7224. :a7225 :a7225 :a7225. :a7226 :a7226 :a7226. :a7227 :a7227 :a7227. :a7228 :a7228 :a7228. :a7229 :a7229 :a7229. :a7230 :a7230 :a7230. :a7231 :a7231 :a7231. :a7232 :a7232 :a7232. :a7233 :a7233 :a7233. :a7234 :a7234 :a7234. :a7235 :a7235 :a7235. :a7236 :a7236 :a7236. :a7237 :a7237 :a7237. :a7238 :a7238 :a7238. :a7239 :a7239 :a7239. :a7240 :a7240 :a7240. :a7241 :a7241 :a7241. :a7242 :a7242 :a7242. :a7243 :a7243 :a7243. :a7244 :a7244 :a7244. :a7245 :a7245 :a7245. :a7246 :a7246 :a7246. :a7247 :a7247 :a7247. :a7248 :a7248 :a7248. :a7249 :a7249 :a7249. :a7250 :a7250 :a7250. :a7251 :a7251 :a7251. :a7252 :a7252 :a7252. :a7253 :a7253 :a7253. :a7254 :a7254 :a7254. :a7255 :a7255 :a7255. :a7256 :a7256 :a7256. :a7257 :a7257 :a7257. :a7258 :a7258 :a7258. :a7259 :a7259 :a7259. :a7260 :a7260 :a7260. :a7261 :a7261 :a7261. :a7262 :a7262 :a7262. :a7263 :a7263 :a7263. :a7264 :a7264 :a7264. :a7265 :a7265 :a7265. :a7266 :a7266 :a7266. :a7267 :a7267 :a7267. :a7268 :a7268 :a7268. :a7269 :a7269 :a7269. :a7270 :a7270 :a7270. :a7271 :a7271 :a7271. :a7272 :a7272 :a7272. :a7273 :a7273 :a7273. :a7274 :a7274 :a7274. :a7275 :a7275 :a7275. :a7276 :a7276 :a7276. :a7277 :a7277 :a7277. :a7278 :a7278 :a7278. :a7279 :a7279 :a7279. :a7280 :a7280 :a7280. :a7281 :a7281 :a7281. :a7282 :a7282 :a7282. :a7283 :a7283 :a7283. :a7284 :a7284 :a7284. :a7285 :a7285 :a7285. :a7286 :a7286 :a7286. :a7287 :a7287 :a7287. :a7288 :a7288 :a7288. :a7289 :a7289 :a7289. :a7290 :a7290 :a7290. :a7291 :a7291 :a7291. :a7292 :a7292 :a7292. :a7293 :a7293 :a7293. :a7294 :a7294 :a7294. :a7295 :a7295 :a7295. :a7296 :a7296 :a7296. :a7297 :a7297 :a7297. :a7298 :a7298 :a7298. :a7299 :a7299 :a7299. :a7300 :a7300 :a7300. :a7301 :a7301 :a7301. :a7302 :a7302 :a7302. :a7303 :a7303 :a7303. :a7304 :a7304 :a7304. :a7305 :a7305 :a7305. :a7306 :a7306 :a7306. :a7307 :a7307 :a7307. :a7308 :a7308 :a7308. :a7309 :a7309 :a7309. :a7310 :a7310 :a7310. :a7311 :a7311 :a7311. :a7312 :a7312 :a7312. :a7313 :a7313 :a7313. :a7314 :a7314 :a7314. :a7315 :a7315 :a7315. :a7316 :a7316 :a7316. :a7317 :a7317 :a7317. :a7318 :a7318 :a7318. :a7319 :a7319 :a7319. :a7320 :a7320 :a7320. :a7321 :a7321 :a7321. :a7322 :a7322 :a7322. :a7323 :a7323 :a7323. :a7324 :a7324 :a7324. :a7325 :a7325 :a7325. :a7326 :a7326 :a7326. :a7327 :a7327 :a7327. :a7328 :a7328 :a7328. :a7329 :a7329 :a7329. :a7330 :a7330 :a7330. :a7331 :a7331 :a7331. :a7332 :a7332 :a7332. :a7333 :a7333 :a7333. :a7334 :a7334 :a7334. :a7335 :a7335 :a7335. :a7336 :a7336 :a7336. :a7337 :a7337 :a7337. :a7338 :a7338 :a7338. :a7339 :a7339 :a7339. :a7340 :a7340 :a7340. :a7341 :a7341 :a7341. :a7342 :a7342 :a7342. :a7343 :a7343 :a7343. :a7344 :a7344 :a7344. :a7345 :a7345 :a7345. :a7346 :a7346 :a7346. :a7347 :a7347 :a7347. :a7348 :a7348 :a7348. :a7349 :a7349 :a7349. :a7350 :a7350 :a7350. :a7351 :a7351 :a7351. :a7352 :a7352 :a7352. :a7353 :a7353 :a7353. :a7354 :a7354 :a7354. :a7355 :a7355 :a7355. :a7356 :a7356 :a7356. :a7357 :a7357 :a7357. :a7358 :a7358 :a7358. :a7359 :a7359 :a7359. :a7360 :a7360 :a7360. :a7361 :a7361 :a7361. :a7362 :a7362 :a7362. :a7363 :a7363 :a7363. :a7364 :a7364 :a7364. :a7365 :a7365 :a7365. :a7366 :a7366 :a7366. :a7367 :a7367 :a7367. :a7368 :a7368 :a7368. :a7369 :a7369 :a7369. :a7370 :a7370 :a7370. :a7371 :a7371 :a7371. :a7372 :a7372 :a7372. :a7373 :a7373 :a7373. :a7374 :a7374 :a7374. :a7375 :a7375 :a7375. :a7376 :a7376 :a7376. :a7377 :a7377 :a7377. :a7378 :a7378 :a7378. :a7379 :a7379 :a7379. :a7380 :a7380 :a7380. :a7381 :a7381 :a7381. :a7382 :a7382 :a7382. :a7383 :a7383 :a7383. :a7384 :a7384 :a7384. :a7385 :a7385 :a7385. :a7386 :a7386 :a7386. :a7387 :a7387 :a7387. :a7388 :a7388 :a7388. :a7389 :a7389 :a7389. :a7390 :a7390 :a7390. :a7391 :a7391 :a7391. :a7392 :a7392 :a7392. :a7393 :a7393 :a7393. :a7394 :a7394 :a7394. :a7395 :a7395 :a7395. :a7396 :a7396 :a7396. :a7397 :a7397 :a7397. :a7398 :a7398 :a7398. :a7399 :a7399 :a7399. :a7400 :a7400 :a7400. :a7401 :a7401 :a7401. :a7402 :a7402 :a7402. :a7403 :a7403 :a7403. :a7404 :a7404 :a7404. :a7405 :a7405 :a7405. :a7406 :a7406 :a7406. :a7407 :a7407 :a7407. :a7408 :a7408 :a7408. :a7409 :a7409 :a7409. :a7410 :a7410 :a7410. :a7411 :a7411 :a7411. :a7412 :a7412 :a7412. :a7413 :a7413 :a7413. :a7414 :a7414 :a7414. :a7415 :a7415 :a7415. :a7416 :a7416 :a7416. :a7417 :a7417 :a7417. :a7418 :a7418 :a7418. :a7419 :a7419 :a7419. :a7420 :a7420 :a7420. :a7421 :a7421 :a7421. :a7422 :a7422 :a7422. :a7423 :a7423 :a7423. :a7424 :a7424 :a7424. :a7425 :a7425 :a7425. :a7426 :a7426 :a7426. :a7427 :a7427 :a7427. :a7428 :a7428 :a7428. :a7429 :a7429 :a7429. :a7430 :a7430 :a7430. :a7431 :a7431 :a7431. :a7432 :a7432 :a7432. :a7433 :a7433 :a7433. :a7434 :a7434 :a7434. :a7435 :a7435 :a7435. :a7436 :a7436 :a7436. :a7437 :a7437 :a7437. :a7438 :a7438 :a7438. :a7439 :a7439 :a7439. :a7440 :a7440 :a7440. :a7441 :a7441 :a7441. :a7442 :a7442 :a7442. :a7443 :a7443 :a7443. :a7444 :a7444 :a7444. :a7445 :a7445 :a7445. :a7446 :a7446 :a7446. :a7447 :a7447 :a7447. :a7448 :a7448 :a7448. :a7449 :a7449 :a7449. :a7450 :a7450 :a7450. :a7451 :a7451 :a7451. :a7452 :a7452 :a7452. :a7453 :a7453 :a7453. :a7454 :a7454 :a7454. :a7455 :a7455 :a7455. :a7456 :a7456 :a7456. :a7457 :a7457 :a7457. :a7458 :a7458 :a7458. :a7459 :a7459 :a7459. :a7460 :a7460 :a7460. :a7461 :a7461 :a7461. :a7462 :a7462 :a7462. :a7463 :a7463 :a7463. :a7464 :a7464 :a7464. :a7465 :a7465 :a7465. :a7466 :a7466 :a7466. :a7467 :a7467 :a7467. :a7468 :a7468 :a7468. :a7469 :a7469 :a7469. :a7470 :a7470 :a7470. :a7471 :a7471 :a7471. :a7472 :a7472 :a7472. :a7473 :a7473 :a7473. :a7474 :a7474 :a7474. :a7475 :a7475 :a7475. :a7476 :a7476 :a7476. :a7477 :a7477 :a7477. :a7478 :a7478 :a7478. :a7479 :a7479 :a7479. :a7480 :a7480 :a7480. :a7481 :a7481 :a7481. :a7482 :a7482 :a7482. :a7483 :a7483 :a7483. :a7484 :a7484 :a7484. :a7485 :a7485 :a7485. :a7486 :a7486 :a7486. :a7487 :a7487 :a7487. :a7488 :a7488 :a7488. :a7489 :a7489 :a7489. :a7490 :a7490 :a7490. :a7491 :a7491 :a7491. :a7492 :a7492 :a7492. :a7493 :a7493 :a7493. :a7494 :a7494 :a7494. :a7495 :a7495 :a7495. :a7496 :a7496 :a7496. :a7497 :a7497 :a7497. :a7498 :a7498 :a7498. :a7499 :a7499 :a7499. :a7500 :a7500 :a7500. :a7501 :a7501 :a7501. :a7502 :a7502 :a7502. :a7503 :a7503 :a7503. :a7504 :a7504 :a7504. :a7505 :a7505 :a7505. :a7506 :a7506 :a7506. :a7507 :a7507 :a7507. :a7508 :a7508 :a7508. :a7509 :a7509 :a7509. :a7510 :a7510 :a7510. :a7511 :a7511 :a7511. :a7512 :a7512 :a7512. :a7513 :a7513 :a7513. :a7514 :a7514 :a7514. :a7515 :a7515 :a7515. :a7516 :a7516 :a7516. :a7517 :a7517 :a7517. :a7518 :a7518 :a7518. :a7519 :a7519 :a7519. :a7520 :a7520 :a7520. :a7521 :a7521 :a7521. :a7522 :a7522 :a7522. :a7523 :a7523 :a7523. :a7524 :a7524 :a7524. :a7525 :a7525 :a7525. :a7526 :a7526 :a7526. :a7527 :a7527 :a7527. :a7528 :a7528 :a7528. :a7529 :a7529 :a7529. :a7530 :a7530 :a7530. :a7531 :a7531 :a7531. :a7532 :a7532 :a7532. :a7533 :a7533 :a7533. :a7534 :a7534 :a7534. :a7535 :a7535 :a7535. :a7536 :a7536 :a7536. :a7537 :a7537 :a7537. :a7538 :a7538 :a7538. :a7539 :a7539 :a7539. :a7540 :a7540 :a7540. :a7541 :a7541 :a7541. :a7542 :a7542 :a7542. :a7543 :a7543 :a7543. :a7544 :a7544 :a7544. :a7545 :a7545 :a7545. :a7546 :a7546 :a7546. :a7547 :a7547 :a7547. :a7548 :a7548 :a7548. :a7549 :a7549 :a7549. :a7550 :a7550 :a7550. :a7551 :a7551 :a7551. :a7552 :a7552 :a7552. :a7553 :a7553 :a7553. :a7554 :a7554 :a7554. :a7555 :a7555 :a7555. :a7556 :a7556 :a7556. :a7557 :a7557 :a7557. :a7558 :a7558 :a7558. :a7559 :a7559 :a7559. :a7560 :a7560 :a7560. :a7561 :a7561 :a7561. :a7562 :a7562 :a7562. :a7563 :a7563 :a7563. :a7564 :a7564 :a7564. :a7565 :a7565 :a7565. :a7566 :a7566 :a7566. :a7567 :a7567 :a7567. :a7568 :a7568 :a7568. :a7569 :a7569 :a7569. :a7570 :a7570 :a7570. :a7571 :a7571 :a7571. :a7572 :a7572 :a7572. :a7573 :a7573 :a7573. :a7574 :a7574 :a7574. :a7575 :a7575 :a7575. :a7576 :a7576 :a7576. :a7577 :a7577 :a7577. :a7578 :a7578 :a7578. :a7579 :a7579 :a7579. :a7580 :a7580 :a7580. :a7581 :a7581 :a7581. :a7582 :a7582 :a7582. :a7583 :a7583 :a7583. :a7584 :a7584 :a7584. :a7585 :a7585 :a7585. :a7586 :a7586 :a7586. :a7587 :a7587 :a7587. :a7588 :a7588 :a7588. :a7589 :a7589 :a7589. :a7590 :a7590 :a7590. :a7591 :a7591 :a7591. :a7592 :a7592 :a7592. :a7593 :a7593 :a7593. :a7594 :a7594 :a7594. :a7595 :a7595 :a7595. :a7596 :a7596 :a7596. :a7597 :a7597 :a7597. :a7598 :a7598 :a7598. :a7599 :a7599 :a7599. :a7600 :a7600 :a7600. :a7601 :a7601 :a7601. :a7602 :a7602 :a7602. :a7603 :a7603 :a7603. :a7604 :a7604 :a7604. :a7605 :a7605 :a7605. :a7606 :a7606 :a7606. :a7607 :a7607 :a7607. :a7608 :a7608 :a7608. :a7609 :a7609 :a7609. :a7610 :a7610 :a7610. :a7611 :a7611 :a7611. :a7612 :a7612 :a7612. :a7613 :a7613 :a7613. :a7614 :a7614 :a7614. :a7615 :a7615 :a7615. :a7616 :a7616 :a7616. :a7617 :a7617 :a7617. :a7618 :a7618 :a7618. :a7619 :a7619 :a7619. :a7620 :a7620 :a7620. :a7621 :a7621 :a7621. :a7622 :a7622 :a7622. :a7623 :a7623 :a7623. :a7624 :a7624 :a7624. :a7625 :a7625 :a7625. :a7626 :a7626 :a7626. :a7627 :a7627 :a7627. :a7628 :a7628 :a7628. :a7629 :a7629 :a7629. :a7630 :a7630 :a7630. :a7631 :a7631 :a7631. :a7632 :a7632 :a7632. :a7633 :a7633 :a7633. :a7634 :a7634 :a7634. :a7635 :a7635 :a7635. :a7636 :a7636 :a7636. :a7637 :a7637 :a7637. :a7638 :a7638 :a7638. :a7639 :a7639 :a7639. :a7640 :a7640 :a7640. :a7641 :a7641 :a7641. :a7642 :a7642 :a7642. :a7643 :a7643 :a7643. :a7644 :a7644 :a7644. :a7645 :a7645 :a7645. :a7646 :a7646 :a7646. :a7647 :a7647 :a7647. :a7648 :a7648 :a7648. :a7649 :a7649 :a7649. :a7650 :a7650 :a7650. :a7651 :a7651 :a7651. :a7652 :a7652 :a7652. :a7653 :a7653 :a7653. :a7654 :a7654 :a7654. :a7655 :a7655 :a7655. :a7656 :a7656 :a7656. :a7657 :a7657 :a7657. :a7658 :a7658 :a7658. :a7659 :a7659 :a7659. :a7660 :a7660 :a7660. :a7661 :a7661 :a7661. :a7662 :a7662 :a7662. :a7663 :a7663 :a7663. :a7664 :a7664 :a7664. :a7665 :a7665 :a7665. :a7666 :a7666 :a7666. :a7667 :a7667 :a7667. :a7668 :a7668 :a7668. :a7669 :a7669 :a7669. :a7670 :a7670 :a7670. :a7671 :a7671 :a7671. :a7672 :a7672 :a7672. :a7673 :a7673 :a7673. :a7674 :a7674 :a7674. :a7675 :a7675 :a7675. :a7676 :a7676 :a7676. :a7677 :a7677 :a7677. :a7678 :a7678 :a7678. :a7679 :a7679 :a7679. :a7680 :a7680 :a7680. :a7681 :a7681 :a7681. :a7682 :a7682 :a7682. :a7683 :a7683 :a7683. :a7684 :a7684 :a7684. :a7685 :a7685 :a7685. :a7686 :a7686 :a7686. :a7687 :a7687 :a7687. :a7688 :a7688 :a7688. :a7689 :a7689 :a7689. :a7690 :a7690 :a7690. :a7691 :a7691 :a7691. :a7692 :a7692 :a7692. :a7693 :a7693 :a7693. :a7694 :a7694 :a7694. :a7695 :a7695 :a7695. :a7696 :a7696 :a7696. :a7697 :a7697 :a7697. :a7698 :a7698 :a7698. :a7699 :a7699 :a7699. :a7700 :a7700 :a7700. :a7701 :a7701 :a7701. :a7702 :a7702 :a7702. :a7703 :a7703 :a7703. :a7704 :a7704 :a7704. :a7705 :a7705 :a7705. :a7706 :a7706 :a7706. :a7707 :a7707 :a7707. :a7708 :a7708 :a7708. :a7709 :a7709 :a7709. :a7710 :a7710 :a7710. :a7711 :a7711 :a7711. :a7712 :a7712 :a7712. :a7713 :a7713 :a7713. :a7714 :a7714 :a7714. :a7715 :a7715 :a7715. :a7716 :a7716 :a7716. :a7717 :a7717 :a7717. :a7718 :a7718 :a7718. :a7719 :a7719 :a7719. :a7720 :a7720 :a7720. :a7721 :a7721 :a7721. :a7722 :a7722 :a7722. :a7723 :a7723 :a7723. :a7724 :a7724 :a7724. :a7725 :a7725 :a7725. :a7726 :a7726 :a7726. :a7727 :a7727 :a7727. :a7728 :a7728 :a7728. :a7729 :a7729 :a7729. :a7730 :a7730 :a7730. :a7731 :a7731 :a7731. :a7732 :a7732 :a7732. :a7733 :a7733 :a7733. :a7734 :a7734 :a7734. :a7735 :a7735 :a7735. :a7736 :a7736 :a7736. :a7737 :a7737 :a7737. :a7738 :a7738 :a7738. :a7739 :a7739 :a7739. :a7740 :a7740 :a7740. :a7741 :a7741 :a7741. :a7742 :a7742 :a7742. :a7743 :a7743 :a7743. :a7744 :a7744 :a7744. :a7745 :a7745 :a7745. :a7746 :a7746 :a7746. :a7747 :a7747 :a7747. :a7748 :a7748 :a7748. :a7749 :a7749 :a7749. :a7750 :a7750 :a7750. :a7751 :a7751 :a7751. :a7752 :a7752 :a7752. :a7753 :a7753 :a7753. :a7754 :a7754 :a7754. :a7755 :a7755 :a7755. :a7756 :a7756 :a7756. :a7757 :a7757 :a7757. :a7758 :a7758 :a7758. :a7759 :a7759 :a7759. :a7760 :a7760 :a7760. :a7761 :a7761 :a7761. :a7762 :a7762 :a7762. :a7763 :a7763 :a7763. :a7764 :a7764 :a7764. :a7765 :a7765 :a7765. :a7766 :a7766 :a7766. :a7767 :a7767 :a7767. :a7768 :a7768 :a7768. :a7769 :a7769 :a7769. :a7770 :a7770 :a7770. :a7771 :a7771 :a7771. :a7772 :a7772 :a7772. :a7773 :a7773 :a7773. :a7774 :a7774 :a7774. :a7775 :a7775 :a7775. :a7776 :a7776 :a7776. :a7777 :a7777 :a7777. :a7778 :a7778 :a7778. :a7779 :a7779 :a7779. :a7780 :a7780 :a7780. :a7781 :a7781 :a7781. :a7782 :a7782 :a7782. :a7783 :a7783 :a7783. :a7784 :a7784 :a7784. :a7785 :a7785 :a7785. :a7786 :a7786 :a7786. :a7787 :a7787 :a7787. :a7788 :a7788 :a7788. :a7789 :a7789 :a7789. :a7790 :a7790 :a7790. :a7791 :a7791 :a7791. :a7792 :a7792 :a7792. :a7793 :a7793 :a7793. :a7794 :a7794 :a7794. :a7795 :a7795 :a7795. :a7796 :a7796 :a7796. :a7797 :a7797 :a7797. :a7798 :a7798 :a7798. :a7799 :a7799 :a7799. :a7800 :a7800 :a7800. :a7801 :a7801 :a7801. :a7802 :a7802 :a7802. :a7803 :a7803 :a7803. :a7804 :a7804 :a7804. :a7805 :a7805 :a7805. :a7806 :a7806 :a7806. :a7807 :a7807 :a7807. :a7808 :a7808 :a7808. :a7809 :a7809 :a7809. :a7810 :a7810 :a7810. :a7811 :a7811 :a7811. :a7812 :a7812 :a7812. :a7813 :a7813 :a7813. :a7814 :a7814 :a7814. :a7815 :a7815 :a7815. :a7816 :a7816 :a7816. :a7817 :a7817 :a7817. :a7818 :a7818 :a7818. :a7819 :a7819 :a7819. :a7820 :a7820 :a7820. :a7821 :a7821 :a7821. :a7822 :a7822 :a7822. :a7823 :a7823 :a7823. :a7824 :a7824 :a7824. :a7825 :a7825 :a7825. :a7826 :a7826 :a7826. :a7827 :a7827 :a7827. :a7828 :a7828 :a7828. :a7829 :a7829 :a7829. :a7830 :a7830 :a7830. :a7831 :a7831 :a7831. :a7832 :a7832 :a7832. :a7833 :a7833 :a7833. :a7834 :a7834 :a7834. :a7835 :a7835 :a7835. :a7836 :a7836 :a7836. :a7837 :a7837 :a7837. :a7838 :a7838 :a7838. :a7839 :a7839 :a7839. :a7840 :a7840 :a7840. :a7841 :a7841 :a7841. :a7842 :a7842 :a7842. :a7843 :a7843 :a7843. :a7844 :a7844 :a7844. :a7845 :a7845 :a7845. :a7846 :a7846 :a7846. :a7847 :a7847 :a7847. :a7848 :a7848 :a7848. :a7849 :a7849 :a7849. :a7850 :a7850 :a7850. :a7851 :a7851 :a7851. :a7852 :a7852 :a7852. :a7853 :a7853 :a7853. :a7854 :a7854 :a7854. :a7855 :a7855 :a7855. :a7856 :a7856 :a7856. :a7857 :a7857 :a7857. :a7858 :a7858 :a7858. :a7859 :a7859 :a7859. :a7860 :a7860 :a7860. :a7861 :a7861 :a7861. :a7862 :a7862 :a7862. :a7863 :a7863 :a7863. :a7864 :a7864 :a7864. :a7865 :a7865 :a7865. :a7866 :a7866 :a7866. :a7867 :a7867 :a7867. :a7868 :a7868 :a7868. :a7869 :a7869 :a7869. :a7870 :a7870 :a7870. :a7871 :a7871 :a7871. :a7872 :a7872 :a7872. :a7873 :a7873 :a7873. :a7874 :a7874 :a7874. :a7875 :a7875 :a7875. :a7876 :a7876 :a7876. :a7877 :a7877 :a7877. :a7878 :a7878 :a7878. :a7879 :a7879 :a7879. :a7880 :a7880 :a7880. :a7881 :a7881 :a7881. :a7882 :a7882 :a7882. :a7883 :a7883 :a7883. :a7884 :a7884 :a7884. :a7885 :a7885 :a7885. :a7886 :a7886 :a7886. :a7887 :a7887 :a7887. :a7888 :a7888 :a7888. :a7889 :a7889 :a7889. :a7890 :a7890 :a7890. :a7891 :a7891 :a7891. :a7892 :a7892 :a7892. :a7893 :a7893 :a7893. :a7894 :a7894 :a7894. :a7895 :a7895 :a7895. :a7896 :a7896 :a7896. :a7897 :a7897 :a7897. :a7898 :a7898 :a7898. :a7899 :a7899 :a7899. :a7900 :a7900 :a7900. :a7901 :a7901 :a7901. :a7902 :a7902 :a7902. :a7903 :a7903 :a7903. :a7904 :a7904 :a7904. :a7905 :a7905 :a7905. :a7906 :a7906 :a7906. :a7907 :a7907 :a7907. :a7908 :a7908 :a7908. :a7909 :a7909 :a7909. :a7910 :a7910 :a7910. :a7911 :a7911 :a7911. :a7912 :a7912 :a7912. :a7913 :a7913 :a7913. :a7914 :a7914 :a7914. :a7915 :a7915 :a7915. :a7916 :a7916 :a7916. :a7917 :a7917 :a7917. :a7918 :a7918 :a7918. :a7919 :a7919 :a7919. :a7920 :a7920 :a7920. :a7921 :a7921 :a7921. :a7922 :a7922 :a7922. :a7923 :a7923 :a7923. :a7924 :a7924 :a7924. :a7925 :a7925 :a7925. :a7926 :a7926 :a7926. :a7927 :a7927 :a7927. :a7928 :a7928 :a7928. :a7929 :a7929 :a7929. :a7930 :a7930 :a7930. :a7931 :a7931 :a7931. :a7932 :a7932 :a7932. :a7933 :a7933 :a7933. :a7934 :a7934 :a7934. :a7935 :a7935 :a7935. :a7936 :a7936 :a7936. :a7937 :a7937 :a7937. :a7938 :a7938 :a7938. :a7939 :a7939 :a7939. :a7940 :a7940 :a7940. :a7941 :a7941 :a7941. :a7942 :a7942 :a7942. :a7943 :a7943 :a7943. :a7944 :a7944 :a7944. :a7945 :a7945 :a7945. :a7946 :a7946 :a7946. :a7947 :a7947 :a7947. :a7948 :a7948 :a7948. :a7949 :a7949 :a7949. :a7950 :a7950 :a7950. :a7951 :a7951 :a7951. :a7952 :a7952 :a7952. :a7953 :a7953 :a7953. :a7954 :a7954 :a7954. :a7955 :a7955 :a7955. :a7956 :a7956 :a7956. :a7957 :a7957 :a7957. :a7958 :a7958 :a7958. :a7959 :a7959 :a7959. :a7960 :a7960 :a7960. :a7961 :a7961 :a7961. :a7962 :a7962 :a7962. :a7963 :a7963 :a7963. :a7964 :a7964 :a7964. :a7965 :a7965 :a7965. :a7966 :a7966 :a7966. :a7967 :a7967 :a7967. :a7968 :a7968 :a7968. :a7969 :a7969 :a7969. :a7970 :a7970 :a7970. :a7971 :a7971 :a7971. :a7972 :a7972 :a7972. :a7973 :a7973 :a7973. :a7974 :a7974 :a7974. :a7975 :a7975 :a7975. :a7976 :a7976 :a7976. :a7977 :a7977 :a7977. :a7978 :a7978 :a7978. :a7979 :a7979 :a7979. :a7980 :a7980 :a7980. :a7981 :a7981 :a7981. :a7982 :a7982 :a7982. :a7983 :a7983 :a7983. :a7984 :a7984 :a7984. :a7985 :a7985 :a7985. :a7986 :a7986 :a7986. :a7987 :a7987 :a7987. :a7988 :a7988 :a7988. :a7989 :a7989 :a7989. :a7990 :a7990 :a7990. :a7991 :a7991 :a7991. :a7992 :a7992 :a7992. :a7993 :a7993 :a7993. :a7994 :a7994 :a7994. :a7995 :a7995 :a7995. :a7996 :a7996 :a7996. :a7997 :a7997 :a7997. :a7998 :a7998 :a7998. :a7999 :a7999 :a7999. :a8000 :a8000 :a8000. :a8001 :a8001 :a8001. :a8002 :a8002 :a8002. :a8003 :a8003 :a8003. :a8004 :a8004 :a8004. :a8005 :a8005 :a8005. :a8006 :a8006 :a8006. :a8007 :a8007 :a8007. :a8008 :a8008 :a8008. :a8009 :a8009 :a8009. :a8010 :a8010 :a8010. :a8011 :a8011 :a8011. :a8012 :a8012 :a8012. :a8013 :a8013 :a8013. :a8014 :a8014 :a8014. :a8015 :a8015 :a8015. :a8016 :a8016 :a8016. :a8017 :a8017 :a8017. :a8018 :a8018 :a8018. :a8019 :a8019 :a8019. :a8020 :a8020 :a8020. :a8021 :a8021 :a8021. :a8022 :a8022 :a8022. :a8023 :a8023 :a8023. :a8024 :a8024 :a8024. :a8025 :a8025 :a8025. :a8026 :a8026 :a8026. :a8027 :a8027 :a8027. :a8028 :a8028 :a8028. :a8029 :a8029 :a8029. :a8030 :a8030 :a8030. :a8031 :a8031 :a8031. :a8032 :a8032 :a8032. :a8033 :a8033 :a8033. :a8034 :a8034 :a8034. :a8035 :a8035 :a8035. :a8036 :a8036 :a8036. :a8037 :a8037 :a8037. :a8038 :a8038 :a8038. :a8039 :a8039 :a8039. :a8040 :a8040 :a8040. :a8041 :a8041 :a8041. :a8042 :a8042 :a8042. :a8043 :a8043 :a8043. :a8044 :a8044 :a8044. :a8045 :a8045 :a8045. :a8046 :a8046 :a8046. :a8047 :a8047 :a8047. :a8048 :a8048 :a8048. :a8049 :a8049 :a8049. :a8050 :a8050 :a8050. :a8051 :a8051 :a8051. :a8052 :a8052 :a8052. :a8053 :a8053 :a8053. :a8054 :a8054 :a8054. :a8055 :a8055 :a8055. :a8056 :a8056 :a8056. :a8057 :a8057 :a8057. :a8058 :a8058 :a8058. :a8059 :a8059 :a8059. :a8060 :a8060 :a8060. :a8061 :a8061 :a8061. :a8062 :a8062 :a8062. :a8063 :a8063 :a8063. :a8064 :a8064 :a8064. :a8065 :a8065 :a8065. :a8066 :a8066 :a8066. :a8067 :a8067 :a8067. :a8068 :a8068 :a8068. :a8069 :a8069 :a8069. :a8070 :a8070 :a8070. :a8071 :a8071 :a8071. :a8072 :a8072 :a8072. :a8073 :a8073 :a8073. :a8074 :a8074 :a8074. :a8075 :a8075 :a8075. :a8076 :a8076 :a8076. :a8077 :a8077 :a8077. :a8078 :a8078 :a8078. :a8079 :a8079 :a8079. :a8080 :a8080 :a8080. :a8081 :a8081 :a8081. :a8082 :a8082 :a8082. :a8083 :a8083 :a8083. :a8084 :a8084 :a8084. :a8085 :a8085 :a8085. :a8086 :a8086 :a8086. :a8087 :a8087 :a8087. :a8088 :a8088 :a8088. :a8089 :a8089 :a8089. :a8090 :a8090 :a8090. :a8091 :a8091 :a8091. :a8092 :a8092 :a8092. :a8093 :a8093 :a8093. :a8094 :a8094 :a8094. :a8095 :a8095 :a8095. :a8096 :a8096 :a8096. :a8097 :a8097 :a8097. :a8098 :a8098 :a8098. :a8099 :a8099 :a8099. :a8100 :a8100 :a8100. :a8101 :a8101 :a8101. :a8102 :a8102 :a8102. :a8103 :a8103 :a8103. :a8104 :a8104 :a8104. :a8105 :a8105 :a8105. :a8106 :a8106 :a8106. :a8107 :a8107 :a8107. :a8108 :a8108 :a8108. :a8109 :a8109 :a8109. :a8110 :a8110 :a8110. :a8111 :a8111 :a8111. :a8112 :a8112 :a8112. :a8113 :a8113 :a8113. :a8114 :a8114 :a8114. :a8115 :a8115 :a8115. :a8116 :a8116 :a8116. :a8117 :a8117 :a8117. :a8118 :a8118 :a8118. :a8119 :a8119 :a8119. :a8120 :a8120 :a8120. :a8121 :a8121 :a8121. :a8122 :a8122 :a8122. :a8123 :a8123 :a8123. :a8124 :a8124 :a8124. :a8125 :a8125 :a8125. :a8126 :a8126 :a8126. :a8127 :a8127 :a8127. :a8128 :a8128 :a8128. :a8129 :a8129 :a8129. :a8130 :a8130 :a8130. :a8131 :a8131 :a8131. :a8132 :a8132 :a8132. :a8133 :a8133 :a8133. :a8134 :a8134 :a8134. :a8135 :a8135 :a8135. :a8136 :a8136 :a8136. :a8137 :a8137 :a8137. :a8138 :a8138 :a8138. :a8139 :a8139 :a8139. :a8140 :a8140 :a8140. :a8141 :a8141 :a8141. :a8142 :a8142 :a8142. :a8143 :a8143 :a8143. :a8144 :a8144 :a8144. :a8145 :a8145 :a8145. :a8146 :a8146 :a8146. :a8147 :a8147 :a8147. :a8148 :a8148 :a8148. :a8149 :a8149 :a8149. :a8150 :a8150 :a8150. :a8151 :a8151 :a8151. :a8152 :a8152 :a8152. :a8153 :a8153 :a8153. :a8154 :a8154 :a8154. :a8155 :a8155 :a8155. :a8156 :a8156 :a8156. :a8157 :a8157 :a8157. :a8158 :a8158 :a8158. :a8159 :a8159 :a8159. :a8160 :a8160 :a8160. :a8161 :a8161 :a8161. :a8162 :a8162 :a8162. :a8163 :a8163 :a8163. :a8164 :a8164 :a8164. :a8165 :a8165 :a8165. :a8166 :a8166 :a8166. :a8167 :a8167 :a8167. :a8168 :a8168 :a8168. :a8169 :a8169 :a8169. :a8170 :a8170 :a8170. :a8171 :a8171 :a8171. :a8172 :a8172 :a8172. :a8173 :a8173 :a8173. :a8174 :a8174 :a8174. :a8175 :a8175 :a8175. :a8176 :a8176 :a8176. :a8177 :a8177 :a8177. :a8178 :a8178 :a8178. :a8179 :a8179 :a8179. :a8180 :a8180 :a8180. :a8181 :a8181 :a8181. :a8182 :a8182 :a8182. :a8183 :a8183 :a8183. :a8184 :a8184 :a8184. :a8185 :a8185 :a8185. :a8186 :a8186 :a8186. :a8187 :a8187 :a8187. :a8188 :a8188 :a8188. :a8189 :a8189 :a8189. :a8190 :a8190 :a8190. :a8191 :a8191 :a8191. :a8192 :a8192 :a8192. :a8193 :a8193 :a8193. :a8194 :a8194 :a8194. :a8195 :a8195 :a8195. :a8196 :a8196 :a8196. :a8197 :a8197 :a8197. :a8198 :a8198 :a8198. :a8199 :a8199 :a8199. :a8200 :a8200 :a8200. :a8201 :a8201 :a8201. :a8202 :a8202 :a8202. :a8203 :a8203 :a8203. :a8204 :a8204 :a8204. :a8205 :a8205 :a8205. :a8206 :a8206 :a8206. :a8207 :a8207 :a8207. :a8208 :a8208 :a8208. :a8209 :a8209 :a8209. :a8210 :a8210 :a8210. :a8211 :a8211 :a8211. :a8212 :a8212 :a8212. :a8213 :a8213 :a8213. :a8214 :a8214 :a8214. :a8215 :a8215 :a8215. :a8216 :a8216 :a8216. :a8217 :a8217 :a8217. :a8218 :a8218 :a8218. :a8219 :a8219 :a8219. :a8220 :a8220 :a8220. :a8221 :a8221 :a8221. :a8222 :a8222 :a8222. :a8223 :a8223 :a8223. :a8224 :a8224 :a8224. :a8225 :a8225 :a8225. :a8226 :a8226 :a8226. :a8227 :a8227 :a8227. :a8228 :a8228 :a8228. :a8229 :a8229 :a8229. :a8230 :a8230 :a8230. :a8231 :a8231 :a8231. :a8232 :a8232 :a8232. :a8233 :a8233 :a8233. :a8234 :a8234 :a8234. :a8235 :a8235 :a8235. :a8236 :a8236 :a8236. :a8237 :a8237 :a8237. :a8238 :a8238 :a8238. :a8239 :a8239 :a8239. :a8240 :a8240 :a8240. :a8241 :a8241 :a8241. :a8242 :a8242 :a8242. :a8243 :a8243 :a8243. :a8244 :a8244 :a8244. :a8245 :a8245 :a8245. :a8246 :a8246 :a8246. :a8247 :a8247 :a8247. :a8248 :a8248 :a8248. :a8249 :a8249 :a8249. :a8250 :a8250 :a8250. :a8251 :a8251 :a8251. :a8252 :a8252 :a8252. :a8253 :a8253 :a8253. :a8254 :a8254 :a8254. :a8255 :a8255 :a8255. :a8256 :a8256 :a8256. :a8257 :a8257 :a8257. :a8258 :a8258 :a8258. :a8259 :a8259 :a8259. :a8260 :a8260 :a8260. :a8261 :a8261 :a8261. :a8262 :a8262 :a8262. :a8263 :a8263 :a8263. :a8264 :a8264 :a8264. :a8265 :a8265 :a8265. :a8266 :a8266 :a8266. :a8267 :a8267 :a8267. :a8268 :a8268 :a8268. :a8269 :a8269 :a8269. :a8270 :a8270 :a8270. :a8271 :a8271 :a8271. :a8272 :a8272 :a8272. :a8273 :a8273 :a8273. :a8274 :a8274 :a8274. :a8275 :a8275 :a8275. :a8276 :a8276 :a8276. :a8277 :a8277 :a8277. :a8278 :a8278 :a8278. :a8279 :a8279 :a8279. :a8280 :a8280 :a8280. :a8281 :a8281 :a8281. :a8282 :a8282 :a8282. :a8283 :a8283 :a8283. :a8284 :a8284 :a8284. :a8285 :a8285 :a8285. :a8286 :a8286 :a8286. :a8287 :a8287 :a8287. :a8288 :a8288 :a8288. :a8289 :a8289 :a8289. :a8290 :a8290 :a8290. :a8291 :a8291 :a8291. :a8292 :a8292 :a8292. :a8293 :a8293 :a8293. :a8294 :a8294 :a8294. :a8295 :a8295 :a8295. :a8296 :a8296 :a8296. :a8297 :a8297 :a8297. :a8298 :a8298 :a8298. :a8299 :a8299 :a8299. :a8300 :a8300 :a8300. :a8301 :a8301 :a8301. :a8302 :a8302 :a8302. :a8303 :a8303 :a8303. :a8304 :a8304 :a8304. :a8305 :a8305 :a8305. :a8306 :a8306 :a8306. :a8307 :a8307 :a8307. :a8308 :a8308 :a8308. :a8309 :a8309 :a8309. :a8310 :a8310 :a8310. :a8311 :a8311 :a8311. :a8312 :a8312 :a8312. :a8313 :a8313 :a8313. :a8314 :a8314 :a8314. :a8315 :a8315 :a8315. :a8316 :a8316 :a8316. :a8317 :a8317 :a8317. :a8318 :a8318 :a8318. :a8319 :a8319 :a8319. :a8320 :a8320 :a8320. :a8321 :a8321 :a8321. :a8322 :a8322 :a8322. :a8323 :a8323 :a8323. :a8324 :a8324 :a8324. :a8325 :a8325 :a8325. :a8326 :a8326 :a8326. :a8327 :a8327 :a8327. :a8328 :a8328 :a8328. :a8329 :a8329 :a8329. :a8330 :a8330 :a8330. :a8331 :a8331 :a8331. :a8332 :a8332 :a8332. :a8333 :a8333 :a8333. :a8334 :a8334 :a8334. :a8335 :a8335 :a8335. :a8336 :a8336 :a8336. :a8337 :a8337 :a8337. :a8338 :a8338 :a8338. :a8339 :a8339 :a8339. :a8340 :a8340 :a8340. :a8341 :a8341 :a8341. :a8342 :a8342 :a8342. :a8343 :a8343 :a8343. :a8344 :a8344 :a8344. :a8345 :a8345 :a8345. :a8346 :a8346 :a8346. :a8347 :a8347 :a8347. :a8348 :a8348 :a8348. :a8349 :a8349 :a8349. :a8350 :a8350 :a8350. :a8351 :a8351 :a8351. :a8352 :a8352 :a8352. :a8353 :a8353 :a8353. :a8354 :a8354 :a8354. :a8355 :a8355 :a8355. :a8356 :a8356 :a8356. :a8357 :a8357 :a8357. :a8358 :a8358 :a8358. :a8359 :a8359 :a8359. :a8360 :a8360 :a8360. :a8361 :a8361 :a8361. :a8362 :a8362 :a8362. :a8363 :a8363 :a8363. :a8364 :a8364 :a8364. :a8365 :a8365 :a8365. :a8366 :a8366 :a8366. :a8367 :a8367 :a8367. :a8368 :a8368 :a8368. :a8369 :a8369 :a8369. :a8370 :a8370 :a8370. :a8371 :a8371 :a8371. :a8372 :a8372 :a8372. :a8373 :a8373 :a8373. :a8374 :a8374 :a8374. :a8375 :a8375 :a8375. :a8376 :a8376 :a8376. :a8377 :a8377 :a8377. :a8378 :a8378 :a8378. :a8379 :a8379 :a8379. :a8380 :a8380 :a8380. :a8381 :a8381 :a8381. :a8382 :a8382 :a8382. :a8383 :a8383 :a8383. :a8384 :a8384 :a8384. :a8385 :a8385 :a8385. :a8386 :a8386 :a8386. :a8387 :a8387 :a8387. :a8388 :a8388 :a8388. :a8389 :a8389 :a8389. :a8390 :a8390 :a8390. :a8391 :a8391 :a8391. :a8392 :a8392 :a8392. :a8393 :a8393 :a8393. :a8394 :a8394 :a8394. :a8395 :a8395 :a8395. :a8396 :a8396 :a8396. :a8397 :a8397 :a8397. :a8398 :a8398 :a8398. :a8399 :a8399 :a8399. :a8400 :a8400 :a8400. :a8401 :a8401 :a8401. :a8402 :a8402 :a8402. :a8403 :a8403 :a8403. :a8404 :a8404 :a8404. :a8405 :a8405 :a8405. :a8406 :a8406 :a8406. :a8407 :a8407 :a8407. :a8408 :a8408 :a8408. :a8409 :a8409 :a8409. :a8410 :a8410 :a8410. :a8411 :a8411 :a8411. :a8412 :a8412 :a8412. :a8413 :a8413 :a8413. :a8414 :a8414 :a8414. :a8415 :a8415 :a8415. :a8416 :a8416 :a8416. :a8417 :a8417 :a8417. :a8418 :a8418 :a8418. :a8419 :a8419 :a8419. :a8420 :a8420 :a8420. :a8421 :a8421 :a8421. :a8422 :a8422 :a8422. :a8423 :a8423 :a8423. :a8424 :a8424 :a8424. :a8425 :a8425 :a8425. :a8426 :a8426 :a8426. :a8427 :a8427 :a8427. :a8428 :a8428 :a8428. :a8429 :a8429 :a8429. :a8430 :a8430 :a8430. :a8431 :a8431 :a8431. :a8432 :a8432 :a8432. :a8433 :a8433 :a8433. :a8434 :a8434 :a8434. :a8435 :a8435 :a8435. :a8436 :a8436 :a8436. :a8437 :a8437 :a8437. :a8438 :a8438 :a8438. :a8439 :a8439 :a8439. :a8440 :a8440 :a8440. :a8441 :a8441 :a8441. :a8442 :a8442 :a8442. :a8443 :a8443 :a8443. :a8444 :a8444 :a8444. :a8445 :a8445 :a8445. :a8446 :a8446 :a8446. :a8447 :a8447 :a8447. :a8448 :a8448 :a8448. :a8449 :a8449 :a8449. :a8450 :a8450 :a8450. :a8451 :a8451 :a8451. :a8452 :a8452 :a8452. :a8453 :a8453 :a8453. :a8454 :a8454 :a8454. :a8455 :a8455 :a8455. :a8456 :a8456 :a8456. :a8457 :a8457 :a8457. :a8458 :a8458 :a8458. :a8459 :a8459 :a8459. :a8460 :a8460 :a8460. :a8461 :a8461 :a8461. :a8462 :a8462 :a8462. :a8463 :a8463 :a8463. :a8464 :a8464 :a8464. :a8465 :a8465 :a8465. :a8466 :a8466 :a8466. :a8467 :a8467 :a8467. :a8468 :a8468 :a8468. :a8469 :a8469 :a8469. :a8470 :a8470 :a8470. :a8471 :a8471 :a8471. :a8472 :a8472 :a8472. :a8473 :a8473 :a8473. :a8474 :a8474 :a8474. :a8475 :a8475 :a8475. :a8476 :a8476 :a8476. :a8477 :a8477 :a8477. :a8478 :a8478 :a8478. :a8479 :a8479 :a8479. :a8480 :a8480 :a8480. :a8481 :a8481 :a8481. :a8482 :a8482 :a8482. :a8483 :a8483 :a8483. :a8484 :a8484 :a8484. :a8485 :a8485 :a8485. :a8486 :a8486 :a8486. :a8487 :a8487 :a8487. :a8488 :a8488 :a8488. :a8489 :a8489 :a8489. :a8490 :a8490 :a8490. :a8491 :a8491 :a8491. :a8492 :a8492 :a8492. :a8493 :a8493 :a8493. :a8494 :a8494 :a8494. :a8495 :a8495 :a8495. :a8496 :a8496 :a8496. :a8497 :a8497 :a8497. :a8498 :a8498 :a8498. :a8499 :a8499 :a8499. :a8500 :a8500 :a8500. :a8501 :a8501 :a8501. :a8502 :a8502 :a8502. :a8503 :a8503 :a8503. :a8504 :a8504 :a8504. :a8505 :a8505 :a8505. :a8506 :a8506 :a8506. :a8507 :a8507 :a8507. :a8508 :a8508 :a8508. :a8509 :a8509 :a8509. :a8510 :a8510 :a8510. :a8511 :a8511 :a8511. :a8512 :a8512 :a8512. :a8513 :a8513 :a8513. :a8514 :a8514 :a8514. :a8515 :a8515 :a8515. :a8516 :a8516 :a8516. :a8517 :a8517 :a8517. :a8518 :a8518 :a8518. :a8519 :a8519 :a8519. :a8520 :a8520 :a8520. :a8521 :a8521 :a8521. :a8522 :a8522 :a8522. :a8523 :a8523 :a8523. :a8524 :a8524 :a8524. :a8525 :a8525 :a8525. :a8526 :a8526 :a8526. :a8527 :a8527 :a8527. :a8528 :a8528 :a8528. :a8529 :a8529 :a8529. :a8530 :a8530 :a8530. :a8531 :a8531 :a8531. :a8532 :a8532 :a8532. :a8533 :a8533 :a8533. :a8534 :a8534 :a8534. :a8535 :a8535 :a8535. :a8536 :a8536 :a8536. :a8537 :a8537 :a8537. :a8538 :a8538 :a8538. :a8539 :a8539 :a8539. :a8540 :a8540 :a8540. :a8541 :a8541 :a8541. :a8542 :a8542 :a8542. :a8543 :a8543 :a8543. :a8544 :a8544 :a8544. :a8545 :a8545 :a8545. :a8546 :a8546 :a8546. :a8547 :a8547 :a8547. :a8548 :a8548 :a8548. :a8549 :a8549 :a8549. :a8550 :a8550 :a8550. :a8551 :a8551 :a8551. :a8552 :a8552 :a8552. :a8553 :a8553 :a8553. :a8554 :a8554 :a8554. :a8555 :a8555 :a8555. :a8556 :a8556 :a8556. :a8557 :a8557 :a8557. :a8558 :a8558 :a8558. :a8559 :a8559 :a8559. :a8560 :a8560 :a8560. :a8561 :a8561 :a8561. :a8562 :a8562 :a8562. :a8563 :a8563 :a8563. :a8564 :a8564 :a8564. :a8565 :a8565 :a8565. :a8566 :a8566 :a8566. :a8567 :a8567 :a8567. :a8568 :a8568 :a8568. :a8569 :a8569 :a8569. :a8570 :a8570 :a8570. :a8571 :a8571 :a8571. :a8572 :a8572 :a8572. :a8573 :a8573 :a8573. :a8574 :a8574 :a8574. :a8575 :a8575 :a8575. :a8576 :a8576 :a8576. :a8577 :a8577 :a8577. :a8578 :a8578 :a8578. :a8579 :a8579 :a8579. :a8580 :a8580 :a8580. :a8581 :a8581 :a8581. :a8582 :a8582 :a8582. :a8583 :a8583 :a8583. :a8584 :a8584 :a8584. :a8585 :a8585 :a8585. :a8586 :a8586 :a8586. :a8587 :a8587 :a8587. :a8588 :a8588 :a8588. :a8589 :a8589 :a8589. :a8590 :a8590 :a8590. :a8591 :a8591 :a8591. :a8592 :a8592 :a8592. :a8593 :a8593 :a8593. :a8594 :a8594 :a8594. :a8595 :a8595 :a8595. :a8596 :a8596 :a8596. :a8597 :a8597 :a8597. :a8598 :a8598 :a8598. :a8599 :a8599 :a8599. :a8600 :a8600 :a8600. :a8601 :a8601 :a8601. :a8602 :a8602 :a8602. :a8603 :a8603 :a8603. :a8604 :a8604 :a8604. :a8605 :a8605 :a8605. :a8606 :a8606 :a8606. :a8607 :a8607 :a8607. :a8608 :a8608 :a8608. :a8609 :a8609 :a8609. :a8610 :a8610 :a8610. :a8611 :a8611 :a8611. :a8612 :a8612 :a8612. :a8613 :a8613 :a8613. :a8614 :a8614 :a8614. :a8615 :a8615 :a8615. :a8616 :a8616 :a8616. :a8617 :a8617 :a8617. :a8618 :a8618 :a8618. :a8619 :a8619 :a8619. :a8620 :a8620 :a8620. :a8621 :a8621 :a8621. :a8622 :a8622 :a8622. :a8623 :a8623 :a8623. :a8624 :a8624 :a8624. :a8625 :a8625 :a8625. :a8626 :a8626 :a8626. :a8627 :a8627 :a8627. :a8628 :a8628 :a8628. :a8629 :a8629 :a8629. :a8630 :a8630 :a8630. :a8631 :a8631 :a8631. :a8632 :a8632 :a8632. :a8633 :a8633 :a8633. :a8634 :a8634 :a8634. :a8635 :a8635 :a8635. :a8636 :a8636 :a8636. :a8637 :a8637 :a8637. :a8638 :a8638 :a8638. :a8639 :a8639 :a8639. :a8640 :a8640 :a8640. :a8641 :a8641 :a8641. :a8642 :a8642 :a8642. :a8643 :a8643 :a8643. :a8644 :a8644 :a8644. :a8645 :a8645 :a8645. :a8646 :a8646 :a8646. :a8647 :a8647 :a8647. :a8648 :a8648 :a8648. :a8649 :a8649 :a8649. :a8650 :a8650 :a8650. :a8651 :a8651 :a8651. :a8652 :a8652 :a8652. :a8653 :a8653 :a8653. :a8654 :a8654 :a8654. :a8655 :a8655 :a8655. :a8656 :a8656 :a8656. :a8657 :a8657 :a8657. :a8658 :a8658 :a8658. :a8659 :a8659 :a8659. :a8660 :a8660 :a8660. :a8661 :a8661 :a8661. :a8662 :a8662 :a8662. :a8663 :a8663 :a8663. :a8664 :a8664 :a8664. :a8665 :a8665 :a8665. :a8666 :a8666 :a8666. :a8667 :a8667 :a8667. :a8668 :a8668 :a8668. :a8669 :a8669 :a8669. :a8670 :a8670 :a8670. :a8671 :a8671 :a8671. :a8672 :a8672 :a8672. :a8673 :a8673 :a8673. :a8674 :a8674 :a8674. :a8675 :a8675 :a8675. :a8676 :a8676 :a8676. :a8677 :a8677 :a8677. :a8678 :a8678 :a8678. :a8679 :a8679 :a8679. :a8680 :a8680 :a8680. :a8681 :a8681 :a8681. :a8682 :a8682 :a8682. :a8683 :a8683 :a8683. :a8684 :a8684 :a8684. :a8685 :a8685 :a8685. :a8686 :a8686 :a8686. :a8687 :a8687 :a8687. :a8688 :a8688 :a8688. :a8689 :a8689 :a8689. :a8690 :a8690 :a8690. :a8691 :a8691 :a8691. :a8692 :a8692 :a8692. :a8693 :a8693 :a8693. :a8694 :a8694 :a8694. :a8695 :a8695 :a8695. :a8696 :a8696 :a8696. :a8697 :a8697 :a8697. :a8698 :a8698 :a8698. :a8699 :a8699 :a8699. :a8700 :a8700 :a8700. :a8701 :a8701 :a8701. :a8702 :a8702 :a8702. :a8703 :a8703 :a8703. :a8704 :a8704 :a8704. :a8705 :a8705 :a8705. :a8706 :a8706 :a8706. :a8707 :a8707 :a8707. :a8708 :a8708 :a8708. :a8709 :a8709 :a8709. :a8710 :a8710 :a8710. :a8711 :a8711 :a8711. :a8712 :a8712 :a8712. :a8713 :a8713 :a8713. :a8714 :a8714 :a8714. :a8715 :a8715 :a8715. :a8716 :a8716 :a8716. :a8717 :a8717 :a8717. :a8718 :a8718 :a8718. :a8719 :a8719 :a8719. :a8720 :a8720 :a8720. :a8721 :a8721 :a8721. :a8722 :a8722 :a8722. :a8723 :a8723 :a8723. :a8724 :a8724 :a8724. :a8725 :a8725 :a8725. :a8726 :a8726 :a8726. :a8727 :a8727 :a8727. :a8728 :a8728 :a8728. :a8729 :a8729 :a8729. :a8730 :a8730 :a8730. :a8731 :a8731 :a8731. :a8732 :a8732 :a8732. :a8733 :a8733 :a8733. :a8734 :a8734 :a8734. :a8735 :a8735 :a8735. :a8736 :a8736 :a8736. :a8737 :a8737 :a8737. :a8738 :a8738 :a8738. :a8739 :a8739 :a8739. :a8740 :a8740 :a8740. :a8741 :a8741 :a8741. :a8742 :a8742 :a8742. :a8743 :a8743 :a8743. :a8744 :a8744 :a8744. :a8745 :a8745 :a8745. :a8746 :a8746 :a8746. :a8747 :a8747 :a8747. :a8748 :a8748 :a8748. :a8749 :a8749 :a8749. :a8750 :a8750 :a8750. :a8751 :a8751 :a8751. :a8752 :a8752 :a8752. :a8753 :a8753 :a8753. :a8754 :a8754 :a8754. :a8755 :a8755 :a8755. :a8756 :a8756 :a8756. :a8757 :a8757 :a8757. :a8758 :a8758 :a8758. :a8759 :a8759 :a8759. :a8760 :a8760 :a8760. :a8761 :a8761 :a8761. :a8762 :a8762 :a8762. :a8763 :a8763 :a8763. :a8764 :a8764 :a8764. :a8765 :a8765 :a8765. :a8766 :a8766 :a8766. :a8767 :a8767 :a8767. :a8768 :a8768 :a8768. :a8769 :a8769 :a8769. :a8770 :a8770 :a8770. :a8771 :a8771 :a8771. :a8772 :a8772 :a8772. :a8773 :a8773 :a8773. :a8774 :a8774 :a8774. :a8775 :a8775 :a8775. :a8776 :a8776 :a8776. :a8777 :a8777 :a8777. :a8778 :a8778 :a8778. :a8779 :a8779 :a8779. :a8780 :a8780 :a8780. :a8781 :a8781 :a8781. :a8782 :a8782 :a8782. :a8783 :a8783 :a8783. :a8784 :a8784 :a8784. :a8785 :a8785 :a8785. :a8786 :a8786 :a8786. :a8787 :a8787 :a8787. :a8788 :a8788 :a8788. :a8789 :a8789 :a8789. :a8790 :a8790 :a8790. :a8791 :a8791 :a8791. :a8792 :a8792 :a8792. :a8793 :a8793 :a8793. :a8794 :a8794 :a8794. :a8795 :a8795 :a8795. :a8796 :a8796 :a8796. :a8797 :a8797 :a8797. :a8798 :a8798 :a8798. :a8799 :a8799 :a8799. :a8800 :a8800 :a8800. :a8801 :a8801 :a8801. :a8802 :a8802 :a8802. :a8803 :a8803 :a8803. :a8804 :a8804 :a8804. :a8805 :a8805 :a8805. :a8806 :a8806 :a8806. :a8807 :a8807 :a8807. :a8808 :a8808 :a8808. :a8809 :a8809 :a8809. :a8810 :a8810 :a8810. :a8811 :a8811 :a8811. :a8812 :a8812 :a8812. :a8813 :a8813 :a8813. :a8814 :a8814 :a8814. :a8815 :a8815 :a8815. :a8816 :a8816 :a8816. :a8817 :a8817 :a8817. :a8818 :a8818 :a8818. :a8819 :a8819 :a8819. :a8820 :a8820 :a8820. :a8821 :a8821 :a8821. :a8822 :a8822 :a8822. :a8823 :a8823 :a8823. :a8824 :a8824 :a8824. :a8825 :a8825 :a8825. :a8826 :a8826 :a8826. :a8827 :a8827 :a8827. :a8828 :a8828 :a8828. :a8829 :a8829 :a8829. :a8830 :a8830 :a8830. :a8831 :a8831 :a8831. :a8832 :a8832 :a8832. :a8833 :a8833 :a8833. :a8834 :a8834 :a8834. :a8835 :a8835 :a8835. :a8836 :a8836 :a8836. :a8837 :a8837 :a8837. :a8838 :a8838 :a8838. :a8839 :a8839 :a8839. :a8840 :a8840 :a8840. :a8841 :a8841 :a8841. :a8842 :a8842 :a8842. :a8843 :a8843 :a8843. :a8844 :a8844 :a8844. :a8845 :a8845 :a8845. :a8846 :a8846 :a8846. :a8847 :a8847 :a8847. :a8848 :a8848 :a8848. :a8849 :a8849 :a8849. :a8850 :a8850 :a8850. :a8851 :a8851 :a8851. :a8852 :a8852 :a8852. :a8853 :a8853 :a8853. :a8854 :a8854 :a8854. :a8855 :a8855 :a8855. :a8856 :a8856 :a8856. :a8857 :a8857 :a8857. :a8858 :a8858 :a8858. :a8859 :a8859 :a8859. :a8860 :a8860 :a8860. :a8861 :a8861 :a8861. :a8862 :a8862 :a8862. :a8863 :a8863 :a8863. :a8864 :a8864 :a8864. :a8865 :a8865 :a8865. :a8866 :a8866 :a8866. :a8867 :a8867 :a8867. :a8868 :a8868 :a8868. :a8869 :a8869 :a8869. :a8870 :a8870 :a8870. :a8871 :a8871 :a8871. :a8872 :a8872 :a8872. :a8873 :a8873 :a8873. :a8874 :a8874 :a8874. :a8875 :a8875 :a8875. :a8876 :a8876 :a8876. :a8877 :a8877 :a8877. :a8878 :a8878 :a8878. :a8879 :a8879 :a8879. :a8880 :a8880 :a8880. :a8881 :a8881 :a8881. :a8882 :a8882 :a8882. :a8883 :a8883 :a8883. :a8884 :a8884 :a8884. :a8885 :a8885 :a8885. :a8886 :a8886 :a8886. :a8887 :a8887 :a8887. :a8888 :a8888 :a8888. :a8889 :a8889 :a8889. :a8890 :a8890 :a8890. :a8891 :a8891 :a8891. :a8892 :a8892 :a8892. :a8893 :a8893 :a8893. :a8894 :a8894 :a8894. :a8895 :a8895 :a8895. :a8896 :a8896 :a8896. :a8897 :a8897 :a8897. :a8898 :a8898 :a8898. :a8899 :a8899 :a8899. :a8900 :a8900 :a8900. :a8901 :a8901 :a8901. :a8902 :a8902 :a8902. :a8903 :a8903 :a8903. :a8904 :a8904 :a8904. :a8905 :a8905 :a8905. :a8906 :a8906 :a8906. :a8907 :a8907 :a8907. :a8908 :a8908 :a8908. :a8909 :a8909 :a8909. :a8910 :a8910 :a8910. :a8911 :a8911 :a8911. :a8912 :a8912 :a8912. :a8913 :a8913 :a8913. :a8914 :a8914 :a8914. :a8915 :a8915 :a8915. :a8916 :a8916 :a8916. :a8917 :a8917 :a8917. :a8918 :a8918 :a8918. :a8919 :a8919 :a8919. :a8920 :a8920 :a8920. :a8921 :a8921 :a8921. :a8922 :a8922 :a8922. :a8923 :a8923 :a8923. :a8924 :a8924 :a8924. :a8925 :a8925 :a8925. :a8926 :a8926 :a8926. :a8927 :a8927 :a8927. :a8928 :a8928 :a8928. :a8929 :a8929 :a8929. :a8930 :a8930 :a8930. :a8931 :a8931 :a8931. :a8932 :a8932 :a8932. :a8933 :a8933 :a8933. :a8934 :a8934 :a8934. :a8935 :a8935 :a8935. :a8936 :a8936 :a8936. :a8937 :a8937 :a8937. :a8938 :a8938 :a8938. :a8939 :a8939 :a8939. :a8940 :a8940 :a8940. :a8941 :a8941 :a8941. :a8942 :a8942 :a8942. :a8943 :a8943 :a8943. :a8944 :a8944 :a8944. :a8945 :a8945 :a8945. :a8946 :a8946 :a8946. :a8947 :a8947 :a8947. :a8948 :a8948 :a8948. :a8949 :a8949 :a8949. :a8950 :a8950 :a8950. :a8951 :a8951 :a8951. :a8952 :a8952 :a8952. :a8953 :a8953 :a8953. :a8954 :a8954 :a8954. :a8955 :a8955 :a8955. :a8956 :a8956 :a8956. :a8957 :a8957 :a8957. :a8958 :a8958 :a8958. :a8959 :a8959 :a8959. :a8960 :a8960 :a8960. :a8961 :a8961 :a8961. :a8962 :a8962 :a8962. :a8963 :a8963 :a8963. :a8964 :a8964 :a8964. :a8965 :a8965 :a8965. :a8966 :a8966 :a8966. :a8967 :a8967 :a8967. :a8968 :a8968 :a8968. :a8969 :a8969 :a8969. :a8970 :a8970 :a8970. :a8971 :a8971 :a8971. :a8972 :a8972 :a8972. :a8973 :a8973 :a8973. :a8974 :a8974 :a8974. :a8975 :a8975 :a8975. :a8976 :a8976 :a8976. :a8977 :a8977 :a8977. :a8978 :a8978 :a8978. :a8979 :a8979 :a8979. :a8980 :a8980 :a8980. :a8981 :a8981 :a8981. :a8982 :a8982 :a8982. :a8983 :a8983 :a8983. :a8984 :a8984 :a8984. :a8985 :a8985 :a8985. :a8986 :a8986 :a8986. :a8987 :a8987 :a8987. :a8988 :a8988 :a8988. :a8989 :a8989 :a8989. :a8990 :a8990 :a8990. :a8991 :a8991 :a8991. :a8992 :a8992 :a8992. :a8993 :a8993 :a8993. :a8994 :a8994 :a8994. :a8995 :a8995 :a8995. :a8996 :a8996 :a8996. :a8997 :a8997 :a8997. :a8998 :a8998 :a8998. :a8999 :a8999 :a8999. :a9000 :a9000 :a9000. :a9001 :a9001 :a9001. :a9002 :a9002 :a9002. :a9003 :a9003 :a9003. :a9004 :a9004 :a9004. :a9005 :a9005 :a9005. :a9006 :a9006 :a9006. :a9007 :a9007 :a9007. :a9008 :a9008 :a9008. :a9009 :a9009 :a9009. :a9010 :a9010 :a9010. :a9011 :a9011 :a9011. :a9012 :a9012 :a9012. :a9013 :a9013 :a9013. :a9014 :a9014 :a9014. :a9015 :a9015 :a9015. :a9016 :a9016 :a9016. :a9017 :a9017 :a9017. :a9018 :a9018 :a9018. :a9019 :a9019 :a9019. :a9020 :a9020 :a9020. :a9021 :a9021 :a9021. :a9022 :a9022 :a9022. :a9023 :a9023 :a9023. :a9024 :a9024 :a9024. :a9025 :a9025 :a9025. :a9026 :a9026 :a9026. :a9027 :a9027 :a9027. :a9028 :a9028 :a9028. :a9029 :a9029 :a9029. :a9030 :a9030 :a9030. :a9031 :a9031 :a9031. :a9032 :a9032 :a9032. :a9033 :a9033 :a9033. :a9034 :a9034 :a9034. :a9035 :a9035 :a9035. :a9036 :a9036 :a9036. :a9037 :a9037 :a9037. :a9038 :a9038 :a9038. :a9039 :a9039 :a9039. :a9040 :a9040 :a9040. :a9041 :a9041 :a9041. :a9042 :a9042 :a9042. :a9043 :a9043 :a9043. :a9044 :a9044 :a9044. :a9045 :a9045 :a9045. :a9046 :a9046 :a9046. :a9047 :a9047 :a9047. :a9048 :a9048 :a9048. :a9049 :a9049 :a9049. :a9050 :a9050 :a9050. :a9051 :a9051 :a9051. :a9052 :a9052 :a9052. :a9053 :a9053 :a9053. :a9054 :a9054 :a9054. :a9055 :a9055 :a9055. :a9056 :a9056 :a9056. :a9057 :a9057 :a9057. :a9058 :a9058 :a9058. :a9059 :a9059 :a9059. :a9060 :a9060 :a9060. :a9061 :a9061 :a9061. :a9062 :a9062 :a9062. :a9063 :a9063 :a9063. :a9064 :a9064 :a9064. :a9065 :a9065 :a9065. :a9066 :a9066 :a9066. :a9067 :a9067 :a9067. :a9068 :a9068 :a9068. :a9069 :a9069 :a9069. :a9070 :a9070 :a9070. :a9071 :a9071 :a9071. :a9072 :a9072 :a9072. :a9073 :a9073 :a9073. :a9074 :a9074 :a9074. :a9075 :a9075 :a9075. :a9076 :a9076 :a9076. :a9077 :a9077 :a9077. :a9078 :a9078 :a9078. :a9079 :a9079 :a9079. :a9080 :a9080 :a9080. :a9081 :a9081 :a9081. :a9082 :a9082 :a9082. :a9083 :a9083 :a9083. :a9084 :a9084 :a9084. :a9085 :a9085 :a9085. :a9086 :a9086 :a9086. :a9087 :a9087 :a9087. :a9088 :a9088 :a9088. :a9089 :a9089 :a9089. :a9090 :a9090 :a9090. :a9091 :a9091 :a9091. :a9092 :a9092 :a9092. :a9093 :a9093 :a9093. :a9094 :a9094 :a9094. :a9095 :a9095 :a9095. :a9096 :a9096 :a9096. :a9097 :a9097 :a9097. :a9098 :a9098 :a9098. :a9099 :a9099 :a9099. :a9100 :a9100 :a9100. :a9101 :a9101 :a9101. :a9102 :a9102 :a9102. :a9103 :a9103 :a9103. :a9104 :a9104 :a9104. :a9105 :a9105 :a9105. :a9106 :a9106 :a9106. :a9107 :a9107 :a9107. :a9108 :a9108 :a9108. :a9109 :a9109 :a9109. :a9110 :a9110 :a9110. :a9111 :a9111 :a9111. :a9112 :a9112 :a9112. :a9113 :a9113 :a9113. :a9114 :a9114 :a9114. :a9115 :a9115 :a9115. :a9116 :a9116 :a9116. :a9117 :a9117 :a9117. :a9118 :a9118 :a9118. :a9119 :a9119 :a9119. :a9120 :a9120 :a9120. :a9121 :a9121 :a9121. :a9122 :a9122 :a9122. :a9123 :a9123 :a9123. :a9124 :a9124 :a9124. :a9125 :a9125 :a9125. :a9126 :a9126 :a9126. :a9127 :a9127 :a9127. :a9128 :a9128 :a9128. :a9129 :a9129 :a9129. :a9130 :a9130 :a9130. :a9131 :a9131 :a9131. :a9132 :a9132 :a9132. :a9133 :a9133 :a9133. :a9134 :a9134 :a9134. :a9135 :a9135 :a9135. :a9136 :a9136 :a9136. :a9137 :a9137 :a9137. :a9138 :a9138 :a9138. :a9139 :a9139 :a9139. :a9140 :a9140 :a9140. :a9141 :a9141 :a9141. :a9142 :a9142 :a9142. :a9143 :a9143 :a9143. :a9144 :a9144 :a9144. :a9145 :a9145 :a9145. :a9146 :a9146 :a9146. :a9147 :a9147 :a9147. :a9148 :a9148 :a9148. :a9149 :a9149 :a9149. :a9150 :a9150 :a9150. :a9151 :a9151 :a9151. :a9152 :a9152 :a9152. :a9153 :a9153 :a9153. :a9154 :a9154 :a9154. :a9155 :a9155 :a9155. :a9156 :a9156 :a9156. :a9157 :a9157 :a9157. :a9158 :a9158 :a9158. :a9159 :a9159 :a9159. :a9160 :a9160 :a9160. :a9161 :a9161 :a9161. :a9162 :a9162 :a9162. :a9163 :a9163 :a9163. :a9164 :a9164 :a9164. :a9165 :a9165 :a9165. :a9166 :a9166 :a9166. :a9167 :a9167 :a9167. :a9168 :a9168 :a9168. :a9169 :a9169 :a9169. :a9170 :a9170 :a9170. :a9171 :a9171 :a9171. :a9172 :a9172 :a9172. :a9173 :a9173 :a9173. :a9174 :a9174 :a9174. :a9175 :a9175 :a9175. :a9176 :a9176 :a9176. :a9177 :a9177 :a9177. :a9178 :a9178 :a9178. :a9179 :a9179 :a9179. :a9180 :a9180 :a9180. :a9181 :a9181 :a9181. :a9182 :a9182 :a9182. :a9183 :a9183 :a9183. :a9184 :a9184 :a9184. :a9185 :a9185 :a9185. :a9186 :a9186 :a9186. :a9187 :a9187 :a9187. :a9188 :a9188 :a9188. :a9189 :a9189 :a9189. :a9190 :a9190 :a9190. :a9191 :a9191 :a9191. :a9192 :a9192 :a9192. :a9193 :a9193 :a9193. :a9194 :a9194 :a9194. :a9195 :a9195 :a9195. :a9196 :a9196 :a9196. :a9197 :a9197 :a9197. :a9198 :a9198 :a9198. :a9199 :a9199 :a9199. :a9200 :a9200 :a9200. :a9201 :a9201 :a9201. :a9202 :a9202 :a9202. :a9203 :a9203 :a9203. :a9204 :a9204 :a9204. :a9205 :a9205 :a9205. :a9206 :a9206 :a9206. :a9207 :a9207 :a9207. :a9208 :a9208 :a9208. :a9209 :a9209 :a9209. :a9210 :a9210 :a9210. :a9211 :a9211 :a9211. :a9212 :a9212 :a9212. :a9213 :a9213 :a9213. :a9214 :a9214 :a9214. :a9215 :a9215 :a9215. :a9216 :a9216 :a9216. :a9217 :a9217 :a9217. :a9218 :a9218 :a9218. :a9219 :a9219 :a9219. :a9220 :a9220 :a9220. :a9221 :a9221 :a9221. :a9222 :a9222 :a9222. :a9223 :a9223 :a9223. :a9224 :a9224 :a9224. :a9225 :a9225 :a9225. :a9226 :a9226 :a9226. :a9227 :a9227 :a9227. :a9228 :a9228 :a9228. :a9229 :a9229 :a9229. :a9230 :a9230 :a9230. :a9231 :a9231 :a9231. :a9232 :a9232 :a9232. :a9233 :a9233 :a9233. :a9234 :a9234 :a9234. :a9235 :a9235 :a9235. :a9236 :a9236 :a9236. :a9237 :a9237 :a9237. :a9238 :a9238 :a9238. :a9239 :a9239 :a9239. :a9240 :a9240 :a9240. :a9241 :a9241 :a9241. :a9242 :a9242 :a9242. :a9243 :a9243 :a9243. :a9244 :a9244 :a9244. :a9245 :a9245 :a9245. :a9246 :a9246 :a9246. :a9247 :a9247 :a9247. :a9248 :a9248 :a9248. :a9249 :a9249 :a9249. :a9250 :a9250 :a9250. :a9251 :a9251 :a9251. :a9252 :a9252 :a9252. :a9253 :a9253 :a9253. :a9254 :a9254 :a9254. :a9255 :a9255 :a9255. :a9256 :a9256 :a9256. :a9257 :a9257 :a9257. :a9258 :a9258 :a9258. :a9259 :a9259 :a9259. :a9260 :a9260 :a9260. :a9261 :a9261 :a9261. :a9262 :a9262 :a9262. :a9263 :a9263 :a9263. :a9264 :a9264 :a9264. :a9265 :a9265 :a9265. :a9266 :a9266 :a9266. :a9267 :a9267 :a9267. :a9268 :a9268 :a9268. :a9269 :a9269 :a9269. :a9270 :a9270 :a9270. :a9271 :a9271 :a9271. :a9272 :a9272 :a9272. :a9273 :a9273 :a9273. :a9274 :a9274 :a9274. :a9275 :a9275 :a9275. :a9276 :a9276 :a9276. :a9277 :a9277 :a9277. :a9278 :a9278 :a9278. :a9279 :a9279 :a9279. :a9280 :a9280 :a9280. :a9281 :a9281 :a9281. :a9282 :a9282 :a9282. :a9283 :a9283 :a9283. :a9284 :a9284 :a9284. :a9285 :a9285 :a9285. :a9286 :a9286 :a9286. :a9287 :a9287 :a9287. :a9288 :a9288 :a9288. :a9289 :a9289 :a9289. :a9290 :a9290 :a9290. :a9291 :a9291 :a9291. :a9292 :a9292 :a9292. :a9293 :a9293 :a9293. :a9294 :a9294 :a9294. :a9295 :a9295 :a9295. :a9296 :a9296 :a9296. :a9297 :a9297 :a9297. :a9298 :a9298 :a9298. :a9299 :a9299 :a9299. :a9300 :a9300 :a9300. :a9301 :a9301 :a9301. :a9302 :a9302 :a9302. :a9303 :a9303 :a9303. :a9304 :a9304 :a9304. :a9305 :a9305 :a9305. :a9306 :a9306 :a9306. :a9307 :a9307 :a9307. :a9308 :a9308 :a9308. :a9309 :a9309 :a9309. :a9310 :a9310 :a9310. :a9311 :a9311 :a9311. :a9312 :a9312 :a9312. :a9313 :a9313 :a9313. :a9314 :a9314 :a9314. :a9315 :a9315 :a9315. :a9316 :a9316 :a9316. :a9317 :a9317 :a9317. :a9318 :a9318 :a9318. :a9319 :a9319 :a9319. :a9320 :a9320 :a9320. :a9321 :a9321 :a9321. :a9322 :a9322 :a9322. :a9323 :a9323 :a9323. :a9324 :a9324 :a9324. :a9325 :a9325 :a9325. :a9326 :a9326 :a9326. :a9327 :a9327 :a9327. :a9328 :a9328 :a9328. :a9329 :a9329 :a9329. :a9330 :a9330 :a9330. :a9331 :a9331 :a9331. :a9332 :a9332 :a9332. :a9333 :a9333 :a9333. :a9334 :a9334 :a9334. :a9335 :a9335 :a9335. :a9336 :a9336 :a9336. :a9337 :a9337 :a9337. :a9338 :a9338 :a9338. :a9339 :a9339 :a9339. :a9340 :a9340 :a9340. :a9341 :a9341 :a9341. :a9342 :a9342 :a9342. :a9343 :a9343 :a9343. :a9344 :a9344 :a9344. :a9345 :a9345 :a9345. :a9346 :a9346 :a9346. :a9347 :a9347 :a9347. :a9348 :a9348 :a9348. :a9349 :a9349 :a9349. :a9350 :a9350 :a9350. :a9351 :a9351 :a9351. :a9352 :a9352 :a9352. :a9353 :a9353 :a9353. :a9354 :a9354 :a9354. :a9355 :a9355 :a9355. :a9356 :a9356 :a9356. :a9357 :a9357 :a9357. :a9358 :a9358 :a9358. :a9359 :a9359 :a9359. :a9360 :a9360 :a9360. :a9361 :a9361 :a9361. :a9362 :a9362 :a9362. :a9363 :a9363 :a9363. :a9364 :a9364 :a9364. :a9365 :a9365 :a9365. :a9366 :a9366 :a9366. :a9367 :a9367 :a9367. :a9368 :a9368 :a9368. :a9369 :a9369 :a9369. :a9370 :a9370 :a9370. :a9371 :a9371 :a9371. :a9372 :a9372 :a9372. :a9373 :a9373 :a9373. :a9374 :a9374 :a9374. :a9375 :a9375 :a9375. :a9376 :a9376 :a9376. :a9377 :a9377 :a9377. :a9378 :a9378 :a9378. :a9379 :a9379 :a9379. :a9380 :a9380 :a9380. :a9381 :a9381 :a9381. :a9382 :a9382 :a9382. :a9383 :a9383 :a9383. :a9384 :a9384 :a9384. :a9385 :a9385 :a9385. :a9386 :a9386 :a9386. :a9387 :a9387 :a9387. :a9388 :a9388 :a9388. :a9389 :a9389 :a9389. :a9390 :a9390 :a9390. :a9391 :a9391 :a9391. :a9392 :a9392 :a9392. :a9393 :a9393 :a9393. :a9394 :a9394 :a9394. :a9395 :a9395 :a9395. :a9396 :a9396 :a9396. :a9397 :a9397 :a9397. :a9398 :a9398 :a9398. :a9399 :a9399 :a9399. :a9400 :a9400 :a9400. :a9401 :a9401 :a9401. :a9402 :a9402 :a9402. :a9403 :a9403 :a9403. :a9404 :a9404 :a9404. :a9405 :a9405 :a9405. :a9406 :a9406 :a9406. :a9407 :a9407 :a9407. :a9408 :a9408 :a9408. :a9409 :a9409 :a9409. :a9410 :a9410 :a9410. :a9411 :a9411 :a9411. :a9412 :a9412 :a9412. :a9413 :a9413 :a9413. :a9414 :a9414 :a9414. :a9415 :a9415 :a9415. :a9416 :a9416 :a9416. :a9417 :a9417 :a9417. :a9418 :a9418 :a9418. :a9419 :a9419 :a9419. :a9420 :a9420 :a9420. :a9421 :a9421 :a9421. :a9422 :a9422 :a9422. :a9423 :a9423 :a9423. :a9424 :a9424 :a9424. :a9425 :a9425 :a9425. :a9426 :a9426 :a9426. :a9427 :a9427 :a9427. :a9428 :a9428 :a9428. :a9429 :a9429 :a9429. :a9430 :a9430 :a9430. :a9431 :a9431 :a9431. :a9432 :a9432 :a9432. :a9433 :a9433 :a9433. :a9434 :a9434 :a9434. :a9435 :a9435 :a9435. :a9436 :a9436 :a9436. :a9437 :a9437 :a9437. :a9438 :a9438 :a9438. :a9439 :a9439 :a9439. :a9440 :a9440 :a9440. :a9441 :a9441 :a9441. :a9442 :a9442 :a9442. :a9443 :a9443 :a9443. :a9444 :a9444 :a9444. :a9445 :a9445 :a9445. :a9446 :a9446 :a9446. :a9447 :a9447 :a9447. :a9448 :a9448 :a9448. :a9449 :a9449 :a9449. :a9450 :a9450 :a9450. :a9451 :a9451 :a9451. :a9452 :a9452 :a9452. :a9453 :a9453 :a9453. :a9454 :a9454 :a9454. :a9455 :a9455 :a9455. :a9456 :a9456 :a9456. :a9457 :a9457 :a9457. :a9458 :a9458 :a9458. :a9459 :a9459 :a9459. :a9460 :a9460 :a9460. :a9461 :a9461 :a9461. :a9462 :a9462 :a9462. :a9463 :a9463 :a9463. :a9464 :a9464 :a9464. :a9465 :a9465 :a9465. :a9466 :a9466 :a9466. :a9467 :a9467 :a9467. :a9468 :a9468 :a9468. :a9469 :a9469 :a9469. :a9470 :a9470 :a9470. :a9471 :a9471 :a9471. :a9472 :a9472 :a9472. :a9473 :a9473 :a9473. :a9474 :a9474 :a9474. :a9475 :a9475 :a9475. :a9476 :a9476 :a9476. :a9477 :a9477 :a9477. :a9478 :a9478 :a9478. :a9479 :a9479 :a9479. :a9480 :a9480 :a9480. :a9481 :a9481 :a9481. :a9482 :a9482 :a9482. :a9483 :a9483 :a9483. :a9484 :a9484 :a9484. :a9485 :a9485 :a9485. :a9486 :a9486 :a9486. :a9487 :a9487 :a9487. :a9488 :a9488 :a9488. :a9489 :a9489 :a9489. :a9490 :a9490 :a9490. :a9491 :a9491 :a9491. :a9492 :a9492 :a9492. :a9493 :a9493 :a9493. :a9494 :a9494 :a9494. :a9495 :a9495 :a9495. :a9496 :a9496 :a9496. :a9497 :a9497 :a9497. :a9498 :a9498 :a9498. :a9499 :a9499 :a9499. :a9500 :a9500 :a9500. :a9501 :a9501 :a9501. :a9502 :a9502 :a9502. :a9503 :a9503 :a9503. :a9504 :a9504 :a9504. :a9505 :a9505 :a9505. :a9506 :a9506 :a9506. :a9507 :a9507 :a9507. :a9508 :a9508 :a9508. :a9509 :a9509 :a9509. :a9510 :a9510 :a9510. :a9511 :a9511 :a9511. :a9512 :a9512 :a9512. :a9513 :a9513 :a9513. :a9514 :a9514 :a9514. :a9515 :a9515 :a9515. :a9516 :a9516 :a9516. :a9517 :a9517 :a9517. :a9518 :a9518 :a9518. :a9519 :a9519 :a9519. :a9520 :a9520 :a9520. :a9521 :a9521 :a9521. :a9522 :a9522 :a9522. :a9523 :a9523 :a9523. :a9524 :a9524 :a9524. :a9525 :a9525 :a9525. :a9526 :a9526 :a9526. :a9527 :a9527 :a9527. :a9528 :a9528 :a9528. :a9529 :a9529 :a9529. :a9530 :a9530 :a9530. :a9531 :a9531 :a9531. :a9532 :a9532 :a9532. :a9533 :a9533 :a9533. :a9534 :a9534 :a9534. :a9535 :a9535 :a9535. :a9536 :a9536 :a9536. :a9537 :a9537 :a9537. :a9538 :a9538 :a9538. :a9539 :a9539 :a9539. :a9540 :a9540 :a9540. :a9541 :a9541 :a9541. :a9542 :a9542 :a9542. :a9543 :a9543 :a9543. :a9544 :a9544 :a9544. :a9545 :a9545 :a9545. :a9546 :a9546 :a9546. :a9547 :a9547 :a9547. :a9548 :a9548 :a9548. :a9549 :a9549 :a9549. :a9550 :a9550 :a9550. :a9551 :a9551 :a9551. :a9552 :a9552 :a9552. :a9553 :a9553 :a9553. :a9554 :a9554 :a9554. :a9555 :a9555 :a9555. :a9556 :a9556 :a9556. :a9557 :a9557 :a9557. :a9558 :a9558 :a9558. :a9559 :a9559 :a9559. :a9560 :a9560 :a9560. :a9561 :a9561 :a9561. :a9562 :a9562 :a9562. :a9563 :a9563 :a9563. :a9564 :a9564 :a9564. :a9565 :a9565 :a9565. :a9566 :a9566 :a9566. :a9567 :a9567 :a9567. :a9568 :a9568 :a9568. :a9569 :a9569 :a9569. :a9570 :a9570 :a9570. :a9571 :a9571 :a9571. :a9572 :a9572 :a9572. :a9573 :a9573 :a9573. :a9574 :a9574 :a9574. :a9575 :a9575 :a9575. :a9576 :a9576 :a9576. :a9577 :a9577 :a9577. :a9578 :a9578 :a9578. :a9579 :a9579 :a9579. :a9580 :a9580 :a9580. :a9581 :a9581 :a9581. :a9582 :a9582 :a9582. :a9583 :a9583 :a9583. :a9584 :a9584 :a9584. :a9585 :a9585 :a9585. :a9586 :a9586 :a9586. :a9587 :a9587 :a9587. :a9588 :a9588 :a9588. :a9589 :a9589 :a9589. :a9590 :a9590 :a9590. :a9591 :a9591 :a9591. :a9592 :a9592 :a9592. :a9593 :a9593 :a9593. :a9594 :a9594 :a9594. :a9595 :a9595 :a9595. :a9596 :a9596 :a9596. :a9597 :a9597 :a9597. :a9598 :a9598 :a9598. :a9599 :a9599 :a9599. :a9600 :a9600 :a9600. :a9601 :a9601 :a9601. :a9602 :a9602 :a9602. :a9603 :a9603 :a9603. :a9604 :a9604 :a9604. :a9605 :a9605 :a9605. :a9606 :a9606 :a9606. :a9607 :a9607 :a9607. :a9608 :a9608 :a9608. :a9609 :a9609 :a9609. :a9610 :a9610 :a9610. :a9611 :a9611 :a9611. :a9612 :a9612 :a9612. :a9613 :a9613 :a9613. :a9614 :a9614 :a9614. :a9615 :a9615 :a9615. :a9616 :a9616 :a9616. :a9617 :a9617 :a9617. :a9618 :a9618 :a9618. :a9619 :a9619 :a9619. :a9620 :a9620 :a9620. :a9621 :a9621 :a9621. :a9622 :a9622 :a9622. :a9623 :a9623 :a9623. :a9624 :a9624 :a9624. :a9625 :a9625 :a9625. :a9626 :a9626 :a9626. :a9627 :a9627 :a9627. :a9628 :a9628 :a9628. :a9629 :a9629 :a9629. :a9630 :a9630 :a9630. :a9631 :a9631 :a9631. :a9632 :a9632 :a9632. :a9633 :a9633 :a9633. :a9634 :a9634 :a9634. :a9635 :a9635 :a9635. :a9636 :a9636 :a9636. :a9637 :a9637 :a9637. :a9638 :a9638 :a9638. :a9639 :a9639 :a9639. :a9640 :a9640 :a9640. :a9641 :a9641 :a9641. :a9642 :a9642 :a9642. :a9643 :a9643 :a9643. :a9644 :a9644 :a9644. :a9645 :a9645 :a9645. :a9646 :a9646 :a9646. :a9647 :a9647 :a9647. :a9648 :a9648 :a9648. :a9649 :a9649 :a9649. :a9650 :a9650 :a9650. :a9651 :a9651 :a9651. :a9652 :a9652 :a9652. :a9653 :a9653 :a9653. :a9654 :a9654 :a9654. :a9655 :a9655 :a9655. :a9656 :a9656 :a9656. :a9657 :a9657 :a9657. :a9658 :a9658 :a9658. :a9659 :a9659 :a9659. :a9660 :a9660 :a9660. :a9661 :a9661 :a9661. :a9662 :a9662 :a9662. :a9663 :a9663 :a9663. :a9664 :a9664 :a9664. :a9665 :a9665 :a9665. :a9666 :a9666 :a9666. :a9667 :a9667 :a9667. :a9668 :a9668 :a9668. :a9669 :a9669 :a9669. :a9670 :a9670 :a9670. :a9671 :a9671 :a9671. :a9672 :a9672 :a9672. :a9673 :a9673 :a9673. :a9674 :a9674 :a9674. :a9675 :a9675 :a9675. :a9676 :a9676 :a9676. :a9677 :a9677 :a9677. :a9678 :a9678 :a9678. :a9679 :a9679 :a9679. :a9680 :a9680 :a9680. :a9681 :a9681 :a9681. :a9682 :a9682 :a9682. :a9683 :a9683 :a9683. :a9684 :a9684 :a9684. :a9685 :a9685 :a9685. :a9686 :a9686 :a9686. :a9687 :a9687 :a9687. :a9688 :a9688 :a9688. :a9689 :a9689 :a9689. :a9690 :a9690 :a9690. :a9691 :a9691 :a9691. :a9692 :a9692 :a9692. :a9693 :a9693 :a9693. :a9694 :a9694 :a9694. :a9695 :a9695 :a9695. :a9696 :a9696 :a9696. :a9697 :a9697 :a9697. :a9698 :a9698 :a9698. :a9699 :a9699 :a9699. :a9700 :a9700 :a9700. :a9701 :a9701 :a9701. :a9702 :a9702 :a9702. :a9703 :a9703 :a9703. :a9704 :a9704 :a9704. :a9705 :a9705 :a9705. :a9706 :a9706 :a9706. :a9707 :a9707 :a9707. :a9708 :a9708 :a9708. :a9709 :a9709 :a9709. :a9710 :a9710 :a9710. :a9711 :a9711 :a9711. :a9712 :a9712 :a9712. :a9713 :a9713 :a9713. :a9714 :a9714 :a9714. :a9715 :a9715 :a9715. :a9716 :a9716 :a9716. :a9717 :a9717 :a9717. :a9718 :a9718 :a9718. :a9719 :a9719 :a9719. :a9720 :a9720 :a9720. :a9721 :a9721 :a9721. :a9722 :a9722 :a9722. :a9723 :a9723 :a9723. :a9724 :a9724 :a9724. :a9725 :a9725 :a9725. :a9726 :a9726 :a9726. :a9727 :a9727 :a9727. :a9728 :a9728 :a9728. :a9729 :a9729 :a9729. :a9730 :a9730 :a9730. :a9731 :a9731 :a9731. :a9732 :a9732 :a9732. :a9733 :a9733 :a9733. :a9734 :a9734 :a9734. :a9735 :a9735 :a9735. :a9736 :a9736 :a9736. :a9737 :a9737 :a9737. :a9738 :a9738 :a9738. :a9739 :a9739 :a9739. :a9740 :a9740 :a9740. :a9741 :a9741 :a9741. :a9742 :a9742 :a9742. :a9743 :a9743 :a9743. :a9744 :a9744 :a9744. :a9745 :a9745 :a9745. :a9746 :a9746 :a9746. :a9747 :a9747 :a9747. :a9748 :a9748 :a9748. :a9749 :a9749 :a9749. :a9750 :a9750 :a9750. :a9751 :a9751 :a9751. :a9752 :a9752 :a9752. :a9753 :a9753 :a9753. :a9754 :a9754 :a9754. :a9755 :a9755 :a9755. :a9756 :a9756 :a9756. :a9757 :a9757 :a9757. :a9758 :a9758 :a9758. :a9759 :a9759 :a9759. :a9760 :a9760 :a9760. :a9761 :a9761 :a9761. :a9762 :a9762 :a9762. :a9763 :a9763 :a9763. :a9764 :a9764 :a9764. :a9765 :a9765 :a9765. :a9766 :a9766 :a9766. :a9767 :a9767 :a9767. :a9768 :a9768 :a9768. :a9769 :a9769 :a9769. :a9770 :a9770 :a9770. :a9771 :a9771 :a9771. :a9772 :a9772 :a9772. :a9773 :a9773 :a9773. :a9774 :a9774 :a9774. :a9775 :a9775 :a9775. :a9776 :a9776 :a9776. :a9777 :a9777 :a9777. :a9778 :a9778 :a9778. :a9779 :a9779 :a9779. :a9780 :a9780 :a9780. :a9781 :a9781 :a9781. :a9782 :a9782 :a9782. :a9783 :a9783 :a9783. :a9784 :a9784 :a9784. :a9785 :a9785 :a9785. :a9786 :a9786 :a9786. :a9787 :a9787 :a9787. :a9788 :a9788 :a9788. :a9789 :a9789 :a9789. :a9790 :a9790 :a9790. :a9791 :a9791 :a9791. :a9792 :a9792 :a9792. :a9793 :a9793 :a9793. :a9794 :a9794 :a9794. :a9795 :a9795 :a9795. :a9796 :a9796 :a9796. :a9797 :a9797 :a9797. :a9798 :a9798 :a9798. :a9799 :a9799 :a9799. :a9800 :a9800 :a9800. :a9801 :a9801 :a9801. :a9802 :a9802 :a9802. :a9803 :a9803 :a9803. :a9804 :a9804 :a9804. :a9805 :a9805 :a9805. :a9806 :a9806 :a9806. :a9807 :a9807 :a9807. :a9808 :a9808 :a9808. :a9809 :a9809 :a9809. :a9810 :a9810 :a9810. :a9811 :a9811 :a9811. :a9812 :a9812 :a9812. :a9813 :a9813 :a9813. :a9814 :a9814 :a9814. :a9815 :a9815 :a9815. :a9816 :a9816 :a9816. :a9817 :a9817 :a9817. :a9818 :a9818 :a9818. :a9819 :a9819 :a9819. :a9820 :a9820 :a9820. :a9821 :a9821 :a9821. :a9822 :a9822 :a9822. :a9823 :a9823 :a9823. :a9824 :a9824 :a9824. :a9825 :a9825 :a9825. :a9826 :a9826 :a9826. :a9827 :a9827 :a9827. :a9828 :a9828 :a9828. :a9829 :a9829 :a9829. :a9830 :a9830 :a9830. :a9831 :a9831 :a9831. :a9832 :a9832 :a9832. :a9833 :a9833 :a9833. :a9834 :a9834 :a9834. :a9835 :a9835 :a9835. :a9836 :a9836 :a9836. :a9837 :a9837 :a9837. :a9838 :a9838 :a9838. :a9839 :a9839 :a9839. :a9840 :a9840 :a9840. :a9841 :a9841 :a9841. :a9842 :a9842 :a9842. :a9843 :a9843 :a9843. :a9844 :a9844 :a9844. :a9845 :a9845 :a9845. :a9846 :a9846 :a9846. :a9847 :a9847 :a9847. :a9848 :a9848 :a9848. :a9849 :a9849 :a9849. :a9850 :a9850 :a9850. :a9851 :a9851 :a9851. :a9852 :a9852 :a9852. :a9853 :a9853 :a9853. :a9854 :a9854 :a9854. :a9855 :a9855 :a9855. :a9856 :a9856 :a9856. :a9857 :a9857 :a9857. :a9858 :a9858 :a9858. :a9859 :a9859 :a9859. :a9860 :a9860 :a9860. :a9861 :a9861 :a9861. :a9862 :a9862 :a9862. :a9863 :a9863 :a9863. :a9864 :a9864 :a9864. :a9865 :a9865 :a9865. :a9866 :a9866 :a9866. :a9867 :a9867 :a9867. :a9868 :a9868 :a9868. :a9869 :a9869 :a9869. :a9870 :a9870 :a9870. :a9871 :a9871 :a9871. :a9872 :a9872 :a9872. :a9873 :a9873 :a9873. :a9874 :a9874 :a9874. :a9875 :a9875 :a9875. :a9876 :a9876 :a9876. :a9877 :a9877 :a9877. :a9878 :a9878 :a9878. :a9879 :a9879 :a9879. :a9880 :a9880 :a9880. :a9881 :a9881 :a9881. :a9882 :a9882 :a9882. :a9883 :a9883 :a9883. :a9884 :a9884 :a9884. :a9885 :a9885 :a9885. :a9886 :a9886 :a9886. :a9887 :a9887 :a9887. :a9888 :a9888 :a9888. :a9889 :a9889 :a9889. :a9890 :a9890 :a9890. :a9891 :a9891 :a9891. :a9892 :a9892 :a9892. :a9893 :a9893 :a9893. :a9894 :a9894 :a9894. :a9895 :a9895 :a9895. :a9896 :a9896 :a9896. :a9897 :a9897 :a9897. :a9898 :a9898 :a9898. :a9899 :a9899 :a9899. :a9900 :a9900 :a9900. :a9901 :a9901 :a9901. :a9902 :a9902 :a9902. :a9903 :a9903 :a9903. :a9904 :a9904 :a9904. :a9905 :a9905 :a9905. :a9906 :a9906 :a9906. :a9907 :a9907 :a9907. :a9908 :a9908 :a9908. :a9909 :a9909 :a9909. :a9910 :a9910 :a9910. :a9911 :a9911 :a9911. :a9912 :a9912 :a9912. :a9913 :a9913 :a9913. :a9914 :a9914 :a9914. :a9915 :a9915 :a9915. :a9916 :a9916 :a9916. :a9917 :a9917 :a9917. :a9918 :a9918 :a9918. :a9919 :a9919 :a9919. :a9920 :a9920 :a9920. :a9921 :a9921 :a9921. :a9922 :a9922 :a9922. :a9923 :a9923 :a9923. :a9924 :a9924 :a9924. :a9925 :a9925 :a9925. :a9926 :a9926 :a9926. :a9927 :a9927 :a9927. :a9928 :a9928 :a9928. :a9929 :a9929 :a9929. :a9930 :a9930 :a9930. :a9931 :a9931 :a9931. :a9932 :a9932 :a9932. :a9933 :a9933 :a9933. :a9934 :a9934 :a9934. :a9935 :a9935 :a9935. :a9936 :a9936 :a9936. :a9937 :a9937 :a9937. :a9938 :a9938 :a9938. :a9939 :a9939 :a9939. :a9940 :a9940 :a9940. :a9941 :a9941 :a9941. :a9942 :a9942 :a9942. :a9943 :a9943 :a9943. :a9944 :a9944 :a9944. :a9945 :a9945 :a9945. :a9946 :a9946 :a9946. :a9947 :a9947 :a9947. :a9948 :a9948 :a9948. :a9949 :a9949 :a9949. :a9950 :a9950 :a9950. :a9951 :a9951 :a9951. :a9952 :a9952 :a9952. :a9953 :a9953 :a9953. :a9954 :a9954 :a9954. :a9955 :a9955 :a9955. :a9956 :a9956 :a9956. :a9957 :a9957 :a9957. :a9958 :a9958 :a9958. :a9959 :a9959 :a9959. :a9960 :a9960 :a9960. :a9961 :a9961 :a9961. :a9962 :a9962 :a9962. :a9963 :a9963 :a9963. :a9964 :a9964 :a9964. :a9965 :a9965 :a9965. :a9966 :a9966 :a9966. :a9967 :a9967 :a9967. :a9968 :a9968 :a9968. :a9969 :a9969 :a9969. :a9970 :a9970 :a9970. :a9971 :a9971 :a9971. :a9972 :a9972 :a9972. :a9973 :a9973 :a9973. :a9974 :a9974 :a9974. :a9975 :a9975 :a9975. :a9976 :a9976 :a9976. :a9977 :a9977 :a9977. :a9978 :a9978 :a9978. :a9979 :a9979 :a9979. :a9980 :a9980 :a9980. :a9981 :a9981 :a9981. :a9982 :a9982 :a9982. :a9983 :a9983 :a9983. :a9984 :a9984 :a9984. :a9985 :a9985 :a9985. :a9986 :a9986 :a9986. :a9987 :a9987 :a9987. :a9988 :a9988 :a9988. :a9989 :a9989 :a9989. :a9990 :a9990 :a9990. :a9991 :a9991 :a9991. :a9992 :a9992 :a9992. :a9993 :a9993 :a9993. :a9994 :a9994 :a9994. :a9995 :a9995 :a9995. :a9996 :a9996 :a9996. :a9997 :a9997 :a9997. :a9998 :a9998 :a9998. :a9999 :a9999 :a9999. :a10000 :a10000 :a10000. raptor-1.4.21/tests/turtle/test-15.out0000644000175000017500000314635610674751730014477 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . raptor-1.4.21/tests/turtle/test-15.ttl0000644000175000017500000023225010674751730014455 00000000000000# 10000 triple objects (10000 triples) more than the default Bison stack size @prefix : . :a :b :c1, :c2, :c3, :c4, :c5, :c6, :c7, :c8, :c9, :c10, :c11, :c12, :c13, :c14, :c15, :c16, :c17, :c18, :c19, :c20, :c21, :c22, :c23, :c24, :c25, :c26, :c27, :c28, :c29, :c30, :c31, :c32, :c33, :c34, :c35, :c36, :c37, :c38, :c39, :c40, :c41, :c42, :c43, :c44, :c45, :c46, :c47, :c48, :c49, :c50, :c51, :c52, :c53, :c54, :c55, :c56, :c57, :c58, :c59, :c60, :c61, :c62, :c63, :c64, :c65, :c66, :c67, :c68, :c69, :c70, :c71, :c72, :c73, :c74, :c75, :c76, :c77, :c78, :c79, :c80, :c81, :c82, :c83, :c84, :c85, :c86, :c87, :c88, :c89, :c90, :c91, :c92, :c93, :c94, :c95, :c96, :c97, :c98, :c99, :c100, :c101, :c102, :c103, :c104, :c105, :c106, :c107, :c108, :c109, :c110, :c111, :c112, :c113, :c114, :c115, :c116, :c117, :c118, :c119, :c120, :c121, :c122, :c123, :c124, :c125, :c126, :c127, :c128, :c129, :c130, :c131, :c132, :c133, :c134, :c135, :c136, :c137, :c138, :c139, :c140, :c141, :c142, :c143, :c144, :c145, :c146, :c147, :c148, :c149, :c150, :c151, :c152, :c153, :c154, :c155, :c156, :c157, :c158, :c159, :c160, :c161, :c162, :c163, :c164, :c165, :c166, :c167, :c168, :c169, :c170, :c171, :c172, :c173, :c174, :c175, :c176, :c177, :c178, :c179, :c180, :c181, :c182, :c183, :c184, :c185, :c186, :c187, :c188, :c189, :c190, :c191, :c192, :c193, :c194, :c195, :c196, :c197, :c198, :c199, :c200, :c201, :c202, :c203, :c204, :c205, :c206, :c207, :c208, :c209, :c210, :c211, :c212, :c213, :c214, :c215, :c216, :c217, :c218, :c219, :c220, :c221, :c222, :c223, :c224, :c225, :c226, :c227, :c228, :c229, :c230, :c231, :c232, :c233, :c234, :c235, :c236, :c237, :c238, :c239, :c240, :c241, :c242, :c243, :c244, :c245, :c246, :c247, :c248, :c249, :c250, :c251, :c252, :c253, :c254, :c255, :c256, :c257, :c258, :c259, :c260, :c261, :c262, :c263, :c264, :c265, :c266, :c267, :c268, :c269, :c270, :c271, :c272, :c273, :c274, :c275, :c276, :c277, :c278, :c279, :c280, :c281, :c282, :c283, :c284, :c285, :c286, :c287, :c288, :c289, :c290, :c291, :c292, :c293, :c294, :c295, :c296, :c297, :c298, :c299, :c300, :c301, :c302, :c303, :c304, :c305, :c306, :c307, :c308, :c309, :c310, :c311, :c312, :c313, :c314, :c315, :c316, :c317, :c318, :c319, :c320, :c321, :c322, :c323, :c324, :c325, :c326, :c327, :c328, :c329, :c330, :c331, :c332, :c333, :c334, :c335, :c336, :c337, :c338, :c339, :c340, :c341, :c342, :c343, :c344, :c345, :c346, :c347, :c348, :c349, :c350, :c351, :c352, :c353, :c354, :c355, :c356, :c357, :c358, :c359, :c360, :c361, :c362, :c363, :c364, :c365, :c366, :c367, :c368, :c369, :c370, :c371, :c372, :c373, :c374, :c375, :c376, :c377, :c378, :c379, :c380, :c381, :c382, :c383, :c384, :c385, :c386, :c387, :c388, :c389, :c390, :c391, :c392, :c393, :c394, :c395, :c396, :c397, :c398, :c399, :c400, :c401, :c402, :c403, :c404, :c405, :c406, :c407, :c408, :c409, :c410, :c411, :c412, :c413, :c414, :c415, :c416, :c417, :c418, :c419, :c420, :c421, :c422, :c423, :c424, :c425, :c426, :c427, :c428, :c429, :c430, :c431, :c432, :c433, :c434, :c435, :c436, :c437, :c438, :c439, :c440, :c441, :c442, :c443, :c444, :c445, :c446, :c447, :c448, :c449, :c450, :c451, :c452, :c453, :c454, :c455, :c456, :c457, :c458, :c459, :c460, :c461, :c462, :c463, :c464, :c465, :c466, :c467, :c468, :c469, :c470, :c471, :c472, :c473, :c474, :c475, :c476, :c477, :c478, :c479, :c480, :c481, :c482, :c483, :c484, :c485, :c486, :c487, :c488, :c489, :c490, :c491, :c492, :c493, :c494, :c495, :c496, :c497, :c498, :c499, :c500, :c501, :c502, :c503, :c504, :c505, :c506, :c507, :c508, :c509, :c510, :c511, :c512, :c513, :c514, :c515, :c516, :c517, :c518, :c519, :c520, :c521, :c522, :c523, :c524, :c525, :c526, :c527, :c528, :c529, :c530, :c531, :c532, :c533, :c534, :c535, :c536, :c537, :c538, :c539, :c540, :c541, :c542, :c543, :c544, :c545, :c546, :c547, :c548, :c549, :c550, :c551, :c552, :c553, :c554, :c555, :c556, :c557, :c558, :c559, :c560, :c561, :c562, :c563, :c564, :c565, :c566, :c567, :c568, :c569, :c570, :c571, :c572, :c573, :c574, :c575, :c576, :c577, :c578, :c579, :c580, :c581, :c582, :c583, :c584, :c585, :c586, :c587, :c588, :c589, :c590, :c591, :c592, :c593, :c594, :c595, :c596, :c597, :c598, :c599, :c600, :c601, :c602, :c603, :c604, :c605, :c606, :c607, :c608, :c609, :c610, :c611, :c612, :c613, :c614, :c615, :c616, :c617, :c618, :c619, :c620, :c621, :c622, :c623, :c624, :c625, :c626, :c627, :c628, :c629, :c630, :c631, :c632, :c633, :c634, :c635, :c636, :c637, :c638, :c639, :c640, :c641, :c642, :c643, :c644, :c645, :c646, :c647, :c648, :c649, :c650, :c651, :c652, :c653, :c654, :c655, :c656, :c657, :c658, :c659, :c660, :c661, :c662, :c663, :c664, :c665, :c666, :c667, :c668, :c669, :c670, :c671, :c672, :c673, :c674, :c675, :c676, :c677, :c678, :c679, :c680, :c681, :c682, :c683, :c684, :c685, :c686, :c687, :c688, :c689, :c690, :c691, :c692, :c693, :c694, :c695, :c696, :c697, :c698, :c699, :c700, :c701, :c702, :c703, :c704, :c705, :c706, :c707, :c708, :c709, :c710, :c711, :c712, :c713, :c714, :c715, :c716, :c717, :c718, :c719, :c720, :c721, :c722, :c723, :c724, :c725, :c726, :c727, :c728, :c729, :c730, :c731, :c732, :c733, :c734, :c735, :c736, :c737, :c738, :c739, :c740, :c741, :c742, :c743, :c744, :c745, :c746, :c747, :c748, :c749, :c750, :c751, :c752, :c753, :c754, :c755, :c756, :c757, :c758, :c759, :c760, :c761, :c762, :c763, :c764, :c765, :c766, :c767, :c768, :c769, :c770, :c771, :c772, :c773, :c774, :c775, :c776, :c777, :c778, :c779, :c780, :c781, :c782, :c783, :c784, :c785, :c786, :c787, :c788, :c789, :c790, :c791, :c792, :c793, :c794, :c795, :c796, :c797, :c798, :c799, :c800, :c801, :c802, :c803, :c804, :c805, :c806, :c807, :c808, :c809, :c810, :c811, :c812, :c813, :c814, :c815, :c816, :c817, :c818, :c819, :c820, :c821, :c822, :c823, :c824, :c825, :c826, :c827, :c828, :c829, :c830, :c831, :c832, :c833, :c834, :c835, :c836, :c837, :c838, :c839, :c840, :c841, :c842, :c843, :c844, :c845, :c846, :c847, :c848, :c849, :c850, :c851, :c852, :c853, :c854, :c855, :c856, :c857, :c858, :c859, :c860, :c861, :c862, :c863, :c864, :c865, :c866, :c867, :c868, :c869, :c870, :c871, :c872, :c873, :c874, :c875, :c876, :c877, :c878, :c879, :c880, :c881, :c882, :c883, :c884, :c885, :c886, :c887, :c888, :c889, :c890, :c891, :c892, :c893, :c894, :c895, :c896, :c897, :c898, :c899, :c900, :c901, :c902, :c903, :c904, :c905, :c906, :c907, :c908, :c909, :c910, :c911, :c912, :c913, :c914, :c915, :c916, :c917, :c918, :c919, :c920, :c921, :c922, :c923, :c924, :c925, :c926, :c927, :c928, :c929, :c930, :c931, :c932, :c933, :c934, :c935, :c936, :c937, :c938, :c939, :c940, :c941, :c942, :c943, :c944, :c945, :c946, :c947, :c948, :c949, :c950, :c951, :c952, :c953, :c954, :c955, :c956, :c957, :c958, :c959, :c960, :c961, :c962, :c963, :c964, :c965, :c966, :c967, :c968, :c969, :c970, :c971, :c972, :c973, :c974, :c975, :c976, :c977, :c978, :c979, :c980, :c981, :c982, :c983, :c984, :c985, :c986, :c987, :c988, :c989, :c990, :c991, :c992, :c993, :c994, :c995, :c996, :c997, :c998, :c999, :c1000, :c1001, :c1002, :c1003, :c1004, :c1005, :c1006, :c1007, :c1008, :c1009, :c1010, :c1011, :c1012, :c1013, :c1014, :c1015, :c1016, :c1017, :c1018, :c1019, :c1020, :c1021, :c1022, :c1023, :c1024, :c1025, :c1026, :c1027, :c1028, :c1029, :c1030, :c1031, :c1032, :c1033, :c1034, :c1035, :c1036, :c1037, :c1038, :c1039, :c1040, :c1041, :c1042, :c1043, :c1044, :c1045, :c1046, :c1047, :c1048, :c1049, :c1050, :c1051, :c1052, :c1053, :c1054, :c1055, :c1056, :c1057, :c1058, :c1059, :c1060, :c1061, :c1062, :c1063, :c1064, :c1065, :c1066, :c1067, :c1068, :c1069, :c1070, :c1071, :c1072, :c1073, :c1074, :c1075, :c1076, :c1077, :c1078, :c1079, :c1080, :c1081, :c1082, :c1083, :c1084, :c1085, :c1086, :c1087, :c1088, :c1089, :c1090, :c1091, :c1092, :c1093, :c1094, :c1095, :c1096, :c1097, :c1098, :c1099, :c1100, :c1101, :c1102, :c1103, :c1104, :c1105, :c1106, :c1107, :c1108, :c1109, :c1110, :c1111, :c1112, :c1113, :c1114, :c1115, :c1116, :c1117, :c1118, :c1119, :c1120, :c1121, :c1122, :c1123, :c1124, :c1125, :c1126, :c1127, :c1128, :c1129, :c1130, :c1131, :c1132, :c1133, :c1134, :c1135, :c1136, :c1137, :c1138, :c1139, :c1140, :c1141, :c1142, :c1143, :c1144, :c1145, :c1146, :c1147, :c1148, :c1149, :c1150, :c1151, :c1152, :c1153, :c1154, :c1155, :c1156, :c1157, :c1158, :c1159, :c1160, :c1161, :c1162, :c1163, :c1164, :c1165, :c1166, :c1167, :c1168, :c1169, :c1170, :c1171, :c1172, :c1173, :c1174, :c1175, :c1176, :c1177, :c1178, :c1179, :c1180, :c1181, :c1182, :c1183, :c1184, :c1185, :c1186, :c1187, :c1188, :c1189, :c1190, :c1191, :c1192, :c1193, :c1194, :c1195, :c1196, :c1197, :c1198, :c1199, :c1200, :c1201, :c1202, :c1203, :c1204, :c1205, :c1206, :c1207, :c1208, :c1209, :c1210, :c1211, :c1212, :c1213, :c1214, :c1215, :c1216, :c1217, :c1218, :c1219, :c1220, :c1221, :c1222, :c1223, :c1224, :c1225, :c1226, :c1227, :c1228, :c1229, :c1230, :c1231, :c1232, :c1233, :c1234, :c1235, :c1236, :c1237, :c1238, :c1239, :c1240, :c1241, :c1242, :c1243, :c1244, :c1245, :c1246, :c1247, :c1248, :c1249, :c1250, :c1251, :c1252, :c1253, :c1254, :c1255, :c1256, :c1257, :c1258, :c1259, :c1260, :c1261, :c1262, :c1263, :c1264, :c1265, :c1266, :c1267, :c1268, :c1269, :c1270, :c1271, :c1272, :c1273, :c1274, :c1275, :c1276, :c1277, :c1278, :c1279, :c1280, :c1281, :c1282, :c1283, :c1284, :c1285, :c1286, :c1287, :c1288, :c1289, :c1290, :c1291, :c1292, :c1293, :c1294, :c1295, :c1296, :c1297, :c1298, :c1299, :c1300, :c1301, :c1302, :c1303, :c1304, :c1305, :c1306, :c1307, :c1308, :c1309, :c1310, :c1311, :c1312, :c1313, :c1314, :c1315, :c1316, :c1317, :c1318, :c1319, :c1320, :c1321, :c1322, :c1323, :c1324, :c1325, :c1326, :c1327, :c1328, :c1329, :c1330, :c1331, :c1332, :c1333, :c1334, :c1335, :c1336, :c1337, :c1338, :c1339, :c1340, :c1341, :c1342, :c1343, :c1344, :c1345, :c1346, :c1347, :c1348, :c1349, :c1350, :c1351, :c1352, :c1353, :c1354, :c1355, :c1356, :c1357, :c1358, :c1359, :c1360, :c1361, :c1362, :c1363, :c1364, :c1365, :c1366, :c1367, :c1368, :c1369, :c1370, :c1371, :c1372, :c1373, :c1374, :c1375, :c1376, :c1377, :c1378, :c1379, :c1380, :c1381, :c1382, :c1383, :c1384, :c1385, :c1386, :c1387, :c1388, :c1389, :c1390, :c1391, :c1392, :c1393, :c1394, :c1395, :c1396, :c1397, :c1398, :c1399, :c1400, :c1401, :c1402, :c1403, :c1404, :c1405, :c1406, :c1407, :c1408, :c1409, :c1410, :c1411, :c1412, :c1413, :c1414, :c1415, :c1416, :c1417, :c1418, :c1419, :c1420, :c1421, :c1422, :c1423, :c1424, :c1425, :c1426, :c1427, :c1428, :c1429, :c1430, :c1431, :c1432, :c1433, :c1434, :c1435, :c1436, :c1437, :c1438, :c1439, :c1440, :c1441, :c1442, :c1443, :c1444, :c1445, :c1446, :c1447, :c1448, :c1449, :c1450, :c1451, :c1452, :c1453, :c1454, :c1455, :c1456, :c1457, :c1458, :c1459, :c1460, :c1461, :c1462, :c1463, :c1464, :c1465, :c1466, :c1467, :c1468, :c1469, :c1470, :c1471, :c1472, :c1473, :c1474, :c1475, :c1476, :c1477, :c1478, :c1479, :c1480, :c1481, :c1482, :c1483, :c1484, :c1485, :c1486, :c1487, :c1488, :c1489, :c1490, :c1491, :c1492, :c1493, :c1494, :c1495, :c1496, :c1497, :c1498, :c1499, :c1500, :c1501, :c1502, :c1503, :c1504, :c1505, :c1506, :c1507, :c1508, :c1509, :c1510, :c1511, :c1512, :c1513, :c1514, :c1515, :c1516, :c1517, :c1518, :c1519, :c1520, :c1521, :c1522, :c1523, :c1524, :c1525, :c1526, :c1527, :c1528, :c1529, :c1530, :c1531, :c1532, :c1533, :c1534, :c1535, :c1536, :c1537, :c1538, :c1539, :c1540, :c1541, :c1542, :c1543, :c1544, :c1545, :c1546, :c1547, :c1548, :c1549, :c1550, :c1551, :c1552, :c1553, :c1554, :c1555, :c1556, :c1557, :c1558, :c1559, :c1560, :c1561, :c1562, :c1563, :c1564, :c1565, :c1566, :c1567, :c1568, :c1569, :c1570, :c1571, :c1572, :c1573, :c1574, :c1575, :c1576, :c1577, :c1578, :c1579, :c1580, :c1581, :c1582, :c1583, :c1584, :c1585, :c1586, :c1587, :c1588, :c1589, :c1590, :c1591, :c1592, :c1593, :c1594, :c1595, :c1596, :c1597, :c1598, :c1599, :c1600, :c1601, :c1602, :c1603, :c1604, :c1605, :c1606, :c1607, :c1608, :c1609, :c1610, :c1611, :c1612, :c1613, :c1614, :c1615, :c1616, :c1617, :c1618, :c1619, :c1620, :c1621, :c1622, :c1623, :c1624, :c1625, :c1626, :c1627, :c1628, :c1629, :c1630, :c1631, :c1632, :c1633, :c1634, :c1635, :c1636, :c1637, :c1638, :c1639, :c1640, :c1641, :c1642, :c1643, :c1644, :c1645, :c1646, :c1647, :c1648, :c1649, :c1650, :c1651, :c1652, :c1653, :c1654, :c1655, :c1656, :c1657, :c1658, :c1659, :c1660, :c1661, :c1662, :c1663, :c1664, :c1665, :c1666, :c1667, :c1668, :c1669, :c1670, :c1671, :c1672, :c1673, :c1674, :c1675, :c1676, :c1677, :c1678, :c1679, :c1680, :c1681, :c1682, :c1683, :c1684, :c1685, :c1686, :c1687, :c1688, :c1689, :c1690, :c1691, :c1692, :c1693, :c1694, :c1695, :c1696, :c1697, :c1698, :c1699, :c1700, :c1701, :c1702, :c1703, :c1704, :c1705, :c1706, :c1707, :c1708, :c1709, :c1710, :c1711, :c1712, :c1713, :c1714, :c1715, :c1716, :c1717, :c1718, :c1719, :c1720, :c1721, :c1722, :c1723, :c1724, :c1725, :c1726, :c1727, :c1728, :c1729, :c1730, :c1731, :c1732, :c1733, :c1734, :c1735, :c1736, :c1737, :c1738, :c1739, :c1740, :c1741, :c1742, :c1743, :c1744, :c1745, :c1746, :c1747, :c1748, :c1749, :c1750, :c1751, :c1752, :c1753, :c1754, :c1755, :c1756, :c1757, :c1758, :c1759, :c1760, :c1761, :c1762, :c1763, :c1764, :c1765, :c1766, :c1767, :c1768, :c1769, :c1770, :c1771, :c1772, :c1773, :c1774, :c1775, :c1776, :c1777, :c1778, :c1779, :c1780, :c1781, :c1782, :c1783, :c1784, :c1785, :c1786, :c1787, :c1788, :c1789, :c1790, :c1791, :c1792, :c1793, :c1794, :c1795, :c1796, :c1797, :c1798, :c1799, :c1800, :c1801, :c1802, :c1803, :c1804, :c1805, :c1806, :c1807, :c1808, :c1809, :c1810, :c1811, :c1812, :c1813, :c1814, :c1815, :c1816, :c1817, :c1818, :c1819, :c1820, :c1821, :c1822, :c1823, :c1824, :c1825, :c1826, :c1827, :c1828, :c1829, :c1830, :c1831, :c1832, :c1833, :c1834, :c1835, :c1836, :c1837, :c1838, :c1839, :c1840, :c1841, :c1842, :c1843, :c1844, :c1845, :c1846, :c1847, :c1848, :c1849, :c1850, :c1851, :c1852, :c1853, :c1854, :c1855, :c1856, :c1857, :c1858, :c1859, :c1860, :c1861, :c1862, :c1863, :c1864, :c1865, :c1866, :c1867, :c1868, :c1869, :c1870, :c1871, :c1872, :c1873, :c1874, :c1875, :c1876, :c1877, :c1878, :c1879, :c1880, :c1881, :c1882, :c1883, :c1884, :c1885, :c1886, :c1887, :c1888, :c1889, :c1890, :c1891, :c1892, :c1893, :c1894, :c1895, :c1896, :c1897, :c1898, :c1899, :c1900, :c1901, :c1902, :c1903, :c1904, :c1905, :c1906, :c1907, :c1908, :c1909, :c1910, :c1911, :c1912, :c1913, :c1914, :c1915, :c1916, :c1917, :c1918, :c1919, :c1920, :c1921, :c1922, :c1923, :c1924, :c1925, :c1926, :c1927, :c1928, :c1929, :c1930, :c1931, :c1932, :c1933, :c1934, :c1935, :c1936, :c1937, :c1938, :c1939, :c1940, :c1941, :c1942, :c1943, :c1944, :c1945, :c1946, :c1947, :c1948, :c1949, :c1950, :c1951, :c1952, :c1953, :c1954, :c1955, :c1956, :c1957, :c1958, :c1959, :c1960, :c1961, :c1962, :c1963, :c1964, :c1965, :c1966, :c1967, :c1968, :c1969, :c1970, :c1971, :c1972, :c1973, :c1974, :c1975, :c1976, :c1977, :c1978, :c1979, :c1980, :c1981, :c1982, :c1983, :c1984, :c1985, :c1986, :c1987, :c1988, :c1989, :c1990, :c1991, :c1992, :c1993, :c1994, :c1995, :c1996, :c1997, :c1998, :c1999, :c2000, :c2001, :c2002, :c2003, :c2004, :c2005, :c2006, :c2007, :c2008, :c2009, :c2010, :c2011, :c2012, :c2013, :c2014, :c2015, :c2016, :c2017, :c2018, :c2019, :c2020, :c2021, :c2022, :c2023, :c2024, :c2025, :c2026, :c2027, :c2028, :c2029, :c2030, :c2031, :c2032, :c2033, :c2034, :c2035, :c2036, :c2037, :c2038, :c2039, :c2040, :c2041, :c2042, :c2043, :c2044, :c2045, :c2046, :c2047, :c2048, :c2049, :c2050, :c2051, :c2052, :c2053, :c2054, :c2055, :c2056, :c2057, :c2058, :c2059, :c2060, :c2061, :c2062, :c2063, :c2064, :c2065, :c2066, :c2067, :c2068, :c2069, :c2070, :c2071, :c2072, :c2073, :c2074, :c2075, :c2076, :c2077, :c2078, :c2079, :c2080, :c2081, :c2082, :c2083, :c2084, :c2085, :c2086, :c2087, :c2088, :c2089, :c2090, :c2091, :c2092, :c2093, :c2094, :c2095, :c2096, :c2097, :c2098, :c2099, :c2100, :c2101, :c2102, :c2103, :c2104, :c2105, :c2106, :c2107, :c2108, :c2109, :c2110, :c2111, :c2112, :c2113, :c2114, :c2115, :c2116, :c2117, :c2118, :c2119, :c2120, :c2121, :c2122, :c2123, :c2124, :c2125, :c2126, :c2127, :c2128, :c2129, :c2130, :c2131, :c2132, :c2133, :c2134, :c2135, :c2136, :c2137, :c2138, :c2139, :c2140, :c2141, :c2142, :c2143, :c2144, :c2145, :c2146, :c2147, :c2148, :c2149, :c2150, :c2151, :c2152, :c2153, :c2154, :c2155, :c2156, :c2157, :c2158, :c2159, :c2160, :c2161, :c2162, :c2163, :c2164, :c2165, :c2166, :c2167, :c2168, :c2169, :c2170, :c2171, :c2172, :c2173, :c2174, :c2175, :c2176, :c2177, :c2178, :c2179, :c2180, :c2181, :c2182, :c2183, :c2184, :c2185, :c2186, :c2187, :c2188, :c2189, :c2190, :c2191, :c2192, :c2193, :c2194, :c2195, :c2196, :c2197, :c2198, :c2199, :c2200, :c2201, :c2202, :c2203, :c2204, :c2205, :c2206, :c2207, :c2208, :c2209, :c2210, :c2211, :c2212, :c2213, :c2214, :c2215, :c2216, :c2217, :c2218, :c2219, :c2220, :c2221, :c2222, :c2223, :c2224, :c2225, :c2226, :c2227, :c2228, :c2229, :c2230, :c2231, :c2232, :c2233, :c2234, :c2235, :c2236, :c2237, :c2238, :c2239, :c2240, :c2241, :c2242, :c2243, :c2244, :c2245, :c2246, :c2247, :c2248, :c2249, :c2250, :c2251, :c2252, :c2253, :c2254, :c2255, :c2256, :c2257, :c2258, :c2259, :c2260, :c2261, :c2262, :c2263, :c2264, :c2265, :c2266, :c2267, :c2268, :c2269, :c2270, :c2271, :c2272, :c2273, :c2274, :c2275, :c2276, :c2277, :c2278, :c2279, :c2280, :c2281, :c2282, :c2283, :c2284, :c2285, :c2286, :c2287, :c2288, :c2289, :c2290, :c2291, :c2292, :c2293, :c2294, :c2295, :c2296, :c2297, :c2298, :c2299, :c2300, :c2301, :c2302, :c2303, :c2304, :c2305, :c2306, :c2307, :c2308, :c2309, :c2310, :c2311, :c2312, :c2313, :c2314, :c2315, :c2316, :c2317, :c2318, :c2319, :c2320, :c2321, :c2322, :c2323, :c2324, :c2325, :c2326, :c2327, :c2328, :c2329, :c2330, :c2331, :c2332, :c2333, :c2334, :c2335, :c2336, :c2337, :c2338, :c2339, :c2340, :c2341, :c2342, :c2343, :c2344, :c2345, :c2346, :c2347, :c2348, :c2349, :c2350, :c2351, :c2352, :c2353, :c2354, :c2355, :c2356, :c2357, :c2358, :c2359, :c2360, :c2361, :c2362, :c2363, :c2364, :c2365, :c2366, :c2367, :c2368, :c2369, :c2370, :c2371, :c2372, :c2373, :c2374, :c2375, :c2376, :c2377, :c2378, :c2379, :c2380, :c2381, :c2382, :c2383, :c2384, :c2385, :c2386, :c2387, :c2388, :c2389, :c2390, :c2391, :c2392, :c2393, :c2394, :c2395, :c2396, :c2397, :c2398, :c2399, :c2400, :c2401, :c2402, :c2403, :c2404, :c2405, :c2406, :c2407, :c2408, :c2409, :c2410, :c2411, :c2412, :c2413, :c2414, :c2415, :c2416, :c2417, :c2418, :c2419, :c2420, :c2421, :c2422, :c2423, :c2424, :c2425, :c2426, :c2427, :c2428, :c2429, :c2430, :c2431, :c2432, :c2433, :c2434, :c2435, :c2436, :c2437, :c2438, :c2439, :c2440, :c2441, :c2442, :c2443, :c2444, :c2445, :c2446, :c2447, :c2448, :c2449, :c2450, :c2451, :c2452, :c2453, :c2454, :c2455, :c2456, :c2457, :c2458, :c2459, :c2460, :c2461, :c2462, :c2463, :c2464, :c2465, :c2466, :c2467, :c2468, :c2469, :c2470, :c2471, :c2472, :c2473, :c2474, :c2475, :c2476, :c2477, :c2478, :c2479, :c2480, :c2481, :c2482, :c2483, :c2484, :c2485, :c2486, :c2487, :c2488, :c2489, :c2490, :c2491, :c2492, :c2493, :c2494, :c2495, :c2496, :c2497, :c2498, :c2499, :c2500, :c2501, :c2502, :c2503, :c2504, :c2505, :c2506, :c2507, :c2508, :c2509, :c2510, :c2511, :c2512, :c2513, :c2514, :c2515, :c2516, :c2517, :c2518, :c2519, :c2520, :c2521, :c2522, :c2523, :c2524, :c2525, :c2526, :c2527, :c2528, :c2529, :c2530, :c2531, :c2532, :c2533, :c2534, :c2535, :c2536, :c2537, :c2538, :c2539, :c2540, :c2541, :c2542, :c2543, :c2544, :c2545, :c2546, :c2547, :c2548, :c2549, :c2550, :c2551, :c2552, :c2553, :c2554, :c2555, :c2556, :c2557, :c2558, :c2559, :c2560, :c2561, :c2562, :c2563, :c2564, :c2565, :c2566, :c2567, :c2568, :c2569, :c2570, :c2571, :c2572, :c2573, :c2574, :c2575, :c2576, :c2577, :c2578, :c2579, :c2580, :c2581, :c2582, :c2583, :c2584, :c2585, :c2586, :c2587, :c2588, :c2589, :c2590, :c2591, :c2592, :c2593, :c2594, :c2595, :c2596, :c2597, :c2598, :c2599, :c2600, :c2601, :c2602, :c2603, :c2604, :c2605, :c2606, :c2607, :c2608, :c2609, :c2610, :c2611, :c2612, :c2613, :c2614, :c2615, :c2616, :c2617, :c2618, :c2619, :c2620, :c2621, :c2622, :c2623, :c2624, :c2625, :c2626, :c2627, :c2628, :c2629, :c2630, :c2631, :c2632, :c2633, :c2634, :c2635, :c2636, :c2637, :c2638, :c2639, :c2640, :c2641, :c2642, :c2643, :c2644, :c2645, :c2646, :c2647, :c2648, :c2649, :c2650, :c2651, :c2652, :c2653, :c2654, :c2655, :c2656, :c2657, :c2658, :c2659, :c2660, :c2661, :c2662, :c2663, :c2664, :c2665, :c2666, :c2667, :c2668, :c2669, :c2670, :c2671, :c2672, :c2673, :c2674, :c2675, :c2676, :c2677, :c2678, :c2679, :c2680, :c2681, :c2682, :c2683, :c2684, :c2685, :c2686, :c2687, :c2688, :c2689, :c2690, :c2691, :c2692, :c2693, :c2694, :c2695, :c2696, :c2697, :c2698, :c2699, :c2700, :c2701, :c2702, :c2703, :c2704, :c2705, :c2706, :c2707, :c2708, :c2709, :c2710, :c2711, :c2712, :c2713, :c2714, :c2715, :c2716, :c2717, :c2718, :c2719, :c2720, :c2721, :c2722, :c2723, :c2724, :c2725, :c2726, :c2727, :c2728, :c2729, :c2730, :c2731, :c2732, :c2733, :c2734, :c2735, :c2736, :c2737, :c2738, :c2739, :c2740, :c2741, :c2742, :c2743, :c2744, :c2745, :c2746, :c2747, :c2748, :c2749, :c2750, :c2751, :c2752, :c2753, :c2754, :c2755, :c2756, :c2757, :c2758, :c2759, :c2760, :c2761, :c2762, :c2763, :c2764, :c2765, :c2766, :c2767, :c2768, :c2769, :c2770, :c2771, :c2772, :c2773, :c2774, :c2775, :c2776, :c2777, :c2778, :c2779, :c2780, :c2781, :c2782, :c2783, :c2784, :c2785, :c2786, :c2787, :c2788, :c2789, :c2790, :c2791, :c2792, :c2793, :c2794, :c2795, :c2796, :c2797, :c2798, :c2799, :c2800, :c2801, :c2802, :c2803, :c2804, :c2805, :c2806, :c2807, :c2808, :c2809, :c2810, :c2811, :c2812, :c2813, :c2814, :c2815, :c2816, :c2817, :c2818, :c2819, :c2820, :c2821, :c2822, :c2823, :c2824, :c2825, :c2826, :c2827, :c2828, :c2829, :c2830, :c2831, :c2832, :c2833, :c2834, :c2835, :c2836, :c2837, :c2838, :c2839, :c2840, :c2841, :c2842, :c2843, :c2844, :c2845, :c2846, :c2847, :c2848, :c2849, :c2850, :c2851, :c2852, :c2853, :c2854, :c2855, :c2856, :c2857, :c2858, :c2859, :c2860, :c2861, :c2862, :c2863, :c2864, :c2865, :c2866, :c2867, :c2868, :c2869, :c2870, :c2871, :c2872, :c2873, :c2874, :c2875, :c2876, :c2877, :c2878, :c2879, :c2880, :c2881, :c2882, :c2883, :c2884, :c2885, :c2886, :c2887, :c2888, :c2889, :c2890, :c2891, :c2892, :c2893, :c2894, :c2895, :c2896, :c2897, :c2898, :c2899, :c2900, :c2901, :c2902, :c2903, :c2904, :c2905, :c2906, :c2907, :c2908, :c2909, :c2910, :c2911, :c2912, :c2913, :c2914, :c2915, :c2916, :c2917, :c2918, :c2919, :c2920, :c2921, :c2922, :c2923, :c2924, :c2925, :c2926, :c2927, :c2928, :c2929, :c2930, :c2931, :c2932, :c2933, :c2934, :c2935, :c2936, :c2937, :c2938, :c2939, :c2940, :c2941, :c2942, :c2943, :c2944, :c2945, :c2946, :c2947, :c2948, :c2949, :c2950, :c2951, :c2952, :c2953, :c2954, :c2955, :c2956, :c2957, :c2958, :c2959, :c2960, :c2961, :c2962, :c2963, :c2964, :c2965, :c2966, :c2967, :c2968, :c2969, :c2970, :c2971, :c2972, :c2973, :c2974, :c2975, :c2976, :c2977, :c2978, :c2979, :c2980, :c2981, :c2982, :c2983, :c2984, :c2985, :c2986, :c2987, :c2988, :c2989, :c2990, :c2991, :c2992, :c2993, :c2994, :c2995, :c2996, :c2997, :c2998, :c2999, :c3000, :c3001, :c3002, :c3003, :c3004, :c3005, :c3006, :c3007, :c3008, :c3009, :c3010, :c3011, :c3012, :c3013, :c3014, :c3015, :c3016, :c3017, :c3018, :c3019, :c3020, :c3021, :c3022, :c3023, :c3024, :c3025, :c3026, :c3027, :c3028, :c3029, :c3030, :c3031, :c3032, :c3033, :c3034, :c3035, :c3036, :c3037, :c3038, :c3039, :c3040, :c3041, :c3042, :c3043, :c3044, :c3045, :c3046, :c3047, :c3048, :c3049, :c3050, :c3051, :c3052, :c3053, :c3054, :c3055, :c3056, :c3057, :c3058, :c3059, :c3060, :c3061, :c3062, :c3063, :c3064, :c3065, :c3066, :c3067, :c3068, :c3069, :c3070, :c3071, :c3072, :c3073, :c3074, :c3075, :c3076, :c3077, :c3078, :c3079, :c3080, :c3081, :c3082, :c3083, :c3084, :c3085, :c3086, :c3087, :c3088, :c3089, :c3090, :c3091, :c3092, :c3093, :c3094, :c3095, :c3096, :c3097, :c3098, :c3099, :c3100, :c3101, :c3102, :c3103, :c3104, :c3105, :c3106, :c3107, :c3108, :c3109, :c3110, :c3111, :c3112, :c3113, :c3114, :c3115, :c3116, :c3117, :c3118, :c3119, :c3120, :c3121, :c3122, :c3123, :c3124, :c3125, :c3126, :c3127, :c3128, :c3129, :c3130, :c3131, :c3132, :c3133, :c3134, :c3135, :c3136, :c3137, :c3138, :c3139, :c3140, :c3141, :c3142, :c3143, :c3144, :c3145, :c3146, :c3147, :c3148, :c3149, :c3150, :c3151, :c3152, :c3153, :c3154, :c3155, :c3156, :c3157, :c3158, :c3159, :c3160, :c3161, :c3162, :c3163, :c3164, :c3165, :c3166, :c3167, :c3168, :c3169, :c3170, :c3171, :c3172, :c3173, :c3174, :c3175, :c3176, :c3177, :c3178, :c3179, :c3180, :c3181, :c3182, :c3183, :c3184, :c3185, :c3186, :c3187, :c3188, :c3189, :c3190, :c3191, :c3192, :c3193, :c3194, :c3195, :c3196, :c3197, :c3198, :c3199, :c3200, :c3201, :c3202, :c3203, :c3204, :c3205, :c3206, :c3207, :c3208, :c3209, :c3210, :c3211, :c3212, :c3213, :c3214, :c3215, :c3216, :c3217, :c3218, :c3219, :c3220, :c3221, :c3222, :c3223, :c3224, :c3225, :c3226, :c3227, :c3228, :c3229, :c3230, :c3231, :c3232, :c3233, :c3234, :c3235, :c3236, :c3237, :c3238, :c3239, :c3240, :c3241, :c3242, :c3243, :c3244, :c3245, :c3246, :c3247, :c3248, :c3249, :c3250, :c3251, :c3252, :c3253, :c3254, :c3255, :c3256, :c3257, :c3258, :c3259, :c3260, :c3261, :c3262, :c3263, :c3264, :c3265, :c3266, :c3267, :c3268, :c3269, :c3270, :c3271, :c3272, :c3273, :c3274, :c3275, :c3276, :c3277, :c3278, :c3279, :c3280, :c3281, :c3282, :c3283, :c3284, :c3285, :c3286, :c3287, :c3288, :c3289, :c3290, :c3291, :c3292, :c3293, :c3294, :c3295, :c3296, :c3297, :c3298, :c3299, :c3300, :c3301, :c3302, :c3303, :c3304, :c3305, :c3306, :c3307, :c3308, :c3309, :c3310, :c3311, :c3312, :c3313, :c3314, :c3315, :c3316, :c3317, :c3318, :c3319, :c3320, :c3321, :c3322, :c3323, :c3324, :c3325, :c3326, :c3327, :c3328, :c3329, :c3330, :c3331, :c3332, :c3333, :c3334, :c3335, :c3336, :c3337, :c3338, :c3339, :c3340, :c3341, :c3342, :c3343, :c3344, :c3345, :c3346, :c3347, :c3348, :c3349, :c3350, :c3351, :c3352, :c3353, :c3354, :c3355, :c3356, :c3357, :c3358, :c3359, :c3360, :c3361, :c3362, :c3363, :c3364, :c3365, :c3366, :c3367, :c3368, :c3369, :c3370, :c3371, :c3372, :c3373, :c3374, :c3375, :c3376, :c3377, :c3378, :c3379, :c3380, :c3381, :c3382, :c3383, :c3384, :c3385, :c3386, :c3387, :c3388, :c3389, :c3390, :c3391, :c3392, :c3393, :c3394, :c3395, :c3396, :c3397, :c3398, :c3399, :c3400, :c3401, :c3402, :c3403, :c3404, :c3405, :c3406, :c3407, :c3408, :c3409, :c3410, :c3411, :c3412, :c3413, :c3414, :c3415, :c3416, :c3417, :c3418, :c3419, :c3420, :c3421, :c3422, :c3423, :c3424, :c3425, :c3426, :c3427, :c3428, :c3429, :c3430, :c3431, :c3432, :c3433, :c3434, :c3435, :c3436, :c3437, :c3438, :c3439, :c3440, :c3441, :c3442, :c3443, :c3444, :c3445, :c3446, :c3447, :c3448, :c3449, :c3450, :c3451, :c3452, :c3453, :c3454, :c3455, :c3456, :c3457, :c3458, :c3459, :c3460, :c3461, :c3462, :c3463, :c3464, :c3465, :c3466, :c3467, :c3468, :c3469, :c3470, :c3471, :c3472, :c3473, :c3474, :c3475, :c3476, :c3477, :c3478, :c3479, :c3480, :c3481, :c3482, :c3483, :c3484, :c3485, :c3486, :c3487, :c3488, :c3489, :c3490, :c3491, :c3492, :c3493, :c3494, :c3495, :c3496, :c3497, :c3498, :c3499, :c3500, :c3501, :c3502, :c3503, :c3504, :c3505, :c3506, :c3507, :c3508, :c3509, :c3510, :c3511, :c3512, :c3513, :c3514, :c3515, :c3516, :c3517, :c3518, :c3519, :c3520, :c3521, :c3522, :c3523, :c3524, :c3525, :c3526, :c3527, :c3528, :c3529, :c3530, :c3531, :c3532, :c3533, :c3534, :c3535, :c3536, :c3537, :c3538, :c3539, :c3540, :c3541, :c3542, :c3543, :c3544, :c3545, :c3546, :c3547, :c3548, :c3549, :c3550, :c3551, :c3552, :c3553, :c3554, :c3555, :c3556, :c3557, :c3558, :c3559, :c3560, :c3561, :c3562, :c3563, :c3564, :c3565, :c3566, :c3567, :c3568, :c3569, :c3570, :c3571, :c3572, :c3573, :c3574, :c3575, :c3576, :c3577, :c3578, :c3579, :c3580, :c3581, :c3582, :c3583, :c3584, :c3585, :c3586, :c3587, :c3588, :c3589, :c3590, :c3591, :c3592, :c3593, :c3594, :c3595, :c3596, :c3597, :c3598, :c3599, :c3600, :c3601, :c3602, :c3603, :c3604, :c3605, :c3606, :c3607, :c3608, :c3609, :c3610, :c3611, :c3612, :c3613, :c3614, :c3615, :c3616, :c3617, :c3618, :c3619, :c3620, :c3621, :c3622, :c3623, :c3624, :c3625, :c3626, :c3627, :c3628, :c3629, :c3630, :c3631, :c3632, :c3633, :c3634, :c3635, :c3636, :c3637, :c3638, :c3639, :c3640, :c3641, :c3642, :c3643, :c3644, :c3645, :c3646, :c3647, :c3648, :c3649, :c3650, :c3651, :c3652, :c3653, :c3654, :c3655, :c3656, :c3657, :c3658, :c3659, :c3660, :c3661, :c3662, :c3663, :c3664, :c3665, :c3666, :c3667, :c3668, :c3669, :c3670, :c3671, :c3672, :c3673, :c3674, :c3675, :c3676, :c3677, :c3678, :c3679, :c3680, :c3681, :c3682, :c3683, :c3684, :c3685, :c3686, :c3687, :c3688, :c3689, :c3690, :c3691, :c3692, :c3693, :c3694, :c3695, :c3696, :c3697, :c3698, :c3699, :c3700, :c3701, :c3702, :c3703, :c3704, :c3705, :c3706, :c3707, :c3708, :c3709, :c3710, :c3711, :c3712, :c3713, :c3714, :c3715, :c3716, :c3717, :c3718, :c3719, :c3720, :c3721, :c3722, :c3723, :c3724, :c3725, :c3726, :c3727, :c3728, :c3729, :c3730, :c3731, :c3732, :c3733, :c3734, :c3735, :c3736, :c3737, :c3738, :c3739, :c3740, :c3741, :c3742, :c3743, :c3744, :c3745, :c3746, :c3747, :c3748, :c3749, :c3750, :c3751, :c3752, :c3753, :c3754, :c3755, :c3756, :c3757, :c3758, :c3759, :c3760, :c3761, :c3762, :c3763, :c3764, :c3765, :c3766, :c3767, :c3768, :c3769, :c3770, :c3771, :c3772, :c3773, :c3774, :c3775, :c3776, :c3777, :c3778, :c3779, :c3780, :c3781, :c3782, :c3783, :c3784, :c3785, :c3786, :c3787, :c3788, :c3789, :c3790, :c3791, :c3792, :c3793, :c3794, :c3795, :c3796, :c3797, :c3798, :c3799, :c3800, :c3801, :c3802, :c3803, :c3804, :c3805, :c3806, :c3807, :c3808, :c3809, :c3810, :c3811, :c3812, :c3813, :c3814, :c3815, :c3816, :c3817, :c3818, :c3819, :c3820, :c3821, :c3822, :c3823, :c3824, :c3825, :c3826, :c3827, :c3828, :c3829, :c3830, :c3831, :c3832, :c3833, :c3834, :c3835, :c3836, :c3837, :c3838, :c3839, :c3840, :c3841, :c3842, :c3843, :c3844, :c3845, :c3846, :c3847, :c3848, :c3849, :c3850, :c3851, :c3852, :c3853, :c3854, :c3855, :c3856, :c3857, :c3858, :c3859, :c3860, :c3861, :c3862, :c3863, :c3864, :c3865, :c3866, :c3867, :c3868, :c3869, :c3870, :c3871, :c3872, :c3873, :c3874, :c3875, :c3876, :c3877, :c3878, :c3879, :c3880, :c3881, :c3882, :c3883, :c3884, :c3885, :c3886, :c3887, :c3888, :c3889, :c3890, :c3891, :c3892, :c3893, :c3894, :c3895, :c3896, :c3897, :c3898, :c3899, :c3900, :c3901, :c3902, :c3903, :c3904, :c3905, :c3906, :c3907, :c3908, :c3909, :c3910, :c3911, :c3912, :c3913, :c3914, :c3915, :c3916, :c3917, :c3918, :c3919, :c3920, :c3921, :c3922, :c3923, :c3924, :c3925, :c3926, :c3927, :c3928, :c3929, :c3930, :c3931, :c3932, :c3933, :c3934, :c3935, :c3936, :c3937, :c3938, :c3939, :c3940, :c3941, :c3942, :c3943, :c3944, :c3945, :c3946, :c3947, :c3948, :c3949, :c3950, :c3951, :c3952, :c3953, :c3954, :c3955, :c3956, :c3957, :c3958, :c3959, :c3960, :c3961, :c3962, :c3963, :c3964, :c3965, :c3966, :c3967, :c3968, :c3969, :c3970, :c3971, :c3972, :c3973, :c3974, :c3975, :c3976, :c3977, :c3978, :c3979, :c3980, :c3981, :c3982, :c3983, :c3984, :c3985, :c3986, :c3987, :c3988, :c3989, :c3990, :c3991, :c3992, :c3993, :c3994, :c3995, :c3996, :c3997, :c3998, :c3999, :c4000, :c4001, :c4002, :c4003, :c4004, :c4005, :c4006, :c4007, :c4008, :c4009, :c4010, :c4011, :c4012, :c4013, :c4014, :c4015, :c4016, :c4017, :c4018, :c4019, :c4020, :c4021, :c4022, :c4023, :c4024, :c4025, :c4026, :c4027, :c4028, :c4029, :c4030, :c4031, :c4032, :c4033, :c4034, :c4035, :c4036, :c4037, :c4038, :c4039, :c4040, :c4041, :c4042, :c4043, :c4044, :c4045, :c4046, :c4047, :c4048, :c4049, :c4050, :c4051, :c4052, :c4053, :c4054, :c4055, :c4056, :c4057, :c4058, :c4059, :c4060, :c4061, :c4062, :c4063, :c4064, :c4065, :c4066, :c4067, :c4068, :c4069, :c4070, :c4071, :c4072, :c4073, :c4074, :c4075, :c4076, :c4077, :c4078, :c4079, :c4080, :c4081, :c4082, :c4083, :c4084, :c4085, :c4086, :c4087, :c4088, :c4089, :c4090, :c4091, :c4092, :c4093, :c4094, :c4095, :c4096, :c4097, :c4098, :c4099, :c4100, :c4101, :c4102, :c4103, :c4104, :c4105, :c4106, :c4107, :c4108, :c4109, :c4110, :c4111, :c4112, :c4113, :c4114, :c4115, :c4116, :c4117, :c4118, :c4119, :c4120, :c4121, :c4122, :c4123, :c4124, :c4125, :c4126, :c4127, :c4128, :c4129, :c4130, :c4131, :c4132, :c4133, :c4134, :c4135, :c4136, :c4137, :c4138, :c4139, :c4140, :c4141, :c4142, :c4143, :c4144, :c4145, :c4146, :c4147, :c4148, :c4149, :c4150, :c4151, :c4152, :c4153, :c4154, :c4155, :c4156, :c4157, :c4158, :c4159, :c4160, :c4161, :c4162, :c4163, :c4164, :c4165, :c4166, :c4167, :c4168, :c4169, :c4170, :c4171, :c4172, :c4173, :c4174, :c4175, :c4176, :c4177, :c4178, :c4179, :c4180, :c4181, :c4182, :c4183, :c4184, :c4185, :c4186, :c4187, :c4188, :c4189, :c4190, :c4191, :c4192, :c4193, :c4194, :c4195, :c4196, :c4197, :c4198, :c4199, :c4200, :c4201, :c4202, :c4203, :c4204, :c4205, :c4206, :c4207, :c4208, :c4209, :c4210, :c4211, :c4212, :c4213, :c4214, :c4215, :c4216, :c4217, :c4218, :c4219, :c4220, :c4221, :c4222, :c4223, :c4224, :c4225, :c4226, :c4227, :c4228, :c4229, :c4230, :c4231, :c4232, :c4233, :c4234, :c4235, :c4236, :c4237, :c4238, :c4239, :c4240, :c4241, :c4242, :c4243, :c4244, :c4245, :c4246, :c4247, :c4248, :c4249, :c4250, :c4251, :c4252, :c4253, :c4254, :c4255, :c4256, :c4257, :c4258, :c4259, :c4260, :c4261, :c4262, :c4263, :c4264, :c4265, :c4266, :c4267, :c4268, :c4269, :c4270, :c4271, :c4272, :c4273, :c4274, :c4275, :c4276, :c4277, :c4278, :c4279, :c4280, :c4281, :c4282, :c4283, :c4284, :c4285, :c4286, :c4287, :c4288, :c4289, :c4290, :c4291, :c4292, :c4293, :c4294, :c4295, :c4296, :c4297, :c4298, :c4299, :c4300, :c4301, :c4302, :c4303, :c4304, :c4305, :c4306, :c4307, :c4308, :c4309, :c4310, :c4311, :c4312, :c4313, :c4314, :c4315, :c4316, :c4317, :c4318, :c4319, :c4320, :c4321, :c4322, :c4323, :c4324, :c4325, :c4326, :c4327, :c4328, :c4329, :c4330, :c4331, :c4332, :c4333, :c4334, :c4335, :c4336, :c4337, :c4338, :c4339, :c4340, :c4341, :c4342, :c4343, :c4344, :c4345, :c4346, :c4347, :c4348, :c4349, :c4350, :c4351, :c4352, :c4353, :c4354, :c4355, :c4356, :c4357, :c4358, :c4359, :c4360, :c4361, :c4362, :c4363, :c4364, :c4365, :c4366, :c4367, :c4368, :c4369, :c4370, :c4371, :c4372, :c4373, :c4374, :c4375, :c4376, :c4377, :c4378, :c4379, :c4380, :c4381, :c4382, :c4383, :c4384, :c4385, :c4386, :c4387, :c4388, :c4389, :c4390, :c4391, :c4392, :c4393, :c4394, :c4395, :c4396, :c4397, :c4398, :c4399, :c4400, :c4401, :c4402, :c4403, :c4404, :c4405, :c4406, :c4407, :c4408, :c4409, :c4410, :c4411, :c4412, :c4413, :c4414, :c4415, :c4416, :c4417, :c4418, :c4419, :c4420, :c4421, :c4422, :c4423, :c4424, :c4425, :c4426, :c4427, :c4428, :c4429, :c4430, :c4431, :c4432, :c4433, :c4434, :c4435, :c4436, :c4437, :c4438, :c4439, :c4440, :c4441, :c4442, :c4443, :c4444, :c4445, :c4446, :c4447, :c4448, :c4449, :c4450, :c4451, :c4452, :c4453, :c4454, :c4455, :c4456, :c4457, :c4458, :c4459, :c4460, :c4461, :c4462, :c4463, :c4464, :c4465, :c4466, :c4467, :c4468, :c4469, :c4470, :c4471, :c4472, :c4473, :c4474, :c4475, :c4476, :c4477, :c4478, :c4479, :c4480, :c4481, :c4482, :c4483, :c4484, :c4485, :c4486, :c4487, :c4488, :c4489, :c4490, :c4491, :c4492, :c4493, :c4494, :c4495, :c4496, :c4497, :c4498, :c4499, :c4500, :c4501, :c4502, :c4503, :c4504, :c4505, :c4506, :c4507, :c4508, :c4509, :c4510, :c4511, :c4512, :c4513, :c4514, :c4515, :c4516, :c4517, :c4518, :c4519, :c4520, :c4521, :c4522, :c4523, :c4524, :c4525, :c4526, :c4527, :c4528, :c4529, :c4530, :c4531, :c4532, :c4533, :c4534, :c4535, :c4536, :c4537, :c4538, :c4539, :c4540, :c4541, :c4542, :c4543, :c4544, :c4545, :c4546, :c4547, :c4548, :c4549, :c4550, :c4551, :c4552, :c4553, :c4554, :c4555, :c4556, :c4557, :c4558, :c4559, :c4560, :c4561, :c4562, :c4563, :c4564, :c4565, :c4566, :c4567, :c4568, :c4569, :c4570, :c4571, :c4572, :c4573, :c4574, :c4575, :c4576, :c4577, :c4578, :c4579, :c4580, :c4581, :c4582, :c4583, :c4584, :c4585, :c4586, :c4587, :c4588, :c4589, :c4590, :c4591, :c4592, :c4593, :c4594, :c4595, :c4596, :c4597, :c4598, :c4599, :c4600, :c4601, :c4602, :c4603, :c4604, :c4605, :c4606, :c4607, :c4608, :c4609, :c4610, :c4611, :c4612, :c4613, :c4614, :c4615, :c4616, :c4617, :c4618, :c4619, :c4620, :c4621, :c4622, :c4623, :c4624, :c4625, :c4626, :c4627, :c4628, :c4629, :c4630, :c4631, :c4632, :c4633, :c4634, :c4635, :c4636, :c4637, :c4638, :c4639, :c4640, :c4641, :c4642, :c4643, :c4644, :c4645, :c4646, :c4647, :c4648, :c4649, :c4650, :c4651, :c4652, :c4653, :c4654, :c4655, :c4656, :c4657, :c4658, :c4659, :c4660, :c4661, :c4662, :c4663, :c4664, :c4665, :c4666, :c4667, :c4668, :c4669, :c4670, :c4671, :c4672, :c4673, :c4674, :c4675, :c4676, :c4677, :c4678, :c4679, :c4680, :c4681, :c4682, :c4683, :c4684, :c4685, :c4686, :c4687, :c4688, :c4689, :c4690, :c4691, :c4692, :c4693, :c4694, :c4695, :c4696, :c4697, :c4698, :c4699, :c4700, :c4701, :c4702, :c4703, :c4704, :c4705, :c4706, :c4707, :c4708, :c4709, :c4710, :c4711, :c4712, :c4713, :c4714, :c4715, :c4716, :c4717, :c4718, :c4719, :c4720, :c4721, :c4722, :c4723, :c4724, :c4725, :c4726, :c4727, :c4728, :c4729, :c4730, :c4731, :c4732, :c4733, :c4734, :c4735, :c4736, :c4737, :c4738, :c4739, :c4740, :c4741, :c4742, :c4743, :c4744, :c4745, :c4746, :c4747, :c4748, :c4749, :c4750, :c4751, :c4752, :c4753, :c4754, :c4755, :c4756, :c4757, :c4758, :c4759, :c4760, :c4761, :c4762, :c4763, :c4764, :c4765, :c4766, :c4767, :c4768, :c4769, :c4770, :c4771, :c4772, :c4773, :c4774, :c4775, :c4776, :c4777, :c4778, :c4779, :c4780, :c4781, :c4782, :c4783, :c4784, :c4785, :c4786, :c4787, :c4788, :c4789, :c4790, :c4791, :c4792, :c4793, :c4794, :c4795, :c4796, :c4797, :c4798, :c4799, :c4800, :c4801, :c4802, :c4803, :c4804, :c4805, :c4806, :c4807, :c4808, :c4809, :c4810, :c4811, :c4812, :c4813, :c4814, :c4815, :c4816, :c4817, :c4818, :c4819, :c4820, :c4821, :c4822, :c4823, :c4824, :c4825, :c4826, :c4827, :c4828, :c4829, :c4830, :c4831, :c4832, :c4833, :c4834, :c4835, :c4836, :c4837, :c4838, :c4839, :c4840, :c4841, :c4842, :c4843, :c4844, :c4845, :c4846, :c4847, :c4848, :c4849, :c4850, :c4851, :c4852, :c4853, :c4854, :c4855, :c4856, :c4857, :c4858, :c4859, :c4860, :c4861, :c4862, :c4863, :c4864, :c4865, :c4866, :c4867, :c4868, :c4869, :c4870, :c4871, :c4872, :c4873, :c4874, :c4875, :c4876, :c4877, :c4878, :c4879, :c4880, :c4881, :c4882, :c4883, :c4884, :c4885, :c4886, :c4887, :c4888, :c4889, :c4890, :c4891, :c4892, :c4893, :c4894, :c4895, :c4896, :c4897, :c4898, :c4899, :c4900, :c4901, :c4902, :c4903, :c4904, :c4905, :c4906, :c4907, :c4908, :c4909, :c4910, :c4911, :c4912, :c4913, :c4914, :c4915, :c4916, :c4917, :c4918, :c4919, :c4920, :c4921, :c4922, :c4923, :c4924, :c4925, :c4926, :c4927, :c4928, :c4929, :c4930, :c4931, :c4932, :c4933, :c4934, :c4935, :c4936, :c4937, :c4938, :c4939, :c4940, :c4941, :c4942, :c4943, :c4944, :c4945, :c4946, :c4947, :c4948, :c4949, :c4950, :c4951, :c4952, :c4953, :c4954, :c4955, :c4956, :c4957, :c4958, :c4959, :c4960, :c4961, :c4962, :c4963, :c4964, :c4965, :c4966, :c4967, :c4968, :c4969, :c4970, :c4971, :c4972, :c4973, :c4974, :c4975, :c4976, :c4977, :c4978, :c4979, :c4980, :c4981, :c4982, :c4983, :c4984, :c4985, :c4986, :c4987, :c4988, :c4989, :c4990, :c4991, :c4992, :c4993, :c4994, :c4995, :c4996, :c4997, :c4998, :c4999, :c5000, :c5001, :c5002, :c5003, :c5004, :c5005, :c5006, :c5007, :c5008, :c5009, :c5010, :c5011, :c5012, :c5013, :c5014, :c5015, :c5016, :c5017, :c5018, :c5019, :c5020, :c5021, :c5022, :c5023, :c5024, :c5025, :c5026, :c5027, :c5028, :c5029, :c5030, :c5031, :c5032, :c5033, :c5034, :c5035, :c5036, :c5037, :c5038, :c5039, :c5040, :c5041, :c5042, :c5043, :c5044, :c5045, :c5046, :c5047, :c5048, :c5049, :c5050, :c5051, :c5052, :c5053, :c5054, :c5055, :c5056, :c5057, :c5058, :c5059, :c5060, :c5061, :c5062, :c5063, :c5064, :c5065, :c5066, :c5067, :c5068, :c5069, :c5070, :c5071, :c5072, :c5073, :c5074, :c5075, :c5076, :c5077, :c5078, :c5079, :c5080, :c5081, :c5082, :c5083, :c5084, :c5085, :c5086, :c5087, :c5088, :c5089, :c5090, :c5091, :c5092, :c5093, :c5094, :c5095, :c5096, :c5097, :c5098, :c5099, :c5100, :c5101, :c5102, :c5103, :c5104, :c5105, :c5106, :c5107, :c5108, :c5109, :c5110, :c5111, :c5112, :c5113, :c5114, :c5115, :c5116, :c5117, :c5118, :c5119, :c5120, :c5121, :c5122, :c5123, :c5124, :c5125, :c5126, :c5127, :c5128, :c5129, :c5130, :c5131, :c5132, :c5133, :c5134, :c5135, :c5136, :c5137, :c5138, :c5139, :c5140, :c5141, :c5142, :c5143, :c5144, :c5145, :c5146, :c5147, :c5148, :c5149, :c5150, :c5151, :c5152, :c5153, :c5154, :c5155, :c5156, :c5157, :c5158, :c5159, :c5160, :c5161, :c5162, :c5163, :c5164, :c5165, :c5166, :c5167, :c5168, :c5169, :c5170, :c5171, :c5172, :c5173, :c5174, :c5175, :c5176, :c5177, :c5178, :c5179, :c5180, :c5181, :c5182, :c5183, :c5184, :c5185, :c5186, :c5187, :c5188, :c5189, :c5190, :c5191, :c5192, :c5193, :c5194, :c5195, :c5196, :c5197, :c5198, :c5199, :c5200, :c5201, :c5202, :c5203, :c5204, :c5205, :c5206, :c5207, :c5208, :c5209, :c5210, :c5211, :c5212, :c5213, :c5214, :c5215, :c5216, :c5217, :c5218, :c5219, :c5220, :c5221, :c5222, :c5223, :c5224, :c5225, :c5226, :c5227, :c5228, :c5229, :c5230, :c5231, :c5232, :c5233, :c5234, :c5235, :c5236, :c5237, :c5238, :c5239, :c5240, :c5241, :c5242, :c5243, :c5244, :c5245, :c5246, :c5247, :c5248, :c5249, :c5250, :c5251, :c5252, :c5253, :c5254, :c5255, :c5256, :c5257, :c5258, :c5259, :c5260, :c5261, :c5262, :c5263, :c5264, :c5265, :c5266, :c5267, :c5268, :c5269, :c5270, :c5271, :c5272, :c5273, :c5274, :c5275, :c5276, :c5277, :c5278, :c5279, :c5280, :c5281, :c5282, :c5283, :c5284, :c5285, :c5286, :c5287, :c5288, :c5289, :c5290, :c5291, :c5292, :c5293, :c5294, :c5295, :c5296, :c5297, :c5298, :c5299, :c5300, :c5301, :c5302, :c5303, :c5304, :c5305, :c5306, :c5307, :c5308, :c5309, :c5310, :c5311, :c5312, :c5313, :c5314, :c5315, :c5316, :c5317, :c5318, :c5319, :c5320, :c5321, :c5322, :c5323, :c5324, :c5325, :c5326, :c5327, :c5328, :c5329, :c5330, :c5331, :c5332, :c5333, :c5334, :c5335, :c5336, :c5337, :c5338, :c5339, :c5340, :c5341, :c5342, :c5343, :c5344, :c5345, :c5346, :c5347, :c5348, :c5349, :c5350, :c5351, :c5352, :c5353, :c5354, :c5355, :c5356, :c5357, :c5358, :c5359, :c5360, :c5361, :c5362, :c5363, :c5364, :c5365, :c5366, :c5367, :c5368, :c5369, :c5370, :c5371, :c5372, :c5373, :c5374, :c5375, :c5376, :c5377, :c5378, :c5379, :c5380, :c5381, :c5382, :c5383, :c5384, :c5385, :c5386, :c5387, :c5388, :c5389, :c5390, :c5391, :c5392, :c5393, :c5394, :c5395, :c5396, :c5397, :c5398, :c5399, :c5400, :c5401, :c5402, :c5403, :c5404, :c5405, :c5406, :c5407, :c5408, :c5409, :c5410, :c5411, :c5412, :c5413, :c5414, :c5415, :c5416, :c5417, :c5418, :c5419, :c5420, :c5421, :c5422, :c5423, :c5424, :c5425, :c5426, :c5427, :c5428, :c5429, :c5430, :c5431, :c5432, :c5433, :c5434, :c5435, :c5436, :c5437, :c5438, :c5439, :c5440, :c5441, :c5442, :c5443, :c5444, :c5445, :c5446, :c5447, :c5448, :c5449, :c5450, :c5451, :c5452, :c5453, :c5454, :c5455, :c5456, :c5457, :c5458, :c5459, :c5460, :c5461, :c5462, :c5463, :c5464, :c5465, :c5466, :c5467, :c5468, :c5469, :c5470, :c5471, :c5472, :c5473, :c5474, :c5475, :c5476, :c5477, :c5478, :c5479, :c5480, :c5481, :c5482, :c5483, :c5484, :c5485, :c5486, :c5487, :c5488, :c5489, :c5490, :c5491, :c5492, :c5493, :c5494, :c5495, :c5496, :c5497, :c5498, :c5499, :c5500, :c5501, :c5502, :c5503, :c5504, :c5505, :c5506, :c5507, :c5508, :c5509, :c5510, :c5511, :c5512, :c5513, :c5514, :c5515, :c5516, :c5517, :c5518, :c5519, :c5520, :c5521, :c5522, :c5523, :c5524, :c5525, :c5526, :c5527, :c5528, :c5529, :c5530, :c5531, :c5532, :c5533, :c5534, :c5535, :c5536, :c5537, :c5538, :c5539, :c5540, :c5541, :c5542, :c5543, :c5544, :c5545, :c5546, :c5547, :c5548, :c5549, :c5550, :c5551, :c5552, :c5553, :c5554, :c5555, :c5556, :c5557, :c5558, :c5559, :c5560, :c5561, :c5562, :c5563, :c5564, :c5565, :c5566, :c5567, :c5568, :c5569, :c5570, :c5571, :c5572, :c5573, :c5574, :c5575, :c5576, :c5577, :c5578, :c5579, :c5580, :c5581, :c5582, :c5583, :c5584, :c5585, :c5586, :c5587, :c5588, :c5589, :c5590, :c5591, :c5592, :c5593, :c5594, :c5595, :c5596, :c5597, :c5598, :c5599, :c5600, :c5601, :c5602, :c5603, :c5604, :c5605, :c5606, :c5607, :c5608, :c5609, :c5610, :c5611, :c5612, :c5613, :c5614, :c5615, :c5616, :c5617, :c5618, :c5619, :c5620, :c5621, :c5622, :c5623, :c5624, :c5625, :c5626, :c5627, :c5628, :c5629, :c5630, :c5631, :c5632, :c5633, :c5634, :c5635, :c5636, :c5637, :c5638, :c5639, :c5640, :c5641, :c5642, :c5643, :c5644, :c5645, :c5646, :c5647, :c5648, :c5649, :c5650, :c5651, :c5652, :c5653, :c5654, :c5655, :c5656, :c5657, :c5658, :c5659, :c5660, :c5661, :c5662, :c5663, :c5664, :c5665, :c5666, :c5667, :c5668, :c5669, :c5670, :c5671, :c5672, :c5673, :c5674, :c5675, :c5676, :c5677, :c5678, :c5679, :c5680, :c5681, :c5682, :c5683, :c5684, :c5685, :c5686, :c5687, :c5688, :c5689, :c5690, :c5691, :c5692, :c5693, :c5694, :c5695, :c5696, :c5697, :c5698, :c5699, :c5700, :c5701, :c5702, :c5703, :c5704, :c5705, :c5706, :c5707, :c5708, :c5709, :c5710, :c5711, :c5712, :c5713, :c5714, :c5715, :c5716, :c5717, :c5718, :c5719, :c5720, :c5721, :c5722, :c5723, :c5724, :c5725, :c5726, :c5727, :c5728, :c5729, :c5730, :c5731, :c5732, :c5733, :c5734, :c5735, :c5736, :c5737, :c5738, :c5739, :c5740, :c5741, :c5742, :c5743, :c5744, :c5745, :c5746, :c5747, :c5748, :c5749, :c5750, :c5751, :c5752, :c5753, :c5754, :c5755, :c5756, :c5757, :c5758, :c5759, :c5760, :c5761, :c5762, :c5763, :c5764, :c5765, :c5766, :c5767, :c5768, :c5769, :c5770, :c5771, :c5772, :c5773, :c5774, :c5775, :c5776, :c5777, :c5778, :c5779, :c5780, :c5781, :c5782, :c5783, :c5784, :c5785, :c5786, :c5787, :c5788, :c5789, :c5790, :c5791, :c5792, :c5793, :c5794, :c5795, :c5796, :c5797, :c5798, :c5799, :c5800, :c5801, :c5802, :c5803, :c5804, :c5805, :c5806, :c5807, :c5808, :c5809, :c5810, :c5811, :c5812, :c5813, :c5814, :c5815, :c5816, :c5817, :c5818, :c5819, :c5820, :c5821, :c5822, :c5823, :c5824, :c5825, :c5826, :c5827, :c5828, :c5829, :c5830, :c5831, :c5832, :c5833, :c5834, :c5835, :c5836, :c5837, :c5838, :c5839, :c5840, :c5841, :c5842, :c5843, :c5844, :c5845, :c5846, :c5847, :c5848, :c5849, :c5850, :c5851, :c5852, :c5853, :c5854, :c5855, :c5856, :c5857, :c5858, :c5859, :c5860, :c5861, :c5862, :c5863, :c5864, :c5865, :c5866, :c5867, :c5868, :c5869, :c5870, :c5871, :c5872, :c5873, :c5874, :c5875, :c5876, :c5877, :c5878, :c5879, :c5880, :c5881, :c5882, :c5883, :c5884, :c5885, :c5886, :c5887, :c5888, :c5889, :c5890, :c5891, :c5892, :c5893, :c5894, :c5895, :c5896, :c5897, :c5898, :c5899, :c5900, :c5901, :c5902, :c5903, :c5904, :c5905, :c5906, :c5907, :c5908, :c5909, :c5910, :c5911, :c5912, :c5913, :c5914, :c5915, :c5916, :c5917, :c5918, :c5919, :c5920, :c5921, :c5922, :c5923, :c5924, :c5925, :c5926, :c5927, :c5928, :c5929, :c5930, :c5931, :c5932, :c5933, :c5934, :c5935, :c5936, :c5937, :c5938, :c5939, :c5940, :c5941, :c5942, :c5943, :c5944, :c5945, :c5946, :c5947, :c5948, :c5949, :c5950, :c5951, :c5952, :c5953, :c5954, :c5955, :c5956, :c5957, :c5958, :c5959, :c5960, :c5961, :c5962, :c5963, :c5964, :c5965, :c5966, :c5967, :c5968, :c5969, :c5970, :c5971, :c5972, :c5973, :c5974, :c5975, :c5976, :c5977, :c5978, :c5979, :c5980, :c5981, :c5982, :c5983, :c5984, :c5985, :c5986, :c5987, :c5988, :c5989, :c5990, :c5991, :c5992, :c5993, :c5994, :c5995, :c5996, :c5997, :c5998, :c5999, :c6000, :c6001, :c6002, :c6003, :c6004, :c6005, :c6006, :c6007, :c6008, :c6009, :c6010, :c6011, :c6012, :c6013, :c6014, :c6015, :c6016, :c6017, :c6018, :c6019, :c6020, :c6021, :c6022, :c6023, :c6024, :c6025, :c6026, :c6027, :c6028, :c6029, :c6030, :c6031, :c6032, :c6033, :c6034, :c6035, :c6036, :c6037, :c6038, :c6039, :c6040, :c6041, :c6042, :c6043, :c6044, :c6045, :c6046, :c6047, :c6048, :c6049, :c6050, :c6051, :c6052, :c6053, :c6054, :c6055, :c6056, :c6057, :c6058, :c6059, :c6060, :c6061, :c6062, :c6063, :c6064, :c6065, :c6066, :c6067, :c6068, :c6069, :c6070, :c6071, :c6072, :c6073, :c6074, :c6075, :c6076, :c6077, :c6078, :c6079, :c6080, :c6081, :c6082, :c6083, :c6084, :c6085, :c6086, :c6087, :c6088, :c6089, :c6090, :c6091, :c6092, :c6093, :c6094, :c6095, :c6096, :c6097, :c6098, :c6099, :c6100, :c6101, :c6102, :c6103, :c6104, :c6105, :c6106, :c6107, :c6108, :c6109, :c6110, :c6111, :c6112, :c6113, :c6114, :c6115, :c6116, :c6117, :c6118, :c6119, :c6120, :c6121, :c6122, :c6123, :c6124, :c6125, :c6126, :c6127, :c6128, :c6129, :c6130, :c6131, :c6132, :c6133, :c6134, :c6135, :c6136, :c6137, :c6138, :c6139, :c6140, :c6141, :c6142, :c6143, :c6144, :c6145, :c6146, :c6147, :c6148, :c6149, :c6150, :c6151, :c6152, :c6153, :c6154, :c6155, :c6156, :c6157, :c6158, :c6159, :c6160, :c6161, :c6162, :c6163, :c6164, :c6165, :c6166, :c6167, :c6168, :c6169, :c6170, :c6171, :c6172, :c6173, :c6174, :c6175, :c6176, :c6177, :c6178, :c6179, :c6180, :c6181, :c6182, :c6183, :c6184, :c6185, :c6186, :c6187, :c6188, :c6189, :c6190, :c6191, :c6192, :c6193, :c6194, :c6195, :c6196, :c6197, :c6198, :c6199, :c6200, :c6201, :c6202, :c6203, :c6204, :c6205, :c6206, :c6207, :c6208, :c6209, :c6210, :c6211, :c6212, :c6213, :c6214, :c6215, :c6216, :c6217, :c6218, :c6219, :c6220, :c6221, :c6222, :c6223, :c6224, :c6225, :c6226, :c6227, :c6228, :c6229, :c6230, :c6231, :c6232, :c6233, :c6234, :c6235, :c6236, :c6237, :c6238, :c6239, :c6240, :c6241, :c6242, :c6243, :c6244, :c6245, :c6246, :c6247, :c6248, :c6249, :c6250, :c6251, :c6252, :c6253, :c6254, :c6255, :c6256, :c6257, :c6258, :c6259, :c6260, :c6261, :c6262, :c6263, :c6264, :c6265, :c6266, :c6267, :c6268, :c6269, :c6270, :c6271, :c6272, :c6273, :c6274, :c6275, :c6276, :c6277, :c6278, :c6279, :c6280, :c6281, :c6282, :c6283, :c6284, :c6285, :c6286, :c6287, :c6288, :c6289, :c6290, :c6291, :c6292, :c6293, :c6294, :c6295, :c6296, :c6297, :c6298, :c6299, :c6300, :c6301, :c6302, :c6303, :c6304, :c6305, :c6306, :c6307, :c6308, :c6309, :c6310, :c6311, :c6312, :c6313, :c6314, :c6315, :c6316, :c6317, :c6318, :c6319, :c6320, :c6321, :c6322, :c6323, :c6324, :c6325, :c6326, :c6327, :c6328, :c6329, :c6330, :c6331, :c6332, :c6333, :c6334, :c6335, :c6336, :c6337, :c6338, :c6339, :c6340, :c6341, :c6342, :c6343, :c6344, :c6345, :c6346, :c6347, :c6348, :c6349, :c6350, :c6351, :c6352, :c6353, :c6354, :c6355, :c6356, :c6357, :c6358, :c6359, :c6360, :c6361, :c6362, :c6363, :c6364, :c6365, :c6366, :c6367, :c6368, :c6369, :c6370, :c6371, :c6372, :c6373, :c6374, :c6375, :c6376, :c6377, :c6378, :c6379, :c6380, :c6381, :c6382, :c6383, :c6384, :c6385, :c6386, :c6387, :c6388, :c6389, :c6390, :c6391, :c6392, :c6393, :c6394, :c6395, :c6396, :c6397, :c6398, :c6399, :c6400, :c6401, :c6402, :c6403, :c6404, :c6405, :c6406, :c6407, :c6408, :c6409, :c6410, :c6411, :c6412, :c6413, :c6414, :c6415, :c6416, :c6417, :c6418, :c6419, :c6420, :c6421, :c6422, :c6423, :c6424, :c6425, :c6426, :c6427, :c6428, :c6429, :c6430, :c6431, :c6432, :c6433, :c6434, :c6435, :c6436, :c6437, :c6438, :c6439, :c6440, :c6441, :c6442, :c6443, :c6444, :c6445, :c6446, :c6447, :c6448, :c6449, :c6450, :c6451, :c6452, :c6453, :c6454, :c6455, :c6456, :c6457, :c6458, :c6459, :c6460, :c6461, :c6462, :c6463, :c6464, :c6465, :c6466, :c6467, :c6468, :c6469, :c6470, :c6471, :c6472, :c6473, :c6474, :c6475, :c6476, :c6477, :c6478, :c6479, :c6480, :c6481, :c6482, :c6483, :c6484, :c6485, :c6486, :c6487, :c6488, :c6489, :c6490, :c6491, :c6492, :c6493, :c6494, :c6495, :c6496, :c6497, :c6498, :c6499, :c6500, :c6501, :c6502, :c6503, :c6504, :c6505, :c6506, :c6507, :c6508, :c6509, :c6510, :c6511, :c6512, :c6513, :c6514, :c6515, :c6516, :c6517, :c6518, :c6519, :c6520, :c6521, :c6522, :c6523, :c6524, :c6525, :c6526, :c6527, :c6528, :c6529, :c6530, :c6531, :c6532, :c6533, :c6534, :c6535, :c6536, :c6537, :c6538, :c6539, :c6540, :c6541, :c6542, :c6543, :c6544, :c6545, :c6546, :c6547, :c6548, :c6549, :c6550, :c6551, :c6552, :c6553, :c6554, :c6555, :c6556, :c6557, :c6558, :c6559, :c6560, :c6561, :c6562, :c6563, :c6564, :c6565, :c6566, :c6567, :c6568, :c6569, :c6570, :c6571, :c6572, :c6573, :c6574, :c6575, :c6576, :c6577, :c6578, :c6579, :c6580, :c6581, :c6582, :c6583, :c6584, :c6585, :c6586, :c6587, :c6588, :c6589, :c6590, :c6591, :c6592, :c6593, :c6594, :c6595, :c6596, :c6597, :c6598, :c6599, :c6600, :c6601, :c6602, :c6603, :c6604, :c6605, :c6606, :c6607, :c6608, :c6609, :c6610, :c6611, :c6612, :c6613, :c6614, :c6615, :c6616, :c6617, :c6618, :c6619, :c6620, :c6621, :c6622, :c6623, :c6624, :c6625, :c6626, :c6627, :c6628, :c6629, :c6630, :c6631, :c6632, :c6633, :c6634, :c6635, :c6636, :c6637, :c6638, :c6639, :c6640, :c6641, :c6642, :c6643, :c6644, :c6645, :c6646, :c6647, :c6648, :c6649, :c6650, :c6651, :c6652, :c6653, :c6654, :c6655, :c6656, :c6657, :c6658, :c6659, :c6660, :c6661, :c6662, :c6663, :c6664, :c6665, :c6666, :c6667, :c6668, :c6669, :c6670, :c6671, :c6672, :c6673, :c6674, :c6675, :c6676, :c6677, :c6678, :c6679, :c6680, :c6681, :c6682, :c6683, :c6684, :c6685, :c6686, :c6687, :c6688, :c6689, :c6690, :c6691, :c6692, :c6693, :c6694, :c6695, :c6696, :c6697, :c6698, :c6699, :c6700, :c6701, :c6702, :c6703, :c6704, :c6705, :c6706, :c6707, :c6708, :c6709, :c6710, :c6711, :c6712, :c6713, :c6714, :c6715, :c6716, :c6717, :c6718, :c6719, :c6720, :c6721, :c6722, :c6723, :c6724, :c6725, :c6726, :c6727, :c6728, :c6729, :c6730, :c6731, :c6732, :c6733, :c6734, :c6735, :c6736, :c6737, :c6738, :c6739, :c6740, :c6741, :c6742, :c6743, :c6744, :c6745, :c6746, :c6747, :c6748, :c6749, :c6750, :c6751, :c6752, :c6753, :c6754, :c6755, :c6756, :c6757, :c6758, :c6759, :c6760, :c6761, :c6762, :c6763, :c6764, :c6765, :c6766, :c6767, :c6768, :c6769, :c6770, :c6771, :c6772, :c6773, :c6774, :c6775, :c6776, :c6777, :c6778, :c6779, :c6780, :c6781, :c6782, :c6783, :c6784, :c6785, :c6786, :c6787, :c6788, :c6789, :c6790, :c6791, :c6792, :c6793, :c6794, :c6795, :c6796, :c6797, :c6798, :c6799, :c6800, :c6801, :c6802, :c6803, :c6804, :c6805, :c6806, :c6807, :c6808, :c6809, :c6810, :c6811, :c6812, :c6813, :c6814, :c6815, :c6816, :c6817, :c6818, :c6819, :c6820, :c6821, :c6822, :c6823, :c6824, :c6825, :c6826, :c6827, :c6828, :c6829, :c6830, :c6831, :c6832, :c6833, :c6834, :c6835, :c6836, :c6837, :c6838, :c6839, :c6840, :c6841, :c6842, :c6843, :c6844, :c6845, :c6846, :c6847, :c6848, :c6849, :c6850, :c6851, :c6852, :c6853, :c6854, :c6855, :c6856, :c6857, :c6858, :c6859, :c6860, :c6861, :c6862, :c6863, :c6864, :c6865, :c6866, :c6867, :c6868, :c6869, :c6870, :c6871, :c6872, :c6873, :c6874, :c6875, :c6876, :c6877, :c6878, :c6879, :c6880, :c6881, :c6882, :c6883, :c6884, :c6885, :c6886, :c6887, :c6888, :c6889, :c6890, :c6891, :c6892, :c6893, :c6894, :c6895, :c6896, :c6897, :c6898, :c6899, :c6900, :c6901, :c6902, :c6903, :c6904, :c6905, :c6906, :c6907, :c6908, :c6909, :c6910, :c6911, :c6912, :c6913, :c6914, :c6915, :c6916, :c6917, :c6918, :c6919, :c6920, :c6921, :c6922, :c6923, :c6924, :c6925, :c6926, :c6927, :c6928, :c6929, :c6930, :c6931, :c6932, :c6933, :c6934, :c6935, :c6936, :c6937, :c6938, :c6939, :c6940, :c6941, :c6942, :c6943, :c6944, :c6945, :c6946, :c6947, :c6948, :c6949, :c6950, :c6951, :c6952, :c6953, :c6954, :c6955, :c6956, :c6957, :c6958, :c6959, :c6960, :c6961, :c6962, :c6963, :c6964, :c6965, :c6966, :c6967, :c6968, :c6969, :c6970, :c6971, :c6972, :c6973, :c6974, :c6975, :c6976, :c6977, :c6978, :c6979, :c6980, :c6981, :c6982, :c6983, :c6984, :c6985, :c6986, :c6987, :c6988, :c6989, :c6990, :c6991, :c6992, :c6993, :c6994, :c6995, :c6996, :c6997, :c6998, :c6999, :c7000, :c7001, :c7002, :c7003, :c7004, :c7005, :c7006, :c7007, :c7008, :c7009, :c7010, :c7011, :c7012, :c7013, :c7014, :c7015, :c7016, :c7017, :c7018, :c7019, :c7020, :c7021, :c7022, :c7023, :c7024, :c7025, :c7026, :c7027, :c7028, :c7029, :c7030, :c7031, :c7032, :c7033, :c7034, :c7035, :c7036, :c7037, :c7038, :c7039, :c7040, :c7041, :c7042, :c7043, :c7044, :c7045, :c7046, :c7047, :c7048, :c7049, :c7050, :c7051, :c7052, :c7053, :c7054, :c7055, :c7056, :c7057, :c7058, :c7059, :c7060, :c7061, :c7062, :c7063, :c7064, :c7065, :c7066, :c7067, :c7068, :c7069, :c7070, :c7071, :c7072, :c7073, :c7074, :c7075, :c7076, :c7077, :c7078, :c7079, :c7080, :c7081, :c7082, :c7083, :c7084, :c7085, :c7086, :c7087, :c7088, :c7089, :c7090, :c7091, :c7092, :c7093, :c7094, :c7095, :c7096, :c7097, :c7098, :c7099, :c7100, :c7101, :c7102, :c7103, :c7104, :c7105, :c7106, :c7107, :c7108, :c7109, :c7110, :c7111, :c7112, :c7113, :c7114, :c7115, :c7116, :c7117, :c7118, :c7119, :c7120, :c7121, :c7122, :c7123, :c7124, :c7125, :c7126, :c7127, :c7128, :c7129, :c7130, :c7131, :c7132, :c7133, :c7134, :c7135, :c7136, :c7137, :c7138, :c7139, :c7140, :c7141, :c7142, :c7143, :c7144, :c7145, :c7146, :c7147, :c7148, :c7149, :c7150, :c7151, :c7152, :c7153, :c7154, :c7155, :c7156, :c7157, :c7158, :c7159, :c7160, :c7161, :c7162, :c7163, :c7164, :c7165, :c7166, :c7167, :c7168, :c7169, :c7170, :c7171, :c7172, :c7173, :c7174, :c7175, :c7176, :c7177, :c7178, :c7179, :c7180, :c7181, :c7182, :c7183, :c7184, :c7185, :c7186, :c7187, :c7188, :c7189, :c7190, :c7191, :c7192, :c7193, :c7194, :c7195, :c7196, :c7197, :c7198, :c7199, :c7200, :c7201, :c7202, :c7203, :c7204, :c7205, :c7206, :c7207, :c7208, :c7209, :c7210, :c7211, :c7212, :c7213, :c7214, :c7215, :c7216, :c7217, :c7218, :c7219, :c7220, :c7221, :c7222, :c7223, :c7224, :c7225, :c7226, :c7227, :c7228, :c7229, :c7230, :c7231, :c7232, :c7233, :c7234, :c7235, :c7236, :c7237, :c7238, :c7239, :c7240, :c7241, :c7242, :c7243, :c7244, :c7245, :c7246, :c7247, :c7248, :c7249, :c7250, :c7251, :c7252, :c7253, :c7254, :c7255, :c7256, :c7257, :c7258, :c7259, :c7260, :c7261, :c7262, :c7263, :c7264, :c7265, :c7266, :c7267, :c7268, :c7269, :c7270, :c7271, :c7272, :c7273, :c7274, :c7275, :c7276, :c7277, :c7278, :c7279, :c7280, :c7281, :c7282, :c7283, :c7284, :c7285, :c7286, :c7287, :c7288, :c7289, :c7290, :c7291, :c7292, :c7293, :c7294, :c7295, :c7296, :c7297, :c7298, :c7299, :c7300, :c7301, :c7302, :c7303, :c7304, :c7305, :c7306, :c7307, :c7308, :c7309, :c7310, :c7311, :c7312, :c7313, :c7314, :c7315, :c7316, :c7317, :c7318, :c7319, :c7320, :c7321, :c7322, :c7323, :c7324, :c7325, :c7326, :c7327, :c7328, :c7329, :c7330, :c7331, :c7332, :c7333, :c7334, :c7335, :c7336, :c7337, :c7338, :c7339, :c7340, :c7341, :c7342, :c7343, :c7344, :c7345, :c7346, :c7347, :c7348, :c7349, :c7350, :c7351, :c7352, :c7353, :c7354, :c7355, :c7356, :c7357, :c7358, :c7359, :c7360, :c7361, :c7362, :c7363, :c7364, :c7365, :c7366, :c7367, :c7368, :c7369, :c7370, :c7371, :c7372, :c7373, :c7374, :c7375, :c7376, :c7377, :c7378, :c7379, :c7380, :c7381, :c7382, :c7383, :c7384, :c7385, :c7386, :c7387, :c7388, :c7389, :c7390, :c7391, :c7392, :c7393, :c7394, :c7395, :c7396, :c7397, :c7398, :c7399, :c7400, :c7401, :c7402, :c7403, :c7404, :c7405, :c7406, :c7407, :c7408, :c7409, :c7410, :c7411, :c7412, :c7413, :c7414, :c7415, :c7416, :c7417, :c7418, :c7419, :c7420, :c7421, :c7422, :c7423, :c7424, :c7425, :c7426, :c7427, :c7428, :c7429, :c7430, :c7431, :c7432, :c7433, :c7434, :c7435, :c7436, :c7437, :c7438, :c7439, :c7440, :c7441, :c7442, :c7443, :c7444, :c7445, :c7446, :c7447, :c7448, :c7449, :c7450, :c7451, :c7452, :c7453, :c7454, :c7455, :c7456, :c7457, :c7458, :c7459, :c7460, :c7461, :c7462, :c7463, :c7464, :c7465, :c7466, :c7467, :c7468, :c7469, :c7470, :c7471, :c7472, :c7473, :c7474, :c7475, :c7476, :c7477, :c7478, :c7479, :c7480, :c7481, :c7482, :c7483, :c7484, :c7485, :c7486, :c7487, :c7488, :c7489, :c7490, :c7491, :c7492, :c7493, :c7494, :c7495, :c7496, :c7497, :c7498, :c7499, :c7500, :c7501, :c7502, :c7503, :c7504, :c7505, :c7506, :c7507, :c7508, :c7509, :c7510, :c7511, :c7512, :c7513, :c7514, :c7515, :c7516, :c7517, :c7518, :c7519, :c7520, :c7521, :c7522, :c7523, :c7524, :c7525, :c7526, :c7527, :c7528, :c7529, :c7530, :c7531, :c7532, :c7533, :c7534, :c7535, :c7536, :c7537, :c7538, :c7539, :c7540, :c7541, :c7542, :c7543, :c7544, :c7545, :c7546, :c7547, :c7548, :c7549, :c7550, :c7551, :c7552, :c7553, :c7554, :c7555, :c7556, :c7557, :c7558, :c7559, :c7560, :c7561, :c7562, :c7563, :c7564, :c7565, :c7566, :c7567, :c7568, :c7569, :c7570, :c7571, :c7572, :c7573, :c7574, :c7575, :c7576, :c7577, :c7578, :c7579, :c7580, :c7581, :c7582, :c7583, :c7584, :c7585, :c7586, :c7587, :c7588, :c7589, :c7590, :c7591, :c7592, :c7593, :c7594, :c7595, :c7596, :c7597, :c7598, :c7599, :c7600, :c7601, :c7602, :c7603, :c7604, :c7605, :c7606, :c7607, :c7608, :c7609, :c7610, :c7611, :c7612, :c7613, :c7614, :c7615, :c7616, :c7617, :c7618, :c7619, :c7620, :c7621, :c7622, :c7623, :c7624, :c7625, :c7626, :c7627, :c7628, :c7629, :c7630, :c7631, :c7632, :c7633, :c7634, :c7635, :c7636, :c7637, :c7638, :c7639, :c7640, :c7641, :c7642, :c7643, :c7644, :c7645, :c7646, :c7647, :c7648, :c7649, :c7650, :c7651, :c7652, :c7653, :c7654, :c7655, :c7656, :c7657, :c7658, :c7659, :c7660, :c7661, :c7662, :c7663, :c7664, :c7665, :c7666, :c7667, :c7668, :c7669, :c7670, :c7671, :c7672, :c7673, :c7674, :c7675, :c7676, :c7677, :c7678, :c7679, :c7680, :c7681, :c7682, :c7683, :c7684, :c7685, :c7686, :c7687, :c7688, :c7689, :c7690, :c7691, :c7692, :c7693, :c7694, :c7695, :c7696, :c7697, :c7698, :c7699, :c7700, :c7701, :c7702, :c7703, :c7704, :c7705, :c7706, :c7707, :c7708, :c7709, :c7710, :c7711, :c7712, :c7713, :c7714, :c7715, :c7716, :c7717, :c7718, :c7719, :c7720, :c7721, :c7722, :c7723, :c7724, :c7725, :c7726, :c7727, :c7728, :c7729, :c7730, :c7731, :c7732, :c7733, :c7734, :c7735, :c7736, :c7737, :c7738, :c7739, :c7740, :c7741, :c7742, :c7743, :c7744, :c7745, :c7746, :c7747, :c7748, :c7749, :c7750, :c7751, :c7752, :c7753, :c7754, :c7755, :c7756, :c7757, :c7758, :c7759, :c7760, :c7761, :c7762, :c7763, :c7764, :c7765, :c7766, :c7767, :c7768, :c7769, :c7770, :c7771, :c7772, :c7773, :c7774, :c7775, :c7776, :c7777, :c7778, :c7779, :c7780, :c7781, :c7782, :c7783, :c7784, :c7785, :c7786, :c7787, :c7788, :c7789, :c7790, :c7791, :c7792, :c7793, :c7794, :c7795, :c7796, :c7797, :c7798, :c7799, :c7800, :c7801, :c7802, :c7803, :c7804, :c7805, :c7806, :c7807, :c7808, :c7809, :c7810, :c7811, :c7812, :c7813, :c7814, :c7815, :c7816, :c7817, :c7818, :c7819, :c7820, :c7821, :c7822, :c7823, :c7824, :c7825, :c7826, :c7827, :c7828, :c7829, :c7830, :c7831, :c7832, :c7833, :c7834, :c7835, :c7836, :c7837, :c7838, :c7839, :c7840, :c7841, :c7842, :c7843, :c7844, :c7845, :c7846, :c7847, :c7848, :c7849, :c7850, :c7851, :c7852, :c7853, :c7854, :c7855, :c7856, :c7857, :c7858, :c7859, :c7860, :c7861, :c7862, :c7863, :c7864, :c7865, :c7866, :c7867, :c7868, :c7869, :c7870, :c7871, :c7872, :c7873, :c7874, :c7875, :c7876, :c7877, :c7878, :c7879, :c7880, :c7881, :c7882, :c7883, :c7884, :c7885, :c7886, :c7887, :c7888, :c7889, :c7890, :c7891, :c7892, :c7893, :c7894, :c7895, :c7896, :c7897, :c7898, :c7899, :c7900, :c7901, :c7902, :c7903, :c7904, :c7905, :c7906, :c7907, :c7908, :c7909, :c7910, :c7911, :c7912, :c7913, :c7914, :c7915, :c7916, :c7917, :c7918, :c7919, :c7920, :c7921, :c7922, :c7923, :c7924, :c7925, :c7926, :c7927, :c7928, :c7929, :c7930, :c7931, :c7932, :c7933, :c7934, :c7935, :c7936, :c7937, :c7938, :c7939, :c7940, :c7941, :c7942, :c7943, :c7944, :c7945, :c7946, :c7947, :c7948, :c7949, :c7950, :c7951, :c7952, :c7953, :c7954, :c7955, :c7956, :c7957, :c7958, :c7959, :c7960, :c7961, :c7962, :c7963, :c7964, :c7965, :c7966, :c7967, :c7968, :c7969, :c7970, :c7971, :c7972, :c7973, :c7974, :c7975, :c7976, :c7977, :c7978, :c7979, :c7980, :c7981, :c7982, :c7983, :c7984, :c7985, :c7986, :c7987, :c7988, :c7989, :c7990, :c7991, :c7992, :c7993, :c7994, :c7995, :c7996, :c7997, :c7998, :c7999, :c8000, :c8001, :c8002, :c8003, :c8004, :c8005, :c8006, :c8007, :c8008, :c8009, :c8010, :c8011, :c8012, :c8013, :c8014, :c8015, :c8016, :c8017, :c8018, :c8019, :c8020, :c8021, :c8022, :c8023, :c8024, :c8025, :c8026, :c8027, :c8028, :c8029, :c8030, :c8031, :c8032, :c8033, :c8034, :c8035, :c8036, :c8037, :c8038, :c8039, :c8040, :c8041, :c8042, :c8043, :c8044, :c8045, :c8046, :c8047, :c8048, :c8049, :c8050, :c8051, :c8052, :c8053, :c8054, :c8055, :c8056, :c8057, :c8058, :c8059, :c8060, :c8061, :c8062, :c8063, :c8064, :c8065, :c8066, :c8067, :c8068, :c8069, :c8070, :c8071, :c8072, :c8073, :c8074, :c8075, :c8076, :c8077, :c8078, :c8079, :c8080, :c8081, :c8082, :c8083, :c8084, :c8085, :c8086, :c8087, :c8088, :c8089, :c8090, :c8091, :c8092, :c8093, :c8094, :c8095, :c8096, :c8097, :c8098, :c8099, :c8100, :c8101, :c8102, :c8103, :c8104, :c8105, :c8106, :c8107, :c8108, :c8109, :c8110, :c8111, :c8112, :c8113, :c8114, :c8115, :c8116, :c8117, :c8118, :c8119, :c8120, :c8121, :c8122, :c8123, :c8124, :c8125, :c8126, :c8127, :c8128, :c8129, :c8130, :c8131, :c8132, :c8133, :c8134, :c8135, :c8136, :c8137, :c8138, :c8139, :c8140, :c8141, :c8142, :c8143, :c8144, :c8145, :c8146, :c8147, :c8148, :c8149, :c8150, :c8151, :c8152, :c8153, :c8154, :c8155, :c8156, :c8157, :c8158, :c8159, :c8160, :c8161, :c8162, :c8163, :c8164, :c8165, :c8166, :c8167, :c8168, :c8169, :c8170, :c8171, :c8172, :c8173, :c8174, :c8175, :c8176, :c8177, :c8178, :c8179, :c8180, :c8181, :c8182, :c8183, :c8184, :c8185, :c8186, :c8187, :c8188, :c8189, :c8190, :c8191, :c8192, :c8193, :c8194, :c8195, :c8196, :c8197, :c8198, :c8199, :c8200, :c8201, :c8202, :c8203, :c8204, :c8205, :c8206, :c8207, :c8208, :c8209, :c8210, :c8211, :c8212, :c8213, :c8214, :c8215, :c8216, :c8217, :c8218, :c8219, :c8220, :c8221, :c8222, :c8223, :c8224, :c8225, :c8226, :c8227, :c8228, :c8229, :c8230, :c8231, :c8232, :c8233, :c8234, :c8235, :c8236, :c8237, :c8238, :c8239, :c8240, :c8241, :c8242, :c8243, :c8244, :c8245, :c8246, :c8247, :c8248, :c8249, :c8250, :c8251, :c8252, :c8253, :c8254, :c8255, :c8256, :c8257, :c8258, :c8259, :c8260, :c8261, :c8262, :c8263, :c8264, :c8265, :c8266, :c8267, :c8268, :c8269, :c8270, :c8271, :c8272, :c8273, :c8274, :c8275, :c8276, :c8277, :c8278, :c8279, :c8280, :c8281, :c8282, :c8283, :c8284, :c8285, :c8286, :c8287, :c8288, :c8289, :c8290, :c8291, :c8292, :c8293, :c8294, :c8295, :c8296, :c8297, :c8298, :c8299, :c8300, :c8301, :c8302, :c8303, :c8304, :c8305, :c8306, :c8307, :c8308, :c8309, :c8310, :c8311, :c8312, :c8313, :c8314, :c8315, :c8316, :c8317, :c8318, :c8319, :c8320, :c8321, :c8322, :c8323, :c8324, :c8325, :c8326, :c8327, :c8328, :c8329, :c8330, :c8331, :c8332, :c8333, :c8334, :c8335, :c8336, :c8337, :c8338, :c8339, :c8340, :c8341, :c8342, :c8343, :c8344, :c8345, :c8346, :c8347, :c8348, :c8349, :c8350, :c8351, :c8352, :c8353, :c8354, :c8355, :c8356, :c8357, :c8358, :c8359, :c8360, :c8361, :c8362, :c8363, :c8364, :c8365, :c8366, :c8367, :c8368, :c8369, :c8370, :c8371, :c8372, :c8373, :c8374, :c8375, :c8376, :c8377, :c8378, :c8379, :c8380, :c8381, :c8382, :c8383, :c8384, :c8385, :c8386, :c8387, :c8388, :c8389, :c8390, :c8391, :c8392, :c8393, :c8394, :c8395, :c8396, :c8397, :c8398, :c8399, :c8400, :c8401, :c8402, :c8403, :c8404, :c8405, :c8406, :c8407, :c8408, :c8409, :c8410, :c8411, :c8412, :c8413, :c8414, :c8415, :c8416, :c8417, :c8418, :c8419, :c8420, :c8421, :c8422, :c8423, :c8424, :c8425, :c8426, :c8427, :c8428, :c8429, :c8430, :c8431, :c8432, :c8433, :c8434, :c8435, :c8436, :c8437, :c8438, :c8439, :c8440, :c8441, :c8442, :c8443, :c8444, :c8445, :c8446, :c8447, :c8448, :c8449, :c8450, :c8451, :c8452, :c8453, :c8454, :c8455, :c8456, :c8457, :c8458, :c8459, :c8460, :c8461, :c8462, :c8463, :c8464, :c8465, :c8466, :c8467, :c8468, :c8469, :c8470, :c8471, :c8472, :c8473, :c8474, :c8475, :c8476, :c8477, :c8478, :c8479, :c8480, :c8481, :c8482, :c8483, :c8484, :c8485, :c8486, :c8487, :c8488, :c8489, :c8490, :c8491, :c8492, :c8493, :c8494, :c8495, :c8496, :c8497, :c8498, :c8499, :c8500, :c8501, :c8502, :c8503, :c8504, :c8505, :c8506, :c8507, :c8508, :c8509, :c8510, :c8511, :c8512, :c8513, :c8514, :c8515, :c8516, :c8517, :c8518, :c8519, :c8520, :c8521, :c8522, :c8523, :c8524, :c8525, :c8526, :c8527, :c8528, :c8529, :c8530, :c8531, :c8532, :c8533, :c8534, :c8535, :c8536, :c8537, :c8538, :c8539, :c8540, :c8541, :c8542, :c8543, :c8544, :c8545, :c8546, :c8547, :c8548, :c8549, :c8550, :c8551, :c8552, :c8553, :c8554, :c8555, :c8556, :c8557, :c8558, :c8559, :c8560, :c8561, :c8562, :c8563, :c8564, :c8565, :c8566, :c8567, :c8568, :c8569, :c8570, :c8571, :c8572, :c8573, :c8574, :c8575, :c8576, :c8577, :c8578, :c8579, :c8580, :c8581, :c8582, :c8583, :c8584, :c8585, :c8586, :c8587, :c8588, :c8589, :c8590, :c8591, :c8592, :c8593, :c8594, :c8595, :c8596, :c8597, :c8598, :c8599, :c8600, :c8601, :c8602, :c8603, :c8604, :c8605, :c8606, :c8607, :c8608, :c8609, :c8610, :c8611, :c8612, :c8613, :c8614, :c8615, :c8616, :c8617, :c8618, :c8619, :c8620, :c8621, :c8622, :c8623, :c8624, :c8625, :c8626, :c8627, :c8628, :c8629, :c8630, :c8631, :c8632, :c8633, :c8634, :c8635, :c8636, :c8637, :c8638, :c8639, :c8640, :c8641, :c8642, :c8643, :c8644, :c8645, :c8646, :c8647, :c8648, :c8649, :c8650, :c8651, :c8652, :c8653, :c8654, :c8655, :c8656, :c8657, :c8658, :c8659, :c8660, :c8661, :c8662, :c8663, :c8664, :c8665, :c8666, :c8667, :c8668, :c8669, :c8670, :c8671, :c8672, :c8673, :c8674, :c8675, :c8676, :c8677, :c8678, :c8679, :c8680, :c8681, :c8682, :c8683, :c8684, :c8685, :c8686, :c8687, :c8688, :c8689, :c8690, :c8691, :c8692, :c8693, :c8694, :c8695, :c8696, :c8697, :c8698, :c8699, :c8700, :c8701, :c8702, :c8703, :c8704, :c8705, :c8706, :c8707, :c8708, :c8709, :c8710, :c8711, :c8712, :c8713, :c8714, :c8715, :c8716, :c8717, :c8718, :c8719, :c8720, :c8721, :c8722, :c8723, :c8724, :c8725, :c8726, :c8727, :c8728, :c8729, :c8730, :c8731, :c8732, :c8733, :c8734, :c8735, :c8736, :c8737, :c8738, :c8739, :c8740, :c8741, :c8742, :c8743, :c8744, :c8745, :c8746, :c8747, :c8748, :c8749, :c8750, :c8751, :c8752, :c8753, :c8754, :c8755, :c8756, :c8757, :c8758, :c8759, :c8760, :c8761, :c8762, :c8763, :c8764, :c8765, :c8766, :c8767, :c8768, :c8769, :c8770, :c8771, :c8772, :c8773, :c8774, :c8775, :c8776, :c8777, :c8778, :c8779, :c8780, :c8781, :c8782, :c8783, :c8784, :c8785, :c8786, :c8787, :c8788, :c8789, :c8790, :c8791, :c8792, :c8793, :c8794, :c8795, :c8796, :c8797, :c8798, :c8799, :c8800, :c8801, :c8802, :c8803, :c8804, :c8805, :c8806, :c8807, :c8808, :c8809, :c8810, :c8811, :c8812, :c8813, :c8814, :c8815, :c8816, :c8817, :c8818, :c8819, :c8820, :c8821, :c8822, :c8823, :c8824, :c8825, :c8826, :c8827, :c8828, :c8829, :c8830, :c8831, :c8832, :c8833, :c8834, :c8835, :c8836, :c8837, :c8838, :c8839, :c8840, :c8841, :c8842, :c8843, :c8844, :c8845, :c8846, :c8847, :c8848, :c8849, :c8850, :c8851, :c8852, :c8853, :c8854, :c8855, :c8856, :c8857, :c8858, :c8859, :c8860, :c8861, :c8862, :c8863, :c8864, :c8865, :c8866, :c8867, :c8868, :c8869, :c8870, :c8871, :c8872, :c8873, :c8874, :c8875, :c8876, :c8877, :c8878, :c8879, :c8880, :c8881, :c8882, :c8883, :c8884, :c8885, :c8886, :c8887, :c8888, :c8889, :c8890, :c8891, :c8892, :c8893, :c8894, :c8895, :c8896, :c8897, :c8898, :c8899, :c8900, :c8901, :c8902, :c8903, :c8904, :c8905, :c8906, :c8907, :c8908, :c8909, :c8910, :c8911, :c8912, :c8913, :c8914, :c8915, :c8916, :c8917, :c8918, :c8919, :c8920, :c8921, :c8922, :c8923, :c8924, :c8925, :c8926, :c8927, :c8928, :c8929, :c8930, :c8931, :c8932, :c8933, :c8934, :c8935, :c8936, :c8937, :c8938, :c8939, :c8940, :c8941, :c8942, :c8943, :c8944, :c8945, :c8946, :c8947, :c8948, :c8949, :c8950, :c8951, :c8952, :c8953, :c8954, :c8955, :c8956, :c8957, :c8958, :c8959, :c8960, :c8961, :c8962, :c8963, :c8964, :c8965, :c8966, :c8967, :c8968, :c8969, :c8970, :c8971, :c8972, :c8973, :c8974, :c8975, :c8976, :c8977, :c8978, :c8979, :c8980, :c8981, :c8982, :c8983, :c8984, :c8985, :c8986, :c8987, :c8988, :c8989, :c8990, :c8991, :c8992, :c8993, :c8994, :c8995, :c8996, :c8997, :c8998, :c8999, :c9000, :c9001, :c9002, :c9003, :c9004, :c9005, :c9006, :c9007, :c9008, :c9009, :c9010, :c9011, :c9012, :c9013, :c9014, :c9015, :c9016, :c9017, :c9018, :c9019, :c9020, :c9021, :c9022, :c9023, :c9024, :c9025, :c9026, :c9027, :c9028, :c9029, :c9030, :c9031, :c9032, :c9033, :c9034, :c9035, :c9036, :c9037, :c9038, :c9039, :c9040, :c9041, :c9042, :c9043, :c9044, :c9045, :c9046, :c9047, :c9048, :c9049, :c9050, :c9051, :c9052, :c9053, :c9054, :c9055, :c9056, :c9057, :c9058, :c9059, :c9060, :c9061, :c9062, :c9063, :c9064, :c9065, :c9066, :c9067, :c9068, :c9069, :c9070, :c9071, :c9072, :c9073, :c9074, :c9075, :c9076, :c9077, :c9078, :c9079, :c9080, :c9081, :c9082, :c9083, :c9084, :c9085, :c9086, :c9087, :c9088, :c9089, :c9090, :c9091, :c9092, :c9093, :c9094, :c9095, :c9096, :c9097, :c9098, :c9099, :c9100, :c9101, :c9102, :c9103, :c9104, :c9105, :c9106, :c9107, :c9108, :c9109, :c9110, :c9111, :c9112, :c9113, :c9114, :c9115, :c9116, :c9117, :c9118, :c9119, :c9120, :c9121, :c9122, :c9123, :c9124, :c9125, :c9126, :c9127, :c9128, :c9129, :c9130, :c9131, :c9132, :c9133, :c9134, :c9135, :c9136, :c9137, :c9138, :c9139, :c9140, :c9141, :c9142, :c9143, :c9144, :c9145, :c9146, :c9147, :c9148, :c9149, :c9150, :c9151, :c9152, :c9153, :c9154, :c9155, :c9156, :c9157, :c9158, :c9159, :c9160, :c9161, :c9162, :c9163, :c9164, :c9165, :c9166, :c9167, :c9168, :c9169, :c9170, :c9171, :c9172, :c9173, :c9174, :c9175, :c9176, :c9177, :c9178, :c9179, :c9180, :c9181, :c9182, :c9183, :c9184, :c9185, :c9186, :c9187, :c9188, :c9189, :c9190, :c9191, :c9192, :c9193, :c9194, :c9195, :c9196, :c9197, :c9198, :c9199, :c9200, :c9201, :c9202, :c9203, :c9204, :c9205, :c9206, :c9207, :c9208, :c9209, :c9210, :c9211, :c9212, :c9213, :c9214, :c9215, :c9216, :c9217, :c9218, :c9219, :c9220, :c9221, :c9222, :c9223, :c9224, :c9225, :c9226, :c9227, :c9228, :c9229, :c9230, :c9231, :c9232, :c9233, :c9234, :c9235, :c9236, :c9237, :c9238, :c9239, :c9240, :c9241, :c9242, :c9243, :c9244, :c9245, :c9246, :c9247, :c9248, :c9249, :c9250, :c9251, :c9252, :c9253, :c9254, :c9255, :c9256, :c9257, :c9258, :c9259, :c9260, :c9261, :c9262, :c9263, :c9264, :c9265, :c9266, :c9267, :c9268, :c9269, :c9270, :c9271, :c9272, :c9273, :c9274, :c9275, :c9276, :c9277, :c9278, :c9279, :c9280, :c9281, :c9282, :c9283, :c9284, :c9285, :c9286, :c9287, :c9288, :c9289, :c9290, :c9291, :c9292, :c9293, :c9294, :c9295, :c9296, :c9297, :c9298, :c9299, :c9300, :c9301, :c9302, :c9303, :c9304, :c9305, :c9306, :c9307, :c9308, :c9309, :c9310, :c9311, :c9312, :c9313, :c9314, :c9315, :c9316, :c9317, :c9318, :c9319, :c9320, :c9321, :c9322, :c9323, :c9324, :c9325, :c9326, :c9327, :c9328, :c9329, :c9330, :c9331, :c9332, :c9333, :c9334, :c9335, :c9336, :c9337, :c9338, :c9339, :c9340, :c9341, :c9342, :c9343, :c9344, :c9345, :c9346, :c9347, :c9348, :c9349, :c9350, :c9351, :c9352, :c9353, :c9354, :c9355, :c9356, :c9357, :c9358, :c9359, :c9360, :c9361, :c9362, :c9363, :c9364, :c9365, :c9366, :c9367, :c9368, :c9369, :c9370, :c9371, :c9372, :c9373, :c9374, :c9375, :c9376, :c9377, :c9378, :c9379, :c9380, :c9381, :c9382, :c9383, :c9384, :c9385, :c9386, :c9387, :c9388, :c9389, :c9390, :c9391, :c9392, :c9393, :c9394, :c9395, :c9396, :c9397, :c9398, :c9399, :c9400, :c9401, :c9402, :c9403, :c9404, :c9405, :c9406, :c9407, :c9408, :c9409, :c9410, :c9411, :c9412, :c9413, :c9414, :c9415, :c9416, :c9417, :c9418, :c9419, :c9420, :c9421, :c9422, :c9423, :c9424, :c9425, :c9426, :c9427, :c9428, :c9429, :c9430, :c9431, :c9432, :c9433, :c9434, :c9435, :c9436, :c9437, :c9438, :c9439, :c9440, :c9441, :c9442, :c9443, :c9444, :c9445, :c9446, :c9447, :c9448, :c9449, :c9450, :c9451, :c9452, :c9453, :c9454, :c9455, :c9456, :c9457, :c9458, :c9459, :c9460, :c9461, :c9462, :c9463, :c9464, :c9465, :c9466, :c9467, :c9468, :c9469, :c9470, :c9471, :c9472, :c9473, :c9474, :c9475, :c9476, :c9477, :c9478, :c9479, :c9480, :c9481, :c9482, :c9483, :c9484, :c9485, :c9486, :c9487, :c9488, :c9489, :c9490, :c9491, :c9492, :c9493, :c9494, :c9495, :c9496, :c9497, :c9498, :c9499, :c9500, :c9501, :c9502, :c9503, :c9504, :c9505, :c9506, :c9507, :c9508, :c9509, :c9510, :c9511, :c9512, :c9513, :c9514, :c9515, :c9516, :c9517, :c9518, :c9519, :c9520, :c9521, :c9522, :c9523, :c9524, :c9525, :c9526, :c9527, :c9528, :c9529, :c9530, :c9531, :c9532, :c9533, :c9534, :c9535, :c9536, :c9537, :c9538, :c9539, :c9540, :c9541, :c9542, :c9543, :c9544, :c9545, :c9546, :c9547, :c9548, :c9549, :c9550, :c9551, :c9552, :c9553, :c9554, :c9555, :c9556, :c9557, :c9558, :c9559, :c9560, :c9561, :c9562, :c9563, :c9564, :c9565, :c9566, :c9567, :c9568, :c9569, :c9570, :c9571, :c9572, :c9573, :c9574, :c9575, :c9576, :c9577, :c9578, :c9579, :c9580, :c9581, :c9582, :c9583, :c9584, :c9585, :c9586, :c9587, :c9588, :c9589, :c9590, :c9591, :c9592, :c9593, :c9594, :c9595, :c9596, :c9597, :c9598, :c9599, :c9600, :c9601, :c9602, :c9603, :c9604, :c9605, :c9606, :c9607, :c9608, :c9609, :c9610, :c9611, :c9612, :c9613, :c9614, :c9615, :c9616, :c9617, :c9618, :c9619, :c9620, :c9621, :c9622, :c9623, :c9624, :c9625, :c9626, :c9627, :c9628, :c9629, :c9630, :c9631, :c9632, :c9633, :c9634, :c9635, :c9636, :c9637, :c9638, :c9639, :c9640, :c9641, :c9642, :c9643, :c9644, :c9645, :c9646, :c9647, :c9648, :c9649, :c9650, :c9651, :c9652, :c9653, :c9654, :c9655, :c9656, :c9657, :c9658, :c9659, :c9660, :c9661, :c9662, :c9663, :c9664, :c9665, :c9666, :c9667, :c9668, :c9669, :c9670, :c9671, :c9672, :c9673, :c9674, :c9675, :c9676, :c9677, :c9678, :c9679, :c9680, :c9681, :c9682, :c9683, :c9684, :c9685, :c9686, :c9687, :c9688, :c9689, :c9690, :c9691, :c9692, :c9693, :c9694, :c9695, :c9696, :c9697, :c9698, :c9699, :c9700, :c9701, :c9702, :c9703, :c9704, :c9705, :c9706, :c9707, :c9708, :c9709, :c9710, :c9711, :c9712, :c9713, :c9714, :c9715, :c9716, :c9717, :c9718, :c9719, :c9720, :c9721, :c9722, :c9723, :c9724, :c9725, :c9726, :c9727, :c9728, :c9729, :c9730, :c9731, :c9732, :c9733, :c9734, :c9735, :c9736, :c9737, :c9738, :c9739, :c9740, :c9741, :c9742, :c9743, :c9744, :c9745, :c9746, :c9747, :c9748, :c9749, :c9750, :c9751, :c9752, :c9753, :c9754, :c9755, :c9756, :c9757, :c9758, :c9759, :c9760, :c9761, :c9762, :c9763, :c9764, :c9765, :c9766, :c9767, :c9768, :c9769, :c9770, :c9771, :c9772, :c9773, :c9774, :c9775, :c9776, :c9777, :c9778, :c9779, :c9780, :c9781, :c9782, :c9783, :c9784, :c9785, :c9786, :c9787, :c9788, :c9789, :c9790, :c9791, :c9792, :c9793, :c9794, :c9795, :c9796, :c9797, :c9798, :c9799, :c9800, :c9801, :c9802, :c9803, :c9804, :c9805, :c9806, :c9807, :c9808, :c9809, :c9810, :c9811, :c9812, :c9813, :c9814, :c9815, :c9816, :c9817, :c9818, :c9819, :c9820, :c9821, :c9822, :c9823, :c9824, :c9825, :c9826, :c9827, :c9828, :c9829, :c9830, :c9831, :c9832, :c9833, :c9834, :c9835, :c9836, :c9837, :c9838, :c9839, :c9840, :c9841, :c9842, :c9843, :c9844, :c9845, :c9846, :c9847, :c9848, :c9849, :c9850, :c9851, :c9852, :c9853, :c9854, :c9855, :c9856, :c9857, :c9858, :c9859, :c9860, :c9861, :c9862, :c9863, :c9864, :c9865, :c9866, :c9867, :c9868, :c9869, :c9870, :c9871, :c9872, :c9873, :c9874, :c9875, :c9876, :c9877, :c9878, :c9879, :c9880, :c9881, :c9882, :c9883, :c9884, :c9885, :c9886, :c9887, :c9888, :c9889, :c9890, :c9891, :c9892, :c9893, :c9894, :c9895, :c9896, :c9897, :c9898, :c9899, :c9900, :c9901, :c9902, :c9903, :c9904, :c9905, :c9906, :c9907, :c9908, :c9909, :c9910, :c9911, :c9912, :c9913, :c9914, :c9915, :c9916, :c9917, :c9918, :c9919, :c9920, :c9921, :c9922, :c9923, :c9924, :c9925, :c9926, :c9927, :c9928, :c9929, :c9930, :c9931, :c9932, :c9933, :c9934, :c9935, :c9936, :c9937, :c9938, :c9939, :c9940, :c9941, :c9942, :c9943, :c9944, :c9945, :c9946, :c9947, :c9948, :c9949, :c9950, :c9951, :c9952, :c9953, :c9954, :c9955, :c9956, :c9957, :c9958, :c9959, :c9960, :c9961, :c9962, :c9963, :c9964, :c9965, :c9966, :c9967, :c9968, :c9969, :c9970, :c9971, :c9972, :c9973, :c9974, :c9975, :c9976, :c9977, :c9978, :c9979, :c9980, :c9981, :c9982, :c9983, :c9984, :c9985, :c9986, :c9987, :c9988, :c9989, :c9990, :c9991, :c9992, :c9993, :c9994, :c9995, :c9996, :c9997, :c9998, :c9999, :c10000 . raptor-1.4.21/tests/turtle/test-16.out0000644000175000017500000314635610674751730014500 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . raptor-1.4.21/tests/turtle/test-16.ttl0000644000175000017500000041737110674751730014467 00000000000000# 10000 items (10000 triples) more than the default Bison stack size @prefix : . :a :b :c1; :b :c2; :b :c3; :b :c4; :b :c5; :b :c6; :b :c7; :b :c8; :b :c9; :b :c10; :b :c11; :b :c12; :b :c13; :b :c14; :b :c15; :b :c16; :b :c17; :b :c18; :b :c19; :b :c20; :b :c21; :b :c22; :b :c23; :b :c24; :b :c25; :b :c26; :b :c27; :b :c28; :b :c29; :b :c30; :b :c31; :b :c32; :b :c33; :b :c34; :b :c35; :b :c36; :b :c37; :b :c38; :b :c39; :b :c40; :b :c41; :b :c42; :b :c43; :b :c44; :b :c45; :b :c46; :b :c47; :b :c48; :b :c49; :b :c50; :b :c51; :b :c52; :b :c53; :b :c54; :b :c55; :b :c56; :b :c57; :b :c58; :b :c59; :b :c60; :b :c61; :b :c62; :b :c63; :b :c64; :b :c65; :b :c66; :b :c67; :b :c68; :b :c69; :b :c70; :b :c71; :b :c72; :b :c73; :b :c74; :b :c75; :b :c76; :b :c77; :b :c78; :b :c79; :b :c80; :b :c81; :b :c82; :b :c83; :b :c84; :b :c85; :b :c86; :b :c87; :b :c88; :b :c89; :b :c90; :b :c91; :b :c92; :b :c93; :b :c94; :b :c95; :b :c96; :b :c97; :b :c98; :b :c99; :b :c100; :b :c101; :b :c102; :b :c103; :b :c104; :b :c105; :b :c106; :b :c107; :b :c108; :b :c109; :b :c110; :b :c111; :b :c112; :b :c113; :b :c114; :b :c115; :b :c116; :b :c117; :b :c118; :b :c119; :b :c120; :b :c121; :b :c122; :b :c123; :b :c124; :b :c125; :b :c126; :b :c127; :b :c128; :b :c129; :b :c130; :b :c131; :b :c132; :b :c133; :b :c134; :b :c135; :b :c136; :b :c137; :b :c138; :b :c139; :b :c140; :b :c141; :b :c142; :b :c143; :b :c144; :b :c145; :b :c146; :b :c147; :b :c148; :b :c149; :b :c150; :b :c151; :b :c152; :b :c153; :b :c154; :b :c155; :b :c156; :b :c157; :b :c158; :b :c159; :b :c160; :b :c161; :b :c162; :b :c163; :b :c164; :b :c165; :b :c166; :b :c167; :b :c168; :b :c169; :b :c170; :b :c171; :b :c172; :b :c173; :b :c174; :b :c175; :b :c176; :b :c177; :b :c178; :b :c179; :b :c180; :b :c181; :b :c182; :b :c183; :b :c184; :b :c185; :b :c186; :b :c187; :b :c188; :b :c189; :b :c190; :b :c191; :b :c192; :b :c193; :b :c194; :b :c195; :b :c196; :b :c197; :b :c198; :b :c199; :b :c200; :b :c201; :b :c202; :b :c203; :b :c204; :b :c205; :b :c206; :b :c207; :b :c208; :b :c209; :b :c210; :b :c211; :b :c212; :b :c213; :b :c214; :b :c215; :b :c216; :b :c217; :b :c218; :b :c219; :b :c220; :b :c221; :b :c222; :b :c223; :b :c224; :b :c225; :b :c226; :b :c227; :b :c228; :b :c229; :b :c230; :b :c231; :b :c232; :b :c233; :b :c234; :b :c235; :b :c236; :b :c237; :b :c238; :b :c239; :b :c240; :b :c241; :b :c242; :b :c243; :b :c244; :b :c245; :b :c246; :b :c247; :b :c248; :b :c249; :b :c250; :b :c251; :b :c252; :b :c253; :b :c254; :b :c255; :b :c256; :b :c257; :b :c258; :b :c259; :b :c260; :b :c261; :b :c262; :b :c263; :b :c264; :b :c265; :b :c266; :b :c267; :b :c268; :b :c269; :b :c270; :b :c271; :b :c272; :b :c273; :b :c274; :b :c275; :b :c276; :b :c277; :b :c278; :b :c279; :b :c280; :b :c281; :b :c282; :b :c283; :b :c284; :b :c285; :b :c286; :b :c287; :b :c288; :b :c289; :b :c290; :b :c291; :b :c292; :b :c293; :b :c294; :b :c295; :b :c296; :b :c297; :b :c298; :b :c299; :b :c300; :b :c301; :b :c302; :b :c303; :b :c304; :b :c305; :b :c306; :b :c307; :b :c308; :b :c309; :b :c310; :b :c311; :b :c312; :b :c313; :b :c314; :b :c315; :b :c316; :b :c317; :b :c318; :b :c319; :b :c320; :b :c321; :b :c322; :b :c323; :b :c324; :b :c325; :b :c326; :b :c327; :b :c328; :b :c329; :b :c330; :b :c331; :b :c332; :b :c333; :b :c334; :b :c335; :b :c336; :b :c337; :b :c338; :b :c339; :b :c340; :b :c341; :b :c342; :b :c343; :b :c344; :b :c345; :b :c346; :b :c347; :b :c348; :b :c349; :b :c350; :b :c351; :b :c352; :b :c353; :b :c354; :b :c355; :b :c356; :b :c357; :b :c358; :b :c359; :b :c360; :b :c361; :b :c362; :b :c363; :b :c364; :b :c365; :b :c366; :b :c367; :b :c368; :b :c369; :b :c370; :b :c371; :b :c372; :b :c373; :b :c374; :b :c375; :b :c376; :b :c377; :b :c378; :b :c379; :b :c380; :b :c381; :b :c382; :b :c383; :b :c384; :b :c385; :b :c386; :b :c387; :b :c388; :b :c389; :b :c390; :b :c391; :b :c392; :b :c393; :b :c394; :b :c395; :b :c396; :b :c397; :b :c398; :b :c399; :b :c400; :b :c401; :b :c402; :b :c403; :b :c404; :b :c405; :b :c406; :b :c407; :b :c408; :b :c409; :b :c410; :b :c411; :b :c412; :b :c413; :b :c414; :b :c415; :b :c416; :b :c417; :b :c418; :b :c419; :b :c420; :b :c421; :b :c422; :b :c423; :b :c424; :b :c425; :b :c426; :b :c427; :b :c428; :b :c429; :b :c430; :b :c431; :b :c432; :b :c433; :b :c434; :b :c435; :b :c436; :b :c437; :b :c438; :b :c439; :b :c440; :b :c441; :b :c442; :b :c443; :b :c444; :b :c445; :b :c446; :b :c447; :b :c448; :b :c449; :b :c450; :b :c451; :b :c452; :b :c453; :b :c454; :b :c455; :b :c456; :b :c457; :b :c458; :b :c459; :b :c460; :b :c461; :b :c462; :b :c463; :b :c464; :b :c465; :b :c466; :b :c467; :b :c468; :b :c469; :b :c470; :b :c471; :b :c472; :b :c473; :b :c474; :b :c475; :b :c476; :b :c477; :b :c478; :b :c479; :b :c480; :b :c481; :b :c482; :b :c483; :b :c484; :b :c485; :b :c486; :b :c487; :b :c488; :b :c489; :b :c490; :b :c491; :b :c492; :b :c493; :b :c494; :b :c495; :b :c496; :b :c497; :b :c498; :b :c499; :b :c500; :b :c501; :b :c502; :b :c503; :b :c504; :b :c505; :b :c506; :b :c507; :b :c508; :b :c509; :b :c510; :b :c511; :b :c512; :b :c513; :b :c514; :b :c515; :b :c516; :b :c517; :b :c518; :b :c519; :b :c520; :b :c521; :b :c522; :b :c523; :b :c524; :b :c525; :b :c526; :b :c527; :b :c528; :b :c529; :b :c530; :b :c531; :b :c532; :b :c533; :b :c534; :b :c535; :b :c536; :b :c537; :b :c538; :b :c539; :b :c540; :b :c541; :b :c542; :b :c543; :b :c544; :b :c545; :b :c546; :b :c547; :b :c548; :b :c549; :b :c550; :b :c551; :b :c552; :b :c553; :b :c554; :b :c555; :b :c556; :b :c557; :b :c558; :b :c559; :b :c560; :b :c561; :b :c562; :b :c563; :b :c564; :b :c565; :b :c566; :b :c567; :b :c568; :b :c569; :b :c570; :b :c571; :b :c572; :b :c573; :b :c574; :b :c575; :b :c576; :b :c577; :b :c578; :b :c579; :b :c580; :b :c581; :b :c582; :b :c583; :b :c584; :b :c585; :b :c586; :b :c587; :b :c588; :b :c589; :b :c590; :b :c591; :b :c592; :b :c593; :b :c594; :b :c595; :b :c596; :b :c597; :b :c598; :b :c599; :b :c600; :b :c601; :b :c602; :b :c603; :b :c604; :b :c605; :b :c606; :b :c607; :b :c608; :b :c609; :b :c610; :b :c611; :b :c612; :b :c613; :b :c614; :b :c615; :b :c616; :b :c617; :b :c618; :b :c619; :b :c620; :b :c621; :b :c622; :b :c623; :b :c624; :b :c625; :b :c626; :b :c627; :b :c628; :b :c629; :b :c630; :b :c631; :b :c632; :b :c633; :b :c634; :b :c635; :b :c636; :b :c637; :b :c638; :b :c639; :b :c640; :b :c641; :b :c642; :b :c643; :b :c644; :b :c645; :b :c646; :b :c647; :b :c648; :b :c649; :b :c650; :b :c651; :b :c652; :b :c653; :b :c654; :b :c655; :b :c656; :b :c657; :b :c658; :b :c659; :b :c660; :b :c661; :b :c662; :b :c663; :b :c664; :b :c665; :b :c666; :b :c667; :b :c668; :b :c669; :b :c670; :b :c671; :b :c672; :b :c673; :b :c674; :b :c675; :b :c676; :b :c677; :b :c678; :b :c679; :b :c680; :b :c681; :b :c682; :b :c683; :b :c684; :b :c685; :b :c686; :b :c687; :b :c688; :b :c689; :b :c690; :b :c691; :b :c692; :b :c693; :b :c694; :b :c695; :b :c696; :b :c697; :b :c698; :b :c699; :b :c700; :b :c701; :b :c702; :b :c703; :b :c704; :b :c705; :b :c706; :b :c707; :b :c708; :b :c709; :b :c710; :b :c711; :b :c712; :b :c713; :b :c714; :b :c715; :b :c716; :b :c717; :b :c718; :b :c719; :b :c720; :b :c721; :b :c722; :b :c723; :b :c724; :b :c725; :b :c726; :b :c727; :b :c728; :b :c729; :b :c730; :b :c731; :b :c732; :b :c733; :b :c734; :b :c735; :b :c736; :b :c737; :b :c738; :b :c739; :b :c740; :b :c741; :b :c742; :b :c743; :b :c744; :b :c745; :b :c746; :b :c747; :b :c748; :b :c749; :b :c750; :b :c751; :b :c752; :b :c753; :b :c754; :b :c755; :b :c756; :b :c757; :b :c758; :b :c759; :b :c760; :b :c761; :b :c762; :b :c763; :b :c764; :b :c765; :b :c766; :b :c767; :b :c768; :b :c769; :b :c770; :b :c771; :b :c772; :b :c773; :b :c774; :b :c775; :b :c776; :b :c777; :b :c778; :b :c779; :b :c780; :b :c781; :b :c782; :b :c783; :b :c784; :b :c785; :b :c786; :b :c787; :b :c788; :b :c789; :b :c790; :b :c791; :b :c792; :b :c793; :b :c794; :b :c795; :b :c796; :b :c797; :b :c798; :b :c799; :b :c800; :b :c801; :b :c802; :b :c803; :b :c804; :b :c805; :b :c806; :b :c807; :b :c808; :b :c809; :b :c810; :b :c811; :b :c812; :b :c813; :b :c814; :b :c815; :b :c816; :b :c817; :b :c818; :b :c819; :b :c820; :b :c821; :b :c822; :b :c823; :b :c824; :b :c825; :b :c826; :b :c827; :b :c828; :b :c829; :b :c830; :b :c831; :b :c832; :b :c833; :b :c834; :b :c835; :b :c836; :b :c837; :b :c838; :b :c839; :b :c840; :b :c841; :b :c842; :b :c843; :b :c844; :b :c845; :b :c846; :b :c847; :b :c848; :b :c849; :b :c850; :b :c851; :b :c852; :b :c853; :b :c854; :b :c855; :b :c856; :b :c857; :b :c858; :b :c859; :b :c860; :b :c861; :b :c862; :b :c863; :b :c864; :b :c865; :b :c866; :b :c867; :b :c868; :b :c869; :b :c870; :b :c871; :b :c872; :b :c873; :b :c874; :b :c875; :b :c876; :b :c877; :b :c878; :b :c879; :b :c880; :b :c881; :b :c882; :b :c883; :b :c884; :b :c885; :b :c886; :b :c887; :b :c888; :b :c889; :b :c890; :b :c891; :b :c892; :b :c893; :b :c894; :b :c895; :b :c896; :b :c897; :b :c898; :b :c899; :b :c900; :b :c901; :b :c902; :b :c903; :b :c904; :b :c905; :b :c906; :b :c907; :b :c908; :b :c909; :b :c910; :b :c911; :b :c912; :b :c913; :b :c914; :b :c915; :b :c916; :b :c917; :b :c918; :b :c919; :b :c920; :b :c921; :b :c922; :b :c923; :b :c924; :b :c925; :b :c926; :b :c927; :b :c928; :b :c929; :b :c930; :b :c931; :b :c932; :b :c933; :b :c934; :b :c935; :b :c936; :b :c937; :b :c938; :b :c939; :b :c940; :b :c941; :b :c942; :b :c943; :b :c944; :b :c945; :b :c946; :b :c947; :b :c948; :b :c949; :b :c950; :b :c951; :b :c952; :b :c953; :b :c954; :b :c955; :b :c956; :b :c957; :b :c958; :b :c959; :b :c960; :b :c961; :b :c962; :b :c963; :b :c964; :b :c965; :b :c966; :b :c967; :b :c968; :b :c969; :b :c970; :b :c971; :b :c972; :b :c973; :b :c974; :b :c975; :b :c976; :b :c977; :b :c978; :b :c979; :b :c980; :b :c981; :b :c982; :b :c983; :b :c984; :b :c985; :b :c986; :b :c987; :b :c988; :b :c989; :b :c990; :b :c991; :b :c992; :b :c993; :b :c994; :b :c995; :b :c996; :b :c997; :b :c998; :b :c999; :b :c1000; :b :c1001; :b :c1002; :b :c1003; :b :c1004; :b :c1005; :b :c1006; :b :c1007; :b :c1008; :b :c1009; :b :c1010; :b :c1011; :b :c1012; :b :c1013; :b :c1014; :b :c1015; :b :c1016; :b :c1017; :b :c1018; :b :c1019; :b :c1020; :b :c1021; :b :c1022; :b :c1023; :b :c1024; :b :c1025; :b :c1026; :b :c1027; :b :c1028; :b :c1029; :b :c1030; :b :c1031; :b :c1032; :b :c1033; :b :c1034; :b :c1035; :b :c1036; :b :c1037; :b :c1038; :b :c1039; :b :c1040; :b :c1041; :b :c1042; :b :c1043; :b :c1044; :b :c1045; :b :c1046; :b :c1047; :b :c1048; :b :c1049; :b :c1050; :b :c1051; :b :c1052; :b :c1053; :b :c1054; :b :c1055; :b :c1056; :b :c1057; :b :c1058; :b :c1059; :b :c1060; :b :c1061; :b :c1062; :b :c1063; :b :c1064; :b :c1065; :b :c1066; :b :c1067; :b :c1068; :b :c1069; :b :c1070; :b :c1071; :b :c1072; :b :c1073; :b :c1074; :b :c1075; :b :c1076; :b :c1077; :b :c1078; :b :c1079; :b :c1080; :b :c1081; :b :c1082; :b :c1083; :b :c1084; :b :c1085; :b :c1086; :b :c1087; :b :c1088; :b :c1089; :b :c1090; :b :c1091; :b :c1092; :b :c1093; :b :c1094; :b :c1095; :b :c1096; :b :c1097; :b :c1098; :b :c1099; :b :c1100; :b :c1101; :b :c1102; :b :c1103; :b :c1104; :b :c1105; :b :c1106; :b :c1107; :b :c1108; :b :c1109; :b :c1110; :b :c1111; :b :c1112; :b :c1113; :b :c1114; :b :c1115; :b :c1116; :b :c1117; :b :c1118; :b :c1119; :b :c1120; :b :c1121; :b :c1122; :b :c1123; :b :c1124; :b :c1125; :b :c1126; :b :c1127; :b :c1128; :b :c1129; :b :c1130; :b :c1131; :b :c1132; :b :c1133; :b :c1134; :b :c1135; :b :c1136; :b :c1137; :b :c1138; :b :c1139; :b :c1140; :b :c1141; :b :c1142; :b :c1143; :b :c1144; :b :c1145; :b :c1146; :b :c1147; :b :c1148; :b :c1149; :b :c1150; :b :c1151; :b :c1152; :b :c1153; :b :c1154; :b :c1155; :b :c1156; :b :c1157; :b :c1158; :b :c1159; :b :c1160; :b :c1161; :b :c1162; :b :c1163; :b :c1164; :b :c1165; :b :c1166; :b :c1167; :b :c1168; :b :c1169; :b :c1170; :b :c1171; :b :c1172; :b :c1173; :b :c1174; :b :c1175; :b :c1176; :b :c1177; :b :c1178; :b :c1179; :b :c1180; :b :c1181; :b :c1182; :b :c1183; :b :c1184; :b :c1185; :b :c1186; :b :c1187; :b :c1188; :b :c1189; :b :c1190; :b :c1191; :b :c1192; :b :c1193; :b :c1194; :b :c1195; :b :c1196; :b :c1197; :b :c1198; :b :c1199; :b :c1200; :b :c1201; :b :c1202; :b :c1203; :b :c1204; :b :c1205; :b :c1206; :b :c1207; :b :c1208; :b :c1209; :b :c1210; :b :c1211; :b :c1212; :b :c1213; :b :c1214; :b :c1215; :b :c1216; :b :c1217; :b :c1218; :b :c1219; :b :c1220; :b :c1221; :b :c1222; :b :c1223; :b :c1224; :b :c1225; :b :c1226; :b :c1227; :b :c1228; :b :c1229; :b :c1230; :b :c1231; :b :c1232; :b :c1233; :b :c1234; :b :c1235; :b :c1236; :b :c1237; :b :c1238; :b :c1239; :b :c1240; :b :c1241; :b :c1242; :b :c1243; :b :c1244; :b :c1245; :b :c1246; :b :c1247; :b :c1248; :b :c1249; :b :c1250; :b :c1251; :b :c1252; :b :c1253; :b :c1254; :b :c1255; :b :c1256; :b :c1257; :b :c1258; :b :c1259; :b :c1260; :b :c1261; :b :c1262; :b :c1263; :b :c1264; :b :c1265; :b :c1266; :b :c1267; :b :c1268; :b :c1269; :b :c1270; :b :c1271; :b :c1272; :b :c1273; :b :c1274; :b :c1275; :b :c1276; :b :c1277; :b :c1278; :b :c1279; :b :c1280; :b :c1281; :b :c1282; :b :c1283; :b :c1284; :b :c1285; :b :c1286; :b :c1287; :b :c1288; :b :c1289; :b :c1290; :b :c1291; :b :c1292; :b :c1293; :b :c1294; :b :c1295; :b :c1296; :b :c1297; :b :c1298; :b :c1299; :b :c1300; :b :c1301; :b :c1302; :b :c1303; :b :c1304; :b :c1305; :b :c1306; :b :c1307; :b :c1308; :b :c1309; :b :c1310; :b :c1311; :b :c1312; :b :c1313; :b :c1314; :b :c1315; :b :c1316; :b :c1317; :b :c1318; :b :c1319; :b :c1320; :b :c1321; :b :c1322; :b :c1323; :b :c1324; :b :c1325; :b :c1326; :b :c1327; :b :c1328; :b :c1329; :b :c1330; :b :c1331; :b :c1332; :b :c1333; :b :c1334; :b :c1335; :b :c1336; :b :c1337; :b :c1338; :b :c1339; :b :c1340; :b :c1341; :b :c1342; :b :c1343; :b :c1344; :b :c1345; :b :c1346; :b :c1347; :b :c1348; :b :c1349; :b :c1350; :b :c1351; :b :c1352; :b :c1353; :b :c1354; :b :c1355; :b :c1356; :b :c1357; :b :c1358; :b :c1359; :b :c1360; :b :c1361; :b :c1362; :b :c1363; :b :c1364; :b :c1365; :b :c1366; :b :c1367; :b :c1368; :b :c1369; :b :c1370; :b :c1371; :b :c1372; :b :c1373; :b :c1374; :b :c1375; :b :c1376; :b :c1377; :b :c1378; :b :c1379; :b :c1380; :b :c1381; :b :c1382; :b :c1383; :b :c1384; :b :c1385; :b :c1386; :b :c1387; :b :c1388; :b :c1389; :b :c1390; :b :c1391; :b :c1392; :b :c1393; :b :c1394; :b :c1395; :b :c1396; :b :c1397; :b :c1398; :b :c1399; :b :c1400; :b :c1401; :b :c1402; :b :c1403; :b :c1404; :b :c1405; :b :c1406; :b :c1407; :b :c1408; :b :c1409; :b :c1410; :b :c1411; :b :c1412; :b :c1413; :b :c1414; :b :c1415; :b :c1416; :b :c1417; :b :c1418; :b :c1419; :b :c1420; :b :c1421; :b :c1422; :b :c1423; :b :c1424; :b :c1425; :b :c1426; :b :c1427; :b :c1428; :b :c1429; :b :c1430; :b :c1431; :b :c1432; :b :c1433; :b :c1434; :b :c1435; :b :c1436; :b :c1437; :b :c1438; :b :c1439; :b :c1440; :b :c1441; :b :c1442; :b :c1443; :b :c1444; :b :c1445; :b :c1446; :b :c1447; :b :c1448; :b :c1449; :b :c1450; :b :c1451; :b :c1452; :b :c1453; :b :c1454; :b :c1455; :b :c1456; :b :c1457; :b :c1458; :b :c1459; :b :c1460; :b :c1461; :b :c1462; :b :c1463; :b :c1464; :b :c1465; :b :c1466; :b :c1467; :b :c1468; :b :c1469; :b :c1470; :b :c1471; :b :c1472; :b :c1473; :b :c1474; :b :c1475; :b :c1476; :b :c1477; :b :c1478; :b :c1479; :b :c1480; :b :c1481; :b :c1482; :b :c1483; :b :c1484; :b :c1485; :b :c1486; :b :c1487; :b :c1488; :b :c1489; :b :c1490; :b :c1491; :b :c1492; :b :c1493; :b :c1494; :b :c1495; :b :c1496; :b :c1497; :b :c1498; :b :c1499; :b :c1500; :b :c1501; :b :c1502; :b :c1503; :b :c1504; :b :c1505; :b :c1506; :b :c1507; :b :c1508; :b :c1509; :b :c1510; :b :c1511; :b :c1512; :b :c1513; :b :c1514; :b :c1515; :b :c1516; :b :c1517; :b :c1518; :b :c1519; :b :c1520; :b :c1521; :b :c1522; :b :c1523; :b :c1524; :b :c1525; :b :c1526; :b :c1527; :b :c1528; :b :c1529; :b :c1530; :b :c1531; :b :c1532; :b :c1533; :b :c1534; :b :c1535; :b :c1536; :b :c1537; :b :c1538; :b :c1539; :b :c1540; :b :c1541; :b :c1542; :b :c1543; :b :c1544; :b :c1545; :b :c1546; :b :c1547; :b :c1548; :b :c1549; :b :c1550; :b :c1551; :b :c1552; :b :c1553; :b :c1554; :b :c1555; :b :c1556; :b :c1557; :b :c1558; :b :c1559; :b :c1560; :b :c1561; :b :c1562; :b :c1563; :b :c1564; :b :c1565; :b :c1566; :b :c1567; :b :c1568; :b :c1569; :b :c1570; :b :c1571; :b :c1572; :b :c1573; :b :c1574; :b :c1575; :b :c1576; :b :c1577; :b :c1578; :b :c1579; :b :c1580; :b :c1581; :b :c1582; :b :c1583; :b :c1584; :b :c1585; :b :c1586; :b :c1587; :b :c1588; :b :c1589; :b :c1590; :b :c1591; :b :c1592; :b :c1593; :b :c1594; :b :c1595; :b :c1596; :b :c1597; :b :c1598; :b :c1599; :b :c1600; :b :c1601; :b :c1602; :b :c1603; :b :c1604; :b :c1605; :b :c1606; :b :c1607; :b :c1608; :b :c1609; :b :c1610; :b :c1611; :b :c1612; :b :c1613; :b :c1614; :b :c1615; :b :c1616; :b :c1617; :b :c1618; :b :c1619; :b :c1620; :b :c1621; :b :c1622; :b :c1623; :b :c1624; :b :c1625; :b :c1626; :b :c1627; :b :c1628; :b :c1629; :b :c1630; :b :c1631; :b :c1632; :b :c1633; :b :c1634; :b :c1635; :b :c1636; :b :c1637; :b :c1638; :b :c1639; :b :c1640; :b :c1641; :b :c1642; :b :c1643; :b :c1644; :b :c1645; :b :c1646; :b :c1647; :b :c1648; :b :c1649; :b :c1650; :b :c1651; :b :c1652; :b :c1653; :b :c1654; :b :c1655; :b :c1656; :b :c1657; :b :c1658; :b :c1659; :b :c1660; :b :c1661; :b :c1662; :b :c1663; :b :c1664; :b :c1665; :b :c1666; :b :c1667; :b :c1668; :b :c1669; :b :c1670; :b :c1671; :b :c1672; :b :c1673; :b :c1674; :b :c1675; :b :c1676; :b :c1677; :b :c1678; :b :c1679; :b :c1680; :b :c1681; :b :c1682; :b :c1683; :b :c1684; :b :c1685; :b :c1686; :b :c1687; :b :c1688; :b :c1689; :b :c1690; :b :c1691; :b :c1692; :b :c1693; :b :c1694; :b :c1695; :b :c1696; :b :c1697; :b :c1698; :b :c1699; :b :c1700; :b :c1701; :b :c1702; :b :c1703; :b :c1704; :b :c1705; :b :c1706; :b :c1707; :b :c1708; :b :c1709; :b :c1710; :b :c1711; :b :c1712; :b :c1713; :b :c1714; :b :c1715; :b :c1716; :b :c1717; :b :c1718; :b :c1719; :b :c1720; :b :c1721; :b :c1722; :b :c1723; :b :c1724; :b :c1725; :b :c1726; :b :c1727; :b :c1728; :b :c1729; :b :c1730; :b :c1731; :b :c1732; :b :c1733; :b :c1734; :b :c1735; :b :c1736; :b :c1737; :b :c1738; :b :c1739; :b :c1740; :b :c1741; :b :c1742; :b :c1743; :b :c1744; :b :c1745; :b :c1746; :b :c1747; :b :c1748; :b :c1749; :b :c1750; :b :c1751; :b :c1752; :b :c1753; :b :c1754; :b :c1755; :b :c1756; :b :c1757; :b :c1758; :b :c1759; :b :c1760; :b :c1761; :b :c1762; :b :c1763; :b :c1764; :b :c1765; :b :c1766; :b :c1767; :b :c1768; :b :c1769; :b :c1770; :b :c1771; :b :c1772; :b :c1773; :b :c1774; :b :c1775; :b :c1776; :b :c1777; :b :c1778; :b :c1779; :b :c1780; :b :c1781; :b :c1782; :b :c1783; :b :c1784; :b :c1785; :b :c1786; :b :c1787; :b :c1788; :b :c1789; :b :c1790; :b :c1791; :b :c1792; :b :c1793; :b :c1794; :b :c1795; :b :c1796; :b :c1797; :b :c1798; :b :c1799; :b :c1800; :b :c1801; :b :c1802; :b :c1803; :b :c1804; :b :c1805; :b :c1806; :b :c1807; :b :c1808; :b :c1809; :b :c1810; :b :c1811; :b :c1812; :b :c1813; :b :c1814; :b :c1815; :b :c1816; :b :c1817; :b :c1818; :b :c1819; :b :c1820; :b :c1821; :b :c1822; :b :c1823; :b :c1824; :b :c1825; :b :c1826; :b :c1827; :b :c1828; :b :c1829; :b :c1830; :b :c1831; :b :c1832; :b :c1833; :b :c1834; :b :c1835; :b :c1836; :b :c1837; :b :c1838; :b :c1839; :b :c1840; :b :c1841; :b :c1842; :b :c1843; :b :c1844; :b :c1845; :b :c1846; :b :c1847; :b :c1848; :b :c1849; :b :c1850; :b :c1851; :b :c1852; :b :c1853; :b :c1854; :b :c1855; :b :c1856; :b :c1857; :b :c1858; :b :c1859; :b :c1860; :b :c1861; :b :c1862; :b :c1863; :b :c1864; :b :c1865; :b :c1866; :b :c1867; :b :c1868; :b :c1869; :b :c1870; :b :c1871; :b :c1872; :b :c1873; :b :c1874; :b :c1875; :b :c1876; :b :c1877; :b :c1878; :b :c1879; :b :c1880; :b :c1881; :b :c1882; :b :c1883; :b :c1884; :b :c1885; :b :c1886; :b :c1887; :b :c1888; :b :c1889; :b :c1890; :b :c1891; :b :c1892; :b :c1893; :b :c1894; :b :c1895; :b :c1896; :b :c1897; :b :c1898; :b :c1899; :b :c1900; :b :c1901; :b :c1902; :b :c1903; :b :c1904; :b :c1905; :b :c1906; :b :c1907; :b :c1908; :b :c1909; :b :c1910; :b :c1911; :b :c1912; :b :c1913; :b :c1914; :b :c1915; :b :c1916; :b :c1917; :b :c1918; :b :c1919; :b :c1920; :b :c1921; :b :c1922; :b :c1923; :b :c1924; :b :c1925; :b :c1926; :b :c1927; :b :c1928; :b :c1929; :b :c1930; :b :c1931; :b :c1932; :b :c1933; :b :c1934; :b :c1935; :b :c1936; :b :c1937; :b :c1938; :b :c1939; :b :c1940; :b :c1941; :b :c1942; :b :c1943; :b :c1944; :b :c1945; :b :c1946; :b :c1947; :b :c1948; :b :c1949; :b :c1950; :b :c1951; :b :c1952; :b :c1953; :b :c1954; :b :c1955; :b :c1956; :b :c1957; :b :c1958; :b :c1959; :b :c1960; :b :c1961; :b :c1962; :b :c1963; :b :c1964; :b :c1965; :b :c1966; :b :c1967; :b :c1968; :b :c1969; :b :c1970; :b :c1971; :b :c1972; :b :c1973; :b :c1974; :b :c1975; :b :c1976; :b :c1977; :b :c1978; :b :c1979; :b :c1980; :b :c1981; :b :c1982; :b :c1983; :b :c1984; :b :c1985; :b :c1986; :b :c1987; :b :c1988; :b :c1989; :b :c1990; :b :c1991; :b :c1992; :b :c1993; :b :c1994; :b :c1995; :b :c1996; :b :c1997; :b :c1998; :b :c1999; :b :c2000; :b :c2001; :b :c2002; :b :c2003; :b :c2004; :b :c2005; :b :c2006; :b :c2007; :b :c2008; :b :c2009; :b :c2010; :b :c2011; :b :c2012; :b :c2013; :b :c2014; :b :c2015; :b :c2016; :b :c2017; :b :c2018; :b :c2019; :b :c2020; :b :c2021; :b :c2022; :b :c2023; :b :c2024; :b :c2025; :b :c2026; :b :c2027; :b :c2028; :b :c2029; :b :c2030; :b :c2031; :b :c2032; :b :c2033; :b :c2034; :b :c2035; :b :c2036; :b :c2037; :b :c2038; :b :c2039; :b :c2040; :b :c2041; :b :c2042; :b :c2043; :b :c2044; :b :c2045; :b :c2046; :b :c2047; :b :c2048; :b :c2049; :b :c2050; :b :c2051; :b :c2052; :b :c2053; :b :c2054; :b :c2055; :b :c2056; :b :c2057; :b :c2058; :b :c2059; :b :c2060; :b :c2061; :b :c2062; :b :c2063; :b :c2064; :b :c2065; :b :c2066; :b :c2067; :b :c2068; :b :c2069; :b :c2070; :b :c2071; :b :c2072; :b :c2073; :b :c2074; :b :c2075; :b :c2076; :b :c2077; :b :c2078; :b :c2079; :b :c2080; :b :c2081; :b :c2082; :b :c2083; :b :c2084; :b :c2085; :b :c2086; :b :c2087; :b :c2088; :b :c2089; :b :c2090; :b :c2091; :b :c2092; :b :c2093; :b :c2094; :b :c2095; :b :c2096; :b :c2097; :b :c2098; :b :c2099; :b :c2100; :b :c2101; :b :c2102; :b :c2103; :b :c2104; :b :c2105; :b :c2106; :b :c2107; :b :c2108; :b :c2109; :b :c2110; :b :c2111; :b :c2112; :b :c2113; :b :c2114; :b :c2115; :b :c2116; :b :c2117; :b :c2118; :b :c2119; :b :c2120; :b :c2121; :b :c2122; :b :c2123; :b :c2124; :b :c2125; :b :c2126; :b :c2127; :b :c2128; :b :c2129; :b :c2130; :b :c2131; :b :c2132; :b :c2133; :b :c2134; :b :c2135; :b :c2136; :b :c2137; :b :c2138; :b :c2139; :b :c2140; :b :c2141; :b :c2142; :b :c2143; :b :c2144; :b :c2145; :b :c2146; :b :c2147; :b :c2148; :b :c2149; :b :c2150; :b :c2151; :b :c2152; :b :c2153; :b :c2154; :b :c2155; :b :c2156; :b :c2157; :b :c2158; :b :c2159; :b :c2160; :b :c2161; :b :c2162; :b :c2163; :b :c2164; :b :c2165; :b :c2166; :b :c2167; :b :c2168; :b :c2169; :b :c2170; :b :c2171; :b :c2172; :b :c2173; :b :c2174; :b :c2175; :b :c2176; :b :c2177; :b :c2178; :b :c2179; :b :c2180; :b :c2181; :b :c2182; :b :c2183; :b :c2184; :b :c2185; :b :c2186; :b :c2187; :b :c2188; :b :c2189; :b :c2190; :b :c2191; :b :c2192; :b :c2193; :b :c2194; :b :c2195; :b :c2196; :b :c2197; :b :c2198; :b :c2199; :b :c2200; :b :c2201; :b :c2202; :b :c2203; :b :c2204; :b :c2205; :b :c2206; :b :c2207; :b :c2208; :b :c2209; :b :c2210; :b :c2211; :b :c2212; :b :c2213; :b :c2214; :b :c2215; :b :c2216; :b :c2217; :b :c2218; :b :c2219; :b :c2220; :b :c2221; :b :c2222; :b :c2223; :b :c2224; :b :c2225; :b :c2226; :b :c2227; :b :c2228; :b :c2229; :b :c2230; :b :c2231; :b :c2232; :b :c2233; :b :c2234; :b :c2235; :b :c2236; :b :c2237; :b :c2238; :b :c2239; :b :c2240; :b :c2241; :b :c2242; :b :c2243; :b :c2244; :b :c2245; :b :c2246; :b :c2247; :b :c2248; :b :c2249; :b :c2250; :b :c2251; :b :c2252; :b :c2253; :b :c2254; :b :c2255; :b :c2256; :b :c2257; :b :c2258; :b :c2259; :b :c2260; :b :c2261; :b :c2262; :b :c2263; :b :c2264; :b :c2265; :b :c2266; :b :c2267; :b :c2268; :b :c2269; :b :c2270; :b :c2271; :b :c2272; :b :c2273; :b :c2274; :b :c2275; :b :c2276; :b :c2277; :b :c2278; :b :c2279; :b :c2280; :b :c2281; :b :c2282; :b :c2283; :b :c2284; :b :c2285; :b :c2286; :b :c2287; :b :c2288; :b :c2289; :b :c2290; :b :c2291; :b :c2292; :b :c2293; :b :c2294; :b :c2295; :b :c2296; :b :c2297; :b :c2298; :b :c2299; :b :c2300; :b :c2301; :b :c2302; :b :c2303; :b :c2304; :b :c2305; :b :c2306; :b :c2307; :b :c2308; :b :c2309; :b :c2310; :b :c2311; :b :c2312; :b :c2313; :b :c2314; :b :c2315; :b :c2316; :b :c2317; :b :c2318; :b :c2319; :b :c2320; :b :c2321; :b :c2322; :b :c2323; :b :c2324; :b :c2325; :b :c2326; :b :c2327; :b :c2328; :b :c2329; :b :c2330; :b :c2331; :b :c2332; :b :c2333; :b :c2334; :b :c2335; :b :c2336; :b :c2337; :b :c2338; :b :c2339; :b :c2340; :b :c2341; :b :c2342; :b :c2343; :b :c2344; :b :c2345; :b :c2346; :b :c2347; :b :c2348; :b :c2349; :b :c2350; :b :c2351; :b :c2352; :b :c2353; :b :c2354; :b :c2355; :b :c2356; :b :c2357; :b :c2358; :b :c2359; :b :c2360; :b :c2361; :b :c2362; :b :c2363; :b :c2364; :b :c2365; :b :c2366; :b :c2367; :b :c2368; :b :c2369; :b :c2370; :b :c2371; :b :c2372; :b :c2373; :b :c2374; :b :c2375; :b :c2376; :b :c2377; :b :c2378; :b :c2379; :b :c2380; :b :c2381; :b :c2382; :b :c2383; :b :c2384; :b :c2385; :b :c2386; :b :c2387; :b :c2388; :b :c2389; :b :c2390; :b :c2391; :b :c2392; :b :c2393; :b :c2394; :b :c2395; :b :c2396; :b :c2397; :b :c2398; :b :c2399; :b :c2400; :b :c2401; :b :c2402; :b :c2403; :b :c2404; :b :c2405; :b :c2406; :b :c2407; :b :c2408; :b :c2409; :b :c2410; :b :c2411; :b :c2412; :b :c2413; :b :c2414; :b :c2415; :b :c2416; :b :c2417; :b :c2418; :b :c2419; :b :c2420; :b :c2421; :b :c2422; :b :c2423; :b :c2424; :b :c2425; :b :c2426; :b :c2427; :b :c2428; :b :c2429; :b :c2430; :b :c2431; :b :c2432; :b :c2433; :b :c2434; :b :c2435; :b :c2436; :b :c2437; :b :c2438; :b :c2439; :b :c2440; :b :c2441; :b :c2442; :b :c2443; :b :c2444; :b :c2445; :b :c2446; :b :c2447; :b :c2448; :b :c2449; :b :c2450; :b :c2451; :b :c2452; :b :c2453; :b :c2454; :b :c2455; :b :c2456; :b :c2457; :b :c2458; :b :c2459; :b :c2460; :b :c2461; :b :c2462; :b :c2463; :b :c2464; :b :c2465; :b :c2466; :b :c2467; :b :c2468; :b :c2469; :b :c2470; :b :c2471; :b :c2472; :b :c2473; :b :c2474; :b :c2475; :b :c2476; :b :c2477; :b :c2478; :b :c2479; :b :c2480; :b :c2481; :b :c2482; :b :c2483; :b :c2484; :b :c2485; :b :c2486; :b :c2487; :b :c2488; :b :c2489; :b :c2490; :b :c2491; :b :c2492; :b :c2493; :b :c2494; :b :c2495; :b :c2496; :b :c2497; :b :c2498; :b :c2499; :b :c2500; :b :c2501; :b :c2502; :b :c2503; :b :c2504; :b :c2505; :b :c2506; :b :c2507; :b :c2508; :b :c2509; :b :c2510; :b :c2511; :b :c2512; :b :c2513; :b :c2514; :b :c2515; :b :c2516; :b :c2517; :b :c2518; :b :c2519; :b :c2520; :b :c2521; :b :c2522; :b :c2523; :b :c2524; :b :c2525; :b :c2526; :b :c2527; :b :c2528; :b :c2529; :b :c2530; :b :c2531; :b :c2532; :b :c2533; :b :c2534; :b :c2535; :b :c2536; :b :c2537; :b :c2538; :b :c2539; :b :c2540; :b :c2541; :b :c2542; :b :c2543; :b :c2544; :b :c2545; :b :c2546; :b :c2547; :b :c2548; :b :c2549; :b :c2550; :b :c2551; :b :c2552; :b :c2553; :b :c2554; :b :c2555; :b :c2556; :b :c2557; :b :c2558; :b :c2559; :b :c2560; :b :c2561; :b :c2562; :b :c2563; :b :c2564; :b :c2565; :b :c2566; :b :c2567; :b :c2568; :b :c2569; :b :c2570; :b :c2571; :b :c2572; :b :c2573; :b :c2574; :b :c2575; :b :c2576; :b :c2577; :b :c2578; :b :c2579; :b :c2580; :b :c2581; :b :c2582; :b :c2583; :b :c2584; :b :c2585; :b :c2586; :b :c2587; :b :c2588; :b :c2589; :b :c2590; :b :c2591; :b :c2592; :b :c2593; :b :c2594; :b :c2595; :b :c2596; :b :c2597; :b :c2598; :b :c2599; :b :c2600; :b :c2601; :b :c2602; :b :c2603; :b :c2604; :b :c2605; :b :c2606; :b :c2607; :b :c2608; :b :c2609; :b :c2610; :b :c2611; :b :c2612; :b :c2613; :b :c2614; :b :c2615; :b :c2616; :b :c2617; :b :c2618; :b :c2619; :b :c2620; :b :c2621; :b :c2622; :b :c2623; :b :c2624; :b :c2625; :b :c2626; :b :c2627; :b :c2628; :b :c2629; :b :c2630; :b :c2631; :b :c2632; :b :c2633; :b :c2634; :b :c2635; :b :c2636; :b :c2637; :b :c2638; :b :c2639; :b :c2640; :b :c2641; :b :c2642; :b :c2643; :b :c2644; :b :c2645; :b :c2646; :b :c2647; :b :c2648; :b :c2649; :b :c2650; :b :c2651; :b :c2652; :b :c2653; :b :c2654; :b :c2655; :b :c2656; :b :c2657; :b :c2658; :b :c2659; :b :c2660; :b :c2661; :b :c2662; :b :c2663; :b :c2664; :b :c2665; :b :c2666; :b :c2667; :b :c2668; :b :c2669; :b :c2670; :b :c2671; :b :c2672; :b :c2673; :b :c2674; :b :c2675; :b :c2676; :b :c2677; :b :c2678; :b :c2679; :b :c2680; :b :c2681; :b :c2682; :b :c2683; :b :c2684; :b :c2685; :b :c2686; :b :c2687; :b :c2688; :b :c2689; :b :c2690; :b :c2691; :b :c2692; :b :c2693; :b :c2694; :b :c2695; :b :c2696; :b :c2697; :b :c2698; :b :c2699; :b :c2700; :b :c2701; :b :c2702; :b :c2703; :b :c2704; :b :c2705; :b :c2706; :b :c2707; :b :c2708; :b :c2709; :b :c2710; :b :c2711; :b :c2712; :b :c2713; :b :c2714; :b :c2715; :b :c2716; :b :c2717; :b :c2718; :b :c2719; :b :c2720; :b :c2721; :b :c2722; :b :c2723; :b :c2724; :b :c2725; :b :c2726; :b :c2727; :b :c2728; :b :c2729; :b :c2730; :b :c2731; :b :c2732; :b :c2733; :b :c2734; :b :c2735; :b :c2736; :b :c2737; :b :c2738; :b :c2739; :b :c2740; :b :c2741; :b :c2742; :b :c2743; :b :c2744; :b :c2745; :b :c2746; :b :c2747; :b :c2748; :b :c2749; :b :c2750; :b :c2751; :b :c2752; :b :c2753; :b :c2754; :b :c2755; :b :c2756; :b :c2757; :b :c2758; :b :c2759; :b :c2760; :b :c2761; :b :c2762; :b :c2763; :b :c2764; :b :c2765; :b :c2766; :b :c2767; :b :c2768; :b :c2769; :b :c2770; :b :c2771; :b :c2772; :b :c2773; :b :c2774; :b :c2775; :b :c2776; :b :c2777; :b :c2778; :b :c2779; :b :c2780; :b :c2781; :b :c2782; :b :c2783; :b :c2784; :b :c2785; :b :c2786; :b :c2787; :b :c2788; :b :c2789; :b :c2790; :b :c2791; :b :c2792; :b :c2793; :b :c2794; :b :c2795; :b :c2796; :b :c2797; :b :c2798; :b :c2799; :b :c2800; :b :c2801; :b :c2802; :b :c2803; :b :c2804; :b :c2805; :b :c2806; :b :c2807; :b :c2808; :b :c2809; :b :c2810; :b :c2811; :b :c2812; :b :c2813; :b :c2814; :b :c2815; :b :c2816; :b :c2817; :b :c2818; :b :c2819; :b :c2820; :b :c2821; :b :c2822; :b :c2823; :b :c2824; :b :c2825; :b :c2826; :b :c2827; :b :c2828; :b :c2829; :b :c2830; :b :c2831; :b :c2832; :b :c2833; :b :c2834; :b :c2835; :b :c2836; :b :c2837; :b :c2838; :b :c2839; :b :c2840; :b :c2841; :b :c2842; :b :c2843; :b :c2844; :b :c2845; :b :c2846; :b :c2847; :b :c2848; :b :c2849; :b :c2850; :b :c2851; :b :c2852; :b :c2853; :b :c2854; :b :c2855; :b :c2856; :b :c2857; :b :c2858; :b :c2859; :b :c2860; :b :c2861; :b :c2862; :b :c2863; :b :c2864; :b :c2865; :b :c2866; :b :c2867; :b :c2868; :b :c2869; :b :c2870; :b :c2871; :b :c2872; :b :c2873; :b :c2874; :b :c2875; :b :c2876; :b :c2877; :b :c2878; :b :c2879; :b :c2880; :b :c2881; :b :c2882; :b :c2883; :b :c2884; :b :c2885; :b :c2886; :b :c2887; :b :c2888; :b :c2889; :b :c2890; :b :c2891; :b :c2892; :b :c2893; :b :c2894; :b :c2895; :b :c2896; :b :c2897; :b :c2898; :b :c2899; :b :c2900; :b :c2901; :b :c2902; :b :c2903; :b :c2904; :b :c2905; :b :c2906; :b :c2907; :b :c2908; :b :c2909; :b :c2910; :b :c2911; :b :c2912; :b :c2913; :b :c2914; :b :c2915; :b :c2916; :b :c2917; :b :c2918; :b :c2919; :b :c2920; :b :c2921; :b :c2922; :b :c2923; :b :c2924; :b :c2925; :b :c2926; :b :c2927; :b :c2928; :b :c2929; :b :c2930; :b :c2931; :b :c2932; :b :c2933; :b :c2934; :b :c2935; :b :c2936; :b :c2937; :b :c2938; :b :c2939; :b :c2940; :b :c2941; :b :c2942; :b :c2943; :b :c2944; :b :c2945; :b :c2946; :b :c2947; :b :c2948; :b :c2949; :b :c2950; :b :c2951; :b :c2952; :b :c2953; :b :c2954; :b :c2955; :b :c2956; :b :c2957; :b :c2958; :b :c2959; :b :c2960; :b :c2961; :b :c2962; :b :c2963; :b :c2964; :b :c2965; :b :c2966; :b :c2967; :b :c2968; :b :c2969; :b :c2970; :b :c2971; :b :c2972; :b :c2973; :b :c2974; :b :c2975; :b :c2976; :b :c2977; :b :c2978; :b :c2979; :b :c2980; :b :c2981; :b :c2982; :b :c2983; :b :c2984; :b :c2985; :b :c2986; :b :c2987; :b :c2988; :b :c2989; :b :c2990; :b :c2991; :b :c2992; :b :c2993; :b :c2994; :b :c2995; :b :c2996; :b :c2997; :b :c2998; :b :c2999; :b :c3000; :b :c3001; :b :c3002; :b :c3003; :b :c3004; :b :c3005; :b :c3006; :b :c3007; :b :c3008; :b :c3009; :b :c3010; :b :c3011; :b :c3012; :b :c3013; :b :c3014; :b :c3015; :b :c3016; :b :c3017; :b :c3018; :b :c3019; :b :c3020; :b :c3021; :b :c3022; :b :c3023; :b :c3024; :b :c3025; :b :c3026; :b :c3027; :b :c3028; :b :c3029; :b :c3030; :b :c3031; :b :c3032; :b :c3033; :b :c3034; :b :c3035; :b :c3036; :b :c3037; :b :c3038; :b :c3039; :b :c3040; :b :c3041; :b :c3042; :b :c3043; :b :c3044; :b :c3045; :b :c3046; :b :c3047; :b :c3048; :b :c3049; :b :c3050; :b :c3051; :b :c3052; :b :c3053; :b :c3054; :b :c3055; :b :c3056; :b :c3057; :b :c3058; :b :c3059; :b :c3060; :b :c3061; :b :c3062; :b :c3063; :b :c3064; :b :c3065; :b :c3066; :b :c3067; :b :c3068; :b :c3069; :b :c3070; :b :c3071; :b :c3072; :b :c3073; :b :c3074; :b :c3075; :b :c3076; :b :c3077; :b :c3078; :b :c3079; :b :c3080; :b :c3081; :b :c3082; :b :c3083; :b :c3084; :b :c3085; :b :c3086; :b :c3087; :b :c3088; :b :c3089; :b :c3090; :b :c3091; :b :c3092; :b :c3093; :b :c3094; :b :c3095; :b :c3096; :b :c3097; :b :c3098; :b :c3099; :b :c3100; :b :c3101; :b :c3102; :b :c3103; :b :c3104; :b :c3105; :b :c3106; :b :c3107; :b :c3108; :b :c3109; :b :c3110; :b :c3111; :b :c3112; :b :c3113; :b :c3114; :b :c3115; :b :c3116; :b :c3117; :b :c3118; :b :c3119; :b :c3120; :b :c3121; :b :c3122; :b :c3123; :b :c3124; :b :c3125; :b :c3126; :b :c3127; :b :c3128; :b :c3129; :b :c3130; :b :c3131; :b :c3132; :b :c3133; :b :c3134; :b :c3135; :b :c3136; :b :c3137; :b :c3138; :b :c3139; :b :c3140; :b :c3141; :b :c3142; :b :c3143; :b :c3144; :b :c3145; :b :c3146; :b :c3147; :b :c3148; :b :c3149; :b :c3150; :b :c3151; :b :c3152; :b :c3153; :b :c3154; :b :c3155; :b :c3156; :b :c3157; :b :c3158; :b :c3159; :b :c3160; :b :c3161; :b :c3162; :b :c3163; :b :c3164; :b :c3165; :b :c3166; :b :c3167; :b :c3168; :b :c3169; :b :c3170; :b :c3171; :b :c3172; :b :c3173; :b :c3174; :b :c3175; :b :c3176; :b :c3177; :b :c3178; :b :c3179; :b :c3180; :b :c3181; :b :c3182; :b :c3183; :b :c3184; :b :c3185; :b :c3186; :b :c3187; :b :c3188; :b :c3189; :b :c3190; :b :c3191; :b :c3192; :b :c3193; :b :c3194; :b :c3195; :b :c3196; :b :c3197; :b :c3198; :b :c3199; :b :c3200; :b :c3201; :b :c3202; :b :c3203; :b :c3204; :b :c3205; :b :c3206; :b :c3207; :b :c3208; :b :c3209; :b :c3210; :b :c3211; :b :c3212; :b :c3213; :b :c3214; :b :c3215; :b :c3216; :b :c3217; :b :c3218; :b :c3219; :b :c3220; :b :c3221; :b :c3222; :b :c3223; :b :c3224; :b :c3225; :b :c3226; :b :c3227; :b :c3228; :b :c3229; :b :c3230; :b :c3231; :b :c3232; :b :c3233; :b :c3234; :b :c3235; :b :c3236; :b :c3237; :b :c3238; :b :c3239; :b :c3240; :b :c3241; :b :c3242; :b :c3243; :b :c3244; :b :c3245; :b :c3246; :b :c3247; :b :c3248; :b :c3249; :b :c3250; :b :c3251; :b :c3252; :b :c3253; :b :c3254; :b :c3255; :b :c3256; :b :c3257; :b :c3258; :b :c3259; :b :c3260; :b :c3261; :b :c3262; :b :c3263; :b :c3264; :b :c3265; :b :c3266; :b :c3267; :b :c3268; :b :c3269; :b :c3270; :b :c3271; :b :c3272; :b :c3273; :b :c3274; :b :c3275; :b :c3276; :b :c3277; :b :c3278; :b :c3279; :b :c3280; :b :c3281; :b :c3282; :b :c3283; :b :c3284; :b :c3285; :b :c3286; :b :c3287; :b :c3288; :b :c3289; :b :c3290; :b :c3291; :b :c3292; :b :c3293; :b :c3294; :b :c3295; :b :c3296; :b :c3297; :b :c3298; :b :c3299; :b :c3300; :b :c3301; :b :c3302; :b :c3303; :b :c3304; :b :c3305; :b :c3306; :b :c3307; :b :c3308; :b :c3309; :b :c3310; :b :c3311; :b :c3312; :b :c3313; :b :c3314; :b :c3315; :b :c3316; :b :c3317; :b :c3318; :b :c3319; :b :c3320; :b :c3321; :b :c3322; :b :c3323; :b :c3324; :b :c3325; :b :c3326; :b :c3327; :b :c3328; :b :c3329; :b :c3330; :b :c3331; :b :c3332; :b :c3333; :b :c3334; :b :c3335; :b :c3336; :b :c3337; :b :c3338; :b :c3339; :b :c3340; :b :c3341; :b :c3342; :b :c3343; :b :c3344; :b :c3345; :b :c3346; :b :c3347; :b :c3348; :b :c3349; :b :c3350; :b :c3351; :b :c3352; :b :c3353; :b :c3354; :b :c3355; :b :c3356; :b :c3357; :b :c3358; :b :c3359; :b :c3360; :b :c3361; :b :c3362; :b :c3363; :b :c3364; :b :c3365; :b :c3366; :b :c3367; :b :c3368; :b :c3369; :b :c3370; :b :c3371; :b :c3372; :b :c3373; :b :c3374; :b :c3375; :b :c3376; :b :c3377; :b :c3378; :b :c3379; :b :c3380; :b :c3381; :b :c3382; :b :c3383; :b :c3384; :b :c3385; :b :c3386; :b :c3387; :b :c3388; :b :c3389; :b :c3390; :b :c3391; :b :c3392; :b :c3393; :b :c3394; :b :c3395; :b :c3396; :b :c3397; :b :c3398; :b :c3399; :b :c3400; :b :c3401; :b :c3402; :b :c3403; :b :c3404; :b :c3405; :b :c3406; :b :c3407; :b :c3408; :b :c3409; :b :c3410; :b :c3411; :b :c3412; :b :c3413; :b :c3414; :b :c3415; :b :c3416; :b :c3417; :b :c3418; :b :c3419; :b :c3420; :b :c3421; :b :c3422; :b :c3423; :b :c3424; :b :c3425; :b :c3426; :b :c3427; :b :c3428; :b :c3429; :b :c3430; :b :c3431; :b :c3432; :b :c3433; :b :c3434; :b :c3435; :b :c3436; :b :c3437; :b :c3438; :b :c3439; :b :c3440; :b :c3441; :b :c3442; :b :c3443; :b :c3444; :b :c3445; :b :c3446; :b :c3447; :b :c3448; :b :c3449; :b :c3450; :b :c3451; :b :c3452; :b :c3453; :b :c3454; :b :c3455; :b :c3456; :b :c3457; :b :c3458; :b :c3459; :b :c3460; :b :c3461; :b :c3462; :b :c3463; :b :c3464; :b :c3465; :b :c3466; :b :c3467; :b :c3468; :b :c3469; :b :c3470; :b :c3471; :b :c3472; :b :c3473; :b :c3474; :b :c3475; :b :c3476; :b :c3477; :b :c3478; :b :c3479; :b :c3480; :b :c3481; :b :c3482; :b :c3483; :b :c3484; :b :c3485; :b :c3486; :b :c3487; :b :c3488; :b :c3489; :b :c3490; :b :c3491; :b :c3492; :b :c3493; :b :c3494; :b :c3495; :b :c3496; :b :c3497; :b :c3498; :b :c3499; :b :c3500; :b :c3501; :b :c3502; :b :c3503; :b :c3504; :b :c3505; :b :c3506; :b :c3507; :b :c3508; :b :c3509; :b :c3510; :b :c3511; :b :c3512; :b :c3513; :b :c3514; :b :c3515; :b :c3516; :b :c3517; :b :c3518; :b :c3519; :b :c3520; :b :c3521; :b :c3522; :b :c3523; :b :c3524; :b :c3525; :b :c3526; :b :c3527; :b :c3528; :b :c3529; :b :c3530; :b :c3531; :b :c3532; :b :c3533; :b :c3534; :b :c3535; :b :c3536; :b :c3537; :b :c3538; :b :c3539; :b :c3540; :b :c3541; :b :c3542; :b :c3543; :b :c3544; :b :c3545; :b :c3546; :b :c3547; :b :c3548; :b :c3549; :b :c3550; :b :c3551; :b :c3552; :b :c3553; :b :c3554; :b :c3555; :b :c3556; :b :c3557; :b :c3558; :b :c3559; :b :c3560; :b :c3561; :b :c3562; :b :c3563; :b :c3564; :b :c3565; :b :c3566; :b :c3567; :b :c3568; :b :c3569; :b :c3570; :b :c3571; :b :c3572; :b :c3573; :b :c3574; :b :c3575; :b :c3576; :b :c3577; :b :c3578; :b :c3579; :b :c3580; :b :c3581; :b :c3582; :b :c3583; :b :c3584; :b :c3585; :b :c3586; :b :c3587; :b :c3588; :b :c3589; :b :c3590; :b :c3591; :b :c3592; :b :c3593; :b :c3594; :b :c3595; :b :c3596; :b :c3597; :b :c3598; :b :c3599; :b :c3600; :b :c3601; :b :c3602; :b :c3603; :b :c3604; :b :c3605; :b :c3606; :b :c3607; :b :c3608; :b :c3609; :b :c3610; :b :c3611; :b :c3612; :b :c3613; :b :c3614; :b :c3615; :b :c3616; :b :c3617; :b :c3618; :b :c3619; :b :c3620; :b :c3621; :b :c3622; :b :c3623; :b :c3624; :b :c3625; :b :c3626; :b :c3627; :b :c3628; :b :c3629; :b :c3630; :b :c3631; :b :c3632; :b :c3633; :b :c3634; :b :c3635; :b :c3636; :b :c3637; :b :c3638; :b :c3639; :b :c3640; :b :c3641; :b :c3642; :b :c3643; :b :c3644; :b :c3645; :b :c3646; :b :c3647; :b :c3648; :b :c3649; :b :c3650; :b :c3651; :b :c3652; :b :c3653; :b :c3654; :b :c3655; :b :c3656; :b :c3657; :b :c3658; :b :c3659; :b :c3660; :b :c3661; :b :c3662; :b :c3663; :b :c3664; :b :c3665; :b :c3666; :b :c3667; :b :c3668; :b :c3669; :b :c3670; :b :c3671; :b :c3672; :b :c3673; :b :c3674; :b :c3675; :b :c3676; :b :c3677; :b :c3678; :b :c3679; :b :c3680; :b :c3681; :b :c3682; :b :c3683; :b :c3684; :b :c3685; :b :c3686; :b :c3687; :b :c3688; :b :c3689; :b :c3690; :b :c3691; :b :c3692; :b :c3693; :b :c3694; :b :c3695; :b :c3696; :b :c3697; :b :c3698; :b :c3699; :b :c3700; :b :c3701; :b :c3702; :b :c3703; :b :c3704; :b :c3705; :b :c3706; :b :c3707; :b :c3708; :b :c3709; :b :c3710; :b :c3711; :b :c3712; :b :c3713; :b :c3714; :b :c3715; :b :c3716; :b :c3717; :b :c3718; :b :c3719; :b :c3720; :b :c3721; :b :c3722; :b :c3723; :b :c3724; :b :c3725; :b :c3726; :b :c3727; :b :c3728; :b :c3729; :b :c3730; :b :c3731; :b :c3732; :b :c3733; :b :c3734; :b :c3735; :b :c3736; :b :c3737; :b :c3738; :b :c3739; :b :c3740; :b :c3741; :b :c3742; :b :c3743; :b :c3744; :b :c3745; :b :c3746; :b :c3747; :b :c3748; :b :c3749; :b :c3750; :b :c3751; :b :c3752; :b :c3753; :b :c3754; :b :c3755; :b :c3756; :b :c3757; :b :c3758; :b :c3759; :b :c3760; :b :c3761; :b :c3762; :b :c3763; :b :c3764; :b :c3765; :b :c3766; :b :c3767; :b :c3768; :b :c3769; :b :c3770; :b :c3771; :b :c3772; :b :c3773; :b :c3774; :b :c3775; :b :c3776; :b :c3777; :b :c3778; :b :c3779; :b :c3780; :b :c3781; :b :c3782; :b :c3783; :b :c3784; :b :c3785; :b :c3786; :b :c3787; :b :c3788; :b :c3789; :b :c3790; :b :c3791; :b :c3792; :b :c3793; :b :c3794; :b :c3795; :b :c3796; :b :c3797; :b :c3798; :b :c3799; :b :c3800; :b :c3801; :b :c3802; :b :c3803; :b :c3804; :b :c3805; :b :c3806; :b :c3807; :b :c3808; :b :c3809; :b :c3810; :b :c3811; :b :c3812; :b :c3813; :b :c3814; :b :c3815; :b :c3816; :b :c3817; :b :c3818; :b :c3819; :b :c3820; :b :c3821; :b :c3822; :b :c3823; :b :c3824; :b :c3825; :b :c3826; :b :c3827; :b :c3828; :b :c3829; :b :c3830; :b :c3831; :b :c3832; :b :c3833; :b :c3834; :b :c3835; :b :c3836; :b :c3837; :b :c3838; :b :c3839; :b :c3840; :b :c3841; :b :c3842; :b :c3843; :b :c3844; :b :c3845; :b :c3846; :b :c3847; :b :c3848; :b :c3849; :b :c3850; :b :c3851; :b :c3852; :b :c3853; :b :c3854; :b :c3855; :b :c3856; :b :c3857; :b :c3858; :b :c3859; :b :c3860; :b :c3861; :b :c3862; :b :c3863; :b :c3864; :b :c3865; :b :c3866; :b :c3867; :b :c3868; :b :c3869; :b :c3870; :b :c3871; :b :c3872; :b :c3873; :b :c3874; :b :c3875; :b :c3876; :b :c3877; :b :c3878; :b :c3879; :b :c3880; :b :c3881; :b :c3882; :b :c3883; :b :c3884; :b :c3885; :b :c3886; :b :c3887; :b :c3888; :b :c3889; :b :c3890; :b :c3891; :b :c3892; :b :c3893; :b :c3894; :b :c3895; :b :c3896; :b :c3897; :b :c3898; :b :c3899; :b :c3900; :b :c3901; :b :c3902; :b :c3903; :b :c3904; :b :c3905; :b :c3906; :b :c3907; :b :c3908; :b :c3909; :b :c3910; :b :c3911; :b :c3912; :b :c3913; :b :c3914; :b :c3915; :b :c3916; :b :c3917; :b :c3918; :b :c3919; :b :c3920; :b :c3921; :b :c3922; :b :c3923; :b :c3924; :b :c3925; :b :c3926; :b :c3927; :b :c3928; :b :c3929; :b :c3930; :b :c3931; :b :c3932; :b :c3933; :b :c3934; :b :c3935; :b :c3936; :b :c3937; :b :c3938; :b :c3939; :b :c3940; :b :c3941; :b :c3942; :b :c3943; :b :c3944; :b :c3945; :b :c3946; :b :c3947; :b :c3948; :b :c3949; :b :c3950; :b :c3951; :b :c3952; :b :c3953; :b :c3954; :b :c3955; :b :c3956; :b :c3957; :b :c3958; :b :c3959; :b :c3960; :b :c3961; :b :c3962; :b :c3963; :b :c3964; :b :c3965; :b :c3966; :b :c3967; :b :c3968; :b :c3969; :b :c3970; :b :c3971; :b :c3972; :b :c3973; :b :c3974; :b :c3975; :b :c3976; :b :c3977; :b :c3978; :b :c3979; :b :c3980; :b :c3981; :b :c3982; :b :c3983; :b :c3984; :b :c3985; :b :c3986; :b :c3987; :b :c3988; :b :c3989; :b :c3990; :b :c3991; :b :c3992; :b :c3993; :b :c3994; :b :c3995; :b :c3996; :b :c3997; :b :c3998; :b :c3999; :b :c4000; :b :c4001; :b :c4002; :b :c4003; :b :c4004; :b :c4005; :b :c4006; :b :c4007; :b :c4008; :b :c4009; :b :c4010; :b :c4011; :b :c4012; :b :c4013; :b :c4014; :b :c4015; :b :c4016; :b :c4017; :b :c4018; :b :c4019; :b :c4020; :b :c4021; :b :c4022; :b :c4023; :b :c4024; :b :c4025; :b :c4026; :b :c4027; :b :c4028; :b :c4029; :b :c4030; :b :c4031; :b :c4032; :b :c4033; :b :c4034; :b :c4035; :b :c4036; :b :c4037; :b :c4038; :b :c4039; :b :c4040; :b :c4041; :b :c4042; :b :c4043; :b :c4044; :b :c4045; :b :c4046; :b :c4047; :b :c4048; :b :c4049; :b :c4050; :b :c4051; :b :c4052; :b :c4053; :b :c4054; :b :c4055; :b :c4056; :b :c4057; :b :c4058; :b :c4059; :b :c4060; :b :c4061; :b :c4062; :b :c4063; :b :c4064; :b :c4065; :b :c4066; :b :c4067; :b :c4068; :b :c4069; :b :c4070; :b :c4071; :b :c4072; :b :c4073; :b :c4074; :b :c4075; :b :c4076; :b :c4077; :b :c4078; :b :c4079; :b :c4080; :b :c4081; :b :c4082; :b :c4083; :b :c4084; :b :c4085; :b :c4086; :b :c4087; :b :c4088; :b :c4089; :b :c4090; :b :c4091; :b :c4092; :b :c4093; :b :c4094; :b :c4095; :b :c4096; :b :c4097; :b :c4098; :b :c4099; :b :c4100; :b :c4101; :b :c4102; :b :c4103; :b :c4104; :b :c4105; :b :c4106; :b :c4107; :b :c4108; :b :c4109; :b :c4110; :b :c4111; :b :c4112; :b :c4113; :b :c4114; :b :c4115; :b :c4116; :b :c4117; :b :c4118; :b :c4119; :b :c4120; :b :c4121; :b :c4122; :b :c4123; :b :c4124; :b :c4125; :b :c4126; :b :c4127; :b :c4128; :b :c4129; :b :c4130; :b :c4131; :b :c4132; :b :c4133; :b :c4134; :b :c4135; :b :c4136; :b :c4137; :b :c4138; :b :c4139; :b :c4140; :b :c4141; :b :c4142; :b :c4143; :b :c4144; :b :c4145; :b :c4146; :b :c4147; :b :c4148; :b :c4149; :b :c4150; :b :c4151; :b :c4152; :b :c4153; :b :c4154; :b :c4155; :b :c4156; :b :c4157; :b :c4158; :b :c4159; :b :c4160; :b :c4161; :b :c4162; :b :c4163; :b :c4164; :b :c4165; :b :c4166; :b :c4167; :b :c4168; :b :c4169; :b :c4170; :b :c4171; :b :c4172; :b :c4173; :b :c4174; :b :c4175; :b :c4176; :b :c4177; :b :c4178; :b :c4179; :b :c4180; :b :c4181; :b :c4182; :b :c4183; :b :c4184; :b :c4185; :b :c4186; :b :c4187; :b :c4188; :b :c4189; :b :c4190; :b :c4191; :b :c4192; :b :c4193; :b :c4194; :b :c4195; :b :c4196; :b :c4197; :b :c4198; :b :c4199; :b :c4200; :b :c4201; :b :c4202; :b :c4203; :b :c4204; :b :c4205; :b :c4206; :b :c4207; :b :c4208; :b :c4209; :b :c4210; :b :c4211; :b :c4212; :b :c4213; :b :c4214; :b :c4215; :b :c4216; :b :c4217; :b :c4218; :b :c4219; :b :c4220; :b :c4221; :b :c4222; :b :c4223; :b :c4224; :b :c4225; :b :c4226; :b :c4227; :b :c4228; :b :c4229; :b :c4230; :b :c4231; :b :c4232; :b :c4233; :b :c4234; :b :c4235; :b :c4236; :b :c4237; :b :c4238; :b :c4239; :b :c4240; :b :c4241; :b :c4242; :b :c4243; :b :c4244; :b :c4245; :b :c4246; :b :c4247; :b :c4248; :b :c4249; :b :c4250; :b :c4251; :b :c4252; :b :c4253; :b :c4254; :b :c4255; :b :c4256; :b :c4257; :b :c4258; :b :c4259; :b :c4260; :b :c4261; :b :c4262; :b :c4263; :b :c4264; :b :c4265; :b :c4266; :b :c4267; :b :c4268; :b :c4269; :b :c4270; :b :c4271; :b :c4272; :b :c4273; :b :c4274; :b :c4275; :b :c4276; :b :c4277; :b :c4278; :b :c4279; :b :c4280; :b :c4281; :b :c4282; :b :c4283; :b :c4284; :b :c4285; :b :c4286; :b :c4287; :b :c4288; :b :c4289; :b :c4290; :b :c4291; :b :c4292; :b :c4293; :b :c4294; :b :c4295; :b :c4296; :b :c4297; :b :c4298; :b :c4299; :b :c4300; :b :c4301; :b :c4302; :b :c4303; :b :c4304; :b :c4305; :b :c4306; :b :c4307; :b :c4308; :b :c4309; :b :c4310; :b :c4311; :b :c4312; :b :c4313; :b :c4314; :b :c4315; :b :c4316; :b :c4317; :b :c4318; :b :c4319; :b :c4320; :b :c4321; :b :c4322; :b :c4323; :b :c4324; :b :c4325; :b :c4326; :b :c4327; :b :c4328; :b :c4329; :b :c4330; :b :c4331; :b :c4332; :b :c4333; :b :c4334; :b :c4335; :b :c4336; :b :c4337; :b :c4338; :b :c4339; :b :c4340; :b :c4341; :b :c4342; :b :c4343; :b :c4344; :b :c4345; :b :c4346; :b :c4347; :b :c4348; :b :c4349; :b :c4350; :b :c4351; :b :c4352; :b :c4353; :b :c4354; :b :c4355; :b :c4356; :b :c4357; :b :c4358; :b :c4359; :b :c4360; :b :c4361; :b :c4362; :b :c4363; :b :c4364; :b :c4365; :b :c4366; :b :c4367; :b :c4368; :b :c4369; :b :c4370; :b :c4371; :b :c4372; :b :c4373; :b :c4374; :b :c4375; :b :c4376; :b :c4377; :b :c4378; :b :c4379; :b :c4380; :b :c4381; :b :c4382; :b :c4383; :b :c4384; :b :c4385; :b :c4386; :b :c4387; :b :c4388; :b :c4389; :b :c4390; :b :c4391; :b :c4392; :b :c4393; :b :c4394; :b :c4395; :b :c4396; :b :c4397; :b :c4398; :b :c4399; :b :c4400; :b :c4401; :b :c4402; :b :c4403; :b :c4404; :b :c4405; :b :c4406; :b :c4407; :b :c4408; :b :c4409; :b :c4410; :b :c4411; :b :c4412; :b :c4413; :b :c4414; :b :c4415; :b :c4416; :b :c4417; :b :c4418; :b :c4419; :b :c4420; :b :c4421; :b :c4422; :b :c4423; :b :c4424; :b :c4425; :b :c4426; :b :c4427; :b :c4428; :b :c4429; :b :c4430; :b :c4431; :b :c4432; :b :c4433; :b :c4434; :b :c4435; :b :c4436; :b :c4437; :b :c4438; :b :c4439; :b :c4440; :b :c4441; :b :c4442; :b :c4443; :b :c4444; :b :c4445; :b :c4446; :b :c4447; :b :c4448; :b :c4449; :b :c4450; :b :c4451; :b :c4452; :b :c4453; :b :c4454; :b :c4455; :b :c4456; :b :c4457; :b :c4458; :b :c4459; :b :c4460; :b :c4461; :b :c4462; :b :c4463; :b :c4464; :b :c4465; :b :c4466; :b :c4467; :b :c4468; :b :c4469; :b :c4470; :b :c4471; :b :c4472; :b :c4473; :b :c4474; :b :c4475; :b :c4476; :b :c4477; :b :c4478; :b :c4479; :b :c4480; :b :c4481; :b :c4482; :b :c4483; :b :c4484; :b :c4485; :b :c4486; :b :c4487; :b :c4488; :b :c4489; :b :c4490; :b :c4491; :b :c4492; :b :c4493; :b :c4494; :b :c4495; :b :c4496; :b :c4497; :b :c4498; :b :c4499; :b :c4500; :b :c4501; :b :c4502; :b :c4503; :b :c4504; :b :c4505; :b :c4506; :b :c4507; :b :c4508; :b :c4509; :b :c4510; :b :c4511; :b :c4512; :b :c4513; :b :c4514; :b :c4515; :b :c4516; :b :c4517; :b :c4518; :b :c4519; :b :c4520; :b :c4521; :b :c4522; :b :c4523; :b :c4524; :b :c4525; :b :c4526; :b :c4527; :b :c4528; :b :c4529; :b :c4530; :b :c4531; :b :c4532; :b :c4533; :b :c4534; :b :c4535; :b :c4536; :b :c4537; :b :c4538; :b :c4539; :b :c4540; :b :c4541; :b :c4542; :b :c4543; :b :c4544; :b :c4545; :b :c4546; :b :c4547; :b :c4548; :b :c4549; :b :c4550; :b :c4551; :b :c4552; :b :c4553; :b :c4554; :b :c4555; :b :c4556; :b :c4557; :b :c4558; :b :c4559; :b :c4560; :b :c4561; :b :c4562; :b :c4563; :b :c4564; :b :c4565; :b :c4566; :b :c4567; :b :c4568; :b :c4569; :b :c4570; :b :c4571; :b :c4572; :b :c4573; :b :c4574; :b :c4575; :b :c4576; :b :c4577; :b :c4578; :b :c4579; :b :c4580; :b :c4581; :b :c4582; :b :c4583; :b :c4584; :b :c4585; :b :c4586; :b :c4587; :b :c4588; :b :c4589; :b :c4590; :b :c4591; :b :c4592; :b :c4593; :b :c4594; :b :c4595; :b :c4596; :b :c4597; :b :c4598; :b :c4599; :b :c4600; :b :c4601; :b :c4602; :b :c4603; :b :c4604; :b :c4605; :b :c4606; :b :c4607; :b :c4608; :b :c4609; :b :c4610; :b :c4611; :b :c4612; :b :c4613; :b :c4614; :b :c4615; :b :c4616; :b :c4617; :b :c4618; :b :c4619; :b :c4620; :b :c4621; :b :c4622; :b :c4623; :b :c4624; :b :c4625; :b :c4626; :b :c4627; :b :c4628; :b :c4629; :b :c4630; :b :c4631; :b :c4632; :b :c4633; :b :c4634; :b :c4635; :b :c4636; :b :c4637; :b :c4638; :b :c4639; :b :c4640; :b :c4641; :b :c4642; :b :c4643; :b :c4644; :b :c4645; :b :c4646; :b :c4647; :b :c4648; :b :c4649; :b :c4650; :b :c4651; :b :c4652; :b :c4653; :b :c4654; :b :c4655; :b :c4656; :b :c4657; :b :c4658; :b :c4659; :b :c4660; :b :c4661; :b :c4662; :b :c4663; :b :c4664; :b :c4665; :b :c4666; :b :c4667; :b :c4668; :b :c4669; :b :c4670; :b :c4671; :b :c4672; :b :c4673; :b :c4674; :b :c4675; :b :c4676; :b :c4677; :b :c4678; :b :c4679; :b :c4680; :b :c4681; :b :c4682; :b :c4683; :b :c4684; :b :c4685; :b :c4686; :b :c4687; :b :c4688; :b :c4689; :b :c4690; :b :c4691; :b :c4692; :b :c4693; :b :c4694; :b :c4695; :b :c4696; :b :c4697; :b :c4698; :b :c4699; :b :c4700; :b :c4701; :b :c4702; :b :c4703; :b :c4704; :b :c4705; :b :c4706; :b :c4707; :b :c4708; :b :c4709; :b :c4710; :b :c4711; :b :c4712; :b :c4713; :b :c4714; :b :c4715; :b :c4716; :b :c4717; :b :c4718; :b :c4719; :b :c4720; :b :c4721; :b :c4722; :b :c4723; :b :c4724; :b :c4725; :b :c4726; :b :c4727; :b :c4728; :b :c4729; :b :c4730; :b :c4731; :b :c4732; :b :c4733; :b :c4734; :b :c4735; :b :c4736; :b :c4737; :b :c4738; :b :c4739; :b :c4740; :b :c4741; :b :c4742; :b :c4743; :b :c4744; :b :c4745; :b :c4746; :b :c4747; :b :c4748; :b :c4749; :b :c4750; :b :c4751; :b :c4752; :b :c4753; :b :c4754; :b :c4755; :b :c4756; :b :c4757; :b :c4758; :b :c4759; :b :c4760; :b :c4761; :b :c4762; :b :c4763; :b :c4764; :b :c4765; :b :c4766; :b :c4767; :b :c4768; :b :c4769; :b :c4770; :b :c4771; :b :c4772; :b :c4773; :b :c4774; :b :c4775; :b :c4776; :b :c4777; :b :c4778; :b :c4779; :b :c4780; :b :c4781; :b :c4782; :b :c4783; :b :c4784; :b :c4785; :b :c4786; :b :c4787; :b :c4788; :b :c4789; :b :c4790; :b :c4791; :b :c4792; :b :c4793; :b :c4794; :b :c4795; :b :c4796; :b :c4797; :b :c4798; :b :c4799; :b :c4800; :b :c4801; :b :c4802; :b :c4803; :b :c4804; :b :c4805; :b :c4806; :b :c4807; :b :c4808; :b :c4809; :b :c4810; :b :c4811; :b :c4812; :b :c4813; :b :c4814; :b :c4815; :b :c4816; :b :c4817; :b :c4818; :b :c4819; :b :c4820; :b :c4821; :b :c4822; :b :c4823; :b :c4824; :b :c4825; :b :c4826; :b :c4827; :b :c4828; :b :c4829; :b :c4830; :b :c4831; :b :c4832; :b :c4833; :b :c4834; :b :c4835; :b :c4836; :b :c4837; :b :c4838; :b :c4839; :b :c4840; :b :c4841; :b :c4842; :b :c4843; :b :c4844; :b :c4845; :b :c4846; :b :c4847; :b :c4848; :b :c4849; :b :c4850; :b :c4851; :b :c4852; :b :c4853; :b :c4854; :b :c4855; :b :c4856; :b :c4857; :b :c4858; :b :c4859; :b :c4860; :b :c4861; :b :c4862; :b :c4863; :b :c4864; :b :c4865; :b :c4866; :b :c4867; :b :c4868; :b :c4869; :b :c4870; :b :c4871; :b :c4872; :b :c4873; :b :c4874; :b :c4875; :b :c4876; :b :c4877; :b :c4878; :b :c4879; :b :c4880; :b :c4881; :b :c4882; :b :c4883; :b :c4884; :b :c4885; :b :c4886; :b :c4887; :b :c4888; :b :c4889; :b :c4890; :b :c4891; :b :c4892; :b :c4893; :b :c4894; :b :c4895; :b :c4896; :b :c4897; :b :c4898; :b :c4899; :b :c4900; :b :c4901; :b :c4902; :b :c4903; :b :c4904; :b :c4905; :b :c4906; :b :c4907; :b :c4908; :b :c4909; :b :c4910; :b :c4911; :b :c4912; :b :c4913; :b :c4914; :b :c4915; :b :c4916; :b :c4917; :b :c4918; :b :c4919; :b :c4920; :b :c4921; :b :c4922; :b :c4923; :b :c4924; :b :c4925; :b :c4926; :b :c4927; :b :c4928; :b :c4929; :b :c4930; :b :c4931; :b :c4932; :b :c4933; :b :c4934; :b :c4935; :b :c4936; :b :c4937; :b :c4938; :b :c4939; :b :c4940; :b :c4941; :b :c4942; :b :c4943; :b :c4944; :b :c4945; :b :c4946; :b :c4947; :b :c4948; :b :c4949; :b :c4950; :b :c4951; :b :c4952; :b :c4953; :b :c4954; :b :c4955; :b :c4956; :b :c4957; :b :c4958; :b :c4959; :b :c4960; :b :c4961; :b :c4962; :b :c4963; :b :c4964; :b :c4965; :b :c4966; :b :c4967; :b :c4968; :b :c4969; :b :c4970; :b :c4971; :b :c4972; :b :c4973; :b :c4974; :b :c4975; :b :c4976; :b :c4977; :b :c4978; :b :c4979; :b :c4980; :b :c4981; :b :c4982; :b :c4983; :b :c4984; :b :c4985; :b :c4986; :b :c4987; :b :c4988; :b :c4989; :b :c4990; :b :c4991; :b :c4992; :b :c4993; :b :c4994; :b :c4995; :b :c4996; :b :c4997; :b :c4998; :b :c4999; :b :c5000; :b :c5001; :b :c5002; :b :c5003; :b :c5004; :b :c5005; :b :c5006; :b :c5007; :b :c5008; :b :c5009; :b :c5010; :b :c5011; :b :c5012; :b :c5013; :b :c5014; :b :c5015; :b :c5016; :b :c5017; :b :c5018; :b :c5019; :b :c5020; :b :c5021; :b :c5022; :b :c5023; :b :c5024; :b :c5025; :b :c5026; :b :c5027; :b :c5028; :b :c5029; :b :c5030; :b :c5031; :b :c5032; :b :c5033; :b :c5034; :b :c5035; :b :c5036; :b :c5037; :b :c5038; :b :c5039; :b :c5040; :b :c5041; :b :c5042; :b :c5043; :b :c5044; :b :c5045; :b :c5046; :b :c5047; :b :c5048; :b :c5049; :b :c5050; :b :c5051; :b :c5052; :b :c5053; :b :c5054; :b :c5055; :b :c5056; :b :c5057; :b :c5058; :b :c5059; :b :c5060; :b :c5061; :b :c5062; :b :c5063; :b :c5064; :b :c5065; :b :c5066; :b :c5067; :b :c5068; :b :c5069; :b :c5070; :b :c5071; :b :c5072; :b :c5073; :b :c5074; :b :c5075; :b :c5076; :b :c5077; :b :c5078; :b :c5079; :b :c5080; :b :c5081; :b :c5082; :b :c5083; :b :c5084; :b :c5085; :b :c5086; :b :c5087; :b :c5088; :b :c5089; :b :c5090; :b :c5091; :b :c5092; :b :c5093; :b :c5094; :b :c5095; :b :c5096; :b :c5097; :b :c5098; :b :c5099; :b :c5100; :b :c5101; :b :c5102; :b :c5103; :b :c5104; :b :c5105; :b :c5106; :b :c5107; :b :c5108; :b :c5109; :b :c5110; :b :c5111; :b :c5112; :b :c5113; :b :c5114; :b :c5115; :b :c5116; :b :c5117; :b :c5118; :b :c5119; :b :c5120; :b :c5121; :b :c5122; :b :c5123; :b :c5124; :b :c5125; :b :c5126; :b :c5127; :b :c5128; :b :c5129; :b :c5130; :b :c5131; :b :c5132; :b :c5133; :b :c5134; :b :c5135; :b :c5136; :b :c5137; :b :c5138; :b :c5139; :b :c5140; :b :c5141; :b :c5142; :b :c5143; :b :c5144; :b :c5145; :b :c5146; :b :c5147; :b :c5148; :b :c5149; :b :c5150; :b :c5151; :b :c5152; :b :c5153; :b :c5154; :b :c5155; :b :c5156; :b :c5157; :b :c5158; :b :c5159; :b :c5160; :b :c5161; :b :c5162; :b :c5163; :b :c5164; :b :c5165; :b :c5166; :b :c5167; :b :c5168; :b :c5169; :b :c5170; :b :c5171; :b :c5172; :b :c5173; :b :c5174; :b :c5175; :b :c5176; :b :c5177; :b :c5178; :b :c5179; :b :c5180; :b :c5181; :b :c5182; :b :c5183; :b :c5184; :b :c5185; :b :c5186; :b :c5187; :b :c5188; :b :c5189; :b :c5190; :b :c5191; :b :c5192; :b :c5193; :b :c5194; :b :c5195; :b :c5196; :b :c5197; :b :c5198; :b :c5199; :b :c5200; :b :c5201; :b :c5202; :b :c5203; :b :c5204; :b :c5205; :b :c5206; :b :c5207; :b :c5208; :b :c5209; :b :c5210; :b :c5211; :b :c5212; :b :c5213; :b :c5214; :b :c5215; :b :c5216; :b :c5217; :b :c5218; :b :c5219; :b :c5220; :b :c5221; :b :c5222; :b :c5223; :b :c5224; :b :c5225; :b :c5226; :b :c5227; :b :c5228; :b :c5229; :b :c5230; :b :c5231; :b :c5232; :b :c5233; :b :c5234; :b :c5235; :b :c5236; :b :c5237; :b :c5238; :b :c5239; :b :c5240; :b :c5241; :b :c5242; :b :c5243; :b :c5244; :b :c5245; :b :c5246; :b :c5247; :b :c5248; :b :c5249; :b :c5250; :b :c5251; :b :c5252; :b :c5253; :b :c5254; :b :c5255; :b :c5256; :b :c5257; :b :c5258; :b :c5259; :b :c5260; :b :c5261; :b :c5262; :b :c5263; :b :c5264; :b :c5265; :b :c5266; :b :c5267; :b :c5268; :b :c5269; :b :c5270; :b :c5271; :b :c5272; :b :c5273; :b :c5274; :b :c5275; :b :c5276; :b :c5277; :b :c5278; :b :c5279; :b :c5280; :b :c5281; :b :c5282; :b :c5283; :b :c5284; :b :c5285; :b :c5286; :b :c5287; :b :c5288; :b :c5289; :b :c5290; :b :c5291; :b :c5292; :b :c5293; :b :c5294; :b :c5295; :b :c5296; :b :c5297; :b :c5298; :b :c5299; :b :c5300; :b :c5301; :b :c5302; :b :c5303; :b :c5304; :b :c5305; :b :c5306; :b :c5307; :b :c5308; :b :c5309; :b :c5310; :b :c5311; :b :c5312; :b :c5313; :b :c5314; :b :c5315; :b :c5316; :b :c5317; :b :c5318; :b :c5319; :b :c5320; :b :c5321; :b :c5322; :b :c5323; :b :c5324; :b :c5325; :b :c5326; :b :c5327; :b :c5328; :b :c5329; :b :c5330; :b :c5331; :b :c5332; :b :c5333; :b :c5334; :b :c5335; :b :c5336; :b :c5337; :b :c5338; :b :c5339; :b :c5340; :b :c5341; :b :c5342; :b :c5343; :b :c5344; :b :c5345; :b :c5346; :b :c5347; :b :c5348; :b :c5349; :b :c5350; :b :c5351; :b :c5352; :b :c5353; :b :c5354; :b :c5355; :b :c5356; :b :c5357; :b :c5358; :b :c5359; :b :c5360; :b :c5361; :b :c5362; :b :c5363; :b :c5364; :b :c5365; :b :c5366; :b :c5367; :b :c5368; :b :c5369; :b :c5370; :b :c5371; :b :c5372; :b :c5373; :b :c5374; :b :c5375; :b :c5376; :b :c5377; :b :c5378; :b :c5379; :b :c5380; :b :c5381; :b :c5382; :b :c5383; :b :c5384; :b :c5385; :b :c5386; :b :c5387; :b :c5388; :b :c5389; :b :c5390; :b :c5391; :b :c5392; :b :c5393; :b :c5394; :b :c5395; :b :c5396; :b :c5397; :b :c5398; :b :c5399; :b :c5400; :b :c5401; :b :c5402; :b :c5403; :b :c5404; :b :c5405; :b :c5406; :b :c5407; :b :c5408; :b :c5409; :b :c5410; :b :c5411; :b :c5412; :b :c5413; :b :c5414; :b :c5415; :b :c5416; :b :c5417; :b :c5418; :b :c5419; :b :c5420; :b :c5421; :b :c5422; :b :c5423; :b :c5424; :b :c5425; :b :c5426; :b :c5427; :b :c5428; :b :c5429; :b :c5430; :b :c5431; :b :c5432; :b :c5433; :b :c5434; :b :c5435; :b :c5436; :b :c5437; :b :c5438; :b :c5439; :b :c5440; :b :c5441; :b :c5442; :b :c5443; :b :c5444; :b :c5445; :b :c5446; :b :c5447; :b :c5448; :b :c5449; :b :c5450; :b :c5451; :b :c5452; :b :c5453; :b :c5454; :b :c5455; :b :c5456; :b :c5457; :b :c5458; :b :c5459; :b :c5460; :b :c5461; :b :c5462; :b :c5463; :b :c5464; :b :c5465; :b :c5466; :b :c5467; :b :c5468; :b :c5469; :b :c5470; :b :c5471; :b :c5472; :b :c5473; :b :c5474; :b :c5475; :b :c5476; :b :c5477; :b :c5478; :b :c5479; :b :c5480; :b :c5481; :b :c5482; :b :c5483; :b :c5484; :b :c5485; :b :c5486; :b :c5487; :b :c5488; :b :c5489; :b :c5490; :b :c5491; :b :c5492; :b :c5493; :b :c5494; :b :c5495; :b :c5496; :b :c5497; :b :c5498; :b :c5499; :b :c5500; :b :c5501; :b :c5502; :b :c5503; :b :c5504; :b :c5505; :b :c5506; :b :c5507; :b :c5508; :b :c5509; :b :c5510; :b :c5511; :b :c5512; :b :c5513; :b :c5514; :b :c5515; :b :c5516; :b :c5517; :b :c5518; :b :c5519; :b :c5520; :b :c5521; :b :c5522; :b :c5523; :b :c5524; :b :c5525; :b :c5526; :b :c5527; :b :c5528; :b :c5529; :b :c5530; :b :c5531; :b :c5532; :b :c5533; :b :c5534; :b :c5535; :b :c5536; :b :c5537; :b :c5538; :b :c5539; :b :c5540; :b :c5541; :b :c5542; :b :c5543; :b :c5544; :b :c5545; :b :c5546; :b :c5547; :b :c5548; :b :c5549; :b :c5550; :b :c5551; :b :c5552; :b :c5553; :b :c5554; :b :c5555; :b :c5556; :b :c5557; :b :c5558; :b :c5559; :b :c5560; :b :c5561; :b :c5562; :b :c5563; :b :c5564; :b :c5565; :b :c5566; :b :c5567; :b :c5568; :b :c5569; :b :c5570; :b :c5571; :b :c5572; :b :c5573; :b :c5574; :b :c5575; :b :c5576; :b :c5577; :b :c5578; :b :c5579; :b :c5580; :b :c5581; :b :c5582; :b :c5583; :b :c5584; :b :c5585; :b :c5586; :b :c5587; :b :c5588; :b :c5589; :b :c5590; :b :c5591; :b :c5592; :b :c5593; :b :c5594; :b :c5595; :b :c5596; :b :c5597; :b :c5598; :b :c5599; :b :c5600; :b :c5601; :b :c5602; :b :c5603; :b :c5604; :b :c5605; :b :c5606; :b :c5607; :b :c5608; :b :c5609; :b :c5610; :b :c5611; :b :c5612; :b :c5613; :b :c5614; :b :c5615; :b :c5616; :b :c5617; :b :c5618; :b :c5619; :b :c5620; :b :c5621; :b :c5622; :b :c5623; :b :c5624; :b :c5625; :b :c5626; :b :c5627; :b :c5628; :b :c5629; :b :c5630; :b :c5631; :b :c5632; :b :c5633; :b :c5634; :b :c5635; :b :c5636; :b :c5637; :b :c5638; :b :c5639; :b :c5640; :b :c5641; :b :c5642; :b :c5643; :b :c5644; :b :c5645; :b :c5646; :b :c5647; :b :c5648; :b :c5649; :b :c5650; :b :c5651; :b :c5652; :b :c5653; :b :c5654; :b :c5655; :b :c5656; :b :c5657; :b :c5658; :b :c5659; :b :c5660; :b :c5661; :b :c5662; :b :c5663; :b :c5664; :b :c5665; :b :c5666; :b :c5667; :b :c5668; :b :c5669; :b :c5670; :b :c5671; :b :c5672; :b :c5673; :b :c5674; :b :c5675; :b :c5676; :b :c5677; :b :c5678; :b :c5679; :b :c5680; :b :c5681; :b :c5682; :b :c5683; :b :c5684; :b :c5685; :b :c5686; :b :c5687; :b :c5688; :b :c5689; :b :c5690; :b :c5691; :b :c5692; :b :c5693; :b :c5694; :b :c5695; :b :c5696; :b :c5697; :b :c5698; :b :c5699; :b :c5700; :b :c5701; :b :c5702; :b :c5703; :b :c5704; :b :c5705; :b :c5706; :b :c5707; :b :c5708; :b :c5709; :b :c5710; :b :c5711; :b :c5712; :b :c5713; :b :c5714; :b :c5715; :b :c5716; :b :c5717; :b :c5718; :b :c5719; :b :c5720; :b :c5721; :b :c5722; :b :c5723; :b :c5724; :b :c5725; :b :c5726; :b :c5727; :b :c5728; :b :c5729; :b :c5730; :b :c5731; :b :c5732; :b :c5733; :b :c5734; :b :c5735; :b :c5736; :b :c5737; :b :c5738; :b :c5739; :b :c5740; :b :c5741; :b :c5742; :b :c5743; :b :c5744; :b :c5745; :b :c5746; :b :c5747; :b :c5748; :b :c5749; :b :c5750; :b :c5751; :b :c5752; :b :c5753; :b :c5754; :b :c5755; :b :c5756; :b :c5757; :b :c5758; :b :c5759; :b :c5760; :b :c5761; :b :c5762; :b :c5763; :b :c5764; :b :c5765; :b :c5766; :b :c5767; :b :c5768; :b :c5769; :b :c5770; :b :c5771; :b :c5772; :b :c5773; :b :c5774; :b :c5775; :b :c5776; :b :c5777; :b :c5778; :b :c5779; :b :c5780; :b :c5781; :b :c5782; :b :c5783; :b :c5784; :b :c5785; :b :c5786; :b :c5787; :b :c5788; :b :c5789; :b :c5790; :b :c5791; :b :c5792; :b :c5793; :b :c5794; :b :c5795; :b :c5796; :b :c5797; :b :c5798; :b :c5799; :b :c5800; :b :c5801; :b :c5802; :b :c5803; :b :c5804; :b :c5805; :b :c5806; :b :c5807; :b :c5808; :b :c5809; :b :c5810; :b :c5811; :b :c5812; :b :c5813; :b :c5814; :b :c5815; :b :c5816; :b :c5817; :b :c5818; :b :c5819; :b :c5820; :b :c5821; :b :c5822; :b :c5823; :b :c5824; :b :c5825; :b :c5826; :b :c5827; :b :c5828; :b :c5829; :b :c5830; :b :c5831; :b :c5832; :b :c5833; :b :c5834; :b :c5835; :b :c5836; :b :c5837; :b :c5838; :b :c5839; :b :c5840; :b :c5841; :b :c5842; :b :c5843; :b :c5844; :b :c5845; :b :c5846; :b :c5847; :b :c5848; :b :c5849; :b :c5850; :b :c5851; :b :c5852; :b :c5853; :b :c5854; :b :c5855; :b :c5856; :b :c5857; :b :c5858; :b :c5859; :b :c5860; :b :c5861; :b :c5862; :b :c5863; :b :c5864; :b :c5865; :b :c5866; :b :c5867; :b :c5868; :b :c5869; :b :c5870; :b :c5871; :b :c5872; :b :c5873; :b :c5874; :b :c5875; :b :c5876; :b :c5877; :b :c5878; :b :c5879; :b :c5880; :b :c5881; :b :c5882; :b :c5883; :b :c5884; :b :c5885; :b :c5886; :b :c5887; :b :c5888; :b :c5889; :b :c5890; :b :c5891; :b :c5892; :b :c5893; :b :c5894; :b :c5895; :b :c5896; :b :c5897; :b :c5898; :b :c5899; :b :c5900; :b :c5901; :b :c5902; :b :c5903; :b :c5904; :b :c5905; :b :c5906; :b :c5907; :b :c5908; :b :c5909; :b :c5910; :b :c5911; :b :c5912; :b :c5913; :b :c5914; :b :c5915; :b :c5916; :b :c5917; :b :c5918; :b :c5919; :b :c5920; :b :c5921; :b :c5922; :b :c5923; :b :c5924; :b :c5925; :b :c5926; :b :c5927; :b :c5928; :b :c5929; :b :c5930; :b :c5931; :b :c5932; :b :c5933; :b :c5934; :b :c5935; :b :c5936; :b :c5937; :b :c5938; :b :c5939; :b :c5940; :b :c5941; :b :c5942; :b :c5943; :b :c5944; :b :c5945; :b :c5946; :b :c5947; :b :c5948; :b :c5949; :b :c5950; :b :c5951; :b :c5952; :b :c5953; :b :c5954; :b :c5955; :b :c5956; :b :c5957; :b :c5958; :b :c5959; :b :c5960; :b :c5961; :b :c5962; :b :c5963; :b :c5964; :b :c5965; :b :c5966; :b :c5967; :b :c5968; :b :c5969; :b :c5970; :b :c5971; :b :c5972; :b :c5973; :b :c5974; :b :c5975; :b :c5976; :b :c5977; :b :c5978; :b :c5979; :b :c5980; :b :c5981; :b :c5982; :b :c5983; :b :c5984; :b :c5985; :b :c5986; :b :c5987; :b :c5988; :b :c5989; :b :c5990; :b :c5991; :b :c5992; :b :c5993; :b :c5994; :b :c5995; :b :c5996; :b :c5997; :b :c5998; :b :c5999; :b :c6000; :b :c6001; :b :c6002; :b :c6003; :b :c6004; :b :c6005; :b :c6006; :b :c6007; :b :c6008; :b :c6009; :b :c6010; :b :c6011; :b :c6012; :b :c6013; :b :c6014; :b :c6015; :b :c6016; :b :c6017; :b :c6018; :b :c6019; :b :c6020; :b :c6021; :b :c6022; :b :c6023; :b :c6024; :b :c6025; :b :c6026; :b :c6027; :b :c6028; :b :c6029; :b :c6030; :b :c6031; :b :c6032; :b :c6033; :b :c6034; :b :c6035; :b :c6036; :b :c6037; :b :c6038; :b :c6039; :b :c6040; :b :c6041; :b :c6042; :b :c6043; :b :c6044; :b :c6045; :b :c6046; :b :c6047; :b :c6048; :b :c6049; :b :c6050; :b :c6051; :b :c6052; :b :c6053; :b :c6054; :b :c6055; :b :c6056; :b :c6057; :b :c6058; :b :c6059; :b :c6060; :b :c6061; :b :c6062; :b :c6063; :b :c6064; :b :c6065; :b :c6066; :b :c6067; :b :c6068; :b :c6069; :b :c6070; :b :c6071; :b :c6072; :b :c6073; :b :c6074; :b :c6075; :b :c6076; :b :c6077; :b :c6078; :b :c6079; :b :c6080; :b :c6081; :b :c6082; :b :c6083; :b :c6084; :b :c6085; :b :c6086; :b :c6087; :b :c6088; :b :c6089; :b :c6090; :b :c6091; :b :c6092; :b :c6093; :b :c6094; :b :c6095; :b :c6096; :b :c6097; :b :c6098; :b :c6099; :b :c6100; :b :c6101; :b :c6102; :b :c6103; :b :c6104; :b :c6105; :b :c6106; :b :c6107; :b :c6108; :b :c6109; :b :c6110; :b :c6111; :b :c6112; :b :c6113; :b :c6114; :b :c6115; :b :c6116; :b :c6117; :b :c6118; :b :c6119; :b :c6120; :b :c6121; :b :c6122; :b :c6123; :b :c6124; :b :c6125; :b :c6126; :b :c6127; :b :c6128; :b :c6129; :b :c6130; :b :c6131; :b :c6132; :b :c6133; :b :c6134; :b :c6135; :b :c6136; :b :c6137; :b :c6138; :b :c6139; :b :c6140; :b :c6141; :b :c6142; :b :c6143; :b :c6144; :b :c6145; :b :c6146; :b :c6147; :b :c6148; :b :c6149; :b :c6150; :b :c6151; :b :c6152; :b :c6153; :b :c6154; :b :c6155; :b :c6156; :b :c6157; :b :c6158; :b :c6159; :b :c6160; :b :c6161; :b :c6162; :b :c6163; :b :c6164; :b :c6165; :b :c6166; :b :c6167; :b :c6168; :b :c6169; :b :c6170; :b :c6171; :b :c6172; :b :c6173; :b :c6174; :b :c6175; :b :c6176; :b :c6177; :b :c6178; :b :c6179; :b :c6180; :b :c6181; :b :c6182; :b :c6183; :b :c6184; :b :c6185; :b :c6186; :b :c6187; :b :c6188; :b :c6189; :b :c6190; :b :c6191; :b :c6192; :b :c6193; :b :c6194; :b :c6195; :b :c6196; :b :c6197; :b :c6198; :b :c6199; :b :c6200; :b :c6201; :b :c6202; :b :c6203; :b :c6204; :b :c6205; :b :c6206; :b :c6207; :b :c6208; :b :c6209; :b :c6210; :b :c6211; :b :c6212; :b :c6213; :b :c6214; :b :c6215; :b :c6216; :b :c6217; :b :c6218; :b :c6219; :b :c6220; :b :c6221; :b :c6222; :b :c6223; :b :c6224; :b :c6225; :b :c6226; :b :c6227; :b :c6228; :b :c6229; :b :c6230; :b :c6231; :b :c6232; :b :c6233; :b :c6234; :b :c6235; :b :c6236; :b :c6237; :b :c6238; :b :c6239; :b :c6240; :b :c6241; :b :c6242; :b :c6243; :b :c6244; :b :c6245; :b :c6246; :b :c6247; :b :c6248; :b :c6249; :b :c6250; :b :c6251; :b :c6252; :b :c6253; :b :c6254; :b :c6255; :b :c6256; :b :c6257; :b :c6258; :b :c6259; :b :c6260; :b :c6261; :b :c6262; :b :c6263; :b :c6264; :b :c6265; :b :c6266; :b :c6267; :b :c6268; :b :c6269; :b :c6270; :b :c6271; :b :c6272; :b :c6273; :b :c6274; :b :c6275; :b :c6276; :b :c6277; :b :c6278; :b :c6279; :b :c6280; :b :c6281; :b :c6282; :b :c6283; :b :c6284; :b :c6285; :b :c6286; :b :c6287; :b :c6288; :b :c6289; :b :c6290; :b :c6291; :b :c6292; :b :c6293; :b :c6294; :b :c6295; :b :c6296; :b :c6297; :b :c6298; :b :c6299; :b :c6300; :b :c6301; :b :c6302; :b :c6303; :b :c6304; :b :c6305; :b :c6306; :b :c6307; :b :c6308; :b :c6309; :b :c6310; :b :c6311; :b :c6312; :b :c6313; :b :c6314; :b :c6315; :b :c6316; :b :c6317; :b :c6318; :b :c6319; :b :c6320; :b :c6321; :b :c6322; :b :c6323; :b :c6324; :b :c6325; :b :c6326; :b :c6327; :b :c6328; :b :c6329; :b :c6330; :b :c6331; :b :c6332; :b :c6333; :b :c6334; :b :c6335; :b :c6336; :b :c6337; :b :c6338; :b :c6339; :b :c6340; :b :c6341; :b :c6342; :b :c6343; :b :c6344; :b :c6345; :b :c6346; :b :c6347; :b :c6348; :b :c6349; :b :c6350; :b :c6351; :b :c6352; :b :c6353; :b :c6354; :b :c6355; :b :c6356; :b :c6357; :b :c6358; :b :c6359; :b :c6360; :b :c6361; :b :c6362; :b :c6363; :b :c6364; :b :c6365; :b :c6366; :b :c6367; :b :c6368; :b :c6369; :b :c6370; :b :c6371; :b :c6372; :b :c6373; :b :c6374; :b :c6375; :b :c6376; :b :c6377; :b :c6378; :b :c6379; :b :c6380; :b :c6381; :b :c6382; :b :c6383; :b :c6384; :b :c6385; :b :c6386; :b :c6387; :b :c6388; :b :c6389; :b :c6390; :b :c6391; :b :c6392; :b :c6393; :b :c6394; :b :c6395; :b :c6396; :b :c6397; :b :c6398; :b :c6399; :b :c6400; :b :c6401; :b :c6402; :b :c6403; :b :c6404; :b :c6405; :b :c6406; :b :c6407; :b :c6408; :b :c6409; :b :c6410; :b :c6411; :b :c6412; :b :c6413; :b :c6414; :b :c6415; :b :c6416; :b :c6417; :b :c6418; :b :c6419; :b :c6420; :b :c6421; :b :c6422; :b :c6423; :b :c6424; :b :c6425; :b :c6426; :b :c6427; :b :c6428; :b :c6429; :b :c6430; :b :c6431; :b :c6432; :b :c6433; :b :c6434; :b :c6435; :b :c6436; :b :c6437; :b :c6438; :b :c6439; :b :c6440; :b :c6441; :b :c6442; :b :c6443; :b :c6444; :b :c6445; :b :c6446; :b :c6447; :b :c6448; :b :c6449; :b :c6450; :b :c6451; :b :c6452; :b :c6453; :b :c6454; :b :c6455; :b :c6456; :b :c6457; :b :c6458; :b :c6459; :b :c6460; :b :c6461; :b :c6462; :b :c6463; :b :c6464; :b :c6465; :b :c6466; :b :c6467; :b :c6468; :b :c6469; :b :c6470; :b :c6471; :b :c6472; :b :c6473; :b :c6474; :b :c6475; :b :c6476; :b :c6477; :b :c6478; :b :c6479; :b :c6480; :b :c6481; :b :c6482; :b :c6483; :b :c6484; :b :c6485; :b :c6486; :b :c6487; :b :c6488; :b :c6489; :b :c6490; :b :c6491; :b :c6492; :b :c6493; :b :c6494; :b :c6495; :b :c6496; :b :c6497; :b :c6498; :b :c6499; :b :c6500; :b :c6501; :b :c6502; :b :c6503; :b :c6504; :b :c6505; :b :c6506; :b :c6507; :b :c6508; :b :c6509; :b :c6510; :b :c6511; :b :c6512; :b :c6513; :b :c6514; :b :c6515; :b :c6516; :b :c6517; :b :c6518; :b :c6519; :b :c6520; :b :c6521; :b :c6522; :b :c6523; :b :c6524; :b :c6525; :b :c6526; :b :c6527; :b :c6528; :b :c6529; :b :c6530; :b :c6531; :b :c6532; :b :c6533; :b :c6534; :b :c6535; :b :c6536; :b :c6537; :b :c6538; :b :c6539; :b :c6540; :b :c6541; :b :c6542; :b :c6543; :b :c6544; :b :c6545; :b :c6546; :b :c6547; :b :c6548; :b :c6549; :b :c6550; :b :c6551; :b :c6552; :b :c6553; :b :c6554; :b :c6555; :b :c6556; :b :c6557; :b :c6558; :b :c6559; :b :c6560; :b :c6561; :b :c6562; :b :c6563; :b :c6564; :b :c6565; :b :c6566; :b :c6567; :b :c6568; :b :c6569; :b :c6570; :b :c6571; :b :c6572; :b :c6573; :b :c6574; :b :c6575; :b :c6576; :b :c6577; :b :c6578; :b :c6579; :b :c6580; :b :c6581; :b :c6582; :b :c6583; :b :c6584; :b :c6585; :b :c6586; :b :c6587; :b :c6588; :b :c6589; :b :c6590; :b :c6591; :b :c6592; :b :c6593; :b :c6594; :b :c6595; :b :c6596; :b :c6597; :b :c6598; :b :c6599; :b :c6600; :b :c6601; :b :c6602; :b :c6603; :b :c6604; :b :c6605; :b :c6606; :b :c6607; :b :c6608; :b :c6609; :b :c6610; :b :c6611; :b :c6612; :b :c6613; :b :c6614; :b :c6615; :b :c6616; :b :c6617; :b :c6618; :b :c6619; :b :c6620; :b :c6621; :b :c6622; :b :c6623; :b :c6624; :b :c6625; :b :c6626; :b :c6627; :b :c6628; :b :c6629; :b :c6630; :b :c6631; :b :c6632; :b :c6633; :b :c6634; :b :c6635; :b :c6636; :b :c6637; :b :c6638; :b :c6639; :b :c6640; :b :c6641; :b :c6642; :b :c6643; :b :c6644; :b :c6645; :b :c6646; :b :c6647; :b :c6648; :b :c6649; :b :c6650; :b :c6651; :b :c6652; :b :c6653; :b :c6654; :b :c6655; :b :c6656; :b :c6657; :b :c6658; :b :c6659; :b :c6660; :b :c6661; :b :c6662; :b :c6663; :b :c6664; :b :c6665; :b :c6666; :b :c6667; :b :c6668; :b :c6669; :b :c6670; :b :c6671; :b :c6672; :b :c6673; :b :c6674; :b :c6675; :b :c6676; :b :c6677; :b :c6678; :b :c6679; :b :c6680; :b :c6681; :b :c6682; :b :c6683; :b :c6684; :b :c6685; :b :c6686; :b :c6687; :b :c6688; :b :c6689; :b :c6690; :b :c6691; :b :c6692; :b :c6693; :b :c6694; :b :c6695; :b :c6696; :b :c6697; :b :c6698; :b :c6699; :b :c6700; :b :c6701; :b :c6702; :b :c6703; :b :c6704; :b :c6705; :b :c6706; :b :c6707; :b :c6708; :b :c6709; :b :c6710; :b :c6711; :b :c6712; :b :c6713; :b :c6714; :b :c6715; :b :c6716; :b :c6717; :b :c6718; :b :c6719; :b :c6720; :b :c6721; :b :c6722; :b :c6723; :b :c6724; :b :c6725; :b :c6726; :b :c6727; :b :c6728; :b :c6729; :b :c6730; :b :c6731; :b :c6732; :b :c6733; :b :c6734; :b :c6735; :b :c6736; :b :c6737; :b :c6738; :b :c6739; :b :c6740; :b :c6741; :b :c6742; :b :c6743; :b :c6744; :b :c6745; :b :c6746; :b :c6747; :b :c6748; :b :c6749; :b :c6750; :b :c6751; :b :c6752; :b :c6753; :b :c6754; :b :c6755; :b :c6756; :b :c6757; :b :c6758; :b :c6759; :b :c6760; :b :c6761; :b :c6762; :b :c6763; :b :c6764; :b :c6765; :b :c6766; :b :c6767; :b :c6768; :b :c6769; :b :c6770; :b :c6771; :b :c6772; :b :c6773; :b :c6774; :b :c6775; :b :c6776; :b :c6777; :b :c6778; :b :c6779; :b :c6780; :b :c6781; :b :c6782; :b :c6783; :b :c6784; :b :c6785; :b :c6786; :b :c6787; :b :c6788; :b :c6789; :b :c6790; :b :c6791; :b :c6792; :b :c6793; :b :c6794; :b :c6795; :b :c6796; :b :c6797; :b :c6798; :b :c6799; :b :c6800; :b :c6801; :b :c6802; :b :c6803; :b :c6804; :b :c6805; :b :c6806; :b :c6807; :b :c6808; :b :c6809; :b :c6810; :b :c6811; :b :c6812; :b :c6813; :b :c6814; :b :c6815; :b :c6816; :b :c6817; :b :c6818; :b :c6819; :b :c6820; :b :c6821; :b :c6822; :b :c6823; :b :c6824; :b :c6825; :b :c6826; :b :c6827; :b :c6828; :b :c6829; :b :c6830; :b :c6831; :b :c6832; :b :c6833; :b :c6834; :b :c6835; :b :c6836; :b :c6837; :b :c6838; :b :c6839; :b :c6840; :b :c6841; :b :c6842; :b :c6843; :b :c6844; :b :c6845; :b :c6846; :b :c6847; :b :c6848; :b :c6849; :b :c6850; :b :c6851; :b :c6852; :b :c6853; :b :c6854; :b :c6855; :b :c6856; :b :c6857; :b :c6858; :b :c6859; :b :c6860; :b :c6861; :b :c6862; :b :c6863; :b :c6864; :b :c6865; :b :c6866; :b :c6867; :b :c6868; :b :c6869; :b :c6870; :b :c6871; :b :c6872; :b :c6873; :b :c6874; :b :c6875; :b :c6876; :b :c6877; :b :c6878; :b :c6879; :b :c6880; :b :c6881; :b :c6882; :b :c6883; :b :c6884; :b :c6885; :b :c6886; :b :c6887; :b :c6888; :b :c6889; :b :c6890; :b :c6891; :b :c6892; :b :c6893; :b :c6894; :b :c6895; :b :c6896; :b :c6897; :b :c6898; :b :c6899; :b :c6900; :b :c6901; :b :c6902; :b :c6903; :b :c6904; :b :c6905; :b :c6906; :b :c6907; :b :c6908; :b :c6909; :b :c6910; :b :c6911; :b :c6912; :b :c6913; :b :c6914; :b :c6915; :b :c6916; :b :c6917; :b :c6918; :b :c6919; :b :c6920; :b :c6921; :b :c6922; :b :c6923; :b :c6924; :b :c6925; :b :c6926; :b :c6927; :b :c6928; :b :c6929; :b :c6930; :b :c6931; :b :c6932; :b :c6933; :b :c6934; :b :c6935; :b :c6936; :b :c6937; :b :c6938; :b :c6939; :b :c6940; :b :c6941; :b :c6942; :b :c6943; :b :c6944; :b :c6945; :b :c6946; :b :c6947; :b :c6948; :b :c6949; :b :c6950; :b :c6951; :b :c6952; :b :c6953; :b :c6954; :b :c6955; :b :c6956; :b :c6957; :b :c6958; :b :c6959; :b :c6960; :b :c6961; :b :c6962; :b :c6963; :b :c6964; :b :c6965; :b :c6966; :b :c6967; :b :c6968; :b :c6969; :b :c6970; :b :c6971; :b :c6972; :b :c6973; :b :c6974; :b :c6975; :b :c6976; :b :c6977; :b :c6978; :b :c6979; :b :c6980; :b :c6981; :b :c6982; :b :c6983; :b :c6984; :b :c6985; :b :c6986; :b :c6987; :b :c6988; :b :c6989; :b :c6990; :b :c6991; :b :c6992; :b :c6993; :b :c6994; :b :c6995; :b :c6996; :b :c6997; :b :c6998; :b :c6999; :b :c7000; :b :c7001; :b :c7002; :b :c7003; :b :c7004; :b :c7005; :b :c7006; :b :c7007; :b :c7008; :b :c7009; :b :c7010; :b :c7011; :b :c7012; :b :c7013; :b :c7014; :b :c7015; :b :c7016; :b :c7017; :b :c7018; :b :c7019; :b :c7020; :b :c7021; :b :c7022; :b :c7023; :b :c7024; :b :c7025; :b :c7026; :b :c7027; :b :c7028; :b :c7029; :b :c7030; :b :c7031; :b :c7032; :b :c7033; :b :c7034; :b :c7035; :b :c7036; :b :c7037; :b :c7038; :b :c7039; :b :c7040; :b :c7041; :b :c7042; :b :c7043; :b :c7044; :b :c7045; :b :c7046; :b :c7047; :b :c7048; :b :c7049; :b :c7050; :b :c7051; :b :c7052; :b :c7053; :b :c7054; :b :c7055; :b :c7056; :b :c7057; :b :c7058; :b :c7059; :b :c7060; :b :c7061; :b :c7062; :b :c7063; :b :c7064; :b :c7065; :b :c7066; :b :c7067; :b :c7068; :b :c7069; :b :c7070; :b :c7071; :b :c7072; :b :c7073; :b :c7074; :b :c7075; :b :c7076; :b :c7077; :b :c7078; :b :c7079; :b :c7080; :b :c7081; :b :c7082; :b :c7083; :b :c7084; :b :c7085; :b :c7086; :b :c7087; :b :c7088; :b :c7089; :b :c7090; :b :c7091; :b :c7092; :b :c7093; :b :c7094; :b :c7095; :b :c7096; :b :c7097; :b :c7098; :b :c7099; :b :c7100; :b :c7101; :b :c7102; :b :c7103; :b :c7104; :b :c7105; :b :c7106; :b :c7107; :b :c7108; :b :c7109; :b :c7110; :b :c7111; :b :c7112; :b :c7113; :b :c7114; :b :c7115; :b :c7116; :b :c7117; :b :c7118; :b :c7119; :b :c7120; :b :c7121; :b :c7122; :b :c7123; :b :c7124; :b :c7125; :b :c7126; :b :c7127; :b :c7128; :b :c7129; :b :c7130; :b :c7131; :b :c7132; :b :c7133; :b :c7134; :b :c7135; :b :c7136; :b :c7137; :b :c7138; :b :c7139; :b :c7140; :b :c7141; :b :c7142; :b :c7143; :b :c7144; :b :c7145; :b :c7146; :b :c7147; :b :c7148; :b :c7149; :b :c7150; :b :c7151; :b :c7152; :b :c7153; :b :c7154; :b :c7155; :b :c7156; :b :c7157; :b :c7158; :b :c7159; :b :c7160; :b :c7161; :b :c7162; :b :c7163; :b :c7164; :b :c7165; :b :c7166; :b :c7167; :b :c7168; :b :c7169; :b :c7170; :b :c7171; :b :c7172; :b :c7173; :b :c7174; :b :c7175; :b :c7176; :b :c7177; :b :c7178; :b :c7179; :b :c7180; :b :c7181; :b :c7182; :b :c7183; :b :c7184; :b :c7185; :b :c7186; :b :c7187; :b :c7188; :b :c7189; :b :c7190; :b :c7191; :b :c7192; :b :c7193; :b :c7194; :b :c7195; :b :c7196; :b :c7197; :b :c7198; :b :c7199; :b :c7200; :b :c7201; :b :c7202; :b :c7203; :b :c7204; :b :c7205; :b :c7206; :b :c7207; :b :c7208; :b :c7209; :b :c7210; :b :c7211; :b :c7212; :b :c7213; :b :c7214; :b :c7215; :b :c7216; :b :c7217; :b :c7218; :b :c7219; :b :c7220; :b :c7221; :b :c7222; :b :c7223; :b :c7224; :b :c7225; :b :c7226; :b :c7227; :b :c7228; :b :c7229; :b :c7230; :b :c7231; :b :c7232; :b :c7233; :b :c7234; :b :c7235; :b :c7236; :b :c7237; :b :c7238; :b :c7239; :b :c7240; :b :c7241; :b :c7242; :b :c7243; :b :c7244; :b :c7245; :b :c7246; :b :c7247; :b :c7248; :b :c7249; :b :c7250; :b :c7251; :b :c7252; :b :c7253; :b :c7254; :b :c7255; :b :c7256; :b :c7257; :b :c7258; :b :c7259; :b :c7260; :b :c7261; :b :c7262; :b :c7263; :b :c7264; :b :c7265; :b :c7266; :b :c7267; :b :c7268; :b :c7269; :b :c7270; :b :c7271; :b :c7272; :b :c7273; :b :c7274; :b :c7275; :b :c7276; :b :c7277; :b :c7278; :b :c7279; :b :c7280; :b :c7281; :b :c7282; :b :c7283; :b :c7284; :b :c7285; :b :c7286; :b :c7287; :b :c7288; :b :c7289; :b :c7290; :b :c7291; :b :c7292; :b :c7293; :b :c7294; :b :c7295; :b :c7296; :b :c7297; :b :c7298; :b :c7299; :b :c7300; :b :c7301; :b :c7302; :b :c7303; :b :c7304; :b :c7305; :b :c7306; :b :c7307; :b :c7308; :b :c7309; :b :c7310; :b :c7311; :b :c7312; :b :c7313; :b :c7314; :b :c7315; :b :c7316; :b :c7317; :b :c7318; :b :c7319; :b :c7320; :b :c7321; :b :c7322; :b :c7323; :b :c7324; :b :c7325; :b :c7326; :b :c7327; :b :c7328; :b :c7329; :b :c7330; :b :c7331; :b :c7332; :b :c7333; :b :c7334; :b :c7335; :b :c7336; :b :c7337; :b :c7338; :b :c7339; :b :c7340; :b :c7341; :b :c7342; :b :c7343; :b :c7344; :b :c7345; :b :c7346; :b :c7347; :b :c7348; :b :c7349; :b :c7350; :b :c7351; :b :c7352; :b :c7353; :b :c7354; :b :c7355; :b :c7356; :b :c7357; :b :c7358; :b :c7359; :b :c7360; :b :c7361; :b :c7362; :b :c7363; :b :c7364; :b :c7365; :b :c7366; :b :c7367; :b :c7368; :b :c7369; :b :c7370; :b :c7371; :b :c7372; :b :c7373; :b :c7374; :b :c7375; :b :c7376; :b :c7377; :b :c7378; :b :c7379; :b :c7380; :b :c7381; :b :c7382; :b :c7383; :b :c7384; :b :c7385; :b :c7386; :b :c7387; :b :c7388; :b :c7389; :b :c7390; :b :c7391; :b :c7392; :b :c7393; :b :c7394; :b :c7395; :b :c7396; :b :c7397; :b :c7398; :b :c7399; :b :c7400; :b :c7401; :b :c7402; :b :c7403; :b :c7404; :b :c7405; :b :c7406; :b :c7407; :b :c7408; :b :c7409; :b :c7410; :b :c7411; :b :c7412; :b :c7413; :b :c7414; :b :c7415; :b :c7416; :b :c7417; :b :c7418; :b :c7419; :b :c7420; :b :c7421; :b :c7422; :b :c7423; :b :c7424; :b :c7425; :b :c7426; :b :c7427; :b :c7428; :b :c7429; :b :c7430; :b :c7431; :b :c7432; :b :c7433; :b :c7434; :b :c7435; :b :c7436; :b :c7437; :b :c7438; :b :c7439; :b :c7440; :b :c7441; :b :c7442; :b :c7443; :b :c7444; :b :c7445; :b :c7446; :b :c7447; :b :c7448; :b :c7449; :b :c7450; :b :c7451; :b :c7452; :b :c7453; :b :c7454; :b :c7455; :b :c7456; :b :c7457; :b :c7458; :b :c7459; :b :c7460; :b :c7461; :b :c7462; :b :c7463; :b :c7464; :b :c7465; :b :c7466; :b :c7467; :b :c7468; :b :c7469; :b :c7470; :b :c7471; :b :c7472; :b :c7473; :b :c7474; :b :c7475; :b :c7476; :b :c7477; :b :c7478; :b :c7479; :b :c7480; :b :c7481; :b :c7482; :b :c7483; :b :c7484; :b :c7485; :b :c7486; :b :c7487; :b :c7488; :b :c7489; :b :c7490; :b :c7491; :b :c7492; :b :c7493; :b :c7494; :b :c7495; :b :c7496; :b :c7497; :b :c7498; :b :c7499; :b :c7500; :b :c7501; :b :c7502; :b :c7503; :b :c7504; :b :c7505; :b :c7506; :b :c7507; :b :c7508; :b :c7509; :b :c7510; :b :c7511; :b :c7512; :b :c7513; :b :c7514; :b :c7515; :b :c7516; :b :c7517; :b :c7518; :b :c7519; :b :c7520; :b :c7521; :b :c7522; :b :c7523; :b :c7524; :b :c7525; :b :c7526; :b :c7527; :b :c7528; :b :c7529; :b :c7530; :b :c7531; :b :c7532; :b :c7533; :b :c7534; :b :c7535; :b :c7536; :b :c7537; :b :c7538; :b :c7539; :b :c7540; :b :c7541; :b :c7542; :b :c7543; :b :c7544; :b :c7545; :b :c7546; :b :c7547; :b :c7548; :b :c7549; :b :c7550; :b :c7551; :b :c7552; :b :c7553; :b :c7554; :b :c7555; :b :c7556; :b :c7557; :b :c7558; :b :c7559; :b :c7560; :b :c7561; :b :c7562; :b :c7563; :b :c7564; :b :c7565; :b :c7566; :b :c7567; :b :c7568; :b :c7569; :b :c7570; :b :c7571; :b :c7572; :b :c7573; :b :c7574; :b :c7575; :b :c7576; :b :c7577; :b :c7578; :b :c7579; :b :c7580; :b :c7581; :b :c7582; :b :c7583; :b :c7584; :b :c7585; :b :c7586; :b :c7587; :b :c7588; :b :c7589; :b :c7590; :b :c7591; :b :c7592; :b :c7593; :b :c7594; :b :c7595; :b :c7596; :b :c7597; :b :c7598; :b :c7599; :b :c7600; :b :c7601; :b :c7602; :b :c7603; :b :c7604; :b :c7605; :b :c7606; :b :c7607; :b :c7608; :b :c7609; :b :c7610; :b :c7611; :b :c7612; :b :c7613; :b :c7614; :b :c7615; :b :c7616; :b :c7617; :b :c7618; :b :c7619; :b :c7620; :b :c7621; :b :c7622; :b :c7623; :b :c7624; :b :c7625; :b :c7626; :b :c7627; :b :c7628; :b :c7629; :b :c7630; :b :c7631; :b :c7632; :b :c7633; :b :c7634; :b :c7635; :b :c7636; :b :c7637; :b :c7638; :b :c7639; :b :c7640; :b :c7641; :b :c7642; :b :c7643; :b :c7644; :b :c7645; :b :c7646; :b :c7647; :b :c7648; :b :c7649; :b :c7650; :b :c7651; :b :c7652; :b :c7653; :b :c7654; :b :c7655; :b :c7656; :b :c7657; :b :c7658; :b :c7659; :b :c7660; :b :c7661; :b :c7662; :b :c7663; :b :c7664; :b :c7665; :b :c7666; :b :c7667; :b :c7668; :b :c7669; :b :c7670; :b :c7671; :b :c7672; :b :c7673; :b :c7674; :b :c7675; :b :c7676; :b :c7677; :b :c7678; :b :c7679; :b :c7680; :b :c7681; :b :c7682; :b :c7683; :b :c7684; :b :c7685; :b :c7686; :b :c7687; :b :c7688; :b :c7689; :b :c7690; :b :c7691; :b :c7692; :b :c7693; :b :c7694; :b :c7695; :b :c7696; :b :c7697; :b :c7698; :b :c7699; :b :c7700; :b :c7701; :b :c7702; :b :c7703; :b :c7704; :b :c7705; :b :c7706; :b :c7707; :b :c7708; :b :c7709; :b :c7710; :b :c7711; :b :c7712; :b :c7713; :b :c7714; :b :c7715; :b :c7716; :b :c7717; :b :c7718; :b :c7719; :b :c7720; :b :c7721; :b :c7722; :b :c7723; :b :c7724; :b :c7725; :b :c7726; :b :c7727; :b :c7728; :b :c7729; :b :c7730; :b :c7731; :b :c7732; :b :c7733; :b :c7734; :b :c7735; :b :c7736; :b :c7737; :b :c7738; :b :c7739; :b :c7740; :b :c7741; :b :c7742; :b :c7743; :b :c7744; :b :c7745; :b :c7746; :b :c7747; :b :c7748; :b :c7749; :b :c7750; :b :c7751; :b :c7752; :b :c7753; :b :c7754; :b :c7755; :b :c7756; :b :c7757; :b :c7758; :b :c7759; :b :c7760; :b :c7761; :b :c7762; :b :c7763; :b :c7764; :b :c7765; :b :c7766; :b :c7767; :b :c7768; :b :c7769; :b :c7770; :b :c7771; :b :c7772; :b :c7773; :b :c7774; :b :c7775; :b :c7776; :b :c7777; :b :c7778; :b :c7779; :b :c7780; :b :c7781; :b :c7782; :b :c7783; :b :c7784; :b :c7785; :b :c7786; :b :c7787; :b :c7788; :b :c7789; :b :c7790; :b :c7791; :b :c7792; :b :c7793; :b :c7794; :b :c7795; :b :c7796; :b :c7797; :b :c7798; :b :c7799; :b :c7800; :b :c7801; :b :c7802; :b :c7803; :b :c7804; :b :c7805; :b :c7806; :b :c7807; :b :c7808; :b :c7809; :b :c7810; :b :c7811; :b :c7812; :b :c7813; :b :c7814; :b :c7815; :b :c7816; :b :c7817; :b :c7818; :b :c7819; :b :c7820; :b :c7821; :b :c7822; :b :c7823; :b :c7824; :b :c7825; :b :c7826; :b :c7827; :b :c7828; :b :c7829; :b :c7830; :b :c7831; :b :c7832; :b :c7833; :b :c7834; :b :c7835; :b :c7836; :b :c7837; :b :c7838; :b :c7839; :b :c7840; :b :c7841; :b :c7842; :b :c7843; :b :c7844; :b :c7845; :b :c7846; :b :c7847; :b :c7848; :b :c7849; :b :c7850; :b :c7851; :b :c7852; :b :c7853; :b :c7854; :b :c7855; :b :c7856; :b :c7857; :b :c7858; :b :c7859; :b :c7860; :b :c7861; :b :c7862; :b :c7863; :b :c7864; :b :c7865; :b :c7866; :b :c7867; :b :c7868; :b :c7869; :b :c7870; :b :c7871; :b :c7872; :b :c7873; :b :c7874; :b :c7875; :b :c7876; :b :c7877; :b :c7878; :b :c7879; :b :c7880; :b :c7881; :b :c7882; :b :c7883; :b :c7884; :b :c7885; :b :c7886; :b :c7887; :b :c7888; :b :c7889; :b :c7890; :b :c7891; :b :c7892; :b :c7893; :b :c7894; :b :c7895; :b :c7896; :b :c7897; :b :c7898; :b :c7899; :b :c7900; :b :c7901; :b :c7902; :b :c7903; :b :c7904; :b :c7905; :b :c7906; :b :c7907; :b :c7908; :b :c7909; :b :c7910; :b :c7911; :b :c7912; :b :c7913; :b :c7914; :b :c7915; :b :c7916; :b :c7917; :b :c7918; :b :c7919; :b :c7920; :b :c7921; :b :c7922; :b :c7923; :b :c7924; :b :c7925; :b :c7926; :b :c7927; :b :c7928; :b :c7929; :b :c7930; :b :c7931; :b :c7932; :b :c7933; :b :c7934; :b :c7935; :b :c7936; :b :c7937; :b :c7938; :b :c7939; :b :c7940; :b :c7941; :b :c7942; :b :c7943; :b :c7944; :b :c7945; :b :c7946; :b :c7947; :b :c7948; :b :c7949; :b :c7950; :b :c7951; :b :c7952; :b :c7953; :b :c7954; :b :c7955; :b :c7956; :b :c7957; :b :c7958; :b :c7959; :b :c7960; :b :c7961; :b :c7962; :b :c7963; :b :c7964; :b :c7965; :b :c7966; :b :c7967; :b :c7968; :b :c7969; :b :c7970; :b :c7971; :b :c7972; :b :c7973; :b :c7974; :b :c7975; :b :c7976; :b :c7977; :b :c7978; :b :c7979; :b :c7980; :b :c7981; :b :c7982; :b :c7983; :b :c7984; :b :c7985; :b :c7986; :b :c7987; :b :c7988; :b :c7989; :b :c7990; :b :c7991; :b :c7992; :b :c7993; :b :c7994; :b :c7995; :b :c7996; :b :c7997; :b :c7998; :b :c7999; :b :c8000; :b :c8001; :b :c8002; :b :c8003; :b :c8004; :b :c8005; :b :c8006; :b :c8007; :b :c8008; :b :c8009; :b :c8010; :b :c8011; :b :c8012; :b :c8013; :b :c8014; :b :c8015; :b :c8016; :b :c8017; :b :c8018; :b :c8019; :b :c8020; :b :c8021; :b :c8022; :b :c8023; :b :c8024; :b :c8025; :b :c8026; :b :c8027; :b :c8028; :b :c8029; :b :c8030; :b :c8031; :b :c8032; :b :c8033; :b :c8034; :b :c8035; :b :c8036; :b :c8037; :b :c8038; :b :c8039; :b :c8040; :b :c8041; :b :c8042; :b :c8043; :b :c8044; :b :c8045; :b :c8046; :b :c8047; :b :c8048; :b :c8049; :b :c8050; :b :c8051; :b :c8052; :b :c8053; :b :c8054; :b :c8055; :b :c8056; :b :c8057; :b :c8058; :b :c8059; :b :c8060; :b :c8061; :b :c8062; :b :c8063; :b :c8064; :b :c8065; :b :c8066; :b :c8067; :b :c8068; :b :c8069; :b :c8070; :b :c8071; :b :c8072; :b :c8073; :b :c8074; :b :c8075; :b :c8076; :b :c8077; :b :c8078; :b :c8079; :b :c8080; :b :c8081; :b :c8082; :b :c8083; :b :c8084; :b :c8085; :b :c8086; :b :c8087; :b :c8088; :b :c8089; :b :c8090; :b :c8091; :b :c8092; :b :c8093; :b :c8094; :b :c8095; :b :c8096; :b :c8097; :b :c8098; :b :c8099; :b :c8100; :b :c8101; :b :c8102; :b :c8103; :b :c8104; :b :c8105; :b :c8106; :b :c8107; :b :c8108; :b :c8109; :b :c8110; :b :c8111; :b :c8112; :b :c8113; :b :c8114; :b :c8115; :b :c8116; :b :c8117; :b :c8118; :b :c8119; :b :c8120; :b :c8121; :b :c8122; :b :c8123; :b :c8124; :b :c8125; :b :c8126; :b :c8127; :b :c8128; :b :c8129; :b :c8130; :b :c8131; :b :c8132; :b :c8133; :b :c8134; :b :c8135; :b :c8136; :b :c8137; :b :c8138; :b :c8139; :b :c8140; :b :c8141; :b :c8142; :b :c8143; :b :c8144; :b :c8145; :b :c8146; :b :c8147; :b :c8148; :b :c8149; :b :c8150; :b :c8151; :b :c8152; :b :c8153; :b :c8154; :b :c8155; :b :c8156; :b :c8157; :b :c8158; :b :c8159; :b :c8160; :b :c8161; :b :c8162; :b :c8163; :b :c8164; :b :c8165; :b :c8166; :b :c8167; :b :c8168; :b :c8169; :b :c8170; :b :c8171; :b :c8172; :b :c8173; :b :c8174; :b :c8175; :b :c8176; :b :c8177; :b :c8178; :b :c8179; :b :c8180; :b :c8181; :b :c8182; :b :c8183; :b :c8184; :b :c8185; :b :c8186; :b :c8187; :b :c8188; :b :c8189; :b :c8190; :b :c8191; :b :c8192; :b :c8193; :b :c8194; :b :c8195; :b :c8196; :b :c8197; :b :c8198; :b :c8199; :b :c8200; :b :c8201; :b :c8202; :b :c8203; :b :c8204; :b :c8205; :b :c8206; :b :c8207; :b :c8208; :b :c8209; :b :c8210; :b :c8211; :b :c8212; :b :c8213; :b :c8214; :b :c8215; :b :c8216; :b :c8217; :b :c8218; :b :c8219; :b :c8220; :b :c8221; :b :c8222; :b :c8223; :b :c8224; :b :c8225; :b :c8226; :b :c8227; :b :c8228; :b :c8229; :b :c8230; :b :c8231; :b :c8232; :b :c8233; :b :c8234; :b :c8235; :b :c8236; :b :c8237; :b :c8238; :b :c8239; :b :c8240; :b :c8241; :b :c8242; :b :c8243; :b :c8244; :b :c8245; :b :c8246; :b :c8247; :b :c8248; :b :c8249; :b :c8250; :b :c8251; :b :c8252; :b :c8253; :b :c8254; :b :c8255; :b :c8256; :b :c8257; :b :c8258; :b :c8259; :b :c8260; :b :c8261; :b :c8262; :b :c8263; :b :c8264; :b :c8265; :b :c8266; :b :c8267; :b :c8268; :b :c8269; :b :c8270; :b :c8271; :b :c8272; :b :c8273; :b :c8274; :b :c8275; :b :c8276; :b :c8277; :b :c8278; :b :c8279; :b :c8280; :b :c8281; :b :c8282; :b :c8283; :b :c8284; :b :c8285; :b :c8286; :b :c8287; :b :c8288; :b :c8289; :b :c8290; :b :c8291; :b :c8292; :b :c8293; :b :c8294; :b :c8295; :b :c8296; :b :c8297; :b :c8298; :b :c8299; :b :c8300; :b :c8301; :b :c8302; :b :c8303; :b :c8304; :b :c8305; :b :c8306; :b :c8307; :b :c8308; :b :c8309; :b :c8310; :b :c8311; :b :c8312; :b :c8313; :b :c8314; :b :c8315; :b :c8316; :b :c8317; :b :c8318; :b :c8319; :b :c8320; :b :c8321; :b :c8322; :b :c8323; :b :c8324; :b :c8325; :b :c8326; :b :c8327; :b :c8328; :b :c8329; :b :c8330; :b :c8331; :b :c8332; :b :c8333; :b :c8334; :b :c8335; :b :c8336; :b :c8337; :b :c8338; :b :c8339; :b :c8340; :b :c8341; :b :c8342; :b :c8343; :b :c8344; :b :c8345; :b :c8346; :b :c8347; :b :c8348; :b :c8349; :b :c8350; :b :c8351; :b :c8352; :b :c8353; :b :c8354; :b :c8355; :b :c8356; :b :c8357; :b :c8358; :b :c8359; :b :c8360; :b :c8361; :b :c8362; :b :c8363; :b :c8364; :b :c8365; :b :c8366; :b :c8367; :b :c8368; :b :c8369; :b :c8370; :b :c8371; :b :c8372; :b :c8373; :b :c8374; :b :c8375; :b :c8376; :b :c8377; :b :c8378; :b :c8379; :b :c8380; :b :c8381; :b :c8382; :b :c8383; :b :c8384; :b :c8385; :b :c8386; :b :c8387; :b :c8388; :b :c8389; :b :c8390; :b :c8391; :b :c8392; :b :c8393; :b :c8394; :b :c8395; :b :c8396; :b :c8397; :b :c8398; :b :c8399; :b :c8400; :b :c8401; :b :c8402; :b :c8403; :b :c8404; :b :c8405; :b :c8406; :b :c8407; :b :c8408; :b :c8409; :b :c8410; :b :c8411; :b :c8412; :b :c8413; :b :c8414; :b :c8415; :b :c8416; :b :c8417; :b :c8418; :b :c8419; :b :c8420; :b :c8421; :b :c8422; :b :c8423; :b :c8424; :b :c8425; :b :c8426; :b :c8427; :b :c8428; :b :c8429; :b :c8430; :b :c8431; :b :c8432; :b :c8433; :b :c8434; :b :c8435; :b :c8436; :b :c8437; :b :c8438; :b :c8439; :b :c8440; :b :c8441; :b :c8442; :b :c8443; :b :c8444; :b :c8445; :b :c8446; :b :c8447; :b :c8448; :b :c8449; :b :c8450; :b :c8451; :b :c8452; :b :c8453; :b :c8454; :b :c8455; :b :c8456; :b :c8457; :b :c8458; :b :c8459; :b :c8460; :b :c8461; :b :c8462; :b :c8463; :b :c8464; :b :c8465; :b :c8466; :b :c8467; :b :c8468; :b :c8469; :b :c8470; :b :c8471; :b :c8472; :b :c8473; :b :c8474; :b :c8475; :b :c8476; :b :c8477; :b :c8478; :b :c8479; :b :c8480; :b :c8481; :b :c8482; :b :c8483; :b :c8484; :b :c8485; :b :c8486; :b :c8487; :b :c8488; :b :c8489; :b :c8490; :b :c8491; :b :c8492; :b :c8493; :b :c8494; :b :c8495; :b :c8496; :b :c8497; :b :c8498; :b :c8499; :b :c8500; :b :c8501; :b :c8502; :b :c8503; :b :c8504; :b :c8505; :b :c8506; :b :c8507; :b :c8508; :b :c8509; :b :c8510; :b :c8511; :b :c8512; :b :c8513; :b :c8514; :b :c8515; :b :c8516; :b :c8517; :b :c8518; :b :c8519; :b :c8520; :b :c8521; :b :c8522; :b :c8523; :b :c8524; :b :c8525; :b :c8526; :b :c8527; :b :c8528; :b :c8529; :b :c8530; :b :c8531; :b :c8532; :b :c8533; :b :c8534; :b :c8535; :b :c8536; :b :c8537; :b :c8538; :b :c8539; :b :c8540; :b :c8541; :b :c8542; :b :c8543; :b :c8544; :b :c8545; :b :c8546; :b :c8547; :b :c8548; :b :c8549; :b :c8550; :b :c8551; :b :c8552; :b :c8553; :b :c8554; :b :c8555; :b :c8556; :b :c8557; :b :c8558; :b :c8559; :b :c8560; :b :c8561; :b :c8562; :b :c8563; :b :c8564; :b :c8565; :b :c8566; :b :c8567; :b :c8568; :b :c8569; :b :c8570; :b :c8571; :b :c8572; :b :c8573; :b :c8574; :b :c8575; :b :c8576; :b :c8577; :b :c8578; :b :c8579; :b :c8580; :b :c8581; :b :c8582; :b :c8583; :b :c8584; :b :c8585; :b :c8586; :b :c8587; :b :c8588; :b :c8589; :b :c8590; :b :c8591; :b :c8592; :b :c8593; :b :c8594; :b :c8595; :b :c8596; :b :c8597; :b :c8598; :b :c8599; :b :c8600; :b :c8601; :b :c8602; :b :c8603; :b :c8604; :b :c8605; :b :c8606; :b :c8607; :b :c8608; :b :c8609; :b :c8610; :b :c8611; :b :c8612; :b :c8613; :b :c8614; :b :c8615; :b :c8616; :b :c8617; :b :c8618; :b :c8619; :b :c8620; :b :c8621; :b :c8622; :b :c8623; :b :c8624; :b :c8625; :b :c8626; :b :c8627; :b :c8628; :b :c8629; :b :c8630; :b :c8631; :b :c8632; :b :c8633; :b :c8634; :b :c8635; :b :c8636; :b :c8637; :b :c8638; :b :c8639; :b :c8640; :b :c8641; :b :c8642; :b :c8643; :b :c8644; :b :c8645; :b :c8646; :b :c8647; :b :c8648; :b :c8649; :b :c8650; :b :c8651; :b :c8652; :b :c8653; :b :c8654; :b :c8655; :b :c8656; :b :c8657; :b :c8658; :b :c8659; :b :c8660; :b :c8661; :b :c8662; :b :c8663; :b :c8664; :b :c8665; :b :c8666; :b :c8667; :b :c8668; :b :c8669; :b :c8670; :b :c8671; :b :c8672; :b :c8673; :b :c8674; :b :c8675; :b :c8676; :b :c8677; :b :c8678; :b :c8679; :b :c8680; :b :c8681; :b :c8682; :b :c8683; :b :c8684; :b :c8685; :b :c8686; :b :c8687; :b :c8688; :b :c8689; :b :c8690; :b :c8691; :b :c8692; :b :c8693; :b :c8694; :b :c8695; :b :c8696; :b :c8697; :b :c8698; :b :c8699; :b :c8700; :b :c8701; :b :c8702; :b :c8703; :b :c8704; :b :c8705; :b :c8706; :b :c8707; :b :c8708; :b :c8709; :b :c8710; :b :c8711; :b :c8712; :b :c8713; :b :c8714; :b :c8715; :b :c8716; :b :c8717; :b :c8718; :b :c8719; :b :c8720; :b :c8721; :b :c8722; :b :c8723; :b :c8724; :b :c8725; :b :c8726; :b :c8727; :b :c8728; :b :c8729; :b :c8730; :b :c8731; :b :c8732; :b :c8733; :b :c8734; :b :c8735; :b :c8736; :b :c8737; :b :c8738; :b :c8739; :b :c8740; :b :c8741; :b :c8742; :b :c8743; :b :c8744; :b :c8745; :b :c8746; :b :c8747; :b :c8748; :b :c8749; :b :c8750; :b :c8751; :b :c8752; :b :c8753; :b :c8754; :b :c8755; :b :c8756; :b :c8757; :b :c8758; :b :c8759; :b :c8760; :b :c8761; :b :c8762; :b :c8763; :b :c8764; :b :c8765; :b :c8766; :b :c8767; :b :c8768; :b :c8769; :b :c8770; :b :c8771; :b :c8772; :b :c8773; :b :c8774; :b :c8775; :b :c8776; :b :c8777; :b :c8778; :b :c8779; :b :c8780; :b :c8781; :b :c8782; :b :c8783; :b :c8784; :b :c8785; :b :c8786; :b :c8787; :b :c8788; :b :c8789; :b :c8790; :b :c8791; :b :c8792; :b :c8793; :b :c8794; :b :c8795; :b :c8796; :b :c8797; :b :c8798; :b :c8799; :b :c8800; :b :c8801; :b :c8802; :b :c8803; :b :c8804; :b :c8805; :b :c8806; :b :c8807; :b :c8808; :b :c8809; :b :c8810; :b :c8811; :b :c8812; :b :c8813; :b :c8814; :b :c8815; :b :c8816; :b :c8817; :b :c8818; :b :c8819; :b :c8820; :b :c8821; :b :c8822; :b :c8823; :b :c8824; :b :c8825; :b :c8826; :b :c8827; :b :c8828; :b :c8829; :b :c8830; :b :c8831; :b :c8832; :b :c8833; :b :c8834; :b :c8835; :b :c8836; :b :c8837; :b :c8838; :b :c8839; :b :c8840; :b :c8841; :b :c8842; :b :c8843; :b :c8844; :b :c8845; :b :c8846; :b :c8847; :b :c8848; :b :c8849; :b :c8850; :b :c8851; :b :c8852; :b :c8853; :b :c8854; :b :c8855; :b :c8856; :b :c8857; :b :c8858; :b :c8859; :b :c8860; :b :c8861; :b :c8862; :b :c8863; :b :c8864; :b :c8865; :b :c8866; :b :c8867; :b :c8868; :b :c8869; :b :c8870; :b :c8871; :b :c8872; :b :c8873; :b :c8874; :b :c8875; :b :c8876; :b :c8877; :b :c8878; :b :c8879; :b :c8880; :b :c8881; :b :c8882; :b :c8883; :b :c8884; :b :c8885; :b :c8886; :b :c8887; :b :c8888; :b :c8889; :b :c8890; :b :c8891; :b :c8892; :b :c8893; :b :c8894; :b :c8895; :b :c8896; :b :c8897; :b :c8898; :b :c8899; :b :c8900; :b :c8901; :b :c8902; :b :c8903; :b :c8904; :b :c8905; :b :c8906; :b :c8907; :b :c8908; :b :c8909; :b :c8910; :b :c8911; :b :c8912; :b :c8913; :b :c8914; :b :c8915; :b :c8916; :b :c8917; :b :c8918; :b :c8919; :b :c8920; :b :c8921; :b :c8922; :b :c8923; :b :c8924; :b :c8925; :b :c8926; :b :c8927; :b :c8928; :b :c8929; :b :c8930; :b :c8931; :b :c8932; :b :c8933; :b :c8934; :b :c8935; :b :c8936; :b :c8937; :b :c8938; :b :c8939; :b :c8940; :b :c8941; :b :c8942; :b :c8943; :b :c8944; :b :c8945; :b :c8946; :b :c8947; :b :c8948; :b :c8949; :b :c8950; :b :c8951; :b :c8952; :b :c8953; :b :c8954; :b :c8955; :b :c8956; :b :c8957; :b :c8958; :b :c8959; :b :c8960; :b :c8961; :b :c8962; :b :c8963; :b :c8964; :b :c8965; :b :c8966; :b :c8967; :b :c8968; :b :c8969; :b :c8970; :b :c8971; :b :c8972; :b :c8973; :b :c8974; :b :c8975; :b :c8976; :b :c8977; :b :c8978; :b :c8979; :b :c8980; :b :c8981; :b :c8982; :b :c8983; :b :c8984; :b :c8985; :b :c8986; :b :c8987; :b :c8988; :b :c8989; :b :c8990; :b :c8991; :b :c8992; :b :c8993; :b :c8994; :b :c8995; :b :c8996; :b :c8997; :b :c8998; :b :c8999; :b :c9000; :b :c9001; :b :c9002; :b :c9003; :b :c9004; :b :c9005; :b :c9006; :b :c9007; :b :c9008; :b :c9009; :b :c9010; :b :c9011; :b :c9012; :b :c9013; :b :c9014; :b :c9015; :b :c9016; :b :c9017; :b :c9018; :b :c9019; :b :c9020; :b :c9021; :b :c9022; :b :c9023; :b :c9024; :b :c9025; :b :c9026; :b :c9027; :b :c9028; :b :c9029; :b :c9030; :b :c9031; :b :c9032; :b :c9033; :b :c9034; :b :c9035; :b :c9036; :b :c9037; :b :c9038; :b :c9039; :b :c9040; :b :c9041; :b :c9042; :b :c9043; :b :c9044; :b :c9045; :b :c9046; :b :c9047; :b :c9048; :b :c9049; :b :c9050; :b :c9051; :b :c9052; :b :c9053; :b :c9054; :b :c9055; :b :c9056; :b :c9057; :b :c9058; :b :c9059; :b :c9060; :b :c9061; :b :c9062; :b :c9063; :b :c9064; :b :c9065; :b :c9066; :b :c9067; :b :c9068; :b :c9069; :b :c9070; :b :c9071; :b :c9072; :b :c9073; :b :c9074; :b :c9075; :b :c9076; :b :c9077; :b :c9078; :b :c9079; :b :c9080; :b :c9081; :b :c9082; :b :c9083; :b :c9084; :b :c9085; :b :c9086; :b :c9087; :b :c9088; :b :c9089; :b :c9090; :b :c9091; :b :c9092; :b :c9093; :b :c9094; :b :c9095; :b :c9096; :b :c9097; :b :c9098; :b :c9099; :b :c9100; :b :c9101; :b :c9102; :b :c9103; :b :c9104; :b :c9105; :b :c9106; :b :c9107; :b :c9108; :b :c9109; :b :c9110; :b :c9111; :b :c9112; :b :c9113; :b :c9114; :b :c9115; :b :c9116; :b :c9117; :b :c9118; :b :c9119; :b :c9120; :b :c9121; :b :c9122; :b :c9123; :b :c9124; :b :c9125; :b :c9126; :b :c9127; :b :c9128; :b :c9129; :b :c9130; :b :c9131; :b :c9132; :b :c9133; :b :c9134; :b :c9135; :b :c9136; :b :c9137; :b :c9138; :b :c9139; :b :c9140; :b :c9141; :b :c9142; :b :c9143; :b :c9144; :b :c9145; :b :c9146; :b :c9147; :b :c9148; :b :c9149; :b :c9150; :b :c9151; :b :c9152; :b :c9153; :b :c9154; :b :c9155; :b :c9156; :b :c9157; :b :c9158; :b :c9159; :b :c9160; :b :c9161; :b :c9162; :b :c9163; :b :c9164; :b :c9165; :b :c9166; :b :c9167; :b :c9168; :b :c9169; :b :c9170; :b :c9171; :b :c9172; :b :c9173; :b :c9174; :b :c9175; :b :c9176; :b :c9177; :b :c9178; :b :c9179; :b :c9180; :b :c9181; :b :c9182; :b :c9183; :b :c9184; :b :c9185; :b :c9186; :b :c9187; :b :c9188; :b :c9189; :b :c9190; :b :c9191; :b :c9192; :b :c9193; :b :c9194; :b :c9195; :b :c9196; :b :c9197; :b :c9198; :b :c9199; :b :c9200; :b :c9201; :b :c9202; :b :c9203; :b :c9204; :b :c9205; :b :c9206; :b :c9207; :b :c9208; :b :c9209; :b :c9210; :b :c9211; :b :c9212; :b :c9213; :b :c9214; :b :c9215; :b :c9216; :b :c9217; :b :c9218; :b :c9219; :b :c9220; :b :c9221; :b :c9222; :b :c9223; :b :c9224; :b :c9225; :b :c9226; :b :c9227; :b :c9228; :b :c9229; :b :c9230; :b :c9231; :b :c9232; :b :c9233; :b :c9234; :b :c9235; :b :c9236; :b :c9237; :b :c9238; :b :c9239; :b :c9240; :b :c9241; :b :c9242; :b :c9243; :b :c9244; :b :c9245; :b :c9246; :b :c9247; :b :c9248; :b :c9249; :b :c9250; :b :c9251; :b :c9252; :b :c9253; :b :c9254; :b :c9255; :b :c9256; :b :c9257; :b :c9258; :b :c9259; :b :c9260; :b :c9261; :b :c9262; :b :c9263; :b :c9264; :b :c9265; :b :c9266; :b :c9267; :b :c9268; :b :c9269; :b :c9270; :b :c9271; :b :c9272; :b :c9273; :b :c9274; :b :c9275; :b :c9276; :b :c9277; :b :c9278; :b :c9279; :b :c9280; :b :c9281; :b :c9282; :b :c9283; :b :c9284; :b :c9285; :b :c9286; :b :c9287; :b :c9288; :b :c9289; :b :c9290; :b :c9291; :b :c9292; :b :c9293; :b :c9294; :b :c9295; :b :c9296; :b :c9297; :b :c9298; :b :c9299; :b :c9300; :b :c9301; :b :c9302; :b :c9303; :b :c9304; :b :c9305; :b :c9306; :b :c9307; :b :c9308; :b :c9309; :b :c9310; :b :c9311; :b :c9312; :b :c9313; :b :c9314; :b :c9315; :b :c9316; :b :c9317; :b :c9318; :b :c9319; :b :c9320; :b :c9321; :b :c9322; :b :c9323; :b :c9324; :b :c9325; :b :c9326; :b :c9327; :b :c9328; :b :c9329; :b :c9330; :b :c9331; :b :c9332; :b :c9333; :b :c9334; :b :c9335; :b :c9336; :b :c9337; :b :c9338; :b :c9339; :b :c9340; :b :c9341; :b :c9342; :b :c9343; :b :c9344; :b :c9345; :b :c9346; :b :c9347; :b :c9348; :b :c9349; :b :c9350; :b :c9351; :b :c9352; :b :c9353; :b :c9354; :b :c9355; :b :c9356; :b :c9357; :b :c9358; :b :c9359; :b :c9360; :b :c9361; :b :c9362; :b :c9363; :b :c9364; :b :c9365; :b :c9366; :b :c9367; :b :c9368; :b :c9369; :b :c9370; :b :c9371; :b :c9372; :b :c9373; :b :c9374; :b :c9375; :b :c9376; :b :c9377; :b :c9378; :b :c9379; :b :c9380; :b :c9381; :b :c9382; :b :c9383; :b :c9384; :b :c9385; :b :c9386; :b :c9387; :b :c9388; :b :c9389; :b :c9390; :b :c9391; :b :c9392; :b :c9393; :b :c9394; :b :c9395; :b :c9396; :b :c9397; :b :c9398; :b :c9399; :b :c9400; :b :c9401; :b :c9402; :b :c9403; :b :c9404; :b :c9405; :b :c9406; :b :c9407; :b :c9408; :b :c9409; :b :c9410; :b :c9411; :b :c9412; :b :c9413; :b :c9414; :b :c9415; :b :c9416; :b :c9417; :b :c9418; :b :c9419; :b :c9420; :b :c9421; :b :c9422; :b :c9423; :b :c9424; :b :c9425; :b :c9426; :b :c9427; :b :c9428; :b :c9429; :b :c9430; :b :c9431; :b :c9432; :b :c9433; :b :c9434; :b :c9435; :b :c9436; :b :c9437; :b :c9438; :b :c9439; :b :c9440; :b :c9441; :b :c9442; :b :c9443; :b :c9444; :b :c9445; :b :c9446; :b :c9447; :b :c9448; :b :c9449; :b :c9450; :b :c9451; :b :c9452; :b :c9453; :b :c9454; :b :c9455; :b :c9456; :b :c9457; :b :c9458; :b :c9459; :b :c9460; :b :c9461; :b :c9462; :b :c9463; :b :c9464; :b :c9465; :b :c9466; :b :c9467; :b :c9468; :b :c9469; :b :c9470; :b :c9471; :b :c9472; :b :c9473; :b :c9474; :b :c9475; :b :c9476; :b :c9477; :b :c9478; :b :c9479; :b :c9480; :b :c9481; :b :c9482; :b :c9483; :b :c9484; :b :c9485; :b :c9486; :b :c9487; :b :c9488; :b :c9489; :b :c9490; :b :c9491; :b :c9492; :b :c9493; :b :c9494; :b :c9495; :b :c9496; :b :c9497; :b :c9498; :b :c9499; :b :c9500; :b :c9501; :b :c9502; :b :c9503; :b :c9504; :b :c9505; :b :c9506; :b :c9507; :b :c9508; :b :c9509; :b :c9510; :b :c9511; :b :c9512; :b :c9513; :b :c9514; :b :c9515; :b :c9516; :b :c9517; :b :c9518; :b :c9519; :b :c9520; :b :c9521; :b :c9522; :b :c9523; :b :c9524; :b :c9525; :b :c9526; :b :c9527; :b :c9528; :b :c9529; :b :c9530; :b :c9531; :b :c9532; :b :c9533; :b :c9534; :b :c9535; :b :c9536; :b :c9537; :b :c9538; :b :c9539; :b :c9540; :b :c9541; :b :c9542; :b :c9543; :b :c9544; :b :c9545; :b :c9546; :b :c9547; :b :c9548; :b :c9549; :b :c9550; :b :c9551; :b :c9552; :b :c9553; :b :c9554; :b :c9555; :b :c9556; :b :c9557; :b :c9558; :b :c9559; :b :c9560; :b :c9561; :b :c9562; :b :c9563; :b :c9564; :b :c9565; :b :c9566; :b :c9567; :b :c9568; :b :c9569; :b :c9570; :b :c9571; :b :c9572; :b :c9573; :b :c9574; :b :c9575; :b :c9576; :b :c9577; :b :c9578; :b :c9579; :b :c9580; :b :c9581; :b :c9582; :b :c9583; :b :c9584; :b :c9585; :b :c9586; :b :c9587; :b :c9588; :b :c9589; :b :c9590; :b :c9591; :b :c9592; :b :c9593; :b :c9594; :b :c9595; :b :c9596; :b :c9597; :b :c9598; :b :c9599; :b :c9600; :b :c9601; :b :c9602; :b :c9603; :b :c9604; :b :c9605; :b :c9606; :b :c9607; :b :c9608; :b :c9609; :b :c9610; :b :c9611; :b :c9612; :b :c9613; :b :c9614; :b :c9615; :b :c9616; :b :c9617; :b :c9618; :b :c9619; :b :c9620; :b :c9621; :b :c9622; :b :c9623; :b :c9624; :b :c9625; :b :c9626; :b :c9627; :b :c9628; :b :c9629; :b :c9630; :b :c9631; :b :c9632; :b :c9633; :b :c9634; :b :c9635; :b :c9636; :b :c9637; :b :c9638; :b :c9639; :b :c9640; :b :c9641; :b :c9642; :b :c9643; :b :c9644; :b :c9645; :b :c9646; :b :c9647; :b :c9648; :b :c9649; :b :c9650; :b :c9651; :b :c9652; :b :c9653; :b :c9654; :b :c9655; :b :c9656; :b :c9657; :b :c9658; :b :c9659; :b :c9660; :b :c9661; :b :c9662; :b :c9663; :b :c9664; :b :c9665; :b :c9666; :b :c9667; :b :c9668; :b :c9669; :b :c9670; :b :c9671; :b :c9672; :b :c9673; :b :c9674; :b :c9675; :b :c9676; :b :c9677; :b :c9678; :b :c9679; :b :c9680; :b :c9681; :b :c9682; :b :c9683; :b :c9684; :b :c9685; :b :c9686; :b :c9687; :b :c9688; :b :c9689; :b :c9690; :b :c9691; :b :c9692; :b :c9693; :b :c9694; :b :c9695; :b :c9696; :b :c9697; :b :c9698; :b :c9699; :b :c9700; :b :c9701; :b :c9702; :b :c9703; :b :c9704; :b :c9705; :b :c9706; :b :c9707; :b :c9708; :b :c9709; :b :c9710; :b :c9711; :b :c9712; :b :c9713; :b :c9714; :b :c9715; :b :c9716; :b :c9717; :b :c9718; :b :c9719; :b :c9720; :b :c9721; :b :c9722; :b :c9723; :b :c9724; :b :c9725; :b :c9726; :b :c9727; :b :c9728; :b :c9729; :b :c9730; :b :c9731; :b :c9732; :b :c9733; :b :c9734; :b :c9735; :b :c9736; :b :c9737; :b :c9738; :b :c9739; :b :c9740; :b :c9741; :b :c9742; :b :c9743; :b :c9744; :b :c9745; :b :c9746; :b :c9747; :b :c9748; :b :c9749; :b :c9750; :b :c9751; :b :c9752; :b :c9753; :b :c9754; :b :c9755; :b :c9756; :b :c9757; :b :c9758; :b :c9759; :b :c9760; :b :c9761; :b :c9762; :b :c9763; :b :c9764; :b :c9765; :b :c9766; :b :c9767; :b :c9768; :b :c9769; :b :c9770; :b :c9771; :b :c9772; :b :c9773; :b :c9774; :b :c9775; :b :c9776; :b :c9777; :b :c9778; :b :c9779; :b :c9780; :b :c9781; :b :c9782; :b :c9783; :b :c9784; :b :c9785; :b :c9786; :b :c9787; :b :c9788; :b :c9789; :b :c9790; :b :c9791; :b :c9792; :b :c9793; :b :c9794; :b :c9795; :b :c9796; :b :c9797; :b :c9798; :b :c9799; :b :c9800; :b :c9801; :b :c9802; :b :c9803; :b :c9804; :b :c9805; :b :c9806; :b :c9807; :b :c9808; :b :c9809; :b :c9810; :b :c9811; :b :c9812; :b :c9813; :b :c9814; :b :c9815; :b :c9816; :b :c9817; :b :c9818; :b :c9819; :b :c9820; :b :c9821; :b :c9822; :b :c9823; :b :c9824; :b :c9825; :b :c9826; :b :c9827; :b :c9828; :b :c9829; :b :c9830; :b :c9831; :b :c9832; :b :c9833; :b :c9834; :b :c9835; :b :c9836; :b :c9837; :b :c9838; :b :c9839; :b :c9840; :b :c9841; :b :c9842; :b :c9843; :b :c9844; :b :c9845; :b :c9846; :b :c9847; :b :c9848; :b :c9849; :b :c9850; :b :c9851; :b :c9852; :b :c9853; :b :c9854; :b :c9855; :b :c9856; :b :c9857; :b :c9858; :b :c9859; :b :c9860; :b :c9861; :b :c9862; :b :c9863; :b :c9864; :b :c9865; :b :c9866; :b :c9867; :b :c9868; :b :c9869; :b :c9870; :b :c9871; :b :c9872; :b :c9873; :b :c9874; :b :c9875; :b :c9876; :b :c9877; :b :c9878; :b :c9879; :b :c9880; :b :c9881; :b :c9882; :b :c9883; :b :c9884; :b :c9885; :b :c9886; :b :c9887; :b :c9888; :b :c9889; :b :c9890; :b :c9891; :b :c9892; :b :c9893; :b :c9894; :b :c9895; :b :c9896; :b :c9897; :b :c9898; :b :c9899; :b :c9900; :b :c9901; :b :c9902; :b :c9903; :b :c9904; :b :c9905; :b :c9906; :b :c9907; :b :c9908; :b :c9909; :b :c9910; :b :c9911; :b :c9912; :b :c9913; :b :c9914; :b :c9915; :b :c9916; :b :c9917; :b :c9918; :b :c9919; :b :c9920; :b :c9921; :b :c9922; :b :c9923; :b :c9924; :b :c9925; :b :c9926; :b :c9927; :b :c9928; :b :c9929; :b :c9930; :b :c9931; :b :c9932; :b :c9933; :b :c9934; :b :c9935; :b :c9936; :b :c9937; :b :c9938; :b :c9939; :b :c9940; :b :c9941; :b :c9942; :b :c9943; :b :c9944; :b :c9945; :b :c9946; :b :c9947; :b :c9948; :b :c9949; :b :c9950; :b :c9951; :b :c9952; :b :c9953; :b :c9954; :b :c9955; :b :c9956; :b :c9957; :b :c9958; :b :c9959; :b :c9960; :b :c9961; :b :c9962; :b :c9963; :b :c9964; :b :c9965; :b :c9966; :b :c9967; :b :c9968; :b :c9969; :b :c9970; :b :c9971; :b :c9972; :b :c9973; :b :c9974; :b :c9975; :b :c9976; :b :c9977; :b :c9978; :b :c9979; :b :c9980; :b :c9981; :b :c9982; :b :c9983; :b :c9984; :b :c9985; :b :c9986; :b :c9987; :b :c9988; :b :c9989; :b :c9990; :b :c9991; :b :c9992; :b :c9993; :b :c9994; :b :c9995; :b :c9996; :b :c9997; :b :c9998; :b :c9999; :b :c10000 . raptor-1.4.21/tests/turtle/test-17.out0000644000175000017500000000013210674751730014453 00000000000000 "a long\n\tliteral\nwith\nnewlines" . raptor-1.4.21/tests/turtle/test-17.ttl0000644000175000017500000000014610674751730014454 00000000000000# Test long literal @prefix : . :a :b """a long literal with newlines""" . raptor-1.4.21/tests/turtle/test-18.out0000644000175000017500000000032110674751730014454 00000000000000 "\nthis \ris a \U00015678long\t\nliteral\uABCD\n" . "\tThis \uABCDis\r \U00015678another\n\none\n" . raptor-1.4.21/tests/turtle/test-18.ttl0000644000175000017500000000023510674751730014454 00000000000000@prefix : . :a :b """\nthis \ris a \U00015678long\t literal\uABCD """ . :d :e """\tThis \uABCDis\r \U00015678another\n one """ . raptor-1.4.21/tests/turtle/test-19.out0000644000175000017500000000014410674751730014460 00000000000000 "1.0"^^ . raptor-1.4.21/tests/turtle/test-19.ttl0000644000175000017500000000006210674751730014453 00000000000000@prefix : . :a :b 1.0 . raptor-1.4.21/tests/turtle/test-20.out0000644000175000017500000000015210674751730014447 00000000000000 "" . "" . raptor-1.4.21/tests/turtle/test-20.ttl0000644000175000017500000000010010674751730014434 00000000000000@prefix : . :a :b "" . :c :d """""" . raptor-1.4.21/tests/turtle/test-21.out0000644000175000017500000000044510711544531014444 00000000000000 "1.0"^^ . "1"^^ . "1.0e0"^^ . raptor-1.4.21/tests/turtle/test-21.ttl0000644000175000017500000000010610674751730014443 00000000000000@prefix : . :a :b 1.0 . :c :d 1 . :e :f 1.0e0 . raptor-1.4.21/tests/turtle/test-22.out0000644000175000017500000000045010711544516014444 00000000000000 "-1.0"^^ . "-1"^^ . "-1.0e0"^^ . raptor-1.4.21/tests/turtle/test-22.ttl0000644000175000017500000000011110674751730014440 00000000000000@prefix : . :a :b -1.0 . :c :d -1 . :e :f -1.0e0 . raptor-1.4.21/tests/turtle/test-23.out0000644000175000017500000000012410674751730014451 00000000000000 "John said: \"Hello World!\"" . raptor-1.4.21/tests/turtle/test-23.ttl0000644000175000017500000000014310674751730014446 00000000000000# Test long literal @prefix : . :a :b """John said: "Hello World!\"""" . raptor-1.4.21/tests/turtle/test-24.out0000644000175000017500000000030710674751730014455 00000000000000 "true"^^ . "false"^^ . raptor-1.4.21/tests/turtle/test-24.ttl0000644000175000017500000000007510674751730014453 00000000000000@prefix : . :a :b true . :c :d false . raptor-1.4.21/tests/turtle/test-25.out0000644000175000017500000000100610674751730014453 00000000000000 . . . . . . . raptor-1.4.21/tests/turtle/test-25.ttl0000644000175000017500000000040210674751730014446 00000000000000# comment test @prefix : . :a :b :c . # end of line comment :d # ignore me :e # and me :f # and me . :g :h #ignore me :i, # and me :j . # and me :k :l :m ; #ignore me :n :o ; # and me :p :q . # and me raptor-1.4.21/tests/turtle/test-26.out0000644000175000017500000000011210674751730014451 00000000000000 . raptor-1.4.21/tests/turtle/test-26.ttl0000644000175000017500000000013510674751730014452 00000000000000# comment line with no final newline test @prefix : . :a :b :c . #foo raptor-1.4.21/tests/turtle/test-27.out0000644000175000017500000000013410674751730014456 00000000000000 . raptor-1.4.21/tests/turtle/test-27.ttl0000644000175000017500000000016310674751730014454 00000000000000@prefix foo: . @prefix foo: . foo:blah foo:blah foo:blah . raptor-1.4.21/tests/turtle/test-28.out0000644000175000017500000000450010674751730014460 00000000000000 "2.345"^^ . "1.0"^^ . "1.0"^^ . "1.0"^^ . "1.0"^^ . "2.30"^^ . "2.234000005"^^ . "2.2340000005"^^ . "2.23400000005"^^ . "2.234000000005"^^ . "2.2340000000005"^^ . "2.23400000000005"^^ . "2.234000000000005"^^ . "2.2340000000000005"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "1.2345678901234567"^^ . raptor-1.4.21/tests/turtle/test-28.ttl0000644000175000017500000000470710674751730014465 00000000000000 "2.345"^^ . "1"^^ . "1.0"^^ . "1."^^ . "1.000000000"^^ . "2.3"^^ . "2.234000005"^^ . "2.2340000005"^^ . "2.23400000005"^^ . "2.234000000005"^^ . "2.2340000000005"^^ . "2.23400000000005"^^ . "2.234000000000005"^^ . "2.2340000000000005"^^ . "2.23400000000000005"^^ . "2.234000000000000005"^^ . "2.2340000000000000005"^^ . "2.23400000000000000005"^^ . "2.234000000000000000005"^^ . "2.2340000000000000000005"^^ . "2.23400000000000000000005"^^ . "1.2345678901234567890123457890"^^ . raptor-1.4.21/tests/turtle/test-29.out0000644000175000017500000000053110674751730014461 00000000000000 . raptor-1.4.21/tests/turtle/test-29.ttl0000644000175000017500000000053110674751730014455 00000000000000 . raptor-1.4.21/tests/turtle/test-30.out0000644000175000017500000000102110674751730014444 00000000000000 . . . . . raptor-1.4.21/tests/turtle/test-30.ttl0000644000175000017500000000063710674751730014454 00000000000000# In-scope base URI is http://www.w3.org/2001/sw/DataAccess/df1/tests/ at this point . @base . # In-scope base URI is http://example.org/ns/ at this point . @base . # In-scope base URI is http://example.org/ns/foo/ at this point . @prefix : . :a4 :b4 :c4 . @prefix : . :a5 :b5 :c5 . raptor-1.4.21/tests/turtle/test-31.ttl0000644000175000017500000000042111170016736014434 00000000000000@prefix rdf: . @prefix rss: . rss:items [ rdf:_1 ; rdf:_2 ; a rdf:Seq ] . raptor-1.4.21/tests/turtle/test-32.ttl0000644000175000017500000000032711176653104014444 00000000000000@prefix rdf: . @prefix ex: . # Based on Issue#0000274 http://bugs.librdf.org/mantis/view.php?id=274 ex:node1 rdf:value ( ex:item1 ex:item2 ) . raptor-1.4.21/tests/turtle/test-33.out0000644000175000017500000000010111330672502014432 00000000000000 "test-\\" . raptor-1.4.21/tests/turtle/test-33.ttl0000644000175000017500000000007511330672502014440 00000000000000@prefix : . :s :p1 """test-\\""" . raptor-1.4.21/tests/turtle/test-34.ttl0000644000175000017500000000023211330732216014433 00000000000000@prefix dbpedia: . . raptor-1.4.21/tests/turtle/Makefile.am0000644000175000017500000002657411330732216014560 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Turtle tests # # Copyright (C) 2003-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # RDFXML_DIR = ../rdfxml NTRIPLES_DIR = ../ntriples TEST_FILES=test-00.ttl test-01.ttl test-02.ttl test-03.ttl \ test-04.ttl test-05.ttl test-06.ttl test-07.ttl test-08.ttl \ test-09.ttl test-10.ttl test-11.ttl test-12.ttl test-13.ttl \ test-14.ttl test-15.ttl test-16.ttl test-17.ttl test-18.ttl \ test-19.ttl test-20.ttl test-21.ttl test-22.ttl test-23.ttl \ test-24.ttl test-25.ttl test-26.ttl test-27.ttl \ test-29.ttl test-30.ttl test-33.ttl \ rdf-schema.ttl \ rdfs-namespace.ttl \ rdfq-results.ttl TEST_BAD_FILES=bad-00.ttl bad-01.ttl bad-02.ttl bad-03.ttl \ bad-04.ttl bad-05.ttl bad-06.ttl bad-07.ttl bad-08.ttl bad-09.ttl \ bad-10.ttl bad-11.ttl bad-12.ttl bad-13.ttl bad-14.ttl \ bad-17.ttl bad-18.ttl bad-19.ttl bad-20.ttl bad-21.ttl bad-22.ttl TEST_WARN_FILES= TEST_OUT_FILES=test-00.out test-01.out test-02.out test-03.out \ test-04.out test-05.out test-06.out test-07.out test-08.out \ test-09.out test-10.out test-11.out test-12.out test-13.out \ test-14.out test-15.out test-16.out test-17.out test-18.out \ test-19.out test-20.out test-21.out test-22.out test-23.out \ test-24.out test-25.out test-26.out test-27.out test-28.out \ test-29.out test-30.out test-33.out \ rdf-schema.out \ rdfs-namespace.out \ rdfq-results.out TEST_SERIALIZE_FILES= \ test-28.ttl test-31.ttl test-32.ttl test-34.ttl TEST_SERIALIZE_OUT_FILES= \ test-28-out.ttl test-31-out.ttl test-32-out.ttl test-34-out.ttl TURTLE_HACK_OUT_FILES= \ ex-38-turtle.out TURTLE_SERIALIZE_RDF_FILES=ex-62.rdf TEST_WARN_OUT_FILES= TEST_MANIFEST_FILES=manifest.ttl manifest-bad.ttl # Used to make N-triples output consistent BASE_URI=http://www.w3.org/2001/sw/DataAccess/df1/tests/ # for rdf-schema.ttl RDF_NS_URI=http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI=http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES= README.txt \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_WARN_FILES) \ $(TEST_OUT_FILES) \ $(TEST_WARN_OUT_FILES) \ $(TEST_MANIFEST_FILES) \ $(TEST_SERIALIZE_FILES) \ $(TEST_SERIALIZE_OUT_FILES) \ $(TURTLE_SERIALIZE_RDF_TEST_FILES) \ $(TURTLE_SERIALIZE_RDF_FILES) \ $(TURTLE_HACK_OUT_FILES) EXTRA_DIST = $(ALL_TEST_FILES) build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-rdf check-bad-rdf check-turtle-serialize \ check-turtle-serialize-syntax check-turtle-parse-ntriples \ check-turtle-serialize-rdf # check-warn-rdf check-rdf: build-rapper $(TEST_FILES) @result=0; \ $(ECHO) "Testing legal Turtle"; \ for test in $(TEST_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(ECHO) "FAILED returned status $$status"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(ECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(ECHO) "ok"; \ fi; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $(srcdir)/$$name.out $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ exit $$result check-bad-rdf: build-rapper $(TEST_BAD_FILES) @set +e; result=0; \ $(ECHO) "Testing bad Turtle fails"; \ for test in $(TEST_BAD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(ECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ elif test $$status -eq 0 ; then \ $(ECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-warn-rdf: build-rapper $(TEST_WARN_FILES) @set +e; result=0; \ $(ECHO) "Testing Turtle with warnings"; \ for test in $(TEST_WARN_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "FAILED - parsing failed when should have warned"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Error $$name.err; \ elif test $$status -eq 2 ; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-turtle-serialize: build-rdfdiff build-rapper $(TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing turtle serialization with legal turtle"; \ for test in $(TEST_FILES); do \ name=`basename $$test .ttl` ; \ if test $$name = rdf-schema; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace; then \ baseuri=$(RDFS_NS_URI); \ else \ baseuri=$(BASE_URI)$$test; \ fi; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ status1=$$?; \ $(top_builddir)/utils/rdfdiff -f turtle -u $$baseuri -t turtle $(srcdir)/$$test $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ $(ECHO) $(top_builddir)/utils/rdfdiff -f turtle -u $$baseuri -t turtle $(srcdir)/$$test $$name-turtle.ttl '>' $$name.res; \ cat $$name-turtle.ttl; cat $$name.err; \ fi; \ rm -f $$name-turtle.ttl $$name.res $$name.err; \ done; \ set -e; exit $$result check-turtle-serialize-syntax: build-rapper $(TEST_SERIALIZE_FILES) @set +e; result=0; \ $(ECHO) "Testing turtle exact serialization output"; \ for test in $(TEST_SERIALIZE_FILES); do \ name=`basename $$test .ttl` ; \ if test $$name = rdf-schema; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace; then \ baseuri=$(RDFS_NS_URI); \ elif test $$name = test-31 -o $$name = test-32; then \ baseuri=-; \ else \ baseuri=$(BASE_URI)$$test; \ fi; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ cmp -s $(srcdir)/$$name-out.ttl $$name-turtle.ttl; \ status=$$?; \ if test $$status = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ cat $$name.err; \ diff -a -u $(srcdir)/$$name-out.ttl $$name-turtle.ttl; \ fi; \ rm -f $$name-turtle.ttl $$name.err; \ done; \ set -e; exit $$result check-turtle-parse-ntriples: build-rapper @set +e; result=0; \ $(ECHO) "Testing Turtle parsing with N-Triples tests"; \ NT_TEST_FILES=`unset MAKELEVEL MAKEFLAGS; cd $(NTRIPLES_DIR) && $(MAKE) print-nt-test-files | sed -e 's,^, ,' -e 's, ,$(NTRIPLES_DIR)/,g'`; \ for test in $$NT_TEST_FILES; do \ name=`basename $$test .nt` ; \ baseuri=-; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o ntriples -n file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ test_expected=$(srcdir)/$(NTRIPLES_DIR)/$$name.out; \ if cmp $$test_expected $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples -n file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $$test_expected $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result check-turtle-serialize-rdf: build-rdfdiff build-rapper @set +e; result=0; \ RDF_TEST_FILES=`unset MAKELEVEL MAKEFLAGS; cd $(RDFXML_DIR) && $(MAKE) print-rdf-test-files | sed -e 's,^, ,' -e 's, ,$(RDFXML_DIR)/,g'`; \ $(ECHO) "Testing turtle serialization with legal rdf/xml"; \ for test in $$RDF_TEST_FILES $(TURTLE_SERIALIZE_RDF_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=-; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ status1=$$?; \ if test $$test = "$(RDFXML_DIR)/ex-38.rdf"; then \ diff $(srcdir)/ex-38-turtle.out $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ else \ $(top_builddir)/utils/rdfdiff -t turtle $(srcdir)/$$test $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ $(ECHO) $(top_builddir)/utils/rdfdiff -t turtle $(srcdir)/$$test $$name-turtle.ttl '>' $$name.res; \ cat $$name.err; \ fi; \ rm -f $$name-turtle.ttl $$name.res $$name.err; \ done; \ set -e; exit $$result if MAINTAINER_MODE zip: tests.zip tests.zip: $(ALL_TEST_FILES) rm -f $@ zip $@ $(ALL_TEST_FILES) endif raptor-1.4.21/tests/turtle/Makefile.in0000644000175000017500000005354411330732300014560 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Turtle tests # # Copyright (C) 2003-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/turtle DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ RDFXML_DIR = ../rdfxml NTRIPLES_DIR = ../ntriples TEST_FILES = test-00.ttl test-01.ttl test-02.ttl test-03.ttl \ test-04.ttl test-05.ttl test-06.ttl test-07.ttl test-08.ttl \ test-09.ttl test-10.ttl test-11.ttl test-12.ttl test-13.ttl \ test-14.ttl test-15.ttl test-16.ttl test-17.ttl test-18.ttl \ test-19.ttl test-20.ttl test-21.ttl test-22.ttl test-23.ttl \ test-24.ttl test-25.ttl test-26.ttl test-27.ttl \ test-29.ttl test-30.ttl test-33.ttl \ rdf-schema.ttl \ rdfs-namespace.ttl \ rdfq-results.ttl TEST_BAD_FILES = bad-00.ttl bad-01.ttl bad-02.ttl bad-03.ttl \ bad-04.ttl bad-05.ttl bad-06.ttl bad-07.ttl bad-08.ttl bad-09.ttl \ bad-10.ttl bad-11.ttl bad-12.ttl bad-13.ttl bad-14.ttl \ bad-17.ttl bad-18.ttl bad-19.ttl bad-20.ttl bad-21.ttl bad-22.ttl TEST_WARN_FILES = TEST_OUT_FILES = test-00.out test-01.out test-02.out test-03.out \ test-04.out test-05.out test-06.out test-07.out test-08.out \ test-09.out test-10.out test-11.out test-12.out test-13.out \ test-14.out test-15.out test-16.out test-17.out test-18.out \ test-19.out test-20.out test-21.out test-22.out test-23.out \ test-24.out test-25.out test-26.out test-27.out test-28.out \ test-29.out test-30.out test-33.out \ rdf-schema.out \ rdfs-namespace.out \ rdfq-results.out TEST_SERIALIZE_FILES = \ test-28.ttl test-31.ttl test-32.ttl test-34.ttl TEST_SERIALIZE_OUT_FILES = \ test-28-out.ttl test-31-out.ttl test-32-out.ttl test-34-out.ttl TURTLE_HACK_OUT_FILES = \ ex-38-turtle.out TURTLE_SERIALIZE_RDF_FILES = ex-62.rdf TEST_WARN_OUT_FILES = TEST_MANIFEST_FILES = manifest.ttl manifest-bad.ttl # Used to make N-triples output consistent BASE_URI = http://www.w3.org/2001/sw/DataAccess/df1/tests/ # for rdf-schema.ttl RDF_NS_URI = http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI = http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES = README.txt \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_WARN_FILES) \ $(TEST_OUT_FILES) \ $(TEST_WARN_OUT_FILES) \ $(TEST_MANIFEST_FILES) \ $(TEST_SERIALIZE_FILES) \ $(TEST_SERIALIZE_OUT_FILES) \ $(TURTLE_SERIALIZE_RDF_TEST_FILES) \ $(TURTLE_SERIALIZE_RDF_FILES) \ $(TURTLE_HACK_OUT_FILES) EXTRA_DIST = $(ALL_TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/turtle/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/turtle/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-rdf check-bad-rdf check-turtle-serialize \ check-turtle-serialize-syntax check-turtle-parse-ntriples \ check-turtle-serialize-rdf # check-warn-rdf check-rdf: build-rapper $(TEST_FILES) @result=0; \ $(ECHO) "Testing legal Turtle"; \ for test in $(TEST_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(ECHO) "FAILED returned status $$status"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(ECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(ECHO) "ok"; \ fi; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $(srcdir)/$$name.out $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ exit $$result check-bad-rdf: build-rapper $(TEST_BAD_FILES) @set +e; result=0; \ $(ECHO) "Testing bad Turtle fails"; \ for test in $(TEST_BAD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(ECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ elif test $$status -eq 0 ; then \ $(ECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-warn-rdf: build-rapper $(TEST_WARN_FILES) @set +e; result=0; \ $(ECHO) "Testing Turtle with warnings"; \ for test in $(TEST_WARN_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "FAILED - parsing failed when should have warned"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Error $$name.err; \ elif test $$status -eq 2 ; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-turtle-serialize: build-rdfdiff build-rapper $(TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing turtle serialization with legal turtle"; \ for test in $(TEST_FILES); do \ name=`basename $$test .ttl` ; \ if test $$name = rdf-schema; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace; then \ baseuri=$(RDFS_NS_URI); \ else \ baseuri=$(BASE_URI)$$test; \ fi; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ status1=$$?; \ $(top_builddir)/utils/rdfdiff -f turtle -u $$baseuri -t turtle $(srcdir)/$$test $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ $(ECHO) $(top_builddir)/utils/rdfdiff -f turtle -u $$baseuri -t turtle $(srcdir)/$$test $$name-turtle.ttl '>' $$name.res; \ cat $$name-turtle.ttl; cat $$name.err; \ fi; \ rm -f $$name-turtle.ttl $$name.res $$name.err; \ done; \ set -e; exit $$result check-turtle-serialize-syntax: build-rapper $(TEST_SERIALIZE_FILES) @set +e; result=0; \ $(ECHO) "Testing turtle exact serialization output"; \ for test in $(TEST_SERIALIZE_FILES); do \ name=`basename $$test .ttl` ; \ if test $$name = rdf-schema; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace; then \ baseuri=$(RDFS_NS_URI); \ elif test $$name = test-31 -o $$name = test-32; then \ baseuri=-; \ else \ baseuri=$(BASE_URI)$$test; \ fi; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ cmp -s $(srcdir)/$$name-out.ttl $$name-turtle.ttl; \ status=$$?; \ if test $$status = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ cat $$name.err; \ diff -a -u $(srcdir)/$$name-out.ttl $$name-turtle.ttl; \ fi; \ rm -f $$name-turtle.ttl $$name.err; \ done; \ set -e; exit $$result check-turtle-parse-ntriples: build-rapper @set +e; result=0; \ $(ECHO) "Testing Turtle parsing with N-Triples tests"; \ NT_TEST_FILES=`unset MAKELEVEL MAKEFLAGS; cd $(NTRIPLES_DIR) && $(MAKE) print-nt-test-files | sed -e 's,^, ,' -e 's, ,$(NTRIPLES_DIR)/,g'`; \ for test in $$NT_TEST_FILES; do \ name=`basename $$test .nt` ; \ baseuri=-; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -i turtle -o ntriples -n file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ test_expected=$(srcdir)/$(NTRIPLES_DIR)/$$name.out; \ if cmp $$test_expected $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -i turtle -o ntriples -n file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $$test_expected $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result check-turtle-serialize-rdf: build-rdfdiff build-rapper @set +e; result=0; \ RDF_TEST_FILES=`unset MAKELEVEL MAKEFLAGS; cd $(RDFXML_DIR) && $(MAKE) print-rdf-test-files | sed -e 's,^, ,' -e 's, ,$(RDFXML_DIR)/,g'`; \ $(ECHO) "Testing turtle serialization with legal rdf/xml"; \ for test in $$RDF_TEST_FILES $(TURTLE_SERIALIZE_RDF_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=-; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ status1=$$?; \ if test $$test = "$(RDFXML_DIR)/ex-38.rdf"; then \ diff $(srcdir)/ex-38-turtle.out $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ else \ $(top_builddir)/utils/rdfdiff -t turtle $(srcdir)/$$test $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; result=1; \ $(ECHO) $(top_builddir)/utils/rapper -q -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ $(ECHO) $(top_builddir)/utils/rdfdiff -t turtle $(srcdir)/$$test $$name-turtle.ttl '>' $$name.res; \ cat $$name.err; \ fi; \ rm -f $$name-turtle.ttl $$name.res $$name.err; \ done; \ set -e; exit $$result @MAINTAINER_MODE_TRUE@zip: tests.zip @MAINTAINER_MODE_TRUE@tests.zip: $(ALL_TEST_FILES) @MAINTAINER_MODE_TRUE@ rm -f $@ @MAINTAINER_MODE_TRUE@ zip $@ $(ALL_TEST_FILES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/tests/turtle/rdf-schema.out0000644000175000017500000004067410745050103015260 00000000000000 . "Indicates membership of a class" . "type"@en . "type"@fr . . . "The concept of Class" . "Class"@en . "Classe"@fr . . . "Properties used to express RDF Schema constraints." . "ConstraintProperty"@en . "Propri\u00E9t\u00E9Contrainte"@fr . . . . "Resources used to express RDF Schema constraints." . "ConstraintResource"@en . "RessourceContrainte"@fr . . . "This represents the set Containers." . "Container"@en . "Enveloppe"@fr . . . "ContainerMembershipProperty"@en . . . "This represents the set of atomic values, eg. textual strings." . "Literal"@en . "Litt\u00E9ral"@fr . . "The most general class" . "Resource"@en . "Ressource"@fr . . "Use this for descriptions" . . "comment"@en . "commentaire"@fr . . . "This is how we associate a class with properties that its instances can have" . "domain"@en . "domaine"@fr . . "Indicates a resource containing and defining the subject resource." . . "esD\u00E9finiPar"@fr . "isDefinedBy"@en . . . . "Provides a human-readable version of a resource name." . . "label"@en . "label"@fr . . . "Properties that can be used in a schema to provide constraints" . . "range"@en . "\u00E9tendue"@fr . . . "Indicates a resource that provides information about the subject resource." . . "seeAlso"@en . "voirAussi"@fr . . . "Indicates membership of a class" . . "sousClasseDe"@fr . "subClassOf"@en . . . "Indicates specialization of properties" . . "sousPropri\u00E9t\u00E9De"@fr . "subPropertyOf"@en . . . "Alt"@en . "Choix"@fr . . . "Bag"@en . "Ensemble"@fr . . . "The concept of a property." . "Property"@en . "Propri\u00E9t\u00E9"@fr . . . "Sequence"@en . "S\u00E9quence"@fr . . . "This represents the set of reified statements." . "D\u00E9claration"@fr . "Statement"@en . . . . "object"@en . "objet"@fr . . . "predicate"@en . "pr\u00E9dicat"@fr . . . . "subject"@en . "sujet"@fr . . . "object"@en . "value"@fr . . raptor-1.4.21/tests/turtle/rdf-schema.ttl0000644000175000017500000001036110745050064015250 00000000000000# RDF Namespace document converted into Turtle @prefix : . @prefix rdf: . rdf:type a rdf:Property; :comment "Indicates membership of a class"; :label "type"@en, "type"@fr; :range :Class . :Class a :Class; :comment "The concept of Class"; :label "Class"@en, "Classe"@fr; :subClassOf :Resource . :ConstraintProperty a :Class; :comment "Properties used to express RDF Schema constraints."; :label "ConstraintProperty"@en, "Propri\u00E9t\u00E9Contrainte"@fr; :subClassOf :ConstraintResource, rdf:Property . :ConstraintResource a :Class; :comment "Resources used to express RDF Schema constraints."; :label "ConstraintResource"@en, "RessourceContrainte"@fr; :subClassOf :Resource . :Container a :Class; :comment "This represents the set Containers."; :label "Container"@en, "Enveloppe"@fr; :subClassOf :Resource . :ContainerMembershipProperty a :Class; :label "ContainerMembershipProperty"@en; :subClassOf rdf:Property . :Literal a :Class; :comment "This represents the set of atomic values, eg. textual strings."; :label "Literal"@en, "Litt\u00E9ral"@fr . :Resource a :Class; :comment "The most general class"; :label "Resource"@en, "Ressource"@fr . :comment a rdf:Property; :comment "Use this for descriptions"; :domain :Resource; :label "comment"@en, "commentaire"@fr; :range :Literal . :domain a :ConstraintProperty; :comment "This is how we associate a class with properties that its instances can have"; :label "domain"@en, "domaine"@fr . :isDefinedBy a rdf:Property; :comment "Indicates a resource containing and defining the subject resource."; :domain :Resource; :label "esD\u00E9finiPar"@fr, "isDefinedBy"@en; :range :Resource; :subPropertyOf :seeAlso . :label a rdf:Property; :comment "Provides a human-readable version of a resource name."; :domain :Resource; :label "label"@en, "label"@fr; :range :Literal . :range a :ConstraintProperty; :comment "Properties that can be used in a schema to provide constraints"; :domain rdf:Property; :label "range"@en, "\u00E9tendue"@fr; :range :Class . :seeAlso a rdf:Property; :comment "Indicates a resource that provides information about the subject resource."; :domain :Resource; :label "seeAlso"@en, "voirAussi"@fr; :range :Resource . :subClassOf a rdf:Property; :comment "Indicates membership of a class"; :domain :Class; :label "sousClasseDe"@fr, "subClassOf"@en; :range :Class . :subPropertyOf a rdf:Property; :comment "Indicates specialization of properties"; :domain rdf:Property; :label "sousPropri\u00E9t\u00E9De"@fr, "subPropertyOf"@en; :range rdf:Property . rdf:Alt a :Class; :label "Alt"@en, "Choix"@fr; :subClassOf :Container . rdf:Bag a :Class; :label "Bag"@en, "Ensemble"@fr; :subClassOf :Container . rdf:Property a :Class; :comment "The concept of a property."; :label "Property"@en, "Propri\u00E9t\u00E9"@fr; :subClassOf :Resource . rdf:Seq a :Class; :label "Sequence"@en, "S\u00E9quence"@fr; :subClassOf :Container . rdf:Statement a :Class; :comment "This represents the set of reified statements."; :label "D\u00E9claration"@fr, "Statement"@en; :subClassOf :Resource . rdf:object a rdf:Property; :domain rdf:Statement; :label "object"@en, "objet"@fr . rdf:predicate a rdf:Property; :domain rdf:Statement; :label "predicate"@en, "pr\u00E9dicat"@fr; :range rdf:Property . rdf:subject a rdf:Property; :domain rdf:Statement; :label "subject"@en, "sujet"@fr; :range :Resource . rdf:value a rdf:Property; :label "object"@en, "value"@fr . : :seeAlso . raptor-1.4.21/tests/turtle/test-31-out.ttl0000644000175000017500000000042111170016736015241 00000000000000@prefix rdf: . @prefix rss: . rss:items [ rdf:_1 ; rdf:_2 ; a rdf:Seq ] . raptor-1.4.21/tests/turtle/README.txt0000644000175000017500000000104510360131566014207 00000000000000These are the tests for the Turtle Terse RDF Triple Language that must be passed by conformant systems. See http://www.dajobe.org/2004/01/turtle/ for the full conformance information. The format is a set of good tests and bad tests. Good tests are a pair of files: abc.ttl abc.out which are the input Turtle file and the expected output RDF triples, written in N-Triples. bad tests are of the form bad-XX.ttl which must fail. The tests should be performed with an assumed base URI of http://www.w3.org/2001/sw/DataAccess/df1/tests/ Dave raptor-1.4.21/tests/turtle/ex-62.rdf0000644000175000017500000000106311113423026014037 00000000000000 raptor-1.4.21/tests/turtle/ex-38-turtle.out0000644000175000017500000000076011302562553015427 00000000000000@prefix rdf: . @prefix ex: . rdf:object _:genid1 ; rdf:predicate ex:property ; rdf:subject ex:resource ; a rdf:Statement . ex:resource ex:property _:genid1 . _:genid1 ex:resource1 ; ; a . raptor-1.4.21/tests/turtle/rdfq-results.out0000644000175000017500000000644610674751730015720 00000000000000_:genid1 "x" . _:genid1 "123"^^ . _:genid2 "y" . _:genid2 . _:genid3 . _:genid3 _:genid1 . _:genid3 _:genid2 . _:genid4 "x" . _:genid4 "2003-01-21" . _:genid5 "y" . _:genid5 . _:genid6 . _:genid6 _:genid4 . _:genid6 _:genid5 . _:genid7 "x" . _:genid7 "anon1" . _:genid8 "y" . _:genid8 _:a . _:genid9 . _:genid9 _:genid7 . _:genid9 _:genid8 . _:genid10 "x" . _:genid10 "anon2" . _:genid11 "y" . _:genid11 _:a . _:genid12 . _:genid12 _:genid10 . _:genid12 _:genid11 . . "4"^^ . "x" . "y" . _:genid3 . _:genid6 . _:genid9 . _:genid12 . raptor-1.4.21/tests/turtle/rdfq-results.ttl0000644000175000017500000000232410674751730015703 00000000000000# from http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html @prefix rdf: . @prefix rs: . <> rdf:type rs:ResultSet ; rs:size 4 ; rs:resultVariable "x" ; rs:resultVariable "y" ; rs:solution [ rdf:type rs:ResultSolution ; rs:binding [ rs:variable "x" ; rs:value 123 ] ; rs:binding [ rs:variable "y" ; rs:value ] ] ; rs:solution [ rdf:type rs:ResultSolution ; rs:binding [ rs:variable "x" ; rs:value "2003-01-21" ] ; rs:binding [ rs:variable "y" ; rs:value ] ] ; rs:solution [ rdf:type rs:ResultSolution ; rs:binding [ rs:variable "x" ; rs:value "anon1" ] ; rs:binding [ rs:variable "y" ; rs:value _:a ] ] ; rs:solution [ rdf:type rs:ResultSolution ; rs:binding [ rs:variable "x" ; rs:value "anon2" ] ; rs:binding [ rs:variable "y" ; rs:value _:a ] ] ; . raptor-1.4.21/tests/turtle/manifest.ttl0000644000175000017500000001446110674751730015063 00000000000000@prefix rdf: . @prefix rdfs: . @prefix mf: . @prefix qt: . <> rdf:type mf:Manifest ; rdfs:comment "Turtle good syntax test cases (must pass)" ; mf:entries ( [ mf:name "test-00" ; rdfs:comment "Blank subject" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-01" ; rdfs:comment "@prefix and qnames" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-02" ; rdfs:comment ", operator" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-03" ; rdfs:comment "; operator" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-04" ; rdfs:comment "empty [] as subject and object" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-05" ; rdfs:comment "non-empty [] as subject and object" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-06" ; rdfs:comment "'a' as predicate" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-07" ; rdfs:comment "simple collection" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-08" ; rdfs:comment "empty collection" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-09" ; rdfs:comment "integer datatyped literal" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-10" ; rdfs:comment "decimal integer canonicalization" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-11" ; rdfs:comment "- and _ in names and qnames" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-12" ; rdfs:comment "tests for rdf:_ and other qnames starting with _" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-13" ; rdfs:comment "bare : allowed" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-14" ; rdfs:comment "10000 triples, more than the default Bison stack size" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-15" ; rdfs:comment "10000 triple objects (10000 triples)" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-16" ; rdfs:comment "10000 items (10000 triples)" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-17" ; rdfs:comment "simple long literal" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-18" ; rdfs:comment "long literals with escapes" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-19" ; rdfs:comment "floating point number" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-20" ; rdfs:comment "empty literals, normal and long variant" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-21" ; rdfs:comment "positive integer, decimal and doubles" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-22" ; rdfs:comment "negative integer, decimal and doubles" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-23" ; rdfs:comment "long literal ending in double quote" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-24" ; rdfs:comment "boolean literals" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-25" ; rdfs:comment "comments" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-26" ; rdfs:comment "no final mewline" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-27" ; rdfs:comment "duplicate prefix" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-28" ; rdfs:comment "decimal data types (serializing test)" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-29" ; rdfs:comment "Escaping U+0001 to U+007F in a URI" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-30" ; rdfs:comment "@base" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "rdf-schema" ; rdfs:comment "RDF Namespace document converted into Turtle" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "rdfs-namespace" ; rdfs:comment "RDFS Namespace document converted into Turtle" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "rdfq-results" ; rdfs:comment "Example query result from http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html" ; mf:action [ qt:data ] ; mf:result ] # End of tests ). raptor-1.4.21/tests/turtle/manifest-bad.ttl0000644000175000017500000000532110725557363015605 00000000000000@prefix rdf: . @prefix rdfs: . @prefix mf: . @prefix qt: . <> rdf:type mf:Manifest ; rdfs:comment "Turtle bad syntax test cases (must fail)" ; mf:entries ( [ mf:name "bad-00" ; rdfs:comment "prefix name must end in a :" ; mf:action [ qt:data ] ; ] [ mf:name "bad-01" ; rdfs:comment "blank predicate forbidden" ; mf:action [ qt:data ] ; ] [ mf:name "bad-02" ; rdfs:comment "blank predicate forbidden" ; mf:action [ qt:data ] ; ] [ mf:name "bad-03" ; rdfs:comment "a forbidden as subject" ; mf:action [ qt:data ] ; ] [ mf:name "bad-04" ; rdfs:comment ", not allowed in collections" ; mf:action [ qt:data ] ; ] [ mf:name "bad-05" ; rdfs:comment "{} not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-06" ; rdfs:comment "is and of not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-07" ; rdfs:comment "paths not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-08" ; rdfs:comment "@keywords not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-09" ; rdfs:comment "=> not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-10" ; rdfs:comment "= not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-11" ; rdfs:comment "@forAll not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-12" ; rdfs:comment "@forSome not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-13" ; rdfs:comment "<= not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-14" ; rdfs:comment "long literal with missing end" ; mf:action [ qt:data ] ; ] [ mf:name "bad-17" ; rdfs:comment "literal with ''s" ; mf:action [ qt:data ] ; ] [ mf:name "bad-18" ; rdfs:comment "long literal with '''s" ; mf:action [ qt:data ] ; ] # End of tests ). raptor-1.4.21/tests/ntriples/0000755000175000017500000000000011331056234013107 500000000000000raptor-1.4.21/tests/ntriples/bad-00.nt0000644000175000017500000000003111113423026014322 00000000000000_: "blah" . raptor-1.4.21/tests/ntriples/bad-01.nt0000644000175000017500000000003111113423026014323 00000000000000_:a "blah" . raptor-1.4.21/tests/ntriples/bad-02.nt0000644000175000017500000000003111113423026014324 00000000000000_:a "blah . raptor-1.4.21/tests/ntriples/bad-04.nt0000644000175000017500000000003111113423026014326 00000000000000_:a "\U00110000" . raptor-1.4.21/tests/ntriples/bad-06.nt0000644000175000017500000000015011113423026014332 00000000000000 . raptor-1.4.21/tests/ntriples/test.out0000644000175000017500000000557311113423026014544 00000000000000 . _:anon . _:anon . . . . . "simple literal" . "backslash:\\" . "dquote:\"" . "newline:\n" . "return\r" . "tab:\t" . . "x" . _:anon . "\u00E9" . "\u20AC" . "\U0010FFFF" . ""^^ . " "^^ . "x"^^ . "\""^^ . ""^^ . "a "^^ . "a c"^^ . "a\n\nc"^^ . "chat"^^ . "chat"@fr . "chat"@en . "abc"^^ . raptor-1.4.21/tests/ntriples/test.nt0000644000175000017500000000723711317765440014374 00000000000000# # N-Triples Test Cases # Dave Beckett - http://purl.org/net/dajobe/ # # $Id$ # # comment lines # comment line after whitespace # empty blank line, then one with spaces and tabs . _:anon . _:anon . # spaces and tabs throughout: . # line ending with CR NL (ASCII 13, ASCII 10) . # 2 statement lines separated by single CR (ASCII 10) . . # All literal escapes "simple literal" . "backslash:\\" . "dquote:\"" . "newline:\n" . "return\r" . "tab:\t" . # Space is optional before final . . "x". _:anon. # \u and \U escapes # latin small letter e with acute symbol \u00E9 - 3 UTF-8 bytes #xC3 #A9 "\u00E9" . # Euro symbol \u20ac - 3 UTF-8 bytes #xE2 #x82 #xAC "\u20AC" . # ? symbol \U0010FFFF - 4 UTF-8 bytes #xF4 #x8F #xBF #xBF "\U0010FFFF" . # extended literal syntax - parseType="Literal" (XML) ""^^ . " "^^ . "x"^^ . "\""^^ . ""^^ . "a "^^ . "a c"^^ . "a\n\nc"^^ . "chat"^^ . # resource28 removed 2003-08-03 # resource29 removed 2003-08-03 # literals with languages "chat"@fr . "chat"@en . # Datatype Literals "abc"^^ . # resource33 removed 2003-08-03 raptor-1.4.21/tests/ntriples/Makefile.am0000644000175000017500000000551211176416701015074 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor N-Triples tests # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # NT_TEST_FILES=test.nt NT_OUT_FILES=test.out NT_BAD_TEST_FILES=bad-00.nt bad-01.nt bad-02.nt bad-03.nt bad-04.nt \ bad-05.nt bad-06.nt # Used to make N-triples output consistent BASE_URI=http://librdf.org/raptor/tests/ EXTRA_DIST = \ $(NT_TEST_FILES) \ $(NT_OUT_FILES) \ $(NT_BAD_TEST_FILES) build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: build-rapper \ check-nt check-bad-nt check-nt: build-rapper $(NT_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing N-Triples"; \ for test in $(NT_TEST_FILES); do \ name=`basename $$test .nt` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples -n file:$(srcdir)/$$test $(BASE_URI)$$test > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ done; \ set -e; exit $$result check-bad-nt: build-rapper $(NT_BAD_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing that bad N-Triples fails"; \ for test in $(NT_BAD_TEST_FILES); do \ name=`basename $$test .nt` ; \ baseuri=$(BASE_URI)$$name.nt; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples -n file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(ECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(ECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result print-nt-test-files: @echo $(NT_TEST_FILES) | tr ' ' '\012' raptor-1.4.21/tests/ntriples/Makefile.in0000644000175000017500000003235711330704764015115 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor N-Triples tests # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/ntriples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ NT_TEST_FILES = test.nt NT_OUT_FILES = test.out NT_BAD_TEST_FILES = bad-00.nt bad-01.nt bad-02.nt bad-03.nt bad-04.nt \ bad-05.nt bad-06.nt # Used to make N-triples output consistent BASE_URI = http://librdf.org/raptor/tests/ EXTRA_DIST = \ $(NT_TEST_FILES) \ $(NT_OUT_FILES) \ $(NT_BAD_TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/ntriples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/ntriples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: build-rapper \ check-nt check-bad-nt check-nt: build-rapper $(NT_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing N-Triples"; \ for test in $(NT_TEST_FILES); do \ name=`basename $$test .nt` ; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples -n file:$(srcdir)/$$test $(BASE_URI)$$test > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(ECHO) "ok"; \ else \ $(ECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ done; \ set -e; exit $$result check-bad-nt: build-rapper $(NT_BAD_TEST_FILES) @set +e; result=0; \ $(ECHO) "Testing that bad N-Triples fails"; \ for test in $(NT_BAD_TEST_FILES); do \ name=`basename $$test .nt` ; \ baseuri=$(BASE_URI)$$name.nt; \ $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \ $(top_builddir)/utils/rapper -q -o ntriples -n file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(ECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(ECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(ECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(ECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result print-nt-test-files: @echo $(NT_TEST_FILES) | tr ' ' '\012' # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/utils/0000755000175000017500000000000011331056234011245 500000000000000raptor-1.4.21/utils/rdfdiff.c0000644000175000017500000006655711330672502012761 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * rdfdiff.c - Raptor RDF diff tool * * Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * Copyright (C) 2005, Steve Shepard steveshep@gmail.com * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include /* Raptor includes */ #include #include /* for access() and R_OK */ #ifdef HAVE_STDLIB_H #include #endif /* many places for getopt */ #ifdef HAVE_GETOPT_H #include #else #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef NEED_OPTIND_DECLARATION extern int optind; extern char *optarg; #endif #define MAX_ASCII_INT_SIZE 13 #define RDF_NAMESPACE_URI_LEN 43 #define ORDINAL_STRING_LEN (RDF_NAMESPACE_URI_LEN + MAX_ASCII_INT_SIZE + 1) #define GETOPT_STRING "bhf:t:u:" #ifdef HAVE_GETOPT_LONG static const struct option long_options[] = { /* name, has_arg, flag, val */ {"brief" , 0, 0, 'b'}, {"help" , 0, 0, 'h'}, {"from-format" , 1, 0, 'f'}, {"to-format" , 1, 0, 't'}, {"base-uri" , 1, 0, 'u'}, {NULL , 0, 0, 0} }; #endif #ifdef HAVE_GETOPT_LONG #define HELP_TEXT(short, long, description) " -" short ", --" long " " description #define HELP_ARG(short, long) "--" #long #define HELP_PAD "\n " #else #define HELP_TEXT(short, long, description) " -" short " " description #define HELP_ARG(short, long) "-" #short #define HELP_PAD "\n " #endif typedef struct rdfdiff_link_s { struct rdfdiff_link_s *next; raptor_statement *statement; } rdfdiff_link; typedef struct rdfdiff_blank_s { struct rdfdiff_blank_s *next; raptor_world *world; char *blank_id; raptor_statement *owner; rdfdiff_link *first; rdfdiff_link *last; int matched; } rdfdiff_blank; typedef struct { raptor_world *world; char *name; raptor_parser *parser; rdfdiff_link *first; rdfdiff_link *last; rdfdiff_blank *first_blank; rdfdiff_blank *last_blank; int statement_count; int error_count; int warning_count; int difference_count; } rdfdiff_file; static int brief = 0; static char *program=NULL; static const char * const title_format_string="Raptor RDF diff utility %s\n"; static int ignore_errors = 0; static int ignore_warnings = 0; static int emit_from_header = 1; static int emit_to_header = 1; static rdfdiff_file* from_file = NULL; static rdfdiff_file*to_file = NULL; static rdfdiff_file* rdfdiff_new_file(raptor_world* world, const unsigned char *name, const char *syntax); static void rdfdiff_free_file(rdfdiff_file* file); static rdfdiff_blank *rdfdiff_find_blank(rdfdiff_blank *first, char *blank_id); static rdfdiff_blank *rdfdiff_new_blank(raptor_world *world, char *blank_id); static void rdfdiff_free_blank(rdfdiff_blank *blank); static int rdfdiff_blank_equals(const rdfdiff_blank *b1, const rdfdiff_blank *b2, rdfdiff_file*b1_file, rdfdiff_file*b2_file); static void rdfdiff_error_handler(void *data, raptor_locator *locator, const char *message); static void rdfdiff_warning_handler(void *data, raptor_locator *locator, const char *message); static void rdfdiff_collect_statements(void *user_data, const raptor_statement *statement); int main(int argc, char *argv[]); /* Version of strcmp that can take NULL parameters. Assume that * Non-NULL strings are lexically greater than NULL strings */ static int safe_strcmp(const char *s1, const char *s2) { if(s1 == NULL && s2 == NULL) { return 0; } else if(s1 == NULL && s2 != NULL) { return -1; } else if(s1 != NULL && s2 == NULL) { return 1; } else { return strcmp(s1, s2); } } #ifdef RDFDIFF_DEBUG static void rdfdiff_print_statements(rdfdiff_file* file) { fprintf(stderr, "Statements in %s\n", file->name); rdfdiff_link *cur = file->first; while (cur) { raptor_print_statement(cur->statement, stderr); fprintf(stderr, "\n"); cur = cur->next; } } #endif static rdfdiff_file* rdfdiff_new_file(raptor_world *world, const unsigned char *name, const char *syntax) { rdfdiff_file* file = (rdfdiff_file*)RAPTOR_CALLOC(rdfdiff_file, 1, sizeof(rdfdiff_file)); if(file) { file->world = world; file->name = (char*)RAPTOR_MALLOC(cstring, strlen((const char*)name)+1); strcpy((char*)file->name, (const char*)name); file->parser = raptor_new_parser_v2(world, syntax); if(file->parser) { raptor_set_error_handler(file->parser, file, rdfdiff_error_handler); raptor_set_warning_handler(file->parser, file, rdfdiff_warning_handler); } else { fprintf(stderr, "%s: Failed to create raptor parser type %s for %s\n", program, syntax, name); rdfdiff_free_file(file); return(0); } } return file; } static void rdfdiff_free_file(rdfdiff_file* file) { rdfdiff_link *cur, *next; rdfdiff_blank *cur1, *next1; if(file->name) RAPTOR_FREE(cstring, file->name); if(file->parser) raptor_free_parser(file->parser); for(cur = file->first; cur; cur = next) { next = cur->next; raptor_free_statement(file->world, cur->statement); RAPTOR_FREE(rdfdiff_link, cur); } for(cur1 = file->first_blank; cur1; cur1 = next1) { next1 = cur1->next; rdfdiff_free_blank(cur1); } RAPTOR_FREE(rdfdiff_file, file); } static rdfdiff_blank * rdfdiff_new_blank(raptor_world* world, char *blank_id) { rdfdiff_blank *blank = (rdfdiff_blank *)RAPTOR_CALLOC(rdfdiff_blank, 1, sizeof(rdfdiff_blank)); if(blank) { blank->world = world; blank->blank_id = (char*)RAPTOR_MALLOC(cstring, strlen(blank_id)+1); strcpy((char*)blank->blank_id, (const char*)blank_id); } return blank; } static void rdfdiff_free_blank(rdfdiff_blank *blank) { rdfdiff_link *cur, *next; if(blank->blank_id) RAPTOR_FREE(cstring, blank->blank_id); if(blank->owner) raptor_free_statement(blank->world, blank->owner); for(cur = blank->first; cur; cur = next) { next = cur->next; raptor_free_statement(blank->world, cur->statement); RAPTOR_FREE(rdfdiff_link, cur); } RAPTOR_FREE(rdfdiff_blank, blank); } static int rdfdiff_ordinal_equals_resource(raptor_world* world, int ordinal, raptor_uri *resource) { unsigned char ordinal_string[ORDINAL_STRING_LEN + 1]; raptor_uri *ordinal_uri; int equal; snprintf((char *)ordinal_string, ORDINAL_STRING_LEN, "%s_%d", raptor_rdf_namespace_uri, ordinal); ordinal_uri = raptor_new_uri_v2(world, ordinal_string); equal = raptor_uri_equals_v2(world, ordinal_uri, resource); raptor_free_uri_v2(world, ordinal_uri); return equal; } static int rdfdiff_statement_equals(raptor_world *world, const raptor_statement *s1, const raptor_statement *s2) { int rv=0; if(!s1 || !s2) return 0; #if RAPTOR_DEBUG > 2 fprintf(stderr, "(rdfdiff_statement_equals) Comparing "); raptor_print_statement(s1, stderr); fprintf(stderr, " to "); raptor_print_statement(s2, stderr); #endif if(s1->subject_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL && s2->subject_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE) { /* check for ordinal/resource equivalence */ if(!rdfdiff_ordinal_equals_resource(world, *(int *)s1->subject, (raptor_uri *)s2->subject)) { rv=0; goto done; } } else if(s1->subject_type == RAPTOR_IDENTIFIER_TYPE_RESOURCE && s2->subject_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { /* check for ordinal/resource equivalence */ if(!rdfdiff_ordinal_equals_resource(world, *(int *)s2->subject, (raptor_uri *)s1->subject)) { rv=0; goto done; } } else { /* normal comparison */ if(s1->subject_type != s2->subject_type) { rv=0; goto done; } if(s1->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { /* Here for completeness. Anonymous nodes are taken care of * elsewhere */ /*if(strcmp((const char *)s1->subject, (const char *)s2->subject) != 0) return 0;*/ } else { if(!raptor_uri_equals_v2(world, (raptor_uri *)s1->subject, (raptor_uri *)s2->subject)) { rv=0; goto done; } } } if(s1->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL && s2->predicate_type == RAPTOR_IDENTIFIER_TYPE_PREDICATE) { /* check for ordinal/resource equivalence */ if(!rdfdiff_ordinal_equals_resource(world, *(int *)s1->predicate, (raptor_uri *)s2->predicate)) { rv=0; goto done; } } else if(s1->predicate_type == RAPTOR_IDENTIFIER_TYPE_PREDICATE && s2->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { /* check for ordinal/resource equivalence */ if(!rdfdiff_ordinal_equals_resource(world, *(int *)s2->predicate, (raptor_uri *)s1->predicate)) { rv=0; goto done; } } else { if(s1->predicate_type != s2->predicate_type) { rv=0; goto done; } if(s1->predicate_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { if(*(int *)s1->predicate != *(int *)s2->predicate) { rv=0; goto done; } } else { if(!raptor_uri_equals_v2(world, (raptor_uri *)s1->predicate, (raptor_uri *)s2->predicate)) { rv=0; goto done; } } } if(s1->object_type != s2->object_type) { rv=0; goto done; } if(s1->object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL || s1->object_type == RAPTOR_IDENTIFIER_TYPE_XML_LITERAL) { int equal; equal=!safe_strcmp((char *)s1->object, (char *)s2->object); if(equal) { if(s1->object_literal_language && s2->object_literal_language) equal=!strcmp((char *)s1->object_literal_language, (char *)s2->object_literal_language); else if(s1->object_literal_language || s2->object_literal_language) equal=0; else equal=1; if(equal) equal=raptor_uri_equals_v2(world, s1->object_literal_datatype, s2->object_literal_datatype); } rv=equal; goto done; } else if(s1->object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { /* Here for completeness. Anonymous nodes are taken care of * elsewhere */ /* if(strcmp((const char *)s1->object, (const char *)s2->object) != 0) return 0; */ } else if(s1->object_type == RAPTOR_IDENTIFIER_TYPE_ORDINAL) { if(*(int *)s1->object != *(int *)s2->object) { rv=0; goto done; } } else { if(!raptor_uri_equals_v2(world, (raptor_uri *)s1->object, (raptor_uri *)s2->object)) rv=0; } rv=1; done: #if RAPTOR_DEBUG > 2 fprintf(stderr, " : %s\n", (rv ? "equal" : "not equal")); #endif return rv; } static int rdfdiff_blank_equals(const rdfdiff_blank *b1, const rdfdiff_blank *b2, rdfdiff_file *b1_file, rdfdiff_file *b2_file) { /* first compare "owners". Owners are subject/predicate or arcs * in. */ int equal = 0; if(b1->owner == NULL && b2->owner == NULL) { /* Both are "top-level" anonymous objects. I.E. Neither is the * object of a statement. Fall through and compare based on their * contents. */ equal = 1; } else if(b1->owner == NULL || b2->owner == NULL) { equal = 0; } else if(b1->owner->subject_type != RAPTOR_IDENTIFIER_TYPE_ANONYMOUS && b2->owner->subject_type != RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { /* Neither are anonymous. Normal comparison. This will return * false if both the subject and the predicates don't match. We * know the objects are blank nodes. */ equal = rdfdiff_statement_equals(b1->world, b1->owner, b2->owner); } else if(b1->owner->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS && b2->owner->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { rdfdiff_blank *p1; rdfdiff_blank *p2; /* Both are anonymous. Need further testing. Check that the * containing anononymous nodes are eaual. */ #if 0 fprintf(stderr, "b1->owner: "); raptor_print_statement(b1->owner, stderr); fprintf(stderr, "\n"); fprintf(stderr, "b2->owner: "); raptor_print_statement(b2->owner, stderr); fprintf(stderr, "\n"); #endif p1 = rdfdiff_find_blank(b1_file->first_blank, (char *)b1->owner->subject); p2 = rdfdiff_find_blank(b2_file->first_blank, (char *)b2->owner->subject); equal = rdfdiff_blank_equals(p1, p2, b1_file, b2_file); } else { equal = 0; } /* Now compare the contents. This accounts for the case where a * subject has several properties (of the same predicate value) with * different blank nodes as values. */ if(equal) { rdfdiff_link *s1 = b1->first; while (s1) { rdfdiff_link *s2 = b2->first; while (s2) { if(rdfdiff_statement_equals(b1->world, s1->statement, s2->statement)) break; s2 = s2->next; } if(s2 == 0) { equal = 0; break; } s1 = s1->next; } } return equal; } static void rdfdiff_error_handler(void *data, raptor_locator *locator, const char *message) { rdfdiff_file* file = (rdfdiff_file*)data; if(!ignore_errors) { fprintf(stderr, "%s: Error - ", program); raptor_print_locator_v2(file->world, stderr, locator); fprintf(stderr, " - %s\n", message); raptor_parse_abort(file->parser); } file->error_count++; } static void rdfdiff_warning_handler(void *data, raptor_locator *locator, const char *message) { rdfdiff_file* file = (rdfdiff_file*)data; if(!ignore_warnings) { fprintf(stderr, "%s: Warning - ", program); raptor_print_locator_v2(file->world, stderr, locator); fprintf(stderr, " - %s\n", message); } file->warning_count++; } static rdfdiff_blank * rdfdiff_find_blank(rdfdiff_blank *first, char *blank_id) { rdfdiff_blank *rv_blank = 0; rdfdiff_blank *cur = first; while (cur) { if(strcmp(cur->blank_id, blank_id) == 0) { rv_blank = cur; break; } cur = cur->next; } return rv_blank; } static rdfdiff_blank * rdfdiff_lookup_blank(rdfdiff_file* file, char *blank_id) { rdfdiff_blank *rv_blank = rdfdiff_find_blank(file->first_blank, blank_id); if(rv_blank == NULL) { rv_blank = rdfdiff_new_blank(file->world, blank_id); if(rv_blank) { if(!file->first_blank) { file->first_blank = rv_blank; file->last_blank = rv_blank; } else { file->last_blank->next = rv_blank; file->last_blank = rv_blank; } } } return rv_blank; } static int rdfdiff_add_blank_statement(rdfdiff_file* file, const raptor_statement *statement) { rdfdiff_blank *blank; rdfdiff_link *dlink; blank = rdfdiff_lookup_blank(file, (char *)statement->subject); if(!blank) goto failed; dlink = (rdfdiff_link *)RAPTOR_MALLOC(rdfdiff_link, sizeof(rdfdiff_link)); if(!dlink) goto failed; dlink->statement = raptor_statement_copy(file->world, statement); if(!dlink->statement) { RAPTOR_FREE(rdfdiff_link, dlink); goto failed; } dlink->next = NULL; if(!blank->first) { blank->first = dlink; blank->last = dlink; } else { blank->last->next = dlink; blank->last = dlink; } return 0; failed: fprintf(stderr, "%s: Internal Error\n", program); return 1; } static int rdfdiff_add_blank_statement_owner(rdfdiff_file* file, const raptor_statement *statement) { rdfdiff_blank *blank; blank = rdfdiff_lookup_blank(file, (char *)statement->object); if(!blank) goto failed; blank->owner = raptor_statement_copy(file->world, statement); if(!blank->owner) goto failed; return 0; failed: fprintf(stderr, "%s: Internal Error\n", program); return 1; } static int rdfdiff_add_statement(rdfdiff_file* file, const raptor_statement *statement) { int rv = 0; rdfdiff_link *dlink = (rdfdiff_link *)RAPTOR_MALLOC(rdfdiff_link, sizeof(rdfdiff_link)); if(dlink) { dlink->statement = raptor_statement_copy(file->world, statement); if(dlink->statement) { dlink->next = NULL; if(!file->first) { file->first = dlink; file->last = dlink; } else { file->last->next = dlink; file->last = dlink; } } else { RAPTOR_FREE(rdfdiff_link, dlink); rv = 1; } } else { rv = 1; } if(rv != 0) fprintf(stderr, "%s: Internal Error\n", program); return rv; } static rdfdiff_link* rdfdiff_statement_find(rdfdiff_file* file, const raptor_statement *statement, rdfdiff_link** prev_p) { rdfdiff_link* prev = NULL; rdfdiff_link* cur = file->first; while(cur) { if(rdfdiff_statement_equals(file->world, cur->statement, statement)) { if(prev_p) *prev_p=prev; return cur; } prev=cur; cur=cur->next; } return NULL; } static int rdfdiff_statement_exists(rdfdiff_file* file, const raptor_statement *statement) { rdfdiff_link* node; rdfdiff_link* prev=NULL; node=rdfdiff_statement_find(file, statement, &prev); return (node != NULL); } /* * rdfdiff_collect_statements - Called when parsing "from" file to build a * list of statements for comparison with those in the "to" file. */ static void rdfdiff_collect_statements(void *user_data, const raptor_statement *statement) { int rv = 0; rdfdiff_file* file = (rdfdiff_file*)user_data; if(rdfdiff_statement_exists(file, statement)) return; file->statement_count++; if(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS || statement->object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) { if(statement->subject_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) rv = rdfdiff_add_blank_statement(file, statement); if(rv == 0 && statement->object_type == RAPTOR_IDENTIFIER_TYPE_ANONYMOUS) rv = rdfdiff_add_blank_statement_owner(file, statement); } else { rv = rdfdiff_add_statement(file, statement); } if(rv != 0) { raptor_parse_abort(file->parser); } } int main(int argc, char *argv[]) { raptor_world *world = NULL; unsigned char *from_string=NULL; unsigned char *to_string=NULL; raptor_uri *from_uri=NULL; raptor_uri *to_uri=NULL; raptor_uri *base_uri=NULL; const char *from_syntax = "rdfxml"; const char *to_syntax = "rdfxml"; int free_from_string = 0; int free_to_string = 0; int usage=0; int help=0; char *p; int rv = 0; rdfdiff_blank *b1; rdfdiff_link *cur; program=argv[0]; if((p=strrchr(program, '/'))) program=p+1; else if((p=strrchr(program, '\\'))) program=p+1; argv[0]=program; world = raptor_new_world(); if(!world) exit(1); rv = raptor_world_open(world); if(rv) exit(1); while (!usage && !help) { int c; #ifdef HAVE_GETOPT_LONG int option_index = 0; c = getopt_long (argc, argv, GETOPT_STRING, long_options, &option_index); #else c = getopt (argc, argv, GETOPT_STRING); #endif if(c == -1) break; switch (c) { case 0: case '?': /* getopt() - unknown option */ usage=1; break; case 'b': brief = 1; break; case 'h': help=1; break; case 'f': if(optarg) from_syntax = optarg; break; case 't': if(optarg) to_syntax = optarg; break; case 'u': if(optarg) base_uri = raptor_new_uri_v2(world, (const unsigned char*)optarg); break; } } if(optind != argc-2) help = 1; if(usage) { if(usage>1) { fprintf(stderr, title_format_string, raptor_version_string); fputs(raptor_short_copyright_string, stderr); fputc('\n', stderr); } fprintf(stderr, "Try `%s " HELP_ARG(h, help) "' for more information.\n", program); rv = 1; goto exit; } if(help) { printf("Usage: %s [OPTIONS] \n", program); printf(title_format_string, raptor_version_string); puts(raptor_short_copyright_string); puts("Find differences between two RDF files."); puts("\nOPTIONS:"); puts(HELP_TEXT("h", "help ", "Print this help, then exit")); puts(HELP_TEXT("b", "brief ", "Report only whether files differ")); puts(HELP_TEXT("u BASE-URI", "base-uri BASE-URI ", "Set the base URI for the files")); puts(HELP_TEXT("f FORMAT", "from-format FORMAT ", "Format of (default is rdfxml)")); puts(HELP_TEXT("t FORMAT", "to-format FORMAT ", "Format of (default is rdfxml)")); rv = 1; goto exit; } from_string = (unsigned char *)argv[optind++]; to_string = (unsigned char *)argv[optind]; if(!access((const char *)from_string, R_OK)) { char *filename = (char *)from_string; from_string = raptor_uri_filename_to_uri_string(filename); if(!from_string) { fprintf(stderr, "%s: Failed to create URI for file %s.\n", program, filename); rv = 2; goto exit; } free_from_string = 1; } if(!access((const char *)to_string, R_OK)) { char *filename = (char *)to_string; to_string = raptor_uri_filename_to_uri_string(filename); if(!to_string) { fprintf(stderr, "%s: Failed to create URI for file %s.\n", program, filename); rv = 2; goto exit; } free_to_string = 1; } if(from_string) { from_uri = raptor_new_uri_v2(world, from_string); if(!from_uri) { fprintf(stderr, "%s: Failed to create URI for %s\n", program, from_string); rv = 2; goto exit; } } if(to_string) { to_uri = raptor_new_uri_v2(world, to_string); if(!to_uri) { fprintf(stderr, "%s: Failed to create URI for %s\n", program, from_string); rv = 2; goto exit; } } /* create and init "from" data structures */ from_file = rdfdiff_new_file(world, from_string, from_syntax); if(!from_file) { rv = 2; goto exit; } /* create and init "to" data structures */ to_file = rdfdiff_new_file(world, to_string, to_syntax); if(!to_file) { rv = 2; goto exit; } /* parse the files */ raptor_set_statement_handler(from_file->parser, from_file, rdfdiff_collect_statements); if(raptor_parse_uri(from_file->parser, from_uri, base_uri)) { fprintf(stderr, "%s: Failed to parse URI %s as %s content\n", program, from_string, from_syntax); rv = 1; goto exit; } else { /* Note intentional from_uri as base_uri */ raptor_set_statement_handler(to_file->parser, to_file, rdfdiff_collect_statements); if(raptor_parse_uri(to_file->parser, to_uri, base_uri ? base_uri: from_uri)) { fprintf(stderr, "%s: Failed to parse URI %s as %s content\n", program, to_string, to_syntax); rv = 1; goto exit; } } /* Compare triples with no blank nodes */ cur = to_file->first; while(cur) { rdfdiff_link* node; rdfdiff_link* prev; node=rdfdiff_statement_find(from_file, cur->statement, &prev); if(node) { /* exists in from file - remove it from the list */ if(from_file->first == node) { from_file->first = node->next; } else { prev->next = node->next; } raptor_free_statement(world, node->statement); RAPTOR_FREE(rdfdiff_link, node); } else { if(!brief) { if(emit_from_header) { fprintf(stderr, "Statements in %s but not in %s\n", to_file->name, from_file->name); emit_from_header = 0; } fprintf(stderr, "< "); raptor_print_statement_v1(world, cur->statement, stderr); fprintf(stderr, "\n"); } to_file->difference_count++; } cur=cur->next; } /* Now compare the blank nodes */ b1 = to_file->first_blank; while (b1) { rdfdiff_blank *b2 = from_file->first_blank; while (b2) { if(!b2->matched && rdfdiff_blank_equals(b1, b2, to_file, from_file)) { b1->matched = 1; b2->matched = 1; break; } b2 = b2->next; } if(b2 == 0) { if(!brief) { #if 0 fprintf(stderr, "< "); raptor_print_statement(b1->owner, stderr); fprintf(stderr, "\n"); #else if(emit_from_header) { fprintf(stderr, "Statements in %s but not in %s\n", to_file->name, from_file->name); emit_from_header = 0; } fprintf(stderr, "< anonymous node %s\n", b1->blank_id); #endif } to_file->difference_count++; } b1 = b1->next; } if(from_file->first) { /* The entrys left in from_file have not been found in to_file. */ if(!brief) { if(emit_to_header) { fprintf(stderr, "Statements in %s but not in %s\n", from_file->name, to_file->name); emit_to_header = 0; } cur = from_file->first; while (cur) { if(!brief) { fprintf(stderr, "> "); raptor_print_statement_v1(world, cur->statement, stderr); fprintf(stderr, "\n"); } cur = cur->next; from_file->difference_count++; } } } if(from_file->first_blank) { rdfdiff_blank *blank = from_file->first_blank; while (blank) { if(!blank->matched) { if(!brief) { #if 0 fprintf(stderr, "> "); raptor_print_statement(blank->owner, stderr); fprintf(stderr, "\n"); #else if(emit_to_header) { fprintf(stderr, "Statements in %s but not in %s\n", from_file->name, to_file->name); emit_to_header = 0; } fprintf(stderr, "> anonymous node %s\n", blank->blank_id); #endif } from_file->difference_count++; } blank = blank->next; } } if(!(from_file->difference_count == 0 && to_file->difference_count == 0)) { if(brief) fprintf(stderr, "Files differ\n"); rv = 1; } exit: if(base_uri) raptor_free_uri_v2(world, base_uri); if(from_file) rdfdiff_free_file(from_file); if(to_file) rdfdiff_free_file(to_file); if(free_from_string) raptor_free_memory(from_string); if(free_to_string) raptor_free_memory(to_string); if(from_uri) raptor_free_uri_v2(world, from_uri); if(to_uri) raptor_free_uri_v2(world, to_uri); raptor_free_world(world); return rv; } raptor-1.4.21/utils/getopt.c0000644000175000017500000000712211330672502012636 00000000000000/* * Public Domain getopt - history below * */ /* * From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.sources * Subject: getopt library routine Date: 30 Mar 85 04:45:33 GMT */ /* * getopt -- public domain version of standard System V routine * * Strictly enforces the System V Command Syntax Standard; provided by D A * Gwyn of BRL for generic ANSI C implementations * * #define STRICT to prevent acceptance of clustered options with arguments * and ommision of whitespace between option and arg. */ /* * Modified by Manuel Novoa III on 1/5/01 to use weak symbols. * Programs needing long options will link gnu_getopt instead. */ /* * Last public domain version 1.5 downloaded from uclibc CVS: * http://www.uclibc.org/cgi-bin/cvsweb/uClibc/libc/unistd/getopt.c * on 2003-02-18 by Dave Beckett and tidied: * Ran through "indent getopt.c -gnu" then fixed up the mess * Removed register - compilers are smart these days * ANSI-fied the declarations * Prefixed with raptor_ so that it doesn't clash with any getopt * linked in later. */ #include #include #include int opterr; /* error => print message */ int optind; /* next argv[] index */ int optopt; /* Set for unknown arguments */ char *optarg; /* option parameter if any */ /* * Err: * program name argv[0] * specific message * defective option letter */ static int Err (char *name, char *mess, int c) /* returns '?' */ { optopt = c; if (opterr) { (void) fprintf (stderr, "%s: %s -- %c\n", name, mess, c); } return '?'; /* erroneous-option marker */ } int getopt (int argc, char * const argv[], const char *optstring) { static int sp = 1; /* position within argument */ int osp; /* saved `sp' for param test */ #ifndef STRICT int oind; /* saved `optind' for param test */ #endif int c; /* option letter */ char *cp; /* -> option in `optstring' */ optarg = NULL; /* initialise getopt vars */ if (optind == 0) { optind = 1; opterr = 1; optopt = 1; optarg = NULL; } if (sp == 1) { /* fresh argument */ if (optind >= argc /* no more arguments */ || argv[optind][0] != '-' /* no more options */ || argv[optind][1] == '\0' /* not option; stdin */ ) return EOF; else if (strcmp (argv[optind], "--") == 0) { ++optind; /* skip over "--" */ return EOF; /* "--" marks end of options */ } } c = argv[optind][sp]; /* option letter */ osp = sp++; /* get ready for next letter */ #ifndef STRICT oind = optind; /* save optind for param test */ #endif if (argv[optind][sp] == '\0') { /* end of argument */ ++optind; /* get ready for next try */ sp = 1; /* beginning of next argument */ } if (c == ':' || c == '?' /* optstring syntax conflict */ || (cp = strchr (optstring, c)) == NULL) /* not found */ { return Err (argv[0], "illegal option", c); } if (cp[1] == ':') { /* option takes parameter */ #ifdef STRICT if (osp != 1) { return Err (argv[0], "option must not be clustered", c); } /* reset by end of argument */ if (sp != 1) { return Err (argv[0], "option must be followed by white space", c); } #else if (oind == optind) { /* argument w/o whitespace */ optarg = &argv[optind][sp]; sp = 1; /* beginning of next argument */ } else #endif if (optind >= argc) { return Err (argv[0], "option requires an argument", c); } else /* argument w/ whitespace */ optarg = argv[optind]; ++optind; /* skip over parameter */ } return c; } raptor-1.4.21/utils/Makefile.am0000644000175000017500000000320411174111172013216 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor utils # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # bin_PROGRAMS = rapper EXTRA_PROGRAMS = rdfdiff man_MANS = rapper.1 CLEANFILES=rdfdiff # Memory debugging MEM=@MEM@ MEM_LIBS=@MEM_LIBS@ AM_CPPFLAGS= $(MEM) -I$(top_srcdir)/src LIBS=@LIBS@ $(MEM_LIBS) EXTRA_DIST= \ rapper.html \ $(man_MANS) rapper_SOURCES = rapper.c if GETOPT rapper_SOURCES += getopt.c raptor_getopt.h endif rapper_LDADD= $(top_builddir)/src/libraptor.la rdfdiff_SOURCES = rdfdiff.c if GETOPT rdfdiff_SOURCES += getopt.c raptor_getopt.h endif rdfdiff_LDADD= $(top_builddir)/src/libraptor.la if MAINTAINER_MODE rapper.html: $(srcdir)/rapper.1 $(srcdir)/../fix-groff-xhtml -groff -man -Thtml -P-l $< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(srcdir)/../fix-groff-xhtml $@ endif $(top_builddir)/src/libraptor.la: cd $(top_builddir)/src && $(MAKE) libraptor.la raptor-1.4.21/utils/Makefile.in0000644000175000017500000005665711330704764013264 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor utils # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = rapper$(EXEEXT) EXTRA_PROGRAMS = rdfdiff$(EXEEXT) @GETOPT_TRUE@am__append_1 = getopt.c raptor_getopt.h @GETOPT_TRUE@am__append_2 = getopt.c raptor_getopt.h subdir = utils DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am__rapper_SOURCES_DIST = rapper.c getopt.c raptor_getopt.h @GETOPT_TRUE@am__objects_1 = getopt.$(OBJEXT) am_rapper_OBJECTS = rapper.$(OBJEXT) $(am__objects_1) rapper_OBJECTS = $(am_rapper_OBJECTS) rapper_DEPENDENCIES = $(top_builddir)/src/libraptor.la AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent am__rdfdiff_SOURCES_DIST = rdfdiff.c getopt.c raptor_getopt.h am_rdfdiff_OBJECTS = rdfdiff.$(OBJEXT) $(am__objects_1) rdfdiff_OBJECTS = $(am_rdfdiff_OBJECTS) rdfdiff_DEPENDENCIES = $(top_builddir)/src/libraptor.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(rapper_SOURCES) $(rdfdiff_SOURCES) DIST_SOURCES = $(am__rapper_SOURCES_DIST) $(am__rdfdiff_SOURCES_DIST) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ $(MEM_LIBS) LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ # Memory debugging MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ man_MANS = rapper.1 CLEANFILES = rdfdiff AM_CPPFLAGS = $(MEM) -I$(top_srcdir)/src EXTRA_DIST = \ rapper.html \ $(man_MANS) rapper_SOURCES = rapper.c $(am__append_1) rapper_LDADD = $(top_builddir)/src/libraptor.la rdfdiff_SOURCES = rdfdiff.c $(am__append_2) rdfdiff_LDADD = $(top_builddir)/src/libraptor.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu utils/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad rapper$(EXEEXT): $(rapper_OBJECTS) $(rapper_DEPENDENCIES) @rm -f rapper$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rapper_OBJECTS) $(rapper_LDADD) $(LIBS) rdfdiff$(EXEEXT): $(rdfdiff_OBJECTS) $(rdfdiff_DEPENDENCIES) @rm -f rdfdiff$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfdiff_OBJECTS) $(rdfdiff_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfdiff.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: installcheck-binPROGRAMS maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installcheck-binPROGRAMS installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-man uninstall-man1 @MAINTAINER_MODE_TRUE@rapper.html: $(srcdir)/rapper.1 $(srcdir)/../fix-groff-xhtml @MAINTAINER_MODE_TRUE@ -groff -man -Thtml -P-l $< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(srcdir)/../fix-groff-xhtml $@ $(top_builddir)/src/libraptor.la: cd $(top_builddir)/src && $(MAKE) libraptor.la # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/utils/rapper.10000644000175000017500000001317711030100070012531 00000000000000.\" Hey, EMACS: -*- nroff -*- .\" .\" rapper.1 - Raptor RDF parsing and serializing utility manual page .\" .\" Copyright (C) 2002-2008 David Beckett - http://www.dajobe.org/ .\" Copyright (C) 2002-2005 University of Bristol - http://www.bristol.ac.uk/ .\" .TH rapper 1 "2007-08-19" .\" Please adjust this date whenever revising the manpage. .SH NAME rapper \- Raptor RDF parsing and serializing utility .SH SYNOPSIS .B rapper .RB [ OPTIONS ] .IR "INPUT-URI" .IR "[INPUT-BASE-URI]" .SH EXAMPLE .nf .B rapper -o ntriples http://planetrdf.com/guide/rss.rdf .br .B rapper -i rss-tag-soup -o rss-1.0 pile-of-rss.xml http://example.org/base/ .br .B rapper --count http://example.org/index.rdf .SH DESCRIPTION The .B rapper utility allows parsing of RDF content by the .B Raptor RDF parser toolkit emitting the results as RDF triples in a choice of syntaxes. The \fIINPUT-URI\fR can be a file name, '-' for standard input or if Raptor is built with a WWW retrieval library, a general URI. The optional \fIINPUT-BASE-URI\fR is used as the document parser base URI if present otherwise defaults to the \IINPUT-URI\fR. A value of '-' means no base URI. .SH OPTIONS rapper uses the usual GNU command line syntax, with long options starting with two dashes (`-') if supported by the getopt_long function. Otherwise the short options are only available. .TP .B \-h, \-\-help Show a summary of the options. .TP .B \-i, \-\-input FORMAT Set the input .I FORMAT to one of 'rdfxml' (RDF/XML, default), 'ntriples' (N-Triples, see below), 'turtle' (Turtle, see below) or 'rss-tag-soup' (RSS Tag Soup). The RSS Tag Soup parser can turn the many XML RSS formats and Atom 0.3 into RDF triples. .IP The list of parsers depends on how libraptor(3) was built. The list of supported parsers is given in the help summary given by \-h. .TP .B \-I, \-\-input-uri URI Set the input/parser base .I URI or use value '-' for no base. The default is the INPUT-URI argument value. .TP .B \-o, \-\-output FORMAT Set the output .I FORMAT to 'ntriples' (N-Triples, default), 'rdfxml' (RDF/XML), 'rdfxml-abbrev' (RDF/XML with abbreviations) or 'rss-1.0' (RSS 1.0, also an RDF/XML syntax). .IP The list of serializers depends on how libraptor(3) was built. The list of supported serializers is given in the help summary given by \-h. .TP .B \-O, \-\-output-uri URI Set the output/serializer base .I URI or use value '-' for no base. The default is the input base uri, either set by the argument INPUT-BASE-URI or via options .B \-I, \-\-input-uri URI .TP .B \-c, \-\-count Only count the triples and produce no other output. .TP .B \-e, \-\-ignore-errors Ignore errors, do not emit the messages and try to continue parsing. .TP .B \-f, \-\-feature FEATURE[=VALUE] Set a parser or serializer feature .I FEATURE to a value, or to 1 if .I VALUE is omitted, Use \-f help to get lists of valid parser and serializer features. .IP If the form \-f 'xmlns:\fIprefix\fP=\(dq\fIuri\fP\(dq' is used, the prefix and namespace uri given will be set for serializing. The syntax matches XML in that either or both of \fIprefix\fP or \fIuri\fP can be omitted. .TP .B \-g, \-\-guess Guess the parser to use from the source-URI rather than use the \-i FORMAT. .TP .B \-q, \-\-quiet No extra information messages. .TP .B \-r, \-\-replace-newlines Replace newlines in multi-line literals with spaces. .TP .B \-s, \-\-scan Scan for element in the RDF/XML source content. .TP .B \-\-show-graphs Print graph names (URIs) as they are seen in the input. This only has a meaning for parsers that support graph names such as the TRiG parser. .TP .B \-\-show-namespaces Print namespaces as they are seen in the input. .TP .B \-t, \-\-trace Print URIs retrieved during parsing. Especially useful for monitoring what the guess and GRDDL parsers are doing. .TP .B \-w, \-\-ignore-warnings Ignore warnings, do not emit the messages. .TP .B \-v, \-\-version Print the raptor version and exit. .SH "EXAMPLES" .br .B rapper -q -i ntriples -o rdfxml -f 'xmlns:rss="http://purl.org/rss/1.0/"' -f 'xmlns:ex="http://example.org/"' tests/test.nt .br .B rapper -q -o rdfxml -f 'xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"' tests/rdf-schema.rdf 'http://www.w3.org/2000/01/rdf-schema#' .SH "CONFORMING TO" \fIRDF/XML Syntax (Revised)\fR, W3C Recommendation, .UR http://www.w3.org/TR/rdf-syntax-grammar/ http://www.w3.org/TR/rdf-syntax-grammar/ .UE \fIN-Triples\fR, in \fIRDF Test Cases\fR, Jan Grant and Dave Beckett (eds.), W3C Recommendation, .UR http://www.w3.org/TR/rdf-testcases/#ntriples http://www.w3.org/TR/rdf-testcases/#ntriples .UE \fITurtle Terse RDF Triple Language\fR, Dave Beckett, .UR http://www.dajobe.org/2004/01/turtle/ http://www.dajobe.org/2004/01/turtle/ .UE \fIRDFA in XHTML: Syntax and Processing\fR, Ben Adida, Mark Birbeck, Shane McCarron and Steven Pemberton (eds.), W3C Candidate Recommendation, 20 June 2008 .UR http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/ http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/ .UE \fIRDF Site Summary (RSS) 1.0\fR, 2000-12-06 .UR http://purl.org/rss/1.0/spec http://purl.org/rss/1.0/spec .UE .SH SEE ALSO .BR libraptor(3), raptor-config(1) .SH CHANGES .SS 1.4.16 Added -I/--input-uri and -O/--output-uri to set the input and output (parser and serializer) base URIs separately. .SS 1.4.15 Added -t/--trace to do URI traces. .SS 1.4.5 Updated to add serializer rdfxml-abbrev .SS 1.4.3 Updated potential parser and serializers and described -f for defining namespaces. .SS 1.3.0 Added \-f for features. .br Added \-g for guessing the parser to use. .SS 1.1.0 Removed \-a, \-\-assume since rdf:RDF is now always optional. .br .SH AUTHOR Dave Beckett - .UR http://www.dajobe.org/ http://www.dajobe.org/ .UE .br raptor-1.4.21/utils/rapper.c0000644000175000017500000007075511330672502012641 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * rapper.c - Raptor RDF Parsing and Serializing utility * * Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include /* Raptor includes */ #include /* for access() and R_OK */ #ifdef HAVE_STDLIB_H #include #endif /* many places for getopt */ #ifdef HAVE_GETOPT_H #include #else #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef NEED_OPTIND_DECLARATION extern int optind; extern char *optarg; #endif static void print_triples(void *user_data, const raptor_statement *statement); static void print_graph(void *user_data, raptor_uri *graph); static void print_namespaces(void* user_data, raptor_namespace *nspace); static void relay_namespaces(void* user_data, raptor_namespace *nspace); int main(int argc, char *argv[]); static char *program=NULL; /* replace newlines in literal string output with spaces */ static int replace_newlines=0; /* extra noise? */ static int quiet=0; /* just count, no printing */ static int count=0; static int triple_count=0; static raptor_serializer* serializer=NULL; static int guess=0; static int reported_guess=0; static int report_namespace=0; static int report_graph=0; static void print_triples(void *user_data, const raptor_statement *triple) { raptor_parser* rdf_parser=(raptor_parser*)user_data; triple_count++; if(guess && !quiet && !reported_guess) { fprintf(stderr, "%s: Guessed parser name '%s'\n", program, raptor_get_name(rdf_parser)); reported_guess=1; } if(count) return; /* replace newlines with spaces if object is a literal string */ if(replace_newlines && triple->object_type == RAPTOR_IDENTIFIER_TYPE_LITERAL) { char *s; for(s=(char*)triple->object; *s; s++) if(*s == '\n') *s=' '; } raptor_serialize_statement(serializer, triple); return; } static void print_graph(void *user_data, raptor_uri *graph) { raptor_parser *parser = (raptor_parser *)user_data; if(!report_graph) return; if(graph) fprintf(stderr, "%s: Named graph: URI %s\n", program, raptor_uri_as_string_v2(raptor_parser_get_world(parser), graph)); else fprintf(stderr, "%s: Named graph: default\n", program); } static void print_namespaces(void* user_data, raptor_namespace *nspace) { /* raptor_parser* rdf_parser=(raptor_parser*)user_data; */ unsigned char *s; if(!report_namespace) return; s=raptor_namespaces_format(nspace, NULL); fprintf(stderr, "%s: Namespace declared: %s\n", program, s); raptor_free_memory(s); return; } static void relay_namespaces(void* user_data, raptor_namespace *nspace) { raptor_serializer* rdf_serializer=(raptor_serializer*)user_data; if(report_namespace) print_namespaces(user_data, nspace); raptor_serialize_set_namespace_from_namespace(rdf_serializer, nspace); } #ifdef HAVE_GETOPT_LONG #define HELP_TEXT(short, long, description) " -" short ", --" long " " description #define HELP_TEXT_LONG(long, description) " --" long " " description #define HELP_ARG(short, long) "--" #long #define HELP_ARG_BOTH(short, long) " \"-" short "\" or \"--" long "\"" #define HELP_PAD "\n " #else #define HELP_TEXT(short, long, description) " -" short " " description #define HELP_TEXT_LONG(long, description) #define HELP_ARG(short, long) "-" #short #define HELP_ARG_BOTH(short, long) "\"-" short "\"" #define HELP_PAD "\n " #endif #define GETOPT_STRING "nsaf:ghrqo:O:wecm:i:I:vt" #ifdef HAVE_GETOPT_LONG #define SHOW_NAMESPACES_FLAG 0x100 #define SHOW_GRAPHS_FLAG 0x200 static const struct option long_options[] = { /* name, has_arg, flag, val */ {"count", 0, 0, 'c'}, {"ignore-errors", 0, 0, 'e'}, {"feature", 1, 0, 'f'}, {"guess", 0, 0, 'g'}, {"help", 0, 0, 'h'}, {"input", 1, 0, 'i'}, {"input-uri", 1, 0, 'I'}, {"mode", 1, 0, 'm'}, {"ntriples", 0, 0, 'n'}, {"output", 1, 0, 'o'}, {"output-uri", 1, 0, 'O'}, {"quiet", 0, 0, 'q'}, {"replace-newlines", 0, 0, 'r'}, {"scan", 0, 0, 's'}, {"show-graphs", 0, 0, SHOW_GRAPHS_FLAG}, {"show-namespaces", 0, 0, SHOW_NAMESPACES_FLAG}, {"trace", 0, 0, 't'}, {"ignore-warnings", 0, 0, 'w'}, {"version", 0, 0, 'v'}, {NULL, 0, 0, 0} }; #endif static int error_count=0; static int warning_count=0; static int ignore_warnings=0; static int ignore_errors=0; static const char * const title_format_string="Raptor RDF syntax parsing and serializing utility %s\n"; static void rdfdump_error_handler(void *data, raptor_locator *locator, const char *message) { raptor_parser *parser = (raptor_parser *)data; if(!ignore_errors) { fprintf(stderr, "%s: Error - ", program); raptor_print_locator_v2(raptor_parser_get_world(parser), stderr, locator); fprintf(stderr, " - %s\n", message); raptor_parse_abort(parser); } error_count++; } static void rdfdump_warning_handler(void *data, raptor_locator *locator, const char *message) { raptor_parser *parser = (raptor_parser *)data; if(!ignore_warnings) { fprintf(stderr, "%s: Warning - ", program); raptor_print_locator_v2(raptor_parser_get_world(parser), stderr, locator); fprintf(stderr, " - %s\n", message); } warning_count++; } struct namespace_decl { unsigned char *prefix; unsigned char *uri_string; }; static void rdfdump_free_namespace_decl(void* data) { struct namespace_decl* nsd=(struct namespace_decl*)data; if(nsd->prefix) raptor_free_memory(nsd->prefix); if(nsd->uri_string) raptor_free_memory(nsd->uri_string); raptor_free_memory(nsd); } static int rapper_uri_trace(void *user_data, raptor_uri* uri) { fprintf(stderr, "%s: Processing URI %s\n", program, raptor_uri_as_string_v2(raptor_parser_get_world((raptor_parser*)user_data), uri)); return 0; } typedef struct { raptor_feature feature; int i_value; unsigned char* s_value; } feature_value; int main(int argc, char *argv[]) { /* input variables - parser * 'uri_string' is set to a URI otherwise 'filename' is file name * or if NULL, stdin. Base URI in 'base_uri_string' is required for stdin. */ raptor_world* world = NULL; raptor_parser* rdf_parser=NULL; char *filename=NULL; #define FILENAME_LABEL(name) ((name) ? (name) : "") unsigned char *uri_string=NULL; int free_uri_string=0; raptor_uri *uri; unsigned char *base_uri_string=NULL; raptor_uri *base_uri=NULL; const char *syntax_name="rdfxml"; raptor_sequence* parser_features=NULL; int scanning=0; int strict_mode=0; int trace=0; /* output variables - serializer */ /* 'serializer' object variable is a global */ const char *serializer_syntax_name="ntriples"; unsigned char *output_base_uri_string=NULL; raptor_uri *output_base_uri=NULL; raptor_sequence* serializer_features=NULL; raptor_sequence *namespace_declarations=NULL; /* other variables */ int rc; int usage=0; int help=0; char *p; program=argv[0]; if((p=strrchr(program, '/'))) program=p+1; else if((p=strrchr(program, '\\'))) program=p+1; argv[0]=program; world = raptor_new_world(); if(!world) exit(1); rc = raptor_world_open(world); if(rc) exit(1); while (!usage && !help) { int c; #ifdef HAVE_GETOPT_LONG int option_index = 0; c = getopt_long (argc, argv, GETOPT_STRING, long_options, &option_index); #else c = getopt (argc, argv, GETOPT_STRING); #endif if (c == -1) break; switch (c) { case 0: case '?': /* getopt() - unknown option */ usage=1; break; case 'a': break; case 'c': count=1; if(serializer_syntax_name) serializer_syntax_name = NULL; break; case 'f': if(optarg) { if(!strcmp(optarg, "help")) { int i; fprintf(stderr, "%s: Valid parser features are:\n", program); for(i=0; i < (int)raptor_get_feature_count(); i++) { const char *feature_name; const char *feature_label; if(!raptor_features_enumerate_v2(world, (raptor_feature)i, &feature_name, NULL, &feature_label)) { const char *feature_type=(raptor_feature_value_type((raptor_feature)i) == 0) ? "" : " (string)"; fprintf(stderr, " %-21s %s%s\n", feature_name, feature_label, feature_type); } } fprintf(stderr, "%s: Valid serializer features are:\n", program); for(i=0; i < (int)raptor_get_feature_count(); i++) { const char *feature_name; const char *feature_label; if(!raptor_serializer_features_enumerate_v2(world, (raptor_feature)i, &feature_name, NULL, &feature_label)) { const char *feature_type=(raptor_feature_value_type((raptor_feature)i) == 0) ? "" : " (string)"; fprintf(stderr, " %-21s %s%s\n", feature_name, feature_label, feature_type); } } fputs("Features are set with `" HELP_ARG(f, feature) " FEATURE=VALUE or `-f FEATURE'\nand take a decimal integer VALUE except where noted, defaulting to 1 if omitted.\n", stderr); fputs("\nA feature of the form xmlns:PREFIX=\"URI\" can be used to declare output\nnamespace prefixes and names for serializing using an XML-style syntax\nEither or both of PREFIX or URI can be omitted such as -f xmlns=\"URI\"\nThis form can be repeated for multiple declarations.\n", stderr); raptor_free_world(world); exit(0); } else if(!strncmp(optarg, "xmlns", 5)) { struct namespace_decl *nd; nd=(struct namespace_decl *)raptor_alloc_memory(sizeof(struct namespace_decl)); if(raptor_new_namespace_parts_from_string((unsigned char*)optarg, &nd->prefix, &nd->uri_string)) { fprintf(stderr, "%s: Bad xmlns syntax in '%s'\n", program, optarg); rdfdump_free_namespace_decl(nd); raptor_free_world(world); exit(0); } if(!namespace_declarations) namespace_declarations=raptor_new_sequence(rdfdump_free_namespace_decl, NULL); raptor_sequence_push(namespace_declarations, nd); } else { int i; size_t arg_len=strlen(optarg); feature_value* fv; int ok=0; /* parser features */ for(i=0; i < (int)raptor_get_feature_count(); i++) { const char *feature_name; size_t len; if(raptor_features_enumerate_v2(world, (raptor_feature)i, &feature_name, NULL, NULL)) continue; len=strlen(feature_name); if(!strncmp(optarg, feature_name, len)) { fv=(feature_value*)raptor_calloc_memory(sizeof(feature_value), 1); fv->feature=(raptor_feature)i; if(raptor_feature_value_type(fv->feature) == 0) { if(len < arg_len && optarg[len] == '=') fv->i_value=atoi(&optarg[len+1]); else if(len == arg_len) fv->i_value=1; } else { if(len < arg_len && optarg[len] == '=') fv->s_value=(unsigned char*)&optarg[len+1]; else if(len == arg_len) fv->s_value=(unsigned char*)""; } if(!parser_features) parser_features=raptor_new_sequence(raptor_free_memory, NULL); raptor_sequence_push(parser_features, fv); ok=1; break; } } for(i=0; i < (int)raptor_get_feature_count(); i++) { const char *feature_name; size_t len; if(raptor_serializer_features_enumerate_v2(world, (raptor_feature)i, &feature_name, NULL, NULL)) continue; len=strlen(feature_name); if(!strncmp(optarg, feature_name, len)) { fv=(feature_value*)raptor_calloc_memory(sizeof(feature_value), 1); fv->feature=(raptor_feature)i; if(raptor_feature_value_type(fv->feature) == 0) { if(len < arg_len && optarg[len] == '=') fv->i_value=atoi(&optarg[len+1]); else if(len == arg_len) fv->i_value=1; } else { if(len < arg_len && optarg[len] == '=') fv->s_value=(unsigned char*)&optarg[len+1]; else if(len == arg_len) fv->s_value=(unsigned char*)""; } if(!serializer_features) serializer_features=raptor_new_sequence(raptor_free_memory, NULL); raptor_sequence_push(serializer_features, fv); ok=1; break; } } if(!ok) { fprintf(stderr, "%s: invalid argument `%s' for `" HELP_ARG(f, feature) "'\nTry '%s " HELP_ARG(f, feature) " help' for a list of valid features\n", program, optarg, program); usage=1; } } } break; case 'g': guess=1; break; case 'h': help=1; break; case 'n': syntax_name="ntriples"; break; case 's': scanning=1; break; case 't': trace=1; break; case 'q': quiet=1; break; case 'r': replace_newlines=1; break; case 'm': if(optarg) { if(!strcmp(optarg, "strict")) strict_mode=1; else if (!strcmp(optarg, "lax")) strict_mode=0; else { fprintf(stderr, "%s: invalid argument `%s' for `" HELP_ARG(m, mode) "'\n", program, optarg); fprintf(stderr, "Valid arguments are:\n - `lax'\n - `strict'\n"); usage=1; } } break; case 'o': if(optarg) { if(raptor_serializer_syntax_name_check_v2(world, optarg)) serializer_syntax_name=optarg; else { int i; fprintf(stderr, "%s: invalid argument `%s' for `" HELP_ARG(o, output) "'\n", program, optarg); fprintf(stderr, "Valid arguments are:\n"); for(i=0; 1; i++) { const char *help_name; const char *help_label; if(raptor_serializers_enumerate_v2(world, i, &help_name, &help_label, NULL, NULL)) break; fprintf(stderr, " %-14s for %s\n", help_name, help_label); } usage=1; break; } } break; case 'O': if(optarg) output_base_uri_string=(unsigned char*)optarg; break; case 'i': if(optarg) { if(raptor_syntax_name_check_v2(world, optarg)) syntax_name=optarg; else { int i; fprintf(stderr, "%s: invalid argument `%s' for `" HELP_ARG(i, input) "'\n", program, optarg); fprintf(stderr, "Valid arguments are:\n"); for(i=0; 1; i++) { const char *help_name; const char *help_label; if(raptor_syntaxes_enumerate_v2(world, i, &help_name, &help_label, NULL, NULL)) break; fprintf(stderr, " %-14s for %s\n", help_name, help_label); } usage=1; break; } } break; case 'I': if(optarg) base_uri_string=(unsigned char*)optarg; break; case 'w': ignore_warnings=1; break; case 'e': ignore_errors=1; break; case 'v': fputs(raptor_version_string, stdout); fputc('\n', stdout); raptor_free_world(world); exit(0); #ifdef SHOW_NAMESPACES_FLAG case SHOW_NAMESPACES_FLAG: report_namespace=1; break; #endif #ifdef SHOW_GRAPHS_FLAG case SHOW_GRAPHS_FLAG: report_graph=1; break; #endif } /* end switch */ } if(optind != argc-1 && optind != argc-2 && !help && !usage) { usage=2; /* Title and usage */ } if(usage) { if(usage>1) { fprintf(stderr, title_format_string, raptor_version_string); fputs("Raptor home page: ", stderr); fputs(raptor_home_url_string, stderr); fputc('\n', stderr); fputs(raptor_copyright_string, stderr); fputs("\nLicense: ", stderr); fputs(raptor_license_string, stderr); fputs("\n\n", stderr); } fprintf(stderr, "Try `%s " HELP_ARG(h, help) "' for more information.\n", program); raptor_free_world(world); exit(1); } if(help) { int i; printf(title_format_string, raptor_version_string); puts("Parse RDF syntax from a source into serialized RDF triples."); printf("Usage: %s [OPTIONS] INPUT-URI [INPUT-BASE-URI]\n\n", program); fputs(raptor_copyright_string, stdout); fputs("\nLicense: ", stdout); puts(raptor_license_string); fputs("Raptor home page: ", stdout); puts(raptor_home_url_string); puts("\nArguments:"); puts(" INPUT-URI a filename, URI or '-' for standard input (stdin)."); puts(" INPUT-BASE-URI the input/parser base URI or '-' for none." "\n" " Default is INPUT-URI" "\n" " Equivalent to" HELP_ARG_BOTH("I INPUT-BASE-URI", "input-uri INPUT-BASE-URI")); puts("\nMain options:"); puts(HELP_TEXT("i FORMAT", "input FORMAT ", "Set the input format/parser to one of:")); for(i=0; 1; i++) { const char *help_name; const char *help_label; if(raptor_syntaxes_enumerate_v2(world, i, &help_name, &help_label, NULL, NULL)) break; printf(" %-14s %s", help_name, help_label); if(!i) puts(" (default)"); else putchar('\n'); } puts(HELP_TEXT("I URI", "input-uri URI ", "Set the input/parser base URI. '-' for none.") HELP_PAD " Default is INPUT-BASE-URI argument value."); putchar('\n'); puts(HELP_TEXT("o FORMAT", "output FORMAT", "Set the output format/serializer to one of:")); for(i=0; 1; i++) { const char *help_name; const char *help_label; if(raptor_serializers_enumerate_v2(world, i, &help_name, &help_label, NULL, NULL)) break; printf(" %-14s %s", help_name, help_label); if(!i) puts(" (default)"); else putchar('\n'); } puts(HELP_TEXT("O URI", "output-uri URI ", "Set the output/serializer base URI. '-' for none.") HELP_PAD " Default is input/parser base URI."); putchar('\n'); puts("General options:"); puts(HELP_TEXT("c", "count ", "Count triples only - do not print them.")); puts(HELP_TEXT("e", "ignore-errors ", "Ignore error messages")); puts(HELP_TEXT("f FEATURE(=VALUE)", "feature FEATURE(=VALUE)", HELP_PAD "Set parser or serializer features" HELP_PAD "Use `-f help' for a list of valid features")); puts(HELP_TEXT("g", "guess ", "Guess the input syntax (same as -i guess)")); puts(HELP_TEXT("h", "help ", "Print this help, then exit")); puts(HELP_TEXT("m MODE", "mode MODE ", "Set parser mode - 'lax' (default) or 'strict'")); puts(HELP_TEXT("q", "quiet ", "No extra information messages")); puts(HELP_TEXT("r", "replace-newlines", "Replace newlines with spaces in literals")); puts(HELP_TEXT("s", "scan ", "Scan for element in source")); #ifdef SHOW_GRAPHS_FLAG puts(HELP_TEXT_LONG("show-graphs ", "Show named graphs as they are declared")); #endif #ifdef SHOW_NAMESPACES_FLAG puts(HELP_TEXT_LONG("show-namespaces ", "Show namespaces as they are declared")); #endif puts(HELP_TEXT("t", "trace ", "Trace URIs retrieved during parsing")); puts(HELP_TEXT("w", "ignore-warnings ", "Ignore warning messages")); puts(HELP_TEXT("v", "version ", "Print the Raptor version")); puts("\nReport bugs to http://bugs.librdf.org/"); raptor_free_world(world); exit(0); } if(optind == argc-1) uri_string=(unsigned char*)argv[optind]; else { uri_string=(unsigned char*)argv[optind++]; base_uri_string=(unsigned char*)argv[optind]; } /* If uri_string is "path-to-file", turn it into a file: URI */ if(!strcmp((const char*)uri_string, "-")) { if(!base_uri_string) { fprintf(stderr, "%s: A Base URI is required when reading from standard input.\n", program); return(1); } uri_string=NULL; } else if(!access((const char*)uri_string, R_OK)) { filename=(char*)uri_string; uri_string=raptor_uri_filename_to_uri_string(filename); if(!uri_string) { fprintf(stderr, "%s: Failed to create URI for file %s.\n", program, filename); return(1); } free_uri_string=1; } if(uri_string) { uri=raptor_new_uri_v2(world, uri_string); if(!uri) { fprintf(stderr, "%s: Failed to create URI for %s\n", program, uri_string); return(1); } } else uri=NULL; /* stdin */ /* Set the input/parser base URI */ if(base_uri_string) { if(strcmp((const char*)base_uri_string, "-")) { base_uri=raptor_new_uri_v2(world, base_uri_string); if(!base_uri) { fprintf(stderr, "%s: Failed to create URI for %s\n", program, base_uri_string); return(1); } } } /* Set the output/serializer base URI from the argument if explicitly * set, otherwise default to the input base URI if present. */ if(!output_base_uri_string) { if(base_uri) output_base_uri=raptor_uri_copy_v2(world, base_uri); } else { if(strcmp((const char*)output_base_uri_string, "-")) { output_base_uri=raptor_new_uri_v2(world, (const unsigned char*)output_base_uri_string); if(!output_base_uri) { fprintf(stderr, "%s: Failed to create output base URI for %s\n", program, output_base_uri_string); return(1); } } else output_base_uri=NULL; } if(guess) syntax_name="guess"; rdf_parser=raptor_new_parser_v2(world, syntax_name); if(!rdf_parser) { fprintf(stderr, "%s: Failed to create raptor parser type %s\n", program, syntax_name); return(1); } raptor_set_error_handler(rdf_parser, rdf_parser, rdfdump_error_handler); raptor_set_warning_handler(rdf_parser, rdf_parser, rdfdump_warning_handler); raptor_set_parser_strict(rdf_parser, strict_mode); if(scanning) raptor_set_feature(rdf_parser, RAPTOR_FEATURE_SCANNING, 1); if(parser_features) { feature_value *fv; while((fv=(feature_value*)raptor_sequence_pop(parser_features))) { if(fv->s_value) raptor_parser_set_feature_string(rdf_parser, fv->feature, fv->s_value); else raptor_set_feature(rdf_parser, fv->feature, fv->i_value); raptor_free_memory(fv); } raptor_free_sequence(parser_features); parser_features=NULL; } if(trace) raptor_parser_set_uri_filter(rdf_parser, rapper_uri_trace, rdf_parser); if(!quiet) { if(uri_string) { if(base_uri_string) fprintf(stderr, "%s: Parsing URI %s with parser %s and base URI %s\n", program, uri_string, syntax_name, base_uri_string); else fprintf(stderr, "%s: Parsing URI %s with parser %s\n", program, uri_string, syntax_name); } else { if(base_uri_string) fprintf(stderr, "%s: Parsing file %s with parser %s and base URI %s\n", program, FILENAME_LABEL(filename), syntax_name, base_uri_string); else fprintf(stderr, "%s: Parsing file %s with parser %s\n", program, FILENAME_LABEL(filename), syntax_name); } } raptor_set_statement_handler(rdf_parser, rdf_parser, print_triples); if(report_graph) raptor_set_graph_handler(rdf_parser, rdf_parser, print_graph); if(report_namespace) raptor_set_namespace_handler(rdf_parser, rdf_parser, print_namespaces); if(serializer_syntax_name) { if(!quiet) { if(output_base_uri) fprintf(stderr, "%s: Serializing with serializer %s and base URI %s\n", program, serializer_syntax_name, raptor_uri_as_string_v2(world, output_base_uri)); else fprintf(stderr, "%s: Serializing with serializer %s\n", program, serializer_syntax_name); } serializer=raptor_new_serializer_v2(world, serializer_syntax_name); if(!serializer) { fprintf(stderr, "%s: Failed to create raptor serializer type %s\n", program, serializer_syntax_name); return(1); } if(namespace_declarations) { int i; for(i=0; i< raptor_sequence_size(namespace_declarations); i++) { struct namespace_decl *nd=(struct namespace_decl *)raptor_sequence_get_at(namespace_declarations, i); raptor_uri *ns_uri=NULL; if(nd->uri_string) ns_uri=raptor_new_uri_v2(world, nd->uri_string); raptor_serialize_set_namespace(serializer, ns_uri, nd->prefix); if(ns_uri) raptor_free_uri_v2(world, ns_uri); } raptor_free_sequence(namespace_declarations); namespace_declarations=NULL; } if(serializer_features) { feature_value *fv; while((fv=(feature_value*)raptor_sequence_pop(serializer_features))) { if(fv->s_value) raptor_serializer_set_feature_string(serializer, fv->feature, fv->s_value); else raptor_serializer_set_feature(serializer, fv->feature, fv->i_value); raptor_free_memory(fv); } raptor_free_sequence(serializer_features); serializer_features=NULL; } raptor_serialize_start_to_file_handle(serializer, output_base_uri, stdout); if(!report_namespace) raptor_set_namespace_handler(rdf_parser, serializer, relay_namespaces); } /* Begin the parsing of the content from file or URI, * sending it to serializer via callback print_triples() */ rc=0; if(!uri || filename) { if(raptor_parse_file(rdf_parser, uri, base_uri)) { fprintf(stderr, "%s: Failed to parse file %s %s content\n", program, FILENAME_LABEL(filename), syntax_name); rc=1; } } else { if(raptor_parse_uri(rdf_parser, uri, base_uri)) { fprintf(stderr, "%s: Failed to parse URI %s %s content\n", program, uri_string, syntax_name); rc=1; } } raptor_free_parser(rdf_parser); if(serializer) { raptor_serialize_end(serializer); raptor_free_serializer(serializer); } if(!quiet) { if(triple_count == 1) fprintf(stderr, "%s: Parsing returned 1 triple\n", program); else fprintf(stderr, "%s: Parsing returned %d triples\n", program, triple_count); } if(output_base_uri) raptor_free_uri_v2(world, output_base_uri); if(base_uri) raptor_free_uri_v2(world, base_uri); if(uri) raptor_free_uri_v2(world, uri); if(free_uri_string) raptor_free_memory(uri_string); if(namespace_declarations) raptor_free_sequence(namespace_declarations); if(parser_features) raptor_free_sequence(parser_features); if(serializer_features) raptor_free_sequence(serializer_features); raptor_free_world(world); if(error_count && !ignore_errors) return 1; if(warning_count && !ignore_warnings) return 2; return(rc); } raptor-1.4.21/utils/raptor_getopt.h0000644000175000017500000000044311322277070014233 00000000000000/* * Public Domain getopt header * */ #ifndef RAPTOR_GETOPT_H #define RAPTOR_GETOPT_H #ifdef __cplusplus extern "C" { #endif int getopt(int argc, char * const argv[], const char *optstring); extern char *optarg; extern int optind, opterr, optopt; #ifdef __cplusplus } #endif #endif raptor-1.4.21/utils/rapper.html0000644000175000017500000004506111227706737013370 00000000000000 Raptor RDF Parser Toolkit - Raptor RDF parser utility

Raptor RDF Parser Toolkit - Raptor RDF parser utility


NAME

rapper − Raptor RDF parsing and serializing utility

SYNOPSIS

rapper [OPTIONS] INPUT-URI [INPUT-BASE-URI]

EXAMPLE

rapper -o ntriples http://planetrdf.com/guide/rss.rdf
rapper -i rss-tag-soup -o rss-1.0 pile-of-rss.xml http://example.org/base/
rapper --count http://example.org/index.rdf


DESCRIPTION

The rapper utility allows parsing of RDF content by the Raptor RDF parser toolkit emitting the results as RDF triples in a choice of syntaxes. The INPUT-URI can be a file name, ’-’ for standard input or if Raptor is built with a WWW retrieval library, a general URI. The optional INPUT-BASE-URI is used as the document parser base URI if present otherwise defaults to the IINPUT-URI. A value of ’-’ means no base URI.

OPTIONS

rapper uses the usual GNU command line syntax, with long options starting with two dashes (‘-’) if supported by the getopt_long function. Otherwise the short options are only available.

−h, −−help

Show a summary of the options.

−i, −−input FORMAT

Set the input FORMAT to one of ’rdfxml’ (RDF/XML, default), ’ntriples’ (N-Triples, see below), ’turtle’ (Turtle, see below) or ’rss-tag-soup’ (RSS Tag Soup). The RSS Tag Soup parser can turn the many XML RSS formats and Atom 0.3 into RDF triples.

The list of parsers depends on how libraptor(3) was built. The list of supported parsers is given in the help summary given by −h.

−I, −−input-uri URI

Set the input/parser base URI or use value ’-’ for no base. The default is the INPUT-URI argument value.

−o, −−output FORMAT

Set the output FORMAT to ’ntriples’ (N-Triples, default), ’rdfxml’ (RDF/XML), ’rdfxml-abbrev’ (RDF/XML with abbreviations) or ’rss-1.0’ (RSS 1.0, also an RDF/XML syntax).

The list of serializers depends on how libraptor(3) was built. The list of supported serializers is given in the help summary given by −h.

−O, −−output-uri URI

Set the output/serializer base URI or use value ’-’ for no base. The default is the input base uri, either set by the argument INPUT-BASE-URI or via options −I, −−input-uri URI

−c, −−count

Only count the triples and produce no other output.

−e, −−ignore-errors

Ignore errors, do not emit the messages and try to continue parsing.

−f, −−feature FEATURE[=VALUE]

Set a parser or serializer feature FEATURE to a value, or to 1 if VALUE is omitted, Use −f help to get lists of valid parser and serializer features.

If the form −f ’xmlns:prefix="uri"’ is used, the prefix and namespace uri given will be set for serializing. The syntax matches XML in that either or both of prefix or uri can be omitted.

−g, −−guess

Guess the parser to use from the source-URI rather than use the −i FORMAT.

−q, −−quiet

No extra information messages.

−r, −−replace-newlines

Replace newlines in multi-line literals with spaces.

−s, −−scan

Scan for <rdf:RDF> element in the RDF/XML source content.

−−show-graphs

Print graph names (URIs) as they are seen in the input. This only has a meaning for parsers that support graph names such as the TRiG parser.

−−show-namespaces

Print namespaces as they are seen in the input.

−t, −−trace

Print URIs retrieved during parsing. Especially useful for monitoring what the guess and GRDDL parsers are doing.

−w, −−ignore-warnings

Ignore warnings, do not emit the messages.

−v, −−version

Print the raptor version and exit.

EXAMPLES

rapper -q -i ntriples -o rdfxml -f ’xmlns:rss="http://purl.org/rss/1.0/"’ -f ’xmlns:ex="http://example.org/"’ tests/test.nt
rapper -q -o rdfxml -f ’xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"’ tests/rdf-schema.rdf ’http://www.w3.org/2000/01/rdf-schema#’

CONFORMING TO

RDF/XML Syntax (Revised), W3C Recommendation, http://www.w3.org/TR/rdf-syntax-grammar/

N-Triples, in RDF Test Cases, Jan Grant and Dave Beckett (eds.), W3C Recommendation, http://www.w3.org/TR/rdf-testcases/#ntriples

Turtle Terse RDF Triple Language, Dave Beckett, http://www.dajobe.org/2004/01/turtle/

RDFA in XHTML: Syntax and Processing, Ben Adida, Mark Birbeck, Shane McCarron and Steven Pemberton (eds.), W3C Candidate Recommendation, 20 June 2008 http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/

RDF Site Summary (RSS) 1.0, 2000-12-06 http://purl.org/rss/1.0/spec

SEE ALSO

libraptor(3),raptor-config(1)

CHANGES

1.4.16

Added -I/--input-uri and -O/--output-uri to set the input and output (parser and serializer) base URIs separately.

1.4.15

Added -t/--trace to do URI traces.

1.4.5

Updated to add serializer rdfxml-abbrev

1.4.3

Updated potential parser and serializers and described -f for defining namespaces.

1.3.0

Added −f for features.
Added −g for guessing the parser to use.

1.1.0

Removed −a, −−assume since rdf:RDF is now always optional.

AUTHOR

Dave Beckett - http://www.dajobe.org/


Copyright 2002-2009 Dave Beckett
2002-2009 University of Bristol

raptor-1.4.21/win32/0000755000175000017500000000000011331056235011050 500000000000000raptor-1.4.21/win32/Debug/0000755000175000017500000000000011331056235012076 500000000000000raptor-1.4.21/win32/raptor.vcproj0000644000175000017500000007571410412155714013543 00000000000000 raptor-1.4.21/win32/Release/0000755000175000017500000000000011331056235012430 500000000000000raptor-1.4.21/win32/rapper.vcproj0000644000175000017500000001105110412155714013505 00000000000000 raptor-1.4.21/win32/Makefile.am0000644000175000017500000000043010674751730013034 00000000000000EXTRA_DIST=README.txt \ raptor.dsp raptor.dsw \ rapper.dsp \ raptortest.cpp raptortest.dsp \ raptor.sln \ rapper.vcproj raptor.vcproj raptortest.vcproj # Make some empty dirs that may be needed dist-hook: for dir in Debug Release; do \ mkdir $(distdir)/$$dir; \ done raptor-1.4.21/win32/Makefile.in0000644000175000017500000002531611330704764013052 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win32 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = README.txt \ raptor.dsp raptor.dsw \ rapper.dsp \ raptortest.cpp raptortest.dsp \ raptor.sln \ rapper.vcproj raptor.vcproj raptortest.vcproj all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu win32/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu win32/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Make some empty dirs that may be needed dist-hook: for dir in Debug Release; do \ mkdir $(distdir)/$$dir; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/win32/README.txt0000644000175000017500000000164310360131567012475 00000000000000This is user contributed win32 configuration for building raptor using MS Windows development environments. The latest files are the *.vcproj and *.sln files for MS Visual Studio 8, provided by John Barstow. The *.dsp *.dsw files are older and from MS Developer Studio provided by several prople. The various project files assume that (iconv, libxml, libxml2) or expat are available as well as curl have been installed or compiled in sibling top level directories. See the raptor.vcproj (newest) or raptor.dsp (older) files for the exact paths used, which are version-number dependant. It should be relatively easy to change raptor between using libxml2 and expat. See ..\win32_raptor_config.h near: /* For using expat on win32 */ ... #else /* For using libxml2 on win32 */ and pick one path. I do not test this configuration since I don't use Windows. I am happy to receive patches to fix things though. Dave 2005-05-19 raptor-1.4.21/win32/raptor.dsp0000644000175000017500000001647410362654021013023 00000000000000# Microsoft Developer Studio Project File - Name="raptor" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=raptor - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "raptor.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "raptor.mak" CFG="raptor - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "raptor - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "raptor - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "$/RDFDB/DSPs/RDF File/raptor" # PROP Scc_LocalPath "." CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "raptor - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WIN32_EXPORTS" /Yu"stdafx.h" /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "...." /I "../curl-7.12.1/include" /I ".." /I "../../expat-1.95.8/lib" /I "C:\OLD D DRIVE\Expat-1.95.7\Source\lib" /I "C:\OLD D DRIVE\curl\curl-7.10.3\include" /D "RAPTOR_INTERNAL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WIN32_EXPORTS" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 urlmon.lib xmlparse.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /libpath:"..\expat\lib" !ELSEIF "$(CFG)" == "raptor - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WIN32_EXPORTS" /Yu"stdafx.h" /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../curl-7.12.1/include" /I ".." /I "../../expat-1.95.8/lib" /I "C:\OLD D DRIVE\Expat-1.95.7\Source\lib" /I "C:\OLD D DRIVE\curl\curl-7.10.3\include" /D "RAPTOR_INTERNAL" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WIN32_EXPORTS" /FR /FD /GZ /c /Tc # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 urlmon.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /map /debug /machine:I386 /pdbtype:sept /libpath:"..\expat\lib" # SUBTRACT LINK32 /pdb:none !ENDIF # Begin Target # Name "raptor - Win32 Release" # Name "raptor - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\getopt.c # End Source File # Begin Source File SOURCE=..\ntriples_parse.c # End Source File # Begin Source File SOURCE=..\raptor_expat.c # End Source File # Begin Source File SOURCE=..\raptor_feature.c # End Source File # Begin Source File SOURCE=..\raptor_general.c # End Source File # Begin Source File SOURCE=..\raptor_identifier.c # End Source File # Begin Source File SOURCE=..\raptor_iostream.c # End Source File # Begin Source File SOURCE=..\raptor_libxml.c # End Source File # Begin Source File SOURCE=..\raptor_locator.c # End Source File # Begin Source File SOURCE=..\raptor_namespace.c # End Source File # Begin Source File SOURCE=..\raptor_nfc.c # End Source File # Begin Source File SOURCE=..\raptor_nfc_data.c # End Source File # Begin Source File SOURCE=..\raptor_parse.c # End Source File # Begin Source File SOURCE=..\raptor_qname.c # End Source File # Begin Source File SOURCE=..\raptor_rdfxml.c # End Source File # Begin Source File SOURCE=..\raptor_rfc2396.c # End Source File # Begin Source File SOURCE=..\raptor_rss.c # End Source File # Begin Source File SOURCE=..\raptor_sax2.c # End Source File # Begin Source File SOURCE=..\raptor_sequence.c # End Source File # Begin Source File SOURCE=..\raptor_serialize.c # End Source File # Begin Source File SOURCE=..\raptor_set.c # End Source File # Begin Source File SOURCE=..\raptor_stringbuffer.c # End Source File # Begin Source File SOURCE=..\raptor_uri.c # End Source File # Begin Source File SOURCE=..\raptor_utf8.c # End Source File # Begin Source File SOURCE=..\raptor_win32.c # End Source File # Begin Source File SOURCE=..\raptor_www.c # End Source File # Begin Source File SOURCE=..\raptor_www_curl.c # End Source File # Begin Source File SOURCE=..\raptor_www_libfetch.c # End Source File # Begin Source File SOURCE=..\raptor_www_libwww.c # End Source File # Begin Source File SOURCE=..\raptor_www_libxml.c # End Source File # Begin Source File SOURCE=..\raptor_xml.c # End Source File # Begin Source File SOURCE=..\raptor_xml_writer.c # End Source File # Begin Source File SOURCE=..\strcasecmp.c # End Source File # Begin Source File SOURCE=..\turtle_lexer.c # End Source File # Begin Source File SOURCE=..\turtle_parser.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "" # Begin Source File SOURCE=..\ntriples.h # End Source File # Begin Source File SOURCE=..\raptor.h # End Source File # Begin Source File SOURCE=..\raptor_getopt.h # End Source File # Begin Source File SOURCE=..\raptor_internal.h # End Source File # Begin Source File SOURCE=..\raptor_nfc.h # End Source File # Begin Source File SOURCE=..\turtle_common.h # End Source File # Begin Source File SOURCE=..\turtle_lexer.h # End Source File # Begin Source File SOURCE=..\turtle_parser.h # End Source File # Begin Source File SOURCE=..\win32_raptor_config.h # End Source File # End Group # End Target # End Project raptor-1.4.21/win32/raptor.dsw0000644000175000017500000000313310362654021013016 00000000000000Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "curllib"="..\..\..\..\curl\curl-7.10.3\lib\curllib.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "expat"="..\..\..\..\Expat-1.95.7\Source\lib\expat.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "rapper"=".\rapper.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "raptor"=".\raptor.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name curllib End Project Dependency Begin Project Dependency Project_Dep_Name expat End Project Dependency }}} ############################################################################### Project: "raptortest"=".\raptortest.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name raptor End Project Dependency }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### raptor-1.4.21/win32/raptor.sln0000644000175000017500000000360210412155714013017 00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rapper", "rapper.vcproj", "{1FFF7A31-D1A9-4516-AB07-4D415ABAB733}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raptor", "raptor.vcproj", "{F48C108E-B937-4D8C-A308-9C257C5D0D3D}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curllib", "..\..\..\curl-7.13.2\lib\curllib.vcproj", "{59ED01CF-49C8-42C5-846F-AAF0A5F3B437}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {1FFF7A31-D1A9-4516-AB07-4D415ABAB733}.Debug.ActiveCfg = Debug|Win32 {1FFF7A31-D1A9-4516-AB07-4D415ABAB733}.Debug.Build.0 = Debug|Win32 {1FFF7A31-D1A9-4516-AB07-4D415ABAB733}.Release.ActiveCfg = Release|Win32 {1FFF7A31-D1A9-4516-AB07-4D415ABAB733}.Release.Build.0 = Release|Win32 {F48C108E-B937-4D8C-A308-9C257C5D0D3D}.Debug.ActiveCfg = Debug|Win32 {F48C108E-B937-4D8C-A308-9C257C5D0D3D}.Debug.Build.0 = Debug|Win32 {F48C108E-B937-4D8C-A308-9C257C5D0D3D}.Release.ActiveCfg = Release|Win32 {F48C108E-B937-4D8C-A308-9C257C5D0D3D}.Release.Build.0 = Release|Win32 {59ED01CF-49C8-42C5-846F-AAF0A5F3B437}.Debug.ActiveCfg = Debug|Win32 {59ED01CF-49C8-42C5-846F-AAF0A5F3B437}.Debug.Build.0 = Debug|Win32 {59ED01CF-49C8-42C5-846F-AAF0A5F3B437}.Release.ActiveCfg = Release|Win32 {59ED01CF-49C8-42C5-846F-AAF0A5F3B437}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal raptor-1.4.21/win32/raptortest.vcproj0000644000175000017500000001116110362654021014424 00000000000000 raptor-1.4.21/win32/raptortest.cpp0000644000175000017500000000354410362654021013711 00000000000000// raptortest.cpp : Defines the entry point for the console application. // #include #include #include "..\raptor.h" #define TIMEIT #define DUMPIT int nStmts = 0; void dump_statement(void* user_data, const raptor_statement *statement) { nStmts++; #ifdef DUMPIT printf("%li, [%s, ", nStmts, statement->subject); if(statement->predicate_type == RAPTOR_PREDICATE_TYPE_ORDINAL) printf("[rdf:_%d]", *((int*)statement->predicate)); else if(statement->predicate_type == RAPTOR_PREDICATE_TYPE_XML_NAME) printf("%s", (const char*)statement->predicate); else printf("[%s]", (const char*)statement->predicate); if(statement->object_type == RAPTOR_OBJECT_TYPE_LITERAL || statement->object_type == RAPTOR_OBJECT_TYPE_XML_LITERAL) printf(", \"%s\"]", (const char*)statement->object); else if(statement->object_type == RAPTOR_OBJECT_TYPE_XML_NAME) printf(", %s]", (const char*)statement->object); else printf(", %s]", statement->object); printf("\n"); #endif } void usage() { printf("Usage: raptortest \nE.g. file:c:\\test.rdf\n"); } int main(int argc, char* argv[]) { if (argc != 2) { usage(); return -1; } raptor_init(); raptor_parser* p = raptor_new(""); raptor_set_statement_handler(p, NULL, dump_statement); #ifdef TIMEIT LARGE_INTEGER Start; QueryPerformanceCounter(&Start); #endif raptor_parse_file(p, argv[1], NULL); #ifdef TIMEIT LARGE_INTEGER End; QueryPerformanceCounter(&End); LARGE_INTEGER Frec; QueryPerformanceFrequency(&Frec); double Total = (End.LowPart-Start.LowPart); double StmtsPer = Total/nStmts; printf("%li statments processed in %g t. %g t/stmts, %li t/s, %g stmts/s", nStmts, Total, StmtsPer, Frec.LowPart, (double)Frec.LowPart/StmtsPer); #endif raptor_free(p); raptor_finish(); return 0; } raptor-1.4.21/win32/raptortest.dsp0000644000175000017500000001071310362654021013711 00000000000000# Microsoft Developer Studio Project File - Name="raptortest" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=raptortest - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "raptortest.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "raptortest.mak" CFG="raptortest - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "raptortest - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "raptortest - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "$/RDFDB/DSPs/RDF File/raptor" # PROP Scc_LocalPath "." CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "raptortest - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "../Release" # PROP Intermediate_Dir "../Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "C:\OLD D DRIVE\Expat-1.95.7\Source\lib" /I "C:\OLD D DRIVE\curl\curl-7.10.3\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../Release" !ELSEIF "$(CFG)" == "raptortest - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "raptortest___Win32_Debug" # PROP BASE Intermediate_Dir "raptortest___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "../Debug" # PROP Intermediate_Dir "../Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\\" /I "C:\OLD D DRIVE\Expat-1.95.7\Source\lib" /I "C:\OLD D DRIVE\curl\curl-7.10.3\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 raptor.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Debug" /libpath:"../Debug" !ENDIF # Begin Target # Name "raptortest - Win32 Release" # Name "raptortest - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\raptortest.cpp # End Source File # End Group # End Target # End Project raptor-1.4.21/win32/rapper.dsp0000644000175000017500000001062110362654021012771 00000000000000# Microsoft Developer Studio Project File - Name="rapper" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=rapper - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "rapper.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "rapper.mak" CFG="rapper - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "rapper - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "rapper - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "rapper - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "rapper - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c /Tc # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 raptor.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /map /debug /machine:I386 /pdbtype:sept /libpath:"Debug" # SUBTRACT LINK32 /incremental:no !ENDIF # Begin Target # Name "rapper - Win32 Release" # Name "rapper - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\getopt.c # End Source File # Begin Source File SOURCE=..\rdfdump.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project raptor-1.4.21/COPYING.LIB0000644000175000017500000006363710254306540011505 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! raptor-1.4.21/README0000644000175000017500000001442211330745027010714 00000000000000 #DOAP Raptor RDF Parser Library Dave Beckett Overview Raptor is a free software / Open Source C library that provides a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into a syntax. The supported parsing syntaxes are RDF/XML, N-Triples, TRiG, Turtle, RSS tag soup including all versions of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and XML and RDFa. The serializing syntaxes are RDF/XML (regular, and abbreviated), Atom 1.0, GraphViz, JSON, N-Triples, RSS 1.0 and XMP. Raptor was designed to work closely with the Redland RDF library (RDF Parser Toolkit for Redland) but is entirely separate. It is a portable library that works across many POSIX systems (Unix, GNU/Linux, BSDs, OSX, cygwin, win32). Raptor has no memory leaks and is fast. This is a mature and stable library. A summary of the changes can be found in the NEWS file, detailed API changes in the release notes and file-by-file changes in the ChangeLog. * Designed to integrate well with Redland * Parses content on the web if libcurl, libxml2 or BSD libfetch is available. * Supports all RDF terms including datatyped and XML literals * Optional features including parsers and serialisers can be selected at configure time. * Language bindings to Perl, PHP, Python and Ruby when used via Redland * No memory leaks * Fast * Standalone rapper RDF parser utility program Known bugs and issues are recorded in the Redland issue tracker. Parsers RDF/XML Parser A Parser for the standard RDF/XML syntax. * Fully handles the RDF/XML syntax updates for XML Base, xml:lang, RDF datatyping and Collections. * Handles all RDF vocabularies such as FOAF, RSS 1.0, Dublin Core, OWL, DOAP * Handles rdf:resource / resource attributes * Uses expat and/or (GNOME) libxml XML parsers as available or required N-Triples Parser A parser for the N-Triples syntax as defined by the W3C RDF Core working group for the RDF Test Cases. Turtle Parser A parser for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3. TRiG Parser A parser for the TriG - Turtle with Named Graphs syntax. The parser is alpha quality and may not support the entire TRiG specification. RSS "tag soup" parser A parser for the multiple XML RSS formats that use the elements such as channel, item, title, description in different ways. Attempts to turn the input into RSS 1.0 RDF triples. True RSS 1.0, as a full RDF vocabulary, is best parsed by the RDF/XML parser. It also generates triples for RSS enclosures. This parser also provides support for the Atom 1.0 syndication format defined in IETF RFC 4287 GRDDL and microformats parser A parser/processor for Gleaning Resource Descriptions from Dialects of Languages (GRDDL) syntax, W3C Recommendation of 2007-09-11 which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML or XML content into RDF/XML or other RDF syntax which can then be parsed. It uses either an XML or a lax HTML parser to allow HTML tag soup to be read. The parser passes the all the GRDDL tests as of Raptor 1.4.16. The parser also handles hCard and hReview using public XSL sheets. RDFa parser A parser for RDFa (W3C Candidate Recommendation 20 June 2008) implemented via librdfa linked inside Raptor, written by Manu Sporny of Digital Bazaar, licensed with the same license as Raptor. As of Raptor 1.4.18 the RDFa parser passes all of the RDFa test suite except for 4 tests. Serializers RDF/XML Serializer A serializer to the standard RDF/XML syntax as revised by the W3C RDF Core working group in 2004. This writes a plain triple-based RDF/XML serialization with no optimisation or pretty-printing. A second serializer is provided using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents. N-Triples Serializer A serializer to the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases. Atom 1.0 Serializer A serializer to the Atom 1.0 syndication format defined in IETF RFC 4287. Beta quality. JSON Serializers Two serializers for to write triples encoded in JSON, one (json) in a resource-centric abbreviated form RDF/JSON like Turtle or RDF/XML-Abbreviated; the other a triple-centric format (json-triples) based on the SPARQL results in JSON format. Beta quality. GraphViz DOT Serializer An serializer to the GraphViz DOT format which aids visualising RDF graphs. RSS 1.0 Serializer A serializer to the RDF Site Summary (RSS) 1.0 format. Turtle Serializer A serializer for the Turtle Terse RDF Triple Language syntax. XMP Serializer An alpha quality serializer to the Adobe XMP profile of RDF/XML suitable for embedding inside an external document. Documentation The public API is described in the libraptor.3 UNIX manual page. It is demonstrated in the rapper utility program which shows how to call the parser and write the triples in a serialization. When Raptor is used inside Redland, the Redland documentation explains how to call the parser and contains several example programs. There are also further examples in the example directory of the distribution. To install Raptor see the Installation document. Sources The packaged sources are available from http://download.librdf.org/source/ (master site) and also from the SourceForge site. The development Subversion sources can also be browsed with ViewCV. License This library is free software / open source software released under the LGPL (GPL) or Apache 2.0 licenses. See LICENSE.html for full details. Mailing Lists The Redland mailing lists discusses the development and use of Raptor and Redland as well as future plans and announcement of releases. __________________________________________________________________ Copyright (C) 2000-2010 Dave Beckett Copyright (C) 2000-2005 University of Bristol raptor-1.4.21/configure0000755000175000017500000174156211330704765011764 00000000000000#! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for Raptor RDF Parser 1.4.21. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: http://bugs.librdf.org/ about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Raptor RDF Parser' PACKAGE_TARNAME='raptor' PACKAGE_VERSION='1.4.21' PACKAGE_STRING='Raptor RDF Parser 1.4.21' PACKAGE_BUGREPORT='http://bugs.librdf.org/' PACKAGE_URL='' ac_unique_file="src/raptor_general.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS GTK_DOC_USE_REBASE_FALSE GTK_DOC_USE_REBASE_TRUE GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_BUILD_PDF_FALSE GTK_DOC_BUILD_PDF_TRUE GTK_DOC_BUILD_HTML_FALSE GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE PKG_CONFIG HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE GTKDOC_CHECK AM_BACKSLASH AM_DEFAULT_VERBOSITY abs_top_builddir abs_top_srcdir RAPTOR_XML_PARSER RAPTOR_WWW_LIBRARY RAPTOR_SERIALIZERS RAPTOR_PARSERS ECHO MEM_LIBS MEM RAPTOR_LDFLAGS RAPTOR_LIBTOOLLIBS PARSEDATE_FALSE PARSEDATE_TRUE LIBOBJS RAPTOR_NFC_CHECK_FALSE RAPTOR_NFC_CHECK_TRUE RAPTOR_RSS_COMMON_FALSE RAPTOR_RSS_COMMON_TRUE RAPTOR_SERIALIZER_ATOM_FALSE RAPTOR_SERIALIZER_ATOM_TRUE RAPTOR_SERIALIZER_JSON_FALSE RAPTOR_SERIALIZER_JSON_TRUE RAPTOR_SERIALIZER_DOT_FALSE RAPTOR_SERIALIZER_DOT_TRUE RAPTOR_SERIALIZER_RSS_1_0_FALSE RAPTOR_SERIALIZER_RSS_1_0_TRUE RAPTOR_SERIALIZER_TURTLE_FALSE RAPTOR_SERIALIZER_TURTLE_TRUE RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE RAPTOR_SERIALIZER_NTRIPLES_FALSE RAPTOR_SERIALIZER_NTRIPLES_TRUE RAPTOR_SERIALIZER_RDFXML_FALSE RAPTOR_SERIALIZER_RDFXML_TRUE LIBRDFA_FALSE LIBRDFA_TRUE RAPTOR_PARSER_RDFA_FALSE RAPTOR_PARSER_RDFA_TRUE RAPTOR_PARSER_GUESS_FALSE RAPTOR_PARSER_GUESS_TRUE RAPTOR_PARSER_GRDDL_FALSE RAPTOR_PARSER_GRDDL_TRUE RAPTOR_PARSER_RSS_FALSE RAPTOR_PARSER_RSS_TRUE RAPTOR_PARSER_N3_FALSE RAPTOR_PARSER_N3_TRUE RAPTOR_PARSER_TRIG_FALSE RAPTOR_PARSER_TRIG_TRUE RAPTOR_PARSER_TURTLE_FALSE RAPTOR_PARSER_TURTLE_TRUE RAPTOR_PARSER_NTRIPLES_FALSE RAPTOR_PARSER_NTRIPLES_TRUE RAPTOR_PARSER_RDFXML_FALSE RAPTOR_PARSER_RDFXML_TRUE RAPTOR_XML_LIBXML_FALSE RAPTOR_XML_LIBXML_TRUE RAPTOR_XML_EXPAT_FALSE RAPTOR_XML_EXPAT_TRUE CURL_CONFIG XSLT_CONFIG XML_CONFIG GETOPT_FALSE GETOPT_TRUE STRCASECMP_FALSE STRCASECMP_TRUE RAPTOR_LIBTOOL_VERSION RAPTOR_VERSION_DECIMAL PERL TAR YFLAGS YACC LEXLIB LEX_OUTPUT_ROOT LEX CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build RPM_RELEASE RELEASE_VERSION_FALSE RELEASE_VERSION_TRUE MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_release enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock enable_largefile with_expat_source with_xml2_config with_xslt_config with_curl_config enable_nfc_check with_www_config with_xml_parser enable_parsers enable_serializers with_xml_names with_www with_dmalloc with_memory_signing enable_debug enable_silent_rules with_html_dir enable_gtk_doc enable_gtk_doc_html enable_gtk_doc_pdf ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP YACC YFLAGS PKG_CONFIG' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Raptor RDF Parser 1.4.21 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/raptor] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Raptor RDF Parser 1.4.21:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-release Turn on optimizations (for maintainer). --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --disable-nfc-check Turn off Unicode NFC checking (default enabled). --enable-parsers=LIST Use RDF parsers (default=all) --enable-serializers=LIST Use RDF serializers (default=all) --enable-debug Enable debug messages (default no). --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-expat-source=PATH Location of expat source tree (default=auto) --with-xml2-config=PATH Location of libxml xml2-config --with-xslt-config=PATH Location of libxslt xslt-config --with-curl-config=PATH Location of libcurl curl-config --with-libwww-config=PATH Location of W3C libwww libwww-config --with-xml-parser=NAME Use XML parser - libxml (default), expat --with-xml-names=1.1|1.0 Select XML version name checking (default=1.0) --with-www=NAME Use WWW library - curl (default), xml, libfetch, none --with-dmalloc Use dmalloc debugging library (default=no) --with-memory-signing Sign allocated memory (default=no) --with-html-dir=PATH path to installed docs Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. PKG_CONFIG path to pkg-config utility Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Raptor RDF Parser configure 1.4.21 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.librdf.org/ ## ## -------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_type # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Raptor RDF Parser $as_me 1.4.21, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers src/raptor_config.h" ac_aux_dir= for ac_dir in build "$srcdir"/build; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='raptor' VERSION='1.4.21' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE libxml_min_version=2.6.8 libxslt_min_version=1.0.18 release_version=no # Check whether --enable-release was given. if test "${enable_release+set}" = set; then : enableval=$enable_release; \ if test "$enableval" = "yes"; then \ release_version=yes fi; fi if test $release_version = yes; then RELEASE_VERSION_TRUE= RELEASE_VERSION_FALSE='#' else RELEASE_VERSION_TRUE='#' RELEASE_VERSION_FALSE= fi if test "$USE_MAINTAINER_MODE" = yes -a $release_version = no; then CFLAGS=`echo $CFLAGS | sed -e "s/-OA-Za-z0-9*//"` CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-OA-Za-z0-9*//"` CPPFLAGS=`echo $CPPFLAGS | sed -e "s/-OA-Za-z0-9*//"` fi RPM_RELEASE=SNAP if test "$release_version" = "yes"; then RPM_RELEASE=1 fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:5094: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:5097: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:5100: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 6306 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7836: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7840: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8175: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8179: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8280: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8284: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8335: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8339: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) link_all_deplibs=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void) {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10719 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10815 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LEX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if test "${ac_cv_lib_lex+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi if test "X$LEX" != "X:" ; then if echo "$LEX" | grep flex >/dev/null 2>&1; then : else LEX="$SHELL $missing_dir/missing flex" LEX_OUTPUT_ROOT=lex.yy LEXLIB='' fi fi if test "$USE_MAINTAINER_MODE" = yes; then FLEX_MIN_VERSION=2.5.19 FLEX_REC_VERSION=2.5.33 { $as_echo "$as_me:${as_lineno-$LINENO}: checking flex version" >&5 $as_echo_n "checking flex version... " >&6; } if test "X$LEX" != "X:"; then FLEX_VERSION=`$LEX -V 2>&1 | awk '{print $NF}'` FLEX_VERSION_DEC=`echo $FLEX_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` FLEX_MIN_VERSION_DEC=`echo $FLEX_MIN_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` if test $FLEX_VERSION_DEC -ge $FLEX_MIN_VERSION_DEC; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX_VERSION - OK" >&5 $as_echo "$FLEX_VERSION - OK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: version $FLEX_VERSION - too old" >&5 $as_echo "version $FLEX_VERSION - too old" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please get flex from http://flex.sourceforge.net/" >&5 $as_echo "$as_me: WARNING: Please get flex from http://flex.sourceforge.net/" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&5 $as_echo "$as_me: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&2;} { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "flex too old See \`config.log' for more details." "$LINENO" 5; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not present" >&5 $as_echo "not present" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please get flex from http://flex.sourceforge.net/" >&5 $as_echo "$as_me: WARNING: Please get flex from http://flex.sourceforge.net/" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&5 $as_echo "$as_me: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&2;} { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "flex not present See \`config.log' for more details." "$LINENO" 5; } fi fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_YACC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" if test "$USE_MAINTAINER_MODE" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU bison" >&5 $as_echo_n "checking for GNU bison... " >&6; } # Match these styles of versions # GNU Bison version 1.28 # bison (GNU Bison) 1.875 YACC_VERSION=`$YACC --version 2>&1 | sed -ne 's/^.*GNU Bison[^0-9]*//p'` if test "X$YACC_VERSION" != X; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC_VERSION - OK" >&5 $as_echo "$YACC_VERSION - OK" >&6; } else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "$YACC is not GNU bison See \`config.log' for more details." "$LINENO" 5; } fi fi # Find a tar command for 'make dist' for ac_prog in gnutar gtar tar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_TAR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$TAR"; then ac_cv_prog_TAR="$TAR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_TAR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi TAR=$ac_cv_prog_TAR if test -n "$TAR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 $as_echo "$TAR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$TAR" && break done for ac_prog in perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_PERL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_PERL="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PERL=$ac_cv_prog_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PERL" && break done ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} possible_warnings="-Wall -Wextra \ -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -Wredundant-decls -Wswitch-enum \ -Wsign-compare -Werror-implicit-function-declaration -Wwrite-strings -Wpacked -Wmissing-format-attribute -Wpointer-arith -Wcast-align -Winit-self \ -Wunsafe-loop-optimizations -Wdeclaration-after-statement \ -Wold-style-definition \ -Wno-missing-field-initializers -Wno-unused-parameter \ -Wformat-security" warning_cflags= if test "$USE_MAINTAINER_MODE" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported $CC warning flags" >&5 $as_echo_n "checking for supported $CC warning flags... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $warning_cflags" >&5 $as_echo "$warning_cflags" >&6; } for warning in $possible_warnings; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $warning" >&5 $as_echo_n "checking whether $CC supports $warning... " >&6; } redland_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $warning" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : redland_cc_flag=yes else redland_cc_flag=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$redland_save_CFLAGS" if test "X$redland_cc_flag" = "Xyes"; then warning_cflags="$warning_cflags $warning" else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $redland_cc_flag" >&5 $as_echo "$redland_cc_flag" >&6; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC supports warning flags" >&5 $as_echo_n "checking $CC supports warning flags... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $warning_cflags" >&5 $as_echo "$warning_cflags" >&6; } fi MAINTAINER_CPPFLAGS="$warning_cflags" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in errno.h fcntl.h stdlib.h unistd.h string.h limits.h math.h dmalloc.h getopt.h sys/stat.h sys/param.h sys/time.h setjmp.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi for ac_header in fetch.h do : ac_fn_c_check_header_compile "$LINENO" "fetch.h" "ac_cv_header_fetch_h" "#include #ifdef HAVE_SYS_PARAM_H #include #endif " if test "x$ac_cv_header_fetch_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FETCH_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ac_fn_c_check_type "$LINENO" "u8" "ac_cv_type_u8" "$ac_includes_default" if test "x$ac_cv_type_u8" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_U8 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "u16" "ac_cv_type_u16" "$ac_includes_default" if test "x$ac_cv_type_u16" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_U16 1 _ACEOF fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned char" >&5 $as_echo_n "checking size of unsigned char... " >&6; } if test "${ac_cv_sizeof_unsigned_char+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned char))" "ac_cv_sizeof_unsigned_char" "$ac_includes_default"; then : else if test "$ac_cv_type_unsigned_char" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (unsigned char) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_unsigned_char=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_char" >&5 $as_echo "$ac_cv_sizeof_unsigned_char" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5 $as_echo_n "checking size of unsigned short... " >&6; } if test "${ac_cv_sizeof_unsigned_short+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short" "$ac_includes_default"; then : else if test "$ac_cv_type_unsigned_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (unsigned short) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_unsigned_short=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_short" >&5 $as_echo "$ac_cv_sizeof_unsigned_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 $as_echo_n "checking size of unsigned int... " >&6; } if test "${ac_cv_sizeof_unsigned_int+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default"; then : else if test "$ac_cv_type_unsigned_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (unsigned int) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_unsigned_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5 $as_echo "$ac_cv_sizeof_unsigned_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 $as_echo_n "checking size of unsigned long... " >&6; } if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : else if test "$ac_cv_type_unsigned_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (unsigned long) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_unsigned_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long _ACEOF version_major=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\1/'` version_minor=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\2/'` version_release=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\3/'` version_decimal=`expr $version_major \* 10000 + $version_minor \* 100 + $version_release` cat >>confdefs.h <<_ACEOF #define RAPTOR_VERSION_MAJOR $version_major _ACEOF cat >>confdefs.h <<_ACEOF #define RAPTOR_VERSION_MINOR $version_minor _ACEOF cat >>confdefs.h <<_ACEOF #define RAPTOR_VERSION_RELEASE $version_release _ACEOF cat >>confdefs.h <<_ACEOF #define RAPTOR_VERSION_DECIMAL $version_decimal _ACEOF # for raptor-config.in RAPTOR_VERSION_DECIMAL=$version_decimal # Libtool versioning # # CURRENT # The most recent interface number that this library implements. # # REVISION # The implementation number of the CURRENT interface. # # AGE # The difference between the newest and oldest interfaces that this # library implements. In other words, the library implements all the # interface numbers in the range from number `CURRENT - AGE' to # `CURRENT'. # # Rules: # 1. Start with version information of `0:0:0' for each libtool library. # # 2. Update the version information only immediately before a public # release of your software. More frequent updates are unnecessary, # and only guarantee that the current interface number gets larger # faster. # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed since the last public release, # then set AGE to 0. # # syntax: CURRENT[:REVISION[:AGE]] RAPTOR_LIBTOOL_VERSION=3:0:2 for ac_func in gettimeofday getopt getopt_long stricmp strcasecmp vsnprintf isascii setjmp do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_stricmp = no -a $ac_cv_func_stricmp = no; then STRCASECMP_TRUE= STRCASECMP_FALSE='#' else STRCASECMP_TRUE='#' STRCASECMP_FALSE= fi if test $ac_cv_func_getopt = no -a $ac_cv_func_getopt_long = no; then GETOPT_TRUE= GETOPT_FALSE='#' else GETOPT_TRUE='#' GETOPT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether need to declare optind" >&5 $as_echo_n "checking whether need to declare optind... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_GETOPT_H #include #endif int main () { int x=optind; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else $as_echo "#define NEED_OPTIND_DECLARATION 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_func_vsnprintf = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking vsnprintf has C99 compatible return value" >&5 $as_echo_n "checking vsnprintf has C99 compatible return value... " >&6; } if test "$cross_compiling" = yes; then : $as_echo "#define CHECK_VSNPRINTF_RUNTIME 1" >>confdefs.h else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int is_c99(char *s, ...) { char buffer[32]; va_list args; int r; va_start(args, s); r = vsnprintf(buffer, 5, s, args); va_end(args); return (r == 7); } int main(int argc, char* argv) { return is_c99("1234567"); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else $as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi need_libm=no # Save LIBS oLIBS="$LIBS" RAPTOR_LDFLAGS= LIBS="$LIBS -lm" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether have trunc in libm" >&5 $as_echo_n "checking whether have trunc in libm... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_MATH_H #include #endif int main () { double d=trunc(1.0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } need_libm=yes $as_echo "#define HAVE_TRUNC 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether have round in libm" >&5 $as_echo_n "checking whether have round in libm... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_MATH_H #include #endif int main () { double d=round(1.0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } need_libm=yes $as_echo "#define HAVE_ROUND 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$oLIBS" # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if test "${ac_cv_sys_large_files+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if test "X$need_libm" = Xyes; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -lm" fi have_expat=0 have_expat_lib=0 have_expat_source=0 need_expat=0 need_expat_source=0 expat_source_dir= expat_obj_dir= # Check whether --with-expat-source was given. if test "${with_expat_source+set}" = set; then : withval=$with_expat_source; expat_source="$withval" else expat_source="auto" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expat sources" >&5 $as_echo_n "checking for expat sources... " >&6; } if test "$expat_source" != "auto"; then have_expat_source=1 have_expat=1 expat_source_dir=$expat_source expat_obj_dir=$expat_source { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - $expat_source" >&5 $as_echo "yes - $expat_source" >&6; } elif test -d $srcdir/expat; then expat_source=local have_expat_source=1 have_expat=1 expat_source_dir="\$(top_srcdir)/expat" expat_obj_dir="\$(top_builddir)/expat" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - local source" >&5 $as_echo "yes - local source" >&6; } else expat_source= { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "X$expat_source" = X; then expat_source=auto else if test -d "$expat_source_dir/xmlparse"; then # old expat CPPFLAGS="-I$expat_source_dir/xmlparse $CPPFLAGS" else # new expat CPPFLAGS="-I$expat_source_dir/lib $CPPFLAGS" fi fi for ac_header in expat.h xmlparse.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lxmltok" >&5 $as_echo_n "checking for main in -lxmltok... " >&6; } if test "${ac_cv_lib_xmltok_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxmltok $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_xmltok_main=yes else ac_cv_lib_xmltok_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xmltok_main" >&5 $as_echo "$ac_cv_lib_xmltok_main" >&6; } if test "x$ac_cv_lib_xmltok_main" = x""yes; then : xmlt=1 else xmlt=0 fi # Raptor needs XML_ParserCreate expat function (not namespace one) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lxmlparse" >&5 $as_echo_n "checking for XML_ParserCreate in -lxmlparse... " >&6; } if test "${ac_cv_lib_xmlparse_XML_ParserCreate+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxmlparse -lxmltok $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XML_ParserCreate (); int main () { return XML_ParserCreate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_xmlparse_XML_ParserCreate=yes else ac_cv_lib_xmlparse_XML_ParserCreate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xmlparse_XML_ParserCreate" >&5 $as_echo "$ac_cv_lib_xmlparse_XML_ParserCreate" >&6; } if test "x$ac_cv_lib_xmlparse_XML_ParserCreate" = x""yes; then : xmlp=1 else xmlp=0 fi LIBS="$oLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5 $as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; } if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XML_ParserCreate (); int main () { return XML_ParserCreate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_expat_XML_ParserCreate=yes else ac_cv_lib_expat_XML_ParserCreate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 $as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; } if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then : libexpat=1 else libexpat=0 fi LIBS="$oLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working expat in libxmlparse and libxmltok" >&5 $as_echo_n "checking for working expat in libxmlparse and libxmltok... " >&6; } if test $xmlp = 1 -a $xmlt = 1 -a $ac_cv_header_xmlparse_h = yes; then LIBS="$LIBS -lxmlparse -lxmltok" if test "$cross_compiling" = yes; then : worked=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include main() {XML_ParserCreate(NULL); return(0);} _ACEOF if ac_fn_c_try_run "$LINENO"; then : worked=yes else worked=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $worked = yes; then # Old expat have_expat_lib=1 have_expat=1 expat_libs="-lxmlparse -lxmltok" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi LIBS="$oLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working expat in libexpat" >&5 $as_echo_n "checking for working expat in libexpat... " >&6; } if test $libexpat = 1 -a $ac_cv_header_expat_h = yes ; then LIBS="$LIBS -lexpat" if test "$cross_compiling" = yes; then : worked=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include main() {XML_ParserCreate(NULL); return(0);} _ACEOF if ac_fn_c_try_run "$LINENO"; then : worked=yes else worked=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $worked = yes; then # New expat - expat-1.95.0 or later have_expat_lib=1 have_expat=1 expat_libs="-lexpat" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expat support of UTF-8 BOM" >&5 $as_echo_n "checking for expat support of UTF-8 BOM... " >&6; } if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run test program while cross compiling See \`config.log' for more details." "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #ifdef HAVE_EXPAT_H #include #else #ifdef HAVE_XMLPARSE_H #include #endif #endif int main(int argc, char **argv) { const char *xml_buffer= /* UTF-8 BOM */ "\xef\xbb\xbf"; XML_Parser xp=XML_ParserCreate(NULL); int len=strlen(xml_buffer); /* This might cause an error on expat 1.95.1 */ int rc=XML_Parse(xp, xml_buffer, len, 1); /* if expat gives an error ... */ if(!rc) { /* then the next line will crash in normal_updatePosition */ int line=XML_GetCurrentLineNumber(xp); } XML_ParserFree(xp); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else $as_echo "#define EXPAT_UTF8_BOM_CRASH 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The available expat crashes on XML UTF-8 BOM in documents" >&5 $as_echo "$as_me: WARNING: The available expat crashes on XML UTF-8 BOM in documents" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fix either by using libxml or expat 1.95.2+" >&5 $as_echo "$as_me: WARNING: Fix either by using libxml or expat 1.95.2+" >&2;} fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi LIBS="$oLIBS" # Check whether --with-xml2-config was given. if test "${with_xml2_config+set}" = set; then : withval=$with_xml2_config; xml2_config="$withval" else xml2_config="" fi if test "X$xml2_config" != "X" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $xml2_config" >&5 $as_echo_n "checking for $xml2_config... " >&6; } if test -f $xml2_config ; then XML_CONFIG=$xml2_config { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - searching PATH" >&5 $as_echo "no - searching PATH" >&6; } fi fi if test "X$XML_CONFIG" = "X"; then for ac_prog in xml2-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_XML_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$XML_CONFIG"; then ac_cv_prog_XML_CONFIG="$XML_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_XML_CONFIG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi XML_CONFIG=$ac_cv_prog_XML_CONFIG if test -n "$XML_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_CONFIG" >&5 $as_echo "$XML_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$XML_CONFIG" && break done fi # Check whether --with-xslt-config was given. if test "${with_xslt_config+set}" = set; then : withval=$with_xslt_config; xslt_config="$withval" else xslt_config="" fi if test "X$xslt_config" != "X" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $xslt_config" >&5 $as_echo_n "checking for $xslt_config... " >&6; } if test -f $xslt_config ; then XSLT_CONFIG=$xslt_config { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - searching PATH" >&5 $as_echo "no - searching PATH" >&6; } fi fi if test "X$XSLT_CONFIG" = "X"; then for ac_prog in xslt-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_XSLT_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$XSLT_CONFIG"; then ac_cv_prog_XSLT_CONFIG="$XSLT_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_XSLT_CONFIG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi XSLT_CONFIG=$ac_cv_prog_XSLT_CONFIG if test -n "$XSLT_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLT_CONFIG" >&5 $as_echo "$XSLT_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$XSLT_CONFIG" && break done fi # Check whether --with-curl-config was given. if test "${with_curl_config+set}" = set; then : withval=$with_curl_config; curl_config="$withval" else curl_config="" fi if test "X$curl_config" != "X" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $curl_config" >&5 $as_echo_n "checking for $curl_config... " >&6; } if test -f $curl_config ; then CURL_CONFIG=$curl_config { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - searching PATH" >&5 $as_echo "no - searching PATH" >&6; } fi fi if test "X$CURL_CONFIG" = "X"; then for ac_prog in curl-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CURL_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CURL_CONFIG"; then ac_cv_prog_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CURL_CONFIG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CURL_CONFIG=$ac_cv_prog_CURL_CONFIG if test -n "$CURL_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5 $as_echo "$CURL_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CURL_CONFIG" && break done fi # Check whether --enable-nfc-check was given. if test "${enable_nfc_check+set}" = set; then : enableval=$enable_nfc_check; nfc_check="no" else nfc_check="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking using Unicode NFC checking" >&5 $as_echo_n "checking using Unicode NFC checking... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nfc_check" >&5 $as_echo "$nfc_check" >&6; }; # Check whether --with-www-config was given. if test "${with_www_config+set}" = set; then : withval=$with_www_config; libwww_config="$withval" else libwww_config="" fi if test "X$libwww_config" != "X" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libwww is no longer supported" >&5 $as_echo "$as_me: WARNING: libwww is no longer supported" >&2;} fi have_libxml=0 have_libxml_lib=0 have_libxml_source=0 need_libxml=0 need_libxml_source=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml sources" >&5 $as_echo_n "checking for libxml sources... " >&6; } if test -d $srcdir/libxml -a -r $srcdir/libxml/libxml.spec ; then have_libxml_source=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi oCPPFLAGS="$CPPFLAGS" if test "X$XML_CONFIG" != X; then LIBS="$LIBS `$XML_CONFIG --libs`" ac_fn_c_check_func "$LINENO" "xmlCreatePushParserCtxt" "ac_cv_func_xmlCreatePushParserCtxt" if test "x$ac_cv_func_xmlCreatePushParserCtxt" = x""yes; then : have_xmlCreatePushParserCtxt=yes else have_xmlCreatePushParserCtxt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system (GNOME) libxml library" >&5 $as_echo_n "checking for system (GNOME) libxml library... " >&6; } if test $have_xmlCreatePushParserCtxt = yes; then have_libxml_lib=1 have_libxml=1 CPPFLAGS="`$XML_CONFIG --cflags` $CPPFLAGS" LIBXML_VERSION=`$XML_CONFIG --version` libxml_version_dec=`echo $LIBXML_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libxml_min_version_dec=`echo $libxml_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - version $LIBXML_VERSION" >&5 $as_echo "yes - version $LIBXML_VERSION" >&6; } if test $libxml_version_dec -lt $libxml_min_version_dec; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using libxml $LIBXML_VERSION is unsupported - $libxml_min_version or newer required." >&5 $as_echo "$as_me: WARNING: Using libxml $LIBXML_VERSION is unsupported - $libxml_min_version or newer required." >&2;} have_libxml_lib=0 have_libxml=0 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_header in libxml/nanohttp.h do : ac_fn_c_check_header_mongrel "$LINENO" "libxml/nanohttp.h" "ac_cv_header_libxml_nanohttp_h" "$ac_includes_default" if test "x$ac_cv_header_libxml_nanohttp_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXML_NANOHTTP_H 1 _ACEOF fi done for ac_header in libxml/parser.h do : ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default" if test "x$ac_cv_header_libxml_parser_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXML_PARSER_H 1 _ACEOF fi done for ac_header in libxml/hash.h libxml/SAX2.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_LIBXML_PARSER_H #include #endif " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "$ac_cv_header_libxml_parser_h" = no -a "$ac_cv_header_gnome_xml_parser_h" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libxml library found but not headers - disabling" >&5 $as_echo "$as_me: WARNING: libxml library found but not headers - disabling" >&2;} have_libxml_lib=0 have_libxml=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml xmlEntity has name_length field" >&5 $as_echo_n "checking if libxml xmlEntity has name_length field... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlEntity foo; foo.name_length=0 ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_ENTITY_NAME_LENGTH 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml xmlEntity has etype field" >&5 $as_echo_n "checking if libxml xmlEntity has etype field... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlEntity foo; foo.etype=0 ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_ENTITY_ETYPE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml xmlSAXHandler has initialized field" >&5 $as_echo_n "checking if libxml xmlSAXHandler has initialized field... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlSAXHandler foo; foo.initialized=0 ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml xmlSAXHandler has externalSubset field" >&5 $as_echo_n "checking if libxml xmlSAXHandler has externalSubset field... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlSAXHandler foo; foo.externalSubset=NULL ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for ac_func in xmlSAX2InternalSubset xmlCtxtUseOptions do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml has parser option XML_PARSE_NONET" >&5 $as_echo_n "checking if libxml has parser option XML_PARSE_NONET... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlParserOption foo; foo = XML_PARSE_NONET ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_XML_PARSE_NONET 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for ac_header in libxml/HTMLparser.h do : ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default" if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXML_HTMLPARSER_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml has parser option HTML_PARSE_NONET" >&5 $as_echo_n "checking if libxml has parser option HTML_PARSE_NONET... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_HTMLPARSER_H #include #endif int main () { htmlParserOption foo; foo = HTML_PARSE_NONET ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_HTML_PARSE_NONET 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" have_libxslt=0 oCPPFLAGS="$CPPFLAGS" if test "X$XSLT_CONFIG" != X; then LIBS="$LIBS `$XSLT_CONFIG --libs`" ac_fn_c_check_func "$LINENO" "xsltSaveResultToString" "ac_cv_func_xsltSaveResultToString" if test "x$ac_cv_func_xsltSaveResultToString" = x""yes; then : have_xsltSaveResultToString=yes else have_xsltSaveResultToString=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system libxslt library" >&5 $as_echo_n "checking for system libxslt library... " >&6; } if test $have_xsltSaveResultToString = yes; then have_libxslt=1 CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS" LIBXSLT_VERSION=`$XSLT_CONFIG --version` libxslt_version_dec=`echo $LIBXSLT_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libxslt_min_version_dec=`echo $libxslt_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - version $LIBXSLT_VERSION" >&5 $as_echo "yes - version $LIBXSLT_VERSION" >&6; } if test $libxslt_version_dec -lt $libxslt_min_version_dec; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using libxslt $LIBXSLT_VERSION is unsupported - $libxslt_min_version or newer required." >&5 $as_echo "$as_me: WARNING: Using libxslt $LIBXSLT_VERSION is unsupported - $libxslt_min_version or newer required." >&2;} have_libxslt=0 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ac_fn_c_check_func "$LINENO" "xsltInit" "ac_cv_func_xsltInit" if test "x$ac_cv_func_xsltInit" = x""yes; then : fi for ac_header in libxslt/xslt.h do : ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default" if test "x$ac_cv_header_libxslt_xslt_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXSLT_XSLT_H 1 _ACEOF fi done if test "$ac_cv_header_libxslt_xslt_h" = no ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libxslt library found but not headers - disabling" >&5 $as_echo "$as_me: WARNING: libxslt library found but not headers - disabling" >&2;} have_libxslt_lib=0 have_libxslt=0 fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" # Check whether --with-xml-parser was given. if test "${with_xml_parser+set}" = set; then : withval=$with_xml_parser; xml_parser="$withval" else xml_parser="libxml" fi for xml_parser_name in $xml_parser libxml expat; do case $xml_parser_name in expat) if test "$expat_source" != "auto"; then need_expat=1 need_expat_source=1 elif test $have_expat_lib = 1; then need_expat=1 elif test $have_expat_source = 1; then need_expat=1 need_expat_source=1 fi if test $need_expat = 1; then $as_echo "#define RAPTOR_XML_EXPAT 1" >>confdefs.h break fi ;; libxml) if test $have_libxml_lib = 1; then need_libxml=1 elif test $have_libxml_source = 1; then need_libxml=1 need_libxml_source=1 fi if test $need_libxml = 1; then $as_echo "#define RAPTOR_XML_LIBXML 1" >>confdefs.h break fi ;; *) as_fn_error "No such XML parser $xml_parser_name" "$LINENO" 5 ;; esac done if test $need_expat = 1; then RAPTOR_XML_EXPAT_TRUE= RAPTOR_XML_EXPAT_FALSE='#' else RAPTOR_XML_EXPAT_TRUE='#' RAPTOR_XML_EXPAT_FALSE= fi if test $need_libxml = 1; then RAPTOR_XML_LIBXML_TRUE= RAPTOR_XML_LIBXML_FALSE='#' else RAPTOR_XML_LIBXML_TRUE='#' RAPTOR_XML_LIBXML_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking XML parser to use" >&5 $as_echo_n "checking XML parser to use... " >&6; } result= if test $need_libxml = 1; then if test $need_libxml_source = 1; then result="$result libxml(source)" else result="$result libxml(system)" fi elif test $need_expat = 1; then if test $need_expat_source = 1; then result="$result expat(source in $expat_source_dir)" else result="$result expat(system)" fi else as_fn_error "No XML parser available - please install expat or libxml" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 $as_echo "$result" >&6; } rdfxml_parser=no ntriples_parser=no turtle_parser=no trig_parser=no n3_parser=no rss_parser=no grddl_parser=no guess_parser=yes rdfa_parser=yes rdf_parsers_available="rdfxml ntriples turtle trig guess rss-tag-soup rdfa" if test "$USE_MAINTAINER_MODE" = yes; then rdf_parsers_available="$rdf_parsers_available n3" fi rdf_parsers_enabled= grddl_parser_ok=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking GRDDL parser requirements" >&5 $as_echo_n "checking GRDDL parser requirements... " >&6; } if test $need_libxml = 1 -a $have_libxslt = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } grddl_parser_ok=yes rdf_parsers_available="$rdf_parsers_available grddl" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - libxml2 and libxslt are both not available" >&5 $as_echo "no - libxml2 and libxslt are both not available" >&6; } fi # This is needed because autoheader can't work out which computed # symbols must be pulled from acconfig.h into config.h.in if test "x" = "y"; then $as_echo "#define RAPTOR_PARSER_RDFXML 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_NTRIPLES 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_TURTLE 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_TRIG 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_N3 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_RSS 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_GRDDL 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_GUESS 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_RDFA 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking RDF parsers required" >&5 $as_echo_n "checking RDF parsers required... " >&6; } # Check whether --enable-parsers was given. if test "${enable_parsers+set}" = set; then : enableval=$enable_parsers; parsers="$enableval" fi if test "X$parsers" = Xall -o "X$parsers" = X; then parsers="$rdf_parsers_available" { $as_echo "$as_me:${as_lineno-$LINENO}: result: all" >&5 $as_echo "all" >&6; } elif test "X$parsers" = Xnone; then parsers= { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $parsers" >&5 $as_echo "$parsers" >&6; } fi for parser in $parsers; do p=$parser if test $p = rss-tag-soup; then p=rss fi if test $p = grddl; then if test $grddl_parser_ok != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GRDDL parser is not available" >&5 $as_echo "$as_me: WARNING: GRDDL parser is not available" >&2;} continue fi fi eval $p'_parser=yes' NAME=`echo $p | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` n=RAPTOR_PARSER_${NAME} cat >>confdefs.h <<_ACEOF #define $n 1 _ACEOF rdf_parsers_enabled="$rdf_parsers_enabled $parser" done nfc_needed=no if test $rdfxml_parser = yes; then nfc_needed=yes fi need_libxslt=0 if test $grddl_parser = yes; then need_libxslt=1 fi need_librdfa=no if test $rdfa_parser = yes; then need_librdfa=yes fi if test $rdfxml_parser = yes; then RAPTOR_PARSER_RDFXML_TRUE= RAPTOR_PARSER_RDFXML_FALSE='#' else RAPTOR_PARSER_RDFXML_TRUE='#' RAPTOR_PARSER_RDFXML_FALSE= fi if test $ntriples_parser = yes; then RAPTOR_PARSER_NTRIPLES_TRUE= RAPTOR_PARSER_NTRIPLES_FALSE='#' else RAPTOR_PARSER_NTRIPLES_TRUE='#' RAPTOR_PARSER_NTRIPLES_FALSE= fi if test $turtle_parser = yes; then RAPTOR_PARSER_TURTLE_TRUE= RAPTOR_PARSER_TURTLE_FALSE='#' else RAPTOR_PARSER_TURTLE_TRUE='#' RAPTOR_PARSER_TURTLE_FALSE= fi if test $trig_parser = yes; then RAPTOR_PARSER_TRIG_TRUE= RAPTOR_PARSER_TRIG_FALSE='#' else RAPTOR_PARSER_TRIG_TRUE='#' RAPTOR_PARSER_TRIG_FALSE= fi if test $n3_parser = yes; then RAPTOR_PARSER_N3_TRUE= RAPTOR_PARSER_N3_FALSE='#' else RAPTOR_PARSER_N3_TRUE='#' RAPTOR_PARSER_N3_FALSE= fi if test $rss_parser = yes; then RAPTOR_PARSER_RSS_TRUE= RAPTOR_PARSER_RSS_FALSE='#' else RAPTOR_PARSER_RSS_TRUE='#' RAPTOR_PARSER_RSS_FALSE= fi if test $grddl_parser = yes; then RAPTOR_PARSER_GRDDL_TRUE= RAPTOR_PARSER_GRDDL_FALSE='#' else RAPTOR_PARSER_GRDDL_TRUE='#' RAPTOR_PARSER_GRDDL_FALSE= fi if test $guess_parser = yes; then RAPTOR_PARSER_GUESS_TRUE= RAPTOR_PARSER_GUESS_FALSE='#' else RAPTOR_PARSER_GUESS_TRUE='#' RAPTOR_PARSER_GUESS_FALSE= fi if test $rdfa_parser = yes; then RAPTOR_PARSER_RDFA_TRUE= RAPTOR_PARSER_RDFA_FALSE='#' else RAPTOR_PARSER_RDFA_TRUE='#' RAPTOR_PARSER_RDFA_FALSE= fi if test $need_librdfa = yes; then LIBRDFA_TRUE= LIBRDFA_FALSE='#' else LIBRDFA_TRUE='#' LIBRDFA_FALSE= fi rdfxml_serializer=no ntriples_serializer=no rdfxml_abbrev_serializer=no turtle_serializer=no rss_1_0_serializer=no atom_serializer=no dot_serializer=no json_serializer=no rdf_serializers_available="rdfxml rdfxml-abbrev turtle ntriples rss-1.0 dot json atom" # This is needed because autoheader can't work out which computed # symbols must be pulled from acconfig.h into config.h.in if test "x" = "y"; then $as_echo "#define RAPTOR_SERIALIZER_RDFXML 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_NTRIPLES 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_RDFXML_ABBREV 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_TURTLE 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_RSS_1_0 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_ATOM 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_DOT 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_JSON 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking RDF serializers required" >&5 $as_echo_n "checking RDF serializers required... " >&6; } # Check whether --enable-serializers was given. if test "${enable_serializers+set}" = set; then : enableval=$enable_serializers; serializers="$enableval" fi if test "X$serializers" = Xall -o "X$serializers" = X; then serializers="$rdf_serializers_available" { $as_echo "$as_me:${as_lineno-$LINENO}: result: all" >&5 $as_echo "all" >&6; } elif test "X$serializers" = Xnone; then serializers= { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $serializers" >&5 $as_echo "$serializers" >&6; } fi for serializer in $serializers; do s=`echo $serializer | tr '.-' '__'` eval $s'_serializer=yes' NAME=`echo $s | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` n=RAPTOR_SERIALIZER_${NAME} cat >>confdefs.h <<_ACEOF #define $n 1 _ACEOF rdf_serializers_enabled="$rdf_serializers_enabled $serializer" done if test $rdfxml_serializer = yes; then RAPTOR_SERIALIZER_RDFXML_TRUE= RAPTOR_SERIALIZER_RDFXML_FALSE='#' else RAPTOR_SERIALIZER_RDFXML_TRUE='#' RAPTOR_SERIALIZER_RDFXML_FALSE= fi if test $ntriples_serializer = yes; then RAPTOR_SERIALIZER_NTRIPLES_TRUE= RAPTOR_SERIALIZER_NTRIPLES_FALSE='#' else RAPTOR_SERIALIZER_NTRIPLES_TRUE='#' RAPTOR_SERIALIZER_NTRIPLES_FALSE= fi if test $rdfxml_abbrev_serializer = yes; then RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE= RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE='#' else RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE='#' RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE= fi if test $turtle_serializer = yes; then RAPTOR_SERIALIZER_TURTLE_TRUE= RAPTOR_SERIALIZER_TURTLE_FALSE='#' else RAPTOR_SERIALIZER_TURTLE_TRUE='#' RAPTOR_SERIALIZER_TURTLE_FALSE= fi if test $rss_1_0_serializer = yes; then RAPTOR_SERIALIZER_RSS_1_0_TRUE= RAPTOR_SERIALIZER_RSS_1_0_FALSE='#' else RAPTOR_SERIALIZER_RSS_1_0_TRUE='#' RAPTOR_SERIALIZER_RSS_1_0_FALSE= fi if test $dot_serializer = yes; then RAPTOR_SERIALIZER_DOT_TRUE= RAPTOR_SERIALIZER_DOT_FALSE='#' else RAPTOR_SERIALIZER_DOT_TRUE='#' RAPTOR_SERIALIZER_DOT_FALSE= fi if test $json_serializer = yes; then RAPTOR_SERIALIZER_JSON_TRUE= RAPTOR_SERIALIZER_JSON_FALSE='#' else RAPTOR_SERIALIZER_JSON_TRUE='#' RAPTOR_SERIALIZER_JSON_FALSE= fi if test $atom_serializer = yes; then RAPTOR_SERIALIZER_ATOM_TRUE= RAPTOR_SERIALIZER_ATOM_FALSE='#' else RAPTOR_SERIALIZER_ATOM_TRUE='#' RAPTOR_SERIALIZER_ATOM_FALSE= fi if test $rss_1_0_serializer = yes -o $rss_parser = yes; then RAPTOR_RSS_COMMON_TRUE= RAPTOR_RSS_COMMON_FALSE='#' else RAPTOR_RSS_COMMON_TRUE='#' RAPTOR_RSS_COMMON_FALSE= fi if test $nfc_needed = yes; then if test $nfc_check != yes; then nfc_needed=no else $as_echo "#define RAPTOR_NFC_CHECK 1" >>confdefs.h fi fi if test $nfc_needed = yes; then RAPTOR_NFC_CHECK_TRUE= RAPTOR_NFC_CHECK_FALSE='#' else RAPTOR_NFC_CHECK_TRUE='#' RAPTOR_NFC_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking XML names version" >&5 $as_echo_n "checking XML names version... " >&6; } # Check whether --with-xml-names was given. if test "${with_xml_names+set}" = set; then : withval=$with_xml_names; xml_names="$withval" else xml_names="1.0" fi if test $xml_names = 1.1; then $as_echo "#define RAPTOR_XML_1_1 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xml_names" >&5 $as_echo "$xml_names" >&6; } have_libcurl=0 have_libfetch=0 need_libcurl=0 need_libxml_www=0 need_libfetch=0 oCPPFLAGS="$CPPFLAGS" if test "X$CURL_CONFIG" != X; then CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`" LIBS="$LIBS `$CURL_CONFIG --libs`" ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" if test "x$ac_cv_header_curl_curl_h" = x""yes; then : fi ac_fn_c_check_func "$LINENO" "curl_easy_init" "ac_cv_func_curl_easy_init" if test "x$ac_cv_func_curl_easy_init" = x""yes; then : have_curl_easy_init=yes else have_curl_easy_init=no fi LIBS="$oLIBS" CPPFLAGS="$oCPPFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl library" >&5 $as_echo_n "checking for libcurl library... " >&6; } if test $have_curl_easy_init = yes -a "$ac_cv_header_curl_curl_h" = yes; then have_libcurl=1 LIBCURL_VERSION=`$CURL_CONFIG --version | sed -e 's/^libcurl *//'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - version $LIBCURL_VERSION" >&5 $as_echo "yes - version $LIBCURL_VERSION" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "X$ac_cv_header_curl_curl_h" = Xyes; then $as_echo "#define HAVE_CURL_CURL_H 1" >>confdefs.h fi if test $ac_cv_header_fetch_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fetchXGetURL in -lfetch" >&5 $as_echo_n "checking for fetchXGetURL in -lfetch... " >&6; } if test "${ac_cv_lib_fetch_fetchXGetURL+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfetch $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fetchXGetURL (); int main () { return fetchXGetURL (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fetch_fetchXGetURL=yes else ac_cv_lib_fetch_fetchXGetURL=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fetch_fetchXGetURL" >&5 $as_echo "$ac_cv_lib_fetch_fetchXGetURL" >&6; } if test "x$ac_cv_lib_fetch_fetchXGetURL" = x""yes; then : have_libfetch=1 fi LIBS="$oLIBS" fi # Check whether --with-www was given. if test "${with_www+set}" = set; then : withval=$with_www; www="$withval" else www="curl" fi for www_name in $www curl xml libfetch none; do case $www_name in curl) if test $have_libcurl = 1; then need_libcurl=1 $as_echo "#define RAPTOR_WWW_LIBCURL 1" >>confdefs.h break fi ;; xml) if test $have_libxml = 1; then need_libxml=1 need_libxml_www=1 $as_echo "#define RAPTOR_WWW_LIBXML 1" >>confdefs.h break fi ;; libfetch) if test $have_libfetch = 1; then need_libfetch=1 $as_echo "#define RAPTOR_WWW_LIBFETCH 1" >>confdefs.h break fi ;; none) need_libcurl=0 need_libxml_www=0 $as_echo "#define RAPTOR_WWW_NONE 1" >>confdefs.h break ;; *) as_fn_error "No such WWW library $www_name" "$LINENO" 5 ;; esac done { $as_echo "$as_me:${as_lineno-$LINENO}: checking WWW libraries available" >&5 $as_echo_n "checking WWW libraries available... " >&6; } www_libraries_available= if test $have_libcurl = 1; then www_libraries_available="$www_libraries_available libcurl $LIBCURL_VERSION" fi if test $have_libxml = 1; then if test $need_libxml_source = 1; then www_libraries_available="$www_libraries_available libxml(source)" else www_libraries_available="$www_libraries_available libxml(system $LIBXML_VERSION)" fi fi if test $have_libfetch = 1; then www_libraries_available="$www_libraries_available libfetch" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $www_libraries_available" >&5 $as_echo "$www_libraries_available" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking WWW library to use" >&5 $as_echo_n "checking WWW library to use... " >&6; } www_library= RAPTOR_WWW_LIBRARY=none if test $need_libcurl = 1; then www_library="libcurl $LIBCURL_VERSION" RAPTOR_WWW_LIBRARY=libcurl elif test $need_libxml_www = 1; then if test $need_libxml_source = 1; then www_library="libxml(source)" else www_library="libxml(system $LIBXML_VERSION)" fi RAPTOR_WWW_LIBRARY=libxml elif test $need_libfetch = 1; then www_library="libfetch" RAPTOR_WWW_LIBRARY=libfetch else www_library=none fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $www_library" >&5 $as_echo "$www_library" >&6; } if test "X$www_library" = Xnone; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No WWW library in use - only file: URLs will work" >&5 $as_echo "$as_me: WARNING: No WWW library in use - only file: URLs will work" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Install libcurl, libxml2 or BSD libfetch for WWW access" >&5 $as_echo "$as_me: WARNING: Install libcurl, libxml2 or BSD libfetch for WWW access" >&2;} fi if test $need_libcurl = 1; then CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$CURL_CONFIG --libs`" case " $LIBOBJS " in *" raptor_www_curl.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS raptor_www_curl.$ac_objext" ;; esac fi have_lininn=no have_inn_parsedate=no oCPPFLAGS="$CPPFLAGS" if test -d /usr/include/inn; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" fi ac_fn_c_check_header_mongrel "$LINENO" "libinn.h" "ac_cv_header_libinn_h" "$ac_includes_default" if test "x$ac_cv_header_libinn_h" = x""yes; then : fi CPPFLAGS="$oCPPFLAGS" oCPPFLAGS="$CPPFLAGS" if test $ac_cv_header_libinn_h = yes; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" LIBS="$LIBS -L/usr/lib/news -linn" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HashMessageID in -linn" >&5 $as_echo_n "checking for HashMessageID in -linn... " >&6; } if test "${ac_cv_lib_inn_HashMessageID+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linn $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char HashMessageID (); int main () { return HashMessageID (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inn_HashMessageID=yes else ac_cv_lib_inn_HashMessageID=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inn_HashMessageID" >&5 $as_echo "$ac_cv_lib_inn_HashMessageID" >&6; } if test "x$ac_cv_lib_inn_HashMessageID" = x""yes; then : have_libinn=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking parsedate in libinn" >&5 $as_echo_n "checking parsedate in libinn... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include int main () { parsedate("Sun Jun 12 00:04:09 BST 2005", NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_INN_PARSEDATE 1" >>confdefs.h have_inn_parsedate=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking date parsing source" >&5 $as_echo_n "checking date parsing source... " >&6; } raptor_parsedate_needed=no if test $have_inn_parsedate = yes; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -L/usr/lib/news -linn" { $as_echo "$as_me:${as_lineno-$LINENO}: result: INN parsedate" >&5 $as_echo "INN parsedate" >&6; } else if test $need_libcurl = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: libcurl curl_getdate" >&5 $as_echo "libcurl curl_getdate" >&6; } else raptor_parsedate_needed=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: raptor parsedate" >&5 $as_echo "raptor parsedate" >&6; } fi fi if test $raptor_parsedate_needed = yes; then PARSEDATE_TRUE= PARSEDATE_FALSE='#' else PARSEDATE_TRUE='#' PARSEDATE_FALSE= fi if test $raptor_parsedate_needed = yes; then $as_echo "#define HAVE_RAPTOR_PARSE_DATE 1" >>confdefs.h fi if test $need_libfetch = 1; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -lfetch" case " $LIBOBJS " in *" raptor_www_libfetch.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS raptor_www_libfetch.$ac_objext" ;; esac fi RAPTOR_XML_PARSER=none if test $need_libxml = 1; then if test $need_libxml_www = 1; then case " $LIBOBJS " in *" raptor_www_libxml.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS raptor_www_libxml.$ac_objext" ;; esac fi if test $need_libxml_source = 1; then SD="$SD libxml" (cd libxml && ./configure --cache=../config.cache --enable-shared=no) CPPFLAGS="-I$srcdir/libxml $CPPFLAGS" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -Llibxml -llibxml" else RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$XML_CONFIG --libs`" CPPFLAGS="`$XML_CONFIG --cflags` $CPPFLAGS" fi RAPTOR_XML_PARSER=libxml fi if test $need_expat = 1; then if test $need_expat_source = 1; then # Only build local copy if it is needed if test "X$expat_source" = local; then SD="$SD expat" fi if test -d "$expat_source_dir/xmlparse"; then # old expat RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $expat_obj_dir/xmlparse/xmlparse.o $expat_obj_dir/xmlparse/hashtable.o $expat_obj_dir/xmltok/xmlrole.o $expat_obj_dir/xmltok/xmltok.o" else # new expat RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $expat_obj_dir/lib/xmlparse.o $expat_obj_dir/lib/xmlrole.o $expat_obj_dir/lib/xmltok.o" fi else RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $expat_libs" fi RAPTOR_XML_PARSER=expat fi if test $need_libxslt = 1; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$XSLT_CONFIG --libs`" CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS" fi RAPTOR_LIBTOOLLIBS=libraptor.la xml_parsers_available= if test $need_libxml = 1; then if test $need_libxml_source = 1; then xml_parsers_available="$xml_parsers_available libxml(source)" else xml_parsers_available="$xml_parsers_available libxml(system $LIBXML_VERSION)" fi fi if test $need_expat = 1; then if test $need_expat_source = 1; then xml_parsers_available="$xml_parsers_available expat(source in $expat_source_dir)" else if test $libexpat = 1; then xml_parsers_available="$xml_parsers_available expat(system libexpat)" else xml_parsers_available="$xml_parsers_available expat(system libxmlparse,libxmltok)" fi fi fi # Restore LIBS LIBS="$oLIBS" # Make final changes to cflags MEM= MEM_LIBS= CPPFLAGS="-DRAPTOR_INTERNAL=1 -DRAPTOR_V2_EXPERIMENTAL=1 $CPPFLAGS" # Check whether --with-dmalloc was given. if test "${with_dmalloc+set}" = set; then : withval=$with_dmalloc; use_dmalloc="$withval" else use_dmalloc="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking using dmalloc library" >&5 $as_echo_n "checking using dmalloc library... " >&6; } if test "$USE_MAINTAINER_MODE" = yes; then if test "$ac_cv_header_dmalloc_h" = yes; then if test "X$use_dmalloc" = Xauto; then use_dmalloc=yes fi else use_dmalloc=no fi else use_dmalloc=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_dmalloc" >&5 $as_echo "$use_dmalloc" >&6; }; if test $use_dmalloc = yes; then MEM=-DRAPTOR_MEMORY_DEBUG_DMALLOC=1 MEM_LIBS=-ldmalloc fi # Check whether --with-memory-signing was given. if test "${with_memory_signing+set}" = set; then : withval=$with_memory_signing; use_memory_signing="$withval" else use_memory_signing="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking using memory signing" >&5 $as_echo_n "checking using memory signing... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_memory_signing" >&5 $as_echo "$use_memory_signing" >&6; }; if test $use_memory_signing = yes; then MEM=-DRAPTOR_MEMORY_SIGN=1 MEM_LIBS= fi debug_messages=no if test "$USE_MAINTAINER_MODE" = yes; then debug_messages=yes fi # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; debug_messages=$enableval fi if test "$debug_messages" = "yes"; then CPPFLAGS="-g -DRAPTOR_DEBUG=1 $CPPFLAGS" fi if test "$USE_MAINTAINER_MODE" = yes; then CPPFLAGS="$MAINTAINER_CPPFLAGS $CPPFLAGS" fi ECHO_N="$ECHO_N" ECHO_C="$ECHO_C" # Features # lists RAPTOR_PARSERS=$rdf_parsers_enabled RAPTOR_SERIALIZERS=$rdf_serializers_enabled # single values or none abs_top_srcdir=`cd $srcdir; pwd` abs_top_builddir=`pwd` # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac AM_BACKSLASH='\' ac_config_files="$ac_config_files Makefile raptor.spec raptor.rdf data/Makefile docs/Makefile docs/version.xml examples/Makefile src/Makefile tests/Makefile tests/feeds/Makefile tests/grddl/Makefile tests/ntriples/Makefile tests/rdfa/Makefile tests/rdfxml/Makefile tests/turtle/Makefile tests/trig/Makefile utils/Makefile win32/Makefile librdfa/Makefile raptor.pc" ac_config_files="$ac_config_files src/raptor-config" ac_config_files="$ac_config_files raptor-src-config" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GTKDOC_CHECK+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in gtkdoc-rebase do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GTKDOC_REBASE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_REBASE in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE if test -n "$GTKDOC_REBASE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 $as_echo "$GTKDOC_REBASE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_REBASE" && break done test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. set dummy gtkdoc-mkpdf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GTKDOC_MKPDF+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_MKPDF in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF if test -n "$GTKDOC_MKPDF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 $as_echo "$GTKDOC_MKPDF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then : withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then : enableval=$enable_gtk_doc; else enable_gtk_doc=no fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error "You need to have gtk-doc >= 1.3 installed to build $PACKAGE_NAME" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : enableval=$enable_gtk_doc_html; else enable_gtk_doc_html=yes fi # Check whether --enable-gtk-doc-pdf was given. if test "${enable_gtk_doc_pdf+set}" = set; then : enableval=$enable_gtk_doc_pdf; else enable_gtk_doc_pdf=no fi if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test x$enable_gtk_doc_html = xyes; then GTK_DOC_BUILD_HTML_TRUE= GTK_DOC_BUILD_HTML_FALSE='#' else GTK_DOC_BUILD_HTML_TRUE='#' GTK_DOC_BUILD_HTML_FALSE= fi if test x$enable_gtk_doc_pdf = xyes; then GTK_DOC_BUILD_PDF_TRUE= GTK_DOC_BUILD_PDF_FALSE='#' else GTK_DOC_BUILD_PDF_TRUE='#' GTK_DOC_BUILD_PDF_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi if test -n "$GTKDOC_REBASE"; then GTK_DOC_USE_REBASE_TRUE= GTK_DOC_USE_REBASE_FALSE='#' else GTK_DOC_USE_REBASE_TRUE='#' GTK_DOC_USE_REBASE_FALSE= fi cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RELEASE_VERSION_TRUE}" && test -z "${RELEASE_VERSION_FALSE}"; then as_fn_error "conditional \"RELEASE_VERSION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${STRCASECMP_TRUE}" && test -z "${STRCASECMP_FALSE}"; then as_fn_error "conditional \"STRCASECMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GETOPT_TRUE}" && test -z "${GETOPT_FALSE}"; then as_fn_error "conditional \"GETOPT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_XML_EXPAT_TRUE}" && test -z "${RAPTOR_XML_EXPAT_FALSE}"; then as_fn_error "conditional \"RAPTOR_XML_EXPAT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_XML_LIBXML_TRUE}" && test -z "${RAPTOR_XML_LIBXML_FALSE}"; then as_fn_error "conditional \"RAPTOR_XML_LIBXML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_RDFXML_TRUE}" && test -z "${RAPTOR_PARSER_RDFXML_FALSE}"; then as_fn_error "conditional \"RAPTOR_PARSER_RDFXML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_NTRIPLES_TRUE}" && test -z "${RAPTOR_PARSER_NTRIPLES_FALSE}"; then as_fn_error "conditional \"RAPTOR_PARSER_NTRIPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_TURTLE_TRUE}" && test -z "${RAPTOR_PARSER_TURTLE_FALSE}"; then as_fn_error "conditional \"RAPTOR_PARSER_TURTLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_TRIG_TRUE}" && test -z "${RAPTOR_PARSER_TRIG_FALSE}"; then as_fn_error "conditional \"RAPTOR_PARSER_TRIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_N3_TRUE}" && test -z "${RAPTOR_PARSER_N3_FALSE}"; then as_fn_error "conditional \"RAPTOR_PARSER_N3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_RSS_TRUE}" && test -z "${RAPTOR_PARSER_RSS_FALSE}"; then as_fn_error "conditional \"RAPTOR_PARSER_RSS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_GRDDL_TRUE}" && test -z "${RAPTOR_PARSER_GRDDL_FALSE}"; then as_fn_error "conditional \"RAPTOR_PARSER_GRDDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_GUESS_TRUE}" && test -z "${RAPTOR_PARSER_GUESS_FALSE}"; then as_fn_error "conditional \"RAPTOR_PARSER_GUESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_RDFA_TRUE}" && test -z "${RAPTOR_PARSER_RDFA_FALSE}"; then as_fn_error "conditional \"RAPTOR_PARSER_RDFA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LIBRDFA_TRUE}" && test -z "${LIBRDFA_FALSE}"; then as_fn_error "conditional \"LIBRDFA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_RDFXML_TRUE}" && test -z "${RAPTOR_SERIALIZER_RDFXML_FALSE}"; then as_fn_error "conditional \"RAPTOR_SERIALIZER_RDFXML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_NTRIPLES_TRUE}" && test -z "${RAPTOR_SERIALIZER_NTRIPLES_FALSE}"; then as_fn_error "conditional \"RAPTOR_SERIALIZER_NTRIPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE}" && test -z "${RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE}"; then as_fn_error "conditional \"RAPTOR_SERIALIZER_RDFXML_ABBREV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_TURTLE_TRUE}" && test -z "${RAPTOR_SERIALIZER_TURTLE_FALSE}"; then as_fn_error "conditional \"RAPTOR_SERIALIZER_TURTLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_RSS_1_0_TRUE}" && test -z "${RAPTOR_SERIALIZER_RSS_1_0_FALSE}"; then as_fn_error "conditional \"RAPTOR_SERIALIZER_RSS_1_0\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_DOT_TRUE}" && test -z "${RAPTOR_SERIALIZER_DOT_FALSE}"; then as_fn_error "conditional \"RAPTOR_SERIALIZER_DOT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_JSON_TRUE}" && test -z "${RAPTOR_SERIALIZER_JSON_FALSE}"; then as_fn_error "conditional \"RAPTOR_SERIALIZER_JSON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_ATOM_TRUE}" && test -z "${RAPTOR_SERIALIZER_ATOM_FALSE}"; then as_fn_error "conditional \"RAPTOR_SERIALIZER_ATOM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_RSS_COMMON_TRUE}" && test -z "${RAPTOR_RSS_COMMON_FALSE}"; then as_fn_error "conditional \"RAPTOR_RSS_COMMON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_NFC_CHECK_TRUE}" && test -z "${RAPTOR_NFC_CHECK_FALSE}"; then as_fn_error "conditional \"RAPTOR_NFC_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PARSEDATE_TRUE}" && test -z "${PARSEDATE_FALSE}"; then as_fn_error "conditional \"PARSEDATE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then as_fn_error "conditional \"GTK_DOC_BUILD_HTML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then as_fn_error "conditional \"GTK_DOC_BUILD_PDF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then as_fn_error "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then as_fn_error "conditional \"GTK_DOC_USE_REBASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Raptor RDF Parser $as_me 1.4.21, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Raptor RDF Parser config.status 1.4.21 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/raptor_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/raptor_config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "raptor.spec") CONFIG_FILES="$CONFIG_FILES raptor.spec" ;; "raptor.rdf") CONFIG_FILES="$CONFIG_FILES raptor.rdf" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/version.xml") CONFIG_FILES="$CONFIG_FILES docs/version.xml" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/feeds/Makefile") CONFIG_FILES="$CONFIG_FILES tests/feeds/Makefile" ;; "tests/grddl/Makefile") CONFIG_FILES="$CONFIG_FILES tests/grddl/Makefile" ;; "tests/ntriples/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntriples/Makefile" ;; "tests/rdfa/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rdfa/Makefile" ;; "tests/rdfxml/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rdfxml/Makefile" ;; "tests/turtle/Makefile") CONFIG_FILES="$CONFIG_FILES tests/turtle/Makefile" ;; "tests/trig/Makefile") CONFIG_FILES="$CONFIG_FILES tests/trig/Makefile" ;; "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; "win32/Makefile") CONFIG_FILES="$CONFIG_FILES win32/Makefile" ;; "librdfa/Makefile") CONFIG_FILES="$CONFIG_FILES librdfa/Makefile" ;; "raptor.pc") CONFIG_FILES="$CONFIG_FILES raptor.pc" ;; "src/raptor-config") CONFIG_FILES="$CONFIG_FILES src/raptor-config" ;; "raptor-src-config") CONFIG_FILES="$CONFIG_FILES raptor-src-config" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "src/raptor-config":F) chmod +x src/raptor-config ;; "raptor-src-config":F) chmod +x raptor-src-config ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Raptor build summary: RDF parsers available : $rdf_parsers_available RDF parsers enabled :$rdf_parsers_enabled RDF serializers available : $rdf_serializers_available RDF serializers enabled :$rdf_serializers_enabled XML parser :$xml_parsers_available WWW library : $www_library " >&5 $as_echo " Raptor build summary: RDF parsers available : $rdf_parsers_available RDF parsers enabled :$rdf_parsers_enabled RDF serializers available : $rdf_serializers_available RDF serializers enabled :$rdf_serializers_enabled XML parser :$xml_parsers_available WWW library : $www_library " >&6; } raptor-1.4.21/librdfa/0000755000175000017500000000000011331056235011511 500000000000000raptor-1.4.21/librdfa/language.c0000644000175000017500000000272711305016627013372 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * The language module is used to determine and set the current language. */ #include #include #include #include "rdfa_utils.h" #include "rdfa.h" /** * Updates the language given the value of the xml:lang attribute. * * @param lang the new value of the lang attribute. */ void rdfa_update_language(rdfacontext* context, const char* lang) { // the [current element] is parsed for any language information, // and [language] is set in the [current evaluation context]; if(lang != NULL) { if(strlen(lang) > 0) { // if a language was specified, set it context->language = rdfa_replace_string(context->language, lang); } else { // if a blank language was specified, clear the language context free(context->language); context->language = NULL; } } } raptor-1.4.21/librdfa/triple.c0000644000175000017500000004214111330402200013060 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * Handles all triple functionality including all incomplete triple * functionality. * * @author Manu Sporny */ #include "stdlib.h" #include "string.h" #include "stdio.h" #include "rdfa_utils.h" #include "rdfa.h" rdftriple* rdfa_create_triple(const char* subject, const char* predicate, const char* object, rdfresource_t object_type, const char* datatype, const char* language) { rdftriple* rval = (rdftriple*)malloc(sizeof(rdftriple)); // clear the memory rval->subject = NULL; rval->predicate = NULL; rval->object = NULL; rval->object_type = object_type; rval->datatype = NULL; rval->language = NULL; //printf("SUBJECT : %s\n", subject); //printf("PREDICATE: %s\n", predicate); //printf("OBJECT : %s\n", object); //printf("DATATYPE : %s\n", datatype); //printf("LANG : %s\n", language); // a triple needs a subject, predicate and object at minimum to be // considered a triple. if((subject != NULL) && (predicate != NULL) && (object != NULL)) { rval->subject = rdfa_replace_string(rval->subject, subject); rval->predicate = rdfa_replace_string(rval->predicate, predicate); rval->object = rdfa_replace_string(rval->object, object); // if the datatype is present, set it if(datatype != NULL) { rval->datatype = rdfa_replace_string(rval->datatype, datatype); } // if the language was specified, set it if(language != NULL) { rval->language = rdfa_replace_string(rval->language, language); } } return rval; } void rdfa_print_triple(rdftriple* triple) { if(triple->object_type == RDF_TYPE_NAMESPACE_PREFIX) { printf("%s %s: <%s> .\n", triple->subject, triple->predicate, triple->object); } else { if(triple->subject != NULL) { if((triple->subject[0] == '_') && (triple->subject[1] == ':')) { printf("%s\n", triple->subject); } else { printf("<%s>\n", triple->subject); } } else { printf("INCOMPLETE\n"); } if(triple->predicate != NULL) { printf(" <%s>\n", triple->predicate); } else { printf(" INCOMPLETE\n"); } if(triple->object != NULL) { if(triple->object_type == RDF_TYPE_IRI) { if((triple->object[0] == '_') && (triple->object[1] == ':')) { printf(" %s", triple->object); } else { printf(" <%s>", triple->object); } } else if(triple->object_type == RDF_TYPE_PLAIN_LITERAL) { printf(" \"%s\"", triple->object); if(triple->language != NULL) { printf("@%s", triple->language); } } else if(triple->object_type == RDF_TYPE_XML_LITERAL) { printf(" \"%s\"^^rdf:XMLLiteral", triple->object); } else if(triple->object_type == RDF_TYPE_TYPED_LITERAL) { if((triple->datatype != NULL) && (triple->language != NULL)) { printf(" \"%s\"@%s^^%s", triple->object, triple->language, triple->datatype); } else if(triple->datatype != NULL) { printf(" \"%s\"^^%s", triple->object, triple->datatype); } } else { printf(" <%s> <---- UNKNOWN OBJECT TYPE", triple->object); } printf(" .\n"); } else { printf(" INCOMPLETE ."); } } } void rdfa_free_triple(rdftriple* triple) { free(triple->subject); free(triple->predicate); free(triple->object); free(triple->datatype); free(triple->language); free(triple); } #ifndef LIBRDFA_IN_RAPTOR /** * Generates a namespace prefix triple for any application that is * interested in processing namespace changes. * * @param context the RDFa context. * @param prefix the name of the prefix * @param IRI the fully qualified IRI that the prefix maps to. */ void rdfa_generate_namespace_triple( rdfacontext* context, const char* prefix, const char* iri) { rdftriple* triple = rdfa_create_triple( "@prefix", prefix, iri, RDF_TYPE_NAMESPACE_PREFIX, NULL, NULL); context->triple_callback(triple, context->callback_data); } #endif /** * Completes all incomplete triples that are part of the current * context by matching the new_subject with the list of incomplete * triple predicates. * * @param context the RDFa context. */ void rdfa_complete_incomplete_triples(rdfacontext* context) { // 10. If the [ skip element ] flag is 'false', and [ new subject ] // was set to a non-null value, then any [ incomplete triple ]s // within the current context should be completed: // // The [ list of incomplete triples ] from the current [ evaluation // context ] ( not the [ local list of incomplete triples ]) will // contain zero or more predicate URIs. This list is iterated, and // each of the predicates is used with [ parent subject ] and // [ new subject ] to generate a triple. Note that at each level // there are two , lists of [ incomplete triple ]s; one for the // current processing level (which is passed to each child element // in the previous step), and one that was received as part of the // [ evaluation context ]. It is the latter that is used in // processing during this step. unsigned int i; for(i = 0; i < context->incomplete_triples->num_items; i++) { rdfalist* incomplete_triples = context->incomplete_triples; rdfalistitem* incomplete_triple = incomplete_triples->items[i]; if(incomplete_triple->flags & RDFALIST_FLAG_FORWARD) { // If [direction] is 'forward' then the following triple is generated: // // subject // [parent subject] // predicate // the predicate from the iterated incomplete triple // object // [new subject] rdftriple* triple = rdfa_create_triple(context->parent_subject, (const char*)incomplete_triple->data, context->new_subject, RDF_TYPE_IRI, NULL, NULL); context->triple_callback(triple, context->callback_data); } else { // If [direction] is not 'forward' then this is the triple generated: // // subject // [new subject] // predicate // the predicate from the iterated incomplete triple // object // [parent subject] rdftriple* triple = rdfa_create_triple(context->new_subject, (const char*)incomplete_triple->data, context->parent_subject, RDF_TYPE_IRI, NULL, NULL); context->triple_callback(triple, context->callback_data); } free(incomplete_triple); } context->incomplete_triples->num_items = 0; } void rdfa_complete_type_triples( rdfacontext* context, const rdfalist* type_of) { // 6.1 One or more 'types' for the [new subject] can be set by // using @type_of. If present, the attribute must contain one or // more URIs, obtained according to the section on URI and CURIE // Processing, each of which is used to generate a triple as follows: // // subject // [new subject] // predicate // http://www.w3.org/1999/02/22-rdf-syntax-ns#type // object // full URI of 'type' unsigned int i; rdfalistitem** iptr = type_of->items; for(i = 0; i < type_of->num_items; i++) { rdfalistitem* curie = *iptr; rdftriple* triple = rdfa_create_triple(context->new_subject, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", (const char*)curie->data, RDF_TYPE_IRI, NULL, NULL); context->triple_callback(triple, context->callback_data); iptr++; } } void rdfa_complete_relrev_triples( rdfacontext* context, const rdfalist* rel, const rdfalist* rev) { // 7. If in any of the previous steps a [current object resource] // was set to a non-null value, it is now used to generate triples unsigned int i; // Predicates for the [current object resource] can be set by using // one or both of the @rel and @rev attributes. // If present, @rel will contain one or more URIs, obtained // according to the section on CURIE and URI Processing each of // which is used to generate a triple as follows: // // subject // [new subject] // predicate // full URI // object // [current object resource] if(rel != NULL) { rdfalistitem** relptr = rel->items; for(i = 0; i < rel->num_items; i++) { rdfalistitem* curie = *relptr; rdftriple* triple = rdfa_create_triple(context->new_subject, (const char*)curie->data, context->current_object_resource, RDF_TYPE_IRI, NULL, NULL); context->triple_callback(triple, context->callback_data); relptr++; } } // If present, @rev will contain one or more URIs, obtained // according to the section on CURIE and URI Processing each of which // is used to generate a triple as follows: // // subject // [current object resource] // predicate // full URI // object // [new subject] if(rev != NULL) { rdfalistitem** revptr = rev->items; for(i = 0; i < rev->num_items; i++) { rdfalistitem* curie = *revptr; rdftriple* triple = rdfa_create_triple( context->current_object_resource, (const char*)curie->data, context->new_subject, RDF_TYPE_IRI, NULL, NULL); context->triple_callback(triple, context->callback_data); revptr++; } } } void rdfa_save_incomplete_triples( rdfacontext* context, const rdfalist* rel, const rdfalist* rev) { unsigned int i; // 8. If however [current object resource] was set to null, but // there are predicates present, then they must be stored as // [incomplete triple]s, pending the discovery of a subject that // can be used as the object. Also, [current object resource] // should be set to a newly created [bnode] context->current_object_resource = rdfa_create_bnode(context); // If present, @rel must contain one or more URIs, obtained // according to the section on CURIE and URI Processing each of // which is added to the [local local list of incomplete triples] // as follows: // // predicate // full URI // direction // forward if(rel != NULL) { rdfalistitem** relptr = rel->items; for(i = 0; i < rel->num_items; i++) { rdfalistitem* curie = *relptr; rdfa_add_item( context->local_incomplete_triples, curie->data, (liflag_t)(RDFALIST_FLAG_FORWARD | RDFALIST_FLAG_TEXT)); relptr++; } } // If present, @rev must contain one or more URIs, obtained // according to the section on CURIE and URI Processing, each of // which is added to the [local list of incomplete triples] as follows: // // predicate // full URI // direction // reverse if(rev != NULL) { rdfalistitem** revptr = rev->items; for(i = 0; i < rev->num_items; i++) { rdfalistitem* curie = *revptr; rdfa_add_item( context->local_incomplete_triples, curie->data, (liflag_t)(RDFALIST_FLAG_REVERSE | RDFALIST_FLAG_TEXT)); revptr++; } } } void rdfa_complete_object_literal_triples(rdfacontext* context) { // 9. The next step of the iteration is to establish any // [current object literal]; // // Predicates for the [current object literal] can be set by using // @property. If present, a URI is obtained according to the // section on CURIE and URI Processing, and then the actual literal // value is obtained as follows: char* current_object_literal = NULL; rdfresource_t type = RDF_TYPE_UNKNOWN; unsigned int i; rdfalistitem** pptr; // * as a [plain literal] if: // o @content is present; // o or all children of the [current element] are text nodes; // o or there are no child nodes; TODO: Is this needed? // o or the body of the [current element] does have non-text // child nodes but @datatype is present, with an empty value. // // Additionally, if there is a value for [current language] then // the value of the [plain literal] should include this language // information, as described in [RDF-CONCEPTS]. The actual literal // is either the value of @content (if present) or a string created // by concatenating the text content of each of the descendant // elements of the [current element] in document order. if((context->content != NULL)) { current_object_literal = context->content; type = RDF_TYPE_PLAIN_LITERAL; } else if(strchr(context->xml_literal, '<') == NULL) { current_object_literal = context->plain_literal; type = RDF_TYPE_PLAIN_LITERAL; } else if(strlen(context->plain_literal) == 0) { current_object_literal = (char*)""; type = RDF_TYPE_PLAIN_LITERAL; } else if((context->xml_literal != NULL) && (context->datatype != NULL) && (strlen(context->xml_literal) > 0) && (strcmp(context->datatype, "") == 0)) { current_object_literal = context->plain_literal; type = RDF_TYPE_PLAIN_LITERAL; } // * as an [XML literal] if: // o the [current element] has any child nodes that are not // simply text nodes, and @datatype is not present, or is // present, but is set to rdf:XMLLiteral. // // The value of the [XML literal] is a string created by // serializing to text, all nodes that are descendants of the // [current element], i.e., not including the element itself, and // giving it a datatype of rdf:XMLLiteral. if((current_object_literal == NULL) && (strchr(context->xml_literal, '<') != NULL) && ((context->datatype == NULL) || (strcmp(context->datatype, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") == 0))) { current_object_literal = context->xml_literal; type = RDF_TYPE_XML_LITERAL; } // * as a [typed literal] if: // o @datatype is present, and does not have an empty // value. // // The actual literal is either the value of @content (if present) // or a string created by concatenating the value of all descendant // text nodes, of the [current element] in turn. The final string // includes the datatype URI, as described in [RDF-CONCEPTS], which // will have been obtained according to the section on CURIE and // URI Processing. if((context->datatype != NULL) && (strlen(context->datatype) > 0)) { if(context->content != NULL) { current_object_literal = context->content; type = RDF_TYPE_TYPED_LITERAL; } else if(strcmp(context->datatype, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") != 0) { current_object_literal = context->plain_literal; type = RDF_TYPE_TYPED_LITERAL; } } // TODO: Setting the current object literal to the plain literal in // the case of xsd:string isn't mentioned in the syntax // processing document. if((current_object_literal == NULL) && (context->datatype != NULL) && (strcmp( context->datatype, "http://www.w3.org/2001/XMLSchema#string") == 0)) { current_object_literal = context->plain_literal; type = RDF_TYPE_TYPED_LITERAL; } // The [current object literal] is then used with each predicate to // generate a triple as follows: // // subject // [new subject] // predicate // full URI // object // [current object literal] pptr = context->property->items; for(i = 0; i < context->property->num_items; i++) { rdfalistitem* curie = *pptr; rdftriple* triple = NULL; triple = rdfa_create_triple(context->new_subject, (const char*)curie->data, current_object_literal, type, context->datatype, context->language); context->triple_callback(triple, context->callback_data); pptr++; } // TODO: Implement recurse flag being set to false // // Once the triple has been created, if the [datatype] of the // [current object literal] is rdf:XMLLiteral, then the [recurse] // flag is set to false context->recurse = 0; } raptor-1.4.21/librdfa/curie.c0000644000175000017500000003174111330672502012712 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * The CURIE module is used to resolve all forms of CURIEs that * XHTML+RDFa accepts. * * @author Manu Sporny */ #include "stdlib.h" #include "string.h" #include "stdio.h" #include "rdfa_utils.h" #include "rdfa.h" // These are all of the @rel/@rev reserved words in XHTML 1.1 that // should generate triples. #define XHTML_RELREV_RESERVED_WORDS_SIZE 24 static const char* const g_relrev_reserved_words[XHTML_RELREV_RESERVED_WORDS_SIZE] = { "alternate", "appendix", "bookmark", "chapter", "cite", "contents", "copyright", "first", "glossary", "help", "icon", "index", "meta", "next", "p3pv1", "prev", "role", "section", "stylesheet", "subsection", "start", "license", "up", "last" }; // The base XHTML vocab URL is used to resolve URIs that are reserved // words. Any reserved listed above is appended to the URL below to // form a complete IRI. #define XHTML_VOCAB_URI "http://www.w3.org/1999/xhtml/vocab#" #define XHTML_VOCAB_URI_SIZE 35 /** * Gets the type of CURIE that is passed to it. * * @param uri the uri to check. * * @return either CURIE_TYPE_SAFE, CURIE_TYPE_URI or CURIE_TYPE_INVALID. */ curie_t get_curie_type(const char* uri) { curie_t rval = CURIE_TYPE_INVALID; if(uri != NULL) { size_t uri_length = strlen(uri); if((uri[0] == '[') && (uri[uri_length - 1] == ']')) { // a safe curie starts with [ and ends with ] rval = CURIE_TYPE_SAFE; } else if(strstr(uri, ":") != NULL) { // at this point, it is unknown whether or not the CURIE is // an IRI or an unsafe CURIE rval = CURIE_TYPE_IRI_OR_UNSAFE; } else { // if none of the above match, then the CURIE is probably a // relative IRI rval = CURIE_TYPE_IRI_OR_UNSAFE; } } return rval; } char* rdfa_resolve_uri(rdfacontext* context, const char* uri) { char* rval = NULL; size_t base_length = strlen(context->base); if(strlen(uri) < 1) { // if a blank URI is given, use the base context rval = rdfa_replace_string(rval, context->base); } else if(strstr(uri, ":") != NULL) { // if a IRI is given, don't concatenate rval = rdfa_replace_string(rval, uri); } else if(uri[0] == '#') { // if a fragment ID is given, concatenate it with the base URI rval = rdfa_join_string(context->base, uri); } else if(uri[0] == '/') { // if a relative URI is given, but it starts with a '/', use the // host part concatenated to the given URI char* tmp = NULL; char* end_index = NULL; // initialize the working-set data tmp = rdfa_replace_string(tmp, context->base); end_index = strchr(tmp, '/'); // find the final '/' character after the host part of the context base. if(end_index != NULL) { end_index = strchr(end_index + 1, '/'); if(end_index != NULL) { end_index = strchr(end_index + 1, '/'); } } // if the '/' character after the host part was found, copy the host // part and append the given URI to the URI, otherwise, append the // host part and the URI part as-is, ensuring that a '/' exists at the // end of the host part. if(end_index != NULL) { char* rval_copy; *end_index = '\0'; // if the '/' character after the host part was found, copy the host // part and append the given URI to the URI. rval_copy = rdfa_replace_string(rval, tmp); rval = rdfa_join_string(rval_copy, uri); free(rval_copy); } else { // append the host part and the URI part as-is, ensuring that a // '/' exists at the end of the host part. unsigned int tlen = strlen(tmp) - 1; char* rval_copy; rval_copy = rdfa_replace_string(rval, tmp); if(rval[tlen] == '/') { rval[tlen] = '\0'; } rval = rdfa_join_string(rval_copy, uri); free(rval_copy); } free(tmp); } else { if((char)context->base[base_length - 1] == '/') { // if the base URI already ends in /, concatenate rval = rdfa_join_string(context->base, uri); } else { // if we have a relative URI, chop off the name of the file // and replace it with the relative pathname char* end_index = strrchr(context->base, '/'); if(end_index != NULL) { char* tmpstr = NULL; char* end_index2; tmpstr = rdfa_replace_string(tmpstr, context->base); end_index2= strrchr(tmpstr, '/'); end_index2++; *end_index2 = '\0'; rval = rdfa_join_string(tmpstr, uri); free(tmpstr); } } } return rval; } char* rdfa_resolve_curie( rdfacontext* context, const char* uri, curieparse_t mode) { char* rval = NULL; curie_t ctype = get_curie_type(uri); if(ctype == CURIE_TYPE_INVALID) { rval = NULL; } else if((ctype == CURIE_TYPE_IRI_OR_UNSAFE) && ((mode == CURIE_PARSE_HREF_SRC) || (mode == CURIE_PARSE_ABOUT_RESOURCE))) { // If we are parsing something that can take either a CURIE or a // URI, and the type is either IRI or UNSAFE, assume that it is // an IRI rval = rdfa_resolve_uri(context, uri); } // if we are processing a safe CURIE OR // if we are parsing an unsafe CURIE that is an @type_of, // @datatype, @property, @rel, or @rev attribute, treat the curie // as not an IRI, but an unsafe CURIE if((ctype == CURIE_TYPE_SAFE) || ((ctype == CURIE_TYPE_IRI_OR_UNSAFE) && ((mode == CURIE_PARSE_INSTANCEOF_DATATYPE) || (mode == CURIE_PARSE_PROPERTY) || (mode == CURIE_PARSE_RELREV)))) { char* working_copy = NULL; char* wcptr = NULL; char* prefix = NULL; char* curie_reference = NULL; const char* expanded_prefix = NULL; size_t expanded_prefix_length = 0; working_copy = (char*)malloc(strlen(uri) + 1); strcpy(working_copy, uri);//rdfa_replace_string(working_copy, uri); // if this is a safe CURIE, chop off the beginning and the end if(ctype == CURIE_TYPE_SAFE) { prefix = strtok_r(working_copy, "[:]", &wcptr); if(wcptr) curie_reference = strtok_r(NULL, "[:]", &wcptr); } else if(ctype == CURIE_TYPE_IRI_OR_UNSAFE) { prefix = strtok_r(working_copy, ":", &wcptr); if(wcptr) curie_reference = strtok_r(NULL, ":", &wcptr); } // fully resolve the prefix and get it's length // if a colon was found, but no prefix, use the XHTML vocabulary URI // as the expanded prefix if((uri[0] == ':') || (strcmp(uri, "[:]") == 0)) { expanded_prefix = XHTML_VOCAB_URI; curie_reference = prefix; prefix = NULL; } else if(uri[0] == ':') { // FIXME: This looks like a bug - don't know why this code is // in here. I think it's for the case where ":next" is // specified, but the code's not checking that -- manu expanded_prefix = context->base; curie_reference = prefix; prefix = NULL; } else if(prefix != NULL) { if(strcmp(prefix, "_") == 0) { // if the prefix specifies this as a blank node, then we // use the blank node prefix expanded_prefix = "_"; } //else if(strcmp(prefix, "rdf") == 0) //{ // expanded_prefix = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; //} else { // if the prefix was defined, get it from the set of URI mappings. #ifdef LIBRDFA_IN_RAPTOR raptor_namespace *nspace; raptor_uri* ns_uri; nspace = raptor_namespaces_find_namespace(&context->sax2->namespaces, (const unsigned char*)prefix, strlen(prefix)); if(nspace) { ns_uri = raptor_namespace_get_uri(nspace); if(ns_uri) expanded_prefix = (const char*)raptor_uri_as_string_v2(context->sax2->world, ns_uri); } #else expanded_prefix = rdfa_get_mapping(context->uri_mappings, prefix); #endif } } // get the length of the expanded prefix if it exists. if(expanded_prefix != NULL) { expanded_prefix_length = strlen(expanded_prefix); } if((expanded_prefix != NULL) && (curie_reference != NULL)) { // if the expanded prefix and the reference exist, generate the // full IRI. if(strcmp(expanded_prefix, "_") == 0) { rval = rdfa_join_string("_:", curie_reference); } else { rval = rdfa_join_string(expanded_prefix, curie_reference); } } else if((expanded_prefix != NULL) && (expanded_prefix[0] != '_') && (curie_reference == NULL)) { // if the expanded prefix exists, but the reference is null, // generate the CURIE because a reference-less CURIE is still // valid rval = rdfa_join_string(expanded_prefix, ""); } free(working_copy); } // if we're NULL at this point, the CURIE might be the special // unnamed bnode specified by _: if((rval == NULL) && ((strcmp(uri, "[_:]") == 0) || (strcmp(uri, "_:") == 0))) { if(context->underscore_colon_bnode_name == NULL) { context->underscore_colon_bnode_name = rdfa_create_bnode(context); } rval = rdfa_replace_string(rval, context->underscore_colon_bnode_name); } // even though a reference-only CURIE is valid, it does not // generate a triple in XHTML+RDFa. If we're NULL at this point, // the given value wasn't valid in XHTML+RDFa. return rval; } /** * Resolves a given uri depending on whether or not it is a fully * qualified IRI, a CURIE, or a short-form XHTML reserved word for * @rel or @rev as defined in the XHTML+RDFa Syntax Document. * * @param context the current processing context. * @param uri the URI part to process. * * @return the fully qualified IRI, or NULL if the conversion failed * due to the given URI not being a short-form XHTML reserved * word. The memory returned from this function MUST be freed. */ char* rdfa_resolve_relrev_curie(rdfacontext* context, const char* uri) { char* rval = NULL; int i = 0; const char* resource = uri; // check to make sure the URI doesn't have an empty prefix if(uri[0] == ':') { resource++; } // search all of the XHTML @rel/@rev reserved words for a // case-insensitive match against the given URI for(i = 0; i < XHTML_RELREV_RESERVED_WORDS_SIZE; i++) { if(strcasecmp(g_relrev_reserved_words[i], resource) == 0) { // since the URI is a reserved word for @rel/@rev, generate // the full IRI and stop the loop. rval = rdfa_join_string(XHTML_VOCAB_URI, g_relrev_reserved_words[i]); i = XHTML_RELREV_RESERVED_WORDS_SIZE; } } // if none of the XHTML @rel/@rev reserved words were found, // attempt to resolve the value as a standard CURIE if(rval == NULL) { rval = rdfa_resolve_curie(context, uri, CURIE_PARSE_RELREV); } return rval; } rdfalist* rdfa_resolve_curie_list( rdfacontext* rdfa_context, const char* uris, curieparse_t mode) { rdfalist* rval = rdfa_create_list(3); char* working_uris = NULL; char* uptr = NULL; char* ctoken = NULL; working_uris = rdfa_replace_string(working_uris, uris); // go through each item in the list of CURIEs and resolve each ctoken = strtok_r(working_uris, RDFA_WHITESPACE, &uptr); while(ctoken != NULL) { char* resolved_curie = NULL; if((mode == CURIE_PARSE_INSTANCEOF_DATATYPE) || (mode == CURIE_PARSE_ABOUT_RESOURCE) || (mode == CURIE_PARSE_PROPERTY)) { resolved_curie = rdfa_resolve_curie(rdfa_context, ctoken, mode); } else if(mode == CURIE_PARSE_RELREV) { resolved_curie = rdfa_resolve_relrev_curie(rdfa_context, ctoken); } // add the CURIE if it was a valid one if(resolved_curie != NULL) { rdfa_add_item(rval, resolved_curie, RDFALIST_FLAG_TEXT); free(resolved_curie); } ctoken = strtok_r(NULL, RDFA_WHITESPACE, &uptr); } free(working_uris); return rval; } raptor-1.4.21/librdfa/iri.c0000644000175000017500000000361711330672502012367 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * The iri module is used to process IRIs. */ #include #include #include #include "rdfa.h" /** * Strips the iquery and ifragment part from an IRI. This leaves just the * scheme and the ihier-part, as defined in RFC 3987. This function will * copy the input string and return a new string that must be free()'d. * * @param iri the IRI that should be stripped of anything after the iquery * and fragment, if they exist. */ char* rdfa_iri_get_base(const char* iri) { char* rval = NULL; char* eindex = 0; // search to see if there is iquery separator eindex = strchr(iri, '?'); if(eindex == NULL) { // if there is no iquery separator, check to see if there is an // ifragment separator eindex = strchr(iri, '#'); } // check to see if the output string needs to be different from the // input string if(eindex == NULL) { // there was no iquery or ifragment in the input string, so there is // no need to reformat the string rval = strdup(iri); } else { // the output string should be concatenated unsigned int length = (unsigned int)(eindex - iri); rval = (char*)malloc(length + 1); rval = strncpy(rval, iri, length); rval[length] = '\0'; } return rval; } raptor-1.4.21/librdfa/subject.c0000644000175000017500000002006411233370763013244 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * This file is used to process RDFa subjects. */ #include #include #include #include "rdfa_utils.h" #include "rdfa.h" /** * Creates a new bnode given an RDFa context. * * @param context the RDFa context. * * @return a newly allocated string containing the bnode name. This * string MUST be memory collected. */ char* rdfa_create_bnode(rdfacontext* context) { char* rval = NULL; char buffer[64]; // print and increment the bnode count sprintf(buffer, "_:bnode%i", (int)context->bnode_count++); rval = rdfa_replace_string(rval, buffer); return rval; } /** * Establishes a new subject for the given context given the * attributes on the current element. The given context's new_subject * value is updated if a new subject is found. * * @param context the RDFa context. * @param name the name of the current element that is being processed. * @param about the full IRI for about, or NULL if there isn't one. * @param src the full IRI for src, or NULL if there isn't one. * @param resource the full IRI for resource, or NULL if there isn't one. * @param href the full IRI for href, or NULL if there isn't one. * @param type_of The list of IRIs for type_of, or NULL if there was * no type_of specified. */ void rdfa_establish_new_subject( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of) { // 4. If the [current element] contains no valid @rel or @rev // URI, obtained according to the section on CURIE and URI // Processing, then the next step is to establish a value for // [new subject]. Any of the attributes that can carry a // resource can set [new subject]; if(about != NULL) { // * by using the URI from @about, if present, obtained according // to the section on CURIE and URI Processing; context->new_subject = rdfa_replace_string(context->new_subject, about); } else if(src != NULL) { // * otherwise, by using the URI from @src, if present, obtained // according to the section on CURIE and URI Processing. context->new_subject = rdfa_replace_string(context->new_subject, src); } else if(resource != NULL) { // * otherwise, by using the URI from @resource, if present, // obtained according to the section on CURIE and URI // Processing; context->new_subject = rdfa_replace_string(context->new_subject, resource); } else if(href != NULL) { // * otherwise, by using the URI from @href, if present, obtained // according to the section on CURIE and URI Processing. context->new_subject = rdfa_replace_string(context->new_subject, href); } // * If no URI is provided by a resource attribute, then the first // match from the following rules will apply: else if((strcmp(name, "head") == 0) || (strcmp(name, "body") == 0)) { // * if the element is the head or body element then act as if // there is an empty @about present, and process it according to // the rule for @about, above; context->new_subject = rdfa_replace_string(context->new_subject, context->base); } else if((type_of != NULL) && (type_of->num_items > 0)) { // * if @type_of is present, obtained according to the // section on CURIE and URI Processing, then [new subject] is // set to be a newly created [bnode]; context->new_subject = rdfa_create_bnode(context); } else if(context->parent_object != NULL) { // * otherwise, if [parent object] is present, [new subject] is // set to that and the [skip element] flag is set to 'true'; context->new_subject = rdfa_replace_string(context->new_subject, context->parent_object); // TODO: The skip element flag will be set even if there is a // @property value, which is a bug, isn't it? //context->skip_element = 1; } } /** * Establishes a new subject for the given context when @rel or @rev * is present. The given context's new_subject and * current_object_resource values are updated if a new subject is found. * * @param context the RDFa context. * @param about the full IRI for about, or NULL if there isn't one. * @param src the full IRI for src, or NULL if there isn't one. * @param resource the full IRI for resource, or NULL if there isn't one. * @param href the full IRI for href, or NULL if there isn't one. * @param type_of the list of IRIs for type_of, or NULL if type_of * wasn't specified on the current element. */ void rdfa_establish_new_subject_with_relrev( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of) { // 5. If the [current element] does contain a valid @rel or @rev // URI, obtained according to the section on CURIE and URI // Processing, then the next step is to establish both a value // for [new subject] and a value for [current object resource]: // // [new subject] is set to the URI obtained from the first match // from the following rules: if(about != NULL) { // * by using the URI from @about, if present, obtained // according to the section on CURIE and URI Processing; context->new_subject = rdfa_replace_string(context->new_subject, about); } else if(src != NULL) { // * otherwise, by using the URI from @src, if present, obtained // according to the section on CURIE and URI Processing. context->new_subject = rdfa_replace_string(context->new_subject, src); } // * If no URI is provided then the first match from the following // rules will apply: else if((strcmp(name, "head") == 0) || (strcmp(name, "body") == 0)) { // * if the element is the head or body element then act as if // there is an empty @about present, and process it according to // the rule for @about, above; context->new_subject = rdfa_replace_string(context->new_subject, context->base); } else if((type_of != NULL) && (type_of->num_items > 0)) { // * if @type_of is present, obtained according to the // section on CURIE and URI Processing, then [new subject] is // set to be a newly created [bnode]; context->new_subject = rdfa_create_bnode(context); } else if(context->parent_object != NULL) { // * otherwise, if [parent object] is present, [new subject] is // set to that; context->new_subject = rdfa_replace_string(context->new_subject, context->parent_object); } // Then the [current object resource] is set to the URI obtained // from the first match from the following rules: if(resource != NULL) { // * by using the URI from @resource, if present, obtained // according to the section on CURIE and URI Processing; context->current_object_resource = rdfa_replace_string(context->current_object_resource, resource); } else if(href != NULL) { // * otherwise, by using the URI from @href, if present, // obtained according to the section on CURIE and URI Processing. context->current_object_resource = rdfa_replace_string(context->current_object_resource, href); } else { // * otherwise, null. context->current_object_resource = NULL; } // Note that final value of the [current object resource] will // either be null, or a full URI. } raptor-1.4.21/librdfa/rdfa_utils.c0000644000175000017500000002027411233370763013744 00000000000000/* * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * You should have received a copy of the GNU Lesser General Public * License along with librdfa. If not, see . */ #include "stdlib.h" #include "string.h" #include "stdio.h" #include "rdfa_utils.h" #include "rdfa.h" #define RDFA_WHITESPACE_CHARACTERS " \a\b\t\n\v\f\r" char* rdfa_join_string(const char* prefix, const char* suffix) { char* rval = NULL; size_t prefix_size = strlen(prefix); size_t suffix_size = strlen(suffix); rval = (char*)malloc(prefix_size + suffix_size + 1); memcpy(rval, prefix, prefix_size); memcpy(rval+prefix_size, suffix, suffix_size + 1); return rval; } char* rdfa_n_append_string( char* old_string, size_t* string_size, const char* suffix, size_t suffix_size) { char* rval = NULL; rval = (char*)realloc(old_string, *string_size + suffix_size + 1); memcpy(rval + *string_size, suffix, suffix_size + 1); *string_size = *string_size + suffix_size; return rval; } char* rdfa_replace_string(char* old_string, const char* new_string) { char* rval = NULL; if(new_string != NULL) { // free the memory associated with the old string if it exists. if(old_string != NULL) { free(old_string); } // copy the new string rval = strdup(new_string); } return rval; } char* rdfa_canonicalize_string(const char* str) { char* rval = (char*)malloc(sizeof(char) * (strlen(str) + 2)); char* working_string = NULL; char* token = NULL; char* wptr = NULL; char* offset = rval; working_string = rdfa_replace_string(working_string, str); // split on any whitespace character that we may find token = strtok_r(working_string, RDFA_WHITESPACE_CHARACTERS, &wptr); while(token != NULL) { size_t token_length = strlen(token); memcpy(offset, token, token_length); offset += token_length; *offset++ = ' '; *offset = '\0'; token = strtok_r(NULL, RDFA_WHITESPACE_CHARACTERS, &wptr); } if(offset != rval) { offset--; *offset = '\0'; } free(working_string); return rval; } rdfalist* rdfa_create_list(size_t size) { rdfalist* rval = (rdfalist*)malloc(sizeof(rdfalist)); rval->max_items = size; rval->num_items = 0; rval->items = (rdfalistitem**)malloc(sizeof(rdfalistitem) * rval->max_items); return rval; } rdfalist* rdfa_copy_list(rdfalist* list) { rdfalist* rval = (rdfalist*)malloc(sizeof(rdfalist)); unsigned int i; // copy the base list variables over rval->max_items = list->max_items; rval->num_items = list->num_items; rval->items = NULL; rval->items = (rdfalistitem**)realloc(rval->items, sizeof(void*) * rval->max_items); // copy the data of every list member along with all of the flags // for each list member. // // TODO: Implement the copy for context, if it is needed. for(i = 0; i < list->max_items; i++) { if(i < rval->num_items) { if(list->items[i]->flags & RDFALIST_FLAG_TEXT) { rval->items[i] = (rdfalistitem*)malloc(sizeof(rdfalistitem)); rval->items[i]->data = NULL; rval->items[i]->data = (char*) rdfa_replace_string((char*)rval->items[i]->data, (const char*)list->items[i]->data); rval->items[i]->flags = list->items[i]->flags; } } else { rval->items[i] = NULL; } } return rval; } void rdfa_print_list(rdfalist* list) { unsigned int i; printf("[ "); for(i = 0; i < list->num_items; i++) { if(i != 0) { printf(", "); } puts((const char*)list->items[i]->data); } printf(" ]\n"); } void rdfa_free_list(rdfalist* list) { if(list != NULL) { unsigned int i; for(i = 0; i < list->num_items; i++) { free(list->items[i]->data); free(list->items[i]); } free(list->items); free(list); } } void rdfa_push_item(rdfalist* stack, void* data, liflag_t flags) { rdfa_add_item(stack, data, flags); } void* rdfa_pop_item(rdfalist* stack) { void* rval = NULL; if(stack->num_items > 0) { rval = stack->items[stack->num_items - 1]->data; free(stack->items[stack->num_items - 1]); stack->items[stack->num_items - 1] = NULL; stack->num_items--; } return rval; } void rdfa_add_item(rdfalist* list, void* data, liflag_t flags) { rdfalistitem* item = (rdfalistitem*)malloc(sizeof(rdfalistitem)); item->data = NULL; if(flags & RDFALIST_FLAG_CONTEXT) { item->data = data; } else { item->data = (char*)rdfa_replace_string((char*)item->data, (const char*)data); } item->flags = flags; if(list->num_items == list->max_items) { list->max_items = 1 + (list->max_items * 2); list->items = (rdfalistitem**) realloc(list->items, sizeof(rdfalistitem) * list->max_items); } list->items[list->num_items] = item; list->num_items++; } #ifndef LIBRDFA_IN_RAPTOR char** rdfa_create_mapping(size_t elements) { size_t mapping_size = sizeof(char*) * MAX_URI_MAPPINGS * 2; char** mapping = malloc(mapping_size); // only initialize the mapping if it is null. if(mapping != NULL) { memset(mapping, 0, mapping_size); } return mapping; } char** rdfa_copy_mapping(char** mapping) { size_t mapping_size = sizeof(char*) * MAX_URI_MAPPINGS * 2; char** rval = malloc(mapping_size); char** mptr = mapping; char** rptr = rval; // initialize the mapping memset(rval, 0, mapping_size); // copy each element of the old mapping to the new mapping. while(*mptr != NULL) { *rptr = rdfa_replace_string(*rptr, *mptr); rptr++; mptr++; } return rval; } void rdfa_update_mapping(char** mapping, const char* key, const char* value) { int found = 0; char** mptr = mapping; // search the current mapping to see if the namespace // prefix exists in the mapping while(*mptr != NULL) { if(strcmp(*mptr, key) == 0) { mptr++; *mptr = rdfa_replace_string(*mptr, value); found = 1; } else { mptr++; } mptr++; } // if we made it through the entire URI mapping and the key was not // found, create a new key-value pair. if(!found) { *mptr = rdfa_replace_string(*mptr, key); mptr++; *mptr = rdfa_replace_string(*mptr, value); } } const char* rdfa_get_mapping(char** mapping, const char* key) { const char* rval = NULL; char** mptr = mapping; // search the current mapping to see if the key exists in the mapping. while(*mptr != NULL) { if(strcmp(*mptr, key) == 0) { mptr++; rval = *mptr; } else { mptr++; } mptr++; } return rval; } void rdfa_next_mapping(char** mapping, char** key, char** value) { *key = NULL; *value = NULL; if(*mapping != NULL) { *key = *mapping++; *value = *mapping++; } } void rdfa_print_mapping(char** mapping) { char** mptr = mapping; printf("{\n"); while(*mptr != NULL) { char* key; char* value; key = *mptr++; value = *mptr++; printf(" %s : %s", key, value); if(*mptr != NULL) { printf(",\n"); } else { printf("\n"); } } printf("}\n"); } void rdfa_free_mapping(char** mapping) { char** mptr = mapping; if(mapping != NULL) { // free all of the memory in the mapping while(*mptr != NULL) { free(*mptr); mptr++; } free(mapping); } } #endif raptor-1.4.21/librdfa/rdfa_utils.h0000644000175000017500000002527011026347521013746 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * librdfa is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with librdfa. If not, see . * * This file contains functions used for common rdfa utility functions. */ #ifndef _RDFA_UTILS_H_ #define _RDFA_UTILS_H_ #include "rdfa.h" #ifdef __cplusplus extern "C" { #endif /** * A CURIE type can be safe, unsafe, and Internationalized Resource * Identifier, reference-only or invalid. */ typedef enum { CURIE_TYPE_SAFE, CURIE_TYPE_IRI_OR_UNSAFE, CURIE_TYPE_LINK_TYPE, CURIE_TYPE_INVALID } curie_t; /** * A CURIE parse type lets the CURIE processor know what type of CURIE * is being parsed so that the proper namespace resolution may occur. */ typedef enum { CURIE_PARSE_ABOUT_RESOURCE, CURIE_PARSE_PROPERTY, CURIE_PARSE_INSTANCEOF_DATATYPE, CURIE_PARSE_HREF_SRC, CURIE_PARSE_RELREV } curieparse_t; /** * The list member flag type is used to attach attribute information * to list member data. */ typedef enum { RDFALIST_FLAG_NONE = 0, RDFALIST_FLAG_FORWARD = (1 << 1), RDFALIST_FLAG_REVERSE = (1 << 2), RDFALIST_FLAG_TEXT = (1 << 3), RDFALIST_FLAG_CONTEXT = (1 << 4), RDFALIST_FLAG_LAST = (1 << 5) } liflag_t; /** * Initializes a mapping given the number of elements the mapping is * expected to hold. * * @param elements the maximum number of elements the mapping is * supposed to hold. * * @return an initialized char**, with all of the elements set to NULL. */ char** rdfa_create_mapping(size_t elements); /** * Copies the entire contents of a mapping verbatim and returns a * pointer to the copied mapping. * * @param mapping the mapping to copy * * @return the copied mapping, with all of the memory newly * allocated. You MUST free the returned mapping when you are * done with it. */ char** rdfa_copy_mapping(char** mapping); /** * Updates the given mapping when presented with a key and a value. If * the key doesn't exist in the mapping, it is created. * * @param mapping the mapping to update. * @param key the key. * @param value the value. */ void rdfa_update_mapping(char** mapping, const char* key, const char* value); /** * Gets the value for a given mapping when presented with a key. If * the key doesn't exist in the mapping, NULL is returned. * * @param mapping the mapping to search. * @param key the key. * * @return value the value in the mapping for the given key. */ const char* rdfa_get_mapping(char** mapping, const char* key); /** * Gets the current mapping for the given mapping and increments the * mapping to the next value in the chain. * * @param mapping the mapping to use and increment. * @param key the key that will be retrieved, NULL if the mapping is * blank or you are at the end of the mapping. * @param value the value that is associated with the key. NULL if the * mapping is blank or you are at the end of the mapping. */ void rdfa_next_mapping(char** mapping, char** key, char** value); /** * Prints the mapping to the screen in a human-readable way. * * @param mapping the mapping to print to the screen. */ void rdfa_print_mapping(char** mapping); /** * Frees all memory associated with a mapping. * * @param mapping the mapping to free. */ void rdfa_free_mapping(char** mapping); /** * Creates a list and initializes it to the given size. * * @param size the starting size of the list. */ rdfalist* rdfa_create_list(size_t size); /** * Copies the given list. * * @param list the list to copy. * * @return the copied list. You MUST free the memory associated with * the returned list once you are done with it. */ rdfalist* rdfa_copy_list(rdfalist* list); /** * Adds an item to the end of the list. * * @param list the list to add the item to. * @param data the data to add to the list. * @param flags the flags to attach to the item. */ void rdfa_add_item(rdfalist* list, void* data, liflag_t flags); /** * Pushes an item onto the top of a stack. This function uses a list * for the underlying implementation. * * @param stack the stack to add the item to. * @param data the data to add to the stack. * @param flags the flags to attach to the item. */ void rdfa_push_item(rdfalist* stack, void* data, liflag_t flags); /** * Pops an item off of the top of a stack. This function uses a list * for the underlying implementation * * @param stack the stack to pop the item off of. * * @return the item that was just popped off of the top of the * stack. You MUST free the memory associated with the return * value. */ void* rdfa_pop_item(rdfalist* stack); /** * Prints the list to the screen in a human-readable way. * * @param list the list to print to the screen. */ void rdfa_print_list(rdfalist* list); /** * Frees all memory associated with the given list. * * @param list the list to free. */ void rdfa_free_list(rdfalist* list); /** * Replaces an old string with a new string, freeing the old memory * and allocating new memory for the new string. * * @param old_string the old string to free and replace. * @param new_string the new string to copy to the old_string's * location. * * @return a pointer to the newly allocated string. */ char* rdfa_replace_string(char* old_string, const char* new_string); /** * Appends a new string to the old string, expanding the old string's * memory area if needed. The old string's size must be provided and * will be updated to the new length. * * @param old_string the old string to reallocate if needed. * @param string_size the old string's length, to be updated. * @param suffix the string to append to the old_string. * @param suffix_size the size of the suffix string. * * @return a pointer to the newly re-allocated string. */ char* rdfa_n_append_string( char* old_string, size_t* string_size, const char* suffix, size_t suffix_size); /** * Joins two strings together and returns a newly allocated string * with both strings joined. * * @param prefix the beginning part of the string. * @param suffix the ending part of the string. * * @return a pointer to the newly allocated string that has both * prefix and suffix in it. */ char* rdfa_join_string(const char* prefix, const char* suffix); /** * Canonicalizes a given string by condensing all whitespace to single * spaces and stripping leading and trailing whitespace. * * @param str the string to canonicalize. * * @return a pointer to a newly allocated string that contains the * canonicalized text. */ char* rdfa_canonicalize_string(const char* str); /** * Creates a triple given the subject, predicate, object, datatype and * language for the triple. * * @param subject the subject for the triple. * @param predicate the predicate for the triple. * @param object the object for the triple. * @param object_type the type of the object, which must be an rdfresource_t. * @param datatype the datatype of the triple. * @param language the language for the triple. * * @return a newly allocated triple with all of the given * information. This triple MUST be free()'d when you are done * with it. */ rdftriple* rdfa_create_triple(const char* subject, const char* predicate, const char* object, rdfresource_t object_type, const char* datatype, const char* language); /** * Prints a triple in a human-readable fashion. * * @triple the triple to display. */ void rdfa_print_triple(rdftriple* triple); /** * Frees the memory associated with a triple. */ void rdfa_free_triple(rdftriple* triple); /** * Resolves a given uri by appending it to the context's base parameter. * * @param context the current processing context. * @param uri the URI part to process. * * @return the fully qualified IRI. The memory returned from this * function MUST be freed. */ char* rdfa_resolve_uri(rdfacontext* context, const char* uri); /** * Resolves a given uri depending on whether or not it is a fully * qualified IRI or a CURIE. * * @param context the current processing context. * @param uri the URI part to process. * @param mode the CURIE processing mode to use when parsing the CURIE. * * @return the fully qualified IRI. The memory returned from this * function MUST be freed. */ char* rdfa_resolve_curie( rdfacontext* context, const char* uri, curieparse_t mode); /** * Resolves one or more CURIEs into fully qualified IRIs. * * @param rdfa_context the current processing context. * @param uris a list of URIs. * @param mode the CURIE parsing mode to use, one of * CURIE_PARSE_INSTANCEOF, CURIE_PARSE_RELREV, or * CURIE_PARSE_PROPERTY. * * @return an RDFa list if one or more IRIs were generated, NULL if not. */ rdfalist* rdfa_resolve_curie_list( rdfacontext* rdfa_context, const char* uris, curieparse_t mode); curie_t get_curie_type(const char* uri); char* rdfa_resolve_relrev_curie(rdfacontext* context, const char* uri); char* rdfa_resolve_property_curie(rdfacontext* context, const char* uri); void rdfa_update_language(rdfacontext* context, const char* lang); char* rdfa_create_bnode(rdfacontext* context); // All functions that rdfa.c needs. void rdfa_update_uri_mappings(rdfacontext* context, const char* attr, const char* value); void rdfa_establish_new_subject( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of); void rdfa_establish_new_subject_with_relrev( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of); void rdfa_complete_incomplete_triples(rdfacontext* context); void rdfa_complete_type_triples(rdfacontext* context, const rdfalist* type_of); void rdfa_complete_relrev_triples( rdfacontext* context, const rdfalist* rel, const rdfalist* rev); void rdfa_save_incomplete_triples( rdfacontext* context, const rdfalist* rel, const rdfalist* rev); void rdfa_complete_object_literal_triples(rdfacontext* context); /* triple.c - needed by namespace.c */ void rdfa_generate_namespace_triple( rdfacontext* context, const char* prefix, const char* iri); #ifdef __cplusplus } #endif #endif raptor-1.4.21/librdfa/Makefile.am0000644000175000017500000000037611014346357013500 00000000000000# -*- Mode: Makefile -*- # # Makefile for distributing librdfa sources # EXTRA_DIST = \ curie.c \ language.c \ rdfa.c \ rdfa_utils.c \ subject.c \ triple.c \ rdfa.h \ rdfa_utils.h # Do not need: # mingw32_utils.c # mingw32_utils.h # namespace.c raptor-1.4.21/librdfa/Makefile.in0000644000175000017500000002511411330704763013506 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile for distributing librdfa sources # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = librdfa DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ curie.c \ language.c \ rdfa.c \ rdfa_utils.c \ subject.c \ triple.c \ rdfa.h \ rdfa_utils.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu librdfa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu librdfa/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Do not need: # mingw32_utils.c # mingw32_utils.h # namespace.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/librdfa/rdfa.c0000644000175000017500000012431211330672502012514 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * The librdfa library is the Fastest RDFa Parser in the Universe. It is * a stream parser, meaning that it takes an XML data as input and spits * out RDF triples as it comes across them in the stream. Due to this * processing approach, librdfa has a very, very small memory footprint. * It is also very fast and can operate on hundreds of gigabytes of XML * data without breaking a sweat. * * Usage: * * rdfacontext* context = rdfa_create_context(BASE_URI); * context->callback_data = your_user_data; * rdfa_set_triple_handler(context, &process_triple); * rdfa_set_buffer_filler(context, &fill_buffer); * rdfa_parse(context); * rdfa_free_context(context); * * @author Manu Sporny */ #include #include #include #include "rdfa_utils.h" #include "rdfa.h" #define READ_BUFFER_SIZE 4096 void rdfa_init_context(rdfacontext* context) { // the [parent subject] is set to the [base] value; context->parent_subject = NULL; if(context->base != NULL) { char* cleaned_base = rdfa_iri_get_base(context->base); context->parent_subject = rdfa_replace_string(context->parent_subject, cleaned_base); free(cleaned_base); } // the [parent object] is set to null; context->parent_object = NULL; #ifndef LIBRDFA_IN_RAPTOR // the [list of URI mappings] is cleared; context->uri_mappings = (char**)rdfa_create_mapping(MAX_URI_MAPPINGS); #endif // the [list of incomplete triples] is cleared; context->incomplete_triples = rdfa_create_list(3); // the [language] is set to null. context->language = NULL; // set the [current object resource] to null; context->current_object_resource = NULL; // 1. First, the local values are initialized, as follows: // // * the [recurse] flag is set to 'true'; context->recurse = 1; // * the [skip element] flag is set to 'false'; context->skip_element = 0; // * [new subject] is set to null; context->new_subject = NULL; // * [current object resource] is set to null; context->current_object_resource = NULL; // * the [local list of URI mappings] is set to the list of URI // mappings from the [evaluation context]; // NOTE: This step is done in rdfa_create_new_element_context() // * the [local list of incomplete triples] is set to null; context->local_incomplete_triples = rdfa_create_list(3); // * the [current language] value is set to the [language] value // from the [evaluation context]. // NOTE: This step is done in rdfa_create_new_element_context() // The next set of variables are initialized to make the C compiler // and valgrind happy - they are not a part of the RDFa spec. context->bnode_count = 0; context->underscore_colon_bnode_name = NULL; context->xml_literal_namespaces_defined = 0; context->xml_literal_xml_lang_defined = 0; context->content = NULL; context->datatype = NULL; context->property = NULL; context->plain_literal = NULL; context->plain_literal_size = 0; context->xml_literal = NULL; context->xml_literal_size = 0; // FIXME: completing incomplete triples always happens now, change // all of the code to reflect that. //context->callback_data = NULL; } /** * Read the head of the XHTML document and determines the base IRI for * the document. * * @param context the current working context. * @param working_buffer the current working buffer. * @param wb_allocated the number of bytes that have been allocated to * the working buffer. * * @return the size of the data available in the working buffer. */ static size_t rdfa_init_base( rdfacontext* context, char** working_buffer, size_t* working_buffer_size, char* temp_buffer, size_t bytes_read) { char* head_end = NULL; size_t offset = context->wb_offset; int needed_size = (offset + bytes_read) - *working_buffer_size; // search for the end of , stop if was found // extend the working buffer size if(needed_size > 0) { size_t temp_buffer_size = sizeof(char) * READ_BUFFER_SIZE; if((size_t)needed_size > temp_buffer_size) temp_buffer_size += needed_size; *working_buffer_size += temp_buffer_size; // +1 for NUL at end, to allow strstr() etc. to work *working_buffer = (char*)realloc(*working_buffer, *working_buffer_size + 1); } // append to the working buffer memmove(*working_buffer + offset, temp_buffer, bytes_read); // ensure the buffer is a NUL-terminated string *(*working_buffer + offset + bytes_read) = '\0'; // search for the end of in head_end = strstr(*working_buffer, ""); if(head_end == NULL) head_end = strstr(*working_buffer, ""); context->wb_offset += bytes_read; if(head_end == NULL) return bytes_read; // if was found, search for current_object_resource = rdfa_replace_string( context->current_object_resource, cleaned_base); // clean up the base context context->base = rdfa_replace_string(context->base, cleaned_base); free(cleaned_base); free(temp_uri); } } } } return bytes_read; } /** * Creates a new context for the current element by cloning certain * parts of the old context on the top of the given stack. * * @param context_stack the context stack that is associated with this * processing run. */ static rdfacontext* rdfa_create_new_element_context(rdfalist* context_stack) { rdfacontext* parent_context = (rdfacontext*) context_stack->items[context_stack->num_items - 1]->data; rdfacontext* rval = rdfa_create_context(parent_context->base); // * Otherwise, the values are: // * the [ base ] is set to the [ base ] value of the current // [ evaluation context ]; rval->base = rdfa_replace_string(rval->base, parent_context->base); rdfa_init_context(rval); // copy the URI mappings #ifndef LIBRDFA_IN_RAPTOR if(rval->uri_mappings != NULL) { rdfa_free_mapping(rval->uri_mappings); } rval->uri_mappings = rdfa_copy_mapping(parent_context->uri_mappings); #endif // inherit the parent context's language if(parent_context->language != NULL) { rval->language = rdfa_replace_string(rval->language, parent_context->language); } // set the triple callback rval->triple_callback = parent_context->triple_callback; rval->buffer_filler_callback = parent_context->buffer_filler_callback; // inherit the bnode count, _: bnode name, recurse flag, and state // of the xml_literal_namespace_insertion rval->bnode_count = parent_context->bnode_count; rval->underscore_colon_bnode_name = rdfa_replace_string(rval->underscore_colon_bnode_name, parent_context->underscore_colon_bnode_name); rval->recurse = parent_context->recurse; rval->skip_element = 0; rval->callback_data = parent_context->callback_data; rval->xml_literal_namespaces_defined = parent_context->xml_literal_namespaces_defined; rval->xml_literal_xml_lang_defined = parent_context->xml_literal_xml_lang_defined; // inherit the parent context's new_subject // TODO: This is not anywhere in the syntax processing document //if(parent_context->new_subject != NULL) //{ // rval->new_subject = rdfa_replace_string( // rval->new_subject, parent_context->new_subject); //} if(parent_context->skip_element == 0) { // o the [ parent subject ] is set to the value of [ new subject ], // if non-null, or the value of the [ parent subject ] of the // current [ evaluation context ]; if(parent_context->new_subject != NULL) { rval->parent_subject = rdfa_replace_string( rval->parent_subject, parent_context->new_subject); } else { rval->parent_subject = rdfa_replace_string( rval->parent_subject, parent_context->parent_subject); } // o the [ parent object ] is set to value of [ current object // resource ], if non-null, or the value of [ new subject ], if // non-null, or the value of the [ parent subject ] of the // current [ evaluation context ]; if(parent_context->current_object_resource != NULL) { rval->parent_object = rdfa_replace_string( rval->parent_object, parent_context->current_object_resource); } else if(parent_context->new_subject != NULL) { rval->parent_object = rdfa_replace_string( rval->parent_object, parent_context->new_subject); } else { rval->parent_object = rdfa_replace_string( rval->parent_object, parent_context->parent_subject); } // copy the incomplete triples if(rval->incomplete_triples != NULL) { rdfa_free_list(rval->incomplete_triples); } // o the [ list of incomplete triples ] is set to the [ local list // of incomplete triples ]; rval->incomplete_triples = rdfa_copy_list(parent_context->local_incomplete_triples); } else { rval->parent_subject = rdfa_replace_string( rval->parent_subject, parent_context->parent_subject); rval->parent_object = rdfa_replace_string( rval->parent_object, parent_context->parent_object); // copy the incomplete triples if(rval->incomplete_triples != NULL) { rdfa_free_list(rval->incomplete_triples); } rval->incomplete_triples = rdfa_copy_list(parent_context->incomplete_triples); // copy the local list of incomplete triples if(rval->local_incomplete_triples != NULL) { rdfa_free_list(rval->local_incomplete_triples); } rval->local_incomplete_triples = rdfa_copy_list(parent_context->local_incomplete_triples); } #ifdef LIBRDFA_IN_RAPTOR rval->base_uri = parent_context->base_uri; rval->sax2 = parent_context->sax2; rval->namespace_handler = parent_context->namespace_handler; rval->namespace_handler_user_data = parent_context->namespace_handler_user_data; rval->error_handlers = parent_context->error_handlers; #endif return rval; } #ifdef LIBRDFA_IN_RAPTOR static int raptor_nspace_compare(const void *a, const void *b) { raptor_namespace* ns_a=*(raptor_namespace**)a; raptor_namespace* ns_b=*(raptor_namespace**)b; if(!ns_a->prefix) return 1; else if(!ns_b->prefix) return -1; else return strcmp((const char*)ns_b->prefix, (const char*)ns_a->prefix); } #endif /** * Handles the start_element call */ static void XMLCALL start_element(void* user_data, const char* name, const char** attributes) { rdfalist* context_stack = (rdfalist*) user_data; rdfacontext* context = rdfa_create_new_element_context(context_stack); const char** aptr = attributes; const char* xml_lang = NULL; const char* about_curie = NULL; char* about = NULL; const char* src_curie = NULL; char* src = NULL; const char* type_of_curie = NULL; rdfalist* type_of = NULL; const char* rel_curie = NULL; rdfalist* rel = NULL; const char* rev_curie = NULL; rdfalist* rev = NULL; const char* property_curie = NULL; rdfalist* property = NULL; const char* resource_curie = NULL; char* resource = NULL; const char* href_curie = NULL; char* href = NULL; const char* content = NULL; const char* datatype_curie = NULL; char* datatype = NULL; rdfa_push_item(context_stack, context, RDFALIST_FLAG_CONTEXT); if(DEBUG) { printf("DEBUG: ------- START - %s -------\n", name); } // start the XML Literal text if(context->xml_literal == NULL) { context->xml_literal = rdfa_replace_string(context->xml_literal, "<"); context->xml_literal_size = 1; } else { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, "<", 1); } context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, name, strlen(name)); if(!context->xml_literal_namespaces_defined) { // append namespaces to XML Literal #ifdef LIBRDFA_IN_RAPTOR raptor_namespace_stack* nstack = &context->sax2->namespaces; raptor_namespace* ns; raptor_namespace** ns_list = NULL; size_t ns_size; #else char** umap = context->uri_mappings; #endif char* umap_key = NULL; char* umap_value = NULL; // if the namespaces are not defined, then neither is the xml:lang context->xml_literal_xml_lang_defined = 0; #ifdef LIBRDFA_IN_RAPTOR ns_size = 0; ns_list = raptor_namespace_stack_to_array(nstack, &ns_size); qsort((void*)ns_list, ns_size, sizeof(raptor_namespace*), raptor_nspace_compare); while(ns_size > 0) #else while(*umap != NULL) #endif { unsigned char insert_xmlns_definition = 1; const char* attr = NULL; const char* value = NULL; // get the next mapping to process #ifdef LIBRDFA_IN_RAPTOR ns=ns_list[--ns_size]; umap_key = (char*)raptor_namespace_get_prefix(ns); if(!umap_key) umap_key=(char*)XMLNS_DEFAULT_MAPPING; umap_value = (char*)raptor_uri_as_string_v2(context->sax2->world, raptor_namespace_get_uri(ns)); #else rdfa_next_mapping(umap++, &umap_key, &umap_value); umap++; #endif // check to make sure that the namespace isn't already // defined in the current element. if(attributes != NULL) { const char** attrs = attributes; while((*attrs != NULL) && insert_xmlns_definition) { attr = *attrs++; value = *attrs++; // if the attribute is a umap_key, skip the definition // of the attribute. if((strcmp(attr, umap_key) == 0) || (strcmp(umap_key, XMLNS_DEFAULT_MAPPING) == 0)) { insert_xmlns_definition = 0; } } } // if the namespace isn't already defined on the element, // copy it to the XML Literal string. if(insert_xmlns_definition) { // append the namespace attribute to the XML Literal context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, " xmlns", strlen(" xmlns")); // check to see if we're dumping the standard XHTML namespace or // a user-defined XML namespace if(strcmp(umap_key, XMLNS_DEFAULT_MAPPING) != 0) { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, ":", 1); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, umap_key, strlen(umap_key)); } // append the namespace value context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, "=\"", 2); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, umap_value, strlen(umap_value)); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, "\"", 1); } insert_xmlns_definition = 1; } /* end while umap not NULL */ context->xml_literal_namespaces_defined = 1; #ifdef LIBRDFA_IN_RAPTOR if(ns_list) raptor_free_memory(ns_list); #endif } /* end if namespaces inserted */ // prepare all of the RDFa-specific attributes we are looking for. // scan all of the attributes for the RDFa-specific attributes if(aptr != NULL) { while(*aptr != NULL) { const char* attr; const char* value; char* literal_text; attr = *aptr++; value = *aptr++; // append the attribute-value pair to the XML literal literal_text = (char*)malloc(strlen(attr) + strlen(value) + 5); sprintf(literal_text, " %s=\"%s\"", attr, value); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, literal_text, strlen(literal_text)); free(literal_text); // if xml:lang is defined, ensure that it is not overwritten if(strcmp(attr, "xml:lang") == 0) { context->xml_literal_xml_lang_defined = 1; } // process all of the RDFa attributes if(strcmp(attr, "about") == 0) { about_curie = value; about = rdfa_resolve_curie( context, about_curie, CURIE_PARSE_ABOUT_RESOURCE); } else if(strcmp(attr, "src") == 0) { src_curie = value; src = rdfa_resolve_curie(context, src_curie, CURIE_PARSE_HREF_SRC); } else if(strcmp(attr, "typeof") == 0) { type_of_curie = value; type_of = rdfa_resolve_curie_list( context, type_of_curie, CURIE_PARSE_INSTANCEOF_DATATYPE); } else if(strcmp(attr, "rel") == 0) { rel_curie = value; rel = rdfa_resolve_curie_list( context, rel_curie, CURIE_PARSE_RELREV); } else if(strcmp(attr, "rev") == 0) { rev_curie = value; rev = rdfa_resolve_curie_list( context, rev_curie, CURIE_PARSE_RELREV); } else if(strcmp(attr, "property") == 0) { property_curie = value; property = rdfa_resolve_curie_list( context, property_curie, CURIE_PARSE_PROPERTY); } else if(strcmp(attr, "resource") == 0) { resource_curie = value; resource = rdfa_resolve_curie( context, resource_curie, CURIE_PARSE_ABOUT_RESOURCE); } else if(strcmp(attr, "href") == 0) { href_curie = value; href = rdfa_resolve_curie(context, href_curie, CURIE_PARSE_HREF_SRC); } else if(strcmp(attr, "content") == 0) { content = value; } else if(strcmp(attr, "datatype") == 0) { datatype_curie = value; if(strlen(datatype_curie) == 0) { datatype = rdfa_replace_string(datatype, ""); } else { datatype = rdfa_resolve_curie(context, datatype_curie, CURIE_PARSE_INSTANCEOF_DATATYPE); } } #ifndef LIBRDFA_IN_RAPTOR else if(strcmp(attr, "xml:lang") == 0) { xml_lang = value; } else if(strstr(attr, "xmlns") != NULL) { // 2. Next the [current element] is parsed for // [URI mapping]s and these are added to the // [local list of URI mappings]. Note that a // [URI mapping] will simply overwrite any current // mapping in the list that has the same name; rdfa_update_uri_mappings(context, attr, value); } #endif } } #ifdef LIBRDFA_IN_RAPTOR if(context->sax2) { xml_lang = (const char*)raptor_sax2_inscope_xml_language(context->sax2); if(!xml_lang) xml_lang = ""; } #endif // check to see if we should append an xml:lang to the XML Literal // if one is defined in the context and does not exist on the // element. if((xml_lang == NULL) && (context->language != NULL) && !context->xml_literal_xml_lang_defined) { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, " xml:lang=\"", strlen(" xml:lang=\"")); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, context->language, strlen(context->language)); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, "\"", 1); // ensure that the lang isn't set in a subtree (unless it's overwritten) context->xml_literal_xml_lang_defined = 1; } // close the XML Literal value context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, ">", 1); // 3. The [current element] is also parsed for any language // information, and [language] is set in the [current // evaluation context]; rdfa_update_language(context, xml_lang); /***************** FOR DEBUGGING PURPOSES ONLY ******************/ if(DEBUG) { if(about != NULL) { printf("DEBUG: @about = %s\n", about); } if(src != NULL) { printf("DEBUG: @src = %s\n", src); } if(type_of != NULL) { printf("DEBUG: @type_of = "); rdfa_print_list(type_of); } if(rel != NULL) { printf("DEBUG: @rel = "); rdfa_print_list(rel); } if(rev != NULL) { printf("DEBUG: @rev = "); rdfa_print_list(rev); } if(property != NULL) { printf("DEBUG: @property = "); rdfa_print_list(property); } if(resource != NULL) { printf("DEBUG: @resource = %s\n", resource); } if(href != NULL) { printf("DEBUG: @href = %s\n", href); } if(content != NULL) { printf("DEBUG: @content = %s\n", content); } if(datatype != NULL) { printf("DEBUG: @datatype = %s\n", datatype); } } // TODO: This isn't part of the processing model, it needs to be // included and is a correction for the last item in step #4. if((about == NULL) && (src == NULL) && (type_of == NULL) && (rel == NULL) && (rev == NULL) && (property == NULL) && (resource == NULL) && (href == NULL)) { context->skip_element = 1; } if((rel == NULL) && (rev == NULL)) { // 4. If the [current element] contains no valid @rel or @rev // URI, obtained according to the section on CURIE and URI // Processing, then the next step is to establish a value for // [new subject]. Any of the attributes that can carry a // resource can set [new subject]; rdfa_establish_new_subject( context, name, about, src, resource, href, type_of); } else { // 5. If the [current element] does contain a valid @rel or @rev // URI, obtained according to the section on CURIE and URI // Processing, then the next step is to establish both a value // for [new subject] and a value for [current object resource]: rdfa_establish_new_subject_with_relrev( context, name, about, src, resource, href, type_of); } if(context->new_subject != NULL) { if(DEBUG) { printf("DEBUG: new_subject = %s\n", context->new_subject); } // 6. If in any of the previous steps a [new subject] was set to // a non-null value, // it is now used to provide a subject for type values; if(type_of != NULL) { rdfa_complete_type_triples(context, type_of); } // Note that none of this block is executed if there is no // [new subject] value, i.e., [new subject] remains null. } if(context->current_object_resource != NULL) { // 7. If in any of the previous steps a [current object resource] // was set to a non-null value, it is now used to generate triples rdfa_complete_relrev_triples(context, rel, rev); } else if((rel != NULL) || (rev != NULL)) { // 8. If however [current object resource] was set to null, but // there are predicates present, then they must be stored as // [incomplete triple]s, pending the discovery of a subject that // can be used as the object. Also, [current object resource] // should be set to a newly created [bnode] rdfa_save_incomplete_triples(context, rel, rev); } // Ensure to re-insert XML Literal namespace information from this // point on... if(property != NULL) { context->xml_literal_namespaces_defined = 0; } // save these for processing steps #9 and #10 context->property = property; context->content = rdfa_replace_string(context->datatype, content); context->datatype = rdfa_replace_string(context->datatype, datatype); // free the resolved CURIEs free(about); free(src); rdfa_free_list(type_of); rdfa_free_list(rel); rdfa_free_list(rev); free(resource); free(href); free(datatype); } static void XMLCALL character_data(void *user_data, const char *s, int len) { rdfalist* context_stack = (rdfalist*)user_data; rdfacontext* context = (rdfacontext*) context_stack->items[context_stack->num_items - 1]->data; char *buffer = (char*)malloc(len + 1); memset(buffer, 0, len + 1); memcpy(buffer, s, len); // append the text to the current context's plain literal if(context->plain_literal == NULL) { context->plain_literal = rdfa_replace_string(context->plain_literal, buffer); context->plain_literal_size = len; } else { context->plain_literal = rdfa_n_append_string( context->plain_literal, &context->plain_literal_size, buffer, len); } // append the text to the current context's XML literal if(context->xml_literal == NULL) { context->xml_literal = rdfa_replace_string(context->xml_literal, buffer); context->xml_literal_size = len; } else { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, buffer, len); } //printf("plain_literal: %s\n", context->plain_literal); //printf("xml_literal: %s\n", context->xml_literal); free(buffer); } static void XMLCALL end_element(void *user_data, const char *name) { rdfalist* context_stack = (rdfalist*)user_data; rdfacontext* context = (rdfacontext*)rdfa_pop_item(context_stack); rdfacontext* parent_context = (rdfacontext*) context_stack->items[context_stack->num_items - 1]->data; // append the text to the current context's XML literal char* buffer = (char*)malloc(strlen(name) + 4); if(DEBUG) { printf("DEBUG: \n", name); } sprintf(buffer, "", name); if(context->xml_literal == NULL) { context->xml_literal = rdfa_replace_string(context->xml_literal, buffer); context->xml_literal_size = strlen(buffer); } else { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, buffer, strlen(buffer)); } free(buffer); // 9. The next step of the iteration is to establish any // [current object literal]; // generate the complete object literal triples if(context->property != NULL) { // save the current xml literal char* saved_xml_literal = context->xml_literal; char* content_start = NULL; char* content_end = NULL; // ensure to mark only the inner-content of the XML node for // processing the object literal. buffer = NULL; if(context->xml_literal != NULL) { // get the data between the first tag and the last tag content_start = strchr(context->xml_literal, '>'); content_end = strrchr(context->xml_literal, '<'); if((content_start != NULL) && (content_end != NULL)) { // set content end to null terminator context->xml_literal = ++content_start; *content_end = '\0'; } } // update the plain literal if the XML Literal is an empty string if(strlen(context->xml_literal) == 0) { context->plain_literal = rdfa_replace_string(context->plain_literal, ""); } // process data between first tag and last tag // this needs the xml literal to be null terminated rdfa_complete_object_literal_triples(context); if(content_end != NULL) { // set content end back *content_end = '<'; } if(saved_xml_literal != NULL) { // restore xml literal context->xml_literal = saved_xml_literal; } } //printf(context->plain_literal); // append the XML literal and plain text literals to the parent // literals if(context->xml_literal != NULL) { if(parent_context->xml_literal == NULL) { parent_context->xml_literal = rdfa_replace_string( parent_context->xml_literal, context->xml_literal); parent_context->xml_literal_size = context->xml_literal_size; } else { parent_context->xml_literal = rdfa_n_append_string( parent_context->xml_literal, &parent_context->xml_literal_size, context->xml_literal, context->xml_literal_size); } // if there is an XML literal, there is probably a plain literal if(context->plain_literal != NULL) { if(parent_context->plain_literal == NULL) { parent_context->plain_literal = rdfa_replace_string( parent_context->plain_literal, context->plain_literal); parent_context->plain_literal_size = context->plain_literal_size; } else { parent_context->plain_literal = rdfa_n_append_string( parent_context->plain_literal, &parent_context->plain_literal_size, context->plain_literal, context->plain_literal_size); } } } // preserve the bnode count by copying it to the parent_context parent_context->bnode_count = context->bnode_count; parent_context->underscore_colon_bnode_name = \ rdfa_replace_string(parent_context->underscore_colon_bnode_name, context->underscore_colon_bnode_name); // 10. If the [ skip element ] flag is 'false', and [ new subject ] // was set to a non-null value, then any [ incomplete triple ]s // within the current context should be completed: if((context->skip_element == 0) && (context->new_subject != NULL)) { rdfa_complete_incomplete_triples(context); } // free the context rdfa_free_context(context); } #ifdef LIBRDFA_IN_RAPTOR static void raptor_rdfa_start_element(void *user_data, raptor_xml_element *xml_element) { raptor_qname* qname=raptor_xml_element_get_name(xml_element); int attr_count=raptor_xml_element_get_attributes_count(xml_element); raptor_qname** attrs=raptor_xml_element_get_attributes(xml_element); unsigned char* qname_string=raptor_qname_to_counted_name(qname, NULL); char** attr=NULL; int i; if(attr_count > 0) { attr=(char**)malloc(sizeof(char*) * (1+(attr_count*2))); for(i=0; iitems[context_stack->num_items - 1]->data; if(context->namespace_handler) (*context->namespace_handler)(context->namespace_handler_user_data, nspace); } #endif rdfacontext* rdfa_create_context(const char* base) { rdfacontext* rval = NULL; size_t base_length = strlen(base); // if the base isn't specified, don't create a context if(base_length > 0) { char* cleaned_base; rval = (rdfacontext*)malloc(sizeof(rdfacontext)); rval->base = NULL; cleaned_base = rdfa_iri_get_base(base); rval->base = rdfa_replace_string(rval->base, cleaned_base); free(cleaned_base); /* parse state */ rval->wb_allocated = 0; rval->working_buffer = NULL; rval->wb_offset = 0; #ifdef LIBRDFA_IN_RAPTOR rval->base_uri = NULL; rval->sax2 = NULL; rval->namespace_handler = NULL; rval->namespace_handler_user_data = NULL; #else rval->parser = NULL; #endif rval->done = 0; rval->context_stack = NULL; rval->wb_preread = 0; rval->preread = 0; } else { printf("OMG!\n"); } return rval; } void rdfa_free_context(rdfacontext* context) { if(context->base) { free(context->base); } if(context->parent_subject != NULL) { free(context->parent_subject); } if(context->parent_object != NULL) { free(context->parent_object); } #ifndef LIBRDFA_IN_RAPTOR if(context->uri_mappings != NULL) { rdfa_free_mapping(context->uri_mappings); } #endif if(context->incomplete_triples != NULL) { rdfa_free_list(context->incomplete_triples); } if(context->language != NULL) { free(context->language); } if(context->underscore_colon_bnode_name != NULL) { free(context->underscore_colon_bnode_name); } if(context->new_subject != NULL) { free(context->new_subject); } if(context->current_object_resource != NULL) { free(context->current_object_resource); } if(context->content != NULL) { free(context->content); } if(context->datatype != NULL) { free(context->datatype); } if(context->property != NULL) { rdfa_free_list(context->property); } if(context->plain_literal != NULL) { free(context->plain_literal); } if(context->xml_literal != NULL) { free(context->xml_literal); } // TODO: These should be moved into their own data structure if(context->local_incomplete_triples != NULL) { rdfa_free_list(context->local_incomplete_triples); } // this field is not NULL only on the rdfacontext* at the top of the stack if(context->context_stack != NULL) { void* rval; // free the stack ensuring that we do not delete this context if // it is in the list (which it may be, if parsing ended on error) do { rval=rdfa_pop_item(context->context_stack); if(rval && rval != context) rdfa_free_context((rdfacontext*)rval); } while(rval); free(context->context_stack->items); free(context->context_stack); } if(context->working_buffer != NULL) { free(context->working_buffer); } free(context); } void rdfa_set_triple_handler(rdfacontext* context, triple_handler_fp th) { context->triple_callback = th; } void rdfa_set_buffer_filler(rdfacontext* context, buffer_filler_fp bf) { context->buffer_filler_callback = bf; } int rdfa_parse_start(rdfacontext* context) { // create the buffers and expat parser int rval = RDFA_PARSE_SUCCESS; context->wb_allocated = sizeof(char) * READ_BUFFER_SIZE; // +1 for NUL at end, to allow strstr() etc. to work // malloc - only the first char needs to be NUL context->working_buffer = (char*)malloc(context->wb_allocated + 1); *context->working_buffer = '\0'; #ifndef LIBRDFA_IN_RAPTOR context->parser = XML_ParserCreate(NULL); #endif context->done = 0; context->context_stack = rdfa_create_list(32); // initialize the context stack rdfa_push_item(context->context_stack, context, RDFALIST_FLAG_CONTEXT); #ifdef LIBRDFA_IN_RAPTOR context->sax2 = raptor_new_sax2(context->context_stack, context->error_handlers); #else #endif // set up the context stack #ifdef LIBRDFA_IN_RAPTOR raptor_sax2_set_start_element_handler(context->sax2, raptor_rdfa_start_element); raptor_sax2_set_end_element_handler(context->sax2, raptor_rdfa_end_element); raptor_sax2_set_characters_handler(context->sax2, raptor_rdfa_character_data); raptor_sax2_set_namespace_handler(context->sax2, raptor_rdfa_namespace_handler); #else XML_SetUserData(context->parser, context->context_stack); XML_SetElementHandler(context->parser, start_element, end_element); XML_SetCharacterDataHandler(context->parser, character_data); #endif rdfa_init_context(context); #ifdef LIBRDFA_IN_RAPTOR context->base_uri=raptor_new_uri_v2(context->sax2->world, (const unsigned char*)context->base); raptor_sax2_parse_start(context->sax2, context->base_uri); #endif return rval; } int rdfa_parse_chunk(rdfacontext* context, char* data, size_t wblen, int done) { // it is an error to call this before rdfa_parse_start() if(context->done) { return RDFA_PARSE_FAILED; } if(!context->preread) { // search for the tag and use the href contained therein to // set the parsing context. context->wb_preread = rdfa_init_base(context, &context->working_buffer, &context->wb_allocated, data, wblen); // contisnue looking if in first 131072 bytes of data if(!context->base && context->wb_preread < (1<<17)) return RDFA_PARSE_SUCCESS; #ifdef LIBRDFA_IN_RAPTOR if(raptor_sax2_parse_chunk(context->sax2, (const unsigned char*)context->working_buffer, context->wb_offset, done)) { return RDFA_PARSE_FAILED; } #else if(XML_Parse(context->parser, context->working_buffer, context->wb_offset, 0) == XML_STATUS_ERROR) { #ifdef WIN32 printf( #else fprintf(stderr, #endif "%s at line %d, column %d\n", XML_ErrorString(XML_GetErrorCode(context->parser)), (int)XML_GetCurrentLineNumber(context->parser), (int)XML_GetCurrentColumnNumber(context->parser)); return RDFA_PARSE_FAILED; } #endif context->preread = 1; return RDFA_PARSE_SUCCESS; } // otherwise just parse the block passed in #ifdef LIBRDFA_IN_RAPTOR if(raptor_sax2_parse_chunk(context->sax2, (const unsigned char*)data, wblen, done)) { return RDFA_PARSE_FAILED; } #else if(XML_Parse(context->parser, data, wblen, done) == XML_STATUS_ERROR) { #ifdef WIN32 printf( #else fprintf(stderr, #endif "%s at line %d, column %d.\n", XML_ErrorString(XML_GetErrorCode(context->parser)), (int)XML_GetCurrentLineNumber(context->parser), (int)XML_GetCurrentColumnNumber(context->parser)); return RDFA_PARSE_FAILED; } #endif return RDFA_PARSE_SUCCESS; } void rdfa_parse_end(rdfacontext* context) { // deinitialize context stack rdfa_pop_item(context->context_stack); // Free the expat parser and the like #ifdef LIBRDFA_IN_RAPTOR if(context->base_uri) raptor_free_uri_v2(context->sax2->world, context->base_uri); raptor_free_sax2(context->sax2); context->sax2=NULL; #else // free parser XML_ParserFree(context->parser); #endif } int rdfa_parse(rdfacontext* context) { int rval; rval = rdfa_parse_start(context); if(rval != RDFA_PARSE_SUCCESS) { context->done = 1; return rval; } do { size_t wblen; int done; wblen = context->buffer_filler_callback( context->working_buffer, context->wb_allocated, context->callback_data); done = (wblen == 0); rval = rdfa_parse_chunk( context, context->working_buffer, wblen, done); context->done=done; } while(!context->done && rval == RDFA_PARSE_SUCCESS); rdfa_parse_end(context); return rval; } raptor-1.4.21/librdfa/rdfa.h0000644000175000017500000001543211330672502012523 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * librdfa is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with librdfa. If not, see . * * The librdfa library is the Fastest RDFa Parser in the Universe. It is * a stream parser, meaning that it takes an XML data as input and spits * out RDF triples as it comes across them in the stream. Due to this * processing approach, librdfa has a very, very small memory footprint. * It is also very fast and can operate on hundreds of gigabytes of XML * data without breaking a sweat. * * Usage: * * rdfacontext* context = rdfa_create_context(base_uri); * context->callback_data = your_user_data; * rdfa_set_triple_handler(context, triple_function); * rdfa_set_buffer_filler(context, buffer_filler_function); * rdfa_parse(context); * rdfa_destroy_context(context); */ #ifndef _LIBRDFA_RDFA_H_ #define _LIBRDFA_RDFA_H_ #include // Activate the stupid Windows DLL exporting mechanism if we're building for Windows #ifdef WIN32 #define DLLEXPORT __declspec(dllexport) #else #define DLLEXPORT #endif #ifdef LIBRDFA_IN_RAPTOR #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include "raptor.h" #include "raptor_internal.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif #define DEBUG 0 #define RDFA_PARSE_WARNING -2 #define RDFA_PARSE_FAILED -1 #define RDFA_PARSE_UNKNOWN 0 #define RDFA_PARSE_SUCCESS 1 #define MAX_URI_MAPPINGS 512 #define MAX_INCOMPLETE_TRIPLES 1024 #define XMLNS_DEFAULT_MAPPING "XMLNS_DEFAULT" #define RDFA_WHITESPACE " \t\n\v\f\r" /** * An RDF resource type is used to denote the content of a triple's * object value. */ typedef enum { RDF_TYPE_NAMESPACE_PREFIX, RDF_TYPE_IRI, RDF_TYPE_PLAIN_LITERAL, RDF_TYPE_XML_LITERAL, RDF_TYPE_TYPED_LITERAL, RDF_TYPE_UNKNOWN } rdfresource_t; /** * An RDF triple is the result of an RDFa statement that contains, at * the very least, a subject, a predicate and an object. It is the * smallest, complete statement one can make in RDF. */ typedef struct rdftriple { char* subject; char* predicate; char* object; rdfresource_t object_type; char* datatype; char* language; } rdftriple; /** * The specification for a callback that is capable of handling * triples. Produces a triple that must be freed once the application * is done with the object. */ typedef void (*triple_handler_fp)(rdftriple*, void*); /** * The specification for a callback that is capable of handling * triples. */ typedef size_t (*buffer_filler_fp)(char*, size_t, void*); /** * An RDFA list item is used to hold each datum in an rdfa list. It * contains a list of flags as well as the data for the list member. */ typedef struct rdfalistitem { unsigned char flags; void* data; } rdfalistitem; /** * An RDFa list is used to store multiple text strings that have a set * of attributes associated with them. These can be lists of CURIEs, * or lists of incomplete triples. The structure grows with use, but * cannot be shrunk. */ typedef struct rdfalist { rdfalistitem** items; size_t num_items; size_t max_items; } rdfalist; /** * The RDFa Parser structure is responsible for keeping track of the state of * the current RDFa parser. Things such as the default namespace, * CURIE mappings, and other context-specific */ typedef struct rdfacontext { char* base; char* parent_subject; char* parent_object; #ifndef LIBRDFA_IN_RAPTOR char** uri_mappings; #endif rdfalist* incomplete_triples; rdfalist* local_incomplete_triples; char* language; triple_handler_fp triple_callback; buffer_filler_fp buffer_filler_callback; unsigned char recurse; unsigned char skip_element; char* new_subject; char* current_object_resource; char* content; char* datatype; rdfalist* property; char* plain_literal; size_t plain_literal_size; char* xml_literal; size_t xml_literal_size; void* callback_data; /* parse state */ size_t bnode_count; char* underscore_colon_bnode_name; unsigned char xml_literal_namespaces_defined; unsigned char xml_literal_xml_lang_defined; size_t wb_allocated; char* working_buffer; size_t wb_offset; #ifdef LIBRDFA_IN_RAPTOR /* a pointer (in every context) to the error_handlers structure * held in the raptor_parser object */ raptor_error_handlers *error_handlers; raptor_uri* base_uri; raptor_sax2* sax2; raptor_namespace_handler namespace_handler; void* namespace_handler_user_data; #else XML_Parser parser; #endif int done; rdfalist* context_stack; size_t wb_preread; int preread; } rdfacontext; /** * Creates an initial context for RDFa. * * @param base The base URI that should be used for the parser. * * @return a pointer to the base RDFa context, or NULL if memory * allocation failed. */ DLLEXPORT rdfacontext* rdfa_create_context(const char* base); /** * Sets the triple handler for the application. * * @param context the base rdfa context for the application. * @param th the triple handler function. */ DLLEXPORT void rdfa_set_triple_handler(rdfacontext* context, triple_handler_fp th); /** * Sets the buffer filler for the application. * * @param context the base rdfa context for the application. * @param bf the buffer filler function. */ DLLEXPORT void rdfa_set_buffer_filler(rdfacontext* context, buffer_filler_fp bf); /** * Starts processing given the base rdfa context. * * @param context the base rdfa context. * * @return RDFA_PARSE_SUCCESS if everything went well. RDFA_PARSE_FAILED * if there was a fatal error and RDFA_PARSE_WARNING if there * was a non-fatal error. */ DLLEXPORT int rdfa_parse(rdfacontext* context); DLLEXPORT int rdfa_parse_start(rdfacontext* context); DLLEXPORT int rdfa_parse_chunk(rdfacontext* context, char* data, size_t wblen, int done); DLLEXPORT void rdfa_parse_end(rdfacontext* context); DLLEXPORT void rdfa_init_context(rdfacontext* context); DLLEXPORT char* rdfa_iri_get_base(const char* iri); /** * Destroys the given rdfa context by freeing all memory associated * with the context. * * @param context the rdfa context. */ DLLEXPORT void rdfa_free_context(rdfacontext* context); #ifdef __cplusplus } #endif #endif raptor-1.4.21/configure.ac0000644000175000017500000011140411330672502012315 00000000000000dnl -*- Mode: autoconf -*- dnl dnl configure.in - autoconf file for Raptor dnl (Process this file with autoconf to produce a configure script.) dnl dnl Copyright (C) 2000-2009 David Beckett http://www.dajobe.org/ dnl Copyright (C) 2000-2005 University of Bristol, UK http://www.bristol.ac.uk/ dnl dnl This package is Free Software and part of Redland http://librdf.org/ dnl dnl It is licensed under the following three licenses as alternatives: dnl 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version dnl 2. GNU General Public License (GPL) V2 or any newer version dnl 3. Apache License, V2.0 or any newer version dnl dnl You may not use this file except in compliance with at least one of dnl the above three licenses. dnl dnl See LICENSE.html or LICENSE.txt at the top of this package for the dnl complete terms and further detail along with the license texts for dnl the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. dnl dnl AC_PREREQ(2.62) AC_INIT(Raptor RDF Parser, 1.4.21, http://bugs.librdf.org/, raptor) AC_CONFIG_SRCDIR(src/raptor_general.c) AC_REVISION($Revision$) AM_CONFIG_HEADER(src/raptor_config.h) AC_CONFIG_AUX_DIR(build) AC_CONFIG_MACRO_DIR(build) AM_INIT_AUTOMAKE([1.7 check-news std-options -Wall]) AM_MAINTAINER_MODE libxml_min_version=2.6.8 libxslt_min_version=1.0.18 release_version=no AC_ARG_ENABLE(release, [ --enable-release Turn on optimizations (for maintainer). ], \ if test "$enableval" = "yes"; then \ release_version=yes fi;) AM_CONDITIONAL(RELEASE_VERSION, test $release_version = yes) if test "$USE_MAINTAINER_MODE" = yes -a $release_version = no; then CFLAGS=`echo $CFLAGS | sed -e "s/-O[A-Za-z0-9]*//"` CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-O[A-Za-z0-9]*//"` CPPFLAGS=`echo $CPPFLAGS | sed -e "s/-O[A-Za-z0-9]*//"` fi RPM_RELEASE=SNAP if test "$release_version" = "yes"; then RPM_RELEASE=1 fi AC_SUBST(RPM_RELEASE) dnl Checks for programs. AC_CANONICAL_HOST AM_SANITY_CHECK AC_PROG_CC AM_PROG_CC_C_O m4_undefine([AC_PROG_CXX]) m4_defun([AC_PROG_CXX],[]) m4_undefine([AC_PROG_F77]) m4_defun([AC_PROG_F77],[]) AC_PROG_LIBTOOL AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_LEX if test "X$LEX" != "X:" ; then if echo "$LEX" | grep flex >/dev/null 2>&1; then : else LEX="$SHELL $missing_dir/missing flex" AC_SUBST(LEX_OUTPUT_ROOT, lex.yy) AC_SUBST(LEXLIB, '') fi fi if test "$USE_MAINTAINER_MODE" = yes; then FLEX_MIN_VERSION=2.5.19 FLEX_REC_VERSION=2.5.33 AC_MSG_CHECKING(flex version) if test "X$LEX" != "X:"; then FLEX_VERSION=`$LEX -V 2>&1 | awk '{print $NF}'` FLEX_VERSION_DEC=`echo $FLEX_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` FLEX_MIN_VERSION_DEC=`echo $FLEX_MIN_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` if test $FLEX_VERSION_DEC -ge $FLEX_MIN_VERSION_DEC; then AC_MSG_RESULT($FLEX_VERSION - OK) else AC_MSG_RESULT(version $FLEX_VERSION - too old) AC_MSG_WARN(Please get flex from http://flex.sourceforge.net/) AC_MSG_WARN(version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)) AC_MSG_FAILURE(flex too old) fi else AC_MSG_RESULT(not present) AC_MSG_WARN(Please get flex from http://flex.sourceforge.net/) AC_MSG_WARN(version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)) AC_MSG_FAILURE(flex not present) fi fi AC_PROG_YACC if test "$USE_MAINTAINER_MODE" = yes; then AC_MSG_CHECKING(for GNU bison) # Match these styles of versions # GNU Bison version 1.28 # bison (GNU Bison) 1.875 dnl need to change quotes to allow square brackets changequote(<<, >>)dnl YACC_VERSION=`$YACC --version 2>&1 | sed -ne 's/^.*GNU Bison[^0-9]*//p'` changequote([, ])dnl if test "X$YACC_VERSION" != X; then AC_MSG_RESULT($YACC_VERSION - OK) else AC_MSG_FAILURE($YACC is not GNU bison) fi fi # Find a tar command for 'make dist' AC_CHECK_PROGS(TAR, gnutar gtar tar) AC_CHECK_PROGS(PERL, perl) AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) dnl compiler checks AC_DEFUN([REDLAND_CC_TRY_FLAG], [ AC_MSG_CHECKING([whether $CC supports $1]) redland_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_COMPILE_IFELSE([ ], [redland_cc_flag=yes], [redland_cc_flag=no]) CFLAGS="$redland_save_CFLAGS" if test "X$redland_cc_flag" = "Xyes"; then ifelse([$2], , :, [$2]) else ifelse([$3], , :, [$3]) fi AC_MSG_RESULT($redland_cc_flag) ]) possible_warnings="-Wall -Wextra \ -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -Wredundant-decls -Wswitch-enum \ -Wsign-compare -Werror-implicit-function-declaration -Wwrite-strings -Wpacked -Wmissing-format-attribute -Wpointer-arith -Wcast-align -Winit-self \ -Wunsafe-loop-optimizations -Wdeclaration-after-statement \ -Wold-style-definition \ -Wno-missing-field-initializers -Wno-unused-parameter \ -Wformat-security" warning_cflags= if test "$USE_MAINTAINER_MODE" = yes; then AC_MSG_CHECKING(for supported $CC warning flags) AC_MSG_RESULT($warning_cflags) for warning in $possible_warnings; do REDLAND_CC_TRY_FLAG([$warning], [warning_cflags="$warning_cflags $warning"]) done AC_MSG_CHECKING($CC supports warning flags) AC_MSG_RESULT($warning_cflags) fi MAINTAINER_CPPFLAGS="$warning_cflags" dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(errno.h fcntl.h stdlib.h unistd.h string.h limits.h math.h dmalloc.h getopt.h sys/stat.h sys/param.h sys/time.h setjmp.h) AC_HEADER_TIME dnl FreeBSD fetch.h needs stdio.h and sys/param.h first AC_CHECK_HEADERS(fetch.h,,, [#include #ifdef HAVE_SYS_PARAM_H #include #endif ]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_BIGENDIAN dnl for raptor_nfc.c AC_CHECK_TYPES([u8]) AC_CHECK_TYPES([u16]) AC_CHECK_SIZEOF(unsigned char, 1) AC_CHECK_SIZEOF(unsigned short, 2) AC_CHECK_SIZEOF(unsigned int, 4) AC_CHECK_SIZEOF(unsigned long, 4) dnl need to change quotes to allow square brackets changequote(<<, >>)dnl version_major=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\1/'` version_minor=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\2/'` version_release=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\3/'` changequote([, ])dnl version_decimal=`expr $version_major \* 10000 + $version_minor \* 100 + $version_release` AC_DEFINE_UNQUOTED(RAPTOR_VERSION_MAJOR, $version_major, [Major version number]) AC_DEFINE_UNQUOTED(RAPTOR_VERSION_MINOR, $version_minor, [Minor version number]) AC_DEFINE_UNQUOTED(RAPTOR_VERSION_RELEASE, $version_release, [Release version number]) AC_DEFINE_UNQUOTED(RAPTOR_VERSION_DECIMAL, $version_decimal, [Release version as a decimal]) # for raptor-config.in RAPTOR_VERSION_DECIMAL=$version_decimal AC_SUBST(RAPTOR_VERSION_DECIMAL) # Libtool versioning # # CURRENT # The most recent interface number that this library implements. # # REVISION # The implementation number of the CURRENT interface. # # AGE # The difference between the newest and oldest interfaces that this # library implements. In other words, the library implements all the # interface numbers in the range from number `CURRENT - AGE' to # `CURRENT'. # # Rules: # 1. Start with version information of `0:0:0' for each libtool library. # # 2. Update the version information only immediately before a public # release of your software. More frequent updates are unnecessary, # and only guarantee that the current interface number gets larger # faster. # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed since the last public release, # then set AGE to 0. # # syntax: CURRENT[:REVISION[:AGE]] RAPTOR_LIBTOOL_VERSION=3:0:2 AC_SUBST(RAPTOR_LIBTOOL_VERSION) dnl Checks for library functions. AC_CHECK_FUNCS(gettimeofday getopt getopt_long stricmp strcasecmp vsnprintf isascii setjmp) AM_CONDITIONAL(STRCASECMP, test $ac_cv_func_stricmp = no -a $ac_cv_func_stricmp = no) AM_CONDITIONAL(GETOPT, test $ac_cv_func_getopt = no -a $ac_cv_func_getopt_long = no) AC_MSG_CHECKING(whether need to declare optind) AC_TRY_LINK([#ifdef HAVE_GETOPT_H #include #endif], [int x=optind;], AC_MSG_RESULT(no), AC_DEFINE(NEED_OPTIND_DECLARATION, 1, [need 'extern int optind' declaration?]) AC_MSG_RESULT(yes)) if test $ac_cv_func_vsnprintf = yes; then AC_MSG_CHECKING(vsnprintf has C99 compatible return value) AC_TRY_RUN([#include int is_c99(char *s, ...) { char buffer[32]; va_list args; int r; va_start(args, s); r = vsnprintf(buffer, 5, s, args); va_end(args); return (r == 7); } int main(int argc, char* argv) { return is_c99("1234567"); }], AC_MSG_RESULT(no), AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [vsnprint has C99 compatible return value]) AC_MSG_RESULT(yes), AC_DEFINE(CHECK_VSNPRINTF_RUNTIME, 1, [have to check C99 vsnprintf at runtime because cross compiling])) fi need_libm=no # Save LIBS oLIBS="$LIBS" RAPTOR_LDFLAGS= LIBS="$LIBS -lm" AC_MSG_CHECKING(whether have trunc in libm) AC_TRY_LINK([#ifdef HAVE_MATH_H #include #endif], [double d=trunc(1.0);], AC_MSG_RESULT(yes) need_libm=yes AC_DEFINE(HAVE_TRUNC, 1, [have trunc() in libm]), AC_MSG_RESULT(no)) AC_MSG_CHECKING(whether have round in libm) AC_TRY_LINK([#ifdef HAVE_MATH_H #include #endif], [double d=round(1.0);], AC_MSG_RESULT(yes) need_libm=yes AC_DEFINE(HAVE_ROUND, 1, [have round() in libm]), AC_MSG_RESULT(no)) LIBS="$oLIBS" AC_SYS_LARGEFILE if test "X$need_libm" = Xyes; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -lm" fi dnl Checks for XML parsers have_expat=0 have_expat_lib=0 have_expat_source=0 need_expat=0 need_expat_source=0 expat_source_dir= expat_obj_dir= AC_ARG_WITH(expat-source, [ --with-expat-source=PATH Location of expat source tree (default=auto)], expat_source="$withval", expat_source="auto") AC_MSG_CHECKING(for expat sources) if test "$expat_source" != "auto"; then have_expat_source=1 have_expat=1 expat_source_dir=$expat_source expat_obj_dir=$expat_source AC_MSG_RESULT(yes - $expat_source) elif test -d $srcdir/expat; then expat_source=local have_expat_source=1 have_expat=1 expat_source_dir="\$(top_srcdir)/expat" expat_obj_dir="\$(top_builddir)/expat" AC_MSG_RESULT(yes - local source) else expat_source= AC_MSG_RESULT(no) fi if test "X$expat_source" = X; then expat_source=auto else if test -d "$expat_source_dir/xmlparse"; then # old expat CPPFLAGS="-I$expat_source_dir/xmlparse $CPPFLAGS" else # new expat CPPFLAGS="-I$expat_source_dir/lib $CPPFLAGS" fi fi AC_CHECK_HEADERS(expat.h xmlparse.h) AC_CHECK_LIB(xmltok, main, xmlt=1, xmlt=0) # Raptor needs XML_ParserCreate expat function (not namespace one) AC_CHECK_LIB(xmlparse, XML_ParserCreate, xmlp=1, xmlp=0, -lxmltok) LIBS="$oLIBS" AC_CHECK_LIB(expat, XML_ParserCreate, libexpat=1, libexpat=0) LIBS="$oLIBS" AC_MSG_CHECKING(for working expat in libxmlparse and libxmltok) if test $xmlp = 1 -a $xmlt = 1 -a $ac_cv_header_xmlparse_h = yes; then LIBS="$LIBS -lxmlparse -lxmltok" AC_TRY_RUN([#include main() {XML_ParserCreate(NULL); return(0);}], worked=yes, worked=no, worked=no) if test $worked = yes; then # Old expat have_expat_lib=1 have_expat=1 expat_libs="-lxmlparse -lxmltok" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi LIBS="$oLIBS" AC_MSG_CHECKING(for working expat in libexpat) if test $libexpat = 1 -a $ac_cv_header_expat_h = yes ; then LIBS="$LIBS -lexpat" AC_TRY_RUN([#include main() {XML_ParserCreate(NULL); return(0);}], worked=yes, worked=no, worked=no) if test $worked = yes; then # New expat - expat-1.95.0 or later have_expat_lib=1 have_expat=1 expat_libs="-lexpat" AC_MSG_RESULT(yes) AC_MSG_CHECKING(for expat support of UTF-8 BOM) AC_TRY_RUN([ #include #include #include #ifdef HAVE_EXPAT_H #include #else #ifdef HAVE_XMLPARSE_H #include #endif #endif int main(int argc, char **argv) { const char *xml_buffer= /* UTF-8 BOM */ "\xef\xbb\xbf"; XML_Parser xp=XML_ParserCreate(NULL); int len=strlen(xml_buffer); /* This might cause an error on expat 1.95.1 */ int rc=XML_Parse(xp, xml_buffer, len, 1); /* if expat gives an error ... */ if(!rc) { /* then the next line will crash in normal_updatePosition */ int line=XML_GetCurrentLineNumber(xp); } XML_ParserFree(xp); return 0; } ], AC_MSG_RESULT(yes), AC_DEFINE(EXPAT_UTF8_BOM_CRASH, 1, [does expat crash when it sees an initial UTF8 BOM?]) AC_MSG_RESULT(no) AC_MSG_WARN(The available expat crashes on XML UTF-8 BOM in documents) AC_MSG_WARN(Fix either by using libxml or expat 1.95.2+)) else AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi LIBS="$oLIBS" AC_ARG_WITH(xml2-config, [ --with-xml2-config=PATH Location of libxml xml2-config []], xml2_config="$withval", xml2_config="") if test "X$xml2_config" != "X" ; then AC_MSG_CHECKING(for $xml2_config) if test -f $xml2_config ; then XML_CONFIG=$xml2_config AC_MSG_RESULT(yes) else AC_MSG_RESULT(no - searching PATH) fi fi if test "X$XML_CONFIG" = "X"; then AC_CHECK_PROGS(XML_CONFIG, xml2-config) fi AC_ARG_WITH(xslt-config, [ --with-xslt-config=PATH Location of libxslt xslt-config []], xslt_config="$withval", xslt_config="") if test "X$xslt_config" != "X" ; then AC_MSG_CHECKING(for $xslt_config) if test -f $xslt_config ; then XSLT_CONFIG=$xslt_config AC_MSG_RESULT(yes) else AC_MSG_RESULT(no - searching PATH) fi fi if test "X$XSLT_CONFIG" = "X"; then AC_CHECK_PROGS(XSLT_CONFIG, xslt-config) fi AC_ARG_WITH(curl-config, [ --with-curl-config=PATH Location of libcurl curl-config []], curl_config="$withval", curl_config="") if test "X$curl_config" != "X" ; then AC_MSG_CHECKING(for $curl_config) if test -f $curl_config ; then CURL_CONFIG=$curl_config AC_MSG_RESULT(yes) else AC_MSG_RESULT(no - searching PATH) fi fi if test "X$CURL_CONFIG" = "X"; then AC_CHECK_PROGS(CURL_CONFIG, curl-config) fi AC_ARG_ENABLE(nfc-check, [ --disable-nfc-check Turn off Unicode NFC checking (default enabled). ], nfc_check="no", nfc_check="yes") AC_MSG_CHECKING(using Unicode NFC checking) AC_MSG_RESULT($nfc_check); AC_ARG_WITH(www-config, [ --with-libwww-config=PATH Location of W3C libwww libwww-config []], libwww_config="$withval", libwww_config="") if test "X$libwww_config" != "X" ; then AC_MSG_WARN(libwww is no longer supported) fi have_libxml=0 have_libxml_lib=0 have_libxml_source=0 need_libxml=0 need_libxml_source=0 AC_MSG_CHECKING(for libxml sources) if test -d $srcdir/libxml -a -r $srcdir/libxml/libxml.spec ; then have_libxml_source=1 AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi oCPPFLAGS="$CPPFLAGS" if test "X$XML_CONFIG" != X; then LIBS="$LIBS `$XML_CONFIG --libs`" AC_CHECK_FUNC(xmlCreatePushParserCtxt, have_xmlCreatePushParserCtxt=yes, have_xmlCreatePushParserCtxt=no) AC_MSG_CHECKING(for system (GNOME) libxml library) if test $have_xmlCreatePushParserCtxt = yes; then have_libxml_lib=1 have_libxml=1 CPPFLAGS="`$XML_CONFIG --cflags` $CPPFLAGS" LIBXML_VERSION=`$XML_CONFIG --version` libxml_version_dec=`echo $LIBXML_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libxml_min_version_dec=`echo $libxml_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` AC_MSG_RESULT(yes - version $LIBXML_VERSION) if test $libxml_version_dec -lt $libxml_min_version_dec; then AC_MSG_WARN(Using libxml $LIBXML_VERSION is unsupported - $libxml_min_version or newer required.) have_libxml_lib=0 have_libxml=0 fi else AC_MSG_RESULT(no) fi AC_CHECK_HEADERS(libxml/nanohttp.h) AC_CHECK_HEADERS(libxml/parser.h) AC_CHECK_HEADERS(libxml/hash.h libxml/SAX2.h,,, [#ifdef HAVE_LIBXML_PARSER_H #include #endif ]) if test "$ac_cv_header_libxml_parser_h" = no -a "$ac_cv_header_gnome_xml_parser_h" = no; then AC_MSG_WARN(libxml library found but not headers - disabling) have_libxml_lib=0 have_libxml=0 else AC_MSG_CHECKING(if libxml xmlEntity has name_length field) AC_TRY_LINK([ #ifdef HAVE_LIBXML_PARSER_H #include #endif ], [xmlEntity foo; foo.name_length=0], AC_MSG_RESULT(yes) AC_DEFINE(RAPTOR_LIBXML_ENTITY_NAME_LENGTH,1,[does libxml struct xmlEntity have a field name_length]), AC_MSG_RESULT(no)) AC_MSG_CHECKING(if libxml xmlEntity has etype field) AC_TRY_LINK([ #ifdef HAVE_LIBXML_PARSER_H #include #endif ], [xmlEntity foo; foo.etype=0], AC_MSG_RESULT(yes) AC_DEFINE(RAPTOR_LIBXML_ENTITY_ETYPE, 1, [does libxml struct xmlEntity have a field etype]), AC_MSG_RESULT(no)) AC_MSG_CHECKING(if libxml xmlSAXHandler has initialized field) AC_TRY_LINK([ #ifdef HAVE_LIBXML_PARSER_H #include #endif ], [xmlSAXHandler foo; foo.initialized=0], AC_MSG_RESULT(yes) AC_DEFINE(RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED, 1, [does libxml xmlSAXHandler have initialized field]), AC_MSG_RESULT(no)) AC_MSG_CHECKING(if libxml xmlSAXHandler has externalSubset field) AC_TRY_LINK([ #ifdef HAVE_LIBXML_PARSER_H #include #endif ], [xmlSAXHandler foo; foo.externalSubset=NULL], AC_MSG_RESULT(yes) AC_DEFINE(RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET, 1, [does libxml xmlSAXHandler have externalSubset field]), AC_MSG_RESULT(no)) AC_CHECK_FUNCS(xmlSAX2InternalSubset xmlCtxtUseOptions) AC_MSG_CHECKING(if libxml has parser option XML_PARSE_NONET) AC_TRY_LINK([ #ifdef HAVE_LIBXML_PARSER_H #include #endif ], [xmlParserOption foo; foo = XML_PARSE_NONET], AC_MSG_RESULT(yes) AC_DEFINE(RAPTOR_LIBXML_XML_PARSE_NONET, 1, [does libxml have XML_PARSE_NONET]), AC_MSG_RESULT(no)) AC_CHECK_HEADERS(libxml/HTMLparser.h) AC_MSG_CHECKING(if libxml has parser option HTML_PARSE_NONET) AC_TRY_LINK([ #ifdef HAVE_LIBXML_HTMLPARSER_H #include #endif ], [htmlParserOption foo; foo = HTML_PARSE_NONET], AC_MSG_RESULT(yes) AC_DEFINE(RAPTOR_LIBXML_HTML_PARSE_NONET, 1, [does libxml have HTML_PARSE_NONET]), AC_MSG_RESULT(no)) fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" have_libxslt=0 oCPPFLAGS="$CPPFLAGS" if test "X$XSLT_CONFIG" != X; then LIBS="$LIBS `$XSLT_CONFIG --libs`" AC_CHECK_FUNC(xsltSaveResultToString, have_xsltSaveResultToString=yes, have_xsltSaveResultToString=no) AC_MSG_CHECKING(for system libxslt library) if test $have_xsltSaveResultToString = yes; then have_libxslt=1 CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS" LIBXSLT_VERSION=`$XSLT_CONFIG --version` libxslt_version_dec=`echo $LIBXSLT_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libxslt_min_version_dec=`echo $libxslt_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` AC_MSG_RESULT(yes - version $LIBXSLT_VERSION) if test $libxslt_version_dec -lt $libxslt_min_version_dec; then AC_MSG_WARN(Using libxslt $LIBXSLT_VERSION is unsupported - $libxslt_min_version or newer required.) have_libxslt=0 fi else AC_MSG_RESULT(no) fi AC_CHECK_FUNC(xsltInit) AC_CHECK_HEADERS(libxslt/xslt.h) if test "$ac_cv_header_libxslt_xslt_h" = no ; then AC_MSG_WARN(libxslt library found but not headers - disabling) have_libxslt_lib=0 have_libxslt=0 fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" AC_ARG_WITH(xml-parser, [ --with-xml-parser=NAME Use XML parser - libxml (default), expat], xml_parser="$withval", xml_parser="libxml") for xml_parser_name in $xml_parser libxml expat; do case $xml_parser_name in expat) if test "$expat_source" != "auto"; then need_expat=1 need_expat_source=1 elif test $have_expat_lib = 1; then need_expat=1 elif test $have_expat_source = 1; then need_expat=1 need_expat_source=1 fi if test $need_expat = 1; then AC_DEFINE(RAPTOR_XML_EXPAT, 1, [Use expat XML parser]) break fi ;; libxml) if test $have_libxml_lib = 1; then need_libxml=1 elif test $have_libxml_source = 1; then need_libxml=1 need_libxml_source=1 fi if test $need_libxml = 1; then AC_DEFINE(RAPTOR_XML_LIBXML, 1, [Use libxml XML parser]) break fi ;; *) AC_MSG_ERROR(No such XML parser $xml_parser_name) ;; esac done AM_CONDITIONAL(RAPTOR_XML_EXPAT, test $need_expat = 1) AM_CONDITIONAL(RAPTOR_XML_LIBXML, test $need_libxml = 1) AC_MSG_CHECKING(XML parser to use) result= if test $need_libxml = 1; then if test $need_libxml_source = 1; then result="$result libxml(source)" else result="$result libxml(system)" fi elif test $need_expat = 1; then if test $need_expat_source = 1; then result="$result expat(source in $expat_source_dir)" else result="$result expat(system)" fi else AC_MSG_ERROR(No XML parser available - please install expat or libxml) fi AC_MSG_RESULT($result) dnl RDF Parsers rdfxml_parser=no ntriples_parser=no turtle_parser=no trig_parser=no n3_parser=no rss_parser=no grddl_parser=no guess_parser=yes rdfa_parser=yes rdf_parsers_available="rdfxml ntriples turtle trig guess rss-tag-soup rdfa" if test "$USE_MAINTAINER_MODE" = yes; then rdf_parsers_available="$rdf_parsers_available n3" fi rdf_parsers_enabled= grddl_parser_ok=no AC_MSG_CHECKING(GRDDL parser requirements) if test $need_libxml = 1 -a $have_libxslt = 1; then AC_MSG_RESULT(yes) grddl_parser_ok=yes rdf_parsers_available="$rdf_parsers_available grddl" else AC_MSG_RESULT(no - libxml2 and libxslt are both not available) fi # This is needed because autoheader can't work out which computed # symbols must be pulled from acconfig.h into config.h.in if test "x" = "y"; then AC_DEFINE(RAPTOR_PARSER_RDFXML, 1, [Building RDF/XML parser]) AC_DEFINE(RAPTOR_PARSER_NTRIPLES, 1, [Building N-Triples parser]) AC_DEFINE(RAPTOR_PARSER_TURTLE, 1, [Building Turtle parser]) AC_DEFINE(RAPTOR_PARSER_TRIG, 1, [Building TRiG parser]) AC_DEFINE(RAPTOR_PARSER_N3, 1, [Building Notation 3 parser]) AC_DEFINE(RAPTOR_PARSER_RSS, 1, [Building RSS Tag Soup parser]) AC_DEFINE(RAPTOR_PARSER_GRDDL, 1, [Building GRDDL parser]) AC_DEFINE(RAPTOR_PARSER_GUESS, 1, [Building guess parser]) AC_DEFINE(RAPTOR_PARSER_RDFA, 1, [Building RDFA parser]) fi AC_MSG_CHECKING(RDF parsers required) AC_ARG_ENABLE(parsers, [ --enable-parsers=LIST Use RDF parsers (default=all)], parsers="$enableval") if test "X$parsers" = Xall -o "X$parsers" = X; then parsers="$rdf_parsers_available" AC_MSG_RESULT(all) elif test "X$parsers" = Xnone; then parsers= AC_MSG_RESULT(none) else AC_MSG_RESULT($parsers) fi for parser in $parsers; do p=$parser if test $p = rss-tag-soup; then p=rss fi if test $p = grddl; then if test $grddl_parser_ok != yes; then AC_MSG_WARN(GRDDL parser is not available) continue fi fi eval $p'_parser=yes' NAME=`echo $p | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` n=RAPTOR_PARSER_${NAME} AC_DEFINE_UNQUOTED($n) rdf_parsers_enabled="$rdf_parsers_enabled $parser" done nfc_needed=no if test $rdfxml_parser = yes; then nfc_needed=yes fi need_libxslt=0 if test $grddl_parser = yes; then need_libxslt=1 fi need_librdfa=no if test $rdfa_parser = yes; then need_librdfa=yes fi AM_CONDITIONAL(RAPTOR_PARSER_RDFXML, test $rdfxml_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_NTRIPLES, test $ntriples_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_TURTLE, test $turtle_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_TRIG, test $trig_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_N3, test $n3_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_RSS, test $rss_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_GRDDL, test $grddl_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_GUESS, test $guess_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_RDFA, test $rdfa_parser = yes) AM_CONDITIONAL(LIBRDFA, test $need_librdfa = yes) dnl RDF Serializers rdfxml_serializer=no ntriples_serializer=no rdfxml_abbrev_serializer=no turtle_serializer=no rss_1_0_serializer=no atom_serializer=no dot_serializer=no json_serializer=no rdf_serializers_available="rdfxml rdfxml-abbrev turtle ntriples rss-1.0 dot json atom" # This is needed because autoheader can't work out which computed # symbols must be pulled from acconfig.h into config.h.in if test "x" = "y"; then AC_DEFINE(RAPTOR_SERIALIZER_RDFXML, 1, [Building RDF/XML serializer]) AC_DEFINE(RAPTOR_SERIALIZER_NTRIPLES, 1, [Building N-Triples serializer]) AC_DEFINE(RAPTOR_SERIALIZER_RDFXML_ABBREV, 1, [Building RDF/XML-abbreviated serializer]) AC_DEFINE(RAPTOR_SERIALIZER_TURTLE, 1, [Building Turtle serializer]) AC_DEFINE(RAPTOR_SERIALIZER_RSS_1_0, 1, [Building RSS 1.0 serializer]) AC_DEFINE(RAPTOR_SERIALIZER_ATOM, 1, [Building Atom 1.0 serializer]) AC_DEFINE(RAPTOR_SERIALIZER_DOT, 1, [Building GraphViz DOT serializer]) AC_DEFINE(RAPTOR_SERIALIZER_JSON, 1, [Building JSON serializer]) fi AC_MSG_CHECKING(RDF serializers required) AC_ARG_ENABLE(serializers, [ --enable-serializers=LIST Use RDF serializers (default=all)], serializers="$enableval") if test "X$serializers" = Xall -o "X$serializers" = X; then serializers="$rdf_serializers_available" AC_MSG_RESULT(all) elif test "X$serializers" = Xnone; then serializers= AC_MSG_RESULT(none) else AC_MSG_RESULT($serializers) fi for serializer in $serializers; do s=`echo $serializer | tr '.-' '__'` eval $s'_serializer=yes' NAME=`echo $s | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` n=RAPTOR_SERIALIZER_${NAME} AC_DEFINE_UNQUOTED($n) rdf_serializers_enabled="$rdf_serializers_enabled $serializer" done AM_CONDITIONAL(RAPTOR_SERIALIZER_RDFXML, test $rdfxml_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_NTRIPLES, test $ntriples_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_RDFXML_ABBREV, test $rdfxml_abbrev_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_TURTLE, test $turtle_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_RSS_1_0, test $rss_1_0_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_DOT, test $dot_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_JSON, test $json_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_ATOM, test $atom_serializer = yes) AM_CONDITIONAL(RAPTOR_RSS_COMMON, test $rss_1_0_serializer = yes -o $rss_parser = yes) dnl Enable NFC code only if needed and the check is enabled if test $nfc_needed = yes; then if test $nfc_check != yes; then nfc_needed=no else AC_DEFINE([RAPTOR_NFC_CHECK], 1, [Provide a Unicode NFC check]) fi fi AM_CONDITIONAL(RAPTOR_NFC_CHECK, test $nfc_needed = yes) AC_MSG_CHECKING(XML names version) AC_ARG_WITH(xml-names, [ --with-xml-names=1.1|1.0 Select XML version name checking (default=1.0)], xml_names="$withval", xml_names="1.0") if test $xml_names = 1.1; then AC_DEFINE(RAPTOR_XML_1_1, 1, [Check XML 1.1 Names]) fi AC_MSG_RESULT($xml_names) have_libcurl=0 have_libfetch=0 need_libcurl=0 need_libxml_www=0 need_libfetch=0 oCPPFLAGS="$CPPFLAGS" if test "X$CURL_CONFIG" != X; then CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`" LIBS="$LIBS `$CURL_CONFIG --libs`" AC_CHECK_HEADER(curl/curl.h) AC_CHECK_FUNC(curl_easy_init, have_curl_easy_init=yes, have_curl_easy_init=no) LIBS="$oLIBS" CPPFLAGS="$oCPPFLAGS" AC_MSG_CHECKING(for libcurl library) if test $have_curl_easy_init = yes -a "$ac_cv_header_curl_curl_h" = yes; then have_libcurl=1 LIBCURL_VERSION=`$CURL_CONFIG --version | sed -e 's/^libcurl *//'` AC_MSG_RESULT(yes - version $LIBCURL_VERSION) else AC_MSG_RESULT(no) fi fi if test "X$ac_cv_header_curl_curl_h" = Xyes; then AC_DEFINE([HAVE_CURL_CURL_H], 1, [Have curl/curl.h]) fi if test $ac_cv_header_fetch_h = yes; then AC_CHECK_LIB(fetch, fetchXGetURL, have_libfetch=1) LIBS="$oLIBS" fi AC_ARG_WITH(www, [ --with-www=NAME Use WWW library - curl (default), xml, libfetch, none], www="$withval", www="curl") for www_name in $www curl xml libfetch none; do case $www_name in curl) if test $have_libcurl = 1; then need_libcurl=1 AC_DEFINE([RAPTOR_WWW_LIBCURL], 1, [Have libcurl WWW library]) break fi ;; xml) if test $have_libxml = 1; then need_libxml=1 need_libxml_www=1 AC_DEFINE([RAPTOR_WWW_LIBXML], 1, [Have libxml available as a WWW library]) break fi ;; libfetch) if test $have_libfetch = 1; then need_libfetch=1 AC_DEFINE([RAPTOR_WWW_LIBFETCH], 1, [Have libfetch WWW library]) break fi ;; none) need_libcurl=0 need_libxml_www=0 AC_DEFINE([RAPTOR_WWW_NONE], 1, [No WWW library]) break ;; *) AC_MSG_ERROR(No such WWW library $www_name) ;; esac done AC_MSG_CHECKING(WWW libraries available) www_libraries_available= if test $have_libcurl = 1; then www_libraries_available="$www_libraries_available libcurl $LIBCURL_VERSION" fi if test $have_libxml = 1; then if test $need_libxml_source = 1; then www_libraries_available="$www_libraries_available libxml(source)" else www_libraries_available="$www_libraries_available libxml(system $LIBXML_VERSION)" fi fi if test $have_libfetch = 1; then www_libraries_available="$www_libraries_available libfetch" fi AC_MSG_RESULT($www_libraries_available) AC_MSG_CHECKING(WWW library to use) www_library= RAPTOR_WWW_LIBRARY=none if test $need_libcurl = 1; then www_library="libcurl $LIBCURL_VERSION" RAPTOR_WWW_LIBRARY=libcurl elif test $need_libxml_www = 1; then if test $need_libxml_source = 1; then www_library="libxml(source)" else www_library="libxml(system $LIBXML_VERSION)" fi RAPTOR_WWW_LIBRARY=libxml elif test $need_libfetch = 1; then www_library="libfetch" RAPTOR_WWW_LIBRARY=libfetch else www_library=none fi AC_MSG_RESULT($www_library) if test "X$www_library" = Xnone; then AC_MSG_WARN([No WWW library in use - only file: URLs will work]) AC_MSG_WARN([Install libcurl, libxml2 or BSD libfetch for WWW access]) fi if test $need_libcurl = 1; then CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$CURL_CONFIG --libs`" AC_LIBOBJ(raptor_www_curl) fi have_lininn=no have_inn_parsedate=no oCPPFLAGS="$CPPFLAGS" if test -d /usr/include/inn; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" fi AC_CHECK_HEADER(libinn.h) CPPFLAGS="$oCPPFLAGS" oCPPFLAGS="$CPPFLAGS" if test $ac_cv_header_libinn_h = yes; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" LIBS="$LIBS -L/usr/lib/news -linn" AC_CHECK_LIB(inn, HashMessageID, have_libinn=yes) AC_MSG_CHECKING(parsedate in libinn) AC_TRY_LINK([ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include ], [ parsedate("Sun Jun 12 00:04:09 BST 2005", NULL) ], AC_DEFINE(HAVE_INN_PARSEDATE, 1, [INN parsedate function present]) have_inn_parsedate=yes AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" AC_MSG_CHECKING(date parsing source) raptor_parsedate_needed=no if test $have_inn_parsedate = yes; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -L/usr/lib/news -linn" AC_MSG_RESULT(INN parsedate) else if test $need_libcurl = 1; then AC_MSG_RESULT(libcurl curl_getdate) else raptor_parsedate_needed=yes AC_MSG_RESULT(raptor parsedate) fi fi AM_CONDITIONAL(PARSEDATE, test $raptor_parsedate_needed = yes) if test $raptor_parsedate_needed = yes; then AC_DEFINE([HAVE_RAPTOR_PARSE_DATE], 1, [Raptor raptor_parse_date available]) fi if test $need_libfetch = 1; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -lfetch" AC_LIBOBJ(raptor_www_libfetch) fi RAPTOR_XML_PARSER=none if test $need_libxml = 1; then if test $need_libxml_www = 1; then AC_LIBOBJ(raptor_www_libxml) fi if test $need_libxml_source = 1; then SD="$SD libxml" (cd libxml && ./configure --cache=../config.cache --enable-shared=no) CPPFLAGS="-I$srcdir/libxml $CPPFLAGS" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -Llibxml -llibxml" else RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$XML_CONFIG --libs`" CPPFLAGS="`$XML_CONFIG --cflags` $CPPFLAGS" fi RAPTOR_XML_PARSER=libxml fi if test $need_expat = 1; then if test $need_expat_source = 1; then # Only build local copy if it is needed if test "X$expat_source" = local; then SD="$SD expat" fi if test -d "$expat_source_dir/xmlparse"; then # old expat RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $expat_obj_dir/xmlparse/xmlparse.o $expat_obj_dir/xmlparse/hashtable.o $expat_obj_dir/xmltok/xmlrole.o $expat_obj_dir/xmltok/xmltok.o" else # new expat RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $expat_obj_dir/lib/xmlparse.o $expat_obj_dir/lib/xmlrole.o $expat_obj_dir/lib/xmltok.o" fi else RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $expat_libs" fi RAPTOR_XML_PARSER=expat fi if test $need_libxslt = 1; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$XSLT_CONFIG --libs`" CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS" fi RAPTOR_LIBTOOLLIBS=libraptor.la AC_SUBST(RAPTOR_LIBTOOLLIBS) xml_parsers_available= if test $need_libxml = 1; then if test $need_libxml_source = 1; then xml_parsers_available="$xml_parsers_available libxml(source)" else xml_parsers_available="$xml_parsers_available libxml(system $LIBXML_VERSION)" fi fi if test $need_expat = 1; then if test $need_expat_source = 1; then xml_parsers_available="$xml_parsers_available expat(source in $expat_source_dir)" else if test $libexpat = 1; then xml_parsers_available="$xml_parsers_available expat(system libexpat)" else xml_parsers_available="$xml_parsers_available expat(system libxmlparse,libxmltok)" fi fi fi # Restore LIBS LIBS="$oLIBS" # Make final changes to cflags MEM= MEM_LIBS= CPPFLAGS="-DRAPTOR_INTERNAL=1 -DRAPTOR_V2_EXPERIMENTAL=1 $CPPFLAGS" AC_ARG_WITH(dmalloc, [ --with-dmalloc Use dmalloc debugging library (default=no)], use_dmalloc="$withval", use_dmalloc="no") AC_MSG_CHECKING(using dmalloc library) if test "$USE_MAINTAINER_MODE" = yes; then if test "$ac_cv_header_dmalloc_h" = yes; then if test "X$use_dmalloc" = Xauto; then use_dmalloc=yes fi else use_dmalloc=no fi else use_dmalloc=no fi AC_MSG_RESULT($use_dmalloc); if test $use_dmalloc = yes; then MEM=-DRAPTOR_MEMORY_DEBUG_DMALLOC=1 MEM_LIBS=-ldmalloc fi AC_ARG_WITH(memory-signing, [ --with-memory-signing Sign allocated memory (default=no)], use_memory_signing="$withval", use_memory_signing="no") AC_MSG_CHECKING(using memory signing) AC_MSG_RESULT($use_memory_signing); if test $use_memory_signing = yes; then MEM=-DRAPTOR_MEMORY_SIGN=1 MEM_LIBS= fi debug_messages=no if test "$USE_MAINTAINER_MODE" = yes; then debug_messages=yes fi AC_ARG_ENABLE(debug, [ --enable-debug Enable debug messages (default no). ], debug_messages=$enableval) if test "$debug_messages" = "yes"; then CPPFLAGS="-g -DRAPTOR_DEBUG=1 $CPPFLAGS" fi if test "$USE_MAINTAINER_MODE" = yes; then CPPFLAGS="$MAINTAINER_CPPFLAGS $CPPFLAGS" fi AC_SUBST(RAPTOR_LDFLAGS) AC_SUBST(MEM) AC_SUBST(MEM_LIBS) AC_SUBST(ECHO) ECHO_N="$ECHO_N" ECHO_C="$ECHO_C" AC_SUBST(ECHO_N) AC_SUBST(ECHO_C) # Features # lists RAPTOR_PARSERS=$rdf_parsers_enabled AC_SUBST(RAPTOR_PARSERS) RAPTOR_SERIALIZERS=$rdf_serializers_enabled AC_SUBST(RAPTOR_SERIALIZERS) # single values or none AC_SUBST(RAPTOR_WWW_LIBRARY) AC_SUBST(RAPTOR_XML_PARSER) abs_top_srcdir=`cd $srcdir; pwd` AC_SUBST(abs_top_srcdir) abs_top_builddir=`pwd` AC_SUBST(abs_top_builddir) dnl automake 1.11 AM_SILENT_RULES([no]) AC_CONFIG_FILES([Makefile raptor.spec raptor.rdf data/Makefile docs/Makefile docs/version.xml examples/Makefile src/Makefile tests/Makefile tests/feeds/Makefile tests/grddl/Makefile tests/ntriples/Makefile tests/rdfa/Makefile tests/rdfxml/Makefile tests/turtle/Makefile tests/trig/Makefile utils/Makefile win32/Makefile librdfa/Makefile raptor.pc]) AC_CONFIG_FILES([src/raptor-config], [chmod +x src/raptor-config]) AC_CONFIG_FILES([raptor-src-config], [chmod +x raptor-src-config]) dnl Check for gtk-doc and docbook GTK_DOC_CHECK([1.3]) AC_OUTPUT AC_MSG_RESULT([ Raptor build summary: RDF parsers available : $rdf_parsers_available RDF parsers enabled :$rdf_parsers_enabled RDF serializers available : $rdf_serializers_available RDF serializers enabled :$rdf_serializers_enabled XML parser :$xml_parsers_available WWW library : $www_library ]) raptor-1.4.21/LICENSE.html0000644000175000017500000000664711330744113012011 00000000000000 Raptor RDF Parser Library - License

Raptor RDF Parser Library - License

This package is Free Software available under any one of the specified licenses below. All the licenses below are alternatives and if you select one license, that one alone applies.

1. The GNU Lesser General Public License (LGPL) Version 2.1

See http://www.gnu.org/copyleft/lesser.html or COPYING.LIB for the full license text.


Copyright (C) 2000-2010 David Beckett
Copyright (C) 2000-2005 University of Bristol. All Rights Reserved.

This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License Version 2.1 as published by the Free Software Foundation or any newer version.

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License Version 2.1 for more details.

You should have received a copy of the GNU Lesser General Public License Version 2.1 along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


NOTE - under Term 3 of the LGPL Version 2.1, you may choose to license the entire package under the GPL. If that option is chosen, then this package is licensed under the terms of the GPL Version 2 or alternatively, any newer version of the GPL. See COPYING for the full GPL license text.

2. The Apache License V2.0

See LICENSE-2.0.txt for the full license text.

Copyright (C) 2000-2010 David Beckett
Copyright (C) 2000-2005 University of Bristol.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The NOTICE file contains the notices that must be applied according to section 4(d) of the Apache License, Version 2.0.


Copyright (C) 2000-2010 David Beckett
Copyright (C) 2000-2005 University of Bristol

raptor-1.4.21/raptor-src-config.in0000644000175000017500000000331311227654652013730 00000000000000#!/bin/sh # # Copyright (C) 2002-2006 David Beckett http://www.dajobe.org/ # Copyright (C) 2002-2005 University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # # usage() { cat<&2 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --version) echo @VERSION@ exit 0 ;; --cflags) echo_cflags=yes ;; --libs) echo_libs=yes ;; --help|usage) usage 0 ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_cflags" = "yes"; then echo -I@abs_top_srcdir@/src fi if test "$echo_libs" = "yes"; then echo '-L@abs_top_builddir@/src/.libs -lraptor @LDFLAGS@ @LIBS@' fi raptor-1.4.21/autogen.sh0000755000175000017500000002161611330424611012031 00000000000000#!/bin/sh # # autogen.sh - Generates initial makefiles from a pristine CVS tree # # USAGE: # autogen.sh [configure options] # # Configuration is affected by environment variables as follows: # # DRYRUN # If set to any value it will do no configuring but will emit the # programs that would be run. # e.g. DRYRUN=1 ./autogen.sh # # AUTOMAKE ACLOCAL AUTOCONF AUTOHEADER LIBTOOLIZE GTKDOCIZE # If set (named after program) then this overrides any searching for # the programs on the current PATH. # e.g. AUTOMAKE=automake-1.7 ACLOCAL=aclocal-1.7 ./autogen.sh # # CONFIG_DIR (default ../config) # The directory where fresh GNU config.guess and config.sub can be # found for automatic copying in-place. # # PATH # Where the programs are searched for # # SRCDIR (default .) # Source directory # # This script is based on similar scripts used in various tools # commonly made available via CVS and used with GNU automake. # Try 'locate autogen.sh' on your system and see what you get. # # This script is in the public domain # # Directory for the sources SRCDIR=${SRCDIR-.} # Where the GNU config.sub, config.guess might be found CONFIG_DIR=${CONFIG_DIR-../config} # The programs required for configuring which will be searched for # in the current PATH. # Set an envariable of the same name in uppercase, to override scan # programs="automake aclocal autoconf autoheader libtoolize" confs=`find . -name configure.ac -print | grep -v /releases/` gtkdoc_args= if grep "^GTK_DOC_CHECK" $confs >/dev/null; then programs="$programs gtkdocize" gtkdoc_args="--enable-gtk-doc" fi if grep "^AC_CHECK_PROGS.SWIG" $confs >/dev/null; then programs="$programs swig" fi ltdl_args= if grep "^AC_LIBLTDL_" $confs >/dev/null; then ltdl_args="--ltdl" fi silent_args= if grep "^AM_SILENT_RULES" $confs >/dev/null; then silent_args="--enable-silent-rules" fi # Some dependencies for autotools: # automake 1.11 requires autoconf 2.62 (needed for AM_SILENT_RULES) automake_min_vers=011100 aclocal_min_vers=$automake_min_vers autoconf_min_vers=026200 autoheader_min_vers=$autoconf_min_vers libtoolize_min_vers=020200 gtkdocize_min_vers=010300 swig_min_vers=010324 # Default program arguments automake_args="--gnu --add-missing --force --copy -Wall" aclocal_args= autoconf_args= libtoolize_args="--force --copy --automake $ltdl_args" gtkdocize_args="--copy" # --enable-gtk-doc does no harm if it's not available configure_args="--enable-maintainer-mode $gtkdoc_args $silent_args" # You should not need to edit below here ###################################################################### # number comparisons may need a C locale LANG=C LC_NUMERIC=C program=`basename $0` if test "X$DRYRUN" != X; then DRYRUN=echo fi cat > autogen-get-version.pl <&1 |") || next; while() { chomp; next if @vnums; # drain pipe if we got a vnums next unless /^\$mname/i; my(\$v)=/(\S+)\$/i; \$v =~ s/-.*\$//; @vnums=grep { defined \$_ && !/^\s*\$/} map { s/\D//g; \$_; } split(/\./, \$v); } close(PIPE); last if @vnums; } @vnums=(@vnums, 0, 0, 0)[0..2]; \$vn=join('', map { sprintf('%02d', \$_) } @vnums); print "\$vn\n"; exit 0; EOF autogen_get_version="`pwd`/autogen-get-version.pl" trap "rm -f $autogen_get_version" 0 1 9 15 update_prog_version() { dir=$1 prog=$2 # If there exists an envariable PROG in uppercase, use that and do not scan ucprog=`echo $prog | tr 'a-z' 'A-Z' ` eval env=\$${ucprog} if test X$env != X; then prog_name=$env prog_vers=`perl $autogen_get_version $prog_name $prog` if test X$prog_vers = X; then prog_vers=0 fi eval ${prog}_name=${prog_name} eval ${prog}_vers=${prog_vers} eval ${prog}_dir=environment return fi eval prog_name=\$${prog}_name eval prog_vers=\$${prog}_vers eval prog_dir=\$${prog}_dir if test X$prog_vers = X; then prog_vers=0 fi save_PATH="$PATH" cd "$dir" PATH=".:$PATH" nameglob="$prog*" if [ -x /usr/bin/uname ]; then if [ `/usr/bin/uname` = 'Darwin' -a $prog = 'libtoolize' ] ; then nameglob="g$nameglob" fi fi names=`ls $nameglob 2>/dev/null` if [ "X$names" != "X" ]; then for name in $names; do vers=`perl $autogen_get_version $dir/$name $prog` if [ "X$vers" = "X" ]; then continue fi if expr $vers '>' $prog_vers >/dev/null; then prog_name=$name prog_vers=$vers prog_dir="$dir" fi done fi eval ${prog}_name=${prog_name} eval ${prog}_vers=${prog_vers} eval ${prog}_dir=${prog_dir} PATH="$save_PATH" } check_prog_version() { prog=$1 eval min=\$${prog}_min_vers eval prog_name=\$${prog}_name eval prog_vers=\$${prog}_vers eval prog_dir=\$${prog}_dir echo "$program: $prog program '$prog_name' V $prog_vers (min $min) in $prog_dir" 1>&2 rc=1 if test $prog_vers != 0; then if expr $prog_vers '<' $min >/dev/null; then echo "$program: ERROR: \`$prog' version $prog_vers in $prog_dir is too old." echo " (version $min or newer is required)" rc=0 else # Things are ok, so set the ${prog} name eval ${prog}=${prog_name} fi else echo "$program: ERROR: You must have \`$prog' installed to compile this package." echo " (version $min or newer is required)" rc=0 fi return $rc } # Find newest version of programs in the current PATH save_args=${1+"$*"} save_ifs="$IFS" IFS=":" set - $PATH IFS="$save_ifs" echo "$program: Looking for programs: $programs" here=`pwd` while [ $# -ne 0 ] ; do dir=$1 shift if [ ! -d "$dir" ]; then continue fi for prog in $programs; do update_prog_version "$dir" $prog done done cd $here set - $save_args # END Find programs # Check the versions meet the requirements for prog in $programs; do if check_prog_version $prog; then exit 1 fi done echo "$program: Dependencies satisfied" if test -d $SRCDIR/libltdl; then touch $SRCDIR/libltdl/NO-AUTO-GEN fi config_dir= if test -d $CONFIG_DIR; then config_dir=`cd $CONFIG_DIR; pwd` fi for coin in `find $SRCDIR -name configure.ac -print | grep -v /releases/` do dir=`dirname $coin` if test -f "$dir/NO-AUTO-GEN"; then echo $program: Skipping $dir -- flagged as no auto-gen else echo " " echo $program: Processing directory $dir ( cd "$dir" # Ensure that these are created by the versions on this system # (indirectly via automake) $DRYRUN rm -f ltconfig ltmain.sh libtool stamp-h* # Made by automake $DRYRUN rm -f missing depcomp # automake junk $DRYRUN rm -rf autom4te*.cache config_macro_dir=`sed -ne 's/^AC_CONFIG_MACRO_DIR(\([^)]*\).*/\1/p' configure.ac` if test "X$config_macro_dir" = X; then config_macro_dir=. else aclocal_args="$aclocal_args -I $config_macro_dir " fi config_aux_dir=`sed -ne 's/^AC_CONFIG_AUX_DIR(\([^)]*\).*/\1/p' configure.ac` if test "X$config_aux_dir" = X; then config_aux_dir=. fi if test "X$config_dir" != X; then echo "$program: Updating config.guess and config.sub" for file in config.guess config.sub; do cfile=$config_dir/$file xfile=$config_aux_dir/$file if test -f $cfile; then $DRYRUN rm -f $xfile $DRYRUN cp -p $cfile $xfile fi done fi echo "$program: Running $libtoolize $libtoolize_args" $DRYRUN rm -f ltmain.sh libtool eval $DRYRUN $libtoolize $libtoolize_args if grep "^GTK_DOC_CHECK" configure.ac >/dev/null; then # gtkdocize junk $DRYRUN rm -rf gtk-doc.make echo "$program: Running $gtkdocize $gtkdocize_args" $DRYRUN $gtkdocize $gtkdocize_args fi echo "$program: Running $aclocal $aclocal_args" $DRYRUN $aclocal $aclocal_args if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then echo "$program: Running $autoheader" $DRYRUN $autoheader fi echo "$program: Running $automake $automake_args" $DRYRUN $automake $automake_args $automake_args echo "$program: Running $autoconf" $DRYRUN $autoconf $autoconf_args ) fi done rm -f config.cache AUTOMAKE=$automake AUTOCONF=$autoconf ACLOCAL=$aclocal export AUTOMAKE AUTOCONF ACLOCAL echo " " if test -z "$*"; then echo "$program: WARNING: Running \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo "\`$program' command line." fi echo "$program: Running ./configure $configure_args $@" if test "X$DRYRUN" = X; then $DRYRUN ./configure $configure_args "$@" \ && echo "$program: Now type \`make' to compile this package" || exit 1 else $DRYRUN ./configure $configure_args "$@" fi raptor-1.4.21/fix-groff-xhtml0000755000175000017500000000401311227654652013006 00000000000000#!/usr/bin/perl # # Format XHTML generated by groff -Thtml (via tidy) for websites # # Usage: groff -Thtml -P-l something.man | tidy -asxml ... | fix-groff-xhtml OUTPUT-FILE # # (C) Copyright 2003-2006 Dave Beckett # use strict; use File::Basename; my $progname=basename $0; my $raptor_title="Raptor RDF Parser Toolkit"; my $redland_title="Redland RDF Application Framework"; my $rasqal_title="Rasqal RDF Query Library"; die "USAGE: $progname OUTPUT-FILE\n" if @ARGV < 1; my $doc_title; my($file)=@ARGV; open(OUT, ">$file") or die "$progname: Cannot create $file - $!\n"; open(IN, "-"); while() { s%libraptor%$raptor_title - Raptor API%; s%

libraptor

%

$raptor_title - Raptor API

%; s%rapper%$raptor_title - Raptor RDF parser utility%; s%

rapper

%

$raptor_title - Raptor RDF parser utility

%; s%rdfproc%$redland_title - Redland RDF processor utility%; s%

rdfproc

%

$redland_title - Redland RDF processor utility

%; s%librasqal%$rasqal_title - Rasqal API%; s%

librasqal

%

$rasqal_title - Rasqal API

%; s%roqet%$rasqal_title - Rasqal RDF parser utility%; s%

roqet

%

$rasqal_title - Rasqal RDF parser utility

%; next if /^%%; # This is not xhtml s% cols="\d+" % %; s%(name|id)="([^"]+)"%my($at,$val)=($1,$2); $val =~ s/ /_/g; qq{$at="$val"};%eg; s%(Dave Beckett|Institute for Learning and Research Technology .ILRT.|University of Bristol) (?:- |)(http://[^<]+)%$1%; my $year=1900+(localtime)[5]; print OUT <<"EOT" if m%^%;

Copyright 2002-$year Dave Beckett
2002-$year University of Bristol

EOT print OUT; } close(IN); close(OUT); raptor-1.4.21/mkinstalldirs0000755000175000017500000000672211330426036012642 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor-1.4.21/Makefile.am0000644000175000017500000000372511330672502012071 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - top level automake file for Raptor # # Copyright (C) 2000-2006 David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005 University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # noinst_SCRIPTS = raptor-src-config ACLOCAL_AMFLAGS = -I build SUBDIRS= src utils docs data tests win32 examples librdfa pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = raptor.pc EXTRA_DIST=\ ChangeLog ChangeLog.1 ChangeLog.2 ChangeLog.3 ChangeLog.4 ChangeLog.5 \ ChangeLog.6 ChangeLog.7 ChangeLog.8 \ README NEWS LICENSE.txt \ README.html NEWS.html LICENSE.html INSTALL.html \ RELEASE.html \ LICENSE-2.0.txt NOTICE \ raptor.rdf.in \ raptor-src-config.in \ autogen.sh \ raptor.spec.in \ fix-groff-xhtml \ raptor.pc.in if RELEASE_VERSION EXTRA_DIST += raptor.spec endif DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc # Create some text files from HTML sources LYNX=lynx HTML_TO_TEXT=TERM=vt100 $(LYNX) -dump -nolist SUFFIXES = .html .txt .html.txt: $(HTML_TO_TEXT) $< > $@ README: README.html $(HTML_TO_TEXT) $< > $@ NEWS: NEWS.html $(HTML_TO_TEXT) $< > $@ # Some people need a little help ;-) test: check dist-hook: README NEWS @for file in README NEWS; do \ if test -r $(srcdir)/$$file; then \ rm -f $(distdir)/$$file; \ cp -p $(srcdir)/$$file $(distdir)/$$file; \ fi; \ done raptor-1.4.21/Makefile.in0000644000175000017500000006660411330704764012115 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - top level automake file for Raptor # # Copyright (C) 2000-2006 David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005 University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @RELEASE_VERSION_TRUE@am__append_1 = raptor.spec subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/raptor-src-config.in \ $(srcdir)/raptor.pc.in $(srcdir)/raptor.rdf.in \ $(srcdir)/raptor.spec.in $(top_srcdir)/configure AUTHORS \ COPYING COPYING.LIB ChangeLog INSTALL NEWS build/compile \ build/config.guess build/config.sub build/depcomp \ build/install-sh build/ltmain.sh build/missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = raptor.spec raptor.rdf raptor.pc \ raptor-src-config CONFIG_CLEAN_VPATH_FILES = SCRIPTS = $(noinst_SCRIPTS) AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_SCRIPTS = raptor-src-config ACLOCAL_AMFLAGS = -I build SUBDIRS = src utils docs data tests win32 examples librdfa pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = raptor.pc EXTRA_DIST = ChangeLog ChangeLog.1 ChangeLog.2 ChangeLog.3 ChangeLog.4 \ ChangeLog.5 ChangeLog.6 ChangeLog.7 ChangeLog.8 README NEWS \ LICENSE.txt README.html NEWS.html LICENSE.html INSTALL.html \ RELEASE.html LICENSE-2.0.txt NOTICE raptor.rdf.in \ raptor-src-config.in autogen.sh raptor.spec.in fix-groff-xhtml \ raptor.pc.in $(am__append_1) DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc # Create some text files from HTML sources LYNX = lynx HTML_TO_TEXT = TERM=vt100 $(LYNX) -dump -nolist SUFFIXES = .html .txt all: all-recursive .SUFFIXES: .SUFFIXES: .html .txt am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): raptor.spec: $(top_builddir)/config.status $(srcdir)/raptor.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ raptor.rdf: $(top_builddir)/config.status $(srcdir)/raptor.rdf.in cd $(top_builddir) && $(SHELL) ./config.status $@ raptor.pc: $(top_builddir)/config.status $(srcdir)/raptor.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ raptor-src-config: $(top_builddir)/config.status $(srcdir)/raptor-src-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ *"$(VERSION)"*) : ;; \ *) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-pkgconfigDATA .html.txt: $(HTML_TO_TEXT) $< > $@ README: README.html $(HTML_TO_TEXT) $< > $@ NEWS: NEWS.html $(HTML_TO_TEXT) $< > $@ # Some people need a little help ;-) test: check dist-hook: README NEWS @for file in README NEWS; do \ if test -r $(srcdir)/$$file; then \ rm -f $(distdir)/$$file; \ cp -p $(srcdir)/$$file $(distdir)/$$file; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/LICENSE.txt0000644000175000017500000000526711330745027011666 00000000000000 Raptor RDF Parser Library - License This package is Free Software available under any one of the specified licenses below. All the licenses below are alternatives and if you select one license, that one alone applies. 1. The GNU Lesser General Public License (LGPL) Version 2.1 See http://www.gnu.org/copyleft/lesser.html or COPYING.LIB for the full license text. __________________________________________________________________ Copyright (C) 2000-2010 David Beckett Copyright (C) 2000-2005 University of Bristol. All Rights Reserved. This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License Version 2.1 as published by the Free Software Foundation or any newer version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License Version 2.1 for more details. You should have received a copy of the GNU Lesser General Public License Version 2.1 along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA __________________________________________________________________ NOTE - under Term 3 of the LGPL Version 2.1, you may choose to license the entire package under the GPL. If that option is chosen, then this package is licensed under the terms of the GPL Version 2 or alternatively, any newer version of the GPL. See COPYING for the full GPL license text. 2. The Apache License V2.0 See LICENSE-2.0.txt for the full license text. Copyright (C) 2000-2010 David Beckett Copyright (C) 2000-2005 University of Bristol. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The NOTICE file contains the notices that must be applied according to section 4(d) of the Apache License, Version 2.0. __________________________________________________________________ Copyright (C) 2000-2010 David Beckett Copyright (C) 2000-2005 University of Bristol raptor-1.4.21/ChangeLog.10000644000175000017500000000321510172250660011740 000000000000002000-12-15 Dave Beckett * rdfdump.c, rapier_parse.c, rapier.h, Makefile.am: Snapshot 2000-12-15 2000-12-10 Dave Beckett * Makefile.am: Added test files 2000-12-08 Dave Beckett * rapier_parse.c (rapier_print_ns_name): Only compile when debugging. Put LIBRDF_DEBUG2 around some debugging statements. 2000-11-29 Dave Beckett * rapier.h: Changed some interfaces slightly. Added defines when not linked with Redland. * rdfdump.c: Made work when compiled with Redland. Added options via getopt/getopt_long and usage. * rapier_parse.c: Added general container support and callback. Made work with Redland librdf_uri and concepts when used inside Redland. Tidied some function declarations. Split some super-long functions into two - 1) xml parsing 2) rdf grammar 2000-11-29 Dave Beckett * rapier.h: Changed some interfaces slightly. Added defines when not linked with Redland. * rdfdump.c: Made work when compiled with Redland. Added options via getopt/getopt_long and usage. * rapier_parse.c: Added general container support and callback. Made work with Redland librdf_uri and concepts when used inside it. Tidied some function declarations. Split some super-long functions into two - 1) xml parsing 2) rdf grammar 2000-11-22 Dave Beckett * acconfig.h, AUTHORS, autogen.sh, config.h.in, configure.in, .cvsignore, INSTALL.html, LICENSE.html, Makefile.am, MPL.html, NEWS.html, rapier.h, rapier_parse.c, rdfdump.c, README.html: Initial import. raptor-1.4.21/ChangeLog.20000644000175000017500000004027410172250675011755 000000000000002001-12-10 Dave Beckett * Makefile.am: Added dc.rdf to dist * dc.rdf: RDF/XML example file * tests/ex-20.rdf: use rdf:ID 2001-10-10 Dave Beckett * configure.in: Check for xmlParseFile in xml or xml2 2001-10-08 Dave Beckett * tests/Makefile.am: Allow tests with empty correct results file * rdfdump.c: Check that only file: URIs are used 2001-09-21 Dave Beckett * tests/ex-19.rdf: Check omitted rdf:RDF works * tests/ex-20.rdf: Check rdf:ID generates right URI * tests/Makefile.am: Added ex-19, ex-20 Generate N-Triples output with fixed base URI * configure.in: Updated for use of libtool Remove XML_OBJS, use LIBS for xml parser dependencies * Makefile.am: Create dynamic, static library using libtool Reorganised rdfdump compile. * raptor_parse.c (raptor_make_uri_from_id): Take base_uri and use it to create absolute URI from id. Update uses of above function to match changed interface. 2001-09-20 Dave Beckett * rdfdump.c: If quiet, don't even report number of statements * rdfdump.c: Fix help 2001-09-13 Dave Beckett * ntriples_parse.c (raptor_ntriples_string): A little optimising of switch cases * tests/test.nt: Added \u and \U test cases * ntriples_parse.c: Added \U and \U escapes * ntriples_parse.c (raptor_ntriples_unicode_char_to_utf8): (raptor_ntriples_string): Tidy up, in preparation for adding new escapes. * ntriples_parse.c (raptor_ntriples_unicode_char_to_utf8): Added, based on librdf_unicode_char_to_utf8 (raptor_ntriples_string): Added, for handling \ escapes for both "strings" and * tests/Makefile.am: Automate test checks, diffs. Not doing proper model checks yet. * tests/Makefile.am: Add raw output files to dist * configure.in: Moved tests into tests directory * tests/Makefile.am: automakefile for tests * Makefile.am: Moved tests into tests directory 2001-09-10 Dave Beckett * raptor.h: Added comments for raptor_identifier_type 2001-08-21 Dave Beckett * configure.in: Handle libxml v1 (xml-config) and v2 (xml2-config) Report libxml version found in configuring and status * configure.in: Bumped version to 0.9.4 * Snapshotted raptor_0_9_3 for 0.9.3 release * configure.in: When choosing xml parsers, end when one found. * INSTALL.html: Updated for xml parser choosing changes Added N-Triples test * configure.in: Choose an xml parser from any available, --with-xml-parser selects one specifically. * Makefile.am: Use -n for invoking ntriples output; --ntriples only works when GNU getopt_long is around. * rdfdump.c: Add ntriples to short getopt string * configure.in: Update CPPFLAGS from xml-config when it exists and testing for headers. * NEWS.html: Updated for 0.9.3 release 2001-08-17 Dave Beckett * raptor_parse.c (raptor_xml_set_document_locator): Capture SAX document locator (raptor_xml_update_document_locator): Update raptor locator with that info. Update gnome xml/libxml error and warning functions to use the above. 2001-08-15 Dave Beckett * raptor_parse.c (raptor_generate_statement): Handle generating reified statements with IDs as well as URIs etc. * Makefile.am: Added tests/ex-18.rdf * tests/ex-18.rdf: test rdf:Description as document element * raptor_parse.c (raptor_xml_start_element_handler): Process rdf: attributes on document element. (raptor_start_element_grammar): Handle at top level when not present. * raptor_parse.c: Fix it again * raptor_parse.c: Fix things triggered by previous typo fix! * raptor_parse.c: Typo * configure.in: Bumped version to 0.9.3 * TODO.html: Record more fixes * Makefile.am: Started adding test answer files with tests/ex-13.nt * tests/ex-13.nt: N-Triples output for tests/ex-13.rdf * raptor.h: RAPTOR_IDENTIFIER_TYPE_NONE => RAPTOR_IDENTIFIER_TYPE_UNKNOWN different from RAPTOR_URI_SOURCE_NOT_URI to catch uninitialisation * raptor_parse.c: RAPTOR_IDENTIFIER_TYPE_NONE => RAPTOR_IDENTIFIER_TYPE_UNKNOWN (raptor_print_statement_detailed): Added some debug-only tests (raptor_copy_identifier): Oops, copy all fields in identifier. Remove some void* casts no longer needed. When copying DAML collection URI to parent, set type, uri_source too * ntriples_parse.c: Fix for debug output - calculate length of generated terms correctly. * raptor.h: added raptor_identifier for holding (URI, ID, types etc.) raptor_identifier_type enum now union of raptor_subject,predicate,object_type removed feature RAPTOR_FEATURE_INTERPRET_CONTAINERS_AS_TYPEDNODE Added prototypes for raptor_identifier functions * rdfdump.c, ntriples_parse.c: Updates for change with introduction of raptor_identifier * tests/ex-13.rdf: Note results are in tests/ex-13.nt * raptor_parse.c: Major update with pervasive changes Added skipping state to just ignore XML content (not used yet) Removed seq, bag, alt, container parser FSM states. Added rdf:type, rdf:value support when used as attributes. Replaced loads of (URI, ID, literal, type) with raptor_identifier - still more to do Removed feature interpret_containers_as_typedNode - now default. Removed support for 'bare' XML elements - now illegal. Minor bug fixes found from above changes. (raptor_new_identifier): Added (raptor_init_identifier): Added (raptor_copy_identifier): Added (raptor_free_identifier): Added (raptor_process_property_attributes): Lots of updates to handle rdf:type, rdf:value and rdf:_n. * Makefile.am: Added tests/ex-17.rdf * tests/ex-17.rdf: test empty propertyElt off a node * tests/ex-01.rdf: Added the two empty element XML forms * Makefile.am: Added tests/ex-16.rdf * tests/ex-16.rdf: test rdf:value as an attribute * Makefile.am: Added tests/ex-15.rdf * tests/ex-15.rdf: test rdf:type as an attribute * tests/ex-07.rdf: Strictly, Literal not literal 2001-07-26 Dave Beckett * raptor_parse.c: Don't peek at current_element before it is constructed. For elements inside parsetype literal, pass on state to potential child elements. 2001-07-24 Dave Beckett * README.html: Move quality warning from alpha->beta 2001-07-23 Dave Beckett * raptor_parse.c: Updates to get daml:collection stuff working inside Redland 2001-07-22 Dave Beckett * rdfdump.c: Added --output=simple | ntriples to use raptor_print_statement_as_ntriples * raptor.h: Added raptor_print_statement_as_ntriples * raptor_parse.c (raptor_print_statement_as_ntriples): Added. (raptor_make_uri_from_id): No longer uses base_uri. Probably need to do this differently later. Throughout - always store uri_source in parent when copying uris up. Fix some mistakes in uri_source tracking. * ntriples_parse.c: Make _:name not include _: in name * ntriples_parse.c (raptor_ntriples_generate_statement): Handle _:name object stored as strings, not URIs. * raptor_parse.c (raptor_print_statement_detailed): Handle _:name subject, object stored as strings, not URIs. * ntriples_parse.c (raptor_ntriples_generate_statement): Handle _:name subject stored as strings, not URIs. * tests/test.nt: Added tests for all end of lines: CR and CR LF (other lines are all LF) Changed all subject resource names so easier to see missing results. * ntriples_parse.c: Added CR | LF | CR LF handling. Handle space before/after trailing . Various bits of tidying 2001-07-21 Dave Beckett * Makefile.am: Added tests/ex-14.rdf * tests/ex-14.rdf: Test that was crashing * raptor_parse.c: Store propertyElt/rdf:li resource/ID in object, not subject. * configure.in, Makefile.am: Added win32 dir to dist * win32/raptor.dsw, win32/raptor.plg, win32/raptortest.cpp, win32/raptortest.dsp, win32/Makefile.am, win32/raptor.dsp: win32 files * TODO.html: Updated from recent fixes, improvements. * Makefile.am: Added RDF/XML test 11-13 * tests/ex-11.rdf, tests/ex-12.rdf, tests/ex-13.rdf: tests for parseType literal, resource * raptor.h: Updated after patch from Aaron Michal to provide Win32 and daml:collection support * raptor_parse.c: Added patch from Aaron Michal including 1) Win32 support 2) daml:collection support 3) fixes to parseType literal and the raptor_format_element function 4) Fixed passing on varargs in error, warning handlse. 5) Various s/int i/unsigned int i/ I also: Added memory cleanup for daml:collection URIs Fixed some fencepost errors in parseType literal string management * raptor_parse.c: Update comment to match new rdf:value * raptor_parse.c: Added rdf:value property to list of rdf_attr_names 2001-07-21 Dave Beckett * raptor_parse.c: Update comment to match new rdf:value * raptor_parse.c: Added rdf:value property to list of rdf_attr_names 2001-07-16 Dave Beckett * README.html: Updated for ntriples parser. * raptor.h: Make URI function prototypes public * ntriples_parse.c: Handle anonymous nodes passed back properly. 2001-07-13 Dave Beckett * ntriples_parse.c: Tidied some comments * Makefile.am: Added ntriples parser files, test file * rdfdump.c: Added ntriples support, --ntriples arg to invoke it. * raptor_parse.c: Moved raptor_uri stuff to raptor.h Made some uri functions public for ntriples * raptor.h: Define, use raptor_uri typedef here. Add prototypes for raptor_uri functions * ntriples.h, ntriples_parse.c: N-Triples parser * tests/test.nt: N-Triples test cases 2001-07-02 Dave Beckett * NEWS.html: HTML tweak * raptor_parse.c, raptor.spec.in, raptor.h: Now called raptor * Snapshotted raptor_0_9_2 for 0.9.2 release * NEWS.html: Updated for 0.9.2 release * raptor_parse.c, raptor.spec.in, raptor.h, rdfdump.c, configure.in, autogen.sh, acconfig.h, TODO.html, README.html, NEWS.html, Makefile.am, LICENSE.html, INSTALL.html: Now called raptor 2001-06-06 Dave Beckett * README.html: Point to TODO.html, NEWS.html, ChangeLog earlier on. * configure.in: Bumped version to 0.9.2 * NEWS.html: Updated for 0.9.1 release * Snapshotted rapier_0_9_1 for 0.9.1 release 2001-06-04 Dave Beckett * rapier_parse.c: Generate properties connecting parent nodes to contained resources for all parent node types * Makefile.am: Fix test typo2 * Makefile.am: Fix test typo * Makefile.am: Renamed test files * tests/ex-05.rdf, tests/ex-06.rdf, tests/ex-07.rdf, tests/ex-08.rdf, tests/ex-09.rdf, ex-10.rdf, tests/ex-00.rdf, tests/ex-01.rdf, tests/ex-02.rdf, tests/ex-03.rdf, tests/ex-04.rdf: Test RDf/XML files * rapier_parse.c: Fixed some missing frees for IDs, bagIDs Containers now return resource to parent properties. * configure.in: Fix XML_SetNamespaceDeclHandler detection when using expat sources * configure.in: One more return(0); added to AC_TRY_RUN * configure.in: Updated configure for better expat, libxml detection * TODO.html: More todo. * Makefile.am: Run ./rdfdump * rdfdump.c: Count the statements * rapier.h: Added rapier_uri_source * rapier_parse.c: Changed qname to local_name throughout. (rapier_process_property_attributes): Pass in the element with the attributes and the element that contains the resource Added FIXMEs about ID attribute on empty propertyElt. 2001-03-29 Dave Beckett * rapier_parse.c: Replaced internal fields with more evocative names (subject_uri, predicate_uri, object_uri) Added rapier_uri_source for every URI so can follow URI provenance. Pass the URI provenance to the generation of statements Lots of bug squashing for tests ms_4.1_1.rdf (too many statements) and ms_7.4_2.rdf (too few, parseType resource) 2001-03-22 Dave Beckett * rapier_parse.c: Added a cast for c++ 2001-02-22 Dave Beckett * rapier_parse.c: More parseType literal buffer length overruns fixed. 2001-02-21 Dave Beckett * rapier.h: Added librdf_world support when inside Redland * rapier_parse.c: Added librdf_world support when inside Redland (rapier_format_element): Count length of literal XML better - correctly? 2001-02-18 Dave Beckett * rapier_parse.c (rapier_parse_file): Catch more conditional filename deallocs * rapier_parse.c: Split RAPIER_URI_AS_FILENAME into _TO_FILENAME versions, dealloc resulting string when using _TO_ version. 2001-02-09 Dave Beckett * README.html: Moved bugs to separate page. * TODO.html: Rapier todo/bugs 2001-02-04 Dave Beckett * LICENSE.html: Specify particular versions of licenses. * Many files: Change license boilerplate 2001-01-25 Dave Beckett * rapier.h: Prototype changes to use Redland URI objects (when available) for public functions and locators. * rapier_parse.c: Changes to use Redland URI objects (when available) for public functions and locators. * rapier.h: Updated for new prototypes. * rapier_parse.c (rapier_new): No args (rapier_parse_file): Take rapier_uri pointers. * rdfdump.c: Fixed base URI handling, updated to new rapier_new api Added -r, --replace-newlines for replacing newlines with spaces in literals Added -q, --quiet for less messages. * rapier_parse.c: Add child_uri field to pass down to child nodes and use it when rdf:resource used on propertyElts (not rdf:li) inc rdf_attr_count for non RDF M&S attribtues When ID seen on propertyElt, refify. But what to do with bagID then? Fill in many missing bag_uri references when generating statements 2001-01-24 Dave Beckett * configure.in: Define RAPIER_INTERNAL here * rapier_parse.c: Fixes for integration with Redland 2001-01-23 Dave Beckett * rdfdump.c, configure.in, acconfig.h: Added test for needing optind declaration (portability) * rapier_parse.c: s/namespace/nspace/ to make compilable with c++ Added qname_length and value_length to rapier_ns_name and use them to reduce number of strlen()s. Added some more casts for c++, especially near LIBRDF_MALLOC * configure.in: Bumped version to 0.9.1 2001-01-22 Dave Beckett * Snapshotted rapier_0_9_0 for 0.9.0 release * configure.in: Try to detect and use old and new installed expat libs * configure.in: Try a better way to get correct expat headers * rdfdump.c: Use HAVE_GETOPT_H * configure.in: Test for getopt.h (for rdfdump) Test for expat.h, xmlparse.h - expat options. * rapier_parse.c: Use HAVE_EXPAT_H and HAVE_XMLPARSE_H * configure.in: Added fatal error if no XML parser found. * Makefile.am: Add rapier.spec.in to dist * rapier.spec.in: RPM spec * configure.in: Made first version 0.9.0 * rdfdump.c: Tidy comment. * NEWS.html, LICENSE.html, INSTALL.html: Updated style, preparing for release * README.html: Updated features, todo, preparing for release. * rapier_parse.c: Tidy comments. * rapier.h: Changed prototype of container test function * rdfdump.c: Fix error message formatting. * rapier_parse.c: Major updates from 2001-01-21: parseType literal works mostly. Added reification. Fixed some compile-with-Redland problems Made use of more Redland URI concepts (rapier_generate_property): Removed - now use rapier_generate_statement or: (rapier_generate_named_statement): Added - handles statements with predicates that can be either XML names or namespaced names. 2001-01-19 Dave Beckett * Makefile.am: Tidy cflags * configure.in: Made version a lot bigger; alpha quality. Added configurable expat/libxml choice Tidy cflags * config.h.in: Shouldn't be in CVS * NEWS.html, LICENSE.html, INSTALL.html, README.html: First version. * rapier_parse.c: Mostly working except for - reification (ignored), rdf:li as propertyType doesn't work, parseType literal not supported. Little testing. raptor-1.4.21/ChangeLog.30000644000175000017500000017460310172250716011756 000000000000002002-12-22 Dave Beckett * raptor_uri.c: (main) Try test again with /etc - surely that is least likely to be a symlink? * tests/Makefile.am: check-bad-rdf: turn off bourne shell exiting while running tests expected to fail. * tests/Makefile.am: Set baseuri from test file basename; ensure no dirs are in the base URI 2002-12-21 Dave Beckett * configure.ac: Removed just for now 2002-12-20 Dave Beckett * NEWS.html: tweak * configure.in: Bumped version to 0.9.8 * NEWS.html: date * Snapshotted raptor_0_9_7 for 0.9.7 release * raptor.spec.in: Updated for 0.9.7 release 2002-12-19 Dave Beckett * INSTALL.html, README.html, NEWS.html: Updated for 0.9.7 release * acconfig.h: Seems like PACKAGE and VERSION are not needed here, and later autoconfs generate headers that moan. * raptor_parse.c, raptor_general.c: castings * raptor.h: Indent CPP directives after column 1 # for lame C compiler * TODO.html: Updated after recent bug fixes * tests/Makefile.am: test(1) string equality is = not == 2002-12-18 Dave Beckett * autogen.sh: Delete autom4te too * configure.ac: auto-configure source for newer autoconfs 2002-12-16 Dave Beckett * raptor_uri.c (main): Use /bin to test, seems more likely to be around on more posix systems such as OSX * raptor_parse.c (raptor_generate_statement): Handle NULL reified being passed. (raptor_process_property_attributes): Property attributes are never reified explicitly but may be in a bag. (raptor_start_element_grammar,raptor_end_element_grammar): Turn bad uses of bag:ID into errors not warnings. * tests/Makefile.am: Added more bag:ID checks (44-45) and errors (bad 05-09) Make test failures stop the 'make check'. * tests/bad-05.rdf, tests/bad-06.rdf, tests/bad-07.rdf, tests/bad-08.rdf, tests/bad-09.rdf, tests/ex-48.rdf, tests/ex-49.rdf, tests/ex-50.rdf, tests/ex-46.rdf, tests/ex-47.rdf, tests/ex-48.out, tests/ex-49.out, tests/ex-50.out, tests/ex-46.out, tests/ex-47.out: Turned rdf:bagID property element checks into errors * raptor_parse.c: Add rdf:bagID checks - only allow it in the two cases it is in the grammar - on a node element and an empty property element. Otherwise emit warnings since there is no error test case yet. * tests/ex-50.out, tests/ex-50.rdf, tests/ex-44.out, tests/ex-45.out, tests/ex-46.out, tests/ex-47.out, tests/ex-48.out, tests/ex-49.out, tests/ex-44.rdf, tests/ex-45.rdf, tests/ex-46.rdf, tests/ex-47.rdf, tests/ex-48.rdf, tests/ex-49.rdf: Checking rdf:bagID ignored on other property element cases * raptor_parse.c (raptor_generate_statement): Handles generating a reified statement ID for use with bagID and then reiifying the statement too. * tests/Makefile.am: Add ex-43 * tests/ex-43.out, tests/ex-43.rdf: Test rdf:bagID when property elements need generated reified ID * raptor_parse.c (raptor_generate_statement): Gain bag_element argument, use it throughout to indicate the element to find the rdf:bagID if any. (raptor_start_element_grammar): Generate _:bagid rdf:type rdf:Bag when rdf:bagID appears on node element. * tests/ex-42.out: Correct for actual output order 2002-12-15 Dave Beckett * tests/ex-03.rdf, tests/ex-03.out: correct this now that rdf:bagID support begins to work * tests/Makefile.am: Added ex-42 * tests/ex-42.out, tests/ex-42.rdf: rdf:bagID * tests/bad-04.rdf: Check rdf:ID and rdf:bagID with same value fails * tests/bad-02.rdf: Duplicate rdf:ID names * raptor_parse.c: Make debug less chatty about cdata, unless RAPTOR_DEBUG_CDATA defined. * raptor_parse.c (raptor_record_ID): Added, notes rdf:ID and rdf:bagID values, checks for duplicates (per in-scope base-URI). (raptor_free_ID_list): Added, frees structure above. (raptor_xml_start_element_handler): Handle xml:base using raptor_new_uri_for_xmlbase to strip/fix parts that aren't used. (raptor_start_element_grammar): Check for illegal rdf:ID, rdf:bagID and rdf:nodeID using raptor_valid_xml_ID. Check for duplicate rdf:ID and rdf:bagID values using raptor_record_ID. Only allow parsetype "Literal", "Resource" and "Collection", not case-equivalents. Check for and forbid property attributes on a literal property elemnent. * Makefile.am: Added raptor_utf8.c * raptor_internal.h: Export less from raptor_utf8.c * raptor_general.c (raptor_valid_xml_ID): Use raptor_unicode_is_namestartchar and raptor_unicode_is_namechar. * raptor_utf8.c: Raptor UTF-8 and Unicode support * tests/bad-03.rdf: Check rdf:ID and rdf:bagID values * tests/Makefile.am: Added bad-02 to bad-04 * raptor_uri.c (raptor_uri_construct): Internal; constructs a uri-ref string from the parts. (raptor_new_uri_for_xmlbase): Ad (raptor_uri_resolve_uri_reference): Copy reference path across when reference URI has one. Work for path components that are >1 letter long. (raptor_new_uri_for_xmlbase): Added, makes a new uri from an existing one, suitable for xml:base (no fragment, query; path must be present). (main): Make test cases use example.org. Add checks for the above bugs. * raptor.h: Added prototype for raptor_new_uri_for_xmlbase * ntriples_parse.c: raptor_ntriples_unicode_char_to_utf8 now raptor_unicode_char_to_utf8 raptor_ntriples_utf8_to_unicode_char now raptor_unicode_utf8_to_unicode_char (raptor_print_ntriples_string): Allow no delimiter. * raptor_internal.h: Added prototypes for raptor_valid_xml_ID Added prototypes for raptor_unicode_is_* methods. The ntriples_* utf8/unicode methods are now raptor_unicode_* * raptor_general.c (raptor_print_statement_as_ntriples): N-Triples escape URIs (for IRI compatibility). (raptor_validate_xml_ID): Added, checks that the syntax of attributes matching xml:ID are correct matching http://www.w3.org/TR/REC-xml-names/#NT-NCName * rdfdump.c: Exit 1 on error, 2 on warnings. * README.html: Words 2002-12-13 Dave Beckett * tests/ex-41.rdf, tests/ex-41.out: Add rdf:datatype test with xml:lang * raptor_parse.c: Don't care state about numbers * raptor_parse.c (raptor_xml_end_element_handler): Don't check for unbalanced XML; the XML parsers do that * raptor_parse.c: Update parser states to match http://www.w3.org/TR/rdf-syntax-grammar/ names. Fix comments to also match. rdf_syntax_terms_info - added to describe forbidden nodeEl, propEl, propAttr (raptor_forbidden_nodeElement_name, raptor_forbidden_propertyElement_name): Added, using above * rdfdump.c: Exit with code 2 if there were warnings. * raptor_parse.c: Zap xml:lang attr 2002-12-10 Dave Beckett * configure.in: Added raptor-config * Makefile.am: Added raptor-src-config * raptor-src-config.in: raptor-src-config source 2002-12-04 Dave Beckett * raptor_parse.c (raptor_xml_start_element_handler): Save away the element attributes in an allocated array, restore the pointers later. This allows the XML parser to free them correctly. (raptor_xml_end_element_handler): Call raptor_free_qname again to tidy up. (raptor_init_parser_rdfxml): Initialise libxml2 explicitly (raptor_terminate_parser_rdfxml): Added, cleaning up libxml2. * raptor_libxml.c (raptor_libxml_endDocument): free the libxml2 Doc that is created but never freed by the SAX methods. * raptor_internal.h, raptor_general.c: Added raptor_terminate_parser_rdfxml() for closing rdfxml parser factory. 2002-12-03 Dave Beckett * raptor_libxml.c (raptor_libxml_internalSubset, raptor_libxml_externalSubset): No return value. * raptor.h: Update prototype for unsigned char arg. * raptor_parse.c: Yet more casts, for expat XML_Char as char* * raptor_uri.c (raptor_free_uri): There is no return value * raptor_uri.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_general.c, raptor.h, ntriples_parse.c: More unsigned char to char fixes, other castings enough to make g++ happy. * raptor_parse.c, raptor_qname.c, raptor_namespace.c, raptor_general.c, raptor_internal.h: Use unsigned char for UTF-8 strings rather than char (That means all XML names, content, buffers) * raptor_parse.c: Delete HAVE_XML_SetNamespaceDeclHandler - never used Don't merge expat XML_Char (char) and libxml2 xmlChar (unsigned char). Work with unsigned char always. * raptor_internal.h: Don't merge expat XML_Char (char) and libxml2 xmlChar (unsigned char). Work with unsigned char always. * configure.in, acconfig.h: Delete HAVE_XML_SetNamespaceDeclHandler - never used * raptor_parse.c (raptor_element_has_property_attributes): Unused rdf_parser arg zapped. * raptor_parse.c (raptor_xml_parse_chunk_): Don't assign a negative number to size_t len, it is probably unsigned. * raptor_parse.c (raptor_free_element): Use raptor_free_uri on datatype URI * raptor_parse.c, raptor.h: Removed trailing ','s in enums 2002-12-02 Dave Beckett * ntriples_parse.c (raptor_ntriples_string): sscanf format lx 2002-11-28 Dave Beckett * TODO.html: Note suggestion to trim spaces around urls in lax/default mode 2002-11-27 Dave Beckett * INSTALL.html: Now works with old libxml 2.3.5 (released 2001-03-23) * raptor_libxml.c (raptor_libxml_init): Use RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED to see if libxml xmlSAXHandler has an initialized field * configure.in: Check libxml xmlSAXHandler has initialized field defining RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED if so * acconfig.h: Added RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED * INSTALL.html: Updated supported versions 2002-11-26 Dave Beckett * win32_config.h, configure.in, rdfdump.c, raptor_uri.c, raptor_parse.c, raptor_libxml.c, raptor_general.c, ntriples_parse.c: stdarg.h is now a required header. * configure.in: Added --with-xml2-config to set location of libxml xml2-config program. 2002-11-24 Dave Beckett * raptor_parse.c (raptor_xml_start_element_handler): Don't free raptor_free_qname(element_name) here, raptor_free_element does it. 2002-11-21 Dave Beckett * configure.in: Make it use expat sources if this is part of Redland, ../expat dir exists and there is no installed expat system library * raptor_parse.c (raptor_xml_parse_chunk_): Only use the libxml2 bug workaround for small buffers for libxml2 versions lower than 2.4.25 * tests/Makefile.am: Report error status from standard rdf/xml tests, even if the answer was correct. * tests/ex-03.rdf: Remove aboutEach* and bare bagID 2002-11-19 Dave Beckett * TODO.html: XML parser choice * tests/test.out, tests/test.nt, tests/ex-11.out, tests/ex-07.out, raptor_parse.c, raptor_general.c, ntriples_parse.c: rdfs:XMLLiteral now rdf:XMLLiteral Add rdf:nil to allowed rdf namespace terms * raptor_parse.c: More error/warnings rewordings * raptor_parse.c: Remove M&S from some comments, messages. Use RDF namespace. * raptor_parse.c: Improve warning about multiple object nodes for a property element. 2002-11-07 Dave Beckett * tests/test.out: typo * tests/test.out, tests/ex-11.out, tests/ex-07.out: Remove xml"" tests, replacing with "foo"<...> form. * raptor_general.c: Remove xml"" (stage 1). (raptor_print_statement_detailed): Output this as a datatyped literal. (raptor_print_statement_as_ntriples): Output the "foo"<..> datatype N-Triples form. * ntriples_parse.c: Remove xml"" (stage 1). Parsing it works but gives an error. Never output. (raptor_ntriples_generate_statement): Output "foo"<...> for xml literal. Remove is_xml argument. (raptor_ntriples_parse_line): For XML literal (old xml""), parse, give an error and emit it in the datatype form. 2002-11-02 Dave Beckett * README.html: Updated after 0.9.6 release - sigh! * NEWS.html: fix 0.9.6 release date * configure.in: Bumped version to 0.9.7 * Snapshotted raptor_0_9_6 for 0.9.6 release * NEWS.html, TODO.html: Updated for 0.9.6 * raptor_parse.c: rdf_attr_info gains allowed_unprefixed_on_attribute to suppress warning. * libraptor.3: Updated for 0.9.6 * tests/test.out: minor fix * rdfdump.1: Add -a/--assume option. * raptor.h: Tweak uri factory method typedefs, prefix with raptor_ * raptor.h: raptor_start_parse_file: Made an internal method * raptor_general.c (raptor_start_parse_file): Made an internal method * tests/test.nt: minor fix * tests/test.out, tests/test.nt: Added tests for datatyped literals with/without language * ntriples_parse.c (raptor_ntriples_string): Added N-Triples datatype (^^) parsing. 2002-11-01 Dave Beckett * ntriples_parse.c (raptor_ntriples_generate_Statement): Added datatypes argument, will set the URI if the string is passed in. 2002-10-31 Dave Beckett * raptor_parse.c: Check for rdf:datatype on property/member elements * tests/Makefile.am: Added ex-41 * tests/ex-41.out, tests/ex-41.rdf: Added rdf:datatype tests * raptor_parse.c (raptor_free_element): Free xml:lang values * raptor_parse.c: alternatively, don't zap the pointer and let cleanup grab it. * raptor_parse.c: free rdf:about attribute value before discarding pointer. * raptor_general.c (raptor_parse_file): Always free filename. * raptor_uri.c (raptor_uri_filename_to_uri_string): Fix length of buffer for unix when file name is recalculated from getcwd(). * raptor_namespace.c (raptor_namespaces_free): Don't need non-NULL context to do freeing. * ntriples_parse.c: Update to handle xml"string"@lang format (and warn about older one) * ntriples_parse.c: Update to handle "string"@lang format (and warn about older one) * tests/test.out, tests/test.nt, tests/rdfs-namespace.out, tests/rdf-schema.out, tests/ex-29.out: Update to "string"@lang format. * raptor_general.c (raptor_print_statement_as_ntriples): Update to "string"@lang format. Add datatype URI. * rdfdump.c (main): Init uri_string variables * raptor_internal.h, ntriples_parse.c, raptor_namespace.c, raptor_parse.c, raptor_qname.c, raptor_uri.c, raptor_general.c, raptor_libxml.c: LIBRDF_ macros now RAPTOR_ * raptor_internal.h: Remove raptor_uri_init * raptor.h: Added raptor_uri_init * raptor_namespace.c: (main) Updates for initialising URI class in/outside redland * rdfdump.c: When RAPTOR_IN_REDLAND, include * rdfdump.c: Use raptor URI calls. Use raptor_init/raptor_finish - now required. * raptor_general.c (raptor_init): Now compulsory * raptor_parse.c, raptor_locator.c, raptor_namespace.c: macro RAPTOR_URI_AS_STRING -> raptor_uri_as_string * raptor_internal.h: Removed macro RAPTOR_URI_AS_STRING * raptor_general.c: macro RAPTOR_URI_AS_STRING -> raptor_uri_as_string * raptor.h: Added raptor_uri_as_string and uri class method * raptor_uri.c (raptor_default_uri_as_string): Added (raptor_uri_as_string): Added, using above for default class. (raptor_uri_init_default_handler): Register the above * raptor_general.c: Use RAPTOR_URI_AS_STRING for getting uri string to make a filename. * raptor_parse.c: Remove uses of IS_RDF_MS_CONCEPT with raptor_uri_equals. Define more concepts for rdf:RDF, rdf:Description and rdf:li * raptor_internal.h: remove IS_RDF_MS_CONCEPT * raptor_qname.c: macro RAPTOR_FREE_URI -> raptor_free_uri * raptor_internal.h: delete macros RAPTOR_FREE_URI, RAPTOR_URI_TO_FILENAME * raptor_general.c: macro RAPTOR_FREE_URI -> raptor_free_uri macro RAPTOR_URI_TO_FILENAME -> raptor_uri_uri_string_to_filename (only use) * ntriples_parse.c: macro RAPTOR_FREE_URI => raptor_free_uri * raptor_uri.c: Add some casts now raptor_uri is a typedef for void* * raptor_internal.h, raptor.h: Remove more RAPTOR_IN_REDLAND prototypes * ntriples.h: Remove more RAPTOR_IN_REDLAND * rdfdump.c: Remove more RAPTOR_IN_REDLAND and old API * raptor_parse.c: Re-add DAML Collection info to rdf_content_type_info table - just plain luck that this was working without it. Add concept URIs table to rdf_xml_parser structure. Change concepts macros to point to the parts of that table. Remove most of the RAPTOR_IN_REDLAND stuff, consequently. * raptor_namespace.c (raptor_namespaces_free): Handle being called when handler/context empty. * raptor_namespace.c: Use raptor_namespace struct raptor_namespace_stack field to get uri handler/context * raptor_internal.h: raptor_namespace: add raptor_namespace_stack field * raptor_general.c (raptor_start_parse): Use changed raptor_namespaces_init call. * raptor_namespace.c: Remove RAPTOR_REDLAND code and use uri_handlre/context args (raptor_namespaces_init): Now takes uri handler, context args. Initialises rdf/rdfs namespace URIs. (raptor_namespaces_free): Free rdf/rdfs namespace URIs. * raptor_general.c: Remove RAPTOR_REDLAND code Call raptor_namespaces_init with raptor URI handler, context * raptor_internal.h: Remove RAPTOR_REDLAND definitions and double prototypes. Added uri_handler, uri_context, rdf_ms_uri, rdf_schema_uri to raptor_namespace_stack. * ntriples_parse.c: Remove RAPTOR_REDLAND code * raptor_uri.c (raptor_uri_get_handler): Added * raptor.h: Added raptor-uri_get_handler. * raptor_uri.c: rename raptor_current_uri_* -> raptor_uri_current_* * raptor_uri.c: Use raptor_current_uri_handler, raptor_current_uri_context throughout. 2002-10-30 Dave Beckett * raptor_uri.c (raptor_uri_set_handler): Added, initialising the static variables raptor_current_uri_handler, raptor_current_uri_context. raptor_init_uri_class -> raptor_uri_init * raptor_general.c, raptor_internal.h: raptor_init_uri_class -> raptor_uri_init * raptor.h: Added raptor_uri_set_handler * raptor_uri.c: raptor_copy_uri -> raptor_uri_copy (raptor_default_uri_copy): Added (raptor_init_uri_default_handler): Added to re-init the default uri class. (raptor_init_uri_class): To initialise the uri class with default handler * raptor_internal.h: Declare uri class init prototypes. * raptor_parse.c, raptor_general.c: raptor_copy_uri -> raptor_uri_copy * raptor.h: raptor_copy_uri -> raptor_uri_copy Added uri handler func definitions. Added raptor_uri_handler, using above funcs 2002-10-15 Dave Beckett * raptor_qname.c: Remove only RAPTOR_IN_REDLAND use - not required. * raptor_uri.c: Updated copyright * ntriples_parse.c: Removed raptor_make_uri; use raptor_new_uri_relative_to_base directly. * raptor.h: Removed raptor_new_uri_from_base_name prototype * raptor.h: Removed all raptor_make_uri prototypes. Added prototypes for raptor_new_uri_relative_to_base, raptor_new_uri_from_id, raptor_new_uri_from_base_name, raptor-new_uri_for_rdf_concept. * raptor_parse.c: RAPTOR_FREE_URI (macro) to raptor_free_uri (method) Removed raptor_make_uri; use raptor_new_uri_relative_to_base directly. Removed raptor_make_uri_from_id: use raptor_new_uri_from_id directly Use raptor_new_uri_for_rdf_concept * raptor_uri.c: Typo. Removed raptor_make_uri; use raptor_new_uri_relative_to_base directly. (raptor_default_new_uri_for_rdf_concept, raptor_new_uri_for_rdf_concept): Added to get URI of rdf:thing 2002-10-13 Dave Beckett * raptor_uri.c (raptor_default_new_uri_relative_to_base, raptor_new_uri_relative_to_base): Added (raptor_new_uri_from_id): Added, was make_uri_from_id (raptor_new_uri_from_base_name): Added, was make_uri_from_base_name * raptor.h: Added new uri methods, soon-to-be old make_uri_* ones * raptor_internal.h: Move uri calls to raptor.h * raptor_parse.c: Remove unused rdf_parser argument of raptor_make_uri_from_id calls. * raptor_uri.c (raptor_make_uri_from_id): Remove unused rdf_parser argument * raptor_uri.c: Start of skeleton code for URI class, along with default methods. (raptor_default_new_uri, raptor_new_uri): Added (raptor_default_new_uri_from_uri_local_name, raptor_new_uri_from_uri_local_name): Added (raptor_default_free_uri,raptor_free_uri): Added (raptor_default_uri_equals, raptor_uri_equals): Added (raptor_make_uri, raptor_make_uri_from_id, raptor_make_uri_from_base_name):Moved from raptor_general.c * raptor_general.c: Move raptor_make_uri, raptor_make_uri_from_id, raptor_make_uri_from_base_name to raptor_uri.c 2002-10-12 Dave Beckett * raptor_parse.c (raptor_xml_parse_terminate): Moved all of raptor_xml_parse_clean here, deleted it. * rdfdump.c: Updated to newest calling API - no special ntriples calls. * raptor_general.c, raptor.h: Tweak raptor_new_parser prototype. * libraptor.3: Updated to describe features * libraptor.3: Updated for shared parser core api * raptor_parse.c: Add raptor_xml_parser here - private struct. * raptor_internal.h: Moved raptor_xml_parser to private file. * raptor_general.c: Tidy raptor_new old api note. * ntriples.h: Updated ntriples parser to new registering API. * ntriples_parse.c: Converted to the new factory-based API. raptor_ntriples_parser_context (and struct version _s) now allocated by main parser code. Use raptor_parser for most methods and calls. (raptor_ntriples_parse_init, raptor_ntriples_parse_terminate): Added (raptor_ntriples_new): Replaced with wrapper around raptor_new_parser("ntriples"). (raptor_ntriples_free): Replaced with wrapper around raptor_free_parser (raptor_ntriples_set_error_handler, raptor_ntriples_set_fatal_error_handler, raptor_ntriples_set_statement_handler, raptor_ntriples_parser_error, raptor_ntriples_parser_fatal_error, raptor_ntriples_parse_file): Replaced with wrappers around general methods. (raptor_ntriples_parse_chunk): Renamed from raptor_ntriples_parse (raptor_ntriples_parse_start): Added from parts of old raptor_ntriples_parse_file. (raptor_ntriples_parser_register_factory): Added to register this with the main system. (raptor_init_parser_ntriples): Added to register this module. 2002-10-11 Dave Beckett * raptor_internal.h: Moved raptor_parser_s here, for use across the library. Lots of rearranging and reordering to move structs earlier. Added raptor_parser_factory_s and typedef. Added prototypes for factory registration calls. * raptor_parse.c: Now uses factory and parser-specific context. (raptor_xml_new, raptor_xml_free, raptor_xml_parse_init): Moved most code to raptor_new_parser, raptor_free_parser, raptor_start_parse (raptor_xml_parse_init_file): Gone. Renamed to match factory methods - raptor_xml_parse_terminate. (raptor_parse_file): Moved to raptor_general.c (raptor_xml_parser_register_factory): Added, for registering factory. (raptor_init_parser_rdfxml): Register parser type "rdfxml". * raptor_general.c: Added parser factory functions and use them via new API. (raptor_init, raptor_finish): Added to start/end raptor. (raptor_delete_parser_factories): Added, helper for cleanup. (raptor_parser_register_factory): Added, for registering parsers (raptor_get_parser_factory): Added, helper for finding a parser (raptor_new_parser): New constructor, uses factory and initialises only general parts of parser. (raptor_start_parse): New method to (re)initialise a particular parse. (raptor_start_parse_file): New method to start parsing from a filename. (raptor_parse_chunk): New method to parse content from memory. (raptor_free_parser): New destructor. (raptor_parse_file): Moved from raptor_parse.c and made general. (raptor_new): Old API constructor, now written over new constructor. (raptor_free): Old API destructor, now just calls new destructor. (raptor_set_world): Temporary redland support. * raptor_namespace.c (raptor_namespaces_free): Zap top of stack when done, so can work when called multiple times. * raptor.h: Added raptor_init(), raptor_finish() Deprecate raptor_new(), raptor_free(). Added raptor_new_praser(), raptor_free_parser(), raptor_start_parser(), raptor_start_parse_file(), raptor_parse_chunk() Temporarily use raptor_set_redland_world. 2002-10-10 Dave Beckett * Makefile.am: Added raptor_general.c * raptor.h: raptor_print_statement_detailed: Now public. * raptor_internal.h, raptor_parse.c, raptor_general.c: Split general parsing routines into raptor_general.c leaving the rdf/xml parsing specific parts in raptor_parse.c. The general raptor_parser structure moved to raptor_internal.h leaving a new raptor_xml_parser for raptor_parse.c [rdf/xml]. 2002-10-07 Dave Beckett * tests/test.html, tests/test.svg: Embedded rdf:RDF tests * raptor_general.c, raptor_parse.c: Call dummy (length calculating) vsnprintf call with a 1-byte buffer rather than NULL - OSX seems unhappy with that. Try to get rdf:RDF scanning working by adding at_grammar_start check rather than apply at all state unknown points. 2002-09-29 Dave Beckett * tests/Makefile.am: Split the checks into classes; ex-19.rdf is for when rdf is assumed since it ommits rdf:RDF, and hence is not really rdf/xml. * rdfdump.c: Added -a,--assume to set feature assume_is_rdf * raptor_general.c, raptor_parse.c: Added rdf:datatype built in. Literal datatype URI stored in containing property element. Added feature_assume_is_rdf to make rdf:RDF optional. (raptor_generate_statement): Add literal datatype URI argument. (raptor_xml_parse_chunk_): Return parser errors in initial XML_Parse correctly - check if it happens even if end of data. Similarly for libxml's xmlParseChunk. (raptor_set_feature): Added feature assume_is_rdf (raptor_print_statement_detailed): Added literal datatype URI printing. (raptor_process_property_attributes): Warn about unqualified (property) attributes, don't try to process them. (raptor_start_element_grammar): Added feature assume_is_rdf splitting scanning for rdf:RDF (feature scanning) and ignoring it (feature assume) * raptor_qname.c (raptor_new_qname): Don't die on non-namespaced XML; could be used in skipping or other processing. * raptor.h: added assume_is_feature datatypes built in raptor_print_ntriples_string now returns an int * LICENSE.html: Tidy intro, update dates * ntriples_parse.c: change anon->bnodeid Add ASCII rather than is* locale-tests and validate bnodeIDs with the macros (parse_ntriples_string): Check for invalid ASCII chars. Tidy error reporting for end of line. (raptor_ntriples_parse_line): Add validation of bnodeIDs (raptor_ntriples_parse_file): Comments (raptor_print_ntriples_string): Handle failure, add a return code * ntriples.h: change anon->bnodeid * configure.in: datatypes built in now * Makefile.am: Clean the test programs 2002-09-19 Dave Beckett * Makefile.am: Restore rule to make librdf.la for when embedded in Redland * TODO.html: remove duplicate bagID bug * TODO.html: CDATA works with libxml now * raptor_libxml.c (raptor_libxml_init): Enable handling of cdata blocks - by registering callback to raptor_xml_cdata_handler * tests/ex-40.out: Fix node * tests/Makefile.am: Added ex-40 * tests/ex-40.out, tests/ex-40.rdf: Check XML CDATA sections * Makefile.am: dist-hook added to copy pre-built README and NEWS to release 2002-09-18 Dave Beckett * raptor_namespace.c (raptor_namespace_new): Fix debug message to report no URI for namespace. * raptor_namespace.c (raptor_namespace_new): Make xmlns="" work when compiling inside Redland. 2002-09-16 Dave Beckett * raptor_parse.c (raptor_xml_parse_chunk_): For libxml, don't pass in filename to xmlCreatePushParserCtxt, we may not always have one. For lbixml, return correctly from initial parsing. (raptor_xml_parse_chunk): Add docucomments. (raptor_parse_file): Terminate loop on end of file as well as error. * Makefile.am: Added REDLAND_LIBS to raptor_namespace_test to make it work inside redland 2002-09-12 Dave Beckett * TODO.html: daml:collection fixed * raptor_parse.c (raptor_parse_file): Split into: raptor_xml_parse_init, raptor_xml_parse_init_file, raptor_xml_parse_clean and raptor_xml_parse_chunk to allow more flexible APIs. (raptor_xml_parse_chunk_): Added, doing the main work of raptor_xml_parse_chunk but without error checking. (raptor_xml_parse_handle_errors): Added to process errors from an XML parser during parsing. * raptor_namespace.c: Make it work inside redland too. Fix standalone tests inside redland. 2002-09-11 Dave Beckett * raptor_internal.h: Moved namespace and qname definitions and prototypes here from raptor_parse.c * Makefile.am: Added raptor_namespace.c raptor_qname.c * raptor_parse.c: Moved namespace code to raptor_namespace.c, qname code to raptor_qname.c and renamed raptor_ns_map, raptor_ns_na,e to match. * raptor_qname.c: Raptor XML qname * raptor_namespace.c: Raptor XML namespace classes 2002-09-01 Dave Beckett * raptor_parse.c: Use updated LIBRDF_RS URI names * raptor_parse.c: Added rdf:parseType="Collection" after daml:collection code * tests/Makefile.am: Added test ex-39 for parseType Collection * tests/ex-39.out, tests/ex-39.rdf: rdf:parseType="Collection" test * raptor_parse.c: Change daml:Collection, daml:* comments to Collection, rdf:List etc. 2002-08-31 Dave Beckett * raptor_parse.c (raptor_end_element_grammar): Generate rdf:nodeID, store in id, not URI field. Rearrange three calls of raptor_process_property_attributes into one. * tests/Makefile.am: Use ECHO_N and ECHO_C to do portable echo without newline * configure.in: Pass on echo pre/postfix args needed for echoing without a newline * tests/Makefile.am: Instead of ignoring warnings, make make ignore exit codes from rdfdump * tests/Makefile.am: Ignore warnings (for now) in tests * tests/Makefile.am: Remove RDF_TEST_ANSWER_FILES - not used * raptor_parse.c (raptor_start_element_grammar): Don't copy URIs from daml:collection to the contained nodes. * tests/ex-34.out: Now correct. 2002-08-29 Dave Beckett * tests/Makefile.am: Added ex-38 * tests/ex-38.rdf, tests/ex-38.out: Test daml:Collection with rdf:ID * tests/ex-37.out: switch order again * raptor_parse.c (raptor_element_has_property_attributes): Check for rdf: properties too * tests/ex-37.out: Correct order, nodes in result * tests/ex-37.out, tests/ex-37.rdf: rdf:type attribute on empty property * tests/Makefile.am: Added ex-37 2002-08-28 Dave Beckett * raptor_parse.c: Fixed empty daml:Collection handling * raptor_uri.c: Minor strcat/strcpy optimisation * tests/ex-34.rdf: Renamed nodes so prop2 goes with node2 etc. * tests/ex-34.out: renamed genids to more match output * tests/ex-35.out, tests/ex-35.rdf, tests/ex-36.out, tests/ex-36.rdf: Added more daml:Collection checks * tests/ex-24.out: output order changed, same triples * tests/Makefile.am: Added ex-35, ex-36 for more daml:Collection checks * tests/ex-12.out: output order changed, same triples 2002-08-22 Dave Beckett * raptor_parse.c: removed fn not used * raptor_parse.c: Update xml namespaces comment with NE05 errata * raptor_parse.c: Removed use of obsolete object_is_literal statement field Added rdf datatypes test code * ntriples_parse.c: Removed use of obsolete object_is_literal statement field * raptor.h: Add statement object datatype uri * configure.in: Add rdf datatypes test flag --enable-rdf-datatypes * acconfig.h: Add rdf datatypes test flag 2002-08-21 Dave Beckett * TODO.html: Updates: OSX compiling works (from packaged sources) Still works with latest expat (1.95.2), libxml (2.4.23) 2002-08-20 Dave Beckett * raptor_uri.c (raptor_uri_uri_string_to_filename): Freeing wrong things * ntriples_parse.c, raptor_parse.c, raptor_internal.h: Remove RAPTOR_URI_AS_FILENAME * raptor.h: Added raptor_uri_is_file_uri * configure.in: Added limits.h check * raptor_internal.h: Added raptor_strncasecmp * raptor_uri.c (raptor_uri_is_file_uri): Added. * Makefile.am: Added strcasecmp_test * strcasecmp.c (raptor_strncasecmp): Added (assert_strcasecmp, assert_strncasecmp): Added for testing. (main) Added to run tests * raptor_uri.c: (raptor_uri_filename_to_uri_string); For unix filename "foo", get dir and name it "/dir/foo". (main): Check above works using /tmp dir - warn if can't chdir(/tmp) * raptor_internal.h: Replaced raptor_file_uri_to_filename with aptor_file_uri_to_filename * raptor_parse.c, ntriples_parse.c: Removed raptor_file_uri_to_filename * raptor_uri.c (raptor_uri_filename_to_uri_string, raptor_uri_uri_string_to_filename): fix unix relative file file:foo and bad win32 authority check. (main): Check unix foo/file:foo works * raptor.h: Added raptor_uri_filename_to_uri_string and raptor_uri_uri_string_to_filename * raptor_uri.c (raptor_uri_filename_to_uri_string): Added for filename to file: URI for win32 and unix. (raptor_uri_uri_string_to_filename): Added for file: URI to filename for win32 and unix. (assert_filename_to_uri,assert_uri_to_filename): Added for regression testing. (main): Tests for win32 / unix filename / file:URIs 2002-08-19 Dave Beckett * INSTALL.html: Added some more xml library versions * raptor_parse.c: Remove a lot of raptor_update_document_locator calls and add them to the start of several functions. Replace some expat-specific stuff with general calls. * raptor_parse.c: Add raptor_update_document_locator calls before every parser error or warning. (raptor_expat_update_document_locator): Added. * raptor_internal.h: Export raptor_libxml_update_document_locator Export raptor_expat_update_document_locator Export raptor_update_document_locator * raptor_libxml.c (raptor_libxml_update_document_locator): Now not static. Remove column numbers - they seem to be total fiction. * raptor_locator.c (raptor_update_document_locator): Added. * raptor_parse.c (raptor_xml_cdata_handler): Allow to be ignored when there is no element (XML very damaged) * rdfdump.c: Tidy output formatting * raptor_libxml.c: Delete extra '\n' at end of XML parsing messages; that's up to the app to add. * raptor_parse.c: Removed some \n-s from warning/error messages * raptor_locator.c (raptor_format_locator): Don't count \0 in buffer size. * Makefile.am: Added raptor_locator.c * raptor.h: Added raptor_format_locator * raptor_locator.c: Raptor parsing locator functions * raptor_parse.c: Moved raptor_print_locator to raptor_locator.c * rdfdump.c: Updated for raptor error handlers passed on as strings, not va_list * ntriples_parse.c: raptor errors passed on as strings, not va_list (raptor_ntriples_parser_error, raptor_ntriples_parser_fatal_error): Turn va_list into a string. * raptor_parse.c: raptor errors passed on as strings, not va_list (raptor_parser_fatal_error_varargs, raptor_parser_error_varargs, raptor_parser_warning_varargs): Turn va_list into a string. * raptor.h: raptor errors passed on as strings, not va_list 2002-08-18 Dave Beckett * Makefile.am: Add LTLIBOBJS to raptor library, not rdfdump * configure.in: Set LIBOBJS and LTLIBOBJS * configure.in: Check for strcasecmp, stricmp or use compatibility version * raptor_internal.h: Define raptor_strcasecmp to library routine, or leave alone for compatibility function. * Makefile.am: Added @LIBOBJS@ and strcasecmp.c * strcasecmp.c: strcasecmp compatibility * raptor_parse.c: strcasecmp now raptor_strcasecmp, will be defined to right function * win32_config.h: Don't use macros for strcasecmp; now handled generally * Makefile.am: Added raptor_internal.h, win32_config.h to noinst headers Added raptor_win32.c * raptor_win32.c: Raptor WIN32 support functions * win32_config.h: Raptor WIN32 hard-coded config * rdfdump.c: Tidying up stdlib.h, dmalloc.h includes. Include win32_config.h #ifdef WIN32 * raptor_parse.c, raptor_uri.c: Tidying up stdlib.h, dmalloc.h includes. Removed stuff duplicated in raptor.h/raptor_internal.h Include win32_config.h #ifdef WIN32 * raptor_libxml.c: Tidying up stdlib.h, dmalloc.h includes. Include win32_config.h #ifdef WIN32 * ntriples_parse.c: Tidying up stdlib.h, dmalloc.h includes. Removed stuff duplicated in raptor.h/raptor_internal.h Include win32_config.h #ifdef WIN32 * raptor_internal.h: Moved libxml includes, defines and structs here. Declared extern function prototypes for libxml interface. * raptor_parse.c: Use errno.h, not extern int errno Moved most libxml code to new raptor_libxml.c Moved necessary includes, defines and structs to raptor_internal.h Some renaming of functions; raptor_libxml* for those related to libxml Some functions now not static. Added some necessary methods for accessing raptor_parser structure for libxml. (raptor_get_locator): Added; new public method. * raptor.h: Added raptor_get_locator * ntriples_parse.c: Use errno.h, not extern int errno * Makefile.am: Added raptor_libxml.c * raptor_uri.c: Use errno.h if present * raptor_libxml.c: Raptor libxml functions * raptor_parse.c: Added 12 wrapper functions for libxml handlers, passing on the right context to them, to enable handling of entities and resolving them. (raptor_xml_update_document_locator): Handle if in document subset Changed internal raptor fatal_error, error, warning functions to have varargs versions that libxml can use. (raptor_new): Initialise new libxml handler wrappers 2002-08-17 Dave Beckett * rdfdump.c: Set ntriples error handler * ntriples_parse.c: Added fatal/non-fatal error handlers/functions. (raptor_ntriples_set_error_handler): Added. (raptor_ntriples_string): Documented args; now returns failure status. (raptor_ntriples_parser_error): Added for non-fatal errors (bad lines). (raptor_ntriples_parser_fatal_error): Fix passing on va_list arguments. * ntriples.h: Added raptor_ntriples_set_error_handler 2002-08-13 Dave Beckett * configure.in: Add check for errno.h Only link dmalloc if dmalloc.h is present (maintainer mode) * ntriples_parse.c: Add use of errno.h if present * raptor_parse.c: Add use of errno.h if present Minor comments fix When rdf:Description seen, go straight to state DESCRIPTION rather than via OBJ 2002-08-07 Dave Beckett * raptor_parse.c: Added rdf:List, rdf:first, rdf:rest (not used yet) Added rdf:nodeID for bnodes as subject/objects like rdf:about/rdf:resource * raptor.h: Added RAPTOR_URI_SOURCE_BLANK_ID (for rdf:nodeID) 2002-07-29 Dave Beckett * configure.in: default xml parser now libxml * INSTALL.html: Update --with-xml-parser docs 2002-07-28 Dave Beckett * autogen.sh: Fix use of srcdir/find * Makefile.am: Add -I's for compiling test programs 2002-07-22 Dave Beckett * TODO.html: moved Redland parser todos here 2002-07-20 Dave Beckett * tests/Makefile.am: Added ex-34 * tests/ex-34.out, tests/ex-34.rdf: Test daml:collection lists with blank nodes * configure.in: Modify cflags to use redland srcdir not builddir * Makefile.am: zap 'finish' stuff 2002-07-17 Dave Beckett * raptor_parse.c (raptor_end_element_grammar): Get rdf:ID working on empty propertyElt with rdf:parseType="Resource" * raptor_parse.c: Added reified raptor_identifier, changed code to use it for rdf:ID value Store rdf:bagID in bag raptor_identifier * raptor_parse.c (raptor_element_has_property_attributes): Created, returns true iff a property element has property attributes (raptor_start_element_grammar): For property elements, move handing property attributes to close of element, only then can the resource URI be known. (raptor_end_element_grammar): Update after above change. For property elements that are empty (empty literal), create a new blank node and hang the property attributes off that. * raptor_parse.c: Warn and continue when element content is seen inside a 2002-07-15 Dave Beckett * tests/Makefile.am: make check sh stuff not echo * tests/Makefile.am: Add ex-33 * tests/ex-33.out, tests/ex-33.rdf: Check properties work off node generated by empty propertyElt 2002-07-15 Dave Beckett * tests/Makefile.am: make check sh stuff not echo * tests/Makefile.am: Add ex-33 * tests/ex-33.out, tests/ex-33.rdf: Check properties work off node generated by empty propertyElt 2002-07-14 Dave Beckett * Makefile.am: Add REDLAND_LIBS to rdfdump dependencies Add rule to build librdf.la if needed 2002-07-13 Dave Beckett * Makefile.am: Zap -static arg for rdfdump, seems to annoy libtool Pass on redland libs, cflags as necessary * ntriples.h: Change all LIBRDF_INTERNAL to RAPTOR_IN_REDLAND * rdfdump.c: Change all LIBRDF_INTERNAL to RAPTOR_IN_REDLAND Update to newest librdf world open/close calls * raptor_parse.c: Tidy - 2 includes of stdlib.h Change all LIBRDF_INTERNAL to RAPTOR_IN_REDLAND * raptor_internal.h: Lose all redland includes - for app code * raptor.h: Include librdf and uri headers when in Redland Change all LIBRDF_INTERNAL to RAPTOR_IN_REDLAND * configure.in: Define REDLAND_LIBS, REDLAND_CPPFLAGS for use when building in redland * raptor_parse.c: Moved debugging stuff to raptor_internal.h Use updated raptor includes * rdfdump.c: Use updated raptor includes * raptor_uri.c: Don't include Redland rdf_config.h Use updated raptor includes * ntriples_parse.c: Use updated raptor includes * raptor.h: Removed all standard includes Moved URI stuff to raptor_internal.h except for typedef (needed for prototypes) * raptor_internal.h: Internal raptor definitions * Makefile.am: Added raptor_internal.h * configure.in: Fix raptor in redland check. * ntriples_parse.c, raptor_parse.c: don't include redland rdf_config.h - use ours * configure.in, acconfig.h: added RAPTOR_IN_REDLAND 2002-07-12 Dave Beckett * raptor.h: include stdarg.h here * tests/Makefile.am: Added ex-32 * tests/ex-32.out, tests/ex-32.rdf: Test property attributes with rdf:resource * raptor_parse.c (raptor_process_property_attributes): Pass in an optional identifier to use for the resource node. Use that to process property attributes along with rdf:resource, at the close of the (empty) propertyElt. 2002-07-11 Dave Beckett * raptor_uri.c (raptor_uri_resolve_uri_reference): Handle base URI without a path such as "http://example.org" * Makefile.am: Tidy test program args +$(DEFS) to add crucial -DHAVE_CONFIG_H * rdfdump.c (rdfdump_error_handler): Use va_list form (rdfdump_warning_handler): Use va_list form * raptor_parse.c (raptor_xml_start_element_handler): Warn about unqualified rdf: attributes * ntriples_parse.c (raptor_ntriples_parser_fatal_error): now passes on va_list * raptor.h: API change: raptor_message_handler callback now takes a va_list as final argument * rdfdump.c: Make warning/error messages neater * rdfdump.c: Added -w - ignore warnings (rdfdump_warning_handler): Added (rdfdump_error_handler): Added Count warnings, errors and exit with #errors, or 128+#warnings * raptor_parse.c: When a property has multiple objects, give an error and skip the rest of that element * tests/Makefile.am: Added bad-01.rdf * tests/bad-01.rdf: A property must have only one node value * rdfdump.c: (rdfdump_error_handler) Added. Exit 1 on an error, don't keep going * tests/Makefile.am: Fix bad test checking again 2002-07-10 Dave Beckett * Makefile.am: Added LOCAL_LIB_DIR for finish * Makefile.am: Fix args for compiling tests 2002-07-07 Dave Beckett * Makefile.am: Added finish target to install to lib Tidy up test program building * raptor_parse.c: Allow non-namespaced elements to be recognised and skipped 2002-06-30 Dave Beckett * tests/Makefile.am: typo * Makefile.am: Added 'make deb' target * tests/rdf-schema.out, tests/rdfs-namespace.out: RDFS schema answers * tests/Makefile.am: Fix rdfs checks * tests/Makefile.am: Add two RDFS schema namespaces * tests/rdf-schema.rdf, tests/rdfs-namespace.rdf: RDFS schemas * raptor_parse.c: (raptor_parser_error) Make this default to exit(1) (raptor_start_element_grammar): Die when a second object is tried to be set for a statement * tests/Makefile.am: Check negative tests correctly * autogen.sh: Add libtoolize cleanup, check and run * configure.in: fix AC_OUTPUT * Makefile.am, configure.in: Added debian dir 2002-06-26 Dave Beckett * win32/README: win32 README * autogen.sh: Added GNU config.* copy test 2002-06-14 cmdjb * tests/Makefile.am: Added bad test checking Added bad-00.rdf * tests/bad-00.rdf: Added bad test 00 * configure.in: Added raptor-config * libraptor.3, rdfdump.1: Raptor manual pages * Makefile.am: Added raptor-config Added manual pages Make rdfdump static only for maintainer * raptor-config.in: Raptor configuration script 2002-06-08 Dave Beckett * raptor_parse.c (raptor_generate_id): Hack - make genids be sequential through lifetime of code, not start from 1 again at parsing. * raptor.h: Add some RAPTOR_API defs for newer functions * configure.in: Use NULL for XML_ParserCreate in first check too * configure.in: Bumped version to 0.9.6 * Snapshotted raptor_0_9_5 for 0.9.5 release * autogen.sh: Delete libtool generated files before running automake (which invokes libtoolize to do this) * configure.in: Remove duplicate check of stdlib.h * Makefile.am: Pass on -D defs when building tests * raptor_uri.c: Include stdlib.h for malloc * configure.in: Call XML_ParserCreate with NULL to prevent crash (seen on alpha) * configure.in: Check for required libxml function xmlCreatePushParserCtxt (libxml 1.8.3+) * NEWS.html: Updated for 0.9.5 release * TODO.html: tidy * Makefile.am: Don't compile raptor_cc.c into library, for this release (not used yet). 2002-06-06 Dave Beckett * tests/Makefile.am: Added ex-31 * tests/ex-31.out, tests/ex-31.rdf: Tests for rdf:li with parseType Resource * raptor_parse.c: Make rdf:li work with parseType resource 2002-06-05 Dave Beckett * raptor_parse.c: made rdf:foo (unknown) attribute generate the statement and a warning * raptor_parse.c: Add further allowed rdf: properties (subject, predicate, object) and classes (Seq Bag Alt Statement Property) 2002-06-04 Dave Beckett * raptor_parse.c (raptor_make_uri_from_id,raptor_make_uri): Fold in relative URI resolution. (raptor_make_uri_from_base_name): Added (raptor_process_property_attributes): Use latter to create rdf: names * configure.in: Check for stdlib.h * raptor_uri.c: Remove prototype => raptor.h * raptor.h: A little tidying. Export raptor_uri_resolve_uri_reference * raptor_uri.c: comment * raptor_uri.c (raptor_uri_parse): Update comments (raptor_uri_resolve_uri_reference): Lots more comments. Rejigged structure to tidy up in one place. Removed all static buffers. * tests/Makefile.am: Added ex-30 * tests/ex-30.out, tests/ex-30.rdf: Tests that bare about attr works with a default ns * raptor_parse.c (raptor_make_namespaced_name): Make bare 'about' attribute (etc) work even when a default namespace is declared. 2002-06-03 Dave Beckett * raptor_parse.c: Don't pass parsetype_resource child element state to parent element->child_element - i.e. proto state of next child element 2002-06-02 Dave Beckett * raptor_parse.c: attribute => attr to fix gcc warning about shadowing a global (?why) * raptor_parse.c: RBS -> RAPTOR_XML_READ_BUFFER_SIZE (raptor_parse_file) Added work around for some libxml versions failing to work when file is smaller than buffer size. 2002-05-31 Dave Beckett * raptor_parse.c: Various places: fix a bunch of casts to make g++ happy Replace several unsigned int i with int i when used as array index. * ntriples_parse.c: Various places: fix a bunch of casts to make g++ happy Replace several unsigned int i with int i when used as array index. (raptor_ntriples_string): Fix %c in format string (raptor_ntriples_unicode_char_to_utf8): Use unsigned long 2002-05-29 Dave Beckett * raptor_parse.c: fix xml_language qualifier * tests/Makefile.am: Add ex-29 * tests/ex-29.out, tests/ex-29.rdf: Test xml:lang info gets passed to output * raptor_parse.c (raptor_xml_end_element_handler): Don't pop element before doing end grammar, so that rdf_parser->current_element is correct during end grammar work. * raptor_parse.c, ntriples_parse.c: Include stdlib.h for some prototypes. 2002-05-28 Dave Beckett * raptor_parse.c (raptor_end_element_grammar): When zapping content_cdata, always make length 0 2002-05-26 Dave Beckett * tests/ex-28.out, tests/ex-28.rdf: Test case for property after parseType resource property inherting parseType resource-ness * tests/Makefile.am: Added test case 28 * raptor_parse.c (raptor_start_element_grammar): Don't copy the parsetype-resource generated node URI up to parent element * tests/Makefile.am: Added test case 27 * tests/ex-27.out, tests/ex-27.rdf: Test case for wrong ID on 3rd parseType resource off a node 2002-05-24 Dave Beckett * ntriples_parse.c: Wrap errno with #ifndef WIN32 2002-05-08 Dave Beckett * raptor_parse.c: Lessen some librdf compile warnings about char* and xmlChar* strings * raptor_parse.c (raptor_free_xml_entity): Moved earlier in code (raptor_xml_new_entity): Use LIBRDF_MALLOC 2002-05-07 Dave Beckett * acconfig.h: Added libxml xmlEntity field defs * configure.in: Check less libxml headers. If libxml main headers missing, disable library Check for xmlEntity fields name_length and etype * raptor_parse.c: Added new entity recording, expanding stuff for libxml (raptor_xml_add_entity, raptor_xml_new_entity, raptor_xml_entity_decl, raptor_xml_get_entity, raptor_xml_free_entity, raptor_xml_free_entities): Added or substantially updated 2002-04-29 Dave Beckett * raptor_parse.c: tail_id is a char*, not a redland URI 2002-04-28 Dave Beckett * raptor_parse.c: (raptor_new) Initialise entities table count to 0 since xmlCreateEntitiesTable sometimes doesn't do it. 2002-04-27 Dave Beckett * acconfig.h, configure.in, raptor_parse.c: renamed NEED_EXPAT/LIBXML to RAPTOR_XML_EXPAT/LIBXML so that raptor can be linked to apps (such as Redland) that may have both * configure.in: Added configure warning about failure of expat UTF8 BOM and how to fix. * configure.in: Perform expat BOM check only when a working expat found * raptor_parse.c, configure.in, acconfig.h: Rename EXPAT_ERROR_CRASH to EXPAT_NO_UTF8_BOM - expat 1.95.1 fails on an initial UTF-8 BOM sequence. expat 1.95.2 onwards fixes this. * acconfig.h: Added EXPAT_ERROR_CRASH * raptor_parse.c: If EXPAT_ERROR_CRASH then count XML tokens and only try to get line, col, byte counts after 1 token has been seen. * configure.in: Add test for expat failure in error reporting before 2002-04-24 Dave Beckett * INSTALL.html: Added CVS instructions, tidied and expanded * tests/ex-22.rdf: ex-22 2002-04-22 Dave Beckett * configure.in: Look for gnome-xml/xmlmemory.h header * raptor_parse.c: Add a bunch of stuff for libxml1 to handle adding/removing entity decls (raptor_xml_free_entity): Now libxml2 only (raptor_xml_libxml1_add_entry): Added, libxml1 only (raptor_xml_add_entity): Call libxml2 code or raptor_xml_libxml1_add_entry for libxml1 (xmlHashLookup): Added, libxml1 only * tests/Makefile.am: Added ex-26 * tests/ex-26.out, tests/ex-26.rdf: Test entities get expanded in attributes * configure.in: Look for libxml/parser.h libxml/hash.h * raptor_parse.c: For libxml, Use libxml/parser.h (v2) or gnome-xml/parser.h (v1) Include libxml/hash.h for v2 Add xml entities support (raptor_xml_free_entity): Pulled from xmlFreeEntity (raptor_xml_add_entity): Pulled from xmlAddEntity (slight change to API) (raptor_xml_entity_decl): Added (raptor_xml_get_entity): Added (raptor_new): Use raptor_xml_entity_decl, raptor_xml_get_entity and ask for them to be called. (raptor_parse_file): Free entity stuff. 2002-04-17 Dave Beckett * tests/Makefile.am: Added ex-25* * tests/ex-25.out, tests/ex-25.rdf: Check mixing rdf:li and rdf:_n works * raptor_parse.c (raptor_print_statement_detailed): Handle printing ordinal objects * raptor_parse.c (raptor_print_statement_as_ntriples): Handle printing ordinal objects * raptor_parse.c (raptor_xml_end_element_handler): Don't overwrite state PROPERTYELT with MEMBER, it will be switched over when necessary. * raptor_parse.c: Make unknown/other parsetypes work like Literal 2002-04-05 Dave Beckett * Makefile.am: Re-add raptor_cc.c raptor_uri.c to sources, tests, distribution 2002-03-27 Dave Beckett * configure.in: Bumped version to 0.9.5 * Snapshotted raptor_0_9_4 for 0.9.4 release * configure.in: Added check for GNU tar * Makefile.am: Added TAR * INSTALL.html, LICENSE.html: Updated HTML. * README.html: Updated for 0.9.4 release Updated HTML. * TODO.html: Updated HTML. * NEWS.html: Added notes for 0.9.4 release Updated HTML. * NEWS.html: Tidy footer * Makefile.am: Remove raptor_cc, raptor_uri stuff from distribution for this release * raptor_parse.c: Or instead, add const to tail_id * raptor_parse.c: Remove const from idList 2002-03-26 Dave Beckett * Makefile.am: Don't compile the as-yet unused raptor_cc raptor_uri into the library, for now. * configure.in: Try to ensure -g is used in --maintainer-mode * raptor_parse.c: daml:collection changes Use a genid (char*) for storing daml:list last anon node Replace all uses of the URI with the id Make a typedNode inside a daml:collection generate the rdf:type statement Move the daml:nil generation to the parent property * TODO.html: Some more bugs in daml:collection (but others fixed) Noted rdf:bagID isn't complete * tests/Makefile.am: Added ex-24.rdf ex-24.out * tests/ex-12.out: Correct test result. * tests/ex-24.rdf, tests/ex-24.out: Added to test daml:collection with typed nodes inside 2002-03-24 Dave Beckett * tests/ex-17.out: Fix answer; gives an empty literal 2002-03-23 Dave Beckett * TODO.html: Note xml:base and xml:lang support added * raptor_parse.c (raptor_generate_statement): Only process language for literal objects 2002-03-17 cmdjb * raptor_parse.c: Added xml:lang and xml:base support Use raptor_inscope_base_uri throughout, any time a URI is created in a document. Delete/ignore other xml* attributes when seen; XML spec governs their use. (raptor_generate_statement): Add language support. (make_uri_from_id): Use raptor_inscope_base_uri (raptor_start_element_grammar): Updated node state comments (raptor_inscope_xml_language): Added (raptor_inscope_base_uri): Added * Makefile.am: Added raptor_uri.c * raptor_uri.c: Raptor URI resolving implementation 2002-03-12 cmdjb * configure.in: Added --enable-release to turn on -O2 * configure.in: Strip -O2 from maintainer mode cflags * raptor_parse.c: Fix parseType resource (pTr) inside parseType resource. Don't copy up the pTr element object to parent element, since the pTr property is the 'parent' of the pTr object * tests/Makefile.am: Added ex-23 * tests/ex-23.out, tests/ex-23.rdf: Added test for embedded parseType Resource * raptor_parse.c: Skip elements with aboutEach or aboutEachPrefix * tests/test.out, tests/test.nt: Added xml literals and lang-string literals * ntriples_parse.c: Replaced xml(...) with xml"..." throughout Got "string"-lang working. 2002-03-11 Dave Beckett * raptor_parse.c (raptor_print_statement_as_ntriples): Updated for xml"foo" / xml"foo"-en N-Triples format * tests/ex-11.out, tests/ex-07.out: Updated for xml"foo" / xml"foo"-en N-Triples format 2002-03-06 Dave Beckett * raptor_parse.c: Added content type property_content set when content type isn't unknown, but known to be value of a property * tests/ex-22.out: Fixed for ordering actually generated * raptor_parse.c: Handle bare rdf attributes correctly; only check when they have no namespace. Handle sequence of description/typed node blocks by handling both as typed nodes and changing to description if necessary. * tests/ex-21.out: Correct typos * raptor.h: Removed aboutEach* identifier types * raptor.h: Added prototype for raptor_print_ntriples_string * ntriples_parse.c (raptor_print_ntriples_string): Added docu-comment * tests/Makefile.am: Addex ex-22 * tests/ex-22.out: Fix base URI of answers * tests/Makefile.am: Made tests report pass/fail and return exit code to match this * tests/ex-21.out, tests/ex-22.out, tests/test.out, tests/ex-09.out, tests/ex-10.out, tests/ex-11.out, tests/ex-12.out, tests/ex-13.out, tests/ex-14.out, tests/ex-15.out, tests/ex-16.out, tests/ex-17.out, tests/ex-18.out, tests/ex-19.out, tests/ex-20.out, tests/22-rdf-syntax-ns.out, tests/ex-00.out, tests/ex-01.out, tests/ex-02.out, tests/ex-03.out, tests/ex-04.out, tests/ex-05.out, tests/ex-06.out, tests/ex-07.out, tests/ex-08.out: Test N-Triples answers 2002-03-05 Dave Beckett * ntriples_parse.c: Added some missing prototypes. (raptor_ntriples_generate_statement): Added support for literal language, is_XML throughout. Generate string/XML literals. (raptor_ntriples_utf8_to_unicode_char): Added based on librdf_utf8_to_unicode_char (raptor_ntriples_string): Move the start pointer once the string has been parsed. Added literal language (partial), XML support (done) (raptor_print_ntriples_string): Added; writes a ntriples-escaped string, handling all escapes. Uses raptor_ntriples_utf8_to_unicode_char * raptor_cc.gperf: A little strlen removal/optimising. Added more test cases * raptor.h: raptor_statement: Added object_literal language, is_XML flag * Makefile.am: Added raptor_cc.c, raptor_cc.gperf and unit test * raptor_cc.gperf: Added function documentation. Use constant pointers to constant strings Tidy testing messages * raptor_cc.gperf: Raptor ISO 3166 country code handling * raptor_parse.c (raptor_print_statement_as_ntriples): Start updating N-Triples output for xml() support and quote the literals using raptor_print_ntriples_string * raptor_parse.c: Removed more aboutEach, aboutEachPrefix mentions * raptor_parse.c: Generate statement for parseType resource between parent and content * tests/Makefile.am, tests/ex-21.rdf: Test that rdf: namespace prefixes work * tests/ex-13.rdf: Fix comment 2002-02-05 Dave Beckett * raptor_parse.c (raptor_start_element_grammar): Change a series of if statements about state, to be based on a switch on content_type * raptor_parse.c (raptor_start_element_grammar): parseType Literal uses content_type XML Literal Add XML_LITERAL content type to be used when preserved is * raptor_parse.c (raptor_start_element_grammar): Moved property rdf:resource checking to end element * raptor_parse.c (raptor_start_element_grammar): FOr rdf:li properties, don't loop around state * raptor_parse.c (raptor_start_element_grammar): Use content_type not state for finding daml collections. * raptor_parse.c (raptor_start_element_grammar): Remove explicit checks for built-in container types. * raptor_parse.c: Removed old block_type comment * raptor_parse.c: Remove IN_RDF reference * raptor_parse.c: Change content_type / child_content_type when the state / child_state is set Change content_type when parseType changes. * raptor_parse.c (raptor_xml_cdata_handler): Changed to handle a few state exceptions and then work on a content_type basis. When reading a property value, if non-whitespace content is found, set the content type to be literal. * raptor_parse.c (raptor_xml_end_element_handler): If there is a parent, pass the last state of this element back up. * raptor_parse.c (raptor_xml_start_element_handler): Update literal handling to use element content_type. Initialise to unknown, then from the value passed from the parent element if there is one. Use the flags of the content type to do the checks. Ensure that when an element is found as a property value, content type switches to RESOURCE to expect a resource (node). * raptor_parse.c: Added a bunch of LIBRDF_DEBUG* statements; tided output of others. * raptor_parse.c: typed_node=>typedNode * raptor_parse.c: Deleted states 6.29 (referencedItem) and 6.30 (inlineItem); now that rdf:li is the same as any other property * raptor_parse.c: More EMPTY=>RESOURCE; code at this stage won't work * raptor_parse.c: Added some new content types Uses of type EMPTY replaced with RESOURCE * raptor_parse.c: (raptor_xml_start_element_handler): Initialise user_data, locator inside code body; gcc3.x wasn't doing it in the order of declarations. * raptor_parse.c: Added RAPTOR_ELEMENT_CONTENT_TYPE_LAST to make it compile again * raptor_parse.c: comment tidy * raptor_parse.c: Added child_content_type to parser state * raptor_parse.c: Added rdf_content_type_info (raptor_element_content_type_as_string): Added * raptor_parse.c: Removed raptor_typed_node_block_type * raptor_parse.c: Include dmalloc.h (optionally) after stdlib.h - keeps some gcc3 versions happier 2002-02-03 Dave Beckett * tests/Makefile.am: Added 22-rdf-syntax-ns.rdf rdf namespace test * tests/22-rdf-syntax-ns.rdf: Added RDF namespace schema to tests * tests/ex-11.rdf: Use parseType 'Literal' (specific value) rather than 'literal' which just gets turned into parseType literal by the default rules. * tests/Makefile.am: Throw away stderr on make check; if it fails, I can find out by hand raptor-1.4.21/ChangeLog.40000644000175000017500000025725610172250736011767 000000000000002003-12-31 Dave Beckett * raptor_rss.c, raptor_parse.c, ntriples_parse.c, n3_parser.y: Use expanded raptor_parser_register_factory with mime_type and uri_string args where appropriate. * libraptor.3, raptor.h: Added raptor_syntaxes_enumerate * raptor_general.c (raptor_parser_register_factory): Add mime_type and uri_string args, both optional. (raptor_syntaxes_enumerate): Added to get syntax name, label, mime_type or uri_string - all optional. (raptor_parsers_enumerate): Uses raptor_syntaxes_enumerate. * raptor_internal.h: Store parser mime_type, URI in raptor_parser_factory Update raptor_parser_register_factory to take mime_type, uri_string args. * configure.ac: Bumped version to 1.2.0 * Snapshotted raptor_1_1_0 for 1.1.0 release * configure.ac: Update RAPTOR_LIBTOOL_VERSION to reflect interfaces added, none removed giving current 2:0:1 * NEWS.html: 1.1.0 released 2003-12-31 * libraptor.3: nroff/man style tweaks 2003-12-31 Dave Beckett * libraptor.3: nroff/man style tweaks 2003-12-30 Dave Beckett * NEWS.html: Link to W3C docs for 1.1.0 * configure.ac: words * configure.ac: Make flex version warnings mention N-Triples Plus more 2003-12-30 Dave Beckett * NEWS.html: Link to W3C docs for 1.1.0 * configure.ac: Make flex version warnings mention N-Triples Plus more 2003-12-29 Dave Beckett * TODO.html, README.html, NEWS.html, LICENSE.html, INSTALL.html: XHTML 1 strict * NEWS.html: Prepare for 1.1.0 * libraptor.3: bump date * raptor_stringbuffer.c (main): Do not free as_string returned strings * raptor_stringbuffer.c: brackets * raptor_stringbuffer.c (raptor_free_stringbuffer): Free any constructed string. * raptor_xml_writer.c: Use raptor_stringbuffer to better grow the output cdata. * raptor_stringbuffer.c: stringbuffer now uses unsigned char Removed raptor_new|free_stringbuffer_node - used once, now inlined. (raptor_stringbuffer_append_string_common): Added with common append code merged here. (raptor_stringbuffer_append_counted_string, raptor_stringbuffer_append_string): Added do_copy arg. (main): Test code updated for api changes. * raptor_internal.h: Added prototypes for raptor_stringbuffer class to internal API * Makefile.am: Re-added raptor_stringbuffer.c and raptor_stringbuffer_test 2003-12-23 Dave Beckett * rapper.1: Updated for 1.1.0, -a is gone. Added ntriples-plus * libraptor.3: parser name is ntriples-plus * libraptor.3: Updated for 1.1.0 * raptor.h: remove raptor_namespaces_end_namespace - does not exist. 2003-12-22 Dave Beckett * Makefile.am: Remove raptor_stringbuffer.c/test from dist - not used at present. * configure.ac: Added --with-xml-names to choose XML 1.0 name checking (default) or 1.1 * TODO.html: Added --enable-xml-1-1-names and updated to XML 1.1 PRs * raptor_utf8.c (raptor_unicode_is_namestartchar): Update to Namespaces in XML 1.1 WD http://www.w3.org/TR/2003/PR-xml-names11-20031105/#NT-NCNameStartChar and Extensible Markup Language (XML) 1.1 PR http://www.w3.org/TR/2003/PR-xml11-20031105/#NT-NameStartChar (raptor_unicode_is_namechar): Updated comment, no code changes needed. * tests/ntriplesplus/Makefile.am: No check-warn-rdf tests yet * TODO.html: Added --disable-nfc-check to disable Unicode NFC checking. * raptor_utf8.c: Use RAPTOR_NFC_CHECK to wrap any use of the glib g_utf8_normalize. * configure.ac: Define RAPTOR_NFC_CHECK when NFC check is needed * configure.ac: Added --disable-nfc-check to disable Unicode NFC checking even if a suitable glib is present and providing it. Otherwise, autodetects as before. * TODO.html: I claim the CDATA counting problem with libxml is a libxml bug. * TODO.html: Record win32 file://c: somewhat handled. * TODO.html: Added --disable-nfc-check to disable Unicode NFC checking. * raptor_utf8.c: Use RAPTOR_NFC_CHECK to wrap any use of the glib g_utf8_normalize. * configure.ac: Define RAPTOR_NFC_CHECK when NFC check is needed * configure.ac: Added --disable-nfc-check to disable Unicode NFC checking even if a suitable glib is present and providing it. Otherwise, autodetects as before. * TODO.html: I claim the CDATA counting problem with libxml is a libxml bug. * TODO.html: Record win32 file://c: somewhat handled. 2003-12-19 Dave Beckett * TODO.html: updates, note bug or feature * examples/Makefile.am: Removed REDLAND_LIBS 2003-12-17 Dave Beckett * raptor_parse.c: Update for changed raptor_generate_id handler calls - no const. * raptor_general.c, raptor.h, raptor_internal.h: raptor_generate_id handler does not take const string * raptor_general.c, raptor.h, raptor_internal.h: raptor_generate_id returns non const * ntriples_parse.c (raptor_ntriples_parse_line): Casts, unsigned char* for blank node IDs. * ntriples_parse.c (raptor_ntriples_parse_line): Enforce predicate must be URIref 2003-12-16 Dave Beckett * ntriples_parse.c (raptor_ntriples_parse_line): Pass blank node identifier generation through raptor_generate_id. Rewrite returns into setting rc and jump to cleanup to ensure allocated blank node IDs are freed. * raptor.pc.in: Restore LDFLAGS, LIBS * raptor-src-config.in: Removed --static-libs 2003-12-15 Dave Beckett * raptor.pc.in: Just link -lraptor * configure.ac: Remove use of have_redland for expat sources (no longer shipped with redland anyway) * configure.ac: Remove redland source check. * Makefile.am: No need for librdf.la rule * rdfdump.c, raptor_stringbuffer.c, raptor_set.c, raptor_namespace.c, Makefile.am: Remove all RAPTOR_IN_REDLAND code use of REDLAND_LIBS, REDLAND_CFLAGS. Now the test and rdfdump programs always just use raptor alone. 2003-12-14 Dave Beckett * TODO.html: CDATA sections do not count line numbers at all (seen with libxml) * raptor_general.c (raptor_print_statement_part_as_ntriples): Update call of raptor_print_ntriples_string * raptor.h: Update raptor_print_ntriples_string prototype * raptor_general.c (raptor_print_ntriples_string): Take unsigned const char* 2003-12-08 Dave Beckett * TODO.html: libxml2.6.0 SAX API support done 2003-12-06 Dave Beckett * Makefile.am: Narrower yyerrlabl fix since bison 1.875a no longer requires it * examples/grapper.c: Casts and updates to use URI strings from raptor as unsigned char* and converting to/from gchar* * rdfdump.c, raptor_xml_writer.c, raptor_xml.c, raptor_www_libxml.c, raptor_www.c, raptor_uri.c, raptor_sax2.c, raptor_rss.c, raptor_parse.c, raptor_namespace.c, n3_parser.y, n3_lexer.l: Lots of casts for str* function args, return values between unsigned char* as used for UTF8 and URI strings and char* used by str* functions. Some further casts for strings from XML. * raptor_www_test.c (write_bytes_fh): No return value. (main) Test code casts unsigned char* for URI strings Fix write_content_type and write_bytes_fh set handler methods. * raptor_utf8.c (raptor_unicode_char_to_utf8): unsigned char* arg. (raptor_utf8_is_nfc): unsigned int, cast for unsigned char* * raptor_sequence.c (raptor_sequence_ensure): Use void** not void*. C++ cares. (main): Test code casts to void* for args. * raptor_qname.c (raptor_qname_string_to_uri): cast for signed/unsigned int comparison. * raptor_locator.c (raptor_format_locator): Use raptor_uri_as_counted_string to save a strlen. * raptor_identifier.c: (raptor_identifier_print) fputs arg cast [function for RAPTOR_DEBUG only] * raptor_general.c (raptor_parsers_enumerate): Unsigned int. (raptor_parse_uri_write_bytes): unsigned char* cast. Declare raptor_xml_literal_datatype_uri_string. (raptor_print_statement_detailed): Replace several fprintf with fputs and fputc. (raptor_print_ntriples_string): Use unsigned long/size_t for counts. (raptor_statement_part_as_counted_string): unsigned char* Use raptor_xml_literal_datatype_uri_string. (raptor_statement_part_as_string): unsigned char* (raptor_print_statement_part_as_ntriples): unsigned char*. Replace several fprintf with fputs and fputc. Use raptor_xml_literal_datatype_uri_string (raptor_default_generate_id_handler): Casts for str* functions (raptor_check_ordinal): unsigned char* * ntriples_parse.c: (raptor_ntriples_generate_statement, raptor_ntriples_string_as_utf8_string, raptor_ntriples_parse_line): Updated to take/return unsigned char* args and internals. Update raptor_uri calls for similar changes. Use raptor_xml_literal_datatype_uri_string Lots of casts for str* functions char* arguments. * Makefile.am: Remove maintainer only n3 lex/yacc rules (flex/bison) Post process the bison output to remove unused label to make g++ happier. * raptor_internal.h: Added raptor_xml_literal_datatype_uri_string for the RDF datatype literal URI string, used several times. raptor_check_ordinal takes unsigned char* A couple of lengths, counts become unsigned int. raptor_unicode_char_to_utf8, raptor_format_sax2_element, raptor_xml_writer_cdata, raptor_xml_writer_comment, raptor_xml_writer_as_string changed to take/return unsigned char* for UTF8 strings. * raptor.h: raptor_new_uri_func, raptor_new_uri_from_local_name_func, raptor_new_uri_relative_to_base_func, raptor_uri_as_string_func, raptor_uri_as_counted_string_func URI factory methods changed to all take/return unsigned char* for URI strings raptor_statement_part_as_counted_string, raptor_statement_part_as_string, raptor_new_uri, raptor_new_uri_from_uri_local_name, raptor_new_uri_relative_to_base, raptor_uri_as_string, raptor_uri_as_counted_string URI methods changed to take/return unsigned char* for URI strings raptor_ntriples_string_as_utf8_string changed to return unsigned char* for UTF8 string raptor_uri_resolve_uri_reference, raptor_uri_filename_to_uri_string, raptor_uri_uri_string_to_filename, raptor_uri_uri_string_to_filename_fragment, raptor_uri_is_file_uri Changed to use unsigned char* for URI strings, char* for filenames 2003-12-03 Dave Beckett * TODO.html: ntriples parser should use raptor_generate_id for bnodes 2003-12-01 Dave Beckett * raptor_set.c (raptor_set_stats_print): Debug printing tweak. 2003-11-28 Dave Beckett * raptor_internal.h: raptor_check_ordinal with now unsigned char* arg raptor_sax2 content_cdata now unsigned char* * raptor_general.c (raptor_check_ordinal): unsigned char *name * raptor_parse.c: Lots of char/unsigned char casting. * n3_common.h: Undo n3_syntax_error back to raptor_parser arg. * n3_parser.y: (n3_parser_error) aka yyerror; take a void arg. * n3_common.h: The n3_syntax_error aka yyerror function takes a void arg. * n3_parser.y: Casts for rdf_parser, strings. * n3_lexer.l: Define INPUT_FN as yyinput (C++) or input (otherwise) Add more casts for C++ near rdf_parser, yytext. (copy_token): More casts for malloc and string functions. (copy_string_token): More size_t, casts. * ntriples_parse.c (raptor_ntriples_term): Use a size_t; cast for C++. * ntriples_parse.c (raptor_ntriples_term_valid,raptor_ntriples_term): Change argument names from class to term_class to avoid C++ keyword. * raptor_getopt.h: Protect prototypes for C++ * raptor_stringbuffer.c: casts for RAPTOR_*ALLOC returns * n3_parser.y: oops, raptort -> raptor * n3_parser.y: another cast for RAPTOR_MALLOC return * n3_parser.y: casts for RAPTOR_CALLOC returns * configure.ac: Move adding pkg-config glib2.0 cppflags/libs till after the other libraries since that's more likely to be system wide and least effect libxml2, other libraries that might be elsewhere. Mostly affects OSX which is more sensitive to link order. * raptor_stringbuffer.c (main): declare at start of block * configure.ac: Check for libxml/SAX2.h - the new SAX2 API * raptor_libxml.c: Added a pile of libxml2_* macros to use the libxml2 SAX2 functions when they are present, otherwise the SAX1. Not using the SAX2 parts of the libxml2 API at present. * strcasecmp.c: Add debug message arg casts. * configure.ac: Include libxml/parser.h when checking for other libxml2 headers * ntriples_parse.c: Add some debug message arg casts. (raptor_ntriples_parse_chunk): At end of input, check that there is no remaining junk. * ntriples_parse.c (raptor_ntriples_parse_chunk): Fix line counting problems when \r\n crosses a buffer or when a line ends at the end of a buffer. last_char recorded in state. * TODO.html: N-Triples Plus parser More line counting fixes. * README.html: Added N-Triples Plus parser * raptor_stringbuffer.c (main): Free returned strings. * Makefile.am: Added raptor_stringbuffer.c raptor_stringbuffer_test code * raptor.h: Added raptor_stringbuffer. * raptor_stringbuffer.c: Stringbuffer class for growing strings * raptor_libxml.c (raptor_libxml_init): With libxml2 use raptor_xml_characters_handler for sax->characters. * raptor_parse.c (raptor_cdata_grammar): Added is_cdata arg. (raptor_xml_characters_handler): Added, calling raptor_cdata_grammar. (raptor_xml_cdata_handler): Updated to call raptor_cdata_grammar with is_cdata=1. (raptor_xml_parse_init): With expat use raptor_xml_characters_handler with XML_SetCharacterDataHandler. (raptor_cdata_grammar): Tidy error reporting; do not use raptor_xml_writer_as_string for a simple print. * raptor_internal.h: Added raptor_xml_characters_handler prototype. 2003-11-25 Dave Beckett * manifest.pl: Add withdrawn tests check 2003-11-23 Dave Beckett * tests/ntriplesplus/Makefile.am: Added more N-Triples Plus tests (1-7) and bad (0-3) * tests/ntriplesplus/test-07.out, tests/ntriplesplus/test-07.ntp, tests/ntriplesplus/test-06.out, tests/ntriplesplus/test-06.ntp, tests/ntriplesplus/test-05.out, tests/ntriplesplus/test-05.ntp, tests/ntriplesplus/test-04.out, tests/ntriplesplus/test-04.ntp, tests/ntriplesplus/test-03.out, tests/ntriplesplus/test-03.ntp, tests/ntriplesplus/test-02.out, tests/ntriplesplus/test-02.ntp, tests/ntriplesplus/test-01.out, tests/ntriplesplus/test-01.ntp: More N-Triples Plus tests * tests/ntriplesplus/bad-00.ntp, tests/ntriplesplus/bad-01.ntp, tests/ntriplesplus/bad-02.ntp, tests/ntriplesplus/bad-03.ntp: N-Triples Plus bad tests * n3_lexer.l: In prefix state, always return to initial on matching '.', then error out. (n3_syntax_error): Copy removed here. (main): Init enough more of parser/locator so that n3_syntax_error in main library can be used. 2003-11-21 Dave Beckett * rdfdump.c: extra newline in version * rdfdump.c: extra newline in help 2003-11-19 Dave Beckett * tests/Makefile.am: Added check-ntriples-plus to check N-Triples Plus with the N-Triples tests. * n3_parser.y, n3_lexer.l, n3_common.h: Added lineno to raptor_n3_parser context to track newlines for dos, unix, mac since flex doesn't do that by default with yylineno. * rdfdump.c: tidy help messages * TODO.html: line counting for dos files * ntriples_parse.c: Track newlines correctly for \r\n across chunks; move last_nl into ntriples parser context. (raptor_ntriples_parse_chunk,raptor_ntriples_parse_start): Use and init last_nl in ntriples parser context. 2003-11-16 Dave Beckett * raptor.h: Added raptor_ntriples_string_as_utf8_string * ntriples_parse.c (raptor_ntriples_term): Added allow_utf8 argument and new class RAPTOR_TERM_CLASS_FULL which uses all the passed in string. (raptor_ntriples_string_as_utf8_string): Added, using raptor_ntriples_term as above. (raptor_ntriples_parse_line): Use size_t len args. * rdfdump.c: Use f/puts instead of print/fprintf when there are no %s * raptor_uri.c (raptor_default_new_uri_for_rdf_concept): Remove duplicate strlen(base_uri) 2003-11-15 Dave Beckett * n3_lexer.l: Document more ntriples plus Error out if @prefix's name doesn't match name * TODO.html: todos near xml1.1 names * raptor_utf8.c (raptor_unicode_is_namestartchar): Two | changed to ||. Likely worked anyway 2003-11-11 Dave Beckett * libraptor.3: Noted raptor_set_feature with non_nfc_fatal * raptor.h: Added RAPTOR_FEATURE_NON_NFC_FATAL to pick between NFC errors or warnings. * raptor_general.c (raptor_set_feature): Added RAPTOR_FEATURE_NON_NFC_FATAL to pick between NFC errors or warnings. (raptor_set_parser_strict): Set feature_non_nfc_fatal default off. * raptor_internal.h: Added feature_non_nfc_fatal to pick between NFC errors or warnings. * raptor_parse.c: Put 'quotes' around element/attribute names in messages. Use feature_non_nfc_fatal to pick between NFC errors or warnings. * tests/Makefile.am: check-bad-nfc-rdf - use strict mode * rdfdump.c: Document -m/--mode arg * TODO.html: gzip2/bzip2 api 2003-11-10 Dave Beckett * TODO.html: Note libxml2 2.6.0 SAX2 issues * configure.ac: Added tests/ntriplesplus * tests/ntriplesplus/Makefile.am: N-Triples plus tests * tests/ntriplesplus/test-00.ntp, tests/ntriplesplus/test-00.out: N-Triples Plus default namespace test * tests/Makefile.am: added ntriplesplus dir * raptor_qname.c (raptor_qname_string_to_uri): Keep original name around for error reporting. * rdfdump.c, n3_parser.y: parser now called ntriples-plus * n3_parser.y: parser called ntriplesplus * n3_parser.y (production directive): Fix declaring default namespace prefix 2003-11-09 Dave Beckett * tests/Makefile.am: added bad-20.rdf * tests/bad-20.rdf: check non-namespaced element does not crash parser * raptor_qname.c (raptor_new_qname, raptor_new_qname_from_namespace_local_name): Do not die if no URI for qname is available. It might be which is at least needed for some error reports or for embedded qnames. Caused unnecessary crashes when parsing failed. 2003-11-03 Dave Beckett * raptor_xml.c (main): Make tests less chatty on success * raptor_uri.c (main): Make it less chatty on success * raptor_uri.c (raptor_uri_uri_string_to_filename_fragment): Allow file://a|/ and file://a:/ (main): For WIN32, check the above works. * autogen.sh: remove ltmain.sh libtool before libtoolize * raptor_general.c (raptor_parse_uri_with_connection): Fail before parsing if raptor_www_fetch failed. * raptor_internal.h: Added raptor_www_error_varargs internal prototype. * raptor_www_libxml.c (raptor_www_libxml_http_error): This was just all wrong, printing to stderr and then exit(1). Change to use the proper raptor_www_error_varargs callback. * raptor_www.c (raptor_www_error_varargs): Added, with va_list signature. * raptor_general.c (raptor_parse_file): When uri is given and base_uri is NULL, copy the uri and free it later - fix to match the function documentation. 2003-10-31 Dave Beckett * raptor_general.c (raptor_parse_file): fclose only when fh is not NULL 2003-10-21 Dave Beckett * TODO.html: Note Win32 URI code possible bug * raptor_parse.c (raptor_xml_end_element_handler): For RAPTOR_DEBUG, declare element_name at start of function. 2003-10-20 Dave Beckett * raptor.h: raptor_namespace(s)_(new|free) renamed to raptor_(new|free)_namespace(s) Added raptor_new_qname_from_namespace_local_name * raptor_qname.c (raptor_new_qname_from_namespace_local_name): Added. * raptor_namespace.c: raptor_namespaces_(new|free) renamed to raptor_(new|free)_namespaces * raptor_namespace.c: raptor_namespace_(new|free) renamed to raptor_(new|free)_namespace * raptor_xml_writer.c: raptor_namespaces_free renamed to raptor_namespaces_clear * raptor_parse.c (raptor_xml_start_element_handler): Use raptor_new_sax2_element. raptor_namespaces_free renamed to raptor_namespaces_clear * raptor_internal.h: Added raptor_new_sax2_element * raptor_sax2.c (raptor_new_sax2_element): Added. * raptor.h: Added prototypes for raptor_namespaces_new, raptor_namespaces_clear * raptor_namespace.c (raptor_namespaces_new,raptor_namespaces_free): Added for constructor and destructor. raptor_namespaces_free renamed to raptor_namespaces_clear for emptying a statically allocated namespace stack. * n3_parser.y: raptor_namespaces_free renamed to raptor_namespaces_clear 2003-10-16 Dave Beckett * n3_parser.y: Moved n3 lexer/parser stuff to n3_common.h Added uri field to union. URI_LITERAL and QNAME_LITERAL now are uri. PREFIX now expects an IDENTIFIER to follow. Remove all make qname/uri and free(copied token) sequences since the lexer does it. Added fake yy_init_globals to stop dumb warning. * n3_lexer.l: Make raptor_uris here from lexer tokens (qnames or URIs) For @prefix, recognise following token as an identifier specially rather than try to make it a URI. (n3_token_free): Free string or raptor_uri. (main): Lots of fixups to fake enough n3 parser structure to get it working fairly standalone. * Makefile.am: Added n3_common.h Fixup free of null inside flex-generated lexer. * n3_common.h: N3 parser/lexer shared internals * raptor_internal.h: Moved n3 lexer/parser stuff to n3_common.h * n3_parser.y (n3_qname_to_uri): Replace with call to raptor_qname_string_to_uri and added length parameter. * raptor_qname.c (raptor_new_qname): Replace raptor_namespace_local_name_to_uri with use of raptor_new_uri_from_uri_local_name. (raptor_qname_string_to_uri): Added, making only the URI equivalent to the qname and handling N3/RDQL-style special cases such as "prefix:", ":" and NULL. * raptor_internal.h, raptor.h: Moved raptor_qname, raptor_namespace, raptor_namespace_stack classes into public API. Added raptor_qname_string_to_uri * raptor_namespace.c (raptor_namespace_local_name_to_uri): Removed - only used once internally and was never public. 2003-10-09 Dave Beckett * n3_lexer.l (n3_token_free): Added, for cleanup in debugging. (main): Init and clear token/lval. * tests/Makefile.am: Added ex-53 * tests/ex-53.out, tests/ex-53.rdf: Check allowing optional rdf:RDF * rdfdump.c: --assume/-a feature_assume_is_rdf deleted; rdf:RDF is optional. * raptor_general.c, raptor_parse.c: feature_assume_is_rdf deleted; rdf:RDF is optional. * raptor_internal.h: feature_assume_is_rdf deleted 2003-10-06 Dave Beckett * tests/wine.out, tests/wine.rdf: OWL Wine Ontology from http://www.w3.org/TR/owl-guide/wine.rdf * tests/Makefile.am: Added OWL Wine ontology from http://www.w3.org/TR/owl-guide/wine.rdf as wine.rdf wine.out 2003-09-30 Dave Beckett * TODO.html: NTP lval * n3_parser.y: Remove n3_parser_lex; re-#define yylex to call direct * n3_lexer.l (copy_string_token): Destroy malloced string on error return. * n3_parser.y (n3_parse): Don't delete buffer, pop buffer state; a successful lex does that. * raptor_internal.h: Remove n3_token_print * n3_parser.y: Use reentrant yacc parser. Store the lexer lval in the n3_parser context. Lots of #define trickery to get flex/bison to talk nicely. Make n3_parser_error take an rdf_parser arg (this isn't configurable by bison itself, so is likely fragile). Remove use of extern in lineno; get it from the lexer. Remove N3_Parser global; use rdf_parser local. (n3_parser_error): Update for having rdf_parser arg, update locator lineno from scanner. (n3_syntax_error, n3_qname_to_uri): Get lineno from scanner. (n3_parse): Remove fixmes, no need for protecting globals. (main): Update for reentrant parser; init locator from standalone args. * n3_lexer.l: Remove n3_lexer.c/.h prototypes no longer(?) needed with re-entrant lexer. Remove use of lineno; let lexer do it. Change lexer call to pass in lval from reentrant parser. (n3_token_print): Pass in lval. (main): Update for api changes. 2003-09-29 Dave Beckett * raptor_internal.h: Updates for reentrant lexer. * n3_parser.y: Use reentrant lexer API. Define YYLEX_PARAM to be scanner arg, from current grammar. (n3_parser_lex): Take scanner arg. (n3_syntax_error): Add rdf_parser arg. (n3_parse): Init and destroy reentrant lexer. (raptor_n3_parse_terminate): Tidy up any lexer stuff. (main): Check for file not found, report it. * n3_lexer.l: Switch to reentrant lexer. Pass rdf_parser into code, yyextra internally. (yywrap): Add scanner arg. (copy_string_token, n3_syntax_error): Add rdf_parser arg. (main): Use reentrant calls for lexer to set yyin, get_text. Use yylex_init/yylex_destroy. * Makefile.am: n3_lexer_test depends on raptor_utf8 * raptor_parse.c: Add EXPAT_UTF8_BOM_CRASH fix updates for sax2 changes. * configure.ac: Tweak for old flex version output * configure.ac: Try to check flex is new enough. 2003-09-21 Dave Beckett * n3_parser.y: Minor C reformatting 2003-09-20 Dave Beckett * raptor.h: Added raptor_parsers_enumerate prototype * n3_lexer.l: minor reformatting * n3_lexer.l (copy_string_token): Make \r, \n and \t work * raptor_general.c (raptor_init): Ensure rdf/xml is default parser. (raptor_parsers_enumerate): Added, to enumerate parsers, returning their name & label. * examples/grapper.c: Use raptor_parsers_enumerate to get parser names, labels. * n3_lexer.l: flex archaeology for options * examples/Makefile.am: Don't build examples by default 2003-09-19 Dave Beckett * raptor_www.c, raptor_general.c: Revert to old API for raptor_uri_uri_string_to_filename * raptor.h, raptor_uri.c (raptor_uri_uri_string_to_filename): Restored to old API. (raptor_uri_uri_string_to_filename_fragment): Added with fragment arg. 2003-09-17 Dave Beckett * n3_parser.y (n3_qname_to_uri): Handle NULL (":" in N3) returning the default namespace. It's not quite clear if this is legal. * n3_parser.y (raptor_n3_generate_statement): Do nothing if some part of the triple is NULL. * raptor_internal.h: n3_syntax_error now takes varargs * n3_parser.y (n3_syntax_error): Now takes varargs * n3_lexer.l: n3_syntax_error now takes varargs (copy_string_token): Added \u, \U. Fixed, \r, \n, \t * n3_parser.y: Wrap a debugging printf * n3_lexer.l: For blank literal "_:abc", don't include _: in the id passed to the parser. * n3_parser.y: Throughout replace raptor_new_uri with raptor_copy_uri when copying existing base URI. * n3_parser.y: Throughout: Handle NULL uri string meaning use the base URI * n3_lexer.l: Handle <> (returning NULL) as well as <> with content. (n3_token_print): Update to match. (n3_syntax_error): Simple standalone copy here. * n3_parser.y (n3_parser_error): Set lineno and call raptor_parser_simple_error to pass on the parsing error. (n3_syntax_error): Added. Set lineno and call raptor_parser_error to pass on a general syntax error. (n3_qname_to_uri): Init locator line before calling raptor_new_qname that may fail, calling raptor_parser_simple_error. * raptor_internal.h: Add n3_syntax_error * n3_lexer.l: Call n3_syntax_error on a syntax error * TODO.html: uris work for ntriples+ * examples/grapper.c: Add n3 syntax * n3_parser.y (propertyList): Handle NULL verb, two cases. (raptor_n3_parse_start): No locator column, byte values just yet. * n3_parser.y (n3_qname_to_uri): Call raptor_new_qname with rdf_parser for errors * TODO.html: +RFE to disable NFC linking/check to glib 2003-09-15 Dave Beckett * n3_parser.y: Don't raptor_free_uri shared uris made from qnames * n3_parser.y (n3_parse): Tidy up flex buffers. (raptor_n3_parse_terminate): Destroy any flex state on exit. * n3_parser.y (n3_parse): delete buffer after parse. * n3_parser.y: Free uri strings returned from URI_LITERAL. * raptor_identifier.c (raptor_new_identifier): Note uri, literal_datatype are shared and not copied. * n3_parser.y: Free strings returned from QNAME_LITERAL. * raptor_sequence.c (raptor_new_sequence): Use RAPTOR_MALLOC. (raptor_free_sequence): Free the raptor_sequence. * raptor_identifier.c (raptor_new_identifier): Note id, literal, literal_language are shared and not copied. * n3_parser.y (statement): Free identifier used for subject (propertyList): Free identifier used for verb * n3_parser.y: Track when an identifier is copied using is_malloced (raptor_free_triple): Actually free the triple. * raptor_internal.h, n3_parser.y: raptor_triple now just has 3 items. * n3_parser.y (raptor_n3_parse_terminate): Free namespaces * n3_parser.y (n3_parse): Do not parser NULL or empty string. (raptor_n3_parse_chunk): Do not parser empty buffer. * rdfdump.c: (main) Don't free NULL uri * TODO.html: More N-Triples+ todos * TODO.html, README.html, NEWS.html, INSTALL.html: XHTML fixes, removing align="center" * TODO.html: Some N-Triples+ todos * n3_parser.y: More debugging messages. Recover from errors, don't generate partial triples. (n3_qname_to_uri): Return NULL if raptor_new_qname does not give a URI (some error happened). * n3_lexer.l: Remove END token, should only use EOF Count lines right for \r\n|\r|\n Handle EOF in comments * n3_parser.y: Remove END token, should only use EOF Add more debugging statements. Throughtout, change raptor_new_uri to raptor_new_uri_relative_to_base. (statement): Handle empty propertyList ("[]"). (propertyList 1): Copy verb into objectList, then append propertyList items (if not empty "[]" again). (objectList): Add empty item for "[]", returning NULL. (resource): For [], handle NULL and generate statements here before returning the generated id. (n3_parser_print_statement): Added for test code (main): In test code, init URI module only, create fake static rdf_parser and n3_parser and initialise enough (base URI, and context) so that it works. * n3_parser.y: Add error recovery at '.' 2003-09-14 Dave Beckett * n3_parser.y: raptor_print_triple renamed to raptor_triple_print * n3_parser.y: Only define raptor_print_triple if debugging. * raptor_identifier.c, n3_parser.y: raptor_print_identifier renamed to raptor_identifier_print * n3_parser.y: Raptor N-Triples+/N3 parser * n3_lexer.l: Raptor N-Triples+/N3 lexer * raptor_identifier.c (raptor_identifier_print): Added for debugging * raptor_internal.h: When debugging, raptor_identifier_print * raptor_identifier.c (raptor_new_identifier): Add literal, literal_datatype, literal_language args and handle them. (raptor_init_identifier): Deleted, not used (enough). (raptor_copy_identifier, raptor_free_identifier): Updated for literal, literal language and literal datatype. * rdfdump.c: Use the syntax name (after validation) to intialise the parser rather than an ever-growing set of flags. * raptor_uri.c (raptor_default_new_uri): If the filename had a fragment, re-append it to the file:URI after updating it to be correct. (raptor_uri_uri_string_to_filename): Add fragment_p arg to return the URI fragment after a discovered filename in a file:URI. (assert_uri_to_filename): Update call to raptor_uri_uri_string_to_filename. * raptor_parse.c (raptor_xml_parser): Add namespaces. Elsewhere change rdf_parser->namespaces to rdf_xml_parser->namespaces. (raptor_xml_parse_start): Initialise the namespaces for rdf/xml. * raptor_sequence.c: Raptor sequence ADT * raptor_namespace.c (raptor_namespace_init): Add defaults arg to control which namespaces are added by default. 0=none, 1=xml, 2=... others (main): Update test code to give new arg. * raptor_general.c (raptor_init): Call raptor_init_parser_n3. (raptor_start_parser, raptor_free_parser): Remove namespace code from here; moves into specific parser context code. (raptor_parse_file): Update for raptor_uri_uri_string_to_filename extra arg. * raptor_xml_writer.c: (raptor_new_xml_writer) Update for raptor_namespaces_init defaults arg. * raptor_rss.c (raptor_rss_emit): Use raptor_new_identifier rather than raptor_init_identifier and make items dynamically allocated. * raptor_www.c: (raptor_www_file_fetch) Update for raptor_uri_uri_string_to_filename extra argument. * raptor.h: Add literal, literal_datatype, literal_language to raptor_identifier structure. Add above arguments to raptor_new_identifier. Remove raptor_init_identifier - not used. Add fragment_p argument to raptor_uri_uri_string_to_filename. * raptor_internal.h: Remove namespaces from raptor_parser; now in per-syntax contexts. Updated raptor_namespaces_init to take defaults arg. Added N3 class prototypes, for n3_token_print, raptor_init_parser_n3, n3_parser_lex. Added raptor_triple structure. Added sequence class prototypes. * Makefile.am: Add n3_lexer.c n3_lexer.h both generated from n3_lexer.l by flex; add maintainer-only rules to do that. Add n3_parser.tab.c n3_parser.tab.h generated from n3_parser.y by yacc; add maintainer-only rules to do that. Add raptor_sequence.c and test. * configure.ac: Add lex (flex required) and yacc 2003-09-08 Dave Beckett * configure.ac: Bumped version to 1.1.0 * ntriples.h: deprecated * Snapshotted raptor_1_0_0 for 1.0.0 release * libraptor.3: new date * NEWS.html: Note functions were removed, soname was increased * ntriples.h, Makefile.am: Removed old header ntriples.h * raptor_general.c, raptor.h, ntriples_parse.c: Removed deprecated functions as promised. Changes are described in the libraptor.3 man page. * configure.ac: Updated for Raptor 1.0.0 Shared library soname major now 1 * NEWS.html, libraptor.3: Updated for Raptor 1.0.0 * win32_config.h: Added R_OK define for access() * tests/Makefile.am: test wording for failures 2003-09-05 Dave Beckett * tests/Makefile.am: Added bad-05.nt * tests/bad-05.nt: Bad Unicode character #x110000 * tests/test.out, tests/test.nt: fixes * tests/test.nt: Removed resource18-20 - illegal Unicode chars. Added \U0010FFFF * ntriples_parse.c (raptor_ntriples_term): Forbid Unicode characters outside #x0-#x10FFFF 2003-09-04 Dave Beckett * libraptor.3: Updated for 0.9.13 Added raptor_parse_file_stream. Added new feature normalize_language. Added list of all static variables exported. * configure.ac: Define RAPTOR_VERSION_DECIMAL here and make it an AC_SUBST. * raptor_general.c: Use RAPTOR_VERSION_DECIMAL define. * raptor-config.1: Document --version-decimal and --libtool-libs * raptor-config.in: Added --version-decimal. * rdfdump.c: Allow filename "-" to be used as standard input. When a filename is given, use raptor_parse_file. Adjust the error messages to mention file names when using raptor_parse_file. * raptor.h: Added raptor_parse_file_stream * raptor_general.c (raptor_parse_file_stream): Added, allowing passing in of an existing FILE* stream (with optional filename) and parsing rather than raptor doing the fopen/fclose. (raptor_parse_file): A NULL uri argument now means stdin. * raptor_internal.h, raptor_parse.c: Remove rdf_parser->fh * rdfdump.c: Use raptor_short_copyright_string in usage/help messages * raptor_general.c, raptor.h: Added raptor_short_copyright_string 2003-09-03 Dave Beckett * raptor_general.c (raptor_set_feature): Add new feature normalize_language (raptor_set_parser_strict): Set default for feature normalize_language to true. * raptor.h, raptor_internal.h: Add new feature normalize_language * raptor_parse.c (raptor_xml_start_element_handler): Normalize language to lowercase. After http://www.w3.org/TR/rdf-concepts/#dfn-language-identifier Controlled by a new parser feature 'normalize_language'. * ntriples_parse.c (raptor_ntriples_parse_line): Normalize language to lowercase. After http://www.w3.org/TR/rdf-concepts/#dfn-language-identifier 2003-09-01 Dave Beckett * raptor-config.in: Oops, -lraptor with --libs * configure.ac: Added RAPTOR_LIBTOOL_LIBS for compiling with raptor using libtool. * raptor-config.in: Added exec_prefix to make --libs generate the right -L Added --libtool-libs for compiling with raptor using libtool. 2003-08-31 Dave Beckett * configure.ac: dmalloc enabled only if dmalloc.h is present * tests/Makefile.am: Removed warn-01 re-added accidently. * tests/warn-00.out, tests/warn-00.rdf: Added rdf:bagID warning check * tests/Makefile.am: Added scanning tests and ex-52.svg/out for inside SVG * tests/ex-52.out, tests/ex-52.svg: Check scanning for rdf/xml in SVG * raptor_general.c (raptor_set_parser_strict): Scanning and assuming are never default on, must be enabled * TODO.html: The scanning for rdf:RDF works (--scan argument to rapper) * raptor_parse.c (raptor_xml_start_element_handler): Fix scanning for rdf:RDF. Do parent->child processing if the grammar has a state set up, in this case it is expecting a list of node elements. * rdfdump.c: Set strict before setting other features * rdfdump.c: Use strict_mode * tests/warn-00.out, tests/warn-00.rdf, tests/warn-01.out, tests/warn-01.rdf, tests/warn-03.rdf: These are now errors not warnings * raptor_parse.c (raptor_xml_start_element_handler): Non-namespaced elements are now an error. (raptor_process_property_attributes): Tidy non-namespaced element name. (raptor_start_element_grammar): Give errors if an attempt is made to proceed dealing with elements with no namespace for property or node elements - attributes are caught above. * tests/Makefile.am: Add bad-18.rdf, bad-19.rdf for non-namespaced elements * tests/bad-18.rdf, tests/bad-19.rdf: Test node/property elements without namespaces fail * raptor_internal.h: Add raptor_parser field 'magic' for libxml2 error/warning callback validation. and declare RAPTOR_LIBXML_MAGIC to set use there * raptor_general.c (raptor_new_parser): Set RAPTOR_LIBXML_MAGIC field in structure for libxml2 error/warning callback validation. * ntriples_parse.c (raptor_ntriples_term): Check that the string/URI term was terminated before the end of the string. * tests/Makefile.am: Added bad-04.nt * tests/bad-04.nt: Test for non-terminated URI * raptor_libxml.c (raptor_libxml_warning,raptor_libxml_error): Validate the ctx pointer returned since sometimes it is a ctx, sometimes ctx->userData. The latter is what is expected. * tests/Makefile.am: Oops, run bad ntriples tests in N-Triples mode * rapper.1: Added --version/-v * rdfdump.c: Tidied up option error handling, messages. Added --version/-v 2003-08-30 Dave Beckett * configure.ac: Added --with-dmalloc option default auto for maintainer, no otherwise. 2003-08-25 Dave Beckett * configure.ac: Bumped version to 0.9.13 * Snapshotted raptor_0_9_12 for 0.9.12 release * NEWS.html: Updated for 0.9.12 * raptor_parse.c (raptor_start_element_grammar): With rdf:datatype, do not lose the URI string pointer. For rdf:ID, do not allocate the URI twice. * raptor_parse.c (raptor_generate_statement): Do not set language when a datatype is given. * raptor_xml_writer.c (raptor_new_xml_writer): Initialise writer buffer to an empty string to start (i.e. just \0). (raptor_xml_writer_start_element): Now assume buffer is always present, remove empty buffer case. (raptor_xml_writer_end_element,raptor_xml_writer_cdata): Handle 0 length case, no strncpy. * tests/Makefile.am: Added ex-51. Fix daml+oil test. * tests/ex-51.out, tests/ex-51.rdf: Check empty XML literal works * tests/ex-41.out: No language for datatyped literals. * tests/daml-oil.rdf, tests/daml-oil.out, tests/Makefile.am: Updated to DAML+OIL schema 2001-03 as defined in http://www.daml.org/2001/03/daml+oil-index.html * tests/daml-oil.out, tests/daml-oil.rdf: Added 2000-11-30 http://www.cs.man.ac.uk/%7Ehorrocks/DAML-OIL/daml-oil.rdf * tests/owl-schema.rdf, tests/owl-schema.out: Updated OWL schema http://www.w3.org/2002/07/owl to match that given in OWL Reference 2003-08-18 CR at http://www.w3.org/TR/2003/CR-owl-ref-20030818/#appB * libraptor.3: Updated for 0.9.12 2003-08-21 Dave Beckett * NEWS.html: Updates for 0.9.12 * TODO.html: URI#frag used as URI in retrievals now * Makefile.am: Remove -static from test links * raptor_uri.c (main): Test xmlbase and retrievable URI tranforms. * raptor_uri.c (raptor_uri_resolve_uri_reference): Handle #s relative to a uri-reference with a #fragment. * raptor_www.c: (raptor_www_fetch) Use raptor_new_uri_for_retrieval to ensure that the URI-reference fragments are removed, and the URI path exists. * raptor.h: Added raptor_new_uri_for_retrieval * raptor_uri.c (raptor_new_uri_for_retrieval): Added, strips fragments and ensures / path is present. * INSTALL.html: Builds on Alpha Linux 2.2 * raptor_xml_writer.c (raptor_xml_writer_start_element,raptor_xml_writer_end_element): Use size_t for lengths. * raptor_xml_writer.c (raptor_xml_writer_start_element): Set content_element_seen in parent only if there is a parent. (raptor_xml_writer_end_element): Change current_element to parent only if there is a current element. * TODO.html: NFC checks * tests/Makefile.am: Pull out may-fail NFC checks into a separate set and don't exit 1 if they do fail. Failure is possible since it requires GNOME glib2 which isn't always available. 2003-08-20 Dave Beckett * raptor_general.c (raptor_check_ordinal): parentheses just for gcc 2003-08-17 Dave Beckett * raptor_xml_writer.c: (raptor_xml_writer_end_element) Reset the current_element pointer on finishing. Makes any succeeding cdata do the right thing. * rdfdump.c: Inside redland, don't call raptor_init/finish, it's done by redland's world. 2003-08-13 Dave Beckett * raptor_rss.c (raptor_rss_parse_chunk): Stop working after a user abort of the parser. * raptor_general.c (raptor_check_ordinal): c is not const * rdfdump.c, raptor_xml_writer.c, raptor_xml.c, raptor_www_libwww.c, raptor_utf8.c, raptor_uri.c, raptor_set.c, raptor_sax2.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_locator.c, raptor_libxml.c, raptor_identifier.c, raptor_general.c, ntriples_parse.c: Move dmalloc includes into raptor_internal.h and use everywhere. * raptor_internal.h: Add raptor dmalloc includes here to ensure all raptor code uses it or not consistently. * TODO.html: +URI retrieval 2003-08-08 Dave Beckett * tests/Makefile.am: Added warn-03 * tests/warn-03.rdf: Handle deleting of default namespaces * raptor_parse.c (raptor_xml_start_element_handler): Handle when a name has a namespace but that namespace has no URI such as xmlns="". In that case, the element has non-namespaced parts too, so skip. * ntriples_parse.c (raptor_ntriples_parse_line): Casts so isspace calls get int args. * raptor_uri.c (raptor_uri_is_absolute): Cast so isalpha and isalnum get int args. * tests/Makefile.am: Added ex-50 * tests/ex-50.out, tests/ex-50.rdf: Check parseType with unknown value * raptor_parse.c (raptor_start_element_grammar): Handle parseType="Literal" without duplicating code. * raptor_parse.c (raptor_start_element_grammar): Handle parseType="...." which isn't any of the other known types identically to parseType="Literal". * raptor_general.c (raptor_check_ordinal): Return <0 on failure such as no legal characters at all. * raptor_internal.h: Added raptor_check_ordinal. * ntriples_parse.c (raptor_ntriples_generate_statement): Make RAPTOR_IDENTIFIER_TYPE_ORDINAL predicates for property URI strings that match the rdf:_ pattern with n a decimal integer>0. * raptor_parse.c: Use raptor_check_ordinal for checking in rdf:_ * raptor_general.c (raptor_check_ordinal): Check the in rdf:_ * raptor_general.c (raptor_vsnprintf): Non-portable use of va_list fixed by copying the arguments with va_copy before passing to vsnprintf calls. The symptom was crashes on some architectures where this mattered, such as powerpc. 2003-08-07 Dave Beckett * raptor_general.c (raptor_parse_uri_with_connection): Return failure status. 2003-08-03 Dave Beckett * tests/Makefile.am: Added bad N-Triples tests bad-0[0-3].nt and checks * tests/bad-00.nt, tests/bad-01.nt, tests/bad-02.nt, tests/bad-03.nt: Bad N-Triples * ntriples_parse.c: raptor_ntriples_term_class Added for: (raptor_ntriples_term_valid): Checking validity of a ntriples term - this could be inlined. (raptor_ntriples_string) Renamed to: (raptor_ntriples_term) Use raptor_ntriples_term_valid. (raptor_ntriples_parse_line): Add more checks that whitespec exists between ntriples terms. Error to have typed literals with languages. * tests/test.out, tests/test.nt: Updated to remove language from typed literals * raptor_general.c (raptor_print_statement_detailed): Fix datatype uri output not * TODO.html: 'make check' shouldn't fail on NFC checks that will never work. * raptor_general.c (raptor_parser_simple_error): Call raptor_parser_error_varargs, don't lose the arguments. 2003-07-29 Dave Beckett * configure.ac: Bumped version to 0.9.12 * Snapshotted raptor_0_9_11 for 0.9.11 release * NEWS.html, README.html: words * raptor_sax2.c: struct nsd: use size_t for length. * configure.ac: Ensure the libxml2 xmlReader API is new enough (2.5.0+) such as having xmlParserSeverities. * NEWS.html: More updates for 0.9.11 2003-07-28 Dave Beckett * raptor.h: Update raptor_generate_id_handler to take user_bnodeid arg. * raptor_rss.c: Update calls of raptor_generate_id with user_bnodeid (NULL for existing calls) * raptor_parse.c: Update calls of raptor_generate_id with user_bnodeid (NULL for existing calls) Use it to wrap the rdf:nodeID values for subject and object cases. * raptor_internal.h: raptor_generate_id updated to add user_bnodeid * raptor_general.c (raptor_set_generate_id_handler): Document final argument user_bnodeid from the rdf:nodeID attribute value. (raptor_default_generate_id_handler): Add user_bnodeid, return it if present. (raptor_generate_id): Add user_bnodeid and pass on. * NEWS.html, README.html: words * README.html: Style. RSS tag soup rewording * README.html, INSTALL.html: Updated for 0.9.11 release * raptor_internal.h: Added raptor_xml_writer_comment * TODO.html: NFC checking done. Exclusive XML C14N done. * raptor_namespace.c (raptor_namespace_copy): Don't copy uri and then lose it. * raptor_xml_writer.c: Added current_element for tracking empty/not empty elements. (raptor_xml_writer_comment): Added, just concatenating the content via raptor_xml_writer_cdata. * raptor_parse.c (raptor_xml_comment_handler): Call raptor_xml_writer_comment inside parseType="Literal" * raptor_xml_writer.c: raptor_xml_writer gains stack depth. (raptor_free_xml_writer): Clear any content_cdata before finishing. (raptor_xml_writer_start_element) Add depth to raptor_format_sax2_element calls. Increase it (raptor_xml_writer_start_element,raptor_xml_writer_end_element): Add depth to raptor_format_sax2_element calls. Decrease it and raptor_namespaces_end_for_depth each time. * raptor_namespace.c: Moved error_handler and error_data arguments around. (raptor_namespaces_start_namespace) Gets those as arguments (raptor_namespaces_start_namespace) Added, simpler version of _full (raptor_namespaces_start_namespace_full) Added, was the old interface but less error arguments. (raptor_namespaces_namespace_in_scope): Fix namespace URI comparison. (raptor_namespace_new) Looses error arguments. (raptor_namespace_copy) Added, copy to a new stack with a new depth. * raptor_sax2.c (raptor_format_sax2_element): Gain stack depth argument. Only use namespace declarations when there is a namespace stack present. copy namespaces to new stack when new ones are needed. * raptor_internal.h: Add error_handler and error_data to namespace_stack. raptor_namespaces_start_namespace gets those as arguments raptor_namespace_new looses them raptor_namespaces_start_namespace takes less args raptor_namespaces_start_namespace_full added raptor_namespace_copy added content_cdata_seen and content_element_seen back into sax2_element * raptor_parse.c: Moved content_cdata_seen and content_element_seen back into sax2_element Update for new raptor_namespaces_start_namespace calling convention. * raptor_xml_writer.c: Debug * raptor_namespace.c (raptor_namespaces_format): Fix missing counting : when present * tests/ex-11.rdf, tests/ex-11.out: Updated to declare the html namespace as default, expect it in the N-Triples output. * raptor_namespace.c (raptor_namespaces_namespace_in_scope): Added, checking if a given namespace is declared in scope. (raptor_namespaces_format): Added, returning a string to declare the given namespace. * raptor_xml_writer.c: (raptor_xml_writer_start_element,raptor_xml_writer_end_element): Updated for raptor_format_sax2_element new arguments * raptor_sax2.c (raptor_format_sax2_element): Add raptor_namespace_stack argument. Create xmlns declarations for elements not declared in the current stack state, using raptor_namespaces_format to create the string. * raptor_internal.h: Added prototypes for raptor_namespaces_namespace_in_scope, raptor_namespaces_format raptor_format_sax2_element now takes a raptor_namespace_stack 2003-07-27 Dave Beckett * raptor_internal.h: raptor_xml_writer prototypes take unsigned char* * raptor_parse.c: Move the code building parseType="Literal" strings to raptor_xml_writer class. (raptor_cdata_grammar): Added, just for symmetry mostly, with most code taken from raptor_xml_cdata_handler. * raptor_xml_writer.c: Move the code building parseType="Literal" strings to raptor_xml_writer class. * Makefile.am: Added raptor_xml_writer.c * raptor_xml_writer.c: Initial version * raptor_parse.c: Split content_cdata fields between sax2_element & (RDF/XML specific) element. raptor_element: Add xml_writer field. Various calls changed to use the new raptor_simple_message_handler for error handling implemented as raptor_parser_simple_error here. (raptor_xml_parser_simple_error_handler): Added, matching the raptor_simple_message_handler API and calling raptor_parser_error. (raptor_start_element_grammar): When parseType="Literal" appears, create a new raptor_xml_writer. (raptor_end_element_grammar): When parseType="Literal" ends, delete the raptor_xml_writer. * raptor_sax2.c (raptor_format_sax2_element): Use raptor_simple_message_handler. * raptor_general.c (raptor_start_parse): Use raptor_parser_simple_error with raptor_namespaces_init. (raptor_parser_simple_error): Added, matching the raptor_simple_message_handler API but same as raptor_parser_error. * raptor_xml.c (raptor_xml_escape_string): Use raptor_simple_message_handler. * raptor_qname.c (raptor_new_qname): Use raptor_simple_message_handler. * raptor.h: raptor_sax2_element moved here, semi-public. Re-ordered URI functions earlier. Various methods changed to use (public) raptor_simple_message_handler for error handling. * raptor_internal.h: Delete raptor_internal_message_handler. Added prototype raptor_parser_simple_error, implementing raptor_simple_error_handler API. Various methods changed to use (public) raptor_simple_message_handler for error handling. raptor_sax2_element moved to semi-public raptor.h rdf/xml-specific cdata parts moved from raptor_sax2_element to raptor_element. Added raptor_xml_writer functions. * raptor_namespace.c: Use (public) raptor_simple_message_handler for error handling. 2003-07-24 Dave Beckett * raptor_parse.c (raptor_process_property_attributes): NFC error message tidy. (raptor_end_element_grammar): Fix NFC error reporting and recovery. Report NFC validation failures for XML Literals * tests/Makefile.am: Added bad-15 bad-17 for bad NFC checking * tests/bad-16.rdf, tests/bad-17.rdf, tests/bad-15.rdf: Bad NFC tests for property attribute, element, element ptl * configure.ac: Added check for g_utf8_normalize in glib 2.0 using pkgconfig. Defines HAVE_G_UTF8_NORMALIZE if present. * raptor_internal.h: Added raptor_utf8_is_nfc * raptor_parse.c (raptor_process_property_attributes): Check for valid NFC on property attribute values. (raptor_end_element_grammar): Check for valid NFC on plain literal property element values. * raptor_utf8.c (raptor_utf8_is_nfc): Added Normal Form C checking, using GNOME glib 2.0 g_utf8_normalize initially. * raptor_parse.c (raptor_start_element_grammar): Forbid property attributes and all rdf:* attributes (except rdf:ID) with rdf:parseType * raptor_general.c: (raptor_statement_part_as_counted_string, raptor_print_statement_part_as_ntriples): Do not emit language for datatyped literals. * raptor_parse.c (raptor_process_property_attributes): rdf:li is forbidden as a property attribute * raptor_parse.c: rdf_syntax_terms_info table: rdf:li is forbidden as a property attribute * libraptor.3: Updated raptor_set_feature for RAPTOR_FEATURE_ALLOW_BAGID and RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST * tests/owl-schema.out, tests/ex-39.out: Updated to remove the rdf:type rdf:List triples * raptor_general.c (raptor_set_feature, raptor_set_parser_strict): Added a new feature RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST (user argument) and feature_allow_rdf_type_rdf_List (internal) to generate the rdf:type rdf:List triple from rdf:parseType="Collection". The default is no after latest RDF/XML revisions. Not relevant for daml:Collection which get the daml:List always. * raptor.h: Added a new feature RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST to control rdf:type rdf:List triple generation from rdf:parseType="Collection" (default no) * raptor_internal.h: Added a new feature feature_allow_rdf_type_rdf_List to control rdf:type rdf:List triple generation from rdf:parseType="Collection" (default no) * raptor_parse.c (raptor_start_element_grammar): Remove rdf:type rdf:List triple generation from rdf:parseType="Collection" by default. Not for daml:Collection. Add a new feature feature_allow_rdf_type_rdf_List to control this. 2003-07-22 Dave Beckett * raptor_xml.c (raptor_valid_xml_ID, raptor_xml_escape_string): unsigned long for all unichars. * raptor_internal.h: Update raptor_utf8_to_unicode_char to use unsigned long output. * raptor_utf8.c (raptor_utf8_to_unicode_char): Take and use unsigned long for unichars. * raptor_rss.c: namespace->nspace since might be a C/C++ keyword sometime * raptor_www_curl.c (raptor_www_curl_header_callback): Turn void* into char* * raptor_set.c: Casts * rdfdump.c (rdfdump_error_handler): Cast data into raptor_parser* * raptor_www_curl.c: (raptor_www_curl_write_callback,raptor_www_curl_header_callback): Return unsigned int 0 on failure, cannot return -1 :) * raptor_www.c: Some casts near mallocs * tests/owl-schema.out: Updated to match 2003-03-18 version. * tests/owl-schema.rdf: Updated to 2003-03-18 version (just changed DOS line endings) * ntriples_parse.c (raptor_ntriples_parse_chunk): Handle just the end marker being given i.e. len=0 (and possibly s=NULL) * raptor_parse.c (raptor_xml_end_element_handler): When parsing has been aborted (rdf_parser->failed), clean up used memory rather than just return. element_name is not used except when debugging, so #ifdef it. 2003-07-21 Dave Beckett * raptor.h: Export global statics raptor_copyright_string, raptor_version_string, raptor_version_major, raptor_version_minor, raptor_version_release and raptor_version_decimal * raptor_general.c: Added statics raptor_copyright_string, raptor_version_string, raptor_version_major, raptor_version_minor, raptor_version_release and raptor_version_decimal * Makefile.am: Removed raptor_cc code since ISO may charge a commercial use fee for this list. * raptor_cc.gperf: ISO 3166-1 'The use of ISO 3166-1 in commercial products may be subject to a licence fee.' says the maintenance agency. Goodbye code. See http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/index.html * raptor_parse.c: Free former rdf:about, rdf:resource attribute string values before they are zapped. * raptor_parse.c (raptor_xml_parse_terminate): Delete the sax2 object when cleaning up. * rdfdump.c: Free new uri_string when it's allocated for a filename * rdfdump.c: Tidied usage and help information. * rapper.1: Updated to match current rapper arguments. * Makefile.am: Added raptor_identifier.c * raptor_general.c, raptor_identifier.c: Moved raptor_identifer classes to raptor_identifier.c 2003-07-20 Dave Beckett * rdfdump.c: If first argument is a filename, make it into a file:/// uri. * raptor_uri.c (raptor_default_new_uri): Turn probably-bad file:filename 'URIs' into proper file:///... etc. ones. * raptor_parse.c: Make use of forbidden rdf-namespaced property attributes into errors, as they should be. (raptor_forbidden_propertyAttribute_name): Now used. Reword some error messages. * tests/Makefile.am (check-bad-rdf): Note when bad test succeeds instead of failing * tests/Makefile.am: Added bad-13, bad-14 * tests/bad-14.rdf: rdf:Description is not a legal property attribute * tests/bad-13.rdf: A property element cannot take rdf:about * raptor_uri.c (raptor_new_uri_for_xmlbase): Docs 2003-07-15 Dave Beckett * libraptor.3: formatting * libraptor.3: Added raptor_set_default_generate_id_parameters, raptor_set_generate_id_handler * raptor_general.c (raptor_set_default_generate_id_parameters): Fix it right this time. * raptor_general.c (raptor_set_default_generate_id_parameters): Fix base so the next generated ID uses the integer given, not integer+1 * raptor_general.c (raptor_free_parser): Free any user-set genid prefix. 2003-07-13 Dave Beckett * raptor.h: raptor_genid_type enum added - for RAPTOR_GENID_TYPE_BNODEID, BAGID Added prototypes for raptor_set_generate_id_handler, raptor_set_default_generate_id_parameters. * raptor_general.c (raptor_set_generate_id_handler): Added, to sent the generate ID handler implementation. (raptor_set_default_generate_id_parameters): Added, to sent the generate ID handler parameters for the default implementation ("gen"+integer). (raptor_default_generate_id_handler): Added, moved default code from raptor_generate_id (raptor_generate_id): Use handler if it exists, otherwise the default implementation. * raptor_internal.h: Added generate_id_handler data parts to raptor_parser internals. 2003-06-24 Dave Beckett * tests/Makefile.am: use top_builddir not .. * Makefile.am: add libraptor.la to rapper dependencies 2003-06-23 Dave Beckett * rdfdump.c: Added -e/--ignore-errors otherwise rapper stops parsing after 1st error using raptor_parse_abort. 2003-06-14 Dave Beckett * raptor_rss.c (raptor_rss_insert_identifiers): Back to being legal C99. * libraptor.3: Fix changes for 0.9.11 * libraptor.3: Updated for stuff since 0.9.10 * raptor_rss.c (raptor_rss_insert_identifiers): Init identifier after item * rdfdump.c, configure.ac: Tweak RSS Tag Soup parser words 2003-06-10 Dave Beckett * raptor_parse.c (raptor_xml_start_element_handler): Emit an error for namespace declarations that are RDF namespace URI plus some chars. Emit a warning if a namespace is declared same as RDF one but 1 char short. * tests/Makefile.am: Added bad-12, warn-02 * tests/bad-12.rdf, tests/warn-02.out, tests/warn-02.rdf: Check for bad rdf namespace URI declarations and warn if last char of RDF namespace URI omitted 2003-06-08 Dave Beckett * configure.ac: Fix the check for RSS parser requirements and report it more verbosely. * configure.ac: RSS parser only if libxml/reader.h present (for now). * configure.ac: libcurl reporting * raptor_parse.c (raptor_xml_parse_chunk_): Use sax2->first_read * raptor_parse.c (raptor_xml_parse_start,raptor_xml_parse_chunk_): Don't use first_read on newer libxml2. 2003-06-06 Dave Beckett * raptor_internal.h: raptor_sax2_s: Add first_read #if LIBXML_VERSION < 20425 * raptor_rss.c (raptor_rss_insert_identifiers): Fix GCC-ism, declare variable at start of block. * raptor_parse.c (raptor_xml_parse_init): Move declaration of expat xp to start of function. * examples/raptor_abort.c, examples/grapper.c, strcasecmp.c, rdfdump.c, raptor_xml.c, raptor_www_test.c, raptor_www_libxml.c, raptor_www_libwww.c, raptor_www_curl.c, raptor_www.c, raptor_win32.c, raptor_utf8.c, raptor_uri.c, raptor_set.c, raptor_sax2.c, raptor_rss.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_locator.c, raptor_libxml.c, raptor_general.c, ntriples_parse.c, configure.ac: Merged patch from Jose Kahan to switch to use raptor_config.h (helps people compiling from source with multiple config.h) 2003-06-05 Dave Beckett * examples/grapper.c (fs_ok_button_callback): Use raptor_uri_filename_to_uri_string to make the file URI. (main): If the argument is a filename, make a URI string out of it via raptor_uri_filename_to_uri_string and use it instead of assuming it is a URI. 2003-05-12 Dave Beckett * raptor_xml.c (raptor_xml_escape_string): Changed API - does not require a parser arg. * raptor_internal.h: Moved SAX2 parts and prototypes here. * raptor_general.c: Use RAPTOR_PARSER_RSS to wrap init of RSS parser * raptor.h: Changed prototype of raptor_xml_escape_string - does not require a parser arg. * raptor_parse.c: Split raptor_element/raptor_rdf_xml_parser into SAX2/RDF bits. Lots of function and structure renaming. * configure.ac: Define RAPTOR_PARSER_RSS only when libxml is around * raptor_sax2.c: SAX2 API * Makefile.am: Added raptor_sax2.c 2003-04-28 Dave Beckett * raptor_rss.c (raptor_rss_emit): Use raptor_free_identifier * raptor_rss.c (raptor_rss_emit): Properly init the raptor_identifier items 2003-04-27 Dave Beckett * raptor_rss.c, raptor_parse.c, ntriples_parse.c: Use raptor_parser_register_factory with label param. * raptor.h: Added raptor_get_name, raptor_get_label * raptor_general.c: Added parser label to factory (raptor_parser_register_factory): Add label param, copy it. (raptor_get_name): Added, return name of parser. (raptor_get_label): Added, return label of parser. * raptor_internal.h: Added parser label to factory * examples/grapper.c: Remove some g_printfs Remove use of display qnames - not impl. * raptor_general.c (raptor_statement_part_as_counted_string): Init len for literals with the literal len included * examples/grapper.c: Don't use triples_list for now. (grapper_model_set_syntax): Fix output. (grapper_model_statements_handler): Remove newlines from literals. * raptor_general.c (raptor_statement_part_as_counted_string): Init len for literals. 2003-04-25 Dave Beckett * raptor_set.c: fix doccumment 2003-04-23 Dave Beckett * examples/grapper.c: Replace N-Triples / RDF/XML with dropdown menu and add RSS tag soup. 2003-04-19 Dave Beckett * rdfdump.c: Added -i/--input for rdfxml, ntriples, rss * raptor_internal.h: More RAPTOR_DEBUG macros * raptor_general.c: (raptor_init) Added rss parser via raptor_init_parser_rss when HAVE_LIBXML_XMLREADER_H * Makefile.am: Added raptor_rss.c * raptor_rss.c: Raptor RSS parser 2003-04-17 Dave Beckett * INSTALL.html: Added some links * configure.ac: Bumped version to 0.9.11 * Snapshotted raptor_0_9_10 for 0.9.10 release * TODO.html, NEWS.html: Updated for 0.9.10 release * INSTALL.html: Updated to reflect recent tests. Added examples section, link to libraptor.html Added more configure options docs. * libraptor.3: Added raptor_set_parser_strict Added raptor_www_no_www_library_init_finish * raptor.spec.in: Require curl Added raptor-config, raptor.pc 2003-04-17 Dave Beckett * raptor.spec.in: Require curl Added raptor-config, raptor.pc * tests/Makefile.am: Move rdf:bagID tests to list of tests with warnings for now (while testing in lax mode) 2003-04-15 Dave Beckett * rdfdump.c (print_statements): Print the program name not "rdfdump" hardcoded. 2003-04-14 Dave Beckett * configure.ac: Check for libxml/xmlreader.h 2003-04-13 Dave Beckett * examples/grapper.c: Added about box, triples count. Free some allocated memory. Rest seems lost in gtk. * examples/Makefile.am: Add AM_CFLAGS, LIBS for debugging * raptor_parse.c (raptor_xml_start_element_handler): Don't copy an empty attributes array. * configure.ac: Added raptor.pc * Makefile.am: Added raptor.pc pkgconfig file installing to $(libdir)/pkgconfig * raptor.pc.in: pkgconfig for raptor 2003-04-07 Dave Beckett * TODO.html: words 2003-04-05 Dave Beckett * raptor.h: void arg * examples/raptor_abort.c: Zap curl cleanup. * rdfdump.c: Added -c flag to getopts - oops, missed in last release. Added -m/--mode flag to set strict/lax. Check the values and die with usage. Check the legal values of -o/--output and die with usage. Zap curl cleanup. * raptor_www.c (raptor_www_no_www_library_init_finish): To control global WWW library init/finish * raptor_parse.c: Make bagID optional - removed from language and gives errors (strict), allowed with warnings (lax). lax/strict controlled by feature_allow_bagID * raptor_internal.h: Added feature_allow_bagID * raptor_general.c: Several more docucomments for functions. (raptor_new_parser): Use raptor_set_parser_strict (raptor_set_feature): Added RAPTOR_FEATURE_ALLOW_BAGID (raptor_set_parser_strict): Added to set strict/lax mode flags. * raptor.h: Added RAPTOR_FEATURE_ALLOW_BAGID Added raptor_set_parser_strict Added raptor_www_no_www_library_init_finish 2003-04-03 Dave Beckett * tests/Makefile.am: Added warn-01 * tests/warn-01.out, tests/warn-01.rdf: Check warning on non-prefixed property elements 2003-04-03 Dave Beckett * raptor_parse.c, tests/Makefile.am (raptor_xml_start_element_handler): Error recovery - try to hide that a bad element was found from a parent element, it thinks the element is empty. See tests/warn-00.rdf * tests/warn-00.out, tests/warn-00.rdf: Check warnings 2003-04-02 Dave Beckett * configure.ac, Makefile.am: debian dir elsewhere 2003-04-01 Dave Beckett * TODO.html: docs updated * TODO.html: www tidy by default on raptor_finish * raptor_uri.c (raptor_uri_uri_string_to_filename): Use raptor_strcasecmp (raptor_uri_is_file_uri): Use raptor_strncasecmp 2003-03-31 Dave Beckett * README.html: added libraptor.html * Makefile.am: Added libraptor.html, fix-groff-xhtml * libraptor.3: deleted repeated URI METHODS * libraptor.3: Updated for 0.9.6->present 2003-03-30 Dave Beckett * examples/grapper.c: Use N-triples output style. Pass in URL command line argument * TODO.html: words * TODO.html: XML attribute bugs * Makefile.am: Added raptor_xml.c * raptor_parse.c (raptor_xml_start_element_handler): do XML attribute value normalization for libxml2. Cannot be done properly since the type of the attribute is lost. expat gets it right. (raptor_xml_parse_init): Cast for expat XML_SetExternalEntityRefHandler * raptor_xml.c: Updated for C14N text/attribute node encoding rules. Don't de-UTF8 at the same time. * tests/ex-49.out: > in attribute appears raw * raptor_general.c: (main) Moved raptor_validate_xml_ID, raptor_xml_escape_string test code to raptor_xml.c * raptor_xml.c: Raptor XML routines * raptor_general.c: Moved raptor_validate_xml_ID, raptor_xml_escape_string to raptor_xml.c * tests/Makefile.am: Added ex-49 * tests/ex-49.out, tests/ex-49.rdf: Checking escaping in parseType Literal values with XML attributes * raptor_parse.c (raptor_format_element): Pass in parser for UTF-8 error handling. Use raptor_xml_escape_string for attribute values but only malloc/free if lengths changed. (raptor_xml_end_element_handler): Update to new raptor_xml_escape_string API and only malloc/free it if lengths changed. * raptor_parse.c (raptor_xml_cdata_handler): Use updated raptor_xml_escape_string API * raptor.h: Added raptor_statement_part_as_counted_string, raptor_statement_part_as_string Changed raptor_xml_escape_string API * raptor_general.c (raptor_statement_part_as_counted_string, raptor_statement_part_as_string): Added, making N-triples style output from parts of raptor_statement. (raptor_xml_escape_string): Change API to take an existing buffer/calculate length (main): Update for raptor_xml_escape_string. * examples/Makefile.am: Also clean grapper binary 2003-03-29 Dave Beckett * examples/grapper.c: Added N-Triples parsing * examples/Makefile.am: Don't build grapper usually * examples/grapper.c: Raptor GTK GUI example code * examples/Makefile.am: Added grapper.c * examples/Makefile.am: more deps * raptor_internal.h: Added raptor_print_statement_part_as_ntriples prototype * raptor_general.c: raptor_print_ntriples_string moved to raptor_general.c (raptor_print_statement_part_as_ntriples): Added, internal. (raptor_print_statement_as_ntriples): Now uses above. * ntriples_parse.c: raptor_print_ntriples_string moved to raptor_general.c 2003-03-28 Dave Beckett * examples/Makefile.am: another deps attempt * examples/Makefile.am: typo * examples/Makefile.am: Use LDADD and hunt for @REDLAND_LIBS@ Added $(top_builddir)/../librdf/librdf.la * configure.ac: Hunt for librdf.la in abs dir * rapper.1: added -c/--count * examples/Makefile.am: Fixes to make cross-dir building work. * TODO.html: docs * configure.ac, Makefile.am: Added examples dir * raptor_general.c (raptor_parse_uri_with_connection): Added. (raptor_parse_abort): Added. * raptor.h: Added raptor_parse_uri_with_connection. Added raptor_parse_abort. * examples/raptor_abort.c, examples/Makefile.am: examples * rdfdump.c: Call curl_global_cleanup if using curl to free it's resources. * raptor_www.c (raptor_www_init,raptor_www_finish): Don't init/cleanup curl, we can't guarantee doing this at most once if a handle is passed in. * raptor_www_curl.c (raptor_www_curl_free): Tidy * raptor_www_curl.c (raptor_www_curl_init,raptor_www_curl_free): Use/mark field curl_init_here to note when to cleanup a handle - don't destroy one that was provided. * raptor_internal.h: for curl, record when curl_easy_init was done in raptor * raptor_general.c (raptor_init): Call raptor_www_init (raptor_finsh): Call raptor_www_finish (raptor_parse_uri): Delete www object on failure. * configure.ac: Bumped version to 0.9.10 * Snapshotted raptor_0_9_9 for 0.9.9 release * NEWS.html, README.html: Updated for 0.9.9 release 2003-03-27 Dave Beckett * TODO.html: fixed crashing when rdf/xml parser has no base URI 2003-03-26 Dave Beckett * raptor_set.c: Only use raptor_set_stats_print with RAPTOR_DEBUG * raptor_general.c: Some comment tidying. (raptor_start_parse): Docucomment. Copy the uri into the parser structure (base_uri, locator uri), don't just keep the pointer. (raptor_free_parser): Free the base URI in the structure, if present. * raptor_parse.c (raptor_xml_parse_start): Remove uri arg. Fail if no base URI is given - stored in the parser object * ntriples_parse.c (raptor_ntriples_parse_start): Remove uri arg. * raptor_internal.h: raptor_parser_factory start method: Remove (base) uri arg, it's in the object data. * raptor_www.c: Use RAPTOR_FREE,MALLOC,CALLOC (raptor_www_free): Free the www object. Doh. * TODO.html: raptor_start_parse crash with NULL base URI for rdfxml parser * libraptor.3: raptor_parse_chunk: Takes unsigned char buffer. * libraptor.3: raptor_start_parse: Note NULL base URI ok for ntriples * libraptor.3: Typo: raptor_start_parse not raptor_parse_start * raptor_general.c (raptor_xml_escape_string): Make it work with 10ffff again * raptor_parse.c (raptor_xml_cdata_handler): Cast around raptor_xml_escape_string * raptor_general.c (raptor_xml_escape_string): Null terminate new string * raptor_www_libxml.c, raptor_www.c: Use RAPTOR_WWW_BUFFER_SIZE for I/O buffers * raptor_internal.h: Define RAPTOR_WWW_BUFFER_SIZE for I/O buffers * rdfdump.c: Declare raptor_stats_print when RAPTOR_DEBUG * raptor_general.c: (raptor_stats_print) C99 2003-03-24 Dave Beckett * rdfdump.c: Call raptor_stats_print with RAPTOR_DEBUG * raptor_set.c: Record set hits/misses with RAPTOR_DEBUG (raptor_set_stats_print): Defined with RAPTOR_DEBUG * raptor_internal.h: Move raptor_xml_parser typedef here (still internal). raptor_xml_parser_stats_print, raptor_set_stats_print: Defined with RAPTOR_DEBUG * raptor_parse.c (raptor_xml_parser_stats_print): Defined with RAPTOR_DEBUG * raptor_general.c (raptor_stats_print): Defined with RAPTOR_DEBUG * TODO.html: Fixed escaping rdf:parseType="Literal" content * raptor_parse.c (raptor_xml_cdata_handler): Use raptor_xml_escape_string when content type is an XML literal * raptor_general.c (raptor_xml_escape_string): Now takes and returns lengths Fix assumption of '\0' terminated strings. (main): Update for counted strings * raptor.h: raptor_xml_escape_string now takes and returns lengths * raptor.h: Added raptor_xml_escape_string * Makefile.am: Added raptor_general_test * raptor_general.c (raptor_xml_escape_string): Added, XML-escapes UTF-8 strings. (main): Added set of tests for raptor_xml_escape_string 2003-03-23 Dave Beckett * tests/ex-48.out, tests/ex-48.rdf: ex-48 parse type literal with entity encoding * tests/Makefile.am: Added ex-48 * raptor_www_libxml.c (raptor_www_libxml_fetch): Make this work again * raptor_parse.c (raptor_record_ID): Dealloc item after adding * raptor_parse.c: typo * raptor_parse.c: Remove raptor_id_list implementation for ID checking to use raptor_set. (raptor_xml_parse_init): Init raptor_set for ids. (raptor_xml_parse_terminate): Use raptor_free_set. (raptor_record_ID): Use raptor_set_add to check for unique "ID base-URI" (raptor_free_ID_list): Gone * raptor_uri.c (raptor_default_uri_as_counted_string, raptor_uri_as_counted_string): Added and used in default factory. * raptor.h: Added raptor_uri_as_counted_string. * raptor_internal.h: Added raptor_set and raptor_new_set constructor, raptor_free_set destructor and raptor_set_add only method * Makefile.am: Added raptor_set.c, raptor_set_test * raptor_set.c: Raptor sets for ID checking 2003-03-19 Dave Beckett * tests/Makefile.am: Added OWL namespace document / rdf schema owl-schema.rdf, owl-schema.out * raptor_www.c: init w3c libwww * tests/owl-schema.out, tests/owl-schema.rdf: OWL namespace schema * TODO.html: Bug: encoding & < and > in XML literals. * raptor_www_libwww.c: add fatal does-not-work error 2003-03-18 Dave Beckett * raptor_www_libwww.c: Raptor WWW with W3C libwww * rdfdump.c: Added -c/--count option to just count triples, don't print anything. * raptor_www_test.c: Use raptor_www_init/finish * raptor_www_libxml.c: Handle www->failed and aborting transfer. * raptor_www_curl.c: Handle www->failed and aborting transfer. (raptor_www_curl_init): Use passed-in connection if available. * raptor_www.c (raptor_www_init): Added, for once-only init. (raptor_www_finish): Added, for once-only tidy. (raptor_www_new): Now uses new constructor (raptor_www_new_with_connection): Added, allows re-use of existing www library connection - just curl at present. (raptor_www_get_connection): Added, returns current libwww library connection. (raptor_www_abort): Added to stop a www transaction. (raptor_www_file_fetch): Tidying of errors; handle abort. (raptor_www_fetch): Uses raptor_www_file_fetch for all files. * raptor_internal.h: Added W3C libwww prototypes. * raptor_parse.c: Throughout all SAX event handlers - if rdf_parser->failed set, return immediately, doing no work. * raptor_general.c (raptor_parse_uri_write_bytes): Use raptor_www_abort if parsing fails. (raptor_parse_uri): Return error status. Pass on is_end empty chunk. (raptor_parser_abort): Added, setting failed flag. (raptor_print_statement_detailed): Typo * raptor.h: Added raptor_www_abort * raptor.h: Add raptor_www_init, raptor_www_finish. Add raptor_www_new_with_connection Add raptor_www_get_connection * configure.ac: Added w3c libwww configuring 2003-03-16 Dave Beckett * rdfdump.c: Use raptor_parse_uri * raptor_general.c (raptor_parse_uri_write_bytes): Added, to support: (raptor_parse_uri): Added, using raptor_www to get and deal with all the data in one go. * raptor.h: raptor_parse_uri takes optional base_uri * raptor_www_test.c: Use URI from context. Take www arg on handlers Use raptor_uri * raptor_www_libxml.c, raptor_www_curl.c: Use URI from context. Take www arg on handlers * raptor_www.c (raptor_www_set_userdata): Gone (raptor_www_free): Free request uri (raptor_www_set_write_bytes_handler, raptor_www_set_content_type_handler): Added (raptor_www_file_fetch): pass www to write_bytes (raptor_www_fetch): Don't pass URI on. * raptor_internal.h: Store raptor_uri of request Use new declared write_bytes, content_type handlers *fetch methods don't take URI string * raptor.h: Declare handlers for raptor www write bytes, content type raptor_www_fetch now takes a raptor_uri * raptor_parse.c: Fix broken-fix for broken-expat UTF8 BOM crash. tokens_count is on the rdf_xml_parser not rdf_parser * configure.ac: tweak * configure.ac: tidy libcurl version * raptor_internal.h, configure.ac: No more gnome-xml/libxml.h * configure.ac: Min libxml2 now 2.4.0 * configure.ac: Don't look for xml-config * raptor_general.c (raptor_parse_file): Tidy up if raptor_start_parse fails * raptor_general.c: Removed raptor_start_parse_file - merged into raptor_parse_file * raptor_www.c (raptor_www_file_fetch): Used for RAPTOR_WWW_NONE Report file open errors, correct file read eof handling. (raptor_www_fetch) Use only raptor_www_file_fetch for RAPTOR_WWW_NONE * raptor_general.c (raptor_start_parse_file): Improve file open error message * configure.ac: Added --with-www=none option and RAPTOR_WWW_NONE to indicate it 2003-03-15 Dave Beckett * raptor_www.c (raptor_www_error): Use RAPTOR_FREE * raptor_www_test.c: Call raptor_uri_init * raptor_www_curl.c (raptor_www_curl_fetch): call raptor_www_error * raptor_internal.h: Use raptor_message_handler again * raptor.h: Use raptor_message_handler again in raptor_www_set_error_handler, raptor_www_error * raptor_www.c (raptor_www_free): Tidy locator URI (raptor_www_set_error_handler, raptor_www_error): Use raptor_message_handler again. (raptor_www_error): Use raptor_locator in output, error handler. (raptor_www_fetch): Store the URI string of request in the locator * raptor.h: Declare raptor_www_message_handler (no locator) * raptor_general.c: raptor_vsnprintf now internally visible. * raptor_internal.h: Use different error handler, no parser context. raptor_vsnprintf now internally visible. Added raptor_www_error prototype * raptor_www.c: Only enable raptor_www_file_fetch with libxml, (raptor_www_set_error_handler): Use different error handler, no parser context. * configure.ac, Makefile.am: Added raptor WWW enabling, configuring * raptor_internal.h: Added raptor WWW retrieval internal includes, structs, prototypes * raptor.h: Added raptor WWW retrieval prototypes * raptor_www.c, raptor_www_curl.c, raptor_www_libxml.c, raptor_www_test.c: Raptor WWW retrieval 2003-03-04 Dave Beckett * raptor.h: Export raptor_free_parser with RAPTOR_API * win32_config.h: add trailing #endif * win32_config.h: s/WIN32_LEAD_AND_MEAN/WIN32_LEAN_AND_MEAN/ * raptor_parse.c (raptor_xml_comment_handler): Added - nop at present. (raptor_xml_parse_init): For expat, use raptor_xml_comment_handler * raptor_libxml.c: (raptor_libxml_init) Use raptor_xml_comment_handler * raptor_internal.h: Add raptor_xml_comment_handler prototype * configure.ac: Try to make maintainer mode flags match redland's defaults. 2003-03-03 Dave Beckett * configure.ac, Makefile.am: Fix cflags/cppflags when in redland 2003-03-02 Dave Beckett * tests/ex-46.out, tests/ex-46.rdf: make rdf:li and rdf_2 property elements generate different triples 2003-02-27 Dave Beckett * tests/ex-46.out: fix * tests/Makefile.am: Added ex-47 * tests/ex-47.out, tests/ex-47.rdf: Exercise all rdfs vocab * tests/Makefile.am: Added ex-46 * tests/ex-46.out, tests/ex-46.rdf: Exercise all rdf vocab 2003-02-24 Dave Beckett * win32/raptor.plg, win32/Makefile.am: deleted raptor.plg * win32/raptor.dsp, win32/README: Updated win32 config - from contributed patches 2003-02-23 Dave Beckett * raptor_uri.c: Correct :'s turning into |'s in win32 file URIs 2003-02-20 Dave Beckett * autogen.sh: run libtoolize in each configure.ac dir * win32_config.h: win32 has C99 compatible vsnprintf called _vsnprintf * configure.ac: Check for vsnprintf and check for C99 compatible return value. * raptor_general.c (raptor_vsnprintf): Added for handling compatibilty with vsnprintf that doesn't match C99. 2003-02-19 Dave Beckett * tests/Makefile.am: Use $(ECHO) which may be different from sh's echo * Makefile.am: Changing, moved raptor_getopt.h to rapper_SOURCES after automake manual recommendation. * Makefile.am: Put raptor_getopt.h in noinst_HEADERS * Makefile.am: No need for EXTRA_libraptor_la_SOURCES * Makefile.am: Use LTLIBOBJS for extra libraptor objs * raptor.h: again * raptor.h: don't do deprecated on broken OSX gcc * raptor_getopt.h, getopt.c: No need for prefix * getopt.c: Duh - use raptor getopt header * Makefile.am: Use RAPPER_EXTRA_OBJS to optionally add getopt to rapper only * configure.ac: Add getopt object to RAPPER_EXTRA_OBJS * rdfdump.c: Add raptor_getopt.h for local version * raptor_getopt.h: Define rest of getopt externs * getopt.c: More prefixes * raptor_getopt.h, getopt.c: Public domain getopt * configure.ac: Check for getopt and add getopt.o if it missing. * autogen.sh: try asking the progs for their version - slower, but right * autogen.sh: tidying * acconfig.h: acconfig.h obsoleted * Makefile.am: Use AM_CPPFLAGS * autogen.sh: Min versions are bumpled - 2.52 for autoconf, 1.6 for automake Now hunts for newest, shinyest autoconf and automake/aclocal and uses them whatever is available. 2003-02-18 Dave Beckett * configure.ac: autoconf 2.5x configure.ac * configure.in: Replaced with autoconf 2.5x configure.ac 2003-02-15 Dave Beckett * raptor.h: Move stuff around, consolidate deprecated bits * ntriples_parse.c, rdfdump.c: No need for ntriples.h * raptor.h: Moved all ntriples.h defines here. Defined RAPTOR_DEPRECATED (with gcc 3.1+) and used on old api calls. * ntriples.h: Moved all definitions to raptor.h - this file is now deprecated. 2003-02-14 Dave Beckett * raptor-config.in: No exec-prefix * raptor-config.1: Manual page for raptor-config * Makefile.am: Added raptor-config.1 * rapper.1: EXAMPLE 2003-02-13 Dave Beckett * tests/Makefile.am: $name=>$$name * configure.in: Bumped version to 0.9.9 * Snapshotted raptor_0_9_8 for 0.9.8 release * raptor.spec.in: release is 1 * NEWS.html: Updated for 0.9.8 release 2003-02-12 Dave Beckett * Makefile.am: Restore LICENSE.txt * Makefile.am: No LICENSE.txt in dist * README.html: Updated for 0.9.8 release. * TODO.html: Note some missing conformance bits. * raptor_uri.c (main): Use lstat, reading a selection of dirs to try harder to test relative file URIs. * configure.in: check for sys/stat.h (for raptor_uri_test main) * TODO.html: Note PNG parser * tests/Makefile.am: There is no portable test == operator * TODO.html: Fixed xmlns:foo="" being erroneously allowed. * raptor_parse.c (raptor_xml_start_element_handler): Updated call to raptor_namespaces_start_namespace to use error_handler, error_data parameters * raptor_general.c (raptor_start_parse): Updated call to raptor_namespaces_init to use error_handler, error_data parameters * raptor_internal.h: Updated raptor_namespaces_init, raptor_namespaces_start_namespace, raptor_namespace_new with error_handler, error_data parameters * raptor_namespace.c: (raptor_namespaces_init, raptor_namespaces_start_namespace, raptor_namespace_new): Add error handler and data parameters and use to explain how xmlns:foo="" isn't allowed 2003-02-11 Dave Beckett * raptor_parse.c: multiple objects of a property element (statement) is an error * tests/Makefile.am: Report warnings when they occur. Print the warning text * tests/bad-11.rdf: now xml * tests/Makefile.am: typo - restult * tests/bad-11.rdf: Check xmlns with no namespace name (URI) fails * tests/Makefile.am: Added bad-11 * TODO.html: diagnosed crash on empty xml namespace name (URI) * TODO.html: Fixed empty docs now give error, not crash. * raptor_libxml.c (raptor_libxml_update_document_locator): Handle empty parser context. * tests/Makefile.am: ex-46 now bad-10 * tests/bad-10.rdf, tests/ex-46.rdf, tests/ex-46.out: Now bad-10 * raptor_parse.c (raptor_xml_parse_chunk_): Make an empty rdf/xml bytestream an illegal doc (like expat) and return an error. * TODO.html: Clarified empty files bug * raptor_libxml.c (raptor_libxml_update_document_locator): Don't use loc if it is NULL such as errors before start of XML document. * raptor_libxml.c: Check for xmlSAXHandler externalSubset field, not present in old libxml v1. Whether raptor works after this is unlikely and untested. * configure.in: Add old libxml V1 warning and suggestion * acconfig.h: Added RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET * configure.in: Check for xmlSAXHandler externalSubset field * INSTALL.html: Added libxml1 warning * TODO.html: note some bugs 2003-02-10 Dave Beckett * raptor_locator.c (raptor_print_locator): Only print non-negative line numbers * raptor_parse.c (raptor_xml_parse_chunk_): For libxml, handle first chunk being empty, when the XML parser context, xc, is attempted to be initialiased * tests/Makefile.am: Added ex-46 (Empty file should give 0 triples) * tests/ex-46.out, tests/ex-46.rdf: Empty file should give 0 triples 2003-01-27 Dave Beckett * Makefile.am: Remove $? and replace with $< or full dependencies 2003-01-21 Dave Beckett * ntriples_parse.c: Fix macro IS_ASCII_DIGIT which refused to allow '0'. 2003-01-13 Dave Beckett * rdfdump.1: rdfdump.1 renamed to rapper.1 * raptor.spec.in, tests/Makefile.am, TODO.html, README.html, NEWS.html, Makefile.am, INSTALL.html: rdfdump now rapper * rapper.1: rdfdump.1 renamed to rapper.1 raptor-1.4.21/ChangeLog.50000644000175000017500000024056310247340024011752 000000000000002004-12-31 Dave Beckett * raptor_rss.c (raptor_rss10_serialize_terminate): Free all namespaces, now they are not stacked explicitly. Free namespace stack. (raptor_rss10_build_xml_names): Use raptor_new_namespace and don't start the rdf namespace. (raptor_rss10_build_xml_names): Use raptor_new_namespace and don't start the namespaces ((raptor_rss10_serialize_end): Make a namespace stack here, with only xml: defined. * raptor_xml_writer.c (raptor_xml_writer_start_namespace_full): Deleted. (main): Declare the foo namespace but don't start it, so that the xml writer will do that. * raptor_xml_writer.c: Optionally declare a namespace stack internally. (raptor_new_xml_writer): Add optional raptor_namespace_stack parameter, if NULL declare one internally. * turtle_lexer.l, turtle_parser.y: Delete unused WS token * raptor_xml_writer.c, raptor_sax2.c, raptor_rss.c, raptor_rdfxml.c, raptor_internal.h, raptor.h, libraptor.3: Rename raptor_sax2_element to raptor_xml_element throughout. * raptor_internal.h: Added feature_start_uri to raptor_serializer * raptor_serialize.c (raptor_free_serializer): Tidy up any feature_start_uri set. (raptor_serializer_set_feature_string): Added, handling feature_start_uri created from a passed in string. (raptor_serializer_get_feature_string): Added, handling feature_start_uri as a returned shared string. * raptor_parse.c (raptor_parser_set_feature_string): Added, always failing. (raptor_parser_get_feature_string): Added, always failing. * raptor.h: Added feature RAPTOR_FEATURE_START_URI Added prototypes for raptor_parser_set_feature_string, raptor_parser_get_feature_string, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string and raptor_feature_value_type * raptor_feature.c: Added flag bits for string valued features. Added startUri (RAPTOR_FEATURE_START_URI) with a string value. (raptor_feature_value_type): Added, to return value of a feature. 2004-12-30 Dave Beckett * libraptor.3: Added SAX2 XML Element and XML Writer classes. * raptor_internal.h, raptor.h: Moved raptor_sax2_element and raptor_xml_writer to public API. * libraptor.3: Added rss-1.0 to raptor_new_serializer description. * libraptor.3: More updates for 1.4.3 2004-12-25 Dave Beckett * raptor_rss.c (raptor_rss_parser_processNode): Turn val into (raptor_rss10_emit_item): Always serialize rss:items at the end of an rss channel. * raptor_xml_writer.c, raptor_xml.c, raptor_utf8.c, raptor_sax2.c, raptor_rss.c, raptor_general.c: Casts for c++. Rename variables namespace to nspace. 2004-12-24 Dave Beckett * raptor_www_test.c (main): Cast for size_t 2004-12-23 Dave Beckett * raptor_rss.c (raptor_rss10_serialize_statement): Fix item URI check to use correct URI. In debugging unknown typed node, print type URI. * raptor_rss.c (raptor_rss10_serialize_statement): Do not look in items with no URI. (raptor_rss10_build_xml_names): Do not make qnames for types with no namespace. * raptor_rss.c (raptor_rss10_build_items): Do nothing if there is no seq_uri * raptor_rss.c (raptor_init_serializer_rss10): Give rss 1.0 a URI * raptor_serialize.c (raptor_iostream_write_string_ntriples): Renamed from raptor_serialize_ntriples_print_string and made public. Handle delimiters that aren't ' or " such as >, and if found \uHHHH escape it. (raptor_iostream_write_statement_part_ntriples): Renamed from raptor_serialize_ntriples_print_statement_part and made public. (raptor_iostream_write_statement_ntriples): Added and made public. (raptor_ntriples_serialize_statement): Moved most code to raptor_iostream_write_statement_ntriples * raptor.h: Add and export raptor_iostream_write_ntriples_string and raptor_iostream_write_statement_ntriples * tests/turtle/test-13.ttl, tests/turtle/test-13.out: Use a namespace URI that gives a predicate which could be serialized to rdf/xml. * raptor_rss.c (raptor_rss_insert_identifiers): For channel type, check both the link field and the atom:id field. * raptor_rss.c (raptor_rss10_emit_item): Emit the .... here. (raptor_rss10_serialize_end): Moved items code above. * raptor_parse.c (raptor_guess_parser_name): Don't emit debug messages about scores unless very debuggy. * n3_lexer.l, turtle_lexer.l: In state, accept remaining characters so -s is true. * raptor.h: Export raptor_xml_name_check * raptor_xml.c (raptor_valid_xml_ID): Use raptor_xml_name_check with appropriate XML version. (raptor_xml_name_check): Added to check for a legal XML name. * raptor_utf8.c (raptor_utf8_check): Added, to just check a string is good UTF-8 and all the Unicode characters are 0 <= char <= 0x10ffff * raptor.h: Export raptor_utf8_check * raptor_nfc_test.c (main): Use raptor_utf8_check * raptor_xml_writer.c (main): Update tests for changed xml_writer api * raptor.h: Export raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml10_namestartchar raptor_unicode_is_xml11_namechar and raptor_unicode_is_xml10_namechar * raptor_utf8.c: (raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml11_namechar, raptor_unicode_is_xml10_namechar): Added, as public functions called by raptor_unicode_is_namestartchar and raptor_unicode_is_namechar respectively. * raptor_rss.c (raptor_clear_rss_items): Renamed from raptor_free_rss_items. Use raptor_free_rss_item. (raptor_rss_context_terminate): Rename call to raptor_clear_rss_items * raptor_rss.c (raptor_clear_rss_item): Renamed from raptor_free_rss_item to empty a static raptor_rss_item. (raptor_free_rss_item): Same as above but deallocates the item too. (raptor_free_rss_items, raptor_rss_context_terminate): Use raptor_clear_rss_item. * raptor_rss.c (raptor_rss10_move_statements): Add item arg. Remove auto-fail with type RAPTOR_RSS_ITEM, and now look in the sequence of items for instances of this type. Count and report moved statements counts when debugging. (raptor_rss10_store_statement): Only print out individal statement moves when debugging. (raptor_rss10_serialize_statement): When typed node is an item, get the URI from the entry in the sequence if it exists, maybe move the statements then. (raptor_rss10_build_items): Move any item statements once the item URIs have been made. (raptor_rss10_serialize_end): Report triples remaining when debugging. Remove last raw use of raptor_iostream* 2004-12-22 Dave Beckett * raptor_rss.c: Fix 'enc' prefix. Add rdf_RDF_element and xml_writer to raptor_rss10_serializer_context. (raptor_rss10_serialize_init): No need for nstack here. (raptor_rss10_serialize_terminate): Delete nstack tidy. Tidy up xml_writer and type qnames. (raptor_rss10_move_statements): Note don't do rss items. (raptor_rss10_build_items): Build list of raptor_rss_item* in rss_serializer->items. (raptor_rss10_build_xml_names): Added to make namespaces and qnames for fields and types; pulled out of raptor_rss10_build_items. (raptor_rss10_emit_item): Delete xml-writer, iostr args. Replace more raptor_iostream* functions with raptor_xml_writer* equivalents. (raptor_rss10_serialize_end): Extra nl at end * raptor_rss.c: Fix 'enc' prefix. Add rdf_RDF_element and xml_writer to raptor_rss10_serializer_context. (raptor_rss10_serialize_init): No need for nstack here. (raptor_rss10_serialize_terminate): Delete nstack tidy. Tidy up xml_writer and type qnames. (raptor_rss10_move_statements): Note don't do rss items. (raptor_rss10_build_items): Build list of raptor_rss_item* in rss_serializer->items. (raptor_rss10_build_xml_names): Added to make namespaces and qnames for fields and types; pulled out of raptor_rss10_build_items. (raptor_rss10_emit_item): Delete xml-writer, iostr args. Replace more raptor_iostream* functions with raptor_xml_writer* equivalents. (raptor_rss10_serialize_end): Move rdf_RDF qname stuff to new raptor_rss10_build_xml_names Move bits around so that rdf:RDF is declared with all namespaces known and using raptor_xml_writer_start_element. Emit rdf:Seq and rdf:li elements using_xml_writer_start_element with attributes as needed. Attempt to emit channel items. * raptor_internal.h: Remove raptor_xml_writer_element_declare_namespace_full * raptor_xml_writer.c: Renamed content_cdata_namespaces to nstack, content_cdata_namespaces_depth to nstack_depth. (raptor_xml_writer_start_namespace_full): Added, to start a new namespace in the xml_writer at the current element. (raptor_xml_writer_cdata_counted, raptor_xml_writer_raw_counted, raptor_xml_writer_comment_counted): Added.counted string versions. * raptor_sax2.c (raptor_new_sax2_element, raptor_free_sax2_element): Init/tidy declared_namespaces. (raptor_sax2_declare_namespace): Added to declare the given namespace on the element. (raptor_iostream_write_sax2_element): Handle declared_namespaces; boost the nspace_declarations by size of the sequence. Declare all the namespaces in the declared_nspaces sequence. * raptor_rdfxml.c (raptor_xml_comment_handler): Use raptor_xml_writer_comment (uncounted). (raptor_cdata_grammar): Use raptor_xml_writer_cdata_counted * raptor_internal.h: raptor_sax2_element added declared_nspaces field Added prototype for raptor_sax2_declare_namespace. Added prototypes for raptor_xml_writer_start_namespace_full and raptor_xml_writer_element_declare_namespace_full Split raptor_xml_writer_cdata / raptor_xml_writer_raw / raptor_xml_writer_comment into uncounted and raptor_xml_writer_cdata_counted / raw_counted / comment_counted 2004-12-21 Dave Beckett * raptor_rss.c: Made rss1.0 the default namespace for writing; added prefixes for others. (raptor_rss10_serialize_end): Removed unused commented code. * raptor_qname.c (raptor_qname_copy): Added. * raptor.h: Added raptor_qname_copy. * raptor_rss.c: raptor_rss_item field node_type is now a pointer to the raptor_rss_info* for that node type. (raptor_rss_insert_identifiers, raptor_rss_emit_item): Update for new node_type definition. raptor_rss10_serializer_context now has rdf_nspace (raptor_rss10_build_items): Declare rdf namespace and store in rss_serializer->rdf_nspace - freed when namespace stack is destroyed. Declare all raptor_namespace* for the raptor_rss_namespaces_info[].nspace Declare all raptor_qname* for the raptor_rss_fields_info[].qname Declare all raptor_qname* raptor_rss_types_info[].qname Insert node_type pointers for all items. (raptor_rss10_emit_item): Add xml_writer argument. Use more of xml_writer to emit main type element and predicate names. Incomplete. (raptor_rss10_serialize_end): Declare and use mxl_writer and qname, element for rdf:RDF. Incomplete. * raptor_rss.c: Do not init all NULL fields for raptor_rss_namespaces_info * raptor_rss.c: Added raptor_rss_namespace_info typedef and raptor_rss_namespaces_info merging uri_strings and prefixes for namespaces. Made all rss info static. (raptor_rss_common_init, raptor_rss_parser_processNode, raptor_rss10_serialize_end): Update for namespace URIs struct change. * raptor_rss.c: Added rss_namespace_prefix_strings to list namespaces to declare. raptor_rss10_serializer_context gains raptor_namespace_stack nstack field. (raptor_rss10_serialize_init): Init the namespace stack. (raptor_rss10_serialize_terminate): Clean namespace stack and any defined qnames. (raptor_rss10_emit_item): Padding. (raptor_rss10_serialize_end): Write namespace decls using stack. * raptor_rss.c: Rename some destructors more normally: (raptor_free_rss_item): Renamed from raptor_item_free. (raptor_free_rss_items): Renamed from raptor_rss_items_free. (raptor_rss10_move_statements, raptor_rss10_store_statement): Record field counts per item. (raptor_rss10_build_items): Find the rdf:_ items and put them into a raptor sequence. (raptor_rss10_emit_item): Skeleton rss item writer. (raptor_rss10_serialize_end): Make the final structures and do the serializing in skeleton form. 2004-12-20 Dave Beckett * raptor_rss.c: Added seq_uri to raptor_rss10_serializer_context (raptor_rss10_serialize_terminate): Tidy seq_uri (raptor_rss10_move_statements, raptor_rss10_store_statement): Ignore checking fields with no URI. (raptor_rss10_serialize_statement): For rdf:Seq node, store the URI or blank node - as fake URI. Make fake object node correctly for general statements. * raptor_rss.c (raptor_rss_common_init): Prevent 2x initialising. (raptor_item_free): Free type URI (raptor_rss10_serialize_terminate): Call raptor_rss_common_terminate. (raptor_rss10_move_statements): Use RAPTOR_IDENTIFIER_TYPE_PREDICATE set raptor_sequence_set_at destroy overwritten object. (raptor_rss10_store_statement): Use RAPTOR_IDENTIFIER_TYPE_PREDICATE Make fake URIs from blank node strings and free them. * raptor_general.c (raptor_free_statement): Handle more statement part types. * raptor_rss.c: RAPTOR_RSS_FIELDS_SIZE now stops before UNKNOWN for real field names. (raptor_rss10_move_statements): Added, to move statements from the sequence of triples to below a typed node once a new typed node of the given type appears. (raptor_rss10_store_statement): Added, to store a given statement either below an existing typed node or in a sequence of triples if it can't be found one. * raptor_rss.c (raptor_rss10_serialize_statement): iostream write turned into debug. 2004-12-19 Dave Beckett * raptor_uri.c (raptor_uri_print): Cast for gcc * raptor_rss.c: Use raptor_uri in raptor_rss_item. (raptor_rss_context_init, raptor_rss_context_terminate): Added and used in parser and serializer init and terminate. (raptor_rss10_serialize_init): Initialise list of triples, items. (raptor_rss10_serialize_terminate): Tidy up triples, items. (raptor_rss10_serialize_statement): Look for known typed nodes, identify ones matching rss 1.0 model and also look for the rdf:Seq. Store other triples for later. (raptor_rss10_serialize_end): Added skeleton. 2004-12-18 Dave Beckett * raptor_uri.c (raptor_uri_print): Added. * raptor.h: Added raptor_uri_print * raptor_general.c (raptor_statement_copy): Added statement copy constructor (raptor_free_statement): Added statement destructor. * raptor_internal.h: Added raptor_statement_copy and raptor_free_statement * raptor_rss.c: Moved parser namespace URIs to common code rss_namespace_uris. (raptor_rss_common_init, raptor_rss_common_terminate): Added to initialise and free up common rss items - namespace URIs, URIs for types and uris for properties. Added skeleton RSS 1.0 serializer (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate, raptor_rss10_serialize_statement, raptor_rss10_serialize_finish_factory, raptor_rss10_serializer_register_factory, raptor_init_serializer_rss10): Added skeleton RSS 1.0 serializer factory and methods. * raptor_general.c (raptor_init): Added call to raptor_init_serializer_rss10 * raptor_internal.h: Added raptor_init_serializer_rss10 * raptor_rss.c (raptor_rss_parse_recognise_syntax): Add atom checks. 2004-12-17 Dave Beckett * tests/Makefile.am: Added RDF_MAYFAIL_XML_TEST_FILES,RDF_MAYFAIL_XML_OUT_FILES and rule check-mayfail-xml-rdf to run checks that may fail due to XML parser bugs. * raptor_sax2.c, raptor_serialize.c, raptor_iostream.c, raptor_nfc.c, raptor_rdfxml.c: Initialise possibly used but uninitialised vars to remove gcc warning with -O. * raptor_namespace.c, raptor_rdfxml.c, raptor_serialize.c, raptor_xml_writer.c, rdfdump.c, raptor.h, raptor_internal.h, raptor_iostream.c: Casts for c++ * raptor_rdfxml.c: Fix using wrong element name in warnings. * raptor_rdfxml.c (raptor_xml_start_element_handler): Use raptor_sax2_element_set_attributes. * raptor_xml_writer.c (raptor_xml_writer_empty_element): Added. (raptor_xml_writer_start_element, raptor_xml_writer_end_element): Updated raptor_iostream_write_sax2_element calls (main): Add attributes and test writing empty element. * raptor_internal.h: Added raptor_sax2_element_set_attributes Added is_empty arg to raptor_iostream_write_sax2_element Added raptor_xml_writer_empty_element * raptor_sax2.c (raptor_sax2_element_set_attributes): Added. (raptor_print_sax2_element): tidy (raptor_iostream_write_sax2_element): Added is_empty arg and use it for form. 2004-12-14 Dave Beckett * libraptor.3: Actaully updated for 1.4.3 so far * libraptor.3: Updated for 1.4.2 so far. * tests/turtle/README.txt, tests/turtle/rdfq-results.out, tests/turtle/test-00.out, tests/turtle/Makefile.am: Switch to base URI http://www.w3.org/2001/sw/DataAccess/df1/tests/ * tests/turtle/test-13.out, tests/turtle/test-13.ttl, tests/turtle/manifest.ttl, tests/turtle/bad-12.ttl, tests/turtle/bad-13.ttl, tests/turtle/manifest-bad.ttl, tests/turtle/bad-10.ttl, tests/turtle/bad-11.ttl, tests/turtle/bad-08.ttl, tests/turtle/bad-09.ttl, tests/turtle/bad-04.ttl, tests/turtle/bad-05.ttl, tests/turtle/bad-06.ttl, tests/turtle/bad-07.ttl, tests/turtle/Makefile.am: Import more bad turtle tests, initial manifest files * raptor_namespace.c (raptor_iostream_write_namespace): Handle ns->uri is NULL and no prefix, i.e. emitting xmlns="" * raptor_namespace.c (raptor_namespaces_format): Handle ns->uri is NULL and no prefix, i.e. emitting xmlns="" 2004-12-08 Dave Beckett * raptor_uri.c (raptor_default_new_uri_relative_to_base): Ask for 1 more char for new URI to allow inserting of a missing "/" path. * raptor_rfc2396.c (raptor_uri_resolve_uri_reference): Add debug message. When adding a missing path "/", set the path_len and the uri_len to match. (main): Added test when a missing abs / path is added. * raptor_sequence.c (raptor_sequence_set_at, raptor_sequence_get_at): Check for non-negative idx * raptor_sequence.c (raptor_sequence_get_at): Fix index offset check 2004-12-02 Dave Beckett * rdfdump.c: Make a raptor_sequence of namespace declarations declared by '-f xmlns:foo="bar"' and then add them to the serializer when initialised. (rdfdump_free_namespace_decl): Added, to provide a helper to cleanup. * raptor_serialize.c (raptor_serialize_set_namespace): Call factory method declare_namespace. (raptor_rdfxml_serialize_declare_namespace): Copy the passed in namespace prefix, URI before storing the namespace. (raptor_rdfxml_serialize_start): Delete the namespace sequence contents as the namespaces are declared on the namespace stack, which is the new owner of the namespaces. * raptor_namespace.c (raptor_new_namespace_parts_from_string): Added, to decode things like "xmlns:foo='bar'" into prefix, uri strings. * raptor.h: Added prototype for raptor_new_namespace_parts_from_string. raptor_sequence_free_handler prototype changed to return void 2004-11-30 Dave Beckett * raptor_serialize.c (raptor_rdfxml_serialize_init): Add a sequence of user-declared namespaces. (raptor_rdfxml_serialize_terminate): Tidy sequence. (raptor_rdfxml_serialize_declare_namespace): Use sequence to store declared namespaces. (raptor_rdfxml_serialize_start): Declare used-defined namespaces and start them in the namespace stack. * raptor_namespace.c (raptor_new_namespace_from_uri): Added with raptor_new_namespace code. (raptor_new_namespace): Now a wrapper around raptor_new_namespace_from_uri. (raptor_namespace_copy): Use raptor_new_namespace_from_uri. * raptor_qname.c (raptor_iostream_write_qname): Added to write a qname to an iostream. * raptor.h: Add prototypes for raptor_iostream_write_qname, raptor_new_namespace_from_uri * raptor_rdfxml.c (raptor_xml_start_element_handler, raptor_xml_end_element_handler, raptor_xml_comment_handler, raptor_start_element_grammar, raptor_end_element_grammar, raptor_cdata_grammar): Update the use of xml_writer for building parseType="Literal" content to use an iostream. Use more sax2 methods rather than direct access to internals - still some left. (raptor_xml_parse_init, raptor_xml_parse_start, raptor_xml_parse_terminate, raptor_inscope_xml_language, raptor_inscope_base_uri): Move expat/libxml details to raptor_new_sax2, raptor_sax2_parse_start, raptor_free_sax2, raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri respectively. (raptor_xml_parse_chunk_): Deleted, moved to raptor_sax2_parse_chunk * raptor_xml_writer.c: Change to output to an iostream not build up a stringbuffer. (raptor_new_xml_writer): Add iostream arg, delete never-used canonicalize. (raptor_free_xml_writer): Remove stringbuffer. (raptor_xml_writer_start_element, raptor_xml_writer_end_element): Delete stringbuffer and use raptor_iostream_write_sax2_element. (raptor_xml_writer_cdata): Delete stringbuffer and use raptor_iostream_write_xml_escaped_string. (raptor_xml_writer_raw): Added to write just the bytes. (raptor_xml_writer_comment): Fixed to emit (raptor_xml_writer_as_string): Deleted. (main): Added with test case. * raptor_sax2.c (raptor_new_sax2, raptor_free_sax2, raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri, raptor_sax2_get_depth, raptor_sax2_inc_depth, raptor_sax2_dec_depth, raptor_sax2_parse_start, raptor_sax2_parse_chunk, raptor_sax2_element_get_element): Added. (raptor_iostream_write_sax2_element): Renamed from raptor_format_sax2_element and now writing to a raptor_iostream with no allocing/freeing buffers. * raptor_xml.c (raptor_iostream_write_xml_escaped_string): Added, to write an XML-escaped version of a string to an iostream 2004-11-29 Dave Beckett * raptor_namespace.c (raptor_iostream_write_namespace): Added to write a namespace to a raptor_iostream * raptor.h: Added raptor_iostream_write_namespace * Makefile.am: Added raptor_xml_writer_test * raptor_expat.c (raptor_expat_init): Take void* user data * raptor_internal.h: raptor_exp_init takes void* Add user_data to raptor_sax2 Added prototypes or raptor_new_sax2, raptor_free_sax2, raptor_sax2_parse_start, raptor_sax2_parse_chunk, raptor_sax2_parse_handle_errors, raptor_sax2_get_depth, raptor_sax2_inc_depth, raptor_sax2_dec_depth, raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri, raptor_sax2_element_get_element, raptor_iostream_write_sax2_element Deleted raptor_format_sax2_element, raptor_xml_writer_as_string and raptor_xml_writer_write_to_iostream Changed raptor_new_xml_writer to write to a raptor_iostream * raptor.h: Added raptor_iostream_write_xml_escaped_string and raptor_namespace_write 2004-11-26 Dave Beckett * raptor_internal.h: Added prototype for raptor_xml_writer_write_to_iostream * raptor_xml_writer.c (raptor_xml_writer_write_to_iostream): Added * raptor.h: Added prototype for raptor_iostream_write_stringbuffer * raptor_iostream.c: (raptor_iostream_write_stringbuffer) Added * configure.ac: --with-dmalloc default is now no 2004-11-25 Dave Beckett * configure.ac: If expat_source is empty, set it to auto so no path-to-source is added to libs, includes 2004-11-23 Dave Beckett * tests/ex-55.out, tests/ex-55.rdf: ex-55 * tests/Makefile.am: Added ex-55 2004-11-17 Dave Beckett * examples/grapper.c: Extensively updated to use GTK 2.4, 2.5 features when available. Triples/Errors windows have a scalable pane between them Triple columns can be sorted by clicking, width resized. All known parser features are available on the preferences menu. Added parser guessing button. Moved syntax menu to top of display. Updated about box fields to include more info when possible to display. 2004-11-12 Dave Beckett * rapper.1: Updated -f for serializer features 2004-11-10 Dave Beckett * raptor_sequence.c (raptor_sequence_join): Copy pointers correctly * raptor_sequence.c (raptor_sequence_join): Added, to move all items between two sequences leaving one empty. * raptor.h: Added raptor_sequence_join * raptor.h: Added raptor_serialize_set_namespace * raptor_serialize.c (raptor_serialize_set_namespace): Added, not implemented. * raptor_rss.c (raptor_rss_parse_recognise_syntax): Boost in recognising xml rss 2004-11-08 Dave Beckett * rdfdump.c: allow -f to set serializer features * raptor_feature.c (raptor_features_enumerate_common): return -1 2004-11-07 Dave Beckett * raptor_uri.c: C style, indenting. const unsigned char. (raptor_uri_path_make_relative_path): Remove a small memcpy. (raptor_uri_to_relative_counted_uri_string) Docs edit. Remove a large if {} block. Rename 'reference' var since libxml2 defines it (SEP). Use buildresult to make empty string result. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Use feature feature_relative_uris to decide when to emit an absolute or relative URI, the latter using raptor_uri_to_relative_uri_string. * raptor_uri.c: Added raptor relative URI generating code patch from Ren Puls (raptor_uri_path_common_base_length): Added. Helper to return the common base length of two paths (raptor_uri_path_make_relative_path): Added. Helper to build the result relative URI string from already analysed parts. (raptor_uri_to_relative_counted_uri_string): Added. Get the relative URI string between a base and reference URI. (raptor_uri_to_relative_uri_string): Added. Wrapper about the above. (assert_uri_to_relative): Added. Helper for tests for above. (main): Added relative URI string generation tests. * raptor.h: Added prototypes for raptor_uri_to_relative_counted_uri_string and raptor_uri_to_relative_uri_string * raptor_rss.c (raptor_rss_parser_processNode): Add cast for name when returned from xmlTextReaderConstLocalName. * raptor_rss.c (raptor_rss_parser_processNode): Always declare name as xmlChar* 2004-11-06 Dave Beckett * rdfdump.c: Tidy help messages about features, other words. * raptor_parse.c (raptor_feature_from_uri): Moved to raptor_feature.c * raptor.h: Moved raptor_feature_from_uri to separate section, not just parsers * raptor_internal.h: Deleted raptor_feature_from_uri_common * raptor_feature.c (raptor_feature_from_uri): Defined here, no need for raptor_feature_from_uri_common * rdfdump.c: In feature help code, list parser and serializer features separately, using new raptor_features_enumerate. * raptor_serialize.c (raptor_serializer_features_enumerate): Added, a wrapper around raptor_features_enumerate_common. (raptor_serializer_set_feature): Added. (raptor_serializer_get_feature): Added. * raptor_parse.c: Moved raptor_features_list to raptor_feature.c (raptor_features_enumerate): Changed to be a wrapper around raptor_features_enumerate_common now containing the body of the code. (raptor_feature_from_uri): Changed to be a wraper around raptor_feature_from_uri_common now containing the body of the code. * raptor_internal.h: Added feature_relative_uris for raptor_serializer. Added prototypes for raptor_features_enumerate_common and raptor_feature_from_uri_common * raptor.h: Added RAPTOR_FEATURE_RELATIVE_URIS for serializing. Added prototypes for raptor_serializer_features_enumerate, raptor_serializer_set_feature and raptor_serializer_get_feature * Makefile.am: Added raptor_feature.c * raptor_feature.c: Moved common raptor_feature code from raptor_parse.c * raptor_rss.c: Added entry to raptor_rss_fields_info so that when indexed with RAPTOR_RSS_FIELDS_NONE, does not access invalid data. Fixes for xmlReader API for older libxml2s: Added node type defines for <2.5.9 Use xmlTextReaderLocalName, xmlTextReaderNamespaceUri instead of the Const versions with additional corresponding xmlFree()s for <2.6.0 2004-11-01 Dave Beckett * Snapshotted raptor_1_4_2 for 1.4.2 release * win32_raptor_config.h, configure.ac: Bumped version to 1.4.2 * raptor_xml_writer.c (raptor_xml_writer_cdata): Return when raptor_xml_escape_string fails. * raptor_xml.c (raptor_xml_escape_string): Return -1 on UTF-8 encoding failure * raptor_xml.c: docs 2004-10-28 Dave Beckett * Snapshotted raptor_1_4_1 for 1.4.1 release * raptor_xml.c (raptor_xml_escape_string): Ensure an empty string is copied out; write a NUL. 2004-10-28 Dave Beckett * libraptor.3: 1.4.1 raptor_xml_escape_string return value now int, <0 on failure. * raptor_xml_writer.c (raptor_xml_writer_cdata): Use int for raptor_xml_escape_string return variables and use error return <0 * raptor_serialize.c: (raptor_rdfxml_serialize_write_xml_attribute, raptor_rdfxml_serialize_statement) Use int for raptor_xml_escape_string return variables. Handle empty string attribute when len=0. * raptor_sax2.c (raptor_format_sax2_element): Use int for raptor_xml_escape_string return. * raptor.h: raptor_xml_escape_string changed return value to int * raptor_xml.c (raptor_xml_escape_string): Return value now int, <0 on failure to allow escaping an empty string to return 0 bytes required. (main): Add empty string escaping test. Check for failure of first raptor_xml_escape_string call. * raptor_rss.c (raptor_rss_parser_processNode): Fix url attribute failing for non-enclosure. 2004-10-27 Dave Beckett * raptor_rfc2396.c (raptor_new_uri_detail): Do not add schema_len twice to dest pointer; stop buffer overrun 2004-10-26 Dave Beckett * raptor_locator.c (raptor_format_locator): Only print line if > 0 * raptor-config.1: Fix --libtool-libs desc 2004-10-24 Dave Beckett * win32_raptor_config.h, configure.ac, NEWS.html: Bumped version to 1.4.1 * Snapshotted raptor_1_4_0 for 1.4.0 release * raptor_rss.c: Added generation of triples for RSS enclosures based on a patch from Suzan Foster. Changes made include correcting the enclosures namespace, tidying some memory leaks and printing some debug information. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Make rdf:_ 'ordinal' properties serialize correctly. * raptor_www_test.c (main): Use raptor_www_fetch_to_string for testing. * raptor_iostream.c (raptor_string_iostream_finish): Code tidy. * libraptor.3, raptor.h: Added raptor_www_fetch_to_string * raptor_www.c (raptor_www_fetch_to_string_write_bytes): Added handler for the following function. (raptor_www_fetch_to_string): Added, to get content back as a string. 2004-10-23 Dave Beckett * libraptor.3: Updates for 1.4.0 * raptor.h, raptor_iostream.c: s/fh/handle/ for clarity. * raptor.rdf.in: Add Raptor to the desc * raptor.rdf.in, raptor.spec.in: Update descriptions to include serializers 2004-10-21 Dave Beckett * raptor_namespace.c: less namespace debugs * raptor_xml_writer.c: less cdata debugs * raptor_namespace.c: Make most namespace debug messages appear only if #ifdef RAPTOR_DEBUG_VERBOSE * raptor_rdfxml.c: Make most rdf/xml parsing debug messages appear only if #ifdef RAPTOR_DEBUG_VERBOSE * raptor_serialize.c: (raptor_serialize_start, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_serialize_statement, raptor_serialize_end): Fail if no iostream is made or available. * raptor_iostream.c (raptor_new_iostream_to_string): Docs, zap string and length before starting. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Print datatype URIs correctly. 2004-10-20 Dave Beckett * configure.ac, win32_raptor_config.h: 1.4.0 * raptor_internal.h: Added warning_user_data, warning_handler to serializer Added prototypes for raptor_serializer_warning and raptor_serializer_warning_varargs * raptor_serialize.c (raptor_serializer_warning, raptor_serializer_warning_varargs): Added (raptor_serializer_set_warning_handler): Added * raptor.h: Added raptor_serializer_set_warning_handler * configure.ac: autoconf mode * rdfdump.c: default serializer simple * raptor_serialize.c (raptor_rdfxml_serialize_statement): Handle URI subject, object right. * raptor_serialize.c (raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle): Don't enforce base URI is required. 2004-10-19 Dave Beckett * raptor.h: Updated raptor_new_iostream_to_string with malloc_handler argument * raptor_serialize.c (raptor_serialize_start_to_string): Update raptor_new_iostream_to_string for malloc_handler argument * raptor_iostream.c (raptor_string_iostream_finish): Use passed-in malloc_handler to make string, raptor_stringbuffer_copy_to_string to copy directly in. (raptor_new_iostream_to_string): Add optional malloc_handler argument so caller can control allocation. (main): Update tests for above. * raptor.h: Added raptor_stringbuffer_copy_to_string * raptor_stringbuffer.c (raptor_stringbuffer_copy_to_string): Added to allow exporting to externally alloced buffers - handy for cross-library/heap work. (main): Added test for above. * raptor_general.c (raptor_init): Don't register 'simple' type. * raptor_iostream.c, raptor_namespace.c, raptor_serialize.c, raptor_iostream.c: Casts for C++ * tests/Makefile.am, tests/turtle/Makefile.am: Replace direct dependency on $(top_builddir)/rapper with build-rapper so re-compile check is forced before testing. * raptor.h, raptor_namespace.c, raptor_serialize.c: Fix a bunch of constitency typos in namespace URIs * raptor_internal.h: Add locator, error_user_data and error_handler to raptor_serializer. Add raptor_init_serializer_rdfxml, raptor_serializer_error, raptor_serializer_simple_error and raptor_serializer_error_varargs. * raptor_namespace.c: Export raptor_xml_namespace_uri, raptor_rdf_namespace_ms_uri, raptor_rdf_namespace_schema_uri, raptor_xmlschema_datatypes_namespace_uri, raptor_owl_namespace_uri, raptor_rdf_namespace_ms_uri_len * raptor_general.c (raptor_init): Call raptor_init_serializer_rdfxml * raptor.h: Export raptor_xml_namespace_uri, raptor_rdf_namespace_ms_uri, raptor_rdf_namespace_schema_uri, raptor_xmlschema_datatypes_namespace_uri, raptor_owl_namespace_uri, raptor_rdf_namespace_ms_uri_len Add raptor_serializer_set_error_handler, raptor_serializer_get_locator * raptor_serialize.c: Added RDF/XML serializer. Added locator to serializer. (raptor_serializer_error, raptor_serializer_simple_error, raptor_serializer_error_varargs): Added internal support for errors. (raptor_serializer_set_error_handler, raptor_serializer_get_locator): Added public methods 2004-10-18 Dave Beckett * raptor_iostream.c: (main) casts for fprintf * rdfdump.c: Remove ad-hoc serializing code and use raptor_serializer. Update help and usage messages to use raptor_serializers_enumerate * raptor_internal.h: Added raptor_serializer_factory and declarations for factories raptor_init_serializer_ntriples, raptor_init_serializer_simple and raptor_delete_serializer_factories * raptor_general.c (raptor_init): Call raptor_init_serializer_ntriples and raptor_init_serializer_simple * raptor.h: Added raptor_serializer class and methods: raptor_serializers_enumerate, raptor_serializer_syntax_name_check, raptor_new_serializer, raptor_free_serializer, raptor_serialize_start, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_serialize_statement, raptor_serialize_end, raptor_serializer_get_iostream. Added new raptor_iostream class constructor raptor_new_iostream_to_sink and methods: raptor_iostream_write_end, raptor_iostream_write_string, raptor_iostream_write_counted_string, raptor_iostream_get_bytes_written_count, raptor_iostream_write_decimal, raptor_iostream_format_hexadecimal * Makefile.am: Added raptor_serialize.c Added $(LIBS) to rfc2396 tests for -ldmalloc when present * raptor_serialize.c: Serializers * raptor_iostream.c (raptor_iostream_write_counted_string): Added as a wrapper. * raptor_iostream.c (raptor_iostream_format_hexadecimal): Added for writing field-formatted hex. * raptor_iostream.c (raptor_iostream_get_bytes_written_count): Renamed from raptor_get_bytes_written_count (raptor_iostream_write_decimal): Added to print a decimal to the iostream. * raptor_iostream.c (raptor_new_iostream_to_file_handle): Do not fclose at end. (raptor_string_iostream_finish): Free malloced context. (raptor_iostream_write_string): Helper to write C string. * raptor_iostream.c: Added sink iostream (raptor_sink_iostream_write_byte, raptor_sink_iostream_write_bytes): Added. (raptor_new_iostream_to_sink): Added to create a throwaway data iostream. (raptor_free_iostream): Ensure write_end is always called once only. (main): Test sink. * raptor_iostream.c: Added ended flag, once write_end is done, all further calls fail. (raptor_filename_iostream_finish): Removed; write_end does this. (raptor_filename_iostream_write_end): Added to fclose() on end (raptor_string_iostream_finish): More checks when stringbuffer is empty. (raptor_new_iostream_to_string): Handle error tidy up better. (raptor_iostream_write_end): Added. (main): Code tidy. * raptor_iostream.c: casts for c++ * raptor.h: Added raptor_iostream class and methods. * Makefile.am: Added raptor_iostream.c and raptor_iostream_test * raptor_iostream.c: Raptor I/O stream class * turtle_parser.y, turtle_lexer.l, n3_parser.y, n3_lexer.l: Rename rather generic define ERROR to ERROR_TOKEN to help win32. 2004-10-16 Dave Beckett * rapper.1: die .UE 2004-10-15 Dave Beckett * raptor_xml.c (raptor_xml_escape_string): Call error_handler correctly. 2004-09-24 Dave Beckett * raptor-config.1: Restore deleted content 2004-09-20 Dave Beckett * win32_raptor_config.h, configure.ac, NEWS.html: Bumped version to 1.3.4 * Snapshotted raptor_1_3_3 for 1.3.3 release * Switched to LGPL / Apache 2.0 license in the sources CVS tags before: raptor_license_lgpl_mpl, and after: raptor_license_lgpl_apache2 2004-09-20 Dave Beckett * configure.ac: Check for libxml 2.5.10+ for RSS tag soup parser requirements, not features. 2004-09-10 Dave Beckett * raptor_namespace.c (raptor_new_namespace): Debug message only when level >1 2004-09-09 Dave Beckett * Makefile.am: Just link raptor_uri_test, raptor_uri_win32_test with raptor_rfc2396.lo * raptor_uri.c: (main) Don't use raptor_basename * raptor_uri.c: Revert wrapping so that -DWIN32 raptor_uri_win32_test can be compiled. OSX 'make check' will have to live with the moans. * raptor_uri.c: Wrap functions with #ifndef STANDALONE ... #endif to prevent multiple link warnings on OSX with tests. * raptor_uri.c (main): Use program and raptor_basename in messages * raptor_xml.c, raptor_stringbuffer.c, raptor_sequence.c, raptor_rfc2396.c, raptor_uri.c: Wrap functions with #ifndef STANDALONE ... #endif to prevent multiple link warnings on OSX with tests. * raptor.spec.in, Makefile.am, NOTICE: Added NOTICE for Apache License 2.0 * raptor.spec.in: Mention atom 0.3 * raptor.spec.in: Update for LGPL/Apache 2.0 * raptor_rfc2396.c: Header 2004-09-08 Dave Beckett * raptor_rfc2396.c (raptor_new_uri_detail): Handle NULL string - failure. Increase alloced size to compensate for possibly 5 extra \0s for each URI component. (main): Check "" URI parses and NULL doesn't crash it. * raptor_internal.h: Added raptor_uri_detail. Added internal raptor_basename. * raptor.h: docs * Makefile.am: Added raptor_rfc2396.c and raptor_rfc2396_test Link all tests with librdf.la $(LIBS) * raptor_rfc2396.c: RFC2396 URI detail * raptor_uri.c: Remove old URI resolving code. * raptor_xml.c, raptor_parse.c, raptor_sequence.c, raptor_set.c, raptor_stringbuffer.c, raptor_nfc_test.c: Use raptor_basename in test code main() * raptor_general.c (raptor_basename): Added * raptor_rdfxml.c: correct comment * Makefile.am: Run tests raptor_set_test and raptor_xml_test only if rdf/xml is enabled. * raptor_parse.c (raptor_stats_print): Print rdfxml stats only if rdf/xml is enabled. * Makefile.am: Change test to be raptor_parse_test Use raptor_rdfxml.c only if rdf/xml enabled. * raptor.h: Export raptor_xml_literal_datatype_uri_string_len * raptor_internal.h: Declare raptor_delete_parser_factories. * raptor_parse.c, raptor_general.c: Moved the following parser related functions and methods to raptor_parse.c: raptor_default_generate_id_handler, raptor_delete_parser_factories, raptor_feature_from_uri, raptor_features_enumerate, raptor_free_parser, raptor_generate_id, raptor_get_feature, raptor_get_label, raptor_get_locator, raptor_get_mime_type, raptor_get_name, raptor_get_parser_factory , raptor_guess_parser_name, raptor_new_parser, raptor_new_parser_for_content, raptor_parse_abort, raptor_parse_chunk, raptor_parse_file, raptor_parse_file_stream, raptor_parse_uri, raptor_parse_uri_with_connection, raptor_parse_uri_write_bytes, raptor_parser_error, raptor_parser_error_varargs, raptor_parser_fatal_error, raptor_parser_fatal_error_varargs, raptor_parser_register_factory, raptor_parser_simple_error, raptor_parser_warning, raptor_parser_warning_varargs, raptor_parsers_enumerate, raptor_set_default_generate_id_parameters, raptor_set_error_handler, raptor_set_fatal_error_handler, raptor_set_feature, raptor_set_generate_id_handler, raptor_set_parser_strict, raptor_set_statement_handler, raptor_set_warning_handler, raptor_start_parse, raptor_stats_print, raptor_syntax_name_check, raptor_syntaxes_enumerate * raptor_rdfxml.c: Added as copy of raptor_parse.c * Makefile.am: -MPL.html (MPL 1.1), +LICENSE-2.0.txt (Apache 2.0) * README.html, LICENSE.html: -MPL1.1, +Apache2.0 * LICENSE-2.0.txt: Added. * MPL.html: Deleted. 2004-09-07 Dave Beckett * tests/turtle/test-16.ttl, tests/turtle/test-16.out: 10000 triples exactly now * raptor_sequence.c: docs * turtle_parser.y (blank): Revert mis-edited triple sequence change. * turtle_parser.y (propertyList): Switch to left-recursion to prevent stack problems with bison. (raptor_turtle_parse_terminate): Call turtle_lexer_lex_destroy properly. * tests/turtle/test-14.ttl, tests/turtle/test-14.out: Use exactly 10000 all different triples. * tests/turtle/test-15.ttl, tests/turtle/test-15.out: Use different objects and no collections so there are exactly 10000 triples, all different. * tests/turtle/test-16.ttl, tests/turtle/test-16.out: Use different objects so all 10000 triples are different * turtle_lexer.l (turtle_token_print): Add INTEGER_LITERAL for debugging. * Makefile.am: Make turtle_parser.c appear as C source name * turtle_parser.y (statementList, objectList): Switch to using left recursion to prevent stack overflow in bison with 10000 statements (possible) or objects (rarer). * tests/turtle/Makefile.am, tests/turtle/test-16.ttl, tests/turtle/test-15.out, tests/turtle/test-15.ttl, tests/turtle/test-16.out, tests/turtle/test-14.out, tests/turtle/test-14.ttl: Added large turtle tests test-14,15,16 * turtle_parser.y (raptor_turtle_parse_chunk): Use RAPTOR_REALLOC for massive speed improvements on some systems. * raptor_internal.h: Added RAPTOR_REALLOC 2004-09-06 Dave Beckett * raptor_set.c (raptor_free_id_set): Free the set after freeing the list. 2004-09-02 Dave Beckett * tests/turtle/test-13.out, tests/turtle/test-13.ttl: Make serializable as rdf/xml 2004-09-01 Dave Beckett * tests/turtle/Makefile.am, tests/turtle/README.txt: Turtle tests readme 2004-08-27 Dave Beckett * raptor_rss.c: compare namespace URIs the cheaper way * raptor_rss.c: Added atom:copyright Rewrite atom fields earlier. Compare namespaces too, if they have them. * raptor_rss.c: Handle atom 0.3 somewhat. - Add atom author type. - Add atom 0.3 NS and atom 0.3 properties - Add DC Ns and all DC element properties. - Always rewrites atom:content into rss:description which is not correct for all situations. - Cannot handle multiple with different attributes; just uses rel=alternate ones. General changes: Use XML_READER type enums. Fix copying properties to use RAPTOR_RSS_FIELDS_SIZE. Allow item field x to have a URI value in item->uri_fields[x] as well as literal in item->fields[x]. 2004-08-27 Dave Beckett * raptor_rss.c: compare namespace URIs the cheaper way * raptor_rss.c: Added atom:copyright Rewrite atom fields earlier. Compare namespaces too, if they have them. * raptor_rss.c: Handle atom 0.3 somewhat. - Add atom author type. - Add atom 0.3 NS and atom 0.3 properties - Add DC Ns and all DC element properties. - Always rewrites atom:content into rss:description which is not correct for all situations. - Cannot handle multiple with different attributes; just uses rel=alternate ones. General changes: Use XML_READER type enums. Fix copying properties to use RAPTOR_RSS_FIELDS_SIZE. Allow item field x to have a URI value in item->uri_fields[x] as well as literal in item->fields[x]. 2004-08-23 Dave Beckett * turtle_parser.y (blank rule): Do not free a generated id here 2004-08-22 Dave Beckett * configure.ac: Remove old reference to g_utf8_normalize 2004-08-19 Dave Beckett * Makefile.am: Add libraptor_la_SOURCES += for NFC. 2004-08-18 Dave Beckett * raptor_set.c: Wrap main code with #ifndef STANDALONE * raptor_general.c (raptor_init, raptor_finish): Use new static raptor_initialised to protect these from being run twice. 2004-08-17 Dave Beckett * configure.ac: nfc_needed default * configure.ac, Makefile.am: Added conditional makefile support for XML parsers (expat, libxml), selecting RDF parsers (RDF/XML, Turtle, N-Triples, RSS tag soup), NFC checking. Added new configure argument --enable-parsers to control this. * raptor_utf8.c (raptor_utf8_is_nfc): Protect NFC check with define RAPTOR_NFC_CHECK * raptor_locator.c (raptor_update_document_locator): Protect RDF/XML bits with define RAPTOR_PARSER_RDFXML * raptor_general.c (raptor_stats_print): Protect RDF/XML bits with define RAPTOR_PARSER_RDFXML * raptor.h: Added prototype for raptor_calloc_memory * raptor_set.c, raptor_nfc.c: Casts for C++ * LICENSE.html: More LGPL v2.1 fixes * win32_raptor_config.h: 1.3.3 2004-08-13 Dave Beckett * turtle_lexer.l, n3_lexer.l: grammar * turtle_lexer.l, n3_lexer.l, fix-flex: fix-flex now inserts the raptor and win32 config includes block at the top of the lexer C. * n3_parser.y, n3_lexer.l: win32 * Several fixes for building on win32 from Chris Pointon * win32/raptor.dsw, win32/raptor.dsp: win32 updates from Chris Pointon * win32_raptor_config.h: No need for #define YY_NO_UNISTD_H here, it's done in the turtle lexer and parser C source. * turtle_parser.y, turtle_lexer.l: Use turtle_parser.h * raptor_xml_writer.c, raptor_sax2.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_libxml.c: calloc() fixes. * Makefile.am: Do not generate *.tab.[ch] for turtle parser but process and rename to make .c, .h. Apply fix-flex to the generated flex header file, to catch another unprotected include of unistd.h. * libraptor.3: Document raptor_calloc_memory. * raptor_general.c: Added raptor_calloc_memory * raptor_www_libwww.c: Add #ifdef RAPTOR_WWW_LIBWWW ... #endif block around content * raptor_www_libfetch.c: Add #ifdef RAPTOR_WWW_LIBFETCH ... #endif block around content Use #ifdef HAVE_SYS_PARAM_H for sys/param.h * raptor_www_curl.c: Add #ifdef RAPTOR_WWW_LIBCURL ... #endif block around content * win32_raptor_config.h: win32 updates from Chris Pointon * raptor_www.c: Calloc fix. (raptor_www_get_connection): Return NULL if no WWW library available. * raptor_internal.h: Correct RAPTOR_CALLOC macro param names. * raptor.h: Export raptor_xml_literal_datatype_uri_string * win32/Makefile.am, win32/README.txt, win32/README: README renamed to README.txt 2004-08-12 Dave Beckett * raptor_nfc.c: Tidy debug messages. Reset prev_class explicitly. 2004-08-11 Dave Beckett * raptor_parse.c (raptor_record_ID): c99 * raptor_nfc.c: Return 0 from raptor_nfc_check on failure * raptor_nfc_test.c: Raptor NFC test * Makefile.am: Added raptor_nfc_test.c, raptor_nfc_data.c, raptor_nfc.c and raptor_nfc.h Added raptor_nfc_test * raptor_utf8.c (raptor_utf8_is_nfc): Use raptor_nfc_check. * raptor_nfc.c, raptor_nfc.h: Unicode NFC * raptor_internal.h: Added prototype for raptor_nfc_check * configure.ac: Check for lengths of u8, u16, u32, char, short, int, long * raptor_nfc_data.c: Unicode NFC data tables * raptor_parse.c: Updated for raptor_set to raptor_id_set renaming. (raptor_record_ID): Pass in the base_uri to the raptor_id_set_add, do not malloc / free a larger string. * raptor_internal.h: Rename the raptor_set* typedef and functions to be raptor_id_set * raptor_set.c: Change the implementation to a list of (set of IDs)-per base URI. Each time a base URI is checked it is swapped with the first in the list. The set of IDs (raptor_base_id_set) takes a lot less memory since it isn't storing the string concat(base URI,ID) but just ID. The capacity and size parts are part of the raptor_base_id_set. Rename the structures and functions to be raptor_id_set not raptor_set. * raptor_parse.c (raptor_end_element_grammar): Add check for a non-empty property element with both a node element child and property attributes. For bad test bad-23.rdf * tests/bad-23.rdf: bad-23.rdf - property attributes and node element content check * tests/Makefile.am: Added bad-23.rdf 2004-08-10 Dave Beckett * libraptor.3: Document check_rdf_id feature 2004-08-02 Dave Beckett * raptor_general.c (raptor_set_parser_strict): Set feature_check_rdf_id default true. * raptor_parse.c (raptor_record_ID): Use feature_check_rdf_id to always return no rdf:ID check failure when feature is disabled. * raptor_general.c (raptor_set_feature, raptor_get_feature): Added RAPTOR_FEATURE_CHECK_RDF_ID (raptor_set_parser_strict): Set feature_check_rdf_id default true. * raptor.h: Added RAPTOR_FEATURE_CHECK_RDF_ID * raptor_internal.h: Added feature_check_rdf_id * ntriples_parse.c (raptor_ntriples_parse_chunk): Move "junk at end of input" test to the end of the function, giving the error only if the current offset isn't at the end of the current line. 2004-07-30 Dave Beckett * raptor_internal.h: Switch to WWW read buffer size of 4096 (from 256 bytes!) * raptor_general.c: Switch to read buffer size of 4096 2004-07-28 Dave Beckett * autogen.sh: move 'rm's inside configure.ac loop * autogen.sh: Ensure subdirs get config.guess, config.sub * win32/raptortest.cpp: Added raptor_init, raptor_finish (untested). 2004-07-27 Dave Beckett * raptor_locator.c: cast for c++ 2004-07-26 Dave Beckett * raptor_general.c: Add #ifndef STANDALONE ... #endif around body. 2004-07-21 Dave Beckett * configure.ac: Bumped version to 1.3.3 * Snapshotted raptor_1_3_2 for 1.3.2 release * configure.ac: Removed configuration for gnome glib, pkgconfig and glib-config to get g_utf8_normalize for Unicode NFC checking. * raptor_utf8.c (raptor_utf8_is_nfc): Removed use of g_utf8_normalize for Unicode NFC checking, it seems to give false negatives, is also rather slow since it does normalization rather than just checking for NFC. * libraptor.3: Updates for 1.3.2 2004-07-16 Dave Beckett * tests/Makefile.am, tests/ex-54.out, tests/ex-54.rdf, tests/warn-03.out, tests/warn-03.rdf: Renamed warn-03 to ex-54 - it is not an error or a warning, the data is good 2004-07-14 Dave Beckett * tests/Makefile.am, tests/bad-22.rdf: bad-22.rdf testing rdf:li forbidden as a property attribute (Graham Klyne) 2004-07-09 Edd Dumbill * raptor_locator.c: add accessors for parts of the raptor_locator struct. * raptor.h: add prototypes for the accessors 2004-07-09 Dave Beckett * ChangeLog: ChangeLog in CVS now 2004-07-08 Dave Beckett * raptor_general.c (raptor_parse_uri_with_connection): Pass up WWW errors to the parser error handler. 2004-06-30 Dave Beckett * configure.ac: Added RAPTOR_PARSER_TURTLE, RAPTOR_PARSER_NTRIPLES and RAPTOR_PARSER_RDFXML all set to 1 * raptor_general.c (raptor_init): Added RAPTOR_PARSER_TURTLE, RAPTOR_PARSER_NTRIPLES and RAPTOR_PARSER_RDFXML * win32_raptor_config.h: 1.3.2 * turtle_parser.y, turtle_lexer.l, strcasecmp.c, rdfdump.c, raptor_xml_writer.c, raptor_xml.c, raptor_www_test.c, raptor_www_libxml.c, raptor_www_libwww.c, raptor_www_libfetch.c, raptor_www_curl.c, raptor_www.c, raptor_win32.c, raptor_utf8.c, raptor_uri.c, raptor_stringbuffer.c, raptor_set.c, raptor_sequence.c, raptor_sax2.c, raptor_rss.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_locator.c, raptor_libxml.c, raptor_identifier.c, raptor_general.c, raptor_expat.c, ntriples_parse.c, Makefile.am, win32_raptor_config.h, win32_config.h: Renamed win32_config.h to win32_raptor_config.h 2004-06-25 Dave Beckett * ntriples_parse.c (raptor_ntriples_parse_line): Make language on a datatyped literal a warning. 2004-06-24 Dave Beckett * libraptor.3: Added raptor_alloc_memory. Note where and why it and raptor_free_memory may need to be used in the descriptiona and next to the methods that it applies to. * raptor_general.c, raptor.h: Added raptor_alloc_memory. Docs. 2004-06-22 Dave Beckett * configure.ac: Added --with-expat-source option to build against an external expat source. Handle old and new style expat source areas. Report expat source dir in summary. Tidy up default messages. Only use expat subdir if it exists. * tests/Makefile.am: AM_LDFLAGS does not need LIBS, libraptor.la includes it all. 2004-06-17 Dave Beckett * Makefile.am: Zap extra $@ on rule line 2004-06-13 Dave Beckett * configure.ac: pkg-config is too noisy on errors * configure.ac: Only muck about with removing -O2 from flags in maintainer mode. 2004-06-12 Dave Beckett * Makefile.am: Added local distclean-compile rule to override the insane one automake uses by default: rm -f *.tab.c * configure.ac: Bumped version to 1.3.2 * Snapshotted raptor_1_3_1 for 1.3.1 release * tests/Makefile.am: add CLEANFILES * tests/Makefile.am: Added TESTS with raptor_empty_test the only one right now. Added C include, linking lines * tests/empty.c: Test of empty C file, just using raptor.h work * raptor_uri.c (raptor_uri_filename_to_uri_string, raptor_uri_uri_string_to_filename_fragment): Casts and char/unsigned char fixes for C++ 2004-06-08 Dave Beckett * raptor_uri.c (raptor_default_new_uri): Avoid free(NULL) for filename. * raptor_general.c (raptor_parse_file): Check before fopen that it is not a directory attempting to be fopen()ed - unix only, with lstat. * raptor_www.c (raptor_www_file_fetch): Check before fopen that it is not a directory attempting to be fopen()ed - unix only, with lstat. * rdfdump.c: Add error for failure of raptor_uri_filename_to_uri_string * raptor_uri.c (raptor_uri_filename_to_uri_string): Unix malloc too large by 2. * raptor_uri.c (raptor_default_new_uri): Zero fragment pointer. * raptor_uri.c (raptor_default_new_uri): Do not use a NULL filename. * raptor_uri.c (raptor_uri_uri_string_to_filename_fragment): Fail if the URI has no path or was going to return an empty string. (assert_filename_to_uri): Test code allow checks for NULL. (main): Test code for silly URIs that should work or fail. 2004-06-06 Dave Beckett * raptor_internal.h: Added RAPTOR_FATAL3 * raptor_uri.c: Fix win32 file/URI encoding to use file:///name and escape things better. (raptor_uri_filename_to_uri_string): Calculate new length correctly, with %-escaping. (raptor_uri_uri_string_to_filename_fragment): Calculate new format. Also do less strlen, strcpy. (main): Change tests to match new win32 file URI, test %-escaping and %-unescaping correctly. 2004-06-04 Dave Beckett * raptor_uri.c: NOTE: Not all below is fully working - 3 tests fail at this point. (raptor_uri_filename_to_uri_string): %-escape ' ' and '%' at least as a minimum. Document this. On Windows, generate file:///c:/ ... not c| (raptor_uri_uri_string_to_filename_fragment): Add %-unescaping. (main): Added test cases for %-escaping, %-expanding * Makefile.am: Added raptor_uri_win32_test 2004-06-03 Dave Beckett * tests/turtle/rdfq-results.ttl: Updated to http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html CVS $Id: recording-query-results.html,v 1.9 2004/06/03 12:41:37 aseaborne Exp $ 2004-05-31 Dave Beckett * raptor_general.c (raptor_parser_error_varargs, raptor_parser_warning_varargs): Chop off trailing \n from messages. * raptor_libxml.c (raptor_libxml_error): Chop off trailing \n correctly. 2004-05-30 Dave Beckett * turtle_lexer.l: Set the uri union field for ':' qname. * turtle_parser.y (raptor_turtle_parse_start): Delete any existing buffer content before starting. * raptor_general.c: Added feature warn_other_parseTypes, default true in lax mode. * raptor_parse.c: Added feature warn_other_parseTypes and used to warn when a parseType Literal is assumed. * raptor_internal.h: Added feature warn_other_parsetypes * raptor.h: Aded feature warn_other_parsetypes * tests/warn-07.out, tests/warn-07.rdf: Replaced by warn-07 * tests/Makefile.am: Remove ex-50, warn-07 covers it * tests/ex-50.out, tests/ex-50.rdf: Replaced by warn-07 * tests/Makefile.am: Add warn-07 Check for right values for warning tests, not just presence of a warning. 2004-05-29 Dave Beckett * autogen.sh: Add --enable-maintainer-mode * configure.ac: Add check for glib-2.0 presence rather than an error barf. 2004-05-28 Dave Beckett * tests/Makefile.am: Add set +e, set -e around multiple tests so they only fail at the end. * configure.ac: Only check flex version in maintainer mode * Makefile.am: Re-order directives and tidy up. Make lex and yacc rules be maintainer only. * Makefile.am: Use automakefile conditionals STRCASECMP and GETOPT for conditional sources. * configure.ac: Use automakefile conditionals STRCASECMP and GETOPT 2004-05-27 Dave Beckett * configure.ac: check for perl * Makefile.am: Add fix-flex and use it * fix-flex: Fix flex output * raptor_internal.h: Added raptor_libxml_free * raptor_parse.c (raptor_xml_parse_start, raptor_xml_parse_terminate): Use raptor_libxml_free to tidy up. * raptor_libxml.c (raptor_libxml_free): Added to tidy up after a parsing. * raptor_parse.c (raptor_xml_parse_terminate): Clean up sax2_element stack after errors. 2004-05-26 Dave Beckett * turtle_lexer.l: Allow _ after : in qnames. Make bare ':' work. * tests/turtle/rdf-schema.out, tests/turtle/rdf-schema.ttl: RDF namespace document * tests/turtle/rdfs-namespace.out, tests/turtle/rdfs-namespace.ttl: RDFS namespace * tests/turtle/Makefile.am: Added test-13, rdf-schema, rdfs-namespace * tests/turtle/test-13.out, tests/turtle/test-13.ttl: test bare : * turtle_parser.y: Fix RAPTOR_DEBUG args in old format. * tests/turtle/Makefile.am: Added test-12 * tests/turtle/test-12.out, tests/turtle/test-12.ttl: test for _ after : in qnames * libraptor.3: Describe use of UTF-8 for literals and strings * libraptor.3: 1.3.1 changes 2004-05-25 Dave Beckett * raptor.h: Added RAPTOR_STATIC for WIN32 when statically linking Fix raptor_print_statement arg s/const// 2004-05-24 Dave Beckett * raptor_general.c (raptor_free_memory, raptor_system_free): Do not return, no return value. 2004-05-21 Dave Beckett * tests/turtle/rdfq-results.ttl, tests/turtle/rdfq-results.out: Replace XML Schema namespace with 2001 versi 2004-05-19 Dave Beckett * rdfdump.c: Includes re-order, doc * rdfdump.c: don't do stdarg.h here - it should be in raptor.h * raptor.h: Add include for stdarg.h to get va_list for raptor_vsnprintf * raptor_xml.c (raptor_xml_escape_string): q should be an unsigned char* * raptor_utf8.c (raptor_unicode_char_to_utf8): Cast for unsigned long to unsigned char * raptor_parse.c (raptor_xml_start_element_handler): Cast for memcpy. * win32_config.h: patch from Jose for VC6 2004-05-18 Dave Beckett * ntriples_parse.c (raptor_ntriples_generate_statement): Remove use of ntriples_parser, not used. 2004-05-15 Dave Beckett * raptor.spec.in: SNAP 2004-05-12 Dave Beckett * turtle_parser.y, turtle_common.h, ntriples_parse.c: Do not allow any language with datatype literals. * tests/turtle/Makefile.am: add zip, tests.zip targets 2004-05-11 Dave Beckett * configure.ac: Bumped version to 1.3.1 * Snapshotted raptor_1_3_0 for 1.3.0 release * turtle_lexer.l: Allow - in qnames, prefix qnames. * tests/turtle/Makefile.am: Added test-11 * tests/turtle/test-11.out, tests/turtle/test-11.ttl: - and _ in qnames, prefixes 2004-05-07 Dave Beckett * raptor_sequence.c, raptor_internal.h: Add assert macros 2004-05-04 Dave Beckett * raptor_general.c, raptor.h: Export raptor_xml_literal_datatype_uri_string * raptor_internal.h: raptor_xml_literal_datatype_uri_string now exported. * libraptor.3: Added 1.3.0 items * raptor_general.c (raptor_parse_uri_with_connection): Document the Accept: header malarky. Only send it if connection is NULL. Use Accept: MIME-TYPE,*/*;q=0.1 * raptor_www_curl.c (raptor_www_curl_fetch): append to slist right * raptor_general.c (raptor_parse_uri_with_connection): Send "Accept: MIME-TYPE ;*/*" to prefer the specified one rather than accept only that. * raptor.h: Added raptor_get_mime_type * raptor_general.c (raptor_parse_uri_with_connection): Set Accept header with mime type of this syntax if there is one * raptor_www.c (raptor_www_set_http_accept): Make accept value overwrite \0 from Accept: * configure.ac: make raptor.rdf * turtle_parser.y, raptor_www_libxml.c, raptor_parse.c, ntriples_parse.c: Fixes for c++ * Makefile.am: added raptor.rdf.in * raptor.rdf.in: DOAP 2004-05-02 Dave Beckett * turtle_parser.y: Add xml_literal_datatype_uri to parser context. (raptor_turtle_parse_init,raptor_turtle_parse_terminate): use above (raptor_turtle_generate_statement): Use above to remove language from all literals except xml literals. * turtle_common.h: Add xml_literal_datatype_uri to parser context. * ntriples_parse.c: Add xml_literal_datatype_uri to parser context. (raptor_ntriples_parse_init,raptor_ntriples_parse_terminate): use above (raptor_ntriples_generate_statement): Use above to remove language from all literals except xml literals. * raptor_identifier.c (raptor_identifier_print): Use raptor_xml_literal_datatype_uri_string and save a string. 2004-04-29 Dave Beckett * rdfdump.c (main): Use raptor_free_memory to free memory allocated in libraptor. * raptor_www_libxml.c (raptor_www_libxml_fetch): Free content type using libxml's xmlFree since it was allocated there. * raptor_www_libxml.c, raptor_www_curl.c (raptor_www_libxml_fetch): Make headers for User-Agent: and/or Accept: if they were set in the raptor_www. * raptor_www.c (raptor_www_set_http_accept): Added. * raptor_internal.h: Added http_accept to raptor_www * raptor.h: Added raptor_www_set_http_accept 2004-04-15 Dave Beckett * raptor_general.c (raptor_guess_parser_name): use strrchr to find *last* . 2004-04-14 Dave Beckett * raptor_sequence.c (raptor_new_sequence): Zap sequence field. * raptor_xml_writer.c (raptor_xml_writer_cdata): Do not copy more bytes than allowed. * Makefile.am: Added raptor_expat.c * raptor_parse.c: Export some expat-only handlers: raptor_xml_unparsed_entity_decl_handler, raptor_xml_external_entity_ref_handler. (raptor_xml_parse_init): Do not call expat init code here. (raptor_xml_parse_start): Call new raptor_expat_init to initialise parser state. * raptor_internal.h: Added RAPTOR_XML_EXPAT only exports including raptor_expat_init prototype. * raptor_expat.c: raptor expat parser 2004-04-13 Dave Beckett * raptor.h: Added xsd and owl namespace URIs * raptor_namespace.c (raptor_namespaces_init): Define xsd, owl when defaults is 2+ 2004-04-11 Dave Beckett * raptor_parse.c: (raptor_xml_parse_start) Free expat/libxml contexts from an earlier parsing to ensure resetting of state * raptor_stringbuffer.c (raptor_stringbuffer_prepend_string_common): Added (raptor_stringbuffer_prepend_counted_string, raptor_stringbuffer_prepend_string): Added, implemented by above internal function. (main): Added tests for prepending. * raptor.h: Add RAPTOR_API for newly exported functions. Add raptor_stringbuffer_prepend_counted_string, raptor_stringbuffer_prepend_string * raptor_stringbuffer.c: (main) printf arg * raptor_internal.h, raptor.h: Moved raptor_stringbuffer to public API * raptor_stringbuffer.c (raptor_stringbuffer_append_stringbuffer): Added. (main): Updated test code for raptor_stringbuffer_append_stringbuffer 2004-04-10 Dave Beckett * raptor_general.c, raptor.h (raptor_guess_parser_name): Added new public class method. (raptor_new_parser_for_content): Now uses above. * raptor_internal.h, raptor.h: Move raptor_unicode_char_to_utf8, raptor_utf8_to_unicode_char to public API. * INSTALL.html: consistency with librdf instructions. update libxml versions. update automake, autoconf minimums. * tests/Makefile.am: fix result codes for split off NFC warnings * tests/Makefile.am: Split off NFC warnings so they can fail noisily when glib isn't present to do the check. * rapper.1: Document -g/--guess flag to guess the parser to use from the identifier (URI or file name). * rdfdump.c: Added -g/--guess flag to use raptor_new_parser_for_content guessing the parser to use from the identifier (URI or file name). * turtle_parser.y, raptor_rss.c, raptor_parse.c, ntriples_parse.c: Added scoring factory method recognise_syntax for rdfxml, ntriples, rss, turtle parsers. * raptor_internal.h: Added parser scoring factory method recognise_syntax. * raptor_general.c (raptor_new_parser_for_content): Added, guessing which parser to instance using scoring factory method recognise_syntax. * raptor.h: Added raptor_new_parser_for_content 2004-04-10 Dave Beckett * raptor_sequence.c: cast for c++ 2004-04-09 Dave Beckett * raptor_parse.c: Removed use of raptor_print_statement_detailed * raptor_internal.h: Removed raptor_print_statement_part_as_ntriples, made static * raptor.h: Deprecate raptor_print_statement_detailed * raptor_general.c (raptor_print_statement_detailed): Restored, was in raptor.h but useless. * raptor_general.c: dates, docucomments (raptor_print_statement_detailed): Deleted - never publically documented or used. 2004-04-08 Dave Beckett * Makefile.am: raptor_sequence_test needs to link with libraptor.la * turtle_parser.y: rename raptor_free_handler,raptor_print_handler -> as raptor_sequence... * raptor.h, raptor_internal.h: Move sequence class to public api. * raptor_sequence.c: rename raptor_free_handler,raptor_print_handler -> as raptor_sequence... (raptor_sequence_print_uri): Added. (raptor_sequence_set_print_handler): Added. * raptor_internal.h, raptor.h: Export raptor_vsnprintf public. 2004-04-06 Dave Beckett * turtle_parser.y (turtle_parse): Remove un-necessary cast. * turtle_parser.y (turtle_parse): Free lexer 2004-04-05 Dave Beckett * rdfdump.c: Added HELP_PAD to format long help description over multiple lines. 2004-03-30 Dave Beckett * tests/turtle/test-00.out: Updated base uri * tests/turtle/Makefile.am: Added rdfq-results * tests/turtle/rdfq-results.out, tests/turtle/rdfq-results.ttl: RDF Query result set example from http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html 2004-03-27 Dave Beckett * raptor_general.c, turtle_parser.y, rdfdump.c: casts for C++ * NEWS.html: skeleton 1.3.0 news * configure.ac, autogen.sh: Use some AM_INIT_AUTOMAKE options. Require automake1.7, which requires autoconf 2.54 * examples/Makefile.am: Drop $(shell .. ) which is not portable between makes * raptor-src-config.in, raptor-config.in: emit --help usage to stdout, Support --help and exit 0. 2004-03-26 Dave Beckett * libraptor.3: words * rapper.1: Document -f * TODO.html: bug was libxml2 not me * tests/Makefile.am: Add bad-21 * tests/bad-21.rdf: Check non-namespaced attributes on a property are reported * raptor_parse.c (raptor_xml_start_element_handler): Check element, attributes for non-namespaces once we know we are in rdf processing. Check all named attributes for lack of namespace, error and zap if found. (raptor_process_property_attributes): Skip any deleted attributes. 2004-03-25 Dave Beckett * tests/Makefile.am: Added warn-05, warn-06 * tests/warn-05.out, tests/warn-06.out, tests/warn-05.rdf, tests/warn-06.rdf: Check for warning for unknown rdf namespaced property element, attributes * raptor_parse.c (raptor_process_property_attributes): Generate an error for forbidden rdf names, warning for unknown rdf names. * raptor_parse.c: Merged rdf_attr_info into rdf_syntax_terms_info. Now we can check for unknown rdf: names (raptor_forbidden_nodeElement_name, raptor_forbidden_propertyElement_name, raptor_forbidden_propertyAttribute_name): Return -1 on unknown name. (raptor_start_element_grammar): Generate an error for forbidden rdf names, warning for unknown rdf names. * tests/Makefile.am: Added warn-04 * tests/warn-04.out, tests/warn-04.rdf: Check for warning for unknown rdf namespaced node element * tests/turtle/Makefile.am, tests/Makefile.am: fix grep for Warning output * raptor_general.c, raptor.h: Added raptor_free_memory to dealloc memory returned by raptor functions - some systems need this due to having multiple heaps. * raptor_general.c (raptor_default_generate_id_handler): doh * raptor_general.c (raptor_default_generate_id_handler): Rework not to use tmpid before initialising it. * raptor_general.c (main): Free returned uri * raptor.h: Added raptor_feature_from_uri * Makefile.am: Added raptor_general_test * raptor_general.c (raptor_feature_from_uri): Turn a feature URI into a feature number. (main): Added, testing feature enumerations. * rdfdump.c: note feature values in -f help * rdfdump.c: More help message tidying. * rdfdump.c: Alter HELP_TEXT macro so short arg isn't auto-quoted. Use this to add short option options arg to help. 2004-03-24 Dave Beckett * raptor_general.c (raptor_default_generate_id_handler): Don't bump default genid counter when a user_bnodeid is present. * rdfdump.c: Allow setting feature optional values -f NAME=VALUE (integer). * raptor_general.c, raptor.h: Use raptor_feature type for enumeration calls. * raptor_general.c: Tidy feature labels * rdfdump.c: Tidy -f help message. * rdfdump.c: Re-ordered long_options to be alphabetical by option char. Added -f/--feature FEATURE to set a parser feature. With the value 'help', lists them all using raptor_features_enumerate. * raptor.h: Added raptor_get_feature, raptor_features_enumerate. raptor_set_feature gets a return value. * raptor_general.c (raptor_set_feature): Delete docs, now has an API. Return a failure value. raptor_features_list - static added. (raptor_features_enumerate): Added, to allow returning of parser feature name, URI and/or label. (raptor_get_feature): Added. 2004-03-23 Dave Beckett * TODO.html: Add turtle use of raptor_generate_id * turtle_parser.y (blank): Use raptor_generate_id when a blank identifier name is given, to allow application to change it. 2004-03-21 Dave Beckett * tests/turtle/test-10.out, tests/turtle/test-09.out, turtle_parser.y: Make Turtle integers emit xsd:integer 2004-03-19 Dave Beckett * raptor_parse.c: Twice. * raptor_parse.c: Remove FIXME for other rdf:parseType values - just fall through to Literal * raptor_parse.c: FIXME not relevant. * ntriples_parse.c (raptor_ntriples_generate_statement): Kill a FIXME, fail with an error on bad rdf:_n property. * tests/Makefile.am: Added bad-06.nt * tests/bad-06.nt: bad rdf:_n in ntriples 2004-03-18 Dave Beckett * turtle_parser.y: Added INTEGER_LITERAL. Turn it into a xsd:nonNegativeInteger * turtle_lexer.l: Added INTEGER_LITERAL. * tests/turtle/Makefile.am: Added test-09 test-10 * tests/turtle/test-09.out, tests/turtle/test-09.ttl, tests/turtle/test-10.out, tests/turtle/test-10.ttl: Integer literal tests * tests/Makefile.am, Makefile.am: Ensure rapper is up-to-date and built before tests are run. 2004-03-15 Dave Beckett * tests/warn-03.out, tests/warn-03.rdf: Added warn-03 warning not dieing on NFC in XML literals * tests/Makefile.am: Added warn-03 * raptor_parse.c (raptor_end_element_grammar): For NFC problems in an XML literal, take notice of feature_non_nfc_fatal which defaults to warning, rather than given an error. 2004-02-26 Dave Beckett * tests/turtle/Makefile.am: Added bad-04.ttl * tests/turtle/bad-04.ttl: Check , in collection items fails * tests/turtle/test-07.ttl: Remove , between items - forbidden. * turtle_parser.y (objectList): Remove optional commas for triple objects. (itemList): Added with no commas. (collection): Use itemList not objectList. * tests/turtle/Makefile.am: remove test-09.ttl * tests/turtle/test-09.out, tests/turtle/test-09.ttl: Comma is required or not in collections, not optional 2004-02-24 Dave Beckett * raptor.spec.in: Export library la files * turtle_parser.y (objectList): Allow optional commas in lists of objects - such as in all triple objects and collections. * tests/turtle/test-09.out, tests/turtle/test-09.ttl: Added test for optional comms in a collection * tests/turtle/Makefile.am: Added test-09.ttl 2004-02-23 Dave Beckett * raptor.h: Add stdio.h 2004-02-19 Dave Beckett * n3_lexer.l, turtle_lexer.l (main): Don't re-reset the scanner to its address. * n3_lexer.l, turtle_lexer.l: Remove RAPTOR_IN_REDLAND * turtle_parser.y (main): Use lineno. * turtle_parser.y: comment 2004-01-30 Dave Beckett * Makefile.am: deps * rapper.1: fix changelog * Makefile.am: Make rapper.html * rapper.1: urls 2004-01-25 Dave Beckett * raptor_general.c (raptor_delete_parser_factories): Free alias if it was set. 2004-01-24 Dave Beckett * rdfdump.c: Don't print (default) when listing valid args for -i * rdfdump.c: Use raptor_syntax_name_check to check name; don't make/destroy a parser. * raptor_general.c (raptor_syntax_name_check): Added, to check names. * raptor.h: Added raptor_syntax_name_check * rdfdump.c: Make -i try to make a parser, don't hardcode names. * rdfdump.c: Use raptor_syntaxes_enumerate in -i error * rdfdump.c: Use raptor_syntaxes_enumerate in usage -i help * rapper.1: Updated to mention Turtle. * configure.ac: Bumped version to 1.3.0 * README.html: turtle * Snapshotted raptor_1_2_0 for 1.2.0 release * libraptor.3, README.html, NEWS.html: Updated for 1.2.0 * TODO.html: N-Triples Plus to Turtle 2004-01-22 Dave Beckett * configure.ac: Use AC_PROG_LEX and handle when there is no lex or flex gracefully. AM_PROG_LEX set LEX to a value that caused odd configure output. 2004-01-20 Dave Beckett * configure.ac: Updated output files check from n3/ntriples plus to turtle * turtle_parser.y, raptor_rss.c, raptor_parse.c, ntriples_parse.c: Update to use raptor_parser_register_factory alias argument to register any old or alternate names. * raptor_internal.h: Add alias field to raptor_parser_factory_s. Add alias argument to raptor_parser_register_factory prototype. * raptor_general.c (raptor_parser_register_factory, raptor_get_parser_factory): Added an alias argument, used to register a alternate name which is never used or returned in parser enumerations. * examples/grapper.c: Added a tooltip for the errors/warnings output box. * examples/grapper.c: Use G_TYPE_INT for column 1 of errors * examples/grapper.c: Added errors/warnings box, updated with results of parsing. * Makefile.am: Added ChangeLog.1 2004-01-19 Dave Beckett * raptor_general.c: Define raptor_system_malloc, raptor_system_free * raptor_internal.h: RAPTOR_... not LIBRDF_ * raptor_utf8.c (raptor_utf8_is_nfc): Use SYSTEM_FREE * raptor_internal.h: Define SYSTEM_MALLOC, SYSTEM_FREE 2004-01-18 Dave Beckett * turtle_parser.y: fix double free of first_identifier * turtle_parser.y: Collections generating triples. * turtle_common.h: Add nil/first/rest_uri fields * tests/turtle/test-07.out: Updated as a collection test result. * tests/turtle/Makefile.am: Added test-08 * tests/turtle/test-08.out, tests/turtle/test-08.ttl, tests/turtle/test-07.ttl: collection test * turtle_lexer.l: Added '(' and ')' for collections. * turtle_parser.y: Added collection grammar parts, triples not right yet. * raptor_identifier.c (raptor_copy_identifier): Copy literal languages correctly. * tests/turtle/test-00.out, tests/turtle/Makefile.am, tests/Makefile.am, turtle_parser.y, turtle_lexer.l, turtle_common.h, raptor_internal.h, raptor_general.c, configure.ac, Makefile.am: N-Triples Plus to Turtle n3_ in filenames to turtle_ .ntp to .ttl * rdfdump.c: indenting * rdfdump.c: Allow turtle, don't document ntriples-plus * n3_parser.y, turtle_parser.y: Register under the name turtle 2004-01-14 Dave Beckett * raptor_xml_writer.c, raptor_uri.c, raptor_rss.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_internal.h, raptor_general.c, ntriples_parse.c: RAPTOR_ERROR* and RAPTOR_FATAL* lose their function arg, using __func__ * raptor_general.c (raptor_finish): Remove direct call of raptor_terminate_parser_rdfxml * raptor_parse.c (raptor_xml_parse_finish_factory): Renamed from raptor_terminate_parser_rdfxml and now static. * raptor_internal.h: finish_factory returns void * raptor_internal.h: Added finish_factory factory cleanup method. Removed raptor_terminate_parser_rdfxml. * raptor_general.c (raptor_delete_parser_factories): Free mime type, URI string. Call new finish_factory factory method. 2004-01-07 Dave Beckett * raptor_general.c: year 2004-01-01 Dave Beckett * raptor_general.c: casts for string ops * raptor_www.c, raptor_internal.h, configure.ac: Added WWW access with BSD libfetch. * raptor_www_libfetch.c: WWW access with BSD libfetch raptor-1.4.21/ChangeLog.60000644000175000017500000017015210532441037011752 000000000000002005-12-21 Dave Beckett * configure.ac, raptor.spec.in, Makefile.am: Write rpm release as 1 (with --enable-release) or SNAP otherwise. * src/turtle_parser.y, src/raptor_general.c, utils/rapper.1: updated urls * docs/tmpl/section-feature.sgml: Added @RAPTOR_FEATURE_WRITER_XML_DECLARATION 2005-12-20 Dave Beckett * utils/Makefile.am: Added rapper.html to dist * raptor-src-config.in, LICENSE.html, Makefile.am, manifest.pl, configure.ac: ILRT/UB link updates 2005-11-30 Dave Beckett * src/raptor_xml_writer.c (raptor_xml_writer_indent): Fix writing an extra newline at doc start. 2005-11-26 Dave Beckett * src/raptor_xml_writer.c: Add automatic writing of the XML declaration (dependent on the XML version). (raptor_xml_writer_write_xml_declaration): Added, to support this. New feature RAPTOR_FEATURE_WRITER_XML_DECLARATION can disable this. (main): Update the test code to expect an XML declaration in the string. * src/raptor_parse.c: Add do-nothing switch cases for RAPTOR_FEATURE_WRITER_XML_DECLARATION. * src/raptor_serialize_rdfxmla.c: Add Adobe XMP compatible output as new serializer rdfxml-xmp based on patch from Sid Steward. Duplicate predicates are ignored for a single subject. * src/raptor_serialize_rdfxml.c: Defer writing xml declaration to the xml writer. * src/raptor_serialize.c: Add XML declaration writing feature support (RAPTOR_FEATURE_WRITER_XML_DECLARATION) for serializer. 2005-11-25 Dave Beckett * configure.ac: Add test X = 1 for expat and libxml tests. Fixes Issue#0000060 2005-11-22 Dave Beckett * src/raptor_feature.c: Added RAPTOR_FEATURE_WRITER_XML_DECLARATION feature. * src/raptor.h: Added RAPTOR_FEATURE_WRITER_XML_DECLARATION to control generating the XML declaration on serializers and XML writer. 2005-11-10 Dave Beckett * raptor.spec.in: Add gtk-doc docs to rpm 2005-11-04 Dave Beckett * docs/tmpl/section-xml.sgml: new functions * docs/tmpl/section-feature.sgml: New feature * docs/libraptor.3: Updated for 1.4.8 2005-11-02 Dave Beckett * docs/raptor-sections.txt: Added raptor_iostream_write_xml_any_escaped_string raptor_xml_any_escape_string * src/turtle_parser.y, src/raptor_internal.h, src/n3_parser.y: Added RAPTOR_ASSERT with no return value and use it for turtle and n3 parsers. Some compilers complain at an empty 3rd macro arg with RAPTOR_ASSERT_RETURN. * src/raptor_serialize_rss.c: remove ;; * src/raptor_rdfxml.c (raptor_generate_statement): Make predicate type fix in reifying. * src/raptor_rdfxml.c (raptor_generate_statement): Make predicate revert fix actually work. * RELEASE.html: Updates for 1.4.8 * src/raptor_rdfxml.c, src/turtle_parser.y, src/raptor_rss.c, src/raptor.h, src/ntriples_parse.c, src/n3_parser.y: Revert RAPTOR_IDENTIFIER_TYPE_PREDICATE to RAPTOR_IDENTIFIER_TYPE_RESOURCE change for predicates until the next release. 2005-09-21 Dave Beckett * src/raptor_uri.c: (raptor_new_uri_for_xmlbase, raptor_new_uri_for_retrieval): Set ud->path_len to 1 when adding a default path of / Fixes bug 0000045 http://bugs.librdf.org/mantis/view.php?id=45 2005-09-20 Dave Beckett * src/raptor_serialize_rdfxmla.c (raptor_rdfxmla_serialize_start): Pass down xml_version to the raptor_xml_writer and write the versioned header. * src/raptor_serialize_rdfxml.c (raptor_rdfxml_serialize_start): Pass down xml_version to the raptor_xml_writer and write the versioned header. * src/raptor_xml_writer.c: Add xml_version to raptor_xml_writer structure. (raptor_iostream_write_xml_element_start): Add xml_version field and pass it down to the XML escape function. (raptor_new_xml_writer): Init xml_version to 10. (raptor_xml_writer_empty_element, raptor_xml_writer_start_element, raptor_xml_writer_cdata, raptor_xml_writer_cdata_counted): Pass down xml_version. (raptor_xml_writer_set_feature, raptor_xml_writer_get_feature): Handle RAPTOR_FEATURE_WRITER_XML_VERSION. * src/raptor_xml.c (raptor_xml_any_escape_string, raptor_iostream_write_xml_any_escaped_string): Added, handling XML 1.0 or XML 1.1 Error if writing #x1-#x1f (excluding #x9, #xA, #xD) or #x7F for XML 1.0 * src/raptor_serialize.c (raptor_serializer_set_feature, raptor_serializer_get_feature): Add RAPTOR_FEATURE_WRITER_XML_VERSION * src/raptor_parse.c: switch on enum updates for feature RAPTOR_FEATURE_WRITER_XML_VERSION for serializer and xml writer * src/raptor_feature.c: Added RAPTOR_FEATURE_WRITER_XML_VERSION for serializer and xml writer with short name xmlVersion * src/raptor.h: Added RAPTOR_FEATURE_WRITER_XML_VERSION for serializer, xml writer. Added prototypes for raptor_xml_any_escape_string and raptor_iostream_write_xml_any_escaped_string * src/raptor_internal.h: raptor_serializer_s gains an xml_version field * src/raptor_sax2.c (raptor_sax2_parse_chunk): Once more with static buffer, no vsnprintf * src/raptor_sax2.c (raptor_sax2_parse_chunk): Fix error message with 2 args for expat using raptor_vsnprintf. * src/raptor_namespace.c (raptor_namespaces_format): XML escape the written namespace name URI * tests/ex-59.rdf: correct result * tests/ex-59.nt, tests/ex-59.rdf: Test rdfxml serializer escapes dquote in uri attrs * tests/Makefile.am: Added RDF_SERIALIZE_TEST_FILES, RDF_SERIALIZE_OUT_FILES and ex-59 for testing the rdfxml serializer * examples/Makefile.am: fix libraptor.la dir 2005-09-18 Dave Beckett * src/raptor_rdfxml.c (raptor_generate_statement): When reifiying, just copy predicate_type. * src/raptor_uri.c (raptor_uri_equals): Alter to accept NULL pointers, which do not compare equal to a non-NULL URI. NULL does equal NULL. * src/raptor.h: Document that RAPTOR_IDENTIFIER_TYPE_PREDICATE is never generated by a parser from now, replaced by RAPTOR_IDENTIFIER_TYPE_RESOURCE and RAPTOR_IDENTIFIER_TYPE_XML_LITERAL replaced by RAPTOR_IDENTIFIER_TYPE_LITERAL with the rdf:XMLLiteral datatype. * src/n3_parser.y, src/ntriples_parse.c, src/turtle_parser.y, src/raptor_rss.c, src/raptor_rdfxml.c: Replace all RAPTOR_IDENTIFIER_TYPE_PREDICATE with RAPTOR_IDENTIFIER_TYPE_RESOURCE * src/raptor_rdfxml.c: Added a new concept for rdf:XMLLiteral Rename RAPTOR_N_CONCEPTS to RAPTOR_RDFXML_N_CONCEPTS (raptor_rdfxml_parse_init): Init it. (raptor_end_element_grammar): Never generate RAPTOR_IDENTIFIER_TYPE_XML_LITERAL, instead generate a RAPTOR_IDENTIFIER_TYPE_LITERAL with the rdf:XMLLiteral datatype. 2005-09-16 Dave Beckett * docs/libraptor.3: Update for 1.4.8 - added raptor_set_namespace_handler * src/raptor_www.c, src/raptor.h: Revert: remove raptor_www_set_source_uri, raptor_www_set_source_file_handle, raptor_www_retrieve and raptor_www_retrieve_to_string 2005-09-15 Dave Beckett * src/raptor.h: delete unused raptor_www_fetch_to_string prototype * src/raptor_www.c: autodocs (raptor_www_set_source_uri): Added to set URI for content source (raptor_www_set_source_file_handle): Added to set URI for content source. (raptor_www_file_handle_fetch): Added, with guts of raptor_www_file_fetch. (raptor_www_file_fetch): Modified to call raptor_www_file_handle_fetch. (raptor_www_retrieve): Added to retrieve from whatever source (URI or handle). (raptor_www_retrieve_to_string): Added to retrieve from whatever source (URI or handle) into a string. (raptor_www_fetch): Now a wrapper over raptor_www_retrieve. (raptor_www_fetch_to_string): Now a wrapper over raptor_www_retrieve_to_string. * src/raptor.h: Added prototypes for raptor_www_set_source_uri, raptor_www_set_source_file_handle, raptor_www_retrieve, raptor_www_retrieve_to_string and raptor_www_fetch_from_file_handle * src/raptor_internal.h: (struct raptor_www_s) gains a handle field * src/raptor_parse.c: autodocs * src/ntriples_parse.c: autodocs and some code style fixes 2005-09-14 Dave Beckett * docs/tmpl/section-parser.sgml: new functions 2005-09-10 Dave Beckett * src/raptor_expat.c: Updates to use new raptor_sax2 handler style. The user data now points at the raptor_sax2* object, not the parser. (raptor_expat_init): send SAX2 events to core raptor_sax2_EVENT routines. (raptor_expat_update_document_locator): Moved from raptor_parser.c * src/raptor_libxml.c: Updates to use new raptor_sax2 handler style. The user data now points at the raptor_sax2* object, not the parser. All raptor_parser* references are gone and error/fatal error/warnings are returned via handler/data pairs. (raptor_libxml_call_handler): Added to aid returning messages. Deleted old and unused internal entity resolution code. (raptor_libxml_init): send SAX2 events to core raptor_sax2_EVENT routines. * src/raptor_internal.h: Removed old and hardly tested internal handling of libxml entities * src/raptor_rdfxml.c: Rename raptor_xml_* to raptor_rdfxml_* in structs and functions. (raptor_rdfxml_start_element_handler, raptor_rdfxml_end_element_handler, raptor_cdata_grammar): Move expat BOM fixes to raptor_sax2.c (raptor_rdfxml_parse_init): Use new raptor_sax2_set_EVENT_handler methods. Use raptor_sax2_set_locator. (raptor_get_libxml_context, raptor_set_libxml_document_locator, raptor_get_libxml_document_locator, raptor_get_libxml_entities, raptor_set_libxml_entities, raptor_expat_update_document_locator): Deleted or merged into raptor_sax2.c * src/raptor_parse.c (raptor_parser_fatal_error_message_handler, raptor_parser_error_message_handler, raptor_parser_warning_message_handler): Added handlers that take location in same style as user message handler callbacks. (raptor_stats_print): Update for raptor_rdfxml_parser * src/raptor_locator.c (raptor_update_document_locator): Moved to raptor_sax2.c * src/raptor_general.c (raptor_init, raptor_finish): Call raptor_init_sax2 and raptor_finish_sax2 respectively. * src/raptor_internal.h: Removed several libxml/expat/rdxml functions used to be too friendly with internals of other classes. Renamed raptor_xml_parser to raptor_rdfxml_parser. Updated prototype of raptor_libxml_update_document_locator. Added new parser handler prototypes raptor_parser_error_message_handler, raptor_parser_fatal_error_message_handler and raptor_parser_warning_message_handler Added handlers for SAX2 events - start element, end element, characters, cdata, comment, unparsed_entity_decl, external_entity_ref named as raptor_sax2_EVENT_handler. raptor_sax2 gains a magic field as this is used as the user data for libxml. raptor_sax2 uses the handler typedefs for the event handlers. raptor_sax2 gains erorr, fatal and warning handler and data fields. Added prototypes for raptor_init_sax2 and raptor_finish_sax2. Updated prototype for raptor_new_sax2. Added prototypes for raptor_sax2_set_start_element_handler, raptor_sax2_set_end_element_handler, raptor_sax2_set_characters_handler, raptor_sax2_set_cdata_handler, raptor_sax2_set_comment_handler, raptor_sax2_set_unparsed_entity_decl_handler and raptor_sax2_set_external_entity_ref_handler Added prototype for raptor_sax2_set_locator. Added prototypes for: raptor_sax2_start_element raptor_sax2_end_element, raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl and raptor_sax2_external_entity_ref. * src/raptor_sax2.c: Now a more complete class (raptor_init_sax2, raptor_finish_sax2): Added, calling any static initialising/finishing. (raptor_new_sax2): Added error, fatal_error and warning data and handler registers. Register magic for libxml2 user_data fixups (raptor_sax2_set_start_element_handler, raptor_sax2_set_end_element_handler, raptor_sax2_set_characters_handler, raptor_sax2_set_cdata_handler, raptor_sax2_set_comment_handler, raptor_sax2_set_unparsed_entity_decl_handler, raptor_sax2_set_external_entity_ref_handler): Added for setting SAX2 callback handlers. (raptor_sax2_set_locator): Added, to set SAX2 file locator. (raptor_sax2_parse_chunk): Update for new handlers, remove all mention of raptor_parser. Use this object (raptor_sax2*) as the user data now, not an external raptor_parser*. (raptor_sax2_update_document_locator): Added, updating the current location for the internal parser. (raptor_sax2_start_element): Added, internal function calling the start element handler, adding various workarounds needed. (raptor_sax2_end_element): Added, internal function calling the end element handler, adding various workarounds needed. (raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): Added, internal functions calling the same-named handler. 2005-09-09 Dave Beckett * src/raptor_qname.c: autodocs * docs/raptor-sections.txt: Added new functions. * src/raptor_internal.h (raptor_parser_s): Add new fields to the end of the struct; add unused1 to try to make old offsets work * src/raptor_namespace.c (raptor_namespaces_init): Remove un-necessary casts for constant namespace names. * src/raptor_uri.c (raptor_uri_uri_string_to_filename_fragment): For win32, only remove leading / if there is one present. (patch from John C. Barstow) (main): Correct test case result to match above. * src/raptor_xslt.c (raptor_xslt_parse_chunk): If the content is in one chunk and is_end is true, call xmlParseChunk with the is_end flag. (patch from René Puls) 2005-09-07 Dave Beckett * src/n3_parser.y, src/turtle_parser.y (statement): Handle error recovery when subject is NULL 2005-09-06 Dave Beckett * src/turtle_common.c (raptor_stringbuffer_append_turtle_string): Do not check unsigned for <0 * src/raptor_xml.c (raptor_xml_name_check): Do not check unsigned for <0 * src/raptor_utf8.c (raptor_utf8_check): Do not check unsigned for <0 * src/raptor_serialize.c (raptor_serializers_enumerate): counter can never be <0 * src/raptor_rdfxml.c (raptor_element_content_type_as_string): Do not check unsigned for <0 * src/raptor_feature.c (raptor_feature_value_type): Do not check unsigned for <0 * src/ntriples_parse.c (raptor_ntriples_term): Do not check unsigned for <0 * src/raptor_parse.c (raptor_syntaxes_enumerate): counter can never be <0 2005-08-24 Dave Beckett * src/Makefile.am: Add more conditional compiles for serializers * src/Makefile.am: Added raptor_serialize_rdfxml.c raptor_serialize_ntriples.c raptor_serialize_simple.c * src/raptor_serialize.c: Moved specific serializers into separate files - rdfxml, ntriples, simple * src/raptor_serialize_rdfxml.c: RDF/XML serializer * src/raptor_serialize_ntriples.c: N-Triples serializer * src/raptor_serialize_simple.c: Simple serializer * src/raptor-config.in, src/raptor-config.1: s/features/options/ so not to confuse with raptor_feature * utils/rapper.c: Add HELP_TEXT_LONG to deal with help that has no short option. * utils/rapper.c: fix --show-namespaces help * utils/rapper.1: Added --show-namespaces * utils/rapper.c: (print_namespaces) Added Added --show-namespaces option - long options only. * src/turtle_parser.y, src/raptor_rdfxml.c, src/n3_parser.y: Handle raptor_new_namespace failing. * src/turtle_parser.y, src/raptor_rdfxml.c, src/n3_parser.y: Remove calls to raptor_namespaces_start_namespace_full and use the three functions raptor_new_namespace, raptor_namespaces_start_namespace and raptor_parser_start_namespace instead. * src/raptor_parse.c (raptor_set_namespace_handler): Added. New user method. (raptor_parser_start_namespace): Added. Internal function to operate when namespaces are declared. * src/raptor.h: Added raptor_namespace_handler typedef. Added raptor_set_namespace_handler prototype. * src/raptor_internal.h: raptor_parser_s gains namespace_handler and namespace_handler_user_data fields. Added raptor_parser_start_namespace prototype. 2005-08-24 Dave Beckett * tests/Makefile.am: link to libxml2 bug report * src/raptor_rss.c (raptor_rss_emit_type_triple, raptor_rss_emit_enclosure, raptor_rss_emit_connection): Zap literal language and datatype before setting up statement objects. * src/ntriples_parse.c (raptor_ntriples_generate_statement): Zap literal language and datatype before setting up statement objects. * src/n3_parser.y (raptor_n3_generate_statement): Zap literal language and datatype for !literals. Add assertion. * src/raptor_internal.h (RAPTOR_ASSERT_RETURN): Remove ()s around return to allow no-value. * src/turtle_parser.y (raptor_turtle_generate_statement): Zap literal language and datatype for !literals. Add assertion. 2005-08-22 Dave Beckett * src/raptor.h: autodocs fixes * src/raptor.h: autodocs * docs/raptor-sections.txt: raptor_uri_init now internal * src/raptor_parse.c: autodocs * docs/tmpl/section-unused.sgml: raptor_uri_init now internal * docs/tmpl/section-general.sgml, src/raptor_internal.h: Remove unused container_test_handler function. * src/raptor.h, src/raptor_xml.c, src/raptor_sequence.c, src/raptor_iostream.c, src/raptor_stringbuffer.c: autodocs * docs/raptor-sections.txt: No raptor_container_test_handler * src/raptor.h: raptor_uri_init was internal * src/raptor_uri.c: autodocs * src/raptor_internal.h: raptor_uri_init was internal * src/raptor_uri.c: autodocs 2005-08-19 Dave Beckett * Makefile.am: Enable gtk doc with make distcheck * docs/tmpl/section-xml-namespace.sgml: args * src/raptor_namespace.c, src/raptor.h, src/raptor_xml.c, src/raptor_serialize.c, src/raptor_qname.c, src/raptor_parse.c, src/raptor_iostream.c, src/raptor_sequence.c, src/raptor_general.c, src/raptor_feature.c: autodocs * docs/version.xml.in: version.xml.in * docs/tmpl/section-serializer.sgml: whitespace * src/raptor_sequence.c: autodocs * src/raptor_xml.c (raptor_xml_escape_string): autodocs escapes * src/ntriples_parse.c, src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_nfc.c, src/raptor_nfc_test.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_rdfxmla.c, src/raptor_set.c, src/raptor_stringbuffer.c, src/raptor_uri.c, src/raptor_utf8.c, src/raptor_www.c, src/raptor_www_libwww.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/turtle_common.c: autodocs reformatted for gtk-doc * docs/tmpl/section-constants.sgml, docs/tmpl/section-feature.sgml, docs/tmpl/section-general.sgml, docs/tmpl/section-iostream.sgml, docs/tmpl/section-locator.sgml, docs/tmpl/section-memory.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-sequence.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-stringbuffer.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-unicode.sgml, docs/tmpl/section-unused.sgml, docs/tmpl/section-uri-factory.sgml, docs/tmpl/section-uri.sgml, docs/tmpl/section-www.sgml, docs/tmpl/section-xml-namespace.sgml, docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-xml.sgml: initial templates * docs/raptor-docs.xml: fix * docs/raptor-docs.xml, docs/raptor-overrides.txt, docs/raptor-sections.txt: gtk-doc files * docs/Makefile.am, configure.ac: Enable gtk-doc * configure.ac: check for gtk-doc 2005-08-19 Dave Beckett * src/raptor-config.1: Document --features and --help. Order flags alphabetically in summary and body. * src/raptor-config.in: Add --features argument to list configured or discovered features of the raptor library * configure.ac: Add AC_SUBSTs for recording discovered features: RAPTOR_WWW_LIBRARY (or none), RAPTOR_XML_PARSER (or none), RAPTOR_PARSERS (list) and RAPTOR_SERIALIZERS (list). 2005-08-18 Dave Beckett * src/raptor_sax2.c (raptor_sax2_parse_start): Fix for expat * src/raptor_rdfxml.c (raptor_xml_unparsed_entity_decl_handler, raptor_xml_external_entity_ref_handler): Casts for gcc4 * src/raptor_expat.c (raptor_expat_init): Casts for expat to use sax2 handlers. * src/raptor_internal.h: Move raptor_sax2 declaration outside libxml-only block Fixup general arguments for raptor_xml_unparsed_entity_decl_handler and raptor_xml_external_entity_ref_handler. * src/raptor_rdfxml.c (raptor_xml_unparsed_entity_decl_handler, raptor_xml_external_entity_ref_handler): Generalise args from expat-specific. (raptor_xml_parse_init): Init sax2 handler fields * src/raptor_libxml.c (raptor_libxml_init): Use sax2 structure handlers * src/raptor_expat.c (raptor_expat_init): Use sax2 structure handlers * src/raptor_internal.h: raptor_sax2 gains handlers for start/end element, characters, cdata, comment, unparsed entity declaration, extenal entity reference. * src/raptor_sax2.c (raptor_sax2_parse_start): Init expat and libxml the same * src/raptor_libxml.c (raptor_libxml_init): Take raptor_sax2* and raptor_uri* args * src/raptor_expat.c (raptor_expat_init): Take raptor_sax2* and raptor_uri* args * src/raptor_internal.h: raptor_libxml_init and raptor_expat_init take same args * src/turtle_parser.y, src/raptor_xslt.c, src/raptor_rss.c, src/raptor_rdfxml.c, src/raptor_guess.c, src/ntriples_parse.c, src/n3_parser.y: Update uses of raptor_parser_register_factory to remove alias argument and add calls to raptor_parser_factory_add_alias for raptor (rdfxml) and ntriplesplus (turtle) * src/raptor_internal.h: Update raptor_parser_register_factory prototype to return the registered factory and remove the alias arg. Added prototype for raptor_parser_factory_add_alias * src/raptor_parse.c (raptor_parser_register_factory): Now returns the registered factory. Removed alias arg into new function: (raptor_parser_factory_add_alias): Added. 2005-08-17 Dave Beckett * src/Makefile.am: maintainer clean n3 files * src/Makefile.am: clean n3 tests * src/n3_lexer.l (n3_lexer_syntax_error): Added, from turtle. * src/n3_lexer.l: Added n3_lexer_syntax_error (\"\"\"): Copy just the len and always terminate the string. (n3_copy_string_token): Handle empty strings without stringbuffer and use raptor_stringbuffer_append_turtle_string for escapes. Ensure string is always termianted. * src/n3_common.h: added stringbuffer field * src/turtle_parser.y: Expect 9 conflicts. Added FLOATING_LITERAL (FLOATING_LITERAL): Use raptor_new_identifier_from_double common with n3. * src/n3_parser.y (FLOATING_LITERAL): Use raptor_new_identifier_from_double common with turtle. * src/turtle_lexer.l (\"\"\"): Copy just the len and always terminate the string. Added doubles to Turtle. (turtle_copy_string_token): Handle empty strings without stringbuffer. Ensure string is always termianted. (turtle_token_print): Print FLOATING_LITERAL * tests/turtle/test-20.ttl, tests/turtle/test-20.out, tests/turtle/Makefile.am: Add test-20 for empty literals * tests/turtle/Makefile.am: re-add test-19 2005-08-16 Dave Beckett * src/raptor_internal.h: Added raptor_new_identifier_from_double pointer * src/raptor_xsd.c: raptor_xsd.c * src/Makefile.am: Added raptor_xsd.c * src/n3_parser.y, src/n3_lexer.l: Add double constants to N3 parser * src/n3_lexer.l (main): Make uri_string an unsigned char* * tests/turtle/Makefile.am: remove test-19 for now, no double constants * tests/turtle/Makefile.am, tests/turtle/test-19.out, tests/turtle/test-19.ttl: added test-19 for 1.0 as a double * src/Makefile.am: Add turtle_common.c * tests/turtle/test-18.out: Remove header/footer * src/turtle_parser.y: 2005 * src/turtle_lexer.l: Added turtle_lexer_syntax_error Build up long strings inside a stringbuffer with raptor_stringbuffer_append_turtle_string and avoid greedy match of """s (turtle_copy_string_token): Use raptor_stringbuffer_append_turtle_string (turtle_lexer_syntax_error): Added. * src/raptor_internal.h: Added raptor_stringbuffer_append_turtle_string prototype * src/turtle_common.h: Added raptor_stringbuffer* field sb * src/turtle_common.c: Raptor Turtle common code with raptor_stringbuffer_append_turtle_string from raptor_turtle.l * tests/turtle/Makefile.am, tests/turtle/test-18.out, tests/turtle/test-18.ttl: Added test-18 for multiple long literals with escapes * src/raptor_serialize_rss.c (raptor_rss10_emit_item): Die in debug mode with NULL item - all calls to this are currently wrapped with a check. (raptor_rss10_emit_item): Do not emit atom author when no such item exists. * manifest.pl: typo 2005-08-11 Dave Beckett * autogen.sh: Rewrite with functions, generalize to any redland package. Add docs. * raptor.spec.in: - Update Source: - Use %makeinstall 2005-08-10 Dave Beckett * raptor.spec.in: Use %configure and %{_make} 2005-08-08 Dave Beckett * src/raptor_rss_common.c, src/raptor_rss.c, src/raptor_internal.h: Move time.h and sys/time.h #ifdef and includes to raptor_internal.h since time_t is mentioned there and visible to all files. * tests/Makefile.am: adjust -I to point to srcdir for raptor_empty_test 2005-07-31 Dave Beckett * src/raptor_xml_writer.c (main): syntax * src/raptor_uri.c: Add (void) casts for fwrite debug messages * src/raptor_xml_writer.c, src/raptor_rdfxml.c, src/raptor_nfc_test.c: Add (void) casts for fwrite debug messages * Source re-organisation - libraptor code moved to new src/ dir. rapper and rdfdif moved to new utils/ dir. Other manual pages to docs/. 2005-07-27 Dave Beckett * Makefile.am: Add n3_lexer_test, n3_parser_test for maintainer * n3_parser.y, turtle_parser.y (main): Make it compile * n3_parser.y: Updates from turtle_parser.y: gcc4 ignored return warning fixes: (main): Check fread() return value and throw a user error. (main): Fix for gcc4 (main) Move filename here * examples/grapper.c: Add author url * raptor_rss.c (raptor_rss_uplift_fields): Add possibility of normalizing fields, but no code to do it yet. * raptor_rss_common.c (raptor_rss_date_uplift): fail and do nothing if function returns <0 * raptor_rss.c (raptor_rss_uplift_fields): Moved date code into raptor_rss_date_uplift and call it. * raptor_rss.h: Added raptor_rss_date_uplift prototype * raptor_rss_common.c (raptor_rss_date_uplift): Added, pulled out of raptor_rss.c * turtle_parser.y: gcc4 ignored return warning fixes: (main): Check fread() return value and throw a user error. 2005-07-25 Dave Beckett * examples/grapper.c (fs_ok_button_callback): Protect from defining when when not used as a callback. (open_button_callback): cast for gcc4 2005-07-24 Dave Beckett * raptor_rss.c (raptor_rss_parser_processNode): for rss:link and atom:link with href, allow multiple link for atom, and continue to ignore all but for rss. * raptor_rss_common.c: Tidying. Added atom:feed and atom:entry to raptor_rss_types_info. Declare atom namespace URI string raptor_atom_namespace_uri * raptor_rss.h: Added RAPTOR_ATOM_FEED, RAPTOR_ATOM_ENTRY. * raptor_serialize_rss.c: Add atom 1.0 serializing by generalising rss 1.0 serializing. Change field names to reflect this rdf_nspace -> default_nspace, rdf_RDF_element -> root_element. Add is_atom flag. (raptor_rss10_serialize_init): Init is_atom flag. (raptor_rss10_move_statements, raptor_rss10_store_statement): Rename back fields translated to rss: namespace. (raptor_rss10_build_xml_names): Init namespace qname for rss/atom. Declare the default namespace to rss/atom. Ignore all item types but rss:item for atom; all but atom:author for rss. For item node type use atom:entry / rss:item. (raptor_rss10_emit_item): Add emit_container flag to prevent generating the containing elements. For atom:author, generate it inline for atom, ignore it for rss. When generating URI-valued fields for atom, make them element content. For atom, do not generate rdf:Seq block. (raptor_rss10_serialize_end): Only emit node type rss:item (aka atom:entry) for atom. (raptor_init_serializer_atom): Added. * configure.ac: Added atom serializer, enabled for maintainer only. * raptor_general.c (raptor_init): Add call to raptor_init_serializer_atom if enabled * raptor_internal.h: Added prototype for raptor_init_serializer_atom Added raptor_atom_namespace_uri * raptor_serialize_rss.c (raptor_rss10_serialize_end): End with an error if no rss channel was found. * Makefile.am: Use RAPTOR_SERIALIZER_RSS_1_0 for new separate rss serializer. Use RAPTOR_RSS_COMMON when either rss parser or serializer is needed. * configure.ac: RSS 1.0 serializer is always available and does not need the libxml requirements of the RSS tag soup parser. Added RAPTOR_SERIALIZER_RSS_1_0 define and makefile conditional. Added RAPTOR_RSS_COMMON when any rss code is needed. * raptor_rss.c, raptor_rss_common.c, raptor_serialize_rss.c: Moved common code between parser and serializer from raptor_rss.c into new raptor_rss_common.c as new class raptor_rss_model. Moved rss-1.0 serializer into new raptor_serialize_rss.c. Both can be compiled independent of the other. * raptor_rss.h: Redland Parser Toolkit Internal RSS Model and API * raptor_internal.h: Add RAPTOR_PARSEDATE_FUNCTION macro for parsedate.c * raptor_general.c (raptor_init): Use define RAPTOR_SERIALIZER_RSS_1_0 to call raptor_init_serializer_rss10 * raptor_xml.c, raptor_sax2.c: Moved raptor_new_xml_element, raptor_free_xml_element, raptor_xml_element_set_attributes, raptor_xml_element_declare_namespace, raptor_print_xml_element, raptor_iostream_write_xml_element from raptor_sax2.c to raptor_xml.c 2005-07-23 Dave Beckett * raptor_rss.c: More base URIs on base URIs fixes. (raptor_rss_parser_processNode): Ensure base URI is always copied at start element, always freed at end element. Make sure xml:base processing is done for all elements including document and typed-node ones. (raptor_rss_parse_chunk): Remove duplicate document base URI setting. 2005-07-22 Dave Beckett * raptor_rss.c: raptor_rss_info gains flags field to store RAPTOR_RSS_INFO_FLAG_URI_VALUE where the value of the element value is always a URI. Apply that to atom:id, atom:icon and atom:logo. struct raptor_rss_parser_context_s gains a sequence of base URIs per-element. (raptor_rss_context_init, raptor_rss_context_terminate): Init and free sequence of base URIs. (raptor_rss_parse_start): Start base URI sequence with parser base URI. (raptor_rss_parser_processNode): Init base_uri from top of stack of base URIs. Update base_uri from an xml:base arg, relative to the current base URI. Use the base URI for all URi constructions. Push the new base URI after an element has been found. Pop the base URI at the end of an element. At the end of an element, if the field always has a URI value, convert it. (raptor_rss_parse_chunk): Init the URI sequence with the parser base URI. * raptor_rss.c: map raptor_atom_to_rss: turn more atom cloned rss fields into rss fields. (raptor_rss_uplift_fields): Change default action to copy (duplicate) fields. (raptor_rss10_emit_item): Do not emit link to atom:author types in rss1.0 (raptor_rss10_serialize_end): Do not emit atom:author type in rss1.0 * raptor_rss.c: Added atom 1.0 namespace (ATOM1_0_NAMESPACE_URI, ASTOM1_0_NS) and terms. Turn old atom 0.3 terms into 1.0 versions where known using raptor_atom_to_rss. (raptor_rss_parser_processNode): Handle atom feed element properly, make a new channel item. Convert atom 0.3 namespaced elements to atom 1.0 Use atom:id to get a URI for the feed/entry Copy atom:published to dc:date and atom:rights to dc:rights via raptor_rss_uplift_map. (raptor_rss_uplift_fields): Copy dc:date and atom:rights * raptor_rss.c: Added content: namespace CONTENT_NAMESPACE_URI, prefix "content:" Added content:encoded field RAPTOR_RSS_FIELD_CONTENT_ENCODED (raptor_rss_uplift_fields): Added an uplift from description to content:encoded (raptor_rss10_emit_item): Write content:encoded using 2005-07-19 Dave Beckett * raptor_guess.c (raptor_guess_parse_chunk): unused var parser * ntriples_parse.c (raptor_init_parser_ntriples): Do not register interest in text/plain -- too general. 2005-07-18 Dave Beckett * raptor_guess.c: Slim down, to use raptor_parser_exec. (raptor_guess_parse_start): Deleted again. (raptor_guess_parse_chunk): Use guessing and raptor_parser_exec to switch to the right parser. * raptor_internal.h: Added prototype to raptor_parser_exec * raptor_parse.c (raptor_parser_exec): Added to turn one parser type into another in-situ. * rdfdump.c: make -g invoke the guess parser and report the resulting parser at the first triple returned * raptor_guess.c (raptor_guess_parse_start): Added. (raptor_guess_parse_chunk): Pass in buffer to raptor_guess_parser_name since we have it. Work with no content_type such as when using a filename alone. * ntriples_parse.c (raptor_ntriples_parse_chunk): Handle ending on \r\n by updating 'start' by 1 position. * ntriples_parse.c (raptor_ntriples_term): Check sscanf return to catch bad \u or \U hex escape. * turtle_lexer.l (turtle_copy_string_token): Check sscanf return to catch bad \u or \U hex escape. * raptor_general.c (raptor_init): Added guessing parser * configure.ac, Makefile.am: Added raptor_guess.c * raptor_guess.c: guessing parser using content type and an internal parser * raptor_xslt.c (raptor_xslt_parse_start): No need to init column, byte locator. * raptor_rdfxml.c (raptor_xml_parse_recognise_syntax): Guess that application/xml is likely RDF/XML * raptor_internal.h: raptor_parser_factory_s gains a content_type_handler field. * raptor_parse.c (raptor_start_parse): Init locator line, column, byte to -1 (unknown) (raptor_parse_uri_content_type_handler): Added to handle raptor_www content type field return. Pass on to factory method content_type_handler if present. (raptor_parse_uri_with_connection): Init raptor_parse_uri_content_type_handler to receive raptor_www callbacks using raptor_www_set_content_type_handler. (raptor_guess_parser_name): Check static buffer size for overflow. Add some comments. * raptor_xslt.c (raptor_xslt_parse_start): Use raptor_parser_copy_user_state * raptor_parse.c (raptor_parser_copy_user_state): Added. * raptor_internal.h: Added prototype for raptor_parser_copy_user_state * tests/ex-58.rdf, tests/ex-58.out, tests/Makefile.am: Added ex-58. See http://lists.w3.org/Archives/Public/www-archive/2005Jul/0017.html for discussion. * raptor_rdfxml.c (raptor_end_element_grammar): When emitting literals, handle a datatyped empty literal. Merge the property element/member property element code. * tests/ex-57.rdf, tests/ex-57.out, tests/Makefile.am: Added ex-57. See http://lists.w3.org/Archives/Public/www-rdf-comments/2005AprJun/0000.html for discussion. 2005-07-13 Dave Beckett * turtle_lexer.l: Switch qname, blank node and prefix definitions to SPARQL ones. (main): Fixes for gcc4 * turtle_parser.y (main): Fix for gcc4 * raptor_utf8.c (raptor_unicode_is_xml11_namechar): Call raptor_unicode_is_xml11_namestartchar. 2005-07-01 Dave Beckett * configure.ac: Check for isascii, for parsedate.y * parsedate.y: Update source links 2005-06-29 Dave Beckett * raptor_rss.c (raptor_rss_uplift_fields): Fix valid condition. * raptor_rss.c: raptor_rss_uplift_map - added, rss091:pubDate -> dc:date in ISO format (raptor_rss_uplift_fields): Added, to search for fields to uplift. (raptor_rss_uplift_items): Added, to scan items to uplift. (raptor_rss_parse_chunk): Call raptor_rss_uplift_items. 2005-06-17 Dave Beckett * raptor.spec.in: License not Copyright header 2005-06-12 Dave Beckett * raptor_rss.c: update for INN parsedate * configure.ac: Look for parsedate in libINN 2005-06-11 Dave Beckett * Makefile.am: Add parsedate.y to EXTRA_DIST * configure.ac: Better check for parsedate function * raptor_rss.c: Add the time includes for AC_HEADER_TIME * configure.ac: Add the standard AC_HEADER_TIME checks. * raptor_rss.c: Turn rss091:date into dc:date using a date parsing function PARSEDATE_FUNCTION to decode it and strftiem to make the new ISO format. * configure.ac: Get date parsing code from parsedate, curl curl_getdate or raptor parsedate if neither is available. * Makefile.am: Add parsedate.c if PARSEDATE defined Build parsedate.c from parsedate.y * parsedate.y: Fixes to build in raptor * parsedate.y: Imported public domain date parsing code from http://cvs.php.net/php-src/ext/standard/parsedate.y 2005-06-10 Dave Beckett * raptor_rss.c: Added Suzan Foster to copyright 2005-06-08 Dave Beckett * rdfdiff.c: Casts for c++ * win32_raptor_config.h, configure.ac: Bumped version to 1.4.8 * Snapshotted raptor_1_4_7 for 1.4.7 release * libraptor.3: Note no changes in 1.4.6 and 1.4.7 2005-06-07 Dave Beckett * raptor_serialize_rdfxmla.c (raptor_new_qname_from_resource): Fail to split predicate if entire uri is an XML name - it's probably not an absolute URI. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Fail to split predicate if entire uri is an XML name - it's probably not an absolute URI. * raptor_namespace.c (raptor_namespaces_find_namespace_by_uri): Return NULL if ns_uri is NULL. 2005-06-06 Dave Beckett * raptor_rss.c (raptor_rss_emit): Fix crash when no RSS channel is present (Suzan Foster) 2005-06-01 Dave Beckett * Makefile.am: Added ChangeLog.[2-5] * ChangeLog: 2004 to ChangeLog.5 * raptor_rss.c (raptor_rss_parser_processNode): Copy attribute value before storing in the item field. 2005-05-25 Dave Beckett * raptor_xslt.c: docs 2005-05-22 Dave Beckett * configure.ac: Test for libxslt/xslt.h as well as library, and disable if missing. 2005-05-19 Dave Beckett * configure.ac, win32_raptor_config.h: Bumped version to 1.4.7 * Snapshotted raptor_1_4_6 for 1.4.6 release * win32/Makefile.am, win32/rapper.vcproj, win32/raptor.sln, win32/raptor.vcproj, win32/raptortest.vcproj: Import configuration from John Barstow * win32/README.txt: updates * win32_raptor_config.h: Switch to libxml * win32_raptor_config.h: Spelling: RAPTOR_INLINE * raptor_general.c (raptor_init): Added conditionals around serializers: RAPTOR_SERIALIZER_RDFXML/NTRIPLES/RDFXML_ABBREV * Makefile.am: Added conditionally included RAPTOR_SERIALIZER_RDFXML_ABBREV * configure.ac: Added --enable-serializers=LIST and serializers to summary. Reformat other help messages to match. 2005-05-18 Dave Beckett * turtle_parser.y: (main) Move filename here * configure.ac: Add proper check for libxslt * configure.ac: default memory-signing no * configure.ac, rdfdump.c: Bugs to http://bugs.librdf.org/ 2005-05-17 Dave Beckett * raptor_identifier.c, raptor_parse.c, raptor_serialize.c, raptor_serialize_rdfxmla.c, raptor_sax2.c, raptor_rdfxml.c: Casts for RAPTOR_FREE * configure.ac: usage message formatting * raptor_general.c (raptor_free_statement): Casts for RAPTOR_FREE * configure.ac: Added --with-memory-signing raptor signing memory debugging Reformatted some other --with help messages. * raptor_general.c (raptor_sign_malloc, raptor_sign_calloc, raptor_sign_realloc, raptor_sign_free): Added raptor signing memory debugging trigged by RAPTOR_MEMORY_SIGN. * raptor_internal.h: Added raptor signing memory debugging trigged by RAPTOR_MEMORY_SIGN * n3_lexer.l: Use RAPTOR_MALLOC, RAPTOR_FREE * n3_parser.y, turtle_parser.y (directive, resource): Use RAPTOR_MALLOC, RAPTOR_FREE * turtle_lexer.l: Use RAPTOR_MALLOC, RAPTOR_FREE * rdfdiff.c: (rdfdiff_new_file, rdfdiff_new_blank) Use RAPTOR_MALLOC rather than strdup. * raptor_www_curl.c (raptor_www_curl_header_callback): Use RAPTOR_MALLOC on type field data. * rdfdump.c: Add raptor_finish() before usage exit 2005-05-13 Dave Beckett * raptor_rss.c: Casts for C++ * raptor_serialize_rdfxmla.c (raptor_rdfxmla_serialize_init, raptor_rdfxmla_serialize_terminate): Init/free rdf_xml_literal_uri for the rdf:XMLLiteral URI. (raptor_rdfxmla_serialize_statement): Turn datatyped literals that are rdf:XMLLiteral into inline XML, not escaped. 2005-05-12 Dave Beckett * raptor_serialize.c (raptor_rdfxml_serialize_init, raptor_rdfxml_serialize_terminate): Init/free rdf_xml_literal_uri for the rdf:XMLLiteral URI. (raptor_rdfxml_serialize_statement): Turn datatyped literals that are rdf:XMLLiteral into inline XML, not escaped. 2005-05-10 Dave Beckett * configure.ac: Change quotes around bison test * configure.ac: Try to work for older bison version styles 2005-05-08 Dave Beckett * raptor_rss.c: Update from Suzan Foster to reflect the latest status of the enclosure vocabulary and allow multiple common items and fields. Fields in items are now a linked list of raptor_rss_field items. (raptor_rss_context_init): Empty common area. (raptor_enclosure_free): Use raptor_enclosure_free to empty enclosure list. (raptor_rss_field_free): Added to free a list of rss fields. (raptor_clear_rss_item): Use raptor_rss_field_free for freeing duplicate fields. (raptor_clear_rss_common_items): added to empty common item field lists. (raptor_rss_context_terminate): Empty common item fields with raptor_clear_rss_common_items. (raptor_rss_new_field): Added. (raptor_rss_enclosure_add): Added. (raptor_rss_field_add): Added to add a new field value to the list of values for one field item. (raptor_rss_common_add): Added to add a new common item to the list of common items for the current type. (raptor_rss_common_get): Added to get the last common item for the current type. (raptor_rss_parser_processNode): Updates for new fields structure. (raptor_rss_insert_enclosure_identifiers): Update for handling uris and bnodes. (raptor_rss_insert_identifiers): Update for lists for common items and lists of ields. (raptor_rss_emit_enclosure): Update for handling uris and bnodes. (raptor_rss_emit_item, raptor_rss_emit, raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_build_xml_names): Updates for lists of common items and lists of fields. (raptor_rss10_emit_item): Added fix for moving fields to the item when they got stuck on the enclosure when the enclosure uri = the guid. Updates for lists of common items and lists of fields. (raptor_rss10_serialize_end): Updates for lists of common items and lists of fields. 2005-05-04 Dave Beckett * win32_raptor_config.h: Added SIZEOF_UNSIGNED_SHORT 2005-04-17 Dave Beckett * autogen.sh: allow envariables to override the programs 2005-04-16 Dave Beckett * raptor_iostream.c (raptor_string_iostream_finish): Fixes bug 0000021: the output of to_string for an empty model should always be parsable and result in an empty model http://bugs.librdf.org/mantis/view.php?id=21 * raptor_iostream.c (raptor_string_iostream_finish): Return an empty string "" (aka 1 byte, \0) when the stringbuffer is NULL, do not return the NULL. 2005-04-14 Dave Beckett * raptor_parse.c: docs typo 2005-04-11 Dave Beckett * tests/Makefile.am, tests/ex-56.out, tests/ex-56.rdf: Added ex-56 test that relative URIs in datatypes work (Graham Klyne) 2005-04-08 Dave Beckett * raptor_xml_writer.c, raptor_serialize_rdfxmla.c, raptor_serialize.c, raptor_rdfxml.c, raptor_parse.c, raptor_general.c: Add missing switch cases to make -Wswitch-enum happy. * configure.ac: More gcc -W flags in maintainer mode. * raptor_xslt.c: Casts for C++ 2005-04-07 Dave Beckett * raptor_xslt.c (raptor_init_parser_grddl): Expand grddl parser description. * libraptor.3: Added missing 1.4.5 API changes, adding XML writer features and support functions as used by the rdf/xml-abbrev serializer. * tests/Makefile.am: test should use = not == for string compare portability 2005-04-06 Dave Beckett * raptor_xslt.c: Added a list of XPaths to try, fixed searching for a profile. Now handles 2 XHTML forms and XML. (raptor_xslt_parse_chunk): Walk through the list of XPaths. Do not give an error if no GRDDL is found, 0 triples are ok. * raptor_libxml.c (raptor_libxml_error_common): Added, passing in prefix and is_fatal flag. Handle NULL ctx and hence NULL parser. (raptor_libxml_error, raptor_libxml_generic_error, raptor_libxml_fatal_error, raptor_libxml_validation_error): Use the new function, share very common code. * raptor_parse.c (raptor_parser_error_varargs): Survive a NULL parser. * raptor_rdfxml.c (raptor_get_libxml_context, raptor_set_libxml_document_locator, raptor_get_libxml_document_locator): Survive NULL rdf_parser calls. * raptor_internal.h: Added raptor_libxml_init_generic_error_handlers prototype * raptor_xslt.c (raptor_xslt_parse_start): Init column, byte to -1 (raptor_xslt_xmlStructuredErrorFunc): Added, not tested. (raptor_xslt_parse_chunk): Ensure last chunk with is_end is always run. Report error if no XML DOM made. Set xslt context structured error handler to raptor_xslt_xmlStructuredErrorFunc. 2005-04-04 Dave Beckett * raptor_xslt.c (raptor_xslt_parse_chunk): Declare 'nodes' at top of block. Init doc_txt/doc_txt_len earlier so do not free junk. Get the base URI string from the XML doc if it exists. 2005-03-25 Dave Beckett * configure.ac: Added --with-xslt-config Added grddl parser and checking. Added simple search for libxslt needed by grddl. * Makefile.am: Added grddl if RAPTOR_PARSER_GRDDL * raptor_general.c (raptor_init): Added grddl * raptor_libxml.c (raptor_libxml_init_sax_error_handlers): Added to just init the static error handlers for libxml for grddl. * raptor_internal.h: Export raptor_libxml_init_sax_error_handlers for grddl. Added raptor_init_parser_grddl * raptor_xslt.c: Generates triples via in internal rdf/xml parser. (raptor_xslt_parse_start): Copy any user-set handlers to the internal rdf/xml parser. (main): Deleted, experimental code merged. * raptor_xslt.c: Reformed test code into parser named 'grddl' (raptor_xslt_parse_init, raptor_xslt_parse_terminate, raptor_xslt_parse_start, raptor_xslt_parse_chunk, raptor_xslt_parse_recognise_syntax, raptor_xslt_parser_register_factory, raptor_init_parser_xslt): Added 2005-03-24 Dave Beckett * raptor_xslt.c: Fix some memory leaks. * raptor_xslt.c: Remove commented out standalone xslt * Makefile.am: Added bodge raptor_xslt_test * raptor_xslt.c: Raptor GRDDL XSLT * raptor_parse.c (raptor_parse_chunk): docs 2005-03-10 Dave Beckett * n3_lexer.l, turtle_lexer.l: Tidy to use .|\n to match any char * n3_lexer.l, turtle_lexer.l: Added """long literals""" Use yyterminate() to end on errors * tests/turtle/bad-14.ttl, tests/turtle/test-17.ttl, tests/turtle/test-17.out: long literals * tests/turtle/Makefile.am: Added test-17.ttl bad-14.ttl for long literals 2005-03-06 Dave Beckett * raptor_serialize_rdfxmla.c (raptor_new_qname_from_resource): Use maximal xml name length for splitting predicate. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Use maximal xml name length for splitting predicate. 2005-02-21 Dave Beckett * examples/Makefile.am: Add gconf-2.0 to grapper args 2005-02-16 Dave Beckett * examples/grapper.c: Added gconf storing of window width/height at namespace /apps/grapper 2005-02-14 Dave Beckett * win32_raptor_config.h: Define RASQAL_INLINE to __inline * raptor_nfc.c: Change inline to RAPTOR_INLINE * raptor_internal.h: Define RAPTOR_INLINE to inline if not alerady defined to something else 2005-02-12 Dave Beckett * raptor_serialize_rdfxmla.c (raptor_rdfxmla_emit_subject_list_items, raptor_rdfxmla_emit_subject_properties, raptor_rdfxmla_emit_subject, raptor_rdfxmla_serialize_start): Copy base URIs only when they are not NULL. (raptor_rdfxmla_serialize_statement): Handle predicate type RAPTOR_IDENTIFIER_TYPE_RESOURCE as an alternative. 2005-02-10 Dave Beckett * raptor_xml.c (raptor_valid_xml_ID): Just return an error status, don't error out here. 2005-02-08 Dave Beckett * Makefile.am: Add n3_lexer.l n3_parser.y to EXTRA_DIST otherwise building with --enable-maintainer-mode from tarball will fail. * raptor_rss.c: Add RSS enclosures serializing into RSS 1.0 raptor_rss10_serializer_context gains enclosures sequence (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate): Init, free enclosures sequence. (raptor_rss10_store_statement): If subject isn't an RSS item, see if it is an enclosure and if so, set the type. (raptor_rss10_serialize_statement): If type is enclosure, walk the list of enclosures and add a new one if not seen already. (raptor_rss10_emit_item): Add indent arg as this is called recursively. Use it to print spaces from the raptor_rss10_spaces constant. Only serialize an rdf:about if the item has a URI. If field is enc:enclosure, find the enclosure item and write it indented further recursively calling raptor_rss10_emit_item. * raptor_rss.c: re-comment back item enclosure thing 2005-02-07 Dave Beckett * raptor_rss.c (raptor_rss_parser_processNode): Do not assign 'alternate' attribute values when there's no field to use. 2005-02-06 Dave Beckett * configure.ac, win32_raptor_config.h: Bumped version to 1.4.6 * Snapshotted raptor_1_4_5 for 1.4.5 release 2005-02-04 Dave Beckett * autogen.sh: Add autoheader and libtoolize to the path search. * configure.ac: AM_PROG_LIBTOOL to AC_PROG_LIBTOOL seems to make things happier 2005-02-03 Dave Beckett * configure.ac: In maintainer mode, stop if there is no flex. * configure.ac: In maintainer mode, stop if flex is too old or YACC is not GNU bison. * raptor_libxml.c: Use RAPTOR_LIBXML_XMLSAX2INTERNALSUBSET test for a function rather than HAVE_LIBXML_SAX2_H test for a header to work on OSX 10.3.x which has inconsistent system libxml shared library/headers. * configure.ac: Test for xmlSAX2InternalSubset so that it checks for the broken OSX 10.3.x libxml features in the shared library rather than the ones declared in the inconsistent header. 2005-02-02 Dave Beckett * raptor.rdf.in: Updates for schema * tests/Makefile.am (check-rdfxmla): rdfdiff should read $name-rdfxmla.rdf from builddir 2005-02-01 Dave Beckett * rdfdiff.c: C style Move more declarations to start of blocks. * rdfdiff.c (rdfdiff_free_file): Restore what I broke. * rdfdiff.c: C style Move more declarations to start of blocks. * raptor_xml_writer.c (raptor_xml_writer_end_element): Move int decl to start of block. * raptor_serialize_rdfxmla.c (raptor_unique_id): Terminate string right again after I broke it. * rdfdiff.c, raptor_serialize_rdfxmla.c: Casts for C++ * raptor_serialize_rdfxmla.c: C style (raptor_rdfxmla_emit_subject_list_items, raptor_rdfxmla_emit_subject_properties): Declare i at start of block. * rapper.1: rdfxml-abbrev * rdfdump.c: Widen help formatting for longer serializer name * raptor_xml_writer.c: Various C style fixes. Make an enum for raptor_xml_writer_flags. Added XML_WRITER_ prefixes to macro and defines. Moved spaces_buffer to module static. Noted struct nsd and namespaces sorting are duplicated code. Docucomments for several methods (not yet used by doc system) noting use of the flags. * Makefile.am: clean rdfdiff * Makefile.am: rdfdiff to EXTRA_PROGRAMS for now * Imported rdf/xml with abbreviations serializer 'rdfxml-abbrev' written by Steve Shepard . Steve's changes are as follows: * Makefile.am: Added dependencies for rdfdiff.c and raptor_serializer_rdfxmla.c * raptor.h: Added RAPTOR_FEATURE enums and api for new xml_writer features that support auto-indentation and auto-empty element detection. * raptor_feature.c: Added support for new xml_writer auto-indentation and auto-empty features. * raptor_general.c: Initialization of rdfxml-abbrev serializer. * raptor_internal.h: Prototype for void raptor_init_serializer_rdfxmla(void); * raptor_serialize_rdfxmla.c: New rdfxml raptor_serializer that handles some of the abbreviations specified by "RDF/XML Syntax Specification (Revised)." * rdfdiff.c: New tool to diff rdf files. * tests/Makefile.am: Added tests for rdfdiff and the rdfxml-abbrev serialization format. 2005-01-26 Dave Beckett * rapper.1: mention what RSS tag soup can do * turtle_parser.y, n3_parser.y: Rename raptor_new_triple/raptor_free_triple to have n3/turtle in the name. * raptor_internal.h, raptor_general.c, n3_parser.y, n3_lexer.l, n3_common.h, configure.ac, Makefile.am: Update Notation3 code with later Turtle improvements. Built it with maintainer mode only. * turtle_lexer.l (turtle_copy_token): Renamed from copy_token (turtle_copy_string_token): Renamed from copy_string_token. (main): filename moved here from global! 2005-01-24 Dave Beckett * raptor_rss.c (raptor_rss_emit_item): Do not emit an items property, that's only done by raptor_rss_emit_connection. 2005-01-22 Dave Beckett * raptor_rss.c: Added RSS1.1 namespace http://inamidst.com/rss1.1/ (raptor_rss_parser_processNode): Turn Channel into RSS type channel. (raptor_rss_emit_type_triple, raptor_rss_emit_enclosure, raptor_rss_emit_item, raptor_rss_emit_connection, raptor_rss_emit): Add error return value and stop if there is no identifier. (raptor_rss_emit): Stop if channel or any item has no identifier. (raptor_rss_parse_chunk): Pass on failures from above to user. (raptor_rss10_build_xml_names): Replace RSS1.1 namespace with RSS1.0 (raptor_rss10_emit_item): Add item_type arg and use it to only emit items for the channel. 2005-01-21 Dave Beckett * raptor.h: Added const to src arg of raptor_ntriples_string_as_utf8_string. * libraptor.3: Deprecate raptor_ntriples_string_as_utf8_string * raptor.h: Deprecate raptor_ntriples_string_as_utf8_string - rather too internal to be useful, since it only works with a parser. * ntriples_parse.c (raptor_ntriples_term_valid): Remove rdf_parser arg; only for a fatal error - just die. (raptor_ntriples_term): Make start a const arg. When copying UTF8 bytes, move on the correct number of bytes in src and dest. Update use of raptor_ntriples_term_valid. (raptor_ntriples_string_as_utf8_string, raptor_ntriples_parse_line): Update uses of raptor_ntriples_term_valid. 2005-01-17 Dave Beckett * raptor_general.c (raptor_statement_part_as_counted_string): Declare language_len to NULL, uri_string as unsigned char*. 2005-01-16 Dave Beckett * raptor_rss.c (raptor_rss10_emit_item): Copy original base_uri each time, a raptor_new_xml_element is made and don't lose the original reference. * raptor_xml_writer.c (main): Copy original base_uri each time, don't lose the original reference. 2005-01-15 Dave Beckett * raptor_general.c (raptor_statement_part_as_counted_string): Initialise language_len, uri_string used in some cases to prevent gcc warnings. * configure.ac, win32_raptor_config.h: Bumped version to 1.4.5 * Snapshotted raptor_1_4_4 for 1.4.4 release * raptor_rss.c (raptor_rss10_emit_item): Portability - declare rdf_Seq* variables at start of block. 2005-01-13 Dave Beckett * win32_raptor_config.h, win32/Makefile.am, win32/rapper.dsp, win32/raptor.dsp, win32/raptor.dsw, win32/raptortest.dsp: win32 build update (patch from Dave Viner) * win32_raptor_config.h: RAPTOR_INTERNAL should be defined in the build configuration 2005-01-12 Dave Beckett * raptor_rss.c: Recognise old RSS 0.9 namespace and handle it as rss 1.0. 2005-01-04 Dave Beckett * raptor_serialize.c: (raptor_rdfxml_serialize_start, raptor_rdfxml_serialize_statement): Only copy non-NULL base URIs * raptor_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_build_xml_names, raptor_rss10_emit_item):Handle predicates of type RAPTOR_IDENTIFIER_TYPE_RESOURCE as well as type RAPTOR_IDENTIFIER_TYPE_PREDICATE * raptor_general.c (raptor_free_statement): Free predicate URIs that were RAPTOR_IDENTIFIER_TYPE_RESOURCE * raptor_uri.c (raptor_uri_to_relative_counted_uri_string): Handle no path in base URI (main): Add test for that and test for no path in both. * raptor_uri.c (raptor_uri_to_relative_counted_uri_string): Handle no path in reference URI (main): Add test for that 2005-01-03 Dave Beckett * configure.ac, win32_raptor_config.h: Bumped version to 1.4.4 * Snapshotted raptor_1_4_3 for 1.4.3 release * raptor_rdfxml.c (raptor_xml_start_element_handler): Updates for unsigned char* string namespace URI strings. * raptor_namespace.c: Turn namespace URI string constants into unsigned char* strings. * raptor_identifier.c (raptor_identifier_print): Casts for printing rdf:XMLLiteral URI string constant. * raptor_general.c: Turn rdf:XMLLiteral URI string constant into a unsigned char* string. (raptor_print_statement, raptor_print_statement_part_as_ntriples): Casts for printing above constants. * raptor_uri.c (raptor_default_new_uri_for_rdf_concept): Use RDF namespace URI string constants. * Makefile.am: Link libraptor.la for URI tests, to get the namespace URI string constants. * raptor.h: Turn namespace URI string constants into unsigned char* strings. Change namespace URI defines into uses of the constants. * rdfdump.c (main): Init parser_feature and serializer_feature to -1 to avoid compiler warnings. * raptor_rss.c (raptor_rss10_serialize_statement): Init item to NULL to avoid a compiler warning. * rdfdump.c, raptor_uri.c, raptor_serialize.c, raptor_rss.c, raptor_parse.c: Casts for c++ * raptor.h: remove old comment re xml writer 2005-01-02 Dave Beckett * rdfdump.c: set serializer features before starting to serialize * rdfdump.c: Actually set parser feature values again. Set strings for parser or serializer string feature values. * raptor_general.c: 2005 copyrights * rapper.1: No simple output format anymore * rapper.1: Added RSS 1.0 ref 2005-01-01 Dave Beckett * rapper.1: Update for new parser, serializers, xmlns syntax * raptor_serialize.c (raptor_serializer_set_feature_string): Docs, and return values for integer value features (raptor_serializer_get_feature_string): Return a new string for the start uri if set. * raptor_parse.c (raptor_parser_set_feature_string): Docs, and return values for integer value features * libraptor.3, raptor.h: Added raptor_uri_to_counted_string and raptor_uri_to_string * raptor_uri.c (raptor_uri_to_counted_string,raptor_uri_to_string): Added. * libraptor.3: changelog edit - cluster 1.4.3 entries by class * libraptor.3: Added raptor_parser_get_feature_string, raptor_parser_set_feature_string, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string, raptor_feature_value_type, raptor_namespaces_find_namespace_by_uri * raptor_serialize.c, raptor_general.c: Use raptor_rdf_namespace_uri and raptor_rdf_namespace_uri_len to replace some constants. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Handle ordinal subject and objects. * raptor_serialize.c: Add XML Writer to raptor_rdfxml_serializer_context, delete depth. (raptor_rdfxml_serialize_init): Delete depth stuff. (raptor_rdfxml_serialize_terminate): Tidy up xml writer, namespaces and rdf:RDF element. (raptor_rdfxml_serialize_declare_namespace): Don't copy uri, prefixes since raptor_new_namesapce_from_uri copies them anyway. (raptor_rdfxml_serialize_start): Convert to use xml writer. (raptor_rdfxml_serialize_write_xml_attribute): Deleted. (raptor_rdfxml_serialize_statement, raptor_rdfxml_serialize_end): Convert to use xml writer. * raptor_xml_writer.c (raptor_xml_writer_empty_element): Ensure namespace declarations are removed at end of element. * raptor.h: Added raptor_namespaces_find_namespace_by_uri * raptor_namespace.c (raptor_namespaces_find_namespace_by_uri): Added. * libraptor.3, raptor_sax2.c, raptor_rss.c, raptor.h: raptor_xml_declare_namespace renamed to raptor_xml_element_declare_namespace * raptor_rss.c (raptor_rss10_build_xml_names): Use raptor_xml_declare_namespace * raptor_rss.c: (raptor_rss10_build_xml_names): Use raptor_xml_declare_namespace * raptor_sax2.c, raptor.h: raptor_sax2_declare_namespace renamed to raptor_xml_declare_namespace * raptor_serialize.c (raptor_new_serializer): Default to emitting relative URIs * raptor_serialize.c (raptor_rdfxml_serialize_ok_xml_name): Deleted. (raptor_rdfxml_serialize_statement): Replace use of raptor_rdfxml_serialize_ok_xml_name with raptor_xml_name_check for XML 1.0 names. * raptor_sax2.c, raptor_rdfxml.c, raptor.h, libraptor.3: Rename raptor_xml_element_get_element to raptor_xml_element_get_name * raptor_rss.c: Added rss:image and rss:textinput properties * raptor_rss.c (raptor_rss10_store_statement): Don't lose statements that are about a known type node, but of unknown predicate. (raptor_rss10_serialize_end): Add more debug info on remaining statements. * raptor_rdfxml.c (raptor_start_element_grammar): Update raptor_new_xml_writer call. * raptor.h: raptor_new_xml_writer gets nstack parameter. raptor_xml_writer_start_namespace_full deleted * libraptor.3: raptor_new_xml_writer gets nstack param. raptor_xml_writer_start_namespace_full gone * raptor_general.c (raptor_free_statement): Don't free null pointers. raptor-1.4.21/ChangeLog.70000644000175000017500000017366210614302607011764 000000000000002006-12-29 Dave Beckett * src/raptor_grddl.c: Add profile_transformation_uri and profile_uris list to grddl parser structure. (raptor_xslt_parse_init, raptor_xslt_parse_terminate): init/free the above fields. Add MATH_IS_VALUE_LIST and MATCH_IS_PROFILE flags to match_table. Comment out hard-coded embedded RDF, hCalendar xpaths. Added head profile xpath for profile URI resoltuion. (raptor_grddl_relay_triples): Look for matches in the list of profile_uris for getting XSLT uris. (typedef raptor_grddl_xml_parse_bytes_context): Renamed from raptor_grddl_parse_bytes_context. (raptor_grddl_uri_xml_parse_bytes): Renamed from raptor_grddl_uri_parse_bytes. (raptor_grddl_fetch_uri): Added to provide a single place to retrieve URIs in the GRDDL operation. Set a user agent, send accept header and handle no-net. (raptor_grddl_run_grddl_transform_uri): Use raptor_grddl_fetch_uri to retrieve the XSLT doc. (raptor_grddl_seen_uri): Do a check only, mark done in new function: (raptor_grddl_done_uri): Added. (raptor_grddl_parse_uri_write_bytes): Added for use by raptor_grddl_parse_chunk. (raptor_grddl_parse_chunk): Mark done when received is_end. Use profile_uris list to record root namespace as first item in list at index 0. Accept an XPath result of element and use its namespace name if seen, to allow an XPath matching the root element - not yet used. Update to use the match_table flags field. Handle MATCH_IS_PROFILE by storing in the profile_uris list, skipping the http://www.w3.org/2003/g/data-view profile URI. Do all recursive GRDDL in one place over all the profile_uris using raptor_grddl_fetch_uri. * src/raptor_www_curl.c: (raptor_www_curl_fetch): set proxy if www->proxy set 2006-12-28 Dave Beckett * utils/rapper.c: adjust whitespace so longer grddl description fits * src/raptor_grddl.c: grddl docs, description updates * src/Makefile.am, src/raptor_grddl.c (from /raptor/trunk/src/raptor_xslt.c:11760), src/raptor_xslt.c: Renameed raptor_xslt.c to raptor_grddl.c * src/raptor_xslt.c: Rename all functions / structures to be raptor_grddl / grddl not xslt. * src/raptor_xslt.c: update spec reference 2006-12-27 Dave Beckett * src/raptor_xslt.c: Track list of visited URIs across recursive GRDDL parsers (raptor_xslt_parse_init, raptor_xslt_parse_terminate): Share the list of visited uris, allocated/freed at depth 0 parser. (raptor_xslt_add_parent): Added to associate a parent with a child GRDDL parser and to all share the depth 0 parser's list of visited URIs. (raptor_xslt_relay_triples, raptor_xslt_ensure_internal_parser): Return failure code and prepare for alternative when this may not pass on all triples for namespace/profile GRDDL operations. (raptor_xslt_run_grddl_transform_doc): Handle error code from above. (raptor_xslt_seen_uri): Added to track URIs seen. (raptor_xslt_parse_chunk): Use seen URI tracking for initial document and recursive GRDDLs. * src/raptor_general.c: docs 2006-12-26 Dave Beckett * src/raptor_xslt.c: Add GRDDL looking up of root namespace URIs. (raptor_xslt_parse_init, raptor_xslt_parse_terminate): Init/free doc_transform_uris and namespace_transformation_uri. grddl_namespace_uris_ignore_list added with list of namespace URIs to never attempt to retrieve. (raptor_xslt_relay_triples): Added, to relay triples to user but look for data-view:namespaceTransformation triples (raptor_xslt_ensure_internal_parser): Added to init an internal parser if needed, reusing otherwise. Relay triples via raptor_xslt_relay_triples before sending to user handler. (raptor_xslt_run_grddl_transform_doc): Moved internal parser code to raptor_xslt_ensure_internal_parser. (raptor_xslt_parse_chunk): Get and store document root namespace URI and then use it if not ignored. Do not do transforms immediately but store in a sequence. Do a parse on the root namespace URI if present to look for transformation triples. Finally apply all transformation URIs seen in one go. * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Recognize RDF/XML in sample content by looking for the XML marking the RDF namespace declaration, the root element and likely attributes. * src/raptor_parse.c: (raptor_guess_parser_name): Mime type matches that are q<10 no longer return a match but use the q as score. Guessing then continues with the recognise_syntax factory method, if present. 2006-12-14 Dave Beckett * src/raptor_xslt.c: (raptor_xslt_parse_init, raptor_xslt_parse_start): Move xslt_parser->sax2 init from raptor_xslt_parse_start - running on every parse to raptor_xslt_parse_init - running once. * src/raptor_xslt.c: (raptor_xslt_parse_chunk): Free any previously used xpathObj before making a new one 2006-12-10 Dave Beckett * src/raptor_xslt.c: Previous changes did this: Fixes Issue#0000143 http://bugs.librdf.org/mantis/view.php?id=143 * src/raptor_xslt.c: struct raptor_xslt_parser_context_s gains raptor_sax2* sax2 field. (raptor_xslt_parse_terminate): Free sax2. (raptor_xslt_parse_start): Create a new sax2 structure and initialise it's locator and error handler params. (raptor_xslt_parse_chunk): Move error handler inits to raptor_xslt_parse_start and do it once. * src/raptor_parse.c: (raptor_parser_fatal_error_message_handler, raptor_parser_error_message_handler, raptor_parser_warning_message_handler): No need to protectb raptor_print_locator from NULL locator, it does that. * src/raptor_libxml.c: (raptor_libxml_update_document_locator, raptor_libxml_error_common): Protect from NULL locator. (raptor_libxml_init_generic_error_handlers): Altered to take an raptor_sax2* argument. * src/raptor_internal.h: raptor_libxml_init_generic_error_handlers altered to take an raptor_sax2* argument. 2006-12-07 Dave Beckett * src/raptor_parse.c: (raptor_parser_copy_user_state): Make a new copy of the shared generate id prefix string. Fixes Issue#0000141 http://bugs.librdf.org/mantis/view.php?id=141 * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Do not store an rdf:type predicate triple as the typed-node type unless the triple object is a URI. Fixes Issue#0000157 http://bugs.librdf.org/mantis/view.php?id=157 2006-12-06 Dave Beckett * src/raptor_turtle_writer.c: (raptor_turtle_writer_reference): Generate <> for the empty relative URI 2006-12-03 Dave Beckett * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Rename raptor_node to raptor_abbrev_node and raptor_subject to raptor_abbrev_subject and rename functions to match the pattern * src/raptor_turtle_writer.c: Use limits.h to get LONG_MAX * src/raptor_www_libxml.c: raptor_www_libxml_http_error prototype. * src/raptor_xslt.c: Store a single parser that could be of any name, not just 'rdfxml'. (raptor_xslt_parse_init): Do not init rdfxml parser here. 9raptor_xslt_parse_terminate): Free internal parser if present. (raptor_xslt_parse_start): Do not copy user state to internal parser here. (raptor_xslt_run_grddl_transform_doc): Delve into the XSL transformation results and try to interpret a mime type out of the output type (if present). Assume any XML mime type is actually RDF/XML and refuse to do recursive grddl guesses this way. Tidy up code to clean up error paths * src/raptor_www.c: (raptor_www_file_fetch): Return 200, 403 or 404 status codes and set failed flag. (raptor_www_fetch): Set failed flag if a status code was returned and the result was not 200. * src/raptor_xslt.c: (raptor_xslt_parse_chunk): Skip empty XSLT URIs in the list found. 2006-12-02 Dave Beckett * src/raptor_sax2.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Add new features to switch()s * src/raptor_abbrev.c: (raptor_new_node): init node always * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_blank): Do not double-encode blank node ids. Do not free a shared blank node string value. (raptor_rdfxmla_emit_subject): Do not double-encode blank node ids. Free only allocated attr_value. (raptor_rdfxmla_serialize_init): Ensure rdf_type is initialized. * src/raptor_turtle_writer.c: Remove // comments * src/raptor_serialize_turtle.c: deleting commented-out code * src/raptor_serialize_turtle.c: Code style, whitespace. * src/raptor.h, src/raptor_internal.h: Move turtle write functions into internal API for now * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_declare_namespace_from_namespace): Allow a default namespace to be handled when prefix is NULL. * src/raptor_turtle_writer.c: (raptor_turtle_writer_qname): Write a QName using Turtle's rules either prefix:local or :local which is not how raptor_iostream_write_qname() writes them for XML. * src/raptor_turtle_writer.c: (raptor_turtle_writer_namespace_prefix): Only emit a prefix if there is one. * src/raptor_serialize_turtle.c, docs/raptor-serializers.xml, docs/tmpl/section-general.sgml, configure.ac, src/Makefile.am, src/raptor.h, src/raptor_serialize.c, src/raptor_turtle_writer.c, tests/Makefile.am, tests/turtle/Makefile.am: Turtle serializer by Dave Robillard * src/raptor_xml_writer.c: docs * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_find_subject): Renamed from raptor_find_subject. (raptor_new_qname_from_resource): Remove link to rdfxml-abbrev serializer context and pass in namespaces stack parameters. (raptor_lookup_node): Renamed from raptor_rdfxmla_lookup_node (raptor_lookup_subject): Renamed from raptor_rdfxmla_lookup_subject. (raptor_find_subject): Renamed from raptor_rdfxmla_find_subject. * src/raptor_abbrev.c: Re order functions * src/Makefile.am, src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c: (raptor_new_qname_from_resource, raptor_new_node, raptor_free_node, raptor_node_equals, raptor_node_matches, raptor_new_subject, raptor_free_subject, raptor_subject_add_property, raptor_subject_add_list_element, raptor_rdfxmla_lookup_node, raptor_rdfxmla_find_subject, raptor_rdfxmla_lookup_subject): Move common abbreviated serializer code from raptor_serialize_rdfxmla.c to raptor_abbrev.c * src/raptor_serialize_dot.c: gratuitous whitespace schanges * docs/tmpl/section-feature.sgml: New DOT features * src/raptor_turtle_writer.c copied from /raptor/trunk/src/raptor_xml_writer.c:11666: copy for turtle writing 2006-11-26 Dave Beckett * src/raptor_uri.c: (raptor_uri_filename_to_uri_string): Dynamically allocate the path buffer and realloc it if it's too small. This helps Hurd which does not handle PATH_MAX like linux/unix. * docs/raptor-serializers.xml, src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_serialize_dot.c: Import updated DOT serializer. Renamed features to remove _color/_COLOR from end of name. Added feature descriptions * src/raptor_serialize_dot.c: alter label * src/Makefile.am, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_dot.c: Add DOT serializer * configure.ac: libxml minimum version is now 2.6.8 since 2.6.7 crashes on PPC64 Linux. 2.6.8 was released March 2004 so this should be no burden. 2006-11-20 Dave Beckett * raptor.rdf.in: Update description and for SVN repository. 2006-11-19 Dave Beckett * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.5.0 2006-10-22 Dave Beckett * Snapshotted raptor_1_4_13 for 1.4.13 release (SVN r11540) * src/raptor_rss.c: (raptor_rss_end_element_handler): Only declare name when debugging. * src/win32_raptor_config.h: Update defines: HAVE_XMLSAX2INTERNALSUBSET replaces RAPTOR_LIBXML_XMLSAX2INTERNALSUBSET Added HAVE_XMLCTXTUSEOPTIONS Deleted RAPTOR_LIBXML_XMLUSENEWPARSER * src/raptor_xslt.c: (raptor_xslt_uri_parse_bytes): Use #ifdef HAVE_XMLCTXTUSEOPTIONS to protect call to xmlCtxtUseOptions * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Use #ifdef HAVE_XMLCTXTUSEOPTIONS to protect call to xmlCtxtUseOptions * src/raptor_libxml.c: #ifdef HAVE_XMLSAX2INTERNALSUBSET replaces RAPTOR_LIBXML_XMLSAX2INTERNALSUBSET * configure.ac: Remove unused check for xmlUseNewParser (defining RAPTOR_LIBXML_XMLUSENEWPARSER) Use AC_CHECK_FUNCS to check for new xmlCtxtUseOptions and existing xmlSAX2InternalSubset 2006-10-21 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Throw an error and skip triple if cannot make URI from a predicate. 2006-10-13 Dave Beckett * src/raptor_uri.c: (raptor_uri_to_relative_counted_uri_string): Check for equal scheme and authority correctly. Fixes Issue #0000134 http://bugs.librdf.org/mantis/view.php?id=134 * src/raptor_uri.c: (main): Test for bug 134 2006-10-09 Dave Beckett * src/raptor_parse.c: (raptor_set_default_generate_id_parameters) autodocs 2006-10-08 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_start) Free any existing xml_writer before making a new one. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_start) Free any existing xml_writer before making a new one. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_end): Free any existing xml_writer before making a new one. 2006-10-05 Dave Beckett * configure.ac: Found more -W flags. * utils/rdfdiff.c: cast * src/raptor_set.c: const * configure.ac: In maintainer mode, add all the supported -W options to the MAINTAINER_CFLAGS * utils/rapper.c: Cast for signed/unsigned comparison * src/raptor_libxml.c: redundant decl * utils/rapper.c: Cast for unsigned vs signed int use of raptor_get_feature_count() * src/n3_common.h, src/n3_lexer.l, src/n3_parser.y, src/raptor_libxml.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/turtle_common.h, src/turtle_lexer.l, src/turtle_parser.y: Make internal error/warning/vargs functions use RAPTOR_PRINTF_FORMAT and fix a few bad uses of args * src/raptor_parse.c: (raptor_syntaxes_enumerate): Discard test for unsigned int < 0. (raptor_parse_uri_no_net_filter); Fix raptor_parser_error format arg. * src/raptor_serialize.c: (raptor_serializers_init): Declare new style void. (raptor_serializers_enumerate): Discard test for unsigned int < 0. * src/ntriples_parse.c: (raptor_ntriples_term): Cast for raptor_parser_error arg. * src/raptor_internal.h: Declare many error/warning/*varargs prototypes with RAPTOR_PRINTF_FORMAT that they take a printf-style format argument. * src/raptor.h: Added RAPTOR_PRINTF_FORMAT to allow declaring of functions with a printf-style format argument. Declare raptor_vsnprintf using it. * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_xml.c: Turn content_cdata into using raptor_stringbuffer so that it does a lot less copying (strncpy) when joining literals 2006-10-03 Dave Beckett * examples/Makefile.am: Fix AM_* flags 2006-10-02 Dave Beckett * docs/raptor-tutorial-serializing.xml: typo raptor_serializer_set_namespace => raptor_serialize_set_namespace * docs/raptor-tutorial-serializing.xml: Add single triple serializing example rdfserialize.c * docs/Makefile.am: Add rdfserialize.c * examples/rdfserialize.c: tidy * examples/Makefile.am: Added rdfserialize example. * examples/rdfserialize.c: rdfserialize.c: serialize 1 triple to RDF/XML-Abbrev 2006-09-24 Dave Beckett * src/raptor_xslt.c: (raptor_xslt_uri_parse_bytes): Only use XML_PARSE_NONET if defined. * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Use XML_PARSE_NONET only if defined. 2006-09-17 Dave Beckett * utils/Makefile.am: (AM_CFLAGS, AM_CPPFLAGS): Remove duplication of @CFLAGS@, @CPPFLAGS@ * src/Makefile.am: (AM_CFLAGS): Remove duplication of @CFLAGS@ 2006-09-08 Dave Beckett * configure.ac: Allow LEX to be set to things that aren't exactly 'flex' 2006-08-27 Dave Beckett * NEWS.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.13 * Snapshotted raptor_1_4_12 for 1.4.12 release (SVN r11256) * docs/libraptor.3: 1.4.12 no API changes * src/raptor_serialize.c: (raptor_serializers_init): Restore order from 1.4.10 * src/raptor_serialize_rdfxmla.c: (raptor_init_serializer_rdfxmla): Restore order from 1.4.10 2006-08-26 Dave Beckett * src/win32_raptor_config.h, configure.ac, NEWS.html: Bumped version to 1.4.12 * Snapshotted raptor_1_4_11 for 1.4.11 release (SVN r11244) * src/raptor_parse.c: (raptor_start_parse): Throw an error if no base URI is given and it is needed. * src/raptor_sax2.c: (raptor_sax2_parse_start): Free any existing base URI before assigning a new one. * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Use raptor_new_uri since base_uri is never used, and all the URIs are absolute. * docs/tmpl/section-feature.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-unicode.sgml: Updated templates for 1.4.11 * src/raptor_parse.c: (raptor_start_parse): Return failure if need a base URI and none was given. 2006-08-23 Dave Beckett * src/raptor.h: Add RAPTOR_API before raptor_namespaces_qname_from_uri to export it properly for windows. Fixes Issue #0000112 http://bugs.librdf.org/mantis/view.php?id=112 * src/raptor_rss.c: Use raptor_strcasecmp. Fixes Issue #0000110 http://bugs.librdf.org/mantis/view.php?id=110 2006-08-22 Dave Beckett * docs/libraptor.3: Updates for 1.4.11 2006-08-21 Dave Beckett * docs/raptor-sections.txt: Added raptor_get_feature_count and raptor_get_need_base_uri * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_xslt.c, src/turtle_parser.y: Added raptor_get_need_base_uri to return new field need_base_uri_flag in raptor_parser_factory that is set by all parsers now 2006-08-20 Dave Beckett * utils/rapper.c: Use raptor_get_feature_count and add raptor_finish() before all exits. * src/raptor.h: Added raptor_get_feature_count prototype * src/raptor_feature.c: (raptor_get_feature_count): Added * src/raptor_serialize.c: Turn serializers into a raptor_sequence (raptor_free_serializer_factory): Added. (raptor_serializers_init): Init sequence, reverse order so N-Triples remains first. (raptor_serializers_finish): Free with raptor_free_sequence (raptor_serializer_register_factory, raptor_get_serializer_factory, raptor_serializers_enumerate): Update to use sequence. * src/raptor_parse.c: Turn parsers into a raptor_sequence (raptor_free_parser_factory): Added. (raptor_parsers_init): Init sequence, reverse order so RDF/XML remains first. (raptor_parsers_finish): Free with raptor_free_sequence (raptor_parser_register_factory, raptor_parser_factory_add_alias, raptor_get_parser_factory, raptor_syntaxes_enumerate, raptor_guess_parser_name): Update to use sequence. (main): Added test for raptor_parser_get_accept_header_all * src/raptor_internal.h: Added prototypes for raptor_parsers_init, raptor_serializers_init, raptor_parsers_finish and raptor_serializers_finish. Rename raptor_init/finish_sax2 to raptor_sax2_init/finish * src/raptor_sax2.c: (raptor_sax2_init): Renamed from raptor_init_sax2 (raptor_sax2_finish): Renamed from raptor_finish_sax2 * src/raptor_general.c: (raptor_init): Call raptor_parsers_init and raptor_serializers_init. (raptor_finish): Call raptor_parsers_finish and raptor_serializers_finish. * src/raptor_serialize.c: (raptor_serializers_init): Added. (raptor_serializers_finish): Renamed from raptor_delete_serializer_factories * src/raptor_parse.c: (raptor_parsers_init): Added. (raptor_parsers_finish): Renamed from raptor_delete_parser_factories (raptor_parser_register_factory): Delete mime_type and uri_string args. (raptor_parser_factory_add_uri): Added for registering a URI * src/n3_parser.y, src/ntriples_parse.c, src/raptor_guess.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_xslt.c, src/turtle_parser.y: Remove mime_type and uri args from raptor_parser_register_factory * src/n3_parser.y, src/ntriples_parse.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_xslt.c, src/turtle_parser.y: (raptor_parser_register_factory): Remove mime type arg, nothing uses it now * src/ntriples_parse.c: (raptor_ntriples_parse_chunk): Make junk at end of input errro return from the function as a failure. * src/turtle_parser.y: Remove %destructor tidy for PREFIX * src/n3_parser.y: Remove %destructor tidy for PREFIX * src/n3_parser.y: Add %destructor to tidy up tokens when doing error recovery. (directive): Hack to stop Bison moaning about not using $1 * src/turtle_parser.y: Add %destructor to tidy up tokens when doing error recovery. (directive): Hack to stop Bison moaning about not using $1 * src/n3_parser.y: Added labels for tokens to enable better error messages. * src/turtle_parser.y: Added labels for tokens to enable better error messages. * autogen.sh: Track where programs are discovered. * src/raptor_parse.c: (raptor_parse_uri_with_connection, raptor_set_feature, raptor_get_feature, raptor_set_parser_strict): Update to use array of features throughout. (raptor_parser_copy_user_state): Copy all features when copying state. * src/raptor_xslt.c: (raptor_xslt_uri_parse_bytes, raptor_xslt_run_grddl_transform_uri): Update to use array of features. * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_handler, raptor_rdfxml_parse_start, raptor_rdfxml_generate_statement, raptor_rdfxml_process_property_attributes, raptor_rdfxml_start_element_grammar, raptor_rdfxml_end_element_grammar, raptor_rdfxml_cdata_grammar, raptor_rdfxml_record_ID): Update to use array of features throughout. * src/raptor_rss.c: (raptor_rss_parse_start): Update to use array of features. * src/raptor_guess.c: (raptor_guess_parse_chunk): Use raptor_parser_copy_user_state to copy over pointers and feature flags to the inner parser. * src/raptor_internal.h: struct raptor_parser_s - replace individual feature fields with an array. * src/raptor_parse.c: Removed static raptor_get_parser_factory prototype * src/raptor_internal.h: Added raptor_get_parser_factory * src/raptor_parse.c: (raptor_get_parser_factory): Now internal not static * configure.ac: flex check - warn before failing * src/raptor_xslt.c: comma chameleon * configure.ac: recommend flex 2.5.33 * configure.ac: Update to point at main flex site whichq finally gets 2.5.33 after 9 years * src/raptor_guess.c: Rework to call an internal use of a parser rather than "exec"ing into the guessed parser. Fixes Issue#0000091 http://bugs.librdf.org/mantis/view.php?id=91 * src/raptor_parse.c: (raptor_parser_exec): Deleted * src/raptor_internal.h: Delete raptor_parser_exec * src/raptor_xslt.c: Disable dc-extract.xsl 2006-08-19 Dave Beckett * RELEASE.html: Updated for 1.4.11 * docs/raptor-docs.xml: Added raptor-parsers.xml and raptor-serializers.xml * docs/Makefile.am: Added raptor-parsers.xml and raptor-serializers.xml * docs/raptor-parsers.xml, docs/raptor-serializers.xml: Added list of parsers and serializers * docs/tmpl/section-parser.sgml: Updated * docs/tmpl/section-www.sgml: Updated * docs/tmpl/section-feature.sgml: Updated * docs/libraptor.3: Rename raptor_uri_filter_func * docs/raptor-docs.xml: tweak title * docs/raptor-tutorial-parsing.xml: params * docs/raptor-sections.txt: Rename raptor_uri_filter_func * utils/rapper.c: Allow --show-namespaces to print to stderr while relaying them to the serializer. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_declare_namespace_from_namespace): Don't declared multiple prefixes for the same namespace URI. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_declare_namespace_from_namespace): Don't declared multiple prefixes for the same namespace URI. * docs/raptor-tutorial-parsing.xml: Update for uri filter arg change * src/raptor_parse.c: Renamed raptor_www_uri_filter_func uri_filter to raptor_uri_filter_func uri_filter and removed raptor_www* arg to the filter function. * src/raptor.h: Renamed raptor_www_uri_filter_func uri_filter to raptor_uri_filter_func uri_filter and removed raptor_www* arg to the filter function. * src/raptor_www.c: Renamed raptor_www_uri_filter_func uri_filter to raptor_uri_filter_func uri_filter and removed raptor_www* arg to the filter function. * src/raptor_internal.h: Renamed raptor_www_uri_filter_func uri_filter to raptor_uri_filter_func uri_filter and removed raptor_www* arg to the filter function. * src/raptor_xslt.c: (raptor_xslt_uri_parse_bytes): Take in a small structure to get the raptor_parser* pointer as well as the libxml parser context. Use it to pass on the nonet option to libxml if it is set. (raptor_xslt_run_grddl_transform_uri): Use new struct. * src/raptor_rss.c: (raptor_rss_parse_start): Pass on raptor_parser feature no_net to raptor_sax2. * src/raptor_rdfxml.c: (raptor_rdfxml_parse_init): Do feature related initialising at the start of every parse, not once for all rdf/xml parser instances. (raptor_rdfxml_parse_start): Init feature_normalize_language and feature_no_net here. * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Set libxml option XML_PARSE_NONET if sax2 feature RAPTOR_FEATURE_NO_NET is set. (raptor_sax2_set_feature): Handle RAPTOR_FEATURE_NO_NET. * src/raptor_internal.h: raptor_sax2 gains feature_no_net * docs/raptor-tutorial-parsing.xml: Add parser URI filtering examples to tutorial * docs/libraptor.3: Updated for 1.4.11 * utils/rapper.c: Reorder help message. Use triples in messages and fix that plurals thing. 2006-08-18 Dave Beckett * docs/raptor-tutorial-serializing.xml: Add IDs to examples * docs/raptor-tutorial-parsing.xml: Add IDs to examples * docs/raptor-tutorial-querying-functionality.xml: Make it xml * src/raptor_sax2.c: Added autodocs for raptor_xml_element_is_empty * docs/raptor-sections.txt: Add raptor_parser_set_uri_filter, raptor_www_set_uri_filter and raptor_www_uri_filter_func * docs/raptor-tutorial-querying-functionality.xml: Fix example, add ID * src/raptor.h: Document RAPTOR_FEATURE_NO_NET * src/raptor_parse.c: (main): Print all features for a parser, don't stop at first non parser feature. * src/raptor_xslt.c: (raptor_xslt_run_grddl_transform_uri): Set URI filter or if feature NO_NET is set, raptor_parse_uri_no_net_filter * src/raptor_xml_writer.c: Add RAPTOR_FEATURE_NO_NET to switches * src/raptor_sax2.c: Add RAPTOR_FEATURE_NO_NET to switches * src/raptor_serialize.c: Add RAPTOR_FEATURE_NO_NET to switches * src/raptor_parse.c: (raptor_parse_uri_no_net_filter): Added to use in parsers to deny network fetches when feature NO_NET is in action. (raptor_parse_uri_with_connection): Set URI filter or if feature NO_NET is set, raptor_parse_uri_no_net_filter (raptor_parser_set_uri_filter): Added. (raptor_set_feature, raptor_get_feature): Handle RAPTOR_FEATURE_NO_NET. (raptor_parser_copy_user_state): Copy uri filter fields. * src/raptor_www.c: (raptor_www_set_uri_filter): Added to add a filter function to check a URI before it is resolved. (raptor_www_fetch): call URI filter function before resolving. * src/raptor_feature.c: Added RAPTOR_FEATURE_NO_NET to deny network requests, primarily in parsing. * src/raptor_internal.h: Add feature_no_net Added raptor_parse_uri_no_net_filter prototype raptor_parser and raptor_www gain fields uri_filter_user_data and raptor_www_uri_filter_func uri_filter * src/raptor.h: Added RAPTOR_FEATURE_NO_NET Added raptor_www_uri_filter_func filter. Added raptor_parser_set_uri_filter prototype. Added raptor_www_set_uri_filter * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Make sure the allocated URI is always freed. * configure.ac: Strip more -O flags from incoming CFLAGS, CXXFLAGS and CPPFLAGS. * configure.ac: Patch configure.ac to remove un-necessary tests for C++ or F77++ compilers that libtool stupidly insists on 2006-08-14 Dave Beckett * src/raptor_serialize_rdfxmla.c: Replace reference counting with counting blank/resource nodes used as subjects and objects to prevent dual-triple generation. Fixes Issue#0000014 http://bugs.librdf.org/mantis/view.php?id=14 Add function documentation and tidy code style. * src/n3_parser.y: (raptor_n3_parse_start): Enforce that a base URI is required. * src/turtle_parser.y: (raptor_turtle_parse_start): Enforce that a base URI is required. 2006-07-30 Dave Beckett * src/raptor_xslt.c: Allow GRDDL value to be a space-separated list of URIs, so now can support dataview:transformation in XML taking a list of transformations as defined in http://www.w3.org/2004/01/rdxh/spec#grddl-xhtml (raptor_xslt_parse_chunk): Split the value into a list of XSLT URIs and use each of them on the document. Fixes Issue #0000041 http://bugs.librdf.org/mantis/view.php?id=41 * src/raptor_xslt.c: Added a table of xpaths and optional XSLT URIs to use, which allows non-GRDDL to be given as long as XML/XHTML is recognised and the XSLT sheet does the transformation work. Added transform pointers for DC , Embedded RDF and HCalendar (raptor_xslt_run_grddl_transform_doc, raptor_xslt_run_grddl_transform_uri): Added, pulled out of raptor_xslt_parse_chunk which was too long. (raptor_xslt_parse_chunk): Much smaller and tidied error messages. Use the given XSLT URI to do a transform if it exists rather than the node value(s) as URIs for multiple transforms. * configure.ac: Remove libwww support * src/raptor_internal.h, src/raptor_www.c, src/raptor_www_libwww.c: Remove libwww support 2006-07-16 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_build_items): Recognize ordinals also by their URI, not just from the deprecated ORDINAL special type - this makes RSS 1.0 serializing work again. Based on patch from Shin-ichi Hirata. 2006-07-15 Dave Beckett * NEWS.html, configure.ac, src/win32_raptor_config.h: Bumped versions to 1.4.11 2006-07-14 Dave Beckett * Snapshotted raptor_1_4_10 for 1.4.10 release (SVN r11070) 2006-07-04 Dave Beckett * raptor.pc.in, src/raptor-config.in: Remove @LDFLAGS from raptor.pc.in and src/raptor-config.in. Fixes Issue#0000097 http://bugs.librdf.org/mantis/view.php?id=97 2006-06-26 Dave Beckett * src/raptor.h: (raptor_identifier_type): no more RAPTOR_IDENTIFIER_TYPE_ORDINAL generated. * src/n3_parser.y: Remove duplicate symbol PREFIX. (raptor_n3_generate_statement): Do not turn a rdf:_n into an ordinal but just check it for validity. * src/turtle_parser.y: Remove duplicate symbol PREFIX. (raptor_turtle_generate_statement): Do not turn a rdf:_n predicate into an ordinal but just check it for validity. * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Do not turn a rdf:_n predicate into an ordinal but just check it for validity. * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Turn a predicate ordinal into a resource using raptor_new_uri_from_rdf_ordinal Handle reifying this afterwards. * src/raptor_general.c: (raptor_statement_copy): Turn a subject, predicate or object ordinal into a resource using raptor_new_uri_from_rdf_ordinal * src/raptor_internal.h: Added raptor_new_uri_from_rdf_ordinal prototype. * src/raptor_uri.c: (raptor_new_uri_from_rdf_ordinal): Added - internal. 2006-06-25 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Add predicate_ordinal field, for now. Fix up calls to this to use it. 2006-06-07 Dave Beckett * src/raptor_rss.c: (raptor_rss_parse_chunk): Return 0 on success 2006-05-07 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_comment_handler): Do nothing when a comment is given outside an xml_element context. * src/raptor_rss.c: (raptor_rss_parse_chunk, raptor_rss_parse_terminate): Make triples appear at end of parsing, not on parser destruction which was terribly wrong. (raptor_rss_comment_handler): Do nothing when a comment is given outside an xml_element context. 2006-05-02 Dave Beckett * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_start): Reset "written header" flag. Without this, reusing a serializer dies. 2006-04-30 Dave Beckett * docs/libraptor.3: Updated for some final 1.4.9 changes 2006-04-22 Dave Beckett * src/raptor_guess.c: (raptor_guess_parse_chunk): Tired of seeing guess parser name, move to verbose debugging. * src/raptor_www.c: (raptor_www_set_http_accept): Tired of seeing accept headers, move to verbose debugging. * src/raptor_xml_writer.c: (main): Rewrite to remove warning punning * src/raptor_www_test.c: (main): Rewrite to remove warning punning * src/raptor_uri.c: (raptor_uri_uri_string_to_filename_fragment): Rewrite to remove warning punning * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Init element to NULL * src/raptor_rss.c: (raptor_rss_end_element_handler): Init cdata_len to 0 * configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.10 * Snapshotted raptor_1_4_9 for 1.4.9 release (SVN r10822) * src/raptor_rdfxml.c: (raptor_rdfxml_sax2_new_namespace_handler): Move var def to start of block. * src/raptor_parse.c: (raptor_parse_uri_with_connection): Move var def to start of block. 2006-04-20 Dave Beckett * examples/Makefile.am, examples/rdfcat.c, examples/rdfprint.c: Add tutorial examples rdfcat.c and rdfprint.c here. * docs: DocBook updates: new Tutorial chapter on serializing plus completing of parsing chapter. * src/raptor_uri.c: Change all calloc/mallocs for URI strings to add enough room for a full pointer at the end of a URI string to stop valgrind moans on 64bit systems when they are looking for the end of string NUL. 2006-04-15 Dave Beckett * src/raptor_www_curl.c: Delete alternate path using CURLINFO_CONTENT_TYPE instead of grepping headers. * src/raptor_www_curl.c: Add alternate path to use CURLINFO_CONTENT_TYPE instead of grepping headers. Downside is that the content type appears long after content. Add more debug messages when RAPTOR_DEBUG > 2 (raptor_www_curl_init): Tidy alternate defines * src/raptor_internal.h: Deleted raptor_uri_init_default_handler prototype. * src/raptor_uri.c: (raptor_uri_set_handler, raptor_new_iostream_from_handler): Ajusted to take const handler args. (raptor_uri_init_default_handler): Deleted. (raptor_uri_init): No need to init static struct. * src/raptor.h: Adjust raptor_uri_set_handler and raptor_new_iostream_from_handler prototypes to take const handler args. * src/raptor_rss.c: make raptor_rss_uplift_map const * src/raptor_iostream.c: make handler field a const (raptor_new_iostream_from_handler): Take a const handler. 2006-04-14 Dave Beckett * tests/all-escape.nt, tests/all-escape.rdf: All 0-7F ascii escapes and the XML 1.1 output 2006-04-11 Dave Beckett * docs: DocBook updates 2006-04-10 Dave Beckett * docs: DocBook updates: Tutorial introduction, parsing. 2006-04-09 Dave Beckett * docs: DocBook updates * src/raptor_xml.c: (raptor_xml_element_declare_namespace): Add int return value for when a namespace is failed to be declared, when it is already there. * src/raptor.h: raptor_xml_element_declare_namespace now has an int return value 2006-04-07 Dave Beckett * src/raptor_xslt.c: (raptor_xslt_parse_chunk): Added debug statement. 2006-04-03 Dave Beckett * tests/turtle/manifest.ttl: Added test-25 * tests/turtle/Makefile.am, tests/turtle/test-25.out, tests/turtle/test-25.ttl: Added comment test 2006-04-01 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element_handler): Tidying of logic near type attribute * src/raptor_rss.c: (raptor_rss_start_element_handler): More atom/old atom/rss guessing. Look for type=xml and an XML mime type to trigger xml writer Look for attribute version on feed to ensure old atom is found * src/raptor_rss.c: (raptor_init_parser_rss): Add another mime type possibility. * src/raptor_rss.c: Add is_atom field to rss_parser structure. (raptor_rss_start_element_handler): Use elements seen to pick is_atom flag. Use is_atom flag to switch between rss author and atom author handling. * src/raptor_rss.c: (raptor_init_parser_rss): Add more unregistered rss mime type possibilities. * src/raptor_guess.c: (raptor_guess_parse_content_type_handler): Strip ';' onwards from content type for guessing. * src/raptor_rss.c: (raptor_rss_parse_recognise_syntax): Use xml in mime type guess * src/raptor_parse.c: (raptor_parser_get_accept_header, raptor_parser_get_accept_header_all): Do not format with ;q=1.0 * src/turtle_parser.y: (raptor_init_parser_turtle): Register application/x-turtle once only. * src/raptor_parse.c: (raptor_guess_parser_name, raptor_parser_get_accept_header, raptor_parser_get_accept_header_all): Fix type_q list walking to detect end of loops vs early exit properly. * src/turtle_parser.y: (raptor_init_parser_turtle): Register N3 mime types here with lower Q, if no N3 parser is present. * src/n3_parser.y: (raptor_init_parser_n3): Add another N3 mime type possibility. * src/raptor_parse.c: (raptor_guess_parser_name): Fix i/j problem. * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Handle atom:summary XML content * configure.ac: No longer require libxml for rss-tag-soup parser. * src/raptor_serialize_rss.c: casts * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Switch to using raptor_sax2 API from xmlReader, and now can do atom type 'xhtml' content using raptor_xml_writer. * src/raptor.h: Add prototype for raptor_xml_element_is_empty * src/raptor_rdfxml.c: (raptor_rdfxml_characters_handler, raptor_rdfxml_cdata_handler, raptor_rdfxml_comment_handler): Add xml_element parameter. * src/raptor_sax2.c: (raptor_xml_element_is_empty): Added. (raptor_sax2_characters_handler, raptor_sax2_cdata_handler, raptor_sax2_comment_handler): Add xml_element parameter. * src/raptor_internal.h: Add xml_element field to raptor_sax2_characters_handler, raptor_sax2_cdata_handler and raptor_sax2_comment_handler 2006-03-30 Dave Beckett * src/raptor_rdfxml.c: update function names in fatal/debug messages * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_handler): Tidy tests for looking for an empty element. * src/raptor_internal.h: raptor_xml_element gains a user_data field 2006-03-29 Dave Beckett * src/raptor_rss.c: Replace raptor_rss_parser_context* with raptor_rss_parser* 2006-03-27 Dave Beckett * src/win32_raptor_config.h: raptor win32 build files update from John Barstow * win32/rapper.vcproj, win32/raptor.sln, win32/raptor.vcproj: raptor win32 build files update from John Barstow * docs/tmpl/section-parser.sgml: docs update * docs/raptor-overrides.txt: Do not override raptor_statement * docs/tmpl/section-unused.sgml: RAPTOR_DEPRECATED 2006-03-26 Dave Beckett * docs/raptor-sections.txt: Added raptor_parser_get_accept_header * src/raptor_parse.c: (raptor_parser_get_accept_header): fix q format * src/n3_parser.y: (raptor_init_parser_n3): Register n3 mime type * src/turtle_parser.y: (raptor_init_parser_turtle): Register turtle experimental mime types * src/raptor_xslt.c: (raptor_init_parser_grddl): Register HTML and XHTML mime types at low q. * src/raptor_rdfxml.c: (raptor_init_parser_rdfxml): Register rdf/xml and older mozilla-era mime type. * src/raptor_www.c: (raptor_www_set_http_accept): debug message * src/raptor_rss.c: (raptor_rss_parse_recognise_syntax): look in mime type for rss or atom. (raptor_init_parser_rss): Register two rss mime types. * src/raptor_guess.c: (raptor_guess_accept_header): Added (raptor_guess_parser_register_factory): Use raptor_guess_accept_header to accept all known types. * src/raptor.h: Added prototype for raptor_parser_get_accept_header * src/raptor_parse.c: (raptor_delete_parser_factories): Delete new mime_types list. (raptor_parser_register_factory): Use raptor_parser_factory_add_mime_type. (raptor_free_type_q): Added. (raptor_parser_factory_add_mime_type): Added. (raptor_syntaxes_enumerate): Use mime types from sequence to return first as primary. (raptor_parse_uri_with_connection): Use raptor_parser_get_accept_header to do the work. (raptor_get_mime_type): Use mime_type sequence in factory to return first mime type if registered. (raptor_guess_parser_name): Use mime types from sequence to find them. (raptor_parser_get_accept_header): Added (raptor_parser_get_accept_header_all): Added to return an accept header for all types * src/raptor_internal.h: Added raptor_type_q for storing mime type+Q values. raptor_parser_factory gains raptor_sequence* mime_types replacing a single mime_type const char* and an accept_header method to return the Accept: header rather than use it from the mime_types list. Added prototypes, for raptor_parser_factory_add_mime_type, raptor_free_type_q and raptor_parse_get_all_accept_headers * src/raptor_www_curl.c: (raptor_www_curl_fetch): Get the curl status into a long, not an int which causes failure on 64 bit archs. Fixes issue#0000075 http://bugs.librdf.org/mantis/view.php?id=75 * src/raptor_internal.h: (struct raptor_www_s): Removed CURLcode status 2006-03-20 Dave Beckett * docs/raptor-chapter-intro.xml: docs 2006-03-19 Dave Beckett * docs/raptor-chapter-intro.xml: docs * docs/raptor-docs.xml: Added raptor-chapter-intro.xml * docs/Makefile.am: Added raptor-chapter-intro.xml * docs/raptor-chapter-intro.xml: intro * Makefile.am: deleted obsolete deb rule * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Add foaf and doap to suffixes that are likely RDF/XML * gtkdoc-mkdb reports "100% symbol docs coverage" * docs/raptor-overrides.txt: Override internal struct names. * src/raptor.h, src/raptor_general.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_xml.c, src/raptor_xml_writer.c: autodocs 2006-03-18 Dave Beckett * src/raptor_utf8.c, docs/tmpl/section-uri.sgml, docs/tmpl/section-xml-namespace.sgml, docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-unicode.sgml: autodocs * src/raptor_utf8.c: (raptor_unicode_char_to_utf8): Add docs. (raptor_utf8_to_unicode_char): Add docs. Now also checks for overlong UTF-8 sequences, illegal code positions or out of range codes. * docs/raptor-sections.txt: Added new functions * src/turtle_parser.y: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/raptor_rss.c: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/raptor_rdfxml.c: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/ntriples_parse.c: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/n3_parser.y: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/raptor_uri.c: (raptor_new_uri): Fail on NULL or empty uri_string. (raptor_new_uri_from_uri_local_name): Fail on NULL uri or local_name (raptor_new_uri_relative_to_base): Fail on NULL base_uri or uri_string (raptor_new_uri_from_id): Fail on NULL base_uri or id. (raptor_new_uri_for_rdf_concept): Fail on NULL name. (raptor_uri_copy): Fail on NULL uri. (raptor_uri_as_string): Fail on NULL uri. (raptor_uri_as_counted_string): Fail on NULL uri. (raptor_uri_filename_to_uri_string): : Fail on NULL filename. (raptor_uri_uri_string_to_filename_fragment): Fail on NULL or empty uri_string. (raptor_uri_uri_string_is_file_uri): Fail on NULL or empty uri_string. (raptor_new_uri_for_xmlbase): Fail on NULL uri. (raptor_new_uri_for_retrieval): Fail on NULL uri. (raptor_uri_to_relative_counted_uri_string): Fail on NULL reference_uri. Document allowing NULL base_uri. (raptor_uri_print): Print "(NULL URI)" for NULL URI. (raptor_uri_to_counted_string): Fail on NULL uri. * src/raptor_rdfxml.c: More raptor_* to raptor_rdfxml_* renames * src/raptor_internal.h: Delete prototypes for functions only used in rdfxml * src/raptor_qname.c: Return const namespace from raptor_qname_get_namespace * src/raptor.h: Return const namespace from raptor_qname_get_namespace * src/raptor_rdfxml.c: (raptor_rdfxml_record_ID): Renamed from raptor_record_ID (raptor_rdfxml_inscope_base_uri): Renamed from raptor_inscope_base_uri and now static (raptor_inscope_xml_language): Deleted, replaced with 1 call to raptor_sax2_inscope_xml_language * src/raptor_rdfxml.c: raptor_element to raptor_rdfxml_element renames 2006-03-15 Dave Beckett * src/raptor_xml.c: (raptor_iostream_write_xml_any_escaped_string): Write XML-escaped ASCII 9 and A as XML with trailing ';' * tests/Makefile.am, tests/ex-60.nt, tests/ex-60.rdf: Added ex-60 rdf/xml serializing test * src/raptor.h: Added raptor_qname_get_namespace * src/raptor_qname.c: (raptor_qname_get_namespace): Added. * src/raptor_www.c: (raptor_uri_uri_string_is_file_uri): Renamed from raptor_uri_string_is_file_uri. * src/raptor_uri.c: (raptor_uri_uri_string_is_file_uri): Renamed from raptor_uri_string_is_file_uri. * src/raptor.h: (raptor_uri_uri_string_is_file_uri): Renamed from raptor_uri_string_is_file_uri. 2006-03-04 Dave Beckett * src/turtle_parser.y: (directive): Use raptor_new_namespace_from_uri and save string conversions. * src/n3_parser.y: (directive): Use raptor_new_namespace_from_uri and save string conversions. * src/raptor_www.c: (raptor_www_fetch): Use raptor_uri_string_is_file_uri instead of deprecated raptor_uri_is_file_uri * src/raptor_serialize_simple.c: (raptor_simple_serialize_statement): Use new raptor_iostream_write_uri. * src/raptor_uri.c: (raptor_uri_is_file_uri): Deprecated for raptor_uri_string_is_file_uri. (raptor_uri_string_is_file_uri): Added. * src/raptor.h: Deprecated raptor_uri_is_file_uri for raptor_uri_string_is_file_uri. Added raptor_iostream_write_uri. * src/raptor_iostream.c: (raptor_iostream_write_uri): Added. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Do not free shared string returned from raptor_uri_as_string. Fixes issue#0000065 http://bugs.librdf.org/mantis/view.php?id=65 * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement): Use raptor_uri_to_string so that new strings are allocated then freed. Fixes issue#0000065 http://bugs.librdf.org/mantis/view.php?id=65 * src/raptor_stringbuffer.c: (raptor_stringbuffer_append_string_common, raptor_stringbuffer_append_counted_string, raptor_stringbuffer_append_string): Do nothing on appending a NULL string or a string of length 0. (main): Add tests for this. Fixes issue#0000073 http://bugs.librdf.org/mantis/view.php?id=73 2006-02-21 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_new_qname_from_resource): Use raptor_namespaces_qname_from_uri to prefer using an existing XML namespace for creating a qname, otherwise make a new one just for this element. * src/raptor_namespace.c: (raptor_namespaces_qname_from_uri): Added, to make a qname from the in-scope namespaces in a stack. * src/raptor.h: Added prototype for raptor_namespaces_qname_from_uri 2006-02-20 Dave Beckett * src/raptor_rss.c: raptor_rss_parser_context_s gains is_empty and nstack fields. (raptor_rss_context_init): Initialise new namespace stack and the nspace field of raptor_rss_namespace_info. (raptor_rss_context_terminate): Delete new namespace stack. (raptor_rss_parse_start): Synthesise the namespace events. (raptor_rss_start_element): Push is_empty flag into rss parser context and reorganize empty case. (raptor_rss_parser_processNode): set element_is_empty flag and use it. * src/raptor_rss_common.c: Add RDF namespace for RSS use * src/raptor_rss.h: Add RDF namespace for RSS use 2006-02-19 Dave Beckett * AUTHORS: update me 2006-02-18 Dave Beckett * docs/raptor-sections.txt: Add raptor_xml_element_get_attributes raptor_xml_element_get_attributes_count * src/raptor_serialize_rdfxmla.c: Remove // comments * src/raptor_guess.c: Cast for C++ * src/n3_parser.y: Cast for C++ * src/turtle_parser.y: Cast for C++ * src/raptor_sax2.c: (raptor_sax2_parse_start, raptor_sax2_end_element): Code tidying, move decls to top of functions and don't end early if there is no handler. * src/raptor_rdfxml.c: Remove several unused uses of raptor_sax2* * src/raptor_rdfxml.c: Change to use field name xml_element for a raptor_xml_element inside raptor_element. * src/raptor_sax2.c: (raptor_free_sax2): Delete obsolete raptor_libxml_libxml_free_entities. Free base URI. (raptor_sax2_inscope_base_uri): Return SAX2 base URI if nothing is in scope. (raptor_sax2_parse_start): Save Base URI. (raptor_sax2_start_element): Add all code from old raptor_rdfxml_start_element_handler. (raptor_sax2_end_element): Add all code from old raptor_rdfxml_end_element_handler. * src/raptor_rdfxml.c: (raptor_rdfxml_sax2_new_namespace_handler): Add raptor_parser_start_namespace call. (raptor_rdfxml_start_element_handler): Deleted and merged into raptor_sax2_start_element. (raptor_rdfxml_end_element_handler): Use raptor_xml_element* argument. (raptor_inscope_base_uri): Tidy code. * src/raptor_internal.h: raptor_sax2_start_element_handler and raptor_sax2_end_element_handler now take raptor_xml_element* raptor_sax2 gaisn base_uri field. * src/raptor_rdfxml.c: (raptor_rdfxml_end_element_handler): Split into XML and RDF/XML parts now calling raptor_rdfxml_end_xml_element_handler. (raptor_rdfxml_end_xml_element_handler): Added, splitting RDF/XML part out of raptor_rdfxml_end_element_handler * src/raptor_sax2.c: (raptor_free_sax2): Run raptor_namespaces_clear. (raptor_sax2_simple_error): Added, to report errors from namespaces upwards. (raptor_sax2_parse_start): Init namespaces stack. * src/raptor_rdfxml.c: Deleted raptor_namespace_stack, now in raptor_sax2 (raptor_rdfxml_start_xml_element_handler): Added, splitting RDF/XML part out of raptor_rdfxml_start_element_handler (raptor_rdfxml_end_element_handler): Prepare for splitting XML and RDF/XML parts. (raptor_rdfxml_parse_start): Moved namespaces stack init into raptor_sax2_parse_start. * src/raptor_internal.h: raptor_sax2 gains raptor_namespace_stack from rdf/xml parser * src/raptor_rdfxml.c: (raptor_rdfxml_sax2_new_namespace_handler): Added, as callback raptor_sax2_set_namespace_handler. (raptor_rdfxml_start_element_handler): Split XML and RDF/XML namespace processing parts in preparation for moving them elsewhere. (raptor_rdfxml_parse_init): Use raptor_sax2_set_feature to set the XML namespace handler. * src/raptor.h: Added prototypes for raptor_xml_element_get_attributes and raptor_xml_element_get_attributes_count. * src/raptor_xml.c: (raptor_xml_element_get_attributes, raptor_xml_element_get_attributes_count): Added. * src/raptor_internal.h: raptor_sax2 gaisn namespace_handler and feature_normalize_language fields. Added prototypes for raptor_sax2_set_namespace_handler and raptor_sax2_set_feature. * src/raptor_sax2.c: (raptor_sax2_set_namespace_handler): Added, to allow callbacks when an XML namespace is defined. (raptor_sax2_set_feature): Added, with one feature RAPTOR_FEATURE_NORMALIZE_LANGUAGE for normalizing xml:lang values. 2006-02-04 Dave Beckett * src/raptor_parse.c: (raptor_parser_warning): Restored. * src/raptor_parse.c: (raptor_parser_error_varargs): Restored. * src/Makefile.am: Added fix-bison * src/fix-bison: Format output generated by bison * src/raptor_internal.h: revert experiment not intended to be commited * src/raptor_internal.h: Add prototypes for raptor_invoke_message_varargs and raptor_invoke_simple_message_varargs * src/raptor_parse.c: (raptor_parser_simple_error, raptor_parser_warning): Use raptor_invoke_message_varargs (raptor_parser_error_varargs, raptor_parser_warning_varargs): Deleted. * src/raptor_general.c: (raptor_invoke_simple_message_varargs, raptor_invoke_message): Helper functions for invoking error/warning/fatal error handlers with varargs, just given a handler that takes a single message string. 2006-02-03 Dave Beckett * configure.ac: allow --enable-parsers/serializers=none 2006-02-02 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element, raptor_rss_end_element, raptor_rss_cdata): Added, pulling big chunks of code out of the switch in raptor_rss_parser_processNode. 2006-01-27 Dave Beckett * src/raptor_serialize_rss.c: Do not write XML header here, XML writer does it. 2006-01-22 Dave Beckett * src/raptor_guess.c: (raptor_guess_parse_chunk): Tired of seeing debug message. Goodbye. 2006-01-16 Dave Beckett * src/raptor_namespace.c: (raptor_namespaces_format): NULL-terminate the namespace string. Fixes bug 0000062 http://bugs.librdf.org/mantis/view.php?id=62 * tests/test.nt: Remove svn:eol-style native property so that multiple line endings in one file work * win32/rapper.dsp, win32/rapper.vcproj, win32/raptor.dsp, win32/raptor.dsw, win32/raptor.sln, win32/raptor.vcproj, win32/raptortest.cpp, win32/raptortest.dsp, win32/raptortest.vcproj: Restore CRLF end of lines, set svn:eol-style CRLF 2006-01-14 Dave Beckett * docs/tmpl/section-serializer.sgml, docs/tmpl/section-xml-namespace.sgml: update docs for new functions * docs/raptor-sections.txt: Added raptor_serialize_set_namespace_from_namespace * utils/rapper.c: (relay_namespaces): Added, calling raptor_serialize_set_namespace_from_namespace when namespaces are not just printed out. Makes serializers use namespace prefix/URIs found in parsed RDF. * src/raptor_serialize_rdfxmla.c: Delay the writing of the namespaces on the rdf:RDF root element till as late as possible, allowing user declaration of namespaces to effect the output. (raptor_rdfxmla_serialize_init): Add rdf:RDF's namespace to the list of namespaces to declare. (raptor_rdfxmla_serialize_terminate): Do not free namespace #0 because of above. (raptor_rdfxmla_serialize_declare_namespace_from_namespace): Added, to set a namespace declared once only, preventing the same prefix appearing twice. (raptor_rdfxmla_serialize_declare_namespace): Use the above. (raptor_rdfxmla_serialize_start): Do not write root element here. (raptor_rdfxmla_ensure_writen_header): Added to write root element and namespace declarations. (raptor_rdfxmla_serialize_statement, raptor_rdfxmla_serialize_end): Call raptor_rdfxmla_ensure_writen_header before emitting syntax. (raptor_rdfxmla_serializer_register_factory): Register raptor_rdfxmla_serialize_declare_namespace_from_namespace. * src/raptor_serialize_rdfxml.c: Delay the writing of the namespaces on the rdf:RDF root element till as late as possible, allowing user declaration of namespaces to effect the output. (raptor_rdfxml_serialize_init): Add rdf:RDF's namespace to the list of namespaces to declare. (raptor_rdfxml_serialize_terminate): Do not free namespace #0 because of above. (raptor_rdfxml_serialize_declare_namespace_from_namespace): Added, to set a namespace declared once only, preventing the same prefix appearing twice. (raptor_rdfxml_serialize_declare_namespace): Use the above. (raptor_rdfxml_serialize_start): Do not write root element here. (raptor_rdfxml_ensure_writen_header): Added to write root element and namespace declarations. (raptor_rdfxml_serialize_statement, raptor_rdfxml_serialize_end): Call raptor_rdfxml_ensure_writen_header before emitting syntax. (raptor_rdfxml_serializer_register_factory): Register raptor_rdfxml_serialize_declare_namespace_from_namespace. * src/raptor.h: Added prototype for raptor_serialize_set_namespace_from_namespace * src/raptor_serialize.c: (raptor_serialize_set_namespace): Now a wrapper around: (raptor_serialize_set_namespace_from_namespace:): Added, to set a namespace for serialzing from an existing raptor_namespace * src/raptor_internal.h: raptor_serializer_factory gains a factory method declare_namespace_from_namespace * tests/Makefile.am: Report error output on rdfxml-abbrev failure * tests/Makefile.am: (check-rdfxmla): Don't die on first error, report all then die. * docs/raptor-sections.txt: Added raptor_namespace_get_counted_prefix * src/raptor.h: Added prototype for raptor_namespace_get_counted_prefix * src/raptor_namespace.c: (raptor_namespace_get_counted_prefix): Added to return prefix and it's length. * src/turtle_parser.y: (statementList): Rewrite to remove all shift/reduce conflicts. * src/n3_parser.y: (statementList): Rewrite to remove all shift/reduce conflicts. 2006-01-10 Dave Beckett * src/n3_parser.y: Make literal be just literals, resource only URI or QNAME. * src/turtle_parser.y: Use TRUE and FALSE boolean literals to make xsd:boolean values. Make literal be just literals, resource only URI or QNAME. * src/turtle_lexer.l: Added true & false boolean literals * tests/turtle/Makefile.am, tests/turtle/manifest.ttl, tests/turtle/test-24.out, tests/turtle/test-24.ttl: Added boolean literals tests * src/turtle_parser.y: Compatibility fixes for older bisons (1.7x) and whitespace edits. * src/n3_parser.y: Compatibility fixes for older bisons (1.7x) and whitespace edits. 2006-01-09 Dave Beckett * src/turtle_parser.y, src/n3_parser.y: Compatibility fixes for older bisons (1.7x) and whitespace edits. * examples/Makefile.am: Fix raptor_abort link dependencies 2006-01-08 Dave Beckett * fix-groff-xhtml: footer 2006-01-07 Dave Beckett * Makefile.am, autogen.sh, configure.ac, docs/Makefile.am, examples/Makefile.am, examples/grapper.c, examples/raptor_abort.c, fix-groff-xhtml, manifest.pl, raptor-src-config.in, src/Makefile.am, src/fix-flex, src/n3_common.h, src/n3_lexer.l, src/n3_parser.y, src/ntriples_parse.c, src/parsedate.y, src/raptor-config.1, src/raptor-config.1, src/raptor-config.in, src/raptor.h, src/raptor_expat.c, src/raptor_feature.c, src/raptor_general.c, src/raptor_guess.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_libxml.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_nfc.c, src/raptor_nfc.h, src/raptor_nfc_test.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_set.c, src/raptor_stringbuffer.c, src/raptor_uri.c, src/raptor_utf8.c, src/raptor_win32.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libfetch.c, src/raptor_www_libwww.c, src/raptor_www_libxml.c, src/raptor_www_test.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/raptor_xsd.c, src/raptor_xslt.c, src/strcasecmp.c, src/turtle_common.c, src/turtle_common.h, src/turtle_lexer.l, src/turtle_parser.y, src/win32_raptor_config.h, tests/Makefile.am, tests/empty.c, tests/ex-52.svg, tests/test.html, tests/test.nt, tests/test.svg, utils/Makefile.am, utils/getopt.c, utils/rapper.1, utils/rapper.c, utils/raptor_getopt.h, utils/rdfdiff.c: Remove RCS ID. Copyright 2006 * .cvsignore, data/.cvsignore, docs/.cvsignore, examples/.cvsignore, src/.cvsignore, tests/.cvsignore, tests/turtle/.cvsignore, utils/.cvsignore, win32/.cvsignore, delete .cvsignore files 2006-01-07 Dave Beckett * configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.9 * docs/tmpl/section-feature.sgml: Added RAPTOR_FEATURE_WRITER_XML_VERSION * Switched to Subversion version control. CVS tag for raptor 1.4.8: raptor_1_4_8 Subversion revision ID for raptor 1.4.8: r3091 2006-01-03 Dave Beckett * Snapshotted raptor_1_4_8 for 1.4.8 release (SVN r3091) 2006-01-02 Dave Beckett * src/raptor_namespace.c (main): Cast for string * src/n3_lexer.l: Apply more turtle to n3 changes for names. * src/n3_parser.y: Update N3 parser to turtle. * src/n3_lexer.l: Update N3 lexer to turtle. * src/raptor_general.c, src/raptor_namespace.c, src/turtle_parser.y, src/turtle_lexer.l: 2006 and urls * tests/turtle/Makefile.am: Added test-23 * tests/turtle/test-23.out, tests/turtle/test-23.ttl: Test long literal ending in a double quote * tests/turtle/manifest.ttl: Added test-23 testing long literal ending in a double quote * src/turtle_common.c (raptor_stringbuffer_append_turtle_string): Fix comment to match code and report hex char of bad escapes. * src/turtle_lexer.l: Try to handle \-escapes inside """ properly. * tests/turtle/README.txt: url * tests/turtle/Makefile.am: Add TEST_MANIFEST_FILES to tests.zip * tests/turtle/manifest-bad.ttl, tests/turtle/manifest.ttl: Updated manifests from Arjohn Kampman * src/turtle_parser.y (DECIMAL_LITERAL): Added turtle decimal and double after SPARQL 2005-11-23 * src/turtle_lexer.l: Added turtle decimal and double after SPARQL 2005-11-23 * tests/turtle/Makefile.am, tests/turtle/test-19.out, tests/turtle/test-21.out, tests/turtle/test-21.ttl, tests/turtle/test-22.out, tests/turtle/test-22.ttl: Added decimal/double/integer + and - checks from http://lists.w3.org/Archives/Public/public-cwm-talk/2005OctDec/0017.html 2006-01-01 Dave Beckett * src/raptor_namespace.c (raptor_namespaces_find_namespace): Handle searching for default namespace with prefix=NULL. (main): Add test code for above. raptor-1.4.21/ChangeLog.80000644000175000017500000023742111000544040011744 000000000000002007-12-31 Dave Beckett * src/raptor_iostream.c: (raptor_iostream_init_common): Added to init iostream fields * src/raptor_iostream.c: Replaced raptor_iostream_handler structure with raptor_iostream_handler2 (raptor_new_iostream_from_handler2): Added. (raptor_new_iostream_from_handler): Rewritten to use raptor_new_iostream_from_handler2 and create an internal raptor_iostream_handler2. (raptor_new_iostream_from_sink, raptor_new_iostream_from_filename raptor_new_iostream_from_file_handle, raptor_new_iostream_from_string): Added for constructing read iostreams. (method raptor_iostream_read_bytes): Added for reading from read iostreams. * src/raptor.h: Added raptor_iostream_read_bytes_func Added raptor_iostream_handler2 with version, private field and read_bytes field. Deprecated raptor_iostream_handler structure for raptor_iostream_handler2 structure. Added raptor_new_iostream_from_handler2 and deprecated raptor_new_iostream_from_handler Added raptor_new_iostream_from_sink, raptor_new_iostream_from_filename raptor_new_iostream_from_file_handle and raptor_new_iostream_from_string for constructing read iostreams. Added method raptor_iostream_read_bytes for read iostreams. 2007-12-28 Dave Beckett * src/raptor.h, src/raptor_internal.h: Move SAX2 to public API. Added new raptor_sax2 typedef. Added XML type handlers raptor_sax2_start_element_handler, raptor_sax2_end_element_handler, raptor_sax2_characters_handler, raptor_sax2_cdata_handler, raptor_sax2_comment_handler, raptor_sax2_unparsed_entity_decl_handler, raptor_sax2_external_entity_ref_handler. Added functions raptor_new_sax2, raptor_free_sax2, raptor_sax2_set_start_element_handler, raptor_sax2_set_end_element_handler, raptor_sax2_set_characters_handler, raptor_sax2_set_cdata_handler, raptor_sax2_set_comment_handler, raptor_sax2_set_unparsed_entity_decl_handler, raptor_sax2_set_external_entity_ref_handler, raptor_sax2_set_namespace_handler, raptor_sax2_parse_start, raptor_sax2_parse_chunk, raptor_sax2_parse_handle_errors, raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri Moved log API to public API. Added raptor_log_level and raptor_error_handlers typedefs. Added raptor_error_handlers_init. * src/raptor.h, src/raptor_xml.c: Added raptor_xml_element_get_language * src/raptor.h, src/raptor_qname.c: Added raptor_qname_get_local_name and raptor_qname_get_value * src/raptor_turtle_writer.c: cast * src/raptor_xml_writer.c: cast * src/raptor_turtle_writer.c: (raptor_turtle_writer_newline): Cast for signed/unsigned int compare. * src/raptor_xml_writer.c: (raptor_xml_writer_indent): Cast for signed/unsigned int compare. * tests/turtle/Makefile.am: Add bad-19.ttl * tests/turtle/bad-19.ttl: bad-19 () in predicate position 2007-12-24 Dave Beckett * docs/raptor.types: Add gtkdoc file raptor.types 2007-12-19 Lauri Aalto * src/raptor_stringbuffer.c: (raptor_new_stringbuffer) Fixed docs. Removed unnecessary local var and conditional. 2007-12-18 Lauri Aalto * src/turtle_parser.y: (raptor_trig_parse_recognise_syntax): Wrap function in #ifdef RAPTOR_PARSER_TRIG. Used only if RAPTOR_PARSER_TRIG is defined, avoids gcc warning on unused static function. 2007-12-13 Lauri Aalto * src/raptor_uri.c: Portability: Use Windows-like path handling on Symbian. 2007-12-09 Dave Beckett * docs/raptor-tutorial-parsing.xml: fix raptor_set_feature() call to have 3 args 2007-11-28 Dave Beckett * tests/turtle/Makefile.am, tests/turtle/bad-17.ttl, tests/turtle/bad-18.ttl, tests/turtle/manifest-bad.ttl: bad tests 17 and 18 to Forbid ' and '''-quoted strings * src/turtle_lexer.l: Remove '-quoted strings 2007-11-26 Dave Beckett * autogen.sh: Update to handle OSX glibtoolize and optional ltdl 2007-11-15 Lauri Aalto * src/raptor_sax2.c: (raptor_sax2_parse_chunk) Fix compiler warnings: unused variable, unused label. 2007-11-15 Dave Robillard * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_properties): Write ; statement terminators with a leading space for consistency with . terminator 2007-11-12 Lauri Aalto * src/raptor_www.c: (raptor_www_init) Pull static initialized flag from function scope to unit scope. * src/raptor_nfc.h, src/raptor_nfc_data.c: Make raptor nfc data const - eliminate ~53768 bytes of writable static. * src/raptor_serialize_rss.c: Make raptor_rss10_spaces pointer const. * src/n3_parser.y, src/raptor.h, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize_dot.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_xml_writer.c, src/turtle_parser.y: Make raptor_uri_handlers const. SOURCE COMPATIBILITY BREAK: Five raptor API function signatures changed: raptor_uri_set_handler() raptor_uri_get_handler() raptor_new_namespaces() raptor_namespaces_init() raptor_new_xml_writer() * src/raptor_uri.c: (raptor_uri_set_handler) Assert inputs 2007-11-06 Lauri Aalto * src/raptor_serialize_turtle.c: fix eol style * src/raptor_uri.c: (raptor_uri_set_handler) Treat uri handler as const although the API does not say it is const. * src/raptor.h: Allow RAPTOR_API to be externally defined e.g. in a static config.h. Remove __SYMBIAN32__ case. * src/turtle_lexer.l, src/turtle_parser.y: Rename turtle {TRUE,FALSE} tokens to {TRUE,FALSE}_TOKEN to prevent potential clashes with system headers. * src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Remove writable static data. Refactor turtle/xml writers to use a const spaces_buffer. * src/raptor_uri.c: Remove writable static data. Make raptor_uri_handler const * src/ntriples_parse.c, src/raptor_feature.c, src/raptor_general.c: Remove writable static data. Make const arrays const. 2007-11-05 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_init) Fix lowmem issues: Do not use a NULL namespaces sequence or nstack. NULL rdf_type is allowed. Check for uri creation failures. Check for sequence push failures. (raptor_turtle_serialize_terminate) Do not leave dangling pointers behind. 2007-11-04 Dave Beckett * src/raptor_turtle_writer.c: (main): Write a proper double * tests/turtle/test-28-out.ttl: Remove canonicalisation * src/raptor_serialize_turtle.c: (raptor_turtle_emit_blank, raptor_turtle_emit_subject, raptor_turtle_emit): Add more failure pass ons. * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject): Fail when out of memory. * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject): Remove un-necessary use of snprintf to concat 2 strings. * src/raptor_turtle_writer.c: (raptor_turtle_writer_double): Removed, no longer used. * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Do not canonicalise integer, double or decimal literals. 2007-10-31 Dave Beckett * tests/turtle/test-10.out, tests/turtle/test-21.out, tests/turtle/test-22.out: Remove canonicalisation of integer and double (Turtle spec change coming soon) 2007-10-30 Lauri Aalto * src/turtle_parser.y: Add {INTEGER,FLOATING}_LITERAL %destructors. 2007-10-30 Dave Beckett * src/turtle_lexer.l, src/turtle_parser.y: Turtle INTEGER_LITERAL and FLOATING_LITERAL now are stored as strings, with no canonicalisation. This is required for SPARQL compatibility. 2007-10-25 Lauri Aalto * src/n3_parser.y: (blank) Fix [ propertylist ] lowmem leaks. * src/turtle_parser.y: (blank) Fix [ propertylist ] lowmem leaks. 2007-10-25 Dave Beckett * src/snprintf.c: Define round() and trunc() as macros if they were not found by configure as functions/macros. They were standardised with C99. * configure.ac: Check for trunc and round in libm * utils/rapper.c: Quote args to HELP_ARG_BOTH() 2007-10-24 Lauri Aalto * src/turtle_parser.y: Add destructors for turtle_parser identifiers and sequences. (triples) Free subject and propertylist on alloc failure. * src/turtle_lexer.l: turtle_lexer: Check for alloc failures - fail faster and do not pass NULLs to parser. 2007-10-23 Lauri Aalto * src/turtle_lexer.l: (QUOTEDURI) Always free stringbuffer * src/turtle_lexer.l: turtle_lexer: Check for alloc failures * src/n3_lexer.l: (n3_copy_string_token) Always free stringbuffer if it is allocated. * src/raptor_stringbuffer.c: (raptor_stringbuffer_append_string_common) Free passed in string on alloc error if ownership was transferred. * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string) Check for alloc failure. * src/fix-flex, src/n3_lexer.l, src/raptor_internal.h, src/turtle_lexer.l: Lowmem leak fixes. Ported experimental lexer leak prevention code from sparql_lexer r12922 to raptor {n3,turtle}_lexer. Flagged with LEXER_ALLOC_TRACKING, disabled by default. (raptor_parser_s) Added lexer_user_data. * src/raptor_internal.h, src/raptor_parse.c: (raptor_parse_uri_with_connection) Lowmem leak fixes. Store raptor_www pointer to raptor parser object to allow resource cleanup from client code in case raptor_parse_chunk() fails in a lexer. * src/n3_parser.y, src/raptor_parse.c: (raptor_parse_uri_with_connection) Set parser to failed state if raptor_parse_chunk() returned an error. (raptor_n3_parse_chunk) Return error code from n3_parse(). 2007-10-19 Lauri Aalto * src/n3_lexer.l, src/turtle_lexer.l: (n3_lexer, turtle_lexer) Replace out-of-memory yyterminate()s with more informative error reporting. * src/fix-flex, src/n3_lexer.l, src/turtle_lexer.l: (fix-flex) Import patches from rasqal fix-flex: remove generated yy_fatal_error(), OOM checks to ensure_buffer_stack(). (n3_lexer_fatal_error,turtle_lexer_fatal_error) Added replacement for generated fatal error handler. * src/n3_lexer.l: (QNAME) OOM: Terminate instead of returning NULL QNAME literal. * src/n3_parser.y: (n3_parser) PREFIX should not be in %destructor list 2007-10-18 Lauri Aalto * src/fix-bison, src/fix-flex: (fix-bison, fix-flex) Fix #line numbers in generated raptor lexers and parsers. 2007-10-15 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement) indent tabs -> spaces * src/raptor_serialize_rdfxmla.c: Fix low memory crashes. (raptor_rdfxmla_serialize_init) Check for nstack alloc failure before using it. Alloc independent objects in a batch and check them with one if. Check the return value of raptor_sequence_push() - moved to end since it depends on successful sequence allocation. (raptor_rdfxmla_serialize_terminate) Set pointers to NULL to prevent dangling pointers. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_init) Check sequence push ret val. 2007-10-12 Lauri Aalto * src/raptor_sequence.c: (raptor_sequence_set_at) Free passed in data item also when returning due to invalid index. 2007-10-08 Dave Beckett * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: (raptor_turtle_writer_literal, raptor_turtle_writer_quoted): These may fail when out of memory, change to return an int non-0 on failure 2007-10-06 Dave Beckett * src/raptor_sequence.c: comments on sequence design 2007-10-05 Lauri Aalto * src/raptor.h, src/raptor_sequence.c: (raptor_sequence_disown_at) Removed. Was a hack that should not be in a public API. Functions that needed this have been refactored to use raptor_sequence_unshift() to get the item and its ownership. * src/n3_parser.y: (propertyList) Refactored to not use raptor_sequence_disown_at() * src/turtle_parser.y: (propertyList) Refactored to not use raptor_sequence_disown_at() * src/raptor_sequence.c: Refactor raptor_sequence internals to make shift/unshift as efficient as push/pop. (raptor_free_sequence) Use RAPTOR_FREE macro instead of free() for sequence. (raptor_sequence_ensure) Added grow_at_front flag to describe growth direction. Do not grow sequence if seq->capacity == capacity. Use RAPTOR_CALLOC instead of calloc() for sequence. (raptor_sequence_grow) Removed. (raptor_sequence_set_at) Do not allow setting items over +1 current size. (main) Added test code. 2007-10-04 Lauri Aalto * src/turtle_parser.y: Memory leak fixes: Free allocated resources and YYERROR on alloc failure. (raptor_turtle_new_triple) Free identifiers on error. * src/turtle_parser.y: (turtle_parse) Check lexer init return value. (raptor_turtle_parse_init) Return error code on failure. * src/raptor_identifier.c: (raptor_copy_identifier) Return non-zero on allocation failure. No need to check for non-null uris: raptor_uri_copy returns NULL if passed in a null uri. Removed duplicate copying of literal_language. * src/turtle_parser.y: (triples, propertyList, literal, blank) YYERROR on alloc failure. (raptor_turtle_parse_terminate) Free uris only if not null. * src/n3_parser.y: Memory leak fixes: free resources on error. (verb, literal, resource, blank, collection) Additional checks for alloc failures. * src/n3_lexer.l: lexer: yyterminate() on alloc failure. (n3_copy_token, n3_copy_string_token) Check for alloc failure. * src/raptor.h, src/raptor_sequence.c: Add raptor_sequence_disown_at() 2007-10-02 Lauri Aalto * src/n3_parser.y: %destructors for %tokens and not just %types. (directive) YYERROR if namespace alloc failed. 2007-10-02 Dave Beckett * NEWS.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.17 2007-10-01 Lauri Aalto * src/raptor_identifier.c: (raptor_new_identifier) Free owned items on alloc failure. * src/n3_parser.y: (raptor_n3_new_triple) Free owned identifiers on alloc error. (n3_parse) Check lexer init return value. * src/n3_parser.y: n3 parser YYERROR on alloc failure. Still leaks memory on errors. * src/n3_parser.y: n3 parser YYERROR on alloc failure. * src/raptor_serialize_rdfxml.c: Fix indent + trim whitespace 2007-09-30 Dave Beckett * Snapshotted raptor_1_4_16 for 1.4.16 release (SVN 12743) * docs/libraptor.3: Fix functions using raptor_unichar GRDDL 2007-09-11 2007-09-29 Dave Beckett * docs/libraptor.3: Added raptor_new_xml_element_from_namespace_local_name * src/raptor.h, src/raptor_serialize_rdfxml.c, src/raptor_xml.c: Alter raptor_new_xml_element_from_namespace_local_name signature to take an xml_language parameter * src/raptor_grddl.c: (raptor_grddl_run_recursive): Only set content type handler when recursive parser is grddl. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_end): Make sure an empty legal RDF/XML document is written when 0 triples were serialized. * src/raptor_grddl.c: Replaced all calls to get parser's current base ID with raptor_parser_get_current_base_id * src/raptor_guess.c: (raptor_guess_get_current_base_id): Pass on the call to get the base ID to the internal parser using raptor_parser_get_current_base_id * src/raptor_internal.h, src/raptor_parse.c: (raptor_parser_get_current_base_id): Added. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Remove #ifdef-out old processing * src/raptor_grddl.c: (raptor_grddl_ensure_internal_parser): Re-init the guess parser each time so it does a fresh guess. (raptor_grddl_run_grddl_transform_doc): Save and restore the genid around recursive parsers, so blank nodes are numbered across graphs. (raptor_grddl_run_recursive): Switch to parser_name, flags args. Pass on the filter to the internal parser call. Do not add parent if the parser is not grddl. Pass on the ignore error flag to raptor_grddl_fetch_uri. Save and restore the genid around recursive parsers, so blank nodes are numbered across graphs. Do not call rdfxml parser if selected parser is already rdfxml. Update raptor_grddl_run_recursive calls to use parser name and flags. Alter the processing to use the guess parser to figure out the mime type during the recursion. Do not filter the triples. Fixes Issue#0000238 http://bugs.librdf.org/mantis/view.php?id=238 * src/raptor_www.c: (raptor_www_file_handle_fetch): Ensure the buffer has a NUL after the last byte read, it helps elsewhere when using str*() functions on the results - such as guessing the parser from content. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Use RAPTOR_LIBXML_HTML_PARSE_NONET to decide whether to enable libxml HTML_PARSE_NONET with the html parser. * configure.ac: Add test for libxml HTML_PARSE_NONET since it not a define, it cannot be done at run-time with #ifdef Define RAPTOR_LIBXML_HTML_PARSE_NONET if available * src/raptor_grddl.c: Add declaration for libxml_options * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Use RAPTOR_LIBXML_XML_PARSE_NONET to set XML nonet option if it was set with raptor feature nonet. * tests/grddl/test-01.html: lie about the mime type in order to get the test to work * src/raptor_grddl.c: (raptor_grddl_uri_xml_parse_bytes): Use RAPTOR_LIBXML_XML_PARSE_NONET to check for enum value XML_PARSE_NONET * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Use RAPTOR_LIBXML_XML_PARSE_NONET to check for XML_PARSE_NONET enum value. * tests/grddl/Makefile.am: Call rapper with -f noNet to prevent unnecessary fetches of HTML DTDs * configure.ac: Add test for libxml XML_PARSE_NO_NET since it not a define, it cannot be done at run-time with #ifdef Define RAPTOR_LIBXML_XML_PARSE_NONET if available * src/raptor_grddl.c: (raptor_grddl_fetch_uri): Reject a URI with feature noNet only if it is not a file URI * configure.ac, tests/Makefile.am, tests/grddl, tests/grddl/Makefile.am, tests/grddl/data-01.nt, tests/grddl/data-01.rdf, tests/grddl/data-02.rdf, tests/grddl/test-01.html, tests/grddl/test-01.out: Added tests/grddl dir and test-01 * AUTHORS: Added Lauri Aalto 2007-09-27 Lauri Aalto * src/n3_parser.y: (raptor_n3_parse_terminate) Do not assume the parser is fully initialized. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_ensure_writen_header, raptor_rdfxml_serialize_statement) Memory leak fixes: make sure base_uri is freed. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_ensure_writen_header) Memory leak fix. Set context->written_header flag early to prevent running the function again when a previous call to this function failed. * src/raptor_uri.c: (raptor_uri_to_relative_counted_uri_string) Fix memory leak - free uri details if suffix allocation fails. 2007-09-26 Dave Beckett * autogen.sh: Added an inline perl script to grep out the version from programs. 2007-09-26 Lauri Aalto * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement) Skip statements with bad predicate uris, do not return an error. * src/raptor_uri.c: (raptor_default_new_uri, raptor_uri_path_make_relative_path, raptor_uri_to_relative_counted_uri_string, raptor_uri_uri_string_to_filename_fragment) Check for alloc failures. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement) Make sure xml_writer->current_element does not become a dangling pointer on error. (raptor_rdfxml_serialize_end) No-op if context->rdf_RDF_element is NULL. * src/raptor_uri.c: (raptor_uri_to_counted_string) Copy uri string, not uri struct - worked previously with raptor_uris but breaks with librdf_uris. No need to allocate +sizeof(char*). * src, tests, utils: Props: ignore .exes * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_ensure_writen_header) Forgot to return 0 on success - oops 2007-09-25 Dave Beckett * autogen.sh: Use 3-part versions with perl to decode them. Still broken for autoconf 2007-09-25 Lauri Aalto * src/raptor_xml_writer.c: (raptor_iostream_write_xml_element_start) Check for alloc failures and clean up nspace_declarations on failure. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_ensure_writen_header) Check for alloc failures. Return an error code on failure. (raptor_rdfxml_serialize_statement) Check for raptor_rdfxml_ensure_writen_header() return code. (raptor_rdfxml_ensure_writen_header) Ignore raptor_rdfxml_ensure_writen_header() return code in a cleanup function. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement) Get a copy of predicate uri string for modification. Check for alloc failures and clean up on error. Refactored to use raptor_new_xml_element_from_namespace_local_name(). * src/raptor.h, src/raptor_xml.c: Refactoring: Added raptor_new_xml_element_from_namespace_local_name(). Pulled from rasqal_query_results_new_xml_element() - the same xml element creation pattern recurs in other serializers as well. 2007-09-24 Lauri Aalto * autogen.sh: Do not compare versions as decimal, e.g. automake 1.10 should be treated newer than 1.7. (update_prog_version) Convert [z.]x.y version strings to 100x+y. 2007-09-23 Dave Beckett * src/raptor_grddl.c: Revert GRDDL to the main algorithm of around 12377 which passes the tests again and Fixes Issue#0000239 http://bugs.librdf.org/mantis/view.php?id=239 (raptor_grddl_parser_add_parent): Restored. (raptor_grddl_copy_state): Removed (raptor_grddl_new_child_parser): Removed. (raptor_grddl_run_recursive): Remove reference to the above - replacing raptor_grddl_new_child_parser with raptor_grddl_ensure_internal_parser and replacing 'nparser' references with grddl_parser->internal_parser. * src/raptor_grddl.c: (raptor_grddl_discard_message): debug message tweak. * examples, tests, docs, docs/tmpl: props * docs/tmpl/section-uri-factory.sgml, docs/tmpl/section-uri.sgml, docs/tmpl/section-xml-namespace.sgml: Updated gtkdoc templates for raptor_uri_compare 2007-09-21 Lauri Aalto * src/raptor.h, src/raptor_namespace.c: (raptor_new_namespace): Check for alloc failures and clean up on error. (raptor_namespaces_init): Changed to return an error code. * src/raptor_parse.c: (raptor_parse): Check for alloc failures. Clean up on failure. * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_handler) return on fatal error, do not use NULL pointers. (raptor_rdfxml_end_element_grammar) abort() after reporting a fatal error. * src/raptor_serialize.c: (raptor_new_serializer): Check for alloc failures. Clean up on failure. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_init): Check for alloc failures. Clean up on failure. * src/raptor_namespace.c: raptor_namespace.c: Fix comment typo * src/raptor_abbrev.c: (raptor_abbrev_subject_add_property) Free passed in nodes on error. * src/raptor_abbrev.c, src/raptor_sequence.c: raptor_sequence: Delete items to be inserted on error. Fixes Issue#0000237 http://bugs.librdf.org/mantis/view.php?id=237 * src/fix-bison: bison parsers / fix-bison: Fix compiler warning about empty declarations (remove semicolon). * src/raptor_parse.c: (raptor_guess_parser_name) Fix compiler warnings about unnecessary const cast * src/raptor_rfc2396.c: (raptor_new_uri_detail) Check for alloc failure. * src/raptor_serialize_rdfxml.c: raptor_serialize_rdfxml: Fix compiler warnings about uninitialized variables. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header) Fix compiler warning about uninitialized variable. * src/raptor_xml_writer.c: (raptor_iostream_write_xml_element_start) Check for alloc failure * src/raptor_internal.h: raptor_internal.h: Allow RAPTOR_WWW_BUFFER_SIZE to be externally defined. Can save stack space in some resource-constrained environments with smaller buffers. * src/raptor_internal.h: raptor_internal.h: Allow RAPTOR_ASSERT_DIE to be externally defined e.g. in a makefile. * src/raptor_internal.h: raptor_internal.h: Rearrange include file guards to include stdlib.h without dmalloc. * src/raptor_general.c: (raptor_init) Set initialized flag early to allow cleanup with raptor_finish() on init errors. * src/raptor_general.c: (raptor_log_error) Do not abort() on fatal messages - leave it up to caller to enable resource cleanup. * src/raptor_general.c: (raptor_statement_part_as_counted_string) Fix compiler warnings about uninitialized variables. * src/raptor_rss_common.c, src/raptor_sax2.c: Fix compiler warnings about possible unwanted semicolons * src/raptor_serialize.c: Fix typos in comments * src/raptor_sax2.c: Fix indent * Makefile.am, autogen.sh, configure.ac, data/Makefile.am, docs/Makefile.am, examples/Makefile.am, src/Makefile.am, tests/22-rdf-syntax-ns.rdf, tests/Makefile.am, tests/all-escape.rdf, tests/bad-00.rdf, tests/bad-01.rdf, tests/bad-02.rdf, tests/bad-03.rdf, tests/bad-04.rdf, tests/bad-05.rdf, tests/bad-06.rdf, tests/bad-07.rdf, tests/bad-08.rdf, tests/bad-09.rdf, tests/bad-10.rdf, tests/bad-11.rdf, tests/bad-12.rdf, tests/bad-13.rdf, tests/bad-14.rdf, tests/bad-15.rdf, tests/bad-16.rdf, tests/bad-17.rdf, tests/bad-18.rdf, tests/bad-19.rdf, tests/bad-20.rdf, tests/bad-21.rdf, tests/bad-22.rdf, tests/bad-23.rdf, tests/daml-oil.rdf, tests/ex-00.rdf, tests/ex-01.rdf, tests/ex-02.rdf, tests/ex-03.rdf, tests/ex-04.rdf, tests/ex-05.rdf, tests/ex-06.rdf, tests/ex-07.rdf, tests/ex-08.rdf, tests/ex-09.rdf, tests/ex-10.rdf, tests/ex-11.rdf, tests/ex-12.rdf, tests/ex-13.rdf, tests/ex-14.rdf, tests/ex-15.rdf, tests/ex-16.rdf, tests/ex-17.rdf, tests/ex-18.rdf, tests/ex-19.rdf, tests/ex-20.rdf, tests/ex-21.rdf, tests/ex-22.rdf, tests/ex-23.rdf, tests/ex-24.rdf, tests/ex-25.rdf, tests/ex-26.rdf, tests/ex-27.rdf, tests/ex-28.rdf, tests/ex-29.rdf, tests/ex-30.rdf, tests/ex-31.rdf, tests/ex-32.rdf, tests/ex-33.rdf, tests/ex-34.rdf, tests/ex-35.rdf, tests/ex-36.rdf, tests/ex-37.rdf, tests/ex-38.rdf, tests/ex-39.rdf, tests/ex-40.rdf, tests/ex-41.rdf, tests/ex-42.rdf, tests/ex-43.rdf, tests/ex-44.rdf, tests/ex-45.rdf, tests/ex-46.rdf, tests/ex-47.rdf, tests/ex-48.rdf, tests/ex-49.rdf, tests/ex-51.rdf, tests/ex-53.rdf, tests/ex-54.rdf, tests/ex-55.rdf, tests/ex-56.rdf, tests/ex-57.rdf, tests/ex-58.rdf, tests/ex-59.rdf, tests/ex-60.rdf, tests/ex-61.rdf, tests/ex-62.rdf, tests/turtle/Makefile.am, tests/turtle/bad-00.ttl, tests/turtle/bad-01.ttl, tests/turtle/bad-02.ttl, tests/turtle/bad-03.ttl, tests/turtle/bad-04.ttl, tests/turtle/bad-05.ttl, tests/turtle/bad-06.ttl, tests/turtle/bad-07.ttl, tests/turtle/bad-08.ttl, tests/turtle/bad-09.ttl, tests/turtle/bad-10.ttl, tests/turtle/bad-11.ttl, tests/turtle/bad-12.ttl, tests/turtle/bad-13.ttl, tests/turtle/bad-14.ttl, tests/turtle/manifest-bad.ttl, tests/turtle/manifest.ttl, tests/turtle/rdf-schema.out, tests/turtle/rdf-schema.ttl, tests/turtle/rdfq-results.out, tests/turtle/rdfq-results.ttl, tests/turtle/rdfs-namespace.out, tests/turtle/rdfs-namespace.ttl, tests/turtle/test-00.out, tests/turtle/test-00.ttl, tests/turtle/test-01.out, tests/turtle/test-01.ttl, tests/turtle/test-02.out, tests/turtle/test-02.ttl, tests/turtle/test-03.out, tests/turtle/test-03.ttl, tests/turtle/test-04.out, tests/turtle/test-04.ttl, tests/turtle/test-05.out, tests/turtle/test-05.ttl, tests/turtle/test-06.out, tests/turtle/test-06.ttl, tests/turtle/test-07.out, tests/turtle/test-07.ttl, tests/turtle/test-08.out, tests/turtle/test-08.ttl, tests/turtle/test-09.out, tests/turtle/test-09.ttl, tests/turtle/test-10.out, tests/turtle/test-10.ttl, tests/turtle/test-11.out, tests/turtle/test-11.ttl, tests/turtle/test-12.out, tests/turtle/test-12.ttl, tests/turtle/test-13.out, tests/turtle/test-13.ttl, tests/turtle/test-14.out, tests/turtle/test-14.ttl, tests/turtle/test-15.out, tests/turtle/test-15.ttl, tests/turtle/test-16.out, tests/turtle/test-16.ttl, tests/turtle/test-17.out, tests/turtle/test-17.ttl, tests/turtle/test-18.out, tests/turtle/test-18.ttl, tests/turtle/test-19.out, tests/turtle/test-19.ttl, tests/turtle/test-20.out, tests/turtle/test-20.ttl, tests/turtle/test-21.out, tests/turtle/test-21.ttl, tests/turtle/test-22.out, tests/turtle/test-22.ttl, tests/turtle/test-23.out, tests/turtle/test-23.ttl, tests/turtle/test-24.out, tests/turtle/test-24.ttl, tests/turtle/test-25.out, tests/turtle/test-25.ttl, tests/turtle/test-26.out, tests/turtle/test-26.ttl, tests/turtle/test-27.out, tests/turtle/test-27.ttl, tests/turtle/test-28-out.ttl, tests/turtle/test-28.out, tests/turtle/test-28.ttl, tests/turtle/test-29.out, tests/turtle/test-29.ttl, tests/turtle/test-30.out, tests/turtle/test-30.ttl, utils/Makefile.am, win32/Makefile.am: Fix EOL issues when building svn version on cygwin. Partial fix to http://bugs.librdf.org/mantis/view.php?id=236 * tests/Makefile.am, tests/turtle/Makefile.am: Added $(EXEEXT)s to Makefiles to fix "make clean" on cygwin. Partial fix to Issue#0000235 http://bugs.librdf.org/mantis/view.php?id=235 * autogen.sh: raptor autogen.sh $dir quoting. Partial fix to Issue#0000234 http://bugs.librdf.org/mantis/view.php?id=234 2007-09-20 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Check for presence of html in the mime type correctly. 2007-09-19 Dave Beckett * src/raptor_parse.c: (raptor_parse_uri_with_connection): Ensure a parser is started if it wasn't started during WWW retrieval - typically this is only if the file was empty (o bytes). Some RDF syntaxes are legal as an empty file so can produce a valid empty graph, such as N-Triples and Turtle. 2007-09-17 Dave Beckett * src/raptor_turtle_writer.c: Add xsd boolean, decimal, double, integer URIs to structure (raptor_turtle_writer_literal): Use raptor_uri_equal instead of strcmps. In Redland, this means no strcmps. * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_start): Remove call to raptor_turtle_writer_base since raptor_new_turtle_writer will do it if necessary. * src/raptor_turtle_writer.c: (raptor_new_turtle_writer): Call raptor_turtle_writer_base with initial base URI if there is one. (raptor_turtle_writer_base): Adedd. Back to possibly generating a relative base, allowing this to be called multiple times and setting the actual writer base URI, potentially to NULL. (main): Adjust expected result to expect an @base * tests/turtle/test-28-out.ttl: @base and relative prefix * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: (raptor_turtle_writer_base): Added to generate @base as an absolute URI. (raptor_turtle_serialize_start): Call it if there is an output base URI. 2007-09-16 Dave Beckett * docs/raptor-sections.txt: Add raptor_uri compare_func funcs * tests/turtle/manifest.ttl: Added test-26 to test-30 to manifest. * src/raptor_uri.c: (main): Ensure called is inited * src/raptor_uri.c: (main): Add tests for raptor_uri_compare and interface versioning. * src/raptor_uri.c: (raptor_uri_set_handler): Adjust handler to not have to point to const data and to have V1 or V2 declared by setting the initialised field. Truncate it to 1 or 2. (raptor_uri_compare): Use interface version to decide whether to invoke the uri_compare method. (struct raptor_uri_default_handler): Set URI Interface version to 2. * src/raptor.h: (struct raptor_uri_handler): Add URI Interface versions 1 and 2 - adding raptor_uri_compare_func. Overload the 'initialised' field to store the API version. Existing Redland sets that to 1. (raptor_uri_set_handler): Adjust handler to not have to point to const data. * configure.ac, docs/libraptor.3, docs/raptor-parsers.xml, raptor.rdf.in, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Remove RDFa support for now 2007-09-15 Dave Beckett * docs/libraptor.3: 1.4.16 2007-09-15 Dave Robillard * src/raptor.h, src/raptor_uri.c: (raptor_uri_handler): Move new raptor_uri_compare method to end of struct to limit ABI breakage. 2007-09-15 Dave Beckett * src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_set.c: Make raptor_set_test less chatty * tests/turtle/Makefile.am: Re-added test-30 now it's in SVN * tests/turtle/test-30.out, tests/turtle/test-30.ttl: test-30 for @base 2007-09-15 Dave Robillard * docs/tmpl/section-uri.sgml, src/raptor.h, src/raptor_abbrev.c, src/raptor_uri.c: (raptor_uri_compare): Added for librdf overloading (rather than using strcmp directly). * tests/turtle/Makefile.am: Remove references to nonexistant test-30 * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Use AVL tree rather than sequence for abbreviated serialisers (turtle & rdfxmla), significant performance improvement for large serialisations. (raptor_abbrev_node_lookup): Use AVL tree search against abbrev_node instead of linear sequence search. (raptor_abbrev_node_cmp): Adapt old raptor_abbrev_node_equals to provide strcmp-like ordering. (raptor_abbrev_node_equals): Change to trivial wrapper around new raptor_abbrev_node_cmp. 2007-09-14 Dave Robillard * src/raptor_serialize_turtle.c: Fix unwanted blank line at end of Turtle list abbreviation. e.g. before: :foo :bar ( 1 2 3 ) . after: :foo :bar ( 1 2 3 ) . 2007-09-11 Dave Beckett * src/turtle_lexer.l, src/turtle_parser.y: Added turtle @base * tests/turtle/Makefile.am: Adde test-30 for @base 2007-09-08 Dave Beckett * src/raptor_sax2.c: (raptor_sax2_finish): Reset libxml error handlers to defaults. Fixes Issue#0000232 http://bugs.librdf.org/mantis/view.php?id=232 2007-09-06 Dave Beckett * src/turtle_common.c: docs fix 2007-09-03 Dave Beckett * src/turtle_lexer.l: {QUOTEDURI}: Apply turtle escapes to URIs * tests/turtle/test-29.out, tests/turtle/test-29.ttl: Fix line endings of test-29 * tests/turtle/Makefile.am, tests/turtle/test-29.out, tests/turtle/test-29.ttl: test-29: Test all ntriples/turtle escapes U+0001 to U+007F * src/snprintf.c: Define __USE_ISOC99 to 1 * src/raptor_rss.c: (raptor_rss_end_element_handler): Fixed a bug that silently discarded non-empty fields -- oops. * src/raptor_rss.c: raptor_rss_uplift_map: copy atom:updated to dc:date * configure.ac: Make sure to define HAVE_CURL_CURL_H when curl/curl.h is found 2007-09-01 Dave Beckett * docs/libraptor.3: Added RDFa 2007-08-28 Dave Beckett * docs/libraptor.3: Added description of new 1.4.16 functions 2007-08-27 Dave Beckett * src/raptor_grddl.c: GRDDL and RDFa * src/snprintf.c: just leave raptor_format_float for now. * docs/rdfcat.c, docs/rdfprint.c, docs/rdfserialize.c: Added C examples 2007-08-26 Dave Beckett * docs/raptor-tutorial-parsing.xml: parsing filtering tutorial docs * docs/raptor-parsers.xml: GRDDL docs * src/raptor_grddl.c: (raptor_grddl_fetch_uri): Set WWW timeout from value of new parser feature RAPTOR_FEATURE_WWW_TIMEOUT * src/raptor.h, src/raptor_feature.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added parser feature RAPTOR_FEATURE_WWW_TIMEOUT 2007-08-25 Dave Beckett * src/raptor_general.c, src/raptor_nfc.c, src/raptor_serialize_ntriples.c, src/raptor_xml.c: Use raptor_unichar instead of unsigned long for a Unicode codepoint * src/raptor_utf8.c: (raptor_unicode_char_to_utf8, raptor_utf8_to_unicode_char, raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml11_namechar, raptor_unicode_is_xml10_namechar raptor_unicode_is_namestartchar, raptor_unicode_is_namechar): Updated to take a raptor_unichar argument. * src/raptor_internal.h: Update the raptor_unicode_* functions that take a unicode char to use raptor_unichar: raptor_unicode_is_namestartchar and raptor_unicode_is_namechar * src/raptor.h: Define raptor_unichar for a Unicode codepoint instead of unsigned long. Update the raptor_unicode_* functions that take a unicode char to use it: raptor_unicode_char_to_utf8, raptor_utf8_to_unicode_char, raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml11_namechar and raptor_unicode_is_xml10_namechar. * src/raptor_nfc.h: Remove unused u32 * src/raptor.h: Document RAPTOR_FEATURE_HTML_LINK * src/snprintf.c: raptor_format_float not public * docs/libraptor.3: 1.4.16 2007-08-24 Dave Beckett * utils/rapper.c: word 2007-08-24 Dave Robillard * AUTHORS: Test commit (added undeserving self to AUTHORS). 2007-08-24 Dave Beckett * tests/turtle/Makefile.am: (check-turtle-serialize-syntaxs): srcdir added for diff and cmp 2007-08-19 Dave Robillard * AUTHORS: Added Dave Robillard 2007-08-19 Dave Beckett * utils/rapper.c: words * utils/rapper.1: Added -I/--input-uri and -O/--output-uri * utils/rapper.c: Added -I/--input-uri and -O/--output-uri to set the input/parser base URI and output/serializer base URI directly Defaults remain the same - the serializer base URI defaults to the input base URI, however it was set. Tidied the verbose messages to mention parser name. Added a message for the serializer name too. 2007-08-18 Dave Beckett * src/turtle_parser.y: (raptor_turtle_parser_register_factory): Make default application/x-turtle for now * src/raptor_parse.c: (raptor_parser_factory_add_mime_type): docs were wrong. * src/raptor_serialize_dot.c: (raptor_dot_serializer_end): Handle a missing base URI. Fixes Issue#0000216 http://bugs.librdf.org/mantis/view.php?id=216 2007-08-17 Dave Beckett * src/raptor.h: Applied raptor part of symbian portability fix for Issue#0000203 http://bugs.librdf.org/mantis/view.php?id=203 2007-08-14 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Apply a negative score if html is in the mime type. Do not recognize as rdf if * src/raptor_xml_writer.c: (main) Quieter unit test * src/snprintf.c: #ifdef out unused dopr_outch prototype * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string): Take const string arg. * src/raptor_internal.h: Update prototypes for raptor_turtle_writer_quoted and raptor_turtle_writer_literal to take const string args. * src/raptor_turtle_writer.c: (raptor_turtle_writer_quoted, raptor_turtle_writer_literal): const string args. (main): Unit tests * src/raptor_turtle_writer.c: (raptor_turtle_writer_double): Renamed from snprint_turtle_double and now goes direct to the writer's iostream. Serialize NaN, -INF and INF numbers * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Use raptor_format_float to format decimals. * src/Makefile.am: Added snprintf.c * src/snprintf.c: (raptor_format_float): Renamed from fmtfp and edited to be XSD rules. * src/raptor_internal.h: Added raptor_format_float * src/raptor_parse.c: (raptor_parse_file_stream): C99 * tests/turtle/test-28-out.ttl, tests/turtle/test-28.out, tests/turtle/test-28.ttl: Update test-28 results for truncating to precision * tests/turtle/Makefile.am: Remove test-28 from roundtrip exact test * tests/turtle/Makefile.am: minor fix * tests/turtle/Makefile.am: (check-turtle-serialize-syntax): diff always in text * tests/turtle/test-28-out.ttl: fix expected output * tests/turtle/Makefile.am: comment * tests/turtle/Makefile.am, tests/turtle/test-28-out.ttl, tests/turtle/test-28.out: Check test-28 for exact syntax returned as well as triples 2007-08-02 Dave Beckett * src/raptor_parse.c: (raptor_parse_file_stream): Always NULL terminate the read buffer. * tests/turtle/Makefile.am, tests/turtle/test-28.out, tests/turtle/test-28.ttl: Added test-28.ttl test-28.out for serializing xsd:double 2007-07-29 Dave Beckett * src/raptor_set.c: (main): Make test silent when successful. * src/raptor_avltree.c: remove debug * src/raptor_set.c: comment * src/raptor_avltree.c: print_string is not needed unless debugging * src/raptor_set.c: Switch to use raptor_avltree for ID sets * src/raptor_avltree.c, src/raptor_internal.h: Rename constructor and destructor * src/raptor_avltree.c: (main): Make test silent when successful. * src/raptor_avltree.c: Conditionalise detailed AVL-tree debugging * src/Makefile.am: Add raptor_avltree_test to TESTS * src/Makefile.am, src/raptor_avltree.c, src/raptor_internal.h: Added AVL-Tree code 2007-07-19 Dave Beckett * src/raptor_serialize.c: docs 2007-07-13 Dave Beckett * src/raptor_turtle_writer.c: (snprint_turtle_double): Tidy to remove several strlen()s * src/raptor_serialize_rss.c: cast * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Do not debug die when rdf:Seq node is a blank node. 2007-07-08 Dave Beckett * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_start): Pass on the xml declaration feature to the xml writer. Fixes Issue #0000210 http://bugs.librdf.org/mantis/view.php?id=210 * src/raptor_grddl.c: struct raptor_grddl_parser_context_s gains html_link_processing to enable looking for with RDF/XML value. (raptor_grddl_parse_init_common): Enable html by default. (raptor_rdfa_parse_init): Disable html for RDFA parser. (raptor_grddl_parse_chunk): Check for html available as well as allowed by feature. 2007-07-05 Dave Beckett * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_feature.c, src/raptor_grddl.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_HTML_LINK to control GRDDL looking for html 2007-07-04 Dave Beckett * src/raptor_grddl.c: (grddl_free_xml_context): Free the context itself. (raptor_grddl_parser_add_parent): Deleted, merged into raptor_grddl_new_child_parser. Delete html:link entry from table for now - handle rdf/xml links specially later. (raptor_grddl_copy_state): Added, pulled out of raptor_grddl_ensure_internal_parser (raptor_grddl_ensure_internal_parser): Call raptor_grddl_copy_state (raptor_grddl_new_child_parser): Added, from raptor_grddl_ensure_internal_parser and raptor_grddl_parser_add_parent to allocate a new parser rather than overwrite the 'internal_parser'. (raptor_grddl_fetch_uri): Set/reset the content type handler eachtime. (raptor_grddl_run_xpath_match): Free URI after calculating relative to base. (raptor_grddl_run_recursive): Gains filter arg, again. Use raptor_grddl_new_child_parser to make a new (GRDDL) raptor_parser* and free it here when done. (raptor_grddl_parse_chunk): Add new filter arg to raptor_grddl_run_recursive Look for with RDF expected, not an XSLT transform URI. * src/raptor_www_curl.c: (raptor_www_curl_header_callback): Handle multiple type headers appearing, overwriting - such as during an HTTP redirect. 2007-07-03 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_discard_message): Report discarded errors when debugging. (raptor_grddl_parse_chunk): Run XML then HTML parsing in sequence, discarding all errors here. Restore the error handlers afterwards. Move tidying up of buffers to function exit tidying. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Tidy output to say "HTML Parser" not "XML HTML Parser" 2007-07-02 Dave Beckett * src/raptor_grddl.c: style * src/raptor_grddl.c: match-table gains: looking for * utils/rapper.c: Remove const for print_graph * src/raptor_serialize_turtle.c: raptor_turtle_context gains rdf_nil_uri. Tidy some error messages to remove ()s (raptor_turtle_emit_subject_collection_items): At the object of an rdf:rest, if it's blank, check it exists and make it the new subject, otherwise check it's a URI called rdf:nil. (raptor_turtle_serialize_init, raptor_turtle_serialize_terminate): Init/free rdf:rest URI. Fixes Issue#0000207 http://bugs.librdf.org/mantis/view.php?id=207 * tests/Makefile.am, tests/ex-62.rdf: Added ex-62 for Issue#0000207 2007-06-23 Dave Beckett * src/snprintf.c: style, ANSI C and std headers * src/snprintf.c: Import Public Domain snprintf from mutt: http://dev.mutt.org/hg/mutt/file/55cd4cb611d9/snprintf.c Last Modified: Tue Aug 08 22:49:12 2006 +0000. 2007-06-20 Dave Beckett * raptor.rdf.in: Set Project URI Update syntaxes * src/raptor_grddl.c: Add XSLT security (raptor_init_parser_grddl_common): Deny reading, writing to files, creating directories or writing to network. (raptor_terminate_parser_grddl_common): Tidy up xslt security prefs. 2007-06-19 Dave Beckett * src/raptor.h: raptor_graph_handler without const uri * tests/Makefile.am: Add trig dir * docs/raptor-parsers.xml: Update GRDDL Add RDFa and TRiG * utils/rapper.1: Added --show-graphs * utils/rapper.c: Added --show-graphs option to print named graph URIs as seen * tests/trig, tests/trig/Makefile.am, tests/trig/example1.out, tests/trig/example1.trig, tests/trig/example2.out, tests/trig/example2.trig, tests/trig/example3.out, tests/trig/example3.trig: Added TRiG tests * configure.ac: Add trig parser support, enabled by default. * src/Makefile.am: Added RAPTOR_PARSER_TRIG sharing turtle parser code * src/raptor.h: Added raptor_graph_handler Added raptor_set_graph_handler * src/raptor_parse.c: (raptor_parsers_init): Call raptor_init_parser_trig. (raptor_set_graph_handler): Added to get graph name callbacks. (raptor_parser_set_graph_name): Added internal function. * src/turtle_common.h: struct raptor_turtle_parser_s gains trig flag. * src/raptor_internal.h: struct raptor_parser_s gains field graph_handler Added raptor_init_parser_trig and raptor_parser_set_graph_name prototypes. * src/turtle_parser.y: Add TRiG support. New tokens LEFT_CURLY, RIGHT_CURL, COLONMINUS ({, } and :-) New token graphName (colonMinusOpt): Added for TRiG's optional :- (graph): Added for TRiG graph name before { ... graph ... } (graphName): Added for TRiG (graphBody): Added for TRiG (triplesList): Added for TRiG (terminatedTriples): Added. (statement): uses graph, terminatedTriples (triples): Added, pulled out of statement (raptor_trig_parse_recognise_syntax): Recognise trig in url. (raptor_trig_parser_register_factory): Added for TRiG (raptor_init_parser_trig): Added for TRiG * src/turtle_lexer.l: Add { } and :- for TRiG 2007-06-12 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_uri): Hack locator URI so errors with XSLT are reported against that URI not the documents. * src/raptor_grddl.c: (raptor_grddl_fetch_uri): Fix accept header * src/raptor_grddl.c: Use /* for root element * src/raptor_grddl.c: XML @dataview:transformation are only on the root element. * src/raptor_grddl.c: (raptor_grddl_check_recursive_content_type_handler): Renamed from raptor_grddl_check_rdf_content_type_handler since it stores all content types now. Check for HTML content type and set html_base processing flag (raptor_grddl_run_recursive): Remove allow_rdf flag, always true. * src/raptor_grddl.c: struct raptor_grddl_parser_context_s gains xinclude_processing and html_base_processing flags. (raptor_grddl_parse_init_common): Initialise grddl, xinclude but not html base. (raptor_rdfa_parse_init): Disable grddl, xinclude and init html base. (raptor_grddl_run_xpath_match): If html_base_processing is enabled, switch XML doc type to XML_HTML for the xmlNodeGetBase() call and restore afterwards. (raptor_grddl_parse_chunk): Look for HTML or XHTML mime types to enable html_base_processing. Conditionalise XML Include processing with xinclude_processing flag. 2007-06-10 Dave Beckett * src/raptor_grddl.c: Debug message madness! (raptor_grddl_parse_chunk): After xinclude processing, reserialize the document DOM so it can be parsed later as RDF/XML if needed. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Recognise root rdf:RDF element and process as RDF/XML. Fix RDF/XML parsing of doc to not filter triples. * utils/rapper.c: If no base URI is given, do not set it * src/raptor_grddl.c: (raptor_grddl_run_recursive): Send to right parser. * tests/ex-61.nt, tests/ex-61.out (from /raptor/trunk/tests/ex-61.nt:12321): Rename ex-61.nt to ex-61.out * src/raptor_grddl.c: (raptor_grddl_parse_uri_write_bytes): Removed. (raptor_grddl_run_recursive): Use typedef raptor_parse_bytes_context with raptor_parse_uri_write_bytes as a handler for starting parse lazily * src/raptor_parse.c: Moved raptor_parse_bytes_context to raptor_internal.h (raptor_parse_uri_write_bytes): No longer static. * src/raptor_internal.h: Added raptor_parse_bytes_context Export raptor_parse_uri_write_bytes handler for use with GRDDL fetch. * src/raptor_parse.c: Added raptor_parse_bytes_context typedef (raptor_parse_uri_write_bytes): Use the above to look if this is the first time called, and if so, determine the base URI from the user's set base URI, the final URI from protocol, or otherwise, the resolved URI. This prevents calling raptor_start_parse() until the first byte is seen (and thus the base URI, protocol context is known) (raptor_parse_uri_with_connection): Explains the base URI rules in detail. Remove call to raptor_start_parse() and initialse the rpbc block. * src/raptor_www_curl.c: (raptor_www_curl_update_status): set final_uri and call final_uri_handler if set * src/raptor_www.c: (raptor_www_set_final_uri_handler): Added. * src/raptor.h: Added raptor_www_final_uri_handler typedef. Added raptor_www_set_final_uri_handler prototype. * src/raptor_internal.h: raptor_www gains final_uri_userdata and final_uri_handler; * src/raptor_internal.h: struct raptor_www_s gains a checked_status flag * src/raptor_www_curl.c: (raptor_www_curl_update_status): Added. (raptor_www_curl_write_callback): Call raptor_www_curl_update_status from here when first byte arrives, before any parsing. (raptor_www_curl_fetch): Move getting final URI earlier - above. * src/raptor_www_curl.c: typo * tests/Makefile.am, tests/ex-61.nt, tests/ex-61.rdf: Added ex-61 * src/raptor_www_curl.c: (raptor_www_curl_fetch): Save final URI * src/raptor_www.c: (raptor_www_get_final_uri): Added. * src/raptor.h: Added raptor_www_get_final_uri prototype * src/raptor_internal.h: struct raptor_www_s gains a final_uri field * src/raptor_sax2.c: (raptor_sax2_inscope_xml_language): Turn xml:lang="" into a NULL result. * src/raptor_grddl.c: (raptor_grddl_run_recursive): Zaps error handlers on recursive parse when ignore_errors set. * src/raptor_grddl.c: (raptor_grddl_fetch_uri): flags argument (was ignore_errors) can now send a different accept header. (raptor_grddl_run_grddl_transform_uri): Call raptor_grddl_fetch_uri and expect XSLT. (raptor_grddl_run_recursive): Call raptor_grddl_fetch_uri and ignore errors. * src/raptor_grddl.c: (raptor_grddl_discard_message): Added. (raptor_grddl_fetch_uri): Added ignore_errors argument to set the raptor_www error handler to raptor_grddl_discard_message (raptor_grddl_run_grddl_transform_uri): Do not discard errors from raptor_grddl_fetch_uri call. (raptor_grddl_run_recursive): Added ignore_errors argument and use it to return 0 with no warnings, when errors happen. (raptor_grddl_parse_chunk): Run namespace URI recursive grddl while discarding errors. Run head profile URIs recursive grddl while discarding errors. * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Pass in an xml context and use the base URI there rather than the parser's. (raptor_grddl_run_grddl_transform_uri): Pass on the xml context to the above. 2007-06-09 Dave Beckett * docs/tmpl/section-www.sgml: Added raptor_www_set_connection_timeout * docs/tmpl/section-feature.sgml: new feature @RAPTOR_FEATURE_MICROFORMATS * docs/raptor-sections.txt: Added raptor_www_set_connection_timeout * src/raptor_www_curl.c: (raptor_www_curl_init): Use www->connection_timeout. * src/raptor_www.c: (raptor_www_new_with_connection): Init connection timeout to 10s (raptor_www_set_connection_timeout): Added. * src/raptor.h: Add raptor_www_set_connection_timeout * src/raptor_internal.h: raptor_www gains connection_timeout * src/raptor_www_curl.c: (raptor_www_curl_init): Set a 10 second connection timeout. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): For HTTP error only, append str1 to the error. * src/raptor_grddl.c: Use XML base URI passed around with the grddl_xml_context. (raptor_new_xml_context): Renamed from raptor_sequence_push_xml_context, moving sequence push to main code. (raptor_rdfa_parse_init): Push URI for RDFa in raptor_grddl_parse_start. (raptor_grddl_parse_start): Add XML context for RDFa here. (raptor_grddl_add_transform_xml_context): Renamed from raptor_grddl_add_transform_uri (raptor_grddl_run_grddl_transform_doc): If there is no parser name guessable, return. (raptor_grddl_run_grddl_transform_uri): Take a grddl_xml_context* arg instead of raptor_uri. 2007-06-06 Dave Beckett * src/raptor_grddl.c: Added grddl_xml_context structure. Transform and profile URI raptor_sequences are now sequences of grddl_xml_context structures. (raptor_sequence_push_xml_context, grddl_free_xml_context): Added. (raptor_grddl_parse_init_common): No need for raptor_libxml_init_generic_error_handlers, raptor_new_sax2 does it. Initialise raptor_sequence with grddl_free_xml_context. (raptor_grddl_add_transform_uri): Use raptor_sequence_push_xml_context. (raptor_grddl_filter_triples): Use grddl_xml_context for profile_uri sequence. (raptor_grddl_run_xpath_match): Use grddl_xml_context for URI results. (raptor_grddl_parse_chunk): Use raptor_sequence_push_xml_context for former URI sequences. * src/raptor_libxml.c: (raptor_libxml_generic_error): Now external, not static. Call raptor_log_error_varargs direct, no mention of sax2, locator is from error_handlers. (raptor_libxml_init_generic_error_handlers): Removed. (raptor_libxml_xmlStructuredErrorFunc): Add err->str1 to message if it's given. * src/raptor_www_libxml.c: (raptor_www_libxml_http_error): Deleted, no longer needed. (raptor_www_libxml_init): Set xml generic error context, but save old one. (raptor_www_libxml_free): Restore old xml generic error context. * src/raptor_www.c: (raptor_www_new_with_connection): Init RAPTOR_ERROR_HANDLER_MAGIC (raptor_www_set_error_handler): Use error_handlers (raptor_www_error_varargs): Removed, merged into raptor_www_error (raptor_www_error): Call raptor_log_error_varargs here. * src/raptor_sax2.c: (raptor_new_sax2): Set xmlSetGenericErrorFunc here with the same context pointer as for structured errors. * src/raptor_parse.c: (raptor_new_parser): Init RAPTOR_ERROR_HANDLER_MAGIC * src/raptor_internal.h: removed raptor_libxml_init_generic_error_handlers prototype added raptor_libxml_generic_error prototype raptor_www gains old_xmlGenericErrorContext for libxml and error_handlers replacing older error_data, error_handle. removed raptor_www_error_varargs prototype * src/raptor_sax2.c: SAX2 error_handler fix for expat * tests/turtle/Makefile.am, tests/turtle/test-27.out, tests/turtle/test-27.ttl: Added turtle test test-27 for scope of @prefix 2007-06-04 Dave Beckett * src/raptor_grddl.c: Do an additional RDF/XML parse of content that is found to be RDF/XML by mime type during recursive GRDDL, and an additional parse of the top level content too, if also found. * src/raptor_parse.c: (raptor_parser_copy_user_state): Copy last feature too! * src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_MICROFORMATS * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Use feature RAPTOR_FEATURE_MICROFORMATS to dis/enable checking for hardcoded microformats * src/raptor_feature.c: C * src/raptor_feature.c: raptor_features_list gains RAPTOR_FEATURE_MICROFORMATS with name 'microformats' * src/raptor.h: Added RAPTOR_FEATURE_MICROFORMATS * src/raptor_grddl.c: Remove C++ comment * src/raptor_grddl.c: Added MATCH_LAST to stop searching for hardcoded sheets. Add hReview sheet that if matches, stops looking for later microformats such as hCard. (raptor_grddl_parse_chunk): Use MATCH_LAST to stop looking for later hardcoded matches. (raptor_init_parser_grddl_common, raptor_terminate_parser_grddl_common): Added, called once for grddl or rdfa available. * src/raptor_parse.c: (raptor_parsers_init): Call raptor_init_parser_grddl_common for GRDDL or RDFA parsers. (raptor_parsers_finish): Call raptor_terminate_parser_grddl_common for GRDDL or RDFA parsers. * src/raptor_internal.h: Add prototypes for raptor_init_parser_grddl_common and raptor_terminate_parser_grddl_common * src/raptor_grddl.c: (raptor_grddl_add_transform_uri): Added, to add a transformation URI (XSLT) for a document, removing duplicate URIs. (raptor_grddl_filter_triples, raptor_grddl_parse_chunk): Use raptor_grddl_add_transform_uri. 2007-06-03 Dave Beckett * configure.ac, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Add RDFa parser 2007-05-27 Dave Beckett * src/raptor_serialize.c: (raptor_serializer_register_factory): Fix debug call with RAPTOR_DEBUG>1 Fixes Issue#0000195 http://bugs.librdf.org/mantis/view.php?id=195 2007-05-26 Dave Beckett * src/raptor_uri.c: (raptor_uri_filename_to_uri_string): Make path_max bigger *2, not smaller /4. Fixes Issue#0000192 http://bugs.librdf.org/mantis/view.php?id=192 * src/n3_parser.y: (n3_parser_error): Invoke raptor_parser_simple_error with a format string and arg. * src/turtle_parser.y: (turtle_parser_error): Invoke raptor_parser_simple_error with a format string and arg. * src/raptor.h: Allow _declspec and __declspec Fixes Issue#0000188 http://bugs.librdf.org/mantis/view.php?id=188 2007-05-23 Dave Beckett * docs/tmpl/section-feature.sgml: Add RAPTOR_FEATURE_HTML_TAG_SOUP 2007-05-21 Dave Beckett * configure.ac: Check for libxml/nanohttp.h only once the xml-config include paths have been setup. * configure.ac: Add -Wformat-security 2007-05-14 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Use HTML_PARSE_RECOVER if available * src/raptor.h, src/raptor_feature.c, src/raptor_grddl.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added parser feature RAPTOR_FEATURE_HTML_TAG_SOUP aka htmlTagSoup for use by GRDDL parser * src/raptor_libxml.c: debug bogus pointers not fail temporarily * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Move buffer editing to raptor_guess_parser_name. * src/raptor_parse.c: (raptor_guess_parser_name): Only run recognise_syntax with first N bytes of content * src/raptor_grddl.c: debugmsg * src/raptor_grddl.c: Use HTML parser when XML parser fails, to create a DOM for GRDDLing from invalid/not-WF HTML content. raptor_grddl_parser_context_s gains htmlParserCtxt as well as xmlParserCtxt and process_this_as_rdfxml GRDDL flag to know when to parse the content twice. (raptor_grddl_parse_terminate): Tidy htmlParserCtxt. Add MATCH_IS_HARDCODED to match_table just to make it clear. (match_table): Re-enable hcalendar and hcard as hardcoded XSLTs (raptor_grddl_run_xpath_match): Handle non-namespace elements. Handle MATCH_IS_HARDCODED and return on first match. (raptor_grddl_parse_chunk): Major change in structure - all content passed in is saved until is_end=1, then parsed with XML parser and if that fails, HTML parser. HTML parser is run with no errors or warnings. 2007-05-11 Dave Beckett * src/turtle_parser.y: (raptor_turtle_parse_recognise_syntax): Look for turtle @prefix and rdf namespace use in buffer. * src/n3_lexer.l: Add rule to allow a comment on the last line, without a final newline * src/turtle_lexer.l: Add rule to allow a comment on the last line, without a final newline * tests/turtle/Makefile.am, tests/turtle/test-26.out, tests/turtle/test-26.ttl: Add test-26 2007-05-10 Dave Beckett * src/raptor_rdfxml.c: 's 2007-05-09 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Recognize rdf entities as namespaces. Add bonus points for using the words rdf and rdf 2007-05-08 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Only use first 512 bytes of content for hunting for namespaces. 2007-04-26 Dave Beckett * src/raptor_internal.h: struct raptor_www_s loses useless old_handler field for www_libxml * src/raptor_www_libxml.c: (raptor_www_libxml_init, raptor_www_libxml_free): Set, reset generic error func. * src/raptor_internal.h: Fix raptor_parse_date prototype * src/raptor_libxml.c: (raptor_libxml_init_generic_error_handlers): Use xmlSetGenericErrorFunc * src/parsedate.y: ANSI C function prototypes. * src/parsedate.y: Prototype for raptor_parse_date 2007-04-24 Dave Beckett * src/raptor_general.c: raptor_log_level_labels make it the right size * src/raptor_grddl.c, src/raptor_parse.c, src/raptor_sax2.c: Update for error_handlers arrays. * src/raptor_libxml.c: (raptor_libxml_warning): Update for error_handlers arrays. Also do not send an error to the warning handlers. (raptor_libxml_error_common, raptor_libxml_validation_warning): Update for error_handlers arrays. (raptor_libxml_xmlStructuredErrorFunc): Add xpath to the error message when the domain is XML_FROM_XPATH. Ignore error_handlers if the pointer is bogus. Use the arrays. If error_handler is NULL, ignore it. * src/raptor_general.c: (raptor_error_handlers_init): Init error handler array fields and magic field. * src/raptor_internal.h: raptor_error_handlers now contains arrays of user_data and handlers and a magic field to check that an error_handler pointer is valid. 2007-04-22 Dave Beckett * autogen.sh: Update autogen.sh 2007-04-14 Dave Beckett * src/raptor_serialize_turtle.c: (raptor_turtle_emit_literal, raptor_turtle_emit_xml_literal): Send namespace stack to raptor_turtle_writer_literal * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Add nspace field and use it to look up if a qname can be used for a datatype URI. * src/raptor_internal.h: raptor_turtle_writer_literal gains nspace field * src/raptor_parse.c: (raptor_guess_parser_name): Make suffix decoding work again 2007-04-10 Dave Beckett * src/raptor_rss.c: (raptor_rss_parse_recognise_syntax): One more addition in the neverending guesswork that is rss tag soup. This time for sites that have feed in the DNS name, or just somewhere in the URL. * src/raptor_parse.c: (raptor_guess_parser_name): Discard suffixes that are not '\.[a-zA-Z0-9]+$' 2007-03-27 Dave Beckett * configure.ac: Check for curl header after inserting any cflags from curl-config. This lets the curl test work when curl the includes are not in the usual places 2007-03-26 Dave Beckett * configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.16 * Snapshotted raptor_1_4_15 for 1.4.15 release (SVN r12027) * src/raptor_grddl.c: (raptor_grddl_parser_register_factory): Register XHTML mime type higher, very unlikely another parser is dealing with this. * src/raptor_rss.c: (raptor_rss_parse_recognise_syntax): Make mime type heuristics ignore anything with html in it so XHTML mime type is ignored. 2007-03-25 Dave Beckett * src/raptor_internal.h: raptor_uri_detail_s gains is_hierarchical flag. * src/raptor_rfc2396.c: (raptor_new_uri_detail): Set is_hierarchical flag. (raptor_uri_resolve_uri_reference): Handle a non-hierarchical base URI. Fixes Issue#0000177 http://bugs.librdf.org/mantis/view.php?id=177 (main): Fix above changes an earlier test: From: resolve("foo:", "not_scheme:blah") => "foo:/not_scheme:blah" To: resolve("foo:", "not_scheme:blah") => "foo:not_scheme:blah" * src/raptor_rfc2396.c: (main): Add test to confirm report from Issue#000177 http://bugs.librdf.org/mantis/view.php?id=177 * utils/rapper.c: Print all informational and help messages to stderr. Only results of parsing and the help (-h/--help) message goes to stdout now. 2007-03-22 Dave Beckett * src/raptor_xml_writer.c, src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_parse.c: Casts for C++ * examples/grapper.c: Use library variables for license, home page * examples/grapper.c: Casts and C99 fixes * src/raptor_rss.h: Fix CONTENT_NAMESPACE_URI to correct URI 2007-03-19 Dave Beckett * utils/rapper.c: NULL base URI * tests/Makefile.am: Set rapper output baseuri to NULL via '-' * utils/rapper.1, utils/rapper.c: Allow base uri '-' for no output base URI * src/raptor_www.c: (raptor_www_fetch): If a request returns a status code that is not success, generate an error message. * src/raptor_www_curl.c: (raptor_www_curl_fetch): Enhance failure error message 2007-03-15 Dave Beckett * src/raptor_serialize_rss.c: Adjust the xml:base attribute adding to put it next to the raptor_xml_writer_start_element of the root element. * src/raptor_serialize_rdfxmla.c: raptor_rdfxmla_serializer_context gains xml_nspace field. (raptor_rdfxmla_serialize_init, raptor_rdfxmla_serialize_terminate): Init/free xml namespace. (raptor_rdfxmla_ensure_writen_header): Write xml:base when a base URI is given. Addresses Issue #0000174 http://bugs.librdf.org/mantis/view.php?id=174 * src/raptor_serialize_rdfxml.c: raptor_rdfxml_serializer_context gains xml_nspace field. (raptor_rdfxml_serialize_init, raptor_rdfxml_serialize_terminate): Init/free xml namespace. (raptor_rdfxml_ensure_writen_header): Write xml:base when a base URI is given. Addresses Issue #0000174 http://bugs.librdf.org/mantis/view.php?id=174 2007-03-12 Dave Beckett * src/raptor_rss.c, src/raptor_serialize_rss.c: Replace shared nspaces list with one per rss-parser/serializer. * src/raptor_rss.h: raptor_rss_namespace_info looses nspace field. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): In removing ./ do not go past end of buffer. 2007-03-11 Dave Beckett * src/raptor_grddl.c: struct raptor_grddl_parser_context_s gains content_type, content_type_check and stringbuffer for saved rdf/xml content. (raptor_grddl_parse_terminate): Free any saved content type or stringbuffer. (raptor_grddl_parse_start): Init type check. (raptor_grddl_libxml_discard_error): Restore, for discarding validation errors again. (raptor_grddl_parse_chunk): If content type was seen and type was application/rdf+xml, save content for later parsing as RDF/XML. Discard validation errors again. (raptor_grddl_parse_content_type_handler): Save content type header when passed in. (raptor_grddl_parser_register_factory): Register raptor_grddl_parse_content_type_handler. * src/raptor_parse.c: (raptor_guess_parser_name): Add any mime type q <10 to the score, don't lose it entirely. 2007-03-02 Dave Beckett * src/raptor_grddl.c: Alter match_table to look for substrings inside html:link@rel and html:a@rel Delete old hard-coded transforms for dc: never worked and embedded RDF: grddl profile support handles this now. * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Invoke xsltSetGenericErrorFunc here to get the right rdf_parser configured. * src/raptor_grddl.c: Handles GRDDL W3C Working Draft 2 March 2007 * src/raptor_grddl.c: (raptor_grddl_libxml_discard_error): Deleted. (raptor_grddl_parse_chunk): No longer ignore validation errors http://lists.w3.org/Archives/Public/public-grddl-comments/2007JanMar/0062.html 2007-02-15 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_uri): Return a warning and do not fail if XSLT sheet is not found (raptor_grddl_run_recursive): Return a warning and do not fail if the recursive GRDDL doc is not found. (raptor_grddl_parse_chunk): Tidy other errors. Add aborting on XInclude failure. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Do not get/set content when there was no internal parser. * src/raptor_grddl.c: (raptor_grddl_ensure_internal_parser): Unset user_data/statement_handler if filter is not used so that re-using the same parser with different filter now works. (raptor_grddl_fetch_uri): Add content_type_handler and content_type_user_data args and use them to call raptor_www_set_content_type_handler if not NULL. (raptor_grddl_run_grddl_transform_uri): Update raptor_grddl_fetch_uri call (raptor_grddl_check_rdf_content_type_handler): Handler to look for RDF MIME Type and trigger content saving if so. (raptor_grddl_run_recursive): Add allow_rdf argument to allow RDF/XML content to be processed if the type is right. (raptor_grddl_parse_chunk): For a namespace URI, run recursive and allow RDF/XML. If it was seen on return, create a new "rdfxml" parser and run it. Reorder setting the root_ns_uri profile earlier so that it can be recognised as a transform in RDF/XML namespace documents. * src/raptor_parse.c: (raptor_parse_chunk): If the stringbuffer is declared, save a copy of the bytes that pass by. (raptor_parser_save_content, raptor_parser_get_content): Added to trigger/reset saving content and to get the content back as a new string. * src/raptor_internal.h: raptor_parser gains a stringbuffer Added prototypes for raptor_parser_save_content and raptor_parser_get_content 2007-02-12 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_parse_init): Update raptor_new_sax2 call. Delete raptor_sax2_set_locator. * src/raptor_rss.c: (raptor_rss_parse_init): Update raptor_new_sax2 call. Delete raptor_sax2_set_locator. * src/raptor_rdfxml.c: (raptor_rdfxml_parse_init): Update raptor_new_sax2 call. Delete raptor_sax2_set_locator. * src/raptor_www.c: (raptor_www_error_varargs): Call raptor_log_error_varargs. * src/raptor_parse.c: (raptor_new_parser): Set locator and handlers/data in the error_handlers. (raptor_parser_fatal_error): Call raptor_log_error_varargs (raptor_parser_fatal_error_varargs): Removed. (raptor_parser_fatal_error_message_handler): call raptor_log_error. (raptor_parser_simple_error, raptor_parser_error_varargs, raptor_parser_warning): Call raptor_log_error_varargs. (raptor_parser_error_message_handler, raptor_parser_warning_message_handler): Call raptor_log_error. (raptor_set_fatal_error_handler, raptor_set_error_handler, raptor_set_warning_handler): Update for error_handlers (raptor_parser_copy_user_state): Copy raptor_error_handlers block. * src/raptor_sax2.c: (raptor_new_sax2): Just have error_handlers arg. Use xmlSetStructuredErrorFunc for better libxml errors (raptor_sax2_set_locator): Removed, not needed. (raptor_sax2_simple_error): Call raptor_log_error_varargs. (raptor_sax2_parse_start): Call xmlSetStructuredErrorFunc (raptor_sax2_parse_chunk): Call raptor_log_error_simple instead of directly calling the error handler. * src/raptor_libxml.c: (raptor_libxml_call_handler): Removed. (raptor_libxml_warning, raptor_libxml_error_common, raptor_libxml_validation_warning): Use raptor_log_error_varargs. (raptor_libxml_xmlStructuredErrorFunc): Use locator from the error_handlers. Call raptor_log_error. * src/raptor_general.c: (raptor_invoke_simple_message_varargs, raptor_invoke_message_varargs): Removed internal function. Added raptor_log_level_labels list. (raptor_log_error_simple, raptor_log_error_varargs, raptor_log_error): Added for new logging. (raptor_error_handlers_init): Added to init new structure * src/raptor_internal.h: Added raptor_error_handlers structure and remove the pointers from raptor_parser, raptor_sax2. Added raptor_log_level enum Removed raptor_invoke_message_varargs, raptor_invoke_simple_message_varargs Added raptor_error_handlers_init, void raptor_log_error_simple, void raptor_log_error_varargs, void raptor_log_error raptor_new_sax2 now just takes a raptor_error_handler* param Removed raptor_sax2_set_locator * utils/rapper.c: help text for -t/--trace 2007-02-11 Dave Beckett * src/raptor_libxml.c: #if LIBXML_VERSION >= not > * utils/rapper.1: Added -t/--trace option to show URIs traversed. * utils/rapper.c: Added -t/--trace option to show URIs traversed. (rapper_uri_trace): Added. (main): If tracing, register rapper_uri_trace as a URI filter function with raptor_parser_set_uri to see URis retrieved. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Call xmlSetStructuredErrorFunc to make most errors be printed much nicer. * src/raptor_internal.h: Added raptor_libxml_xmlStructuredErrorFunc prototype. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Added for sending libxml structured error messages back to a parser. 2007-02-10 Dave Beckett * src/raptor_grddl.c: Add XInclude headers (raptor_grddl_filter_triples): Renamed from raptor_grddl_relay_triples (raptor_grddl_filter_triples): Do not pass on triples, just look for transformation triples. (raptor_grddl_ensure_internal_parser): Add filter arg and if set for profile and namespace parsings, send triples via raptor_grddl_filter_triples. (raptor_grddl_run_grddl_transform_doc): Call raptor_grddl_ensure_internal_parser with no filtering when have got the resulting string and want to do a specific parse, not a recursive GRDDL. (raptor_grddl_run_recursive): Call raptor_grddl_ensure_internal_parser filtering when doing a recursive GRDDL - this is namespace or profile recursion. (raptor_grddl_parse_chunk): Run XML include processing. Do not try to call NULL profile URIs. Fix transformation loop to call all transformations, not just first. * src/raptor_grddl.c: (raptor_grddl_libxml_discard_error): Added to throw away libxml errors. (raptor_grddl_parse_chunk): Use raptor_grddl_libxml_discard_error to dicard XML validation errors since it seems the GRDDL spec doesn't care. * src/turtle_parser.y: (raptor_turtle_parse_recognise_syntax): Recognise n3 in mime type when N3 parser is not around. (raptor_turtle_parser_register_factory): Register low interest in text/rdf+n3 when N3 parser is not around. 2007-02-06 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Tidy up doc and xpath context on errors or success so that it is initialised next time for new documents. * src/raptor_grddl.c: (raptor_grddl_parser_add_parent): Do not set parent twice 2007-01-31 Dave Beckett * configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.15 * Snapshotted raptor_1_4_14 for 1.4.14 release (SVN r11863) 2007-01-28 Dave Beckett * src/raptor_grddl.c: (raptor_libxslt_error_common): Added. (raptor_grddl_xsltGenericError_handler): Added. (raptor_grddl_parse_init): Register raptor_grddl_xsltGenericError_handler to handle XSLT generic errors. (raptor_grddl_run_grddl_transform_doc): Set 'base' and 'Base' XSLT parameters to allow some XSLT sheets to work - pragmatism. * src/raptor_grddl.c: struct raptor_grddl_parser_context_s gains rdf_parser field. Add lots more debugging messages (raptor_grddl_parse_init): Init rdf_parser field. (raptor_grddl_parser_add_parent): Relay all triples to the parent grddl parser. (raptor_grddl_ensure_internal_parser): Lose relay flag - always relay. (raptor_grddl_parse_chunk): Copy root_ns_uri if not NULL. When processing head profile URIs, strip out the GRDDL profile URI before adding them to the grddl_parser->profile_uris sequence. 2007-01-27 Dave Beckett * configure.ac: Add AC_CHECK_FUNC(xsltInit) * src/raptor_grddl.c: (raptor_init_parser_grddl): Check for xsltInit * src/raptor_parse.c: (raptor_parsers_finish): Call raptor_terminate_parser_grddl when enabled. * src/raptor_internal.h: Added raptor_terminate_parser_grddl prototype * src/raptor_grddl.c: Add XML schema namespace to ignored namespace list. (raptor_grddl_parse_chunk): Copy root namespace URI when adding to a list. (raptor_terminate_parser_grddl): Added, to free up shared resources. * docs/libraptor.3: 1.4.14 * src/raptor_parse.c: autodocs * src/raptor_internal.h: Move raptor_turtle_writer to raptor_internal.h for now. * src/raptor.h: Move raptor_turtle_writer to raptor_internal.h for now. 2007-01-26 Dave Beckett * src/n3_parser.y, src/ntriples_parse.c, src/raptor_general.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Rename raptor_generate_id to raptor_parser_internal_generate_id with altered calling convention - pass in ID type * src/raptor.h: Adedd prototype for raptor_parser_generate_id * src/raptor_internal.h: raptor_parser_internal_generate_id renamed from raptor_generate_id. * src/raptor_parse.c: (raptor_parser_generate_id): Added as a public function, modified from previously internal raptor_generate_id(). (raptor_parser_internal_generate_id): Renamed from raptor_generate_id. 2007-01-16 Dave Beckett * utils/rapper.c: Add a another raptor_finish() before exit 2007-01-14 Dave Beckett * src/raptor_grddl.c: struct raptor_grddl_parser_context_s loses xpathObj (raptor_grddl_parse_terminate): Remove xpathObj tidy. Remove profile URIs from 'match_table' list of xpaths - now invoked on it's own. (raptor_grddl_relay_triples): Add relay triples debugging. Fix loop to properly walk through profile URIs (raptor_grddl_run_xpath_match): Added to invoke a match to an xpath returning a list of URIs as raptor_sequence. Code removed from raptor_grddl_parse_chunk. (raptor_grddl_run_recursive): Added to invoke a recursive GRDDL on a URI, sending triples back to the current parser. Code removed from raptor_grddl_parse_chunk. (raptor_grddl_parse_chunk): Use raptor_grddl_run_recursive to do most of the work. Invoke the early on before running general XPath matches. Use raptor_grddl_run_xpath_match to run general XPath matches. * utils/rapper.c: Use raptor_home_url_string and raptor_license_string in short and long usage messages. * src/raptor.h: Added raptor_home_url_string (replacing raptor_url) * src/raptor_general.c: raptor_home_url_string * src/raptor.h: Added raptor_url * src/raptor.h: Added raptor_license_string * src/raptor_general.c: 2007 and add raptor_license_string 2007-01-07 Dave Beckett * src/raptor_abbrev.c: (raptor_new_abbrev_node): Initialise with ref_count 1 (raptor_abbrev_node_lookup): Do not add ref_count here * tests/turtle/Makefile.am: (check-turtle-serialize): rdfdiff with a local file, not one in $(srcdir) * utils/rdfdiff.c: Apply the base URI to the to-file, if given. Otherwise use the from_file's URI. * tests/turtle/Makefile.am: (check-turtle-serialize): Add base URIs for the rdf-schema.ttl and rdfs-namespace.ttl * tests/turtle/Makefile.am: (check-turtle-serialize): Ensure it dies when a failure happens * tests/turtle/Makefile.am: (check-turtle-serialize): Call rdfdiff with -u to set base URI for input turtle. This allows test-00.ttl to produce the same absolute URIs each time and for round-trip serializing to work. * utils/rdfdiff.c: Added -u/--base-uri option to specify the from file base URI so that if the from file is a local file or relative URI, it can be given an absolute base. * tests/turtle/Makefile.am: (check-turtle-serialize): output serialization results to .ttl files * tests/turtle/Makefile.am: Add check-turtle-serialize to check-local 2007-01-05 Dave Beckett * src/raptor-config.1: Document --private-libs and explain what it is under --libs too. * src/raptor-config.in: Add --private-libs and move private @LIBS to that from --libs * raptor.pc.in: Use Libs.private for internal dynamically linked libraries raptor-1.4.21/raptor.spec.in0000644000175000017500000000661410773622542012636 00000000000000# -*- RPM-SPEC -*- %define name @PACKAGE@ %define version @VERSION@ %define release @RPM_RELEASE@ Summary: Raptor RDF Parser Toolkit for Redland Name: %{name} Version: %{version} Release: %{release} Prefix: %{_prefix} License: LGPL/Apache 2 Group: Development/Libraries Source: http://download.librdf.org/source/%{name}-%{version}.tar.gz URL: http://librdf.org/raptor/ BuildRoot: /tmp/%{name}-%{version} BuildRequires: libxml2 libxml2-devel curl curl-devel libxslt libxslt-devel Packager: Dave Beckett Docdir: %{_docdir} %description Raptor is the RDF Parser Toolkit for Redland that provides a set of Resource Description Framework (RDF) parsers and serializers, generating RDF triples from the following syntaxes: RDF/XML, N-Triples, TRiG, Turtle, RSS tag soup including all versions of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and XML. The serializing RDF triples to syntaxes are: RDF/XML, RSS 1.0, Atom 1.0, N-Triples, XMP, Turtle, GraphViz DOT and JSON. %package devel Summary: Libraries, includes etc to develop with Raptor RDF parser library Group: Development/Libraries Requires: raptor = %{version} Requires: libxml2-devel %description devel Libraries, includes etc to develop with Raptor RDF parser and serializer library. %prep %setup -q %build %configure --enable-release %{__make} OPTIMIZE="$RPM_OPT_FLAGS" %install [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_mandir}/man1 install -d $RPM_BUILD_ROOT%{_mandir}/man3 %makeinstall %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc AUTHORS COPYING COPYING.LIB ChangeLog LICENSE.txt NEWS README %doc LICENSE-2.0.txt NOTICE %doc *.html %doc %{_mandir}/man1/rapper.1* %doc %{_mandir}/man3/libraptor.3* %doc %{_datadir}/gtk-doc/html/raptor/* %{_libdir}/libraptor*.so.* %{prefix}/bin/rapper %files devel %defattr(-, root, root) %doc AUTHORS COPYING COPYING.LIB ChangeLog LICENSE.txt NEWS README %doc LICENSE-2.0.txt NOTICE %doc %{_mandir}/man1/raptor-config.1* %{prefix}/bin/raptor-config %{_libdir}/libraptor*.so %{_libdir}/libraptor*.a %{_libdir}/libraptor*.la %{_libdir}/pkgconfig/raptor.pc %{prefix}/include/* %changelog * Fri Jan 5 2007 Dave Beckett - Document Turtle and DOT serializers * Wed Feb 15 2006 Dave Beckett - Add libxslt and libxslt-devel for GRDDL * Wed Dec 20 2005 Dave Beckett - Update description of parsers and serializers. * Wed Nov 9 2005 Dave Beckett - Add gtk-doc documentation * Wed Aug 11 2005 Dave Beckett - Update Source: - Use %makeinstall * Wed Aug 10 2005 Dave Beckett - Use %configure and %{_make} * Thu Sep 9 2004 Dave Beckett - License now LGPL/Apache 2 - Added LICENSE-2.0.txt and NOTICE * Tue May 11 2004 Dave Beckett - Added RELEASE.html * Thu Apr 17 2003 Dave Beckett - Added pkgconfig raptor.pc, raptor-config - Requires curl * Mon Jan 13 2003 Dave Beckett - rdfdump now rapper * Fri Dec 20 2002 Dave Beckett - Updated to have two RPMs for raptor and raptor-devel. Depend on libxml2 as XML parser. raptor-1.4.21/INSTALL.html0000644000175000017500000002426411330744113012030 00000000000000 Raptor RDF Parser Library - Building and Installing from Source

Raptor RDF Parser Library - Building and Installing from Source

1. Getting the sources

There are several ways to get the sources. The most stable and tested versions are the sources shipped with each release and these are recommended as the first place to start. If you want to get a newer set, then there are nightly snapshots made of the development sources, which may not yet be committed to Subversion. For the latest developent sources, anonymous Subversion access is available but this may require some configuring of developer tools that are not needed for the snapshot releases.

The source bundle and package files contain all the HTML files and documentation provided on the web site.

1.1 Getting the sources from releases

The released sources and available from http://download.librdf.org/source/ (master site) and also from the SourceForge site.

1.2 Getting the sources from Subversion

  svn checkout http://svn.librdf.org/repository/raptor/trunk/ raptor
  cd raptor

At this stage, or after a svn update you will need to create the automake and autoconf derived files, as described below in Create the configure program by using the autogen.sh script.

Building Raptor in this way requires some particular development tools not needed when building from snapshot releases - automake, autoconf, libtool and dependencies. The autogen.sh script looks for the newest versions of the auto* tools and checks that they meet the minimum versions.

2. Configuring and building

Raptor uses the GNU automake and autoconf to handle system dependency checking. It is developed and built on x86 Linux and x86 OSX but is also tested on other systems occasionally.

Raptor requires an XML parser - either libxml2 (2.6.8 or newer) or expat. It will optionally use libcurl, libxml2 for retrieving URIs. It will optionally use libxslt (requiring libxml2 also) to provide the XSLT functionality for the GRDDL and microformats parser.

2.1. Create configure program

If there is no configure program, you can create it using the autogen.sh script, as long as you have the automake and autoconf tools. This is done by:

  ./autogen.sh

and you can also pass along arguments intended for configure (see below for what these are):

  ./autogen.sh --prefix=/usr/local/somewhere

On OSX you may have to explicitly set the LIBTOOLIZE variable for the libtoolize utility since on OSX libtoolize is a different program. The full path to the utility should be given:

  LIBTOOLIZE=/opt/local/bin/glibtoolize ./autogen.sh

Alternatively you can run them by hand with:

  aclocal; autoheader; automake --add-missing; autoconf

The automake and autoconf tools have many different versions and at present development is being done with automake 1.10.2 (minimum version 1.7), autoconf 2.63 (minimum version 2.54) and libtool 2.2.6 (minimum version 2.2.0). These are only needed when compiling from Subversion sources. autogen.sh enforces the requirements.

Raptor also requires flex version 2.5.31 or newer (2.5.4 will not work) and GNU Bison to build lexers and parsers. These are only required when building from Subversion.

2.2 Options for configure

Raptor also supports the following extra configure options:

--disable-nfc-check

Disable Unicode Normal Form C (NFC) checking code. The code primarily consists of large tables plus some checking code which can be removed from the library with this option. All NFC checks will succeed when this is disabled.

--with-expat-source=DIR

Build against a statically compiled expat source tree in directory DIR. This handles the older and newer style expat source directory structures.

--enable-debug

Enable debug messages (default not enabled). Maintainer mode automatically enables this.

--enable-parsers=PARSERS

Pick the RDF parsers to build from the list:
rdfxml ntriples turtle rss-tag-soup
The default when this option is omitted is to enable all parsers. grddl requires libxml2 and libxstl so may not always be available. If all parsers are not enabled, parts of the test suite will likely fail.

The parsers that a built library supports can be found from the API level using functions such as raptor_parsers_enumerate and raptor_syntaxes_enumerate or from the rapper utility in the help message.

--enable-serializers=SERIALIZERS

Pick the RDF serializers to build from the list:
rdfxml ntriples rdfxml-abbrev
The default when this option is omitted is to enable all serializers. If all serializers are not enabled, parts of the test suite will likely fail.

The serializers that a built library supports can be found from the API level using functions such as raptor_serializers_enumerate or from the rapper utility in the help message.

--with-memory-signing

Enable signing of memory allocations so that when memory is allocated with malloc() and released free(), a check is made that the memory was allocated in the same library.

--with-xml-parser=NAME

Pick an XML parser to use - either libxml (default) minimum version 2.6.8 or expat. If this option is not given, either will be used, with libxml preferred if both are present. These can either be installed system libraries or source trees in subdirectories of these sources named libxml, expat.

Raptor has been tested with various combinations of these libraries including expat 1.95.1 (on RedHat 7.2), expat 1.95.2-2 (on RedHat 7.3), expat 1.95.2-6 (on Debian 3.0), expat 1.95.7 (on Redhat Fedora Core 2), expat 1.95.8 (on Debian unstable), libxml 2.6.8 (Redhat Fedora Core 2), libxml 2.6.9 (FreeBSD 4.10-STABLE)

libxml1 is not supported.

The libxml2 on Apple OSX 10.3.X is quite broken - the headers do not match the libraries. Install your own to get something coherent.

--with-www=NAME

Pick a WWW library to use - either curl, xml (for libxml), libwww for W3C libwww or none to disable it.

--with-xml2-config=NAME

Set the path to the libxml xml2-config program

--with-xslt-config=NAME

Set the path to the libxslt xslt-config program

--with-curl-config=NAME

Set the path to the libcurl curl-config program

--with-libwww-config=NAME

Legacy option that used to support the libwww library.

2.3 Configuring

If everything is in the default place, do:

   ./configure

The most common configuration you will be doing something like this:

   ./configure --with-xml-parser=expat

2.4 Compiling

Compile the parser and the test program rapper with;

   make

Note: GNU make is probably required which may be called gmake or gnumake if your system has a different make available too.

2.5 Testing

Raptor has a built-in test suite that can be invoked with:

  make check

which should emit lots of exciting test messages to the screen but conclude with something like:
All n tests passed
if everything works correctly. There will be some Unicode NFC checking tests that give ignored failures in 1.3.2 or later as NFC checking has been temporarily removed.

Raptor builds a utility RDF parsing program rapper can be tried with RDF/XML content like this:

  rapper dc.rdf

Raptor can also extract RDF content inside general XML when the -s (--scan) option is user. For example if some RDF/XML is embedded inside some SVG, it could be extracted with:

  rapper -s /path/to/test/pic.svg

You can also run it on N-Triples files like this:

  rapper -i ntriples test.nt

The default output is a simple statement dump format, but it can be changed to emit N-Triples by using the -o option, like this:

  rapper -o ntriples dc.rdf

3. Using the library

Once the library has been configured and built, there are some C example programs that can be built apart from the rapper utility. They are in the examples sub-directory and can be built with:

   cd examples

   # Raptor GUI - only if you have the GTK libraries
   make grapper

   # If you have all requirements
   make examples

The public Raptor API is described in the libraptor.3 UNIX manual/web page


Copyright 2000-2010 Dave Beckett
Copyright 2000-2005 University of Bristol

raptor-1.4.21/gtk-doc.make0000644000175000017500000001534111330704757012231 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) EXTRA_DIST = \ $(content_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ pdf-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ $(srcdir)/pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) if ENABLE_GTK_DOC if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else HTML_BUILD_STAMP= endif if GTK_DOC_BUILD_PDF PDF_BUILD_STAMP=pdf-build.stamp else PDF_BUILD_STAMP= endif all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) else all-local: endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) @cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true $(srcdir)/tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) @cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) @rm -rf $(srcdir)/html @mkdir $(srcdir)/html @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi; \ cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building PDF' @-chmod -R u+w $(srcdir) @rm -rf $(srcdir)/$(DOC_MODULE).pdf @mkpdf_imgdirs=""; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ fi; \ done; \ fi; \ cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: @installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs raptor-1.4.21/AUTHORS0000644000175000017500000000013610677561163011113 00000000000000Dave Beckett Dave Robillard Lauri Aalto raptor-1.4.21/README.html0000644000175000017500000002253111330744113011652 00000000000000 Raptor RDF Parser Library

Raptor RDF Parser Library

Dave Beckett

Overview

Raptor is a free software / Open Source C library that provides a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into a syntax. The supported parsing syntaxes are RDF/XML, N-Triples, TRiG, Turtle, RSS tag soup including all versions of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and XML and RDFa. The serializing syntaxes are RDF/XML (regular, and abbreviated), Atom 1.0, GraphViz, JSON, N-Triples, RSS 1.0 and XMP.

Raptor was designed to work closely with the Redland RDF library (RDF Parser Toolkit for Redland) but is entirely separate. It is a portable library that works across many POSIX systems (Unix, GNU/Linux, BSDs, OSX, cygwin, win32). Raptor has no memory leaks and is fast.

This is a mature and stable library. A summary of the changes can be found in the NEWS file, detailed API changes in the release notes and file-by-file changes in the ChangeLog.

  • Designed to integrate well with Redland
  • Parses content on the web if libcurl, libxml2 or BSD libfetch is available.
  • Supports all RDF terms including datatyped and XML literals
  • Optional features including parsers and serialisers can be selected at configure time.
  • Language bindings to Perl, PHP, Python and Ruby when used via Redland
  • No memory leaks
  • Fast
  • Standalone rapper RDF parser utility program

Known bugs and issues are recorded in the Redland issue tracker.

Parsers

RDF/XML Parser

A Parser for the standard RDF/XML syntax.

N-Triples Parser

A parser for the N-Triples syntax as defined by the W3C RDF Core working group for the RDF Test Cases.

Turtle Parser

A parser for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.

TRiG Parser

A parser for the TriG - Turtle with Named Graphs syntax.

The parser is alpha quality and may not support the entire TRiG specification.

RSS "tag soup" parser

A parser for the multiple XML RSS formats that use the elements such as channel, item, title, description in different ways. Attempts to turn the input into RSS 1.0 RDF triples. True RSS 1.0, as a full RDF vocabulary, is best parsed by the RDF/XML parser. It also generates triples for RSS enclosures.

This parser also provides support for the Atom 1.0 syndication format defined in IETF RFC 4287

GRDDL and microformats parser

A parser/processor for Gleaning Resource Descriptions from Dialects of Languages (GRDDL) syntax, W3C Recommendation of 2007-09-11 which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML or XML content into RDF/XML or other RDF syntax which can then be parsed. It uses either an XML or a lax HTML parser to allow HTML tag soup to be read.

The parser passes the all the GRDDL tests as of Raptor 1.4.16.

The parser also handles hCard and hReview using public XSL sheets.

RDFa parser

A parser for RDFa (W3C Candidate Recommendation 20 June 2008) implemented via librdfa linked inside Raptor, written by Manu Sporny of Digital Bazaar, licensed with the same license as Raptor.

As of Raptor 1.4.18 the RDFa parser passes all of the RDFa test suite except for 4 tests.

Serializers

RDF/XML Serializer

A serializer to the standard RDF/XML syntax as revised by the W3C RDF Core working group in 2004. This writes a plain triple-based RDF/XML serialization with no optimisation or pretty-printing.

A second serializer is provided using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents.

N-Triples Serializer

A serializer to the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.

Atom 1.0 Serializer

A serializer to the Atom 1.0 syndication format defined in IETF RFC 4287. Beta quality.

JSON Serializers

Two serializers for to write triples encoded in JSON, one (json) in a resource-centric abbreviated form RDF/JSON like Turtle or RDF/XML-Abbreviated; the other a triple-centric format (json-triples) based on the SPARQL results in JSON format. Beta quality.

GraphViz DOT Serializer

An serializer to the GraphViz DOT format which aids visualising RDF graphs.

RSS 1.0 Serializer

A serializer to the RDF Site Summary (RSS) 1.0 format.

Turtle Serializer

A serializer for the Turtle Terse RDF Triple Language syntax.

XMP Serializer

An alpha quality serializer to the Adobe XMP profile of RDF/XML suitable for embedding inside an external document.

Documentation

The public API is described in the libraptor.3 UNIX manual page. It is demonstrated in the rapper utility program which shows how to call the parser and write the triples in a serialization. When Raptor is used inside Redland, the Redland documentation explains how to call the parser and contains several example programs. There are also further examples in the example directory of the distribution.

To install Raptor see the Installation document.

Sources

The packaged sources are available from http://download.librdf.org/source/ (master site) and also from the SourceForge site. The development Subversion sources can also be browsed with ViewCV.

License

This library is free software / open source software released under the LGPL (GPL) or Apache 2.0 licenses. See LICENSE.html for full details.

Mailing Lists

The Redland mailing lists discusses the development and use of Raptor and Redland as well as future plans and announcement of releases.


Copyright (C) 2000-2010 Dave Beckett
Copyright (C) 2000-2005 University of Bristol

raptor-1.4.21/INSTALL0000644000175000017500000003633211330704764011074 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. raptor-1.4.21/examples/0000755000175000017500000000000011331056235011724 500000000000000raptor-1.4.21/examples/raptor_abort.c0000644000175000017500000000543311330672502014513 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_abort.c - Raptor abort example code * * Copyright (C) 2003-2006, David Beckett http://purl.org/net/dajobe/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #include #ifdef HAVE_STDLIB_H #include #endif /* for the memory allocation functions */ #if defined(HAVE_DMALLOC_H) && defined(RAPTOR_MEMORY_DEBUG_DMALLOC) #include #endif /* Raptor includes */ #include static void handle_statements(void *user_data, const raptor_statement *statement); int main(int argc, char *argv[]); typedef struct { raptor_parser *parser; FILE *stream; int count; int max; int stopped; } my_data; static void handle_statements(void *user_data, const raptor_statement *statement) { my_data* me=(my_data*)user_data; me->count++; if(me->count > me->max) { fprintf(me->stream, "Reached %d statements, stopping\n", me->max); raptor_parse_abort(me->parser); me->stopped=1; return; } fprintf(me->stream, "Saw statement %d\n", me->count); } int main (int argc, char *argv[]) { raptor_parser* rdf_parser; raptor_uri* uri; my_data* me; const char *program; int rc; program=argv[0]; if(argc != 2) { fprintf(stderr, "%s: USAGE [RDF-XML content URI]\n", program); exit(1); } raptor_init(); me=(my_data*)malloc(sizeof(my_data)); if(!me) { fprintf(stderr, "%s: Out of memory\n", program); exit(1); } me->stream=stderr; me->count=0; me->max=5; uri=raptor_new_uri((const unsigned char*)argv[1]); rdf_parser=raptor_new_parser("rdfxml"); me->parser=rdf_parser; raptor_set_statement_handler(rdf_parser, me, handle_statements); me->stopped=0; rc=raptor_parse_uri(rdf_parser, uri, NULL); fprintf(stderr, "%s: Parser returned status %d, stopped? %s\n", program, rc, (me->stopped ? "yes" : "no")); free(me); raptor_free_parser(rdf_parser); raptor_free_uri(uri); raptor_finish(); return 0; } raptor-1.4.21/examples/Makefile.am0000644000175000017500000000402310674751730013712 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor examples # # Copyright (C) 2003-2006, David Beckett http://purl.org/net/dajobe/ # Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # EXTRA_PROGRAMS = raptor_abort grapper rdfcat rdfprint rdfserialize examples: $(EXTRA_PROGRAMS) CLEANFILES = $(EXTRA_PROGRAMS) AM_CFLAGS=$(MEM) AM_LDFLAGS=$(MEM_LIBS) AM_CPPFLAGS=-I$(top_srcdir)/src raptor_abort_SOURCES = raptor_abort.c raptor_abort_LDADD=$(top_builddir)/src/libraptor.la raptor_abort_DEPENDENCIES = $(top_builddir)/src/libraptor.la grapper_SOURCES = grapper.c grapper_LDADD=$(top_builddir)/src/libraptor.la grapper_CFLAGS=`pkg-config --cflags gtk+-2.0 gconf-2.0` grapper_LDFLAGS=`pkg-config --libs gtk+-2.0 gconf-2.0` grapper_DEPENDENCIES = $(top_builddir)/src/libraptor.la rdfcat_SOURCES = rdfcat.c rdfcat_LDADD=$(top_builddir)/src/libraptor.la rdfcat_DEPENDENCIES = $(top_builddir)/src/libraptor.la rdfprint_SOURCES = rdfprint.c rdfprint_LDADD=$(top_builddir)/src/libraptor.la rdfprint_DEPENDENCIES = $(top_builddir)/src/libraptor.la rdfserialize_SOURCES = rdfserialize.c rdfserialize_LDADD=$(top_builddir)/src/libraptor.la rdfserialize_DEPENDENCIES = $(top_builddir)/src/libraptor.la $(top_builddir)/src/libraptor.la: cd $(top_builddir)/src && $(MAKE) libraptor.la $(top_builddir)/../librdf/librdf.la: cd $(top_builddir)/../librdf && $(MAKE) librdf.la raptor-1.4.21/examples/Makefile.in0000644000175000017500000005065311330704763013727 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor examples # # Copyright (C) 2003-2006, David Beckett http://purl.org/net/dajobe/ # Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = raptor_abort$(EXEEXT) grapper$(EXEEXT) \ rdfcat$(EXEEXT) rdfprint$(EXEEXT) rdfserialize$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_grapper_OBJECTS = grapper-grapper.$(OBJEXT) grapper_OBJECTS = $(am_grapper_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent grapper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(grapper_CFLAGS) \ $(CFLAGS) $(grapper_LDFLAGS) $(LDFLAGS) -o $@ am_raptor_abort_OBJECTS = raptor_abort.$(OBJEXT) raptor_abort_OBJECTS = $(am_raptor_abort_OBJECTS) am_rdfcat_OBJECTS = rdfcat.$(OBJEXT) rdfcat_OBJECTS = $(am_rdfcat_OBJECTS) am_rdfprint_OBJECTS = rdfprint.$(OBJEXT) rdfprint_OBJECTS = $(am_rdfprint_OBJECTS) am_rdfserialize_OBJECTS = rdfserialize.$(OBJEXT) rdfserialize_OBJECTS = $(am_rdfserialize_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(grapper_SOURCES) $(raptor_abort_SOURCES) $(rdfcat_SOURCES) \ $(rdfprint_SOURCES) $(rdfserialize_SOURCES) DIST_SOURCES = $(grapper_SOURCES) $(raptor_abort_SOURCES) \ $(rdfcat_SOURCES) $(rdfprint_SOURCES) $(rdfserialize_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = $(EXTRA_PROGRAMS) AM_CFLAGS = $(MEM) AM_LDFLAGS = $(MEM_LIBS) AM_CPPFLAGS = -I$(top_srcdir)/src raptor_abort_SOURCES = raptor_abort.c raptor_abort_LDADD = $(top_builddir)/src/libraptor.la raptor_abort_DEPENDENCIES = $(top_builddir)/src/libraptor.la grapper_SOURCES = grapper.c grapper_LDADD = $(top_builddir)/src/libraptor.la grapper_CFLAGS = `pkg-config --cflags gtk+-2.0 gconf-2.0` grapper_LDFLAGS = `pkg-config --libs gtk+-2.0 gconf-2.0` grapper_DEPENDENCIES = $(top_builddir)/src/libraptor.la rdfcat_SOURCES = rdfcat.c rdfcat_LDADD = $(top_builddir)/src/libraptor.la rdfcat_DEPENDENCIES = $(top_builddir)/src/libraptor.la rdfprint_SOURCES = rdfprint.c rdfprint_LDADD = $(top_builddir)/src/libraptor.la rdfprint_DEPENDENCIES = $(top_builddir)/src/libraptor.la rdfserialize_SOURCES = rdfserialize.c rdfserialize_LDADD = $(top_builddir)/src/libraptor.la rdfserialize_DEPENDENCIES = $(top_builddir)/src/libraptor.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): grapper$(EXEEXT): $(grapper_OBJECTS) $(grapper_DEPENDENCIES) @rm -f grapper$(EXEEXT) $(AM_V_CCLD)$(grapper_LINK) $(grapper_OBJECTS) $(grapper_LDADD) $(LIBS) raptor_abort$(EXEEXT): $(raptor_abort_OBJECTS) $(raptor_abort_DEPENDENCIES) @rm -f raptor_abort$(EXEEXT) $(AM_V_CCLD)$(LINK) $(raptor_abort_OBJECTS) $(raptor_abort_LDADD) $(LIBS) rdfcat$(EXEEXT): $(rdfcat_OBJECTS) $(rdfcat_DEPENDENCIES) @rm -f rdfcat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfcat_OBJECTS) $(rdfcat_LDADD) $(LIBS) rdfprint$(EXEEXT): $(rdfprint_OBJECTS) $(rdfprint_DEPENDENCIES) @rm -f rdfprint$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfprint_OBJECTS) $(rdfprint_LDADD) $(LIBS) rdfserialize$(EXEEXT): $(rdfserialize_OBJECTS) $(rdfserialize_DEPENDENCIES) @rm -f rdfserialize$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfserialize_OBJECTS) $(rdfserialize_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grapper-grapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_abort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfcat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfprint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfserialize.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< grapper-grapper.o: grapper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(grapper_CFLAGS) $(CFLAGS) -MT grapper-grapper.o -MD -MP -MF $(DEPDIR)/grapper-grapper.Tpo -c -o grapper-grapper.o `test -f 'grapper.c' || echo '$(srcdir)/'`grapper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/grapper-grapper.Tpo $(DEPDIR)/grapper-grapper.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grapper.c' object='grapper-grapper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(grapper_CFLAGS) $(CFLAGS) -c -o grapper-grapper.o `test -f 'grapper.c' || echo '$(srcdir)/'`grapper.c grapper-grapper.obj: grapper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(grapper_CFLAGS) $(CFLAGS) -MT grapper-grapper.obj -MD -MP -MF $(DEPDIR)/grapper-grapper.Tpo -c -o grapper-grapper.obj `if test -f 'grapper.c'; then $(CYGPATH_W) 'grapper.c'; else $(CYGPATH_W) '$(srcdir)/grapper.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/grapper-grapper.Tpo $(DEPDIR)/grapper-grapper.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grapper.c' object='grapper-grapper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(grapper_CFLAGS) $(CFLAGS) -c -o grapper-grapper.obj `if test -f 'grapper.c'; then $(CYGPATH_W) 'grapper.c'; else $(CYGPATH_W) '$(srcdir)/grapper.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am examples: $(EXTRA_PROGRAMS) $(top_builddir)/src/libraptor.la: cd $(top_builddir)/src && $(MAKE) libraptor.la $(top_builddir)/../librdf/librdf.la: cd $(top_builddir)/../librdf && $(MAKE) librdf.la # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor-1.4.21/examples/rdfserialize.c0000644000175000017500000000277311303130753014501 00000000000000#include #include #include /* rdfserialize.c: serialize 1 triple to RDF/XML-Abbrev */ int main(int argc, char *argv[]) { raptor_serializer* rdf_serializer=NULL; unsigned char *uri_string; raptor_uri *base_uri; raptor_statement* triple; raptor_init(); uri_string=raptor_uri_filename_to_uri_string(argv[1]); base_uri=raptor_new_uri(uri_string); rdf_serializer=raptor_new_serializer("rdfxml-abbrev"); raptor_serialize_start_to_file_handle(rdf_serializer, base_uri, stdout); /* Make a triple with URI subject, URI predicate, literal object */ triple=(raptor_statement*)calloc(1, sizeof(raptor_statement)); triple->subject=(void*)raptor_new_uri((const unsigned char*)"http://example.org/subject"); triple->subject_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; triple->predicate=(void*)raptor_new_uri((const unsigned char*)"http://example.org/predicate"); triple->predicate_type=RAPTOR_IDENTIFIER_TYPE_RESOURCE; triple->object="An example literal"; triple->object_type=RAPTOR_IDENTIFIER_TYPE_LITERAL; triple->object_literal_language=(const unsigned char*)"en"; /* Write the triple */ raptor_serialize_statement(rdf_serializer, triple); /* Delete the triple */ raptor_free_uri((raptor_uri*)triple->subject); raptor_free_uri((raptor_uri*)triple->predicate); free(triple); raptor_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); raptor_free_uri(base_uri); raptor_free_memory(uri_string); raptor_finish(); return 0; } raptor-1.4.21/examples/grapper.c0000644000175000017500000010465711330672502013465 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * grapper.c - Raptor GTK GUI example code * * Copyright (C) 2003-2007, David Beckett http://purl.org/net/dajobe/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #include #ifdef HAVE_STDLIB_H #include #endif #include /* for the memory allocation functions */ #if defined(HAVE_DMALLOC_H) && defined(RAPTOR_MEMORY_DEBUG_DMALLOC) #include #endif /* Raptor includes */ #include /* Gtk 2.0 */ #include /* Gconf */ #include #include /* Qnames button does nothing */ #undef GRAPPER_QNAMES static const char *application_name="Grapper"; static const char *application_title="Grapper GUI RDF Parser Utility"; static const char *application_description="GUI RDF parser utility based on the Raptor RDF parsing library"; /* Top level window */ static GtkWidget *grapper_window; /* GConf */ static GConfClient *gconf_client=NULL; #define GCONF_GRAPPER_NAMESPACE "/apps/grapper" /* configuration dir listened to */ static const gchar* gconf_namespace= GCONF_GRAPPER_NAMESPACE; /* window width key */ static const gchar* width_gconf_key=(const gchar*) GCONF_GRAPPER_NAMESPACE "/width"; /* window height key */ static const gchar* height_gconf_key=(const gchar*) GCONF_GRAPPER_NAMESPACE "/height"; #define MIN_WINDOW_WIDTH 400 #define MIN_WINDOW_HEIGHT 300 typedef struct { /* model data */ #ifdef GRAPPER_QNAMES int qnames; #endif int guess; unsigned int syntax; int features[RAPTOR_FEATURE_LAST]; int features_set[RAPTOR_FEATURE_LAST]; int ignore_warnings; unsigned char *url; /* last picked filename or NULL */ gchar *filename; /* GList *triples_list; */ int triples_count; int warnings_count; int errors_count; gchar *error; /* view/controller data */ GtkWidget *window; GtkWidget *v_box; GtkWidget *url_entry; GtkListStore *triples_store; GtkWidget *file_selection; GtkWidget *status; GtkWidget *triples_frame; GtkWidget *errors_frame; GtkListStore *errors_store; } grapper_state; typedef struct { grapper_state* state; int feature; } grapper_widget_data; enum { SUBJECT_COLUMN, PREDICATE_COLUMN, OBJECT_COLUMN, N_COLUMNS }; /* Local prototypes */ static void grapper_model_parse(grapper_state *state); static void grapper_view_url_changed(grapper_state *state) { GtkWidget *url_entry=state->url_entry; gtk_entry_set_text(GTK_ENTRY(url_entry), (const gchar*)state->url); } #ifdef GRAPPER_QNAMES static void grapper_view_qnames_changed(grapper_state *state) { } #endif static void grapper_view_guess_changed(grapper_state *state) { } static void grapper_view_feature_changed(grapper_state *state, int feature) { } static void grapper_view_syntax_changed(grapper_state *state) { } static void grapper_view_set_triples_count(grapper_state *state, int count) { #define TC_BUF_LEN 18 char buf[TC_BUF_LEN+1]; if(count>0) snprintf(buf, TC_BUF_LEN, "Triples: %d", count); else strcpy(buf, "Triples"); gtk_frame_set_label(GTK_FRAME(state->triples_frame), buf); } static void grapper_view_add_triple(grapper_state *state, unsigned char* nodes[3], int i) { GtkListStore *store=state->triples_store; GtkTreeIter iter; gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, SUBJECT_COLUMN, nodes[0], PREDICATE_COLUMN, nodes[1], OBJECT_COLUMN, nodes[2], -1); } static void grapper_view_empty_triples(grapper_state *state) { gtk_list_store_clear(state->triples_store); gtk_list_store_clear(state->errors_store); } static void grapper_view_reset_status(grapper_state *state) { gtk_list_store_clear(state->errors_store); } static void grapper_view_update_error_count(grapper_state *state) { #define EC_BUF_LEN 18 char buf[EC_BUF_LEN+1]; int count=state->errors_count; if(count>0) snprintf(buf, EC_BUF_LEN, "Errors: %d", count); else strcpy(buf, "Errors"); gtk_frame_set_label(GTK_FRAME(state->errors_frame), buf); } static void grapper_view_add_error_message(grapper_state *state, gchar *error, raptor_locator *locator, int is_error) { if(error) { GtkListStore *store=state->errors_store; GtkTreeIter iter; int line=(locator && locator->line >=0) ? locator->line : 0; gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, 0, line, 1, (is_error ? "Error" : "Warning"), 2, error, -1); grapper_view_update_error_count(state); } } static void grapper_model_add_triple(grapper_state *state, unsigned char *nodes[3]) { /* g_list_append(state->triples_list, nodes); */ state->triples_count++; grapper_view_add_triple(state, nodes, state->triples_count-1); grapper_view_set_triples_count(state, state->triples_count); } static void grapper_model_empty_triples(grapper_state *state) { /* g_list_free(state->triples_list); */ grapper_view_empty_triples(state); } static void grapper_model_set_url(grapper_state *state, const unsigned char *url) { if(state->url) { if(!strcmp((const char*)state->url, (const char*)url)) return; g_free(state->url); } state->url=(unsigned char*)g_strdup((const char*)url); strcpy((char*)state->url, (const char*)url); grapper_view_url_changed(state); } #ifdef GRAPPER_QNAMES static void grapper_model_set_qnames (grapper_state *state, int qnames) { if(state->qnames == qnames) return; state->qnames=qnames; grapper_view_qnames_changed(state); } #endif static void grapper_model_set_guess (grapper_state *state, int guess) { if(state->guess == guess) return; state->guess=guess; grapper_view_guess_changed(state); } static void grapper_model_set_feature(grapper_state *state, int feature, int value) { if(state->features[feature] == value) return; state->features[feature]=value; state->features_set[feature]=1; grapper_view_feature_changed(state, feature); } static void grapper_model_set_syntax (grapper_state *state, unsigned int syntax) { if(state->syntax == syntax) return; state->syntax=syntax; grapper_view_syntax_changed(state); } static void grapper_model_reset_counts(grapper_state *state) { state->triples_count=0; state->warnings_count=0; state->errors_count=0; grapper_view_update_error_count(state); } static void grapper_model_reset_error(grapper_state *state) { if(state->error) { g_free(state->error); state->error=NULL; } grapper_view_reset_status(state); } static void grapper_model_error_handler(void *data, raptor_locator *locator, const char *message) { grapper_state* state=(grapper_state*)data; state->errors_count++; if(state->error) g_free(state->error); state->error=g_strdup(message); grapper_view_add_error_message(state, state->error, locator, 1); } static void grapper_model_warning_handler(void *data, raptor_locator *locator, const char *message) { grapper_state* state=(grapper_state*)data; state->warnings_count++; if(state->ignore_warnings) return; if(state->error) g_free(state->error); state->error=g_strdup(message); grapper_view_add_error_message(state, state->error, locator, 0); } static void grapper_model_statements_handler(void *data, const raptor_statement *statement) { grapper_state* state=(grapper_state*)data; unsigned char* nodes[3]; nodes[0]=raptor_statement_part_as_string(statement->subject, statement->subject_type, NULL, NULL); nodes[1]=raptor_statement_part_as_string(statement->predicate, statement->predicate_type, NULL, NULL); nodes[2]=raptor_statement_part_as_string(statement->object, statement->object_type, statement->object_literal_datatype, statement->object_literal_language); grapper_model_add_triple(state, nodes); free(nodes[0]); free(nodes[1]); free(nodes[2]); } static void grapper_model_parse(grapper_state *state) { raptor_uri* uri; raptor_parser* rdf_parser; const char *syntax_name; int i; if(!state->url) return; grapper_model_empty_triples(state); grapper_model_reset_counts(state); grapper_model_reset_error(state); uri=raptor_new_uri(state->url); raptor_parsers_enumerate(state->syntax, &syntax_name, NULL); if(state->guess) { rdf_parser=raptor_new_parser_for_content(NULL, NULL, NULL, 0, state->url); if(!rdf_parser) { fprintf(stderr, "Failed to create guessed raptor parser from uri %s\n", state->url); exit(1); } fprintf(stdout, "Guessed parser name '%s' from uri %s\n", raptor_get_name(rdf_parser), state->url); } else { rdf_parser=raptor_new_parser(syntax_name); } for(i=0; i <= RAPTOR_FEATURE_LAST; i++) { if(state->features_set[i]) raptor_set_feature(rdf_parser, i, state->features[i]); } raptor_set_error_handler(rdf_parser, state, grapper_model_error_handler); raptor_set_warning_handler(rdf_parser, state, grapper_model_warning_handler); raptor_set_statement_handler(rdf_parser, state, grapper_model_statements_handler); raptor_parse_uri(rdf_parser, uri, NULL); raptor_free_parser(rdf_parser); raptor_free_uri(uri); } /* go button clicked / url entry activated callback */ static void url_entry_callback(GtkWidget *widget, gpointer data) { grapper_state* state=(grapper_state*)data; GtkWidget *url_entry=state->url_entry; grapper_model_set_url(state, (const unsigned char*)gtk_entry_get_text(GTK_ENTRY(url_entry))); grapper_model_parse(state); } #if GTK_CHECK_VERSION(2,4,0) #else /* file selection OK button clicked callback */ static void fs_ok_button_callback(GtkWidget *widget, gpointer data) { grapper_state* state=(grapper_state*)data; GtkWidget *files=state->file_selection; unsigned char *uri_string; state->filename=(gchar*)gtk_file_selection_get_filename(GTK_FILE_SELECTION (files)); uri_string=raptor_uri_filename_to_uri_string(state->filename); gtk_widget_destroy(files); state->file_selection=NULL; grapper_model_set_url(state, uri_string); free(uri_string); grapper_model_parse(state); } #endif /* open button clicked callback */ static void open_button_callback(GtkWidget *widget, gpointer data) { grapper_state* state=(grapper_state*)data; #if GTK_CHECK_VERSION(2,4,0) unsigned char *uri_string; GtkWidget *files=gtk_file_chooser_dialog_new("Open", GTK_WINDOW(state->window), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if(state->filename) gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(files), state->filename); if (gtk_dialog_run(GTK_DIALOG (files)) == GTK_RESPONSE_ACCEPT) { state->filename=gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(files)); uri_string=(unsigned char*)gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(files)); grapper_model_set_url(state, uri_string); g_free(uri_string); grapper_model_parse(state); } gtk_widget_destroy(files); #else GtkWidget *files=gtk_file_selection_new("Open"); if(state->filename) gtk_file_selection_set_filename(GTK_FILE_SELECTION(files), state->filename); state->file_selection=files; /* Connect the ok_button to fs_ok_button_callback */ g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (files)->ok_button), "clicked", G_CALLBACK(fs_ok_button_callback), state); /* Connect the cancel_button to destroy the widget */ g_signal_connect_swapped (G_OBJECT(GTK_FILE_SELECTION(files)->cancel_button), "clicked", G_CALLBACK(gtk_widget_destroy), G_OBJECT(files)); gtk_widget_show(files); #endif } /* quit callback */ static void quit_callback(GtkWidget *widget, gpointer data) { gtk_main_quit(); } /* preferences feature menu item toggled callback */ static void feature_menu_toggled(GtkCheckMenuItem *checkmenuitem, gpointer data) { grapper_widget_data* sbdata=(grapper_widget_data*)data; int active=gtk_check_menu_item_get_active(checkmenuitem); grapper_model_set_feature(sbdata->state, sbdata->feature, active); } #ifdef GRAPPER_QNAMES /* qnames button clicked callback */ static void qnames_button_callback(GtkWidget *widget, gpointer data) { grapper_state* state=(grapper_state*)data; int active=(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget)) != 0); grapper_model_set_qnames(state, active); } #endif /* guess button clicked callback */ static void guess_button_callback(GtkWidget *widget, gpointer data) { grapper_state* state=(grapper_state*)data; int active=(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget)) != 0); grapper_model_set_guess(state, active); } /* syntax menu changed callback */ static void syntax_menu_callback(GtkWidget *widget, gpointer data) { grapper_state* state=(grapper_state*)data; unsigned int syntax=(unsigned int)gtk_option_menu_get_history(GTK_OPTION_MENU(widget)); grapper_model_set_syntax(state, syntax); } /* delete (window) event callback */ static gboolean delete_event_callback(GtkWidget *widget, GdkEvent *event, gpointer data) { return FALSE; /* continue normal event handing */ } /* destroy callback */ static void destroy_callback(GtkWidget *widget, gpointer data) { gtk_main_quit (); } static void open_menu_callback(gpointer data, guint action, GtkWidget *widget) { open_button_callback(widget, data); } static void quit_menu_callback(gpointer data, guint action, GtkWidget *widget) { quit_callback(widget, data); } static void about_menu_callback(gpointer data, guint action, GtkWidget *widget) { grapper_state* state=(grapper_state*)data; #if GTK_CHECK_VERSION(2,5,0) /* 2.5.x about widget */ const gchar* authors[2]= { "Dave Beckett http://purl.org/net/dajobe/", NULL }; #if 1 /* using 2.5.x stock about */ gtk_show_about_dialog(GTK_WINDOW(state->window), "authors", authors, "comments", application_description, "copyright", raptor_short_copyright_string, "license", raptor_license_string, "name", application_name, "version", raptor_version_string, "website", raptor_home_url_string, "website-label", "Raptor", NULL); #else /* using 2.5.x by hand about */ GtkWidget *about; about=gtk_about_dialog_new(); gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), application_name); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), raptor_version_string); gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), raptor_short_copyright_string); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), application_description); gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about), raptor_license_string); gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about), raptor_home_url_string); gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about), "Raptor"); gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), authors); gtk_widget_show_all(about); #endif #else GtkWidget *about; GtkWidget *label; label=(GtkWidget*)application_description; /* mention it for gcc -Wannoy */ /* GTK < 2.6.0 */ about=gtk_dialog_new_with_buttons("About Grapper", GTK_WINDOW(state->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_NONE, NULL); label = gtk_label_new ("Grapper\nGUI RDF parser utility\n (C) 2003-2004 Dave Beckett"); /* Connect the dialog response to about_response_callback */ g_signal_connect_swapped (G_OBJECT (about), "response", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(about)); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(about)->vbox), label); gtk_widget_show_all(about); #endif } static GtkItemFactoryEntry menu_item_factory_entries[] = { /* path, accelerator, callback, callback_action, item_type, extra_data */ { (gchar*)"/_File", NULL, NULL, 0, (gchar*)"" }, { (gchar*)"/File/_Open...", (gchar*)"O", (GtkItemFactoryCallback)open_menu_callback, 1, (gchar*)"", GTK_STOCK_OPEN }, { (gchar*)"/File/sep1", NULL, NULL, 0, (gchar*)"" }, { (gchar*)"/File/_Quit", (gchar*)"Q", (GtkItemFactoryCallback)quit_menu_callback, 1, (gchar*)"", GTK_STOCK_QUIT }, { (gchar*)"/_Preferences", NULL, NULL, 0, (gchar*)"" }, { (gchar*)"/_Help", NULL, NULL, 0, (gchar*)"" }, { (gchar*)"/Help/About", NULL, (GtkItemFactoryCallback)about_menu_callback, 1, (gchar*)"" } }; static gint menu_item_factory_nentries = sizeof(menu_item_factory_entries) / sizeof(menu_item_factory_entries[0]); static void init_grapper_window(GtkWidget *window, grapper_state *state) { GtkAccelGroup *accel_group; GtkItemFactory* menu_item_factory; GtkWidget *menu_bar; GtkMenu *prefs_menu; GtkWidget *v_paned; GtkWidget *v_box; GtkWidget *box; GtkWidget *go_button; GtkWidget* feature_items[RAPTOR_FEATURE_LAST]; #ifdef GRAPPER_QNAMES GtkWidget *qnames_button; #endif GtkWidget *guess_button; GtkWidget *syntax_optionmenu; GtkWidget *syntax_menu; GtkWidget *url_entry; GtkWidget *triples_frame, *prefs_frame; GtkWidget *triples_scrolled_window; GtkWidget *triples_treeview; GtkCellRenderer *renderer; GtkTreeViewColumn *column; #ifdef GRAPPER_QNAMES GtkTooltips *qnames_tooltips; #endif GtkTooltips *guess_tooltips; GtkTooltips *syntax_tooltips; GtkWidget *prefs_box; GtkListStore *store; int i; GtkWidget *errors_frame, *errors_scrolled_window; GtkWidget *errors_treeview; GtkListStore *errors_store; state->window=window; /* connect window delete event to callback */ g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (delete_event_callback), NULL); /* connect window destroy event to callback */ g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy_callback), NULL); /* vertical box */ v_box = gtk_vbox_new (FALSE, 0); /* gtk_container_set_border_width (GTK_CONTAINER (v_box), 10); */ state->v_box=v_box; /* acceleration group for menu bar*/ accel_group=gtk_accel_group_new(); /* Menu bar */ menu_item_factory=gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); gtk_item_factory_create_items(menu_item_factory, menu_item_factory_nentries, menu_item_factory_entries, state); gtk_window_add_accel_group(GTK_WINDOW(window), accel_group); menu_bar=gtk_item_factory_get_widget (menu_item_factory, "
"); gtk_widget_show(menu_bar); gtk_box_pack_start (GTK_BOX (v_box), menu_bar, FALSE, FALSE, 0); /* horizontal box for url entry, OK, Open buttons in vertical box (v_box) */ box = gtk_hbox_new (FALSE, 0); /* url text entry in horizontal box */ url_entry=gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(url_entry), 200); /* connect text entry activate (enter key) callback */ g_signal_connect (G_OBJECT(url_entry), "activate", G_CALLBACK(url_entry_callback), state); gtk_editable_set_editable(GTK_EDITABLE(url_entry), TRUE); /* pack into the invisible box */ gtk_box_pack_start(GTK_BOX(box), url_entry, TRUE, TRUE, 0); gtk_widget_show(url_entry); state->url_entry=url_entry; /* go button in horizontal box */ go_button = gtk_button_new_from_stock(GTK_STOCK_OK); /* connect button clicked event to callback */ g_signal_connect (G_OBJECT (go_button), "clicked", G_CALLBACK (url_entry_callback), state); /* pack into the invisible box */ gtk_box_pack_start (GTK_BOX(box), go_button, FALSE, TRUE, 0); gtk_widget_show (go_button); gtk_widget_show (box); /* add hbox to vbox */ gtk_box_pack_start (GTK_BOX (v_box), box, FALSE, FALSE, 0); /* horizontal box for syntax prefs in vertical box (v_box) */ prefs_frame = gtk_frame_new ("RDF Syntax"); prefs_box = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(prefs_box),GTK_BUTTONBOX_START); #ifdef GRAPPER_QNAMES /* qnames button in horizontal box */ qnames_button = gtk_check_button_new_with_label("QNames"); qnames_tooltips = gtk_tooltips_new (); gtk_tooltips_set_tip (qnames_tooltips, qnames_button, "Display URIs as XML QNames", NULL); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(qnames_button), (state->qnames)); /* connect button clicked event to callback */ g_signal_connect (G_OBJECT (qnames_button), "clicked", G_CALLBACK (qnames_button_callback), state); /* pack into the invisible box */ gtk_box_pack_start (GTK_BOX(prefs_box), qnames_button, TRUE, TRUE, 0); gtk_widget_show (qnames_button); #endif /* guess button in horizontal box */ guess_button = gtk_check_button_new_with_label("Guess Syntax"); guess_tooltips = gtk_tooltips_new (); gtk_tooltips_set_tip (guess_tooltips, guess_button, "Try to guess the syntax from the URI", NULL); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(guess_button), (state->guess)); /* connect button clicked event to callback */ g_signal_connect (G_OBJECT (guess_button), "clicked", G_CALLBACK (guess_button_callback), state); /* pack into the invisible box */ gtk_box_pack_start (GTK_BOX(prefs_box), guess_button, TRUE, TRUE, 0); gtk_widget_show (guess_button); /* add prefs frame to vbox */ gtk_container_add(GTK_CONTAINER(prefs_frame), prefs_box); gtk_widget_show (prefs_box); /* add prefs frame to start of vbox */ gtk_box_pack_start (GTK_BOX (v_box), prefs_frame, FALSE, TRUE, 0); gtk_widget_show (prefs_frame); /* paned in vertical box */ v_paned = gtk_vpaned_new (); /* triples frame in vertical paned */ triples_frame=gtk_frame_new("Triples"); state->triples_frame=triples_frame; gtk_paned_pack1(GTK_PANED (v_paned), triples_frame, TRUE, FALSE); gtk_widget_show(triples_frame); /* scroll window in triples frame */ triples_scrolled_window=gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(triples_scrolled_window), 10); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(triples_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(triples_frame), triples_scrolled_window); gtk_widget_show(triples_scrolled_window); store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); state->triples_store=store; triples_treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(triples_treeview), TRUE); /* set columns renderer for treeview */ renderer= gtk_cell_renderer_text_new (); column= gtk_tree_view_column_new_with_attributes ("Subject", renderer, "text", SUBJECT_COLUMN, NULL); gtk_tree_view_column_set_sort_column_id(column, SUBJECT_COLUMN); gtk_tree_view_column_set_resizable(column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (triples_treeview), column); renderer= gtk_cell_renderer_text_new (); column= gtk_tree_view_column_new_with_attributes ("Predicate", renderer, "text", PREDICATE_COLUMN, NULL); gtk_tree_view_column_set_sort_column_id(column, PREDICATE_COLUMN); gtk_tree_view_column_set_resizable(column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (triples_treeview), column); renderer= gtk_cell_renderer_text_new (); column= gtk_tree_view_column_new_with_attributes ("Object", renderer, "text", OBJECT_COLUMN, NULL); gtk_tree_view_column_set_sort_column_id(column, OBJECT_COLUMN); gtk_tree_view_column_set_resizable(column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (triples_treeview), column); /* pack the store into the scrolled window */ gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(triples_scrolled_window), triples_treeview); gtk_widget_show(triples_treeview); /* errors frame in vertical paned */ errors_frame = gtk_frame_new ("Errors"); state->errors_frame=errors_frame; gtk_paned_pack2(GTK_PANED (v_paned), errors_frame, TRUE, FALSE); gtk_widget_show(errors_frame); gtk_box_pack_start (GTK_BOX (v_box), v_paned, TRUE, TRUE, 0); gtk_widget_show(v_paned); /* scroll window in errors frame */ errors_scrolled_window=gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(errors_scrolled_window), 10); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(errors_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(errors_frame), errors_scrolled_window); gtk_widget_show(errors_scrolled_window); errors_store = gtk_list_store_new (3, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING); state->errors_store = errors_store; errors_treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(errors_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(errors_treeview), TRUE); renderer= gtk_cell_renderer_text_new (); column= gtk_tree_view_column_new_with_attributes ("Line", renderer, "text", 0, NULL); gtk_tree_view_column_set_resizable(column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (errors_treeview), column); renderer= gtk_cell_renderer_text_new (); column= gtk_tree_view_column_new_with_attributes ("Type", renderer, "text", 1, NULL); gtk_tree_view_column_set_resizable(column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (errors_treeview), column); renderer= gtk_cell_renderer_text_new (); column= gtk_tree_view_column_new_with_attributes ("Message", renderer, "text", 2, NULL); gtk_tree_view_column_set_resizable(column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (errors_treeview), column); gtk_tooltips_set_tip (gtk_tooltips_new (), errors_treeview, "Errors and warnings from parsing the content.", NULL); /* pack the errors store into the errors scrolled window */ gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(errors_scrolled_window), errors_treeview); gtk_widget_show(errors_treeview); prefs_menu=GTK_MENU(gtk_item_factory_get_widget(menu_item_factory, "/Preferences")); /* features in the preferences menu */ for(i=0; i <= RAPTOR_FEATURE_LAST; i++) { const char *feature_name; const char *feature_label; grapper_widget_data* sbdata; if(raptor_features_enumerate((raptor_feature)i, &feature_name, NULL, &feature_label)) break; sbdata=(grapper_widget_data*)malloc(sizeof(grapper_widget_data)); sbdata->state=state; sbdata->feature=i; /* add to the preferences menu */ feature_items[i] = gtk_check_menu_item_new_with_label(feature_label); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(feature_items[i]), state->features[i]); gtk_menu_shell_append(GTK_MENU_SHELL(prefs_menu), feature_items[i]); g_signal_connect(G_OBJECT(feature_items[i]), "toggled", G_CALLBACK(feature_menu_toggled), (gpointer)sbdata); gtk_widget_show (feature_items[i]); } /* syntax button in horizontal box */ syntax_optionmenu = gtk_option_menu_new(); syntax_menu=gtk_menu_new(); for(i=0; 1; i++) { const char *syntax_label; GtkWidget *syntax_menu_item; if(raptor_parsers_enumerate(i, NULL, &syntax_label)) break; syntax_menu_item = gtk_menu_item_new_with_label((const gchar*)syntax_label); gtk_widget_show (syntax_menu_item); gtk_menu_shell_append(GTK_MENU_SHELL(syntax_menu), syntax_menu_item); } g_signal_connect (GTK_OBJECT(syntax_optionmenu), "changed", G_CALLBACK (syntax_menu_callback), state); gtk_option_menu_set_menu(GTK_OPTION_MENU(syntax_optionmenu), syntax_menu); /* Default is item 0 (should be RDF/XML) */ gtk_option_menu_set_history(GTK_OPTION_MENU(syntax_optionmenu), 0); syntax_tooltips = gtk_tooltips_new (); gtk_tooltips_set_tip (syntax_tooltips, syntax_optionmenu, "Chose the Syntax to parse", NULL); /* pack into the invisible box */ gtk_box_pack_start (GTK_BOX(prefs_box), syntax_optionmenu, TRUE, TRUE, 0); gtk_widget_show (syntax_optionmenu); /* add vbox to window */ gtk_container_add (GTK_CONTAINER (window), v_box); gtk_widget_show (v_box); } static void grapper_gconfclient_notify(GConfClient* client, guint cnxn_id, GConfEntry *entry, gpointer user_data) { /* grapper_state* state=(grapper_state*)user_data; */ GError* err=NULL; int width, height; gtk_window_get_size(GTK_WINDOW(grapper_window), &width, &height); width=gconf_client_get_int(gconf_client, width_gconf_key, &err); if(err) { g_error_free(err); err=NULL; width= -1; } else fprintf(stderr, "gconf width changed to %d\n", width); height=gconf_client_get_int(gconf_client, height_gconf_key, &err); if(err) { g_error_free(err); err=NULL; height= -1; } else fprintf(stderr, "gconf height changed to %d\n", width); /* let's not make it too small */ if(width < MIN_WINDOW_WIDTH) width = MIN_WINDOW_WIDTH; if(height < MIN_WINDOW_HEIGHT) height = MIN_WINDOW_HEIGHT; gtk_window_resize(GTK_WINDOW(grapper_window), width, height); } static void grapper_gconflient_free(gpointer user_data) { } static gint configure_callback(GtkWidget *widget, GdkEventConfigure *event) { gint width, height; GError* err=NULL; gtk_window_get_size(GTK_WINDOW(grapper_window), &width, &height); if(!gconf_client_set_int(gconf_client, width_gconf_key, width, &err)) { fprintf(stderr, "gconf error writing width: %s\n", err->message); g_error_free(err); err=NULL; } if(!gconf_client_set_int(gconf_client, height_gconf_key, height, &err)) { fprintf(stderr, "gconf error writing width: %s\n", err->message); g_error_free(err); err=NULL; } return FALSE; } int main(int argc, char *argv[]) { grapper_state state; GError* err=NULL; guint cnxn; int width, height; gtk_init (&argc, &argv); g_set_application_name(application_name); raptor_init(); memset(&state, 0, sizeof(grapper_state)); gconf_client=gconf_client_get_default(); cnxn=gconf_client_notify_add(gconf_client, gconf_namespace, grapper_gconfclient_notify, (gpointer)&state, /* user data */ grapper_gconflient_free, &err); /* create the main window */ grapper_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW(grapper_window), application_title); init_grapper_window(grapper_window, &state); width=gconf_client_get_int(gconf_client, width_gconf_key, &err); if(err) { fprintf(stderr, "gconf error reading width: %s\n", err->message); g_error_free(err); err=NULL; width= -1; } height=gconf_client_get_int(gconf_client, height_gconf_key, &err); if(err) { fprintf(stderr, "gconf error reading height: %s\n", err->message); g_error_free(err); err=NULL; height= -1; } /* let's not make it too small */ if(width < MIN_WINDOW_WIDTH) width = MIN_WINDOW_WIDTH; if(height < MIN_WINDOW_HEIGHT) height = MIN_WINDOW_HEIGHT; gtk_window_set_default_size(GTK_WINDOW(grapper_window), width, height); /* Connect the window resize event to configure_callback */ gtk_signal_connect (GTK_OBJECT(grapper_window), "configure_event", (GtkSignalFunc)configure_callback, &state); /* finally make it all visible */ gtk_widget_show (grapper_window); if(argc>1) { if(!access(argv[1], R_OK)) { /* it's a file - make a URL out of it */ unsigned char *uri_string=raptor_uri_filename_to_uri_string(argv[1]); grapper_model_set_url(&state, uri_string); free(uri_string); } else grapper_model_set_url(&state, (unsigned char*)argv[1]); grapper_model_parse(&state); } /* main loop, exited when gtk_main_quit() is called */ gtk_main (); raptor_finish(); gconf_client_notify_remove(gconf_client, cnxn); return 0; } raptor-1.4.21/examples/rdfprint.c0000644000175000017500000000146111330672502013642 00000000000000#include #include /* rdfprint.c: print triples from parsing RDF/XML */ void print_triple(void* user_data, const raptor_statement* triple) { raptor_print_statement_as_ntriples(triple, stdout); fputc('\n', stdout); } int main(int argc, char *argv[]) { raptor_parser* rdf_parser=NULL; unsigned char *uri_string; raptor_uri *uri, *base_uri; raptor_init(); rdf_parser=raptor_new_parser("rdfxml"); raptor_set_statement_handler(rdf_parser, NULL, print_triple); uri_string=raptor_uri_filename_to_uri_string(argv[1]); uri=raptor_new_uri(uri_string); base_uri=raptor_uri_copy(uri); raptor_parse_file(rdf_parser, uri, base_uri); raptor_free_parser(rdf_parser); raptor_free_uri(base_uri); raptor_free_uri(uri); raptor_free_memory(uri_string); raptor_finish(); } raptor-1.4.21/examples/rdfcat.c0000644000175000017500000000250111330672502013251 00000000000000#include #include /* rdfcat.c: parse any RDF syntax and serialize to RDF/XML-Abbrev */ static raptor_serializer* rdf_serializer; void serialize_triple(void* user_data, const raptor_statement* triple) { raptor_serialize_statement(rdf_serializer, triple); } static void declare_namespace(void* user_data, raptor_namespace *nspace) { raptor_serialize_set_namespace_from_namespace(rdf_serializer, nspace); } int main(int argc, char *argv[]) { raptor_parser* rdf_parser=NULL; unsigned char *uri_string; raptor_uri *uri, *base_uri; raptor_init(); uri_string=raptor_uri_filename_to_uri_string(argv[1]); uri=raptor_new_uri(uri_string); base_uri=raptor_uri_copy(uri); /* Ask raptor to work out which parser to use */ rdf_parser=raptor_new_parser("guess"); raptor_set_statement_handler(rdf_parser, NULL, serialize_triple); raptor_set_namespace_handler(rdf_parser, NULL, declare_namespace); rdf_serializer=raptor_new_serializer("rdfxml-abbrev"); raptor_serialize_start_to_file_handle(rdf_serializer, base_uri, stdout); raptor_parse_file(rdf_parser, uri, base_uri); raptor_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); raptor_free_parser(rdf_parser); raptor_free_uri(base_uri); raptor_free_uri(uri); raptor_free_memory(uri_string); raptor_finish(); } raptor-1.4.21/ChangeLog0000644000175000017500000044570211331056001011603 000000000000002010-01-30 Dave Beckett * Snapshotted raptor_1_4_21 for 1.4.21 release 2010-01-29 Dave Beckett * INSTALL.html, LICENSE.html, NEWS.html, README.html, RELEASE.html, TODO.html: 1.4.21 and 2010 years * RELEASE.html: 1.4.21 * src/raptor_serialize_turtle.c: Ensure serialized Turtle names are legal (raptor_turtle_is_legal_turtle_qname): Added to enforce prefix and local name character constraints. (raptor_turtle_emit_resource): Use above to ensure that XML Qnames that are not legal Turtle Qnames are never serialized. Fixes Issue#0000337 http://bugs.librdf.org/mantis/view.php?id=337 * tests/turtle/Makefile.am, tests/turtle/test-34-out.ttl, tests/turtle/test-34.ttl: Add Turtle serializing test 34 for not serializing a qname with a . Test for Issue#0000337 http://bugs.librdf.org/mantis/view.php?id=337 * docs/raptor-docs.xml: 2010 * docs/libraptor.3: 1.4.21 * src/raptor_general.c: 2010 2010-01-28 Dave Beckett * RELEASE.html: 1.4.21 * src/raptor_rdfxml.c: Create a new set for checking for duplicate rdf:ID at start of every parse. (raptor_rdfxml_parse_init): Remove creating set from when parser is constructed. (raptor_rdfxml_parse_start): At start of parsing, delete any existing id set and only create a new one if the feature RAPTOR_FEATURE_CHECK_RDF_ID is enabled. Fixes Issue#0000332 http://bugs.librdf.org/mantis/view.php?id=332 * src/turtle_lexer.l: Alter Turtle lexer to refuse to accept . in namespace prefix/local names Adjust Turtle lexer to match spec for the prefixName and name tokens: http://www.w3.org/TeamSubmission/2008/SUBM-turtle-20080114/#prefixName http://www.w3.org/TeamSubmission/2008/SUBM-turtle-20080114/#name This makes some previously accepted not-to-spec turtle documents be rejected. It makes new bad turtle syntax tests bad-21 and bad-22 pass. (NCNAME_PREFIX): Updated for prefixName (NCNAME): Update for name Fixes Issue#0000326 http://bugs.librdf.org/mantis/view.php?id=326 * tests/turtle/Makefile.am, tests/turtle/bad-21.ttl, tests/turtle/bad-22.ttl: Add bad turtle tests 21, 22 for . in prefix and qname * src/ntriples_parse.c: Make ntriples parser accept text/plain with q=0.1 (raptor_ntriples_parser_register_factory): Register mime type text/plain via raptor_parser_factory_add_mime_type. Fixes Issue#0000319 http://bugs.librdf.org/mantis/view.php?id=319 * src/turtle_lexer.l: Make Turtle lexer handle \\ at end of triple-quoted literals Alter literal regex and let raptor_stringbuffer_append_turtle_string() report problems with buffer ending in middle of \u and \U. Add rule for bare \ on it's own which can only happen if input ends on a \. Fixes Issue#0000318 http://bugs.librdf.org/mantis/view.php?id=318 * tests/turtle/Makefile.am, tests/turtle/bad-20.ttl: Add bad-20.ttl test for end of file in middle of \ escape * tests/turtle/Makefile.am, tests/turtle/test-33.out, tests/turtle/test-33.ttl: Added test-33 for \\ at end of triple-quoted turtle literal Added tests/turtle/test-33.ttl and tests/turtle/test-33.out files to test Issue#0000318 http://bugs.librdf.org/mantis/view.php?id=318 * librdfa/iri.c: Update to librdfa GIT commit 1979d7246a1d98f95bab78704a32b87cf95d1ef6 * .gitignore, Makefile.am, configure.ac: Use build dir for automake aux files. * build/.gitignore: Ignore build files * .gitignore, autogen.sh, configure.ac, tests/.gitignore: Update build environment to latest autogen.sh - enable silent rules for maintainer * tests/rdfxml/ex-38-rdfxmla.out, tests/turtle/ex-38-turtle.out: Restore to GIT raptor1 branch expected output files tests/rdfxml/ex-38-rdfxmla.out tests/turtle/ex-38-turtle.out * librdfa/curie.c, librdfa/iri.c, librdfa/rdfa.c, librdfa/rdfa.h, librdfa/triple.c: Merge librdfa changes to GIT 88ca099befcb1b81be1a879663e5e891707e5239 Fixes several buffer alloc/realloc problems and failure to terminate strings when using them with strstr(). Other librdfa changes: - added "first" to list of allowed reserved words. - allow @rel/@rev reserved word values to be in any case (TC 134) - librdfa now treats the following characters as valid whitespace characters: SPACE, \t, \n, \v, \f, and \r. (TC 131) - fix generation of xml:lang if language was already in XML Literal (TC 102) * src/turtle_lexer.l: Make Turtle long literals count raw newlines correctly (Rule \" ....): Count the raw newlines seen in the yytext to adjust the line numbers correctly for long literals. Fixes Issue#0000331 http://bugs.librdf.org/mantis/view.php?id=331 2010-01-03 Dave Beckett * src/win32_raptor_config.h: Restore windows version numbers to 1.4.21 for raptor1 series * configure.ac: Restore soname for raptor1 series 2010-01-02 Dave Beckett * NEWS.html, RELEASE.html, configure.ac: Make raptor1 branch for raptor1 series - 1.4.21 potentially * src/fix-bison: Remove RCS ID * docs/tmpl/.gitignore: Update another .gitignore * .gitignore, docs/.gitignore, docs/tmpl/.gitignore, src/.gitignore, tests/.gitignore, tests/feeds/.gitignore, tests/turtle/.gitignore, utils/.gitignore: Add .gitignore to replace SVN properties svn:ignore * Switched to GIT for version control. SVN r15728 is GIT d6c9b7e7084671b77db75beb303b7f35308a9942 2009-11-29 Dave Beckett * ChangeLog, NEWS.html, RELEASE.html, librdfa/rdfa.c: Merge from raptor 1.4.20 release SVNr15728 to trunk 2009-11-28 Dave Beckett * Merge RDFa changes from Raptor branch raptor1 (r15719) * Snapshotted raptor_1_4_20 for 1.4.20 release (SVN 15727) * tests/rdfa/0172.out, tests/rdfa/0172.xhtml, tests/rdfa/0173.out, tests/rdfa/0173.xhtml, tests/rdfa/0174.out, tests/rdfa/0174.xhtml, tests/rdfa/Makefile.am: Added unapproved RDFa tests from librdfa upstream test suite: 0172: empty datatype attribute 0173: empty xml:lang attribute on plain literal 0174: single character namespace prefixes 0172 and 0173 test Issue#0000306 http://bugs.librdf.org/mantis/view.php?id=306 0174 tests Issue#0000310 http://bugs.librdf.org/mantis/view.php?id=310 * librdfa/rdfa.c: (start_element): For raptor, turn a NULL language to "" which is what librdfa expects. * librdfa/curie.c, librdfa/language.c, librdfa/rdfa.c, librdfa/triple.c: Apply librdfa GIT commits up to 5823cb8bffe50fb1b46960f237f7274388cb5f93 commit 5823cb8bffe50fb1b46960f237f7274388cb5f93 Fixed @property CURIE processing unit tests to match code updates. commit a85d8e9e2e3d28452ad03d1ca64fdd98eed1c180 Fixed CURIE processing bug for TC 174. The bug caused single-character prefixed CURIEs to be processed incorrectly. Also fixed @property processing to not use reserved words specified in a very early version of the RDFa spec. Fixed a small bug related to processing CURIEs that have ':' as the second character in the URI string. commit f384b28bf916a2e0c7a7dbc99101a1a44c301965 Fixed plain literal bug uncovered by TC 172. This bug caused plain literals to not be generated when datatype="" was specified and when the content inside the element contained XHTML child nodes. * librdfa/language.c: Apply librdfa GIT commit 9960791ee4beca8e52e5d3a9766aba73d33f0063 Fixed bug that caused unreviewed TC 173 to partially fail. The currently active language, specified via xml:lang, was not being cleared when xml:lang="" was specified. Related to Redland Issue#0000306 http://bugs.librdf.org/mantis/view.php?id=306 2009-11-25 Dave Beckett * librdfa/rdfa.c, src/raptor_abbrev.c: Casts for C++ 2009-11-25 Lauri Aalto * src/raptor_abbrev.c: (raptor_abbrev_subject_lookup): Free node if raptor_new_abbrev_subject() ownership transfer did not succeed. * src/raptor_abbrev.c: (raptor_abbrev_subject_find): Check for failures. * src/raptor_serialize_turtle.c: (raptor_turtle_emit): Free iterators on before returning an error. * src/raptor_abbrev.c, src/raptor_avltree.c: (raptor_avltree_sprout): Always take ownership of passed in node data - free it if malloc fails. Make sure free_fn is not null before calling it. (raptor_abbrev_node_lookup,raptor_abbrev_subject_add_property): raptor_avltree_add() now always takes ownership of added nodes. * src/raptor_internal.h, src/raptor_serialize_rdfxmla.c: fixed indent tabs -> spaces * src/raptor_abbrev.c: (raptor_abbrev_subject_invalidate): Return value expected 2009-11-24 Dave Beckett * many files: Merge from raptor branch raptor1 2009-11-23 Dave Beckett * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c, tests/feeds/test01-result.ttl, tests/feeds/test02-result.ttl, tests/feeds/test03-result.ttl, tests/feeds/test04-result.ttl, tests/rdfxml/Makefile.am, tests/turtle/Makefile.am: Apply SVN r15690 to raptor head 2009-11-15 Dave Beckett * utils/rdfdiff.c: Apply SVN 15667 to raptor trunk 2009-10-10 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_uri): Fix XML parser context resource leak if raptor_grddl_fetch_uri fails. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Save and restore error handlers properly - restore loop was broken. Remove memcpy for clarity in copying. 2009-08-25 Dave Beckett * autogen.sh: Update common autogen.sh 2009-08-21 Lauri Aalto * src/raptor_www.c: (raptor_www_set_http_cache_control): Avoid dangling pointers 2009-08-03 Lauri Aalto * src/raptor_internal.h: Fixed comment 2009-07-27 Dave Beckett * src/turtle_parser.y (main): Terminate parser <<<<<<< .working * configure.ac: For trunk raptor 1.9.x series update libtool version to 4:0:0 which bumps the soname. ======= * src/turtle_parser.y (main): Terminate parser * src/turtle_lexer.l (main): Init world and namespaces so turtle lexing test does not die. >>>>>>> .merge-right.r15728 * src/raptor_parse.c (raptor_parse_file): Simplify, no need for O_LARGEFILES flag and open/fdopen sequence. * configure.ac: Check for fcntl.h and AC_SYS_LARGEFILE to get large file checks * src/raptor_parse.c: (raptor_parse_file): Use open(2) and apply O_LARGEFILE option to allow 32bit systems to read multi-gigabyte files. 2009-07-23 Dave Beckett * Changelog entries above this are on BRANCH raptor1 * Create raptor 1 branch (SVN r15287) 2009-07-19 Dave Beckett * Tagged for raptor 1.4.19 (SVN r15280) * Snapshotted raptor_1_4_19 for 1.4.19 release (SVN 15279) * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Handle C++'s picky casting between enum types - that are really integers - to ints. * src/raptor_rss_common.c: static data raptor_rss_fields_info: semantic data errors found by C++'s more strict aliasing. - Fix author item class. - Set URI flag value for atom:schema and atom:href * src/raptor_namespace.c: (raptor_namespaces_init_v2, raptor_namespace_stack_to_array): Casts for C++ in returns from RAPTOR_CALLOC for namespace stacks * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Cast for C++ for arg to xsltSetCtxtSecurityPrefs. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Use memmove for overlapping copy, not memcpy. [valgrind] * src/raptor_serialize_json.c: raptor_json_context - use raptor_statement_v2 for last statement. (raptor_json_serialize_avltree_visit): Make V1 statements for the stored V2 statements. Improve fatal error messages. * src/raptor_statement.c: (raptor_free_statement): Restore actually freeing statement memory - resource leak. * configure.ac: libtool version change. was: current 2 revision 0 age 1 rules steps: 3. source code changed: revision++ = 3 4. interfaces added and changed: current++ = 3, revision = 0 5. interfaces added: age++ = 2 6. interfaces removed: no now: current 3 revision 0 age 2 * docs/libraptor.3: 1.4.19 changes 2009-07-17 Dave Beckett * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): More silly games to prevent stupid gcc warning: ignoring return value of 'strtol', declared with attribute warn_unused_result so use the value and then discard it in a stupid expression. Ditto strtod. * src/raptor_uri.c: (raptor_uri_print_v2): Silly games to prevent stupid gcc warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result but right now there is nowhere to return the error too. * src/raptor_rss.c: (raptor_rss_uplift_fields): Comment out variables used only in debugging. * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Ignore unused return values from strtol and strtod used for checking. * utils/rapper.c: Revert r15252 and reapply r14951 on rapper to use experimental V2 APIs again * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_v2.h: Remove raptor_v2.h again - no need to dup this for an internal build. Instead use -DRAPTOR_V2_EXPERIMENTAL when building * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Added raptor_v2.h again - internal only and put scary warning about V2 things into raptor.h * src/raptor.h: use -DRAPTOR_V2_EXPERIMENTAL to enable the V2 structs and functions * src/Makefile.am: Remove raptor_v2.h - bad idea for now * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Move public V2 structs and prototypes to internal raptor_v2.h * utils/rapper.c: Revert r14951 on rapper to use V1 APIs only for now * COPYING, COPYING.LIB: Add specific versions of GPL (2) and LGPL (2.1) to source control 2009-07-16 Dave Beckett * docs/raptor-docs.xml, docs/raptor-sections.txt, docs/tmpl/section-general.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-world.sgml: Add new functions. Add section world for init/cleanup and V2 world stuff * src/raptor.h, src/raptor_grddl.c, src/raptor_sequence.c: (raptor_new_sequence_v2): Renamed from raptor_new_sequence_with_handler_context * tests/rdfxml: Ignore automake outputs * tests/ntriples: Ignore automake outputs * tests/feeds: Ignore ttl outputs * tests/feeds/Makefile.am: (check-serialize-atom): Make test use generated file from build dir. * utils/rapper.c: calloc another feature_value * tests/feeds/Makefile.am: set result=1 on failures * utils/rapper.c: calloc feature_value so that fields are initialised to 0/NULL * Raptor passes 'make check' test suite as of SVN r15234 * src/raptor_serialize_rss.c: Guess whether on input is xml or not based on if it starts with < * tests/feeds/test02-result.atom, tests/feeds/test02-result.ttl, tests/feeds/test02.rdf: Add
...
once to descs * tests/feeds/test02.rdf: use
...
in descriptions * tests/feeds/test03-result.atom: fix relative atom:link @href in expected output * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Output relative URIs for * src/raptor_serialize_rss.c: Extra/tidy debug messages 2009-07-15 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement, raptor_rss10_build_items): Use raptor_rss_item_set_uri to always assign item identifier and uri fields correctly. * src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rss_item_set_uri): Added to set the item identifier fields plus the item->uri field correctly. 2009-07-13 Dave Beckett * autogen.sh: Add SHAVE support - disabled by default and enabled for maintainers. libtool V2 needed Add -Wall to automake args Reorder args to remove dups Find config_aux_dir and config_macro_dir and use them for copying in config.{sub,guess} and adjusting aclocal args respectively. 2009-06-21 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement): When mapping fields rss to atom, do not copy into a field that has a value already. 2009-06-13 Dave Beckett * src/raptor_parse.c: (raptor_get_name): Use factory method if present. * src/raptor_guess.c: (raptor_guess_guess_get_name): Implement get_name by passing it on to internal guessed parser. (raptor_guess_parser_register_factory): Register get_name * src/raptor_internal.h: struct raptor_parser_factory_s gains get_name method * src/raptor_guess.c: (raptor_guess_parse_chunk): docs * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Init userCtxt *after* sheet is defined as not NULL. GRDDL transforms now work again. * utils/rapper.c: (main): If counting, do not use a serializer at all. 2009-05-16 Dave Beckett * src/raptor_serialize_rss.c: autodocs * src/raptor_rss.c: (raptor_rss_insert_rss_link): Added to add rss:link from atom:id or (raptor_rss_insert_identifiers): Call above for channel and items. * tests/feeds/test04-result.ttl: items and rss:links point to url not tag: uri * tests/feeds/test05-result.ttl: Moved dc:date to top * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Added more atom:entrymap values 2009-05-12 Dave Beckett * src/raptor_rss.c: (raptor_rss_insert_identifiers): Add an rss:link with /atom:link[@rel="self"]/@href string contents if not already present. * src/raptor_rss.c: (raptor_rss_emit_block): Add resource parameter for the subject of the triples to set. Do not try to play save/restore games with the statement.subject (raptor_rss_emit_item): Pass in item identifier to above. 2009-05-11 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_item): Set the atom author output node type by a quick hack to alter the URIs. 2009-05-10 Dave Beckett * src/raptor_rss.c: raptor_rss_uplift_map merged into raptor_atom_to_rss (raptor_rss_copy_field): Added to do field copy/conversion with pair (raptor_rss_uplift_fields): Iterate over list of conversions and call raptor_rss_copy_field. * src/raptor_rss_common.c: (raptor_rss_field_conversion_date_uplift): Added for converting from junk date to ISO dates. (raptor_rss_date_uplift): Deleted, replaced by above. raptor_atom_to_rss: gains fields from raptor_rss_uplift_map and uses above conversion function to fix rss:pubdate to dc:date * src/raptor_rss.h: Add raptor_rss_field_conversion for converting field values and add to raptor_field_pair * tests/feeds/test05-result.ttl: Add dc:date, atom:id, atom:title fields 2009-05-09 Dave Beckett * tests/feeds/test04-result.ttl: add both rss and renamed atom fields rather than just one: - dc:date & atom:updated - rss:title & atom:title - atom:id - atom:summary * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove renaming of atom terms to rss (raptor_rss_uplift_fields): Add copying of atom to rss terms, not renaming. * src/raptor_rss_common.c: atom:author is a container, not a block raptor_rss_items_info - set value type to RAPTOR_RSS_ITEM_CONTAINER raptor_rss_fields_info - set class to RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS raptor_rss_block_fields_info - remove author from list of blocks * tests/feeds/test04.atom: Restore xhtml namespace to div 2009-05-01 Dave Beckett * docs/tmpl/section-general.sgml: update tmpls * tests/turtle/Makefile.am, tests/turtle/test-32-out.ttl, tests/turtle/test-32.ttl: Added test-32 based on test for http://bugs.librdf.org/mantis/view.php?id=274 * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_collection_items): Notice when a new subject happens and reset property iterator. (raptor_turtle_emit_subject): Look for trees with 2 or more properties to be a potential collection. Fixes Issue#0000277 http://bugs.librdf.org/mantis/view.php?id=277 * src/raptor_parse.c: (raptor_get_feature): Return raw parser int feature. Fixes Issue#0000288 http://bugs.librdf.org/mantis/view.php?id=288 * src/raptor_feature.c: raptor_features_list use bit 16 to record that an int is not a boolean flag. Should refactor these flags for Raptor V2 and alter the raptor_feature_value_type() return. 2009-04-30 Dave Beckett * tests/feeds/Makefile.am: Add atom to turtle expected results to EXPECTED_TTLS * tests/turtle/Makefile.am: Add $(TURTLE_SERIALIZE_RDF_FILES) to dist * tests/turtle/Makefile.am: More fixes for make distcheck testing * tests/turtle/Makefile.am: (check-turtle-parse-ntriples, check-turtle-serialize-rdf): Get filenames from invoking Makefiles in nearby build-dirs not src-dirs, which won't have makefiles in 'make distcheck' mode * tests/ntriples/Makefile.am: Revert r15175 * tests/ntriples/Makefile.am: Make print-nt-test-files work in 'make distcheck' mode * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Make undeclared entity not fatal in parsing - errors are still thrown by the error callback, but parsing continues. Makes http://bugs.librdf.org/mantis/view.php?id=303 easier to deal with - primary data gets out when errors are present; when DTDs are not loaded. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Hunt for error_handlers in parser context user data too. * src/raptor_sax2.c: (raptor_new_sax2): Save correct libxml error handlers 2009-04-24 Dave Beckett * src/raptor.h: Revert raptor_error_handlers ABI change for now 2009-04-23 Dave Beckett * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: Protect calls to xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc() by libxml flags and if enabled, save and restore the previous values. Added raptor_set_libxml_flags() (raptor V1) and raptor_world_set_libxml_flags() (raptor V2) to set these flags. Flags are defined in new enum raptor_libxml_flags. Fixes Issue#000299 http://bugs.librdf.org/mantis/view.php?id=299 * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Use context-specific libslt security configuration to avoid calling xsltSetDefaultSecurityPrefs(). Also allow user to set the policy for raptor globally with new API function raptor_set_libxslt_security_preferences() (and in Raptor V2 with raptor_world_set_libxslt_security_preferences method on the world class) Fixes Isssue#0000296 http://bugs.librdf.org/mantis/view.php?id=296 2009-04-21 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_init, raptor_libxml_init_sax_error_handlers): Init per-context structured error handlers to go to raptor_libxml_xmlStructuredErrorFunc * configure.ac: Use RAPTOR_LDFLAGS for rest of internally linked libs for libm, curl, fetch, libxml, expat, libxslt, libinn (for parsedate) * configure.ac, raptor.pc.in, src/Makefile.am: Introduce RAPTOR_LDFLAGS to replace raw LIBS as the internal set of arguments to use in linking. * configure.ac, src/Makefile.am, utils/Makefile.am: Add --enable-debug configure option. use AM_CPPFLAGS for defines and include options Remove unused STANDARD_CFLAGS 2009-03-31 Lauri Aalto * src/raptor_namespace.c: (raptor_new_namespaces_v2): Lowmem fix. Use calloc instead of malloc to have struct members initialized to zero in case raptor_namespaces_init_v2() fails and need to free a partially initialized nstack. 2009-03-30 Dave Beckett * configure.ac, src/raptor_serialize_rss.c: Test for gettimeofday. (raptor_rss10_ensure_atom_feed_valid): Use condition to avoid calling it on windows that doesn't have it. Patch from Lou Sakey 2008-07-31 to redland-dev * src/raptor_sax2.c: (raptor_sax2_finish): Call xmlCleanupParser() libxml call last to avoid an access violation on windows. Patch from Lou Sakey 2008-07-31 to redland-dev. * src/raptor_general.c: (raptor_vsnprintf): Windows vsnprintf() portability patch from Lou Sakey. 2009-03-29 Dave Beckett * configure.ac: Substitute ECHO * src/raptor_rss.c: (raptor_rss_start_element_handler): Make namespaces seen in fields after any potential renames, so they will get declared later. (raptor_rss_end_element_handler): End any blocks in all cases - was not happening when there was no cdata. (raptor_rss_emit_block): Only emit block strings that are not NULL. (raptor_rss_emit_connection): Turn predicate ordinals into URIs since the RAPTOR_IDENTIFIER_TYPE_ORDINAL is deprecated (and turtle serialiser does not handle it). (raptor_rss_uplift_fields): Gain rss_parser arg and mark namespaces seen in renames. * src/raptor_rss_common.c: raptor_rss_fields_info - restore rss:link value to string. raptor_rss_block_fields_info - fix clashing offset for atom author name/email fields. 2009-03-28 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test02-result.atom, tests/feeds/test04-result.ttl, tests/feeds/test04.atom, tests/feeds/test05-result.ttl, tests/feeds/test05.atom: Add test04 and test05 atom parsing to turtle. Update test suite to show errors better and use ECHO macros * tests/feeds/test0[123].rdf:: Rename test0[123].rss to .rdf * tests/turtle/Makefile.am: Use TURTLE_SERIALIZE_RDF_FILES so that ex-62.rdf gets used * tests/turtle/Makefile.am, tests/turtle/test-31-out.ttl, tests/turtle/test-31.ttl: Add tests for serializing rdf:_ properties back to themselves. 2009-03-23 Dave Beckett * tests/feeds/Makefile.am: use conditionals to execute tests in sane order via FEED_TESTS var * tests/feeds/Makefile.am: (check-serialize-atom): Set parser/input base URI for test. * tests/feeds/Makefile.am: notes * tests/feeds/Makefile.am, tests/feeds/test01-result.ttl, tests/feeds/test02-result.ttl, tests/feeds/test03-result.ttl: Add parsing and serializing tests with intermediate turtle results to check * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Renamed RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE to RAPTOR_FEATURE_PREFIX_ELEMENTS (prefixElements) and change meaning; it always declares prefix: and default namespace but this option flips whether it core vocab is in the prefixed or default namespace. * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Do not declare or start namespaces with NULL prefix; only the default namespace *may* do that. 2009-03-20 Dave Beckett * tests/feeds/test01-result.atom: fix namespaces * tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add namespaces back to all expected results * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Enable turning on/off namespaced elements based on feature_alias_default_namespace 2009-03-19 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Remove -f aliasDefaultNamespace=0 from tests for now, to enable fixing of other things on their own 2009-03-17 Dave Beckett * tests/feeds/Makefile.am: use $(srcdir) before expected * tests/feeds/Makefile.am: report failure diff the right way around: from expected to actual 2009-03-12 Dave Beckett * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Fix atom namespaces * tests/feeds/Makefile.am: Set aliasDefaultNamespace=0 * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add expected test results, make check works from Makefile alone * tests/feeds/Makefile.am: Fix RAPPER call 2009-03-10 Dave Beckett * tests/feeds/test01.atom, tests/feeds/test02.atom, tests/feeds/test03.atom: Remove atom output - now generated via test * tests/feeds/Makefile.am: fix error in error logging * configure.ac, tests/Makefile.am, tests/feeds, tests/feeds/Makefile.am: automaked tests/feed * tests/feeds/Makefile: Removed, now autogenerated 2009-02-28 Dave Beckett * src/raptor_serialize_rss.c: comments * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Code style, remove if() depth. 2009-02-27 Dave Beckett * src/raptor_rss_common.c: Make itunes:owner container work again. 2009-02-25 Dave Beckett * src/raptor_rss_common.c: fix enclosure class/predicate RDF names * src/raptor_rss.h, src/raptor_rss_common.c: Added RAPTOR_RSS_RDF_ENCLOSURE for enclosure predicate in RDF as well as RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class in RDF * src/raptor_rss.c: (raptor_rss_start_element_handler): Declare as seen the namespace for a block. * src/raptor_rss.h, src/raptor_rss_common.c: Add RAPTOR_ATOM_LINK block type * src/raptor_rss.c: (raptor_rss_emit_block): Emit type URI from cls field, not predicate. 2009-02-23 Dave Beckett * src/raptor_rss.c: raptor_rss_element loses unused rel field * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove unused element attribute recognition and * src/raptor_rss.c: (raptor_rss_start_element_handler): Set enclosure namespace used if an enclosure block was seen. 2009-02-22 Dave Beckett * src/raptor_rss_common.c: raptor_rss_items_info - add block predicate types raptor_rss_fields_info - make atom:author a block. add atom:Author, atom:Category, atom:label, atom:schema and atom:term raptor_rss_block_fields_info - add new predicates for atom:category block add atom:author block * src/raptor_rss.c: raptor_rss_parser gains current_block field to store current metadata block object. (raptor_rss_start_element_handler): Set current_block. (raptor_rss_end_element_handler): Store any cdata in block field with NULL attribute if there is one. * src/raptor_rss.c: (raptor_rss_start_element_handler): Wildcard element name matches for RSS namespaces * src/raptor_rss.c: (raptor_rss_block_set_field): Added. (raptor_rss_start_element_handler): Use above to set a block attribute value * src/raptor_rss.c: raptor_rss_parser - comment. (raptor_rss_start_element_handler): Use raptor_rss_get_current_item to get item. When checking block attributes, skip NULL attribute names - for element cdata * src/raptor_rss.c: (raptor_rss_emit_block): Code style and skip block fields with no name. (raptor_rss_emit_item): Code style. * src/raptor_rss_common.c: raptor_rss_fields_info modify to make rss:link and rss:docs take URLs * src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Use RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class and RAPTOR_RSS_FIELD_ENCLOSURE for predicate * src/raptor_rss.h: RAPTOR_RSS_BLOCKS_SIZE 10 after removing rss container * src/raptor_rss.h, src/raptor_rss_common.c: Add itunes: namespace and itunes:owner container with fields in namespace itunes: author, subtitle, summary, keywords explicit, image, name, block, category and email * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type loses RAPTOR_RSS_CATEGORY type. raptor_rss_block_fields_info loses rss category - just make it a string value * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type delete RAPTOR_RSS_UNKNOWN and replace with RAPTOR_RSS_NONE everywhere 2009-02-21 Dave Beckett * src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_field_info renamed from raptor_rss_info * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_items_info renamed from raptor_rss_types_info raptor_rss_types_info gains a flags field to distinguish blocks from containers. (raptor_rss_add_container): Use flag to only scan containers, not blocks. (raptor_rss_emit_block): Handle all types of blocks. Use the node type from raptor_rss_types_info to emit the node type. Use the raptor_rss_block_fields_info to emit the predicates for all blocks. 2009-02-20 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element_handler): Code style. * src/raptor_rss.c: (raptor_rss_insert_identifiers): Tidy to use raptor_set_identifier_uri. Indenting. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: (raptor_rss_start_element_handler, raptor_rss_insert_identifiers, raptor_rss10_serialize_statement): Use raptor_set_identifier_uri and raptor_set_identifier_id and refactor to use them better. (raptor_rss_block_make_blank_node, raptor_rss_insert_block_identifiers): Deleted. (raptor_rss_item_equals_statement_subject): Added. (raptor_new_rss_block): Add id argument. * src/raptor_identifier.c, src/raptor_internal.h: Added raptor_set_identifier_uri and raptor_set_identifier_id * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Remove old enclosure core and switch to data-driven raptor_rss_block metadata code. Update copyrights for 2009. typedef raptor_rss_block_fields_info renamed from raptor_rss_block_info and add docs. Renamed field 'attribute' from field_name, attribute_type from field_type. Added rdf predicate info 'field'. raptor_rss_block_fields_info adds predicate info. (raptor_rss_start_element_handler): Read from raptor_rss_block_fields_info. (raptor_rss_insert_block_identifiers): Renamed from raptor_rss_insert_enclosure_identifiers. (raptor_rss_insert_identifiers): Call above with new name. (raptor_rss_emit_block): Use more data tables to emit block. * src/raptor_rss_common.c: Add sentinel to end raptor_rss_blocks_info array * src/raptor_rss.c: (raptor_rss_start_element_handler): Recognise blocks from flags and handle attributes @url, @length and @type - statically for now. * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_info gains block flag and block_type to use when a block is found. * src/raptor_rss.c: (raptor_rss_start_element_handler): Fix conditions for recognizing inner containers. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Add raptor_rss_block_info to record other metadata blocks configuration: rss enclosues, atom categories, rss category and rss source. Switch raptor_rss_block structure from a list of specific fields to short arrays of urls and strings. (raptor_free_rss_block, raptor_rss_start_element_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_block): Switch to generic raptor_rss_block URLs, strings 2009-02-20 Lauri Aalto * src/raptor_rss.c: (raptor_rss_emit_block): Compilation fix after function parameter rename 2009-02-19 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_block): Renamed from raptor_rss_emit_enclosure * src/raptor_rss.h, src/raptor_rss_common.c: Add none raptor node type * src/raptor_rss.c: Code style / whitespace. (raptor_rss_end_element_handler): Use raptor_rss_get_current_item() to get update_item. 2009-02-18 Dave Beckett * src/raptor_rss.c: (raptor_rss_get_current_item): Pull logic out to get item for current type. (raptor_rss_start_element_handler): Fix inner container processing. Look for rdf:about on an item to get item URI there first. Pull out enclosure construction from general field handling. * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove extra code block & outdent. * src/raptor_rss.c: (raptor_rss_promote_namespace_uri): Added for storing namespace change rules. (raptor_rss_start_element_handler): Use above to simplify field search logic. Document how an element matches a field. * src/raptor_rss.c: (raptor_rss_add_container): Add rules about inner containers, setting prev_type if seen and put author element ambiguity rules here. (raptor_rss_start_element_handler): Use above to replace inner container identification code. * src/raptor_rss.c: (raptor_rss_add_container): Added, pulled out of raptor_rss_start_element_handler to include the logic for determining feed type and container from element name. (raptor_rss_start_element_handler): Call above. * src/raptor_rss.c: (raptor_rss_start_element_handler): Comments and tidying control flow when identifying a container for rss_parser->current_type * src/raptor_rss.c: (raptor_rss_block_make_blank_node): Added pulled out of raptor_rss_insert_identifiers (raptor_rss_insert_identifiers): Call above. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_block gains rss_type field (raptor_new_rss_block): Take type as param and use to set node_type. (raptor_rss_insert_enclosure_identifiers): Remove node_type init and let raptor_new_rss_block set it. (raptor_rss_start_element_handler): Call raptor_new_rss_type with param for enclosure. * src/raptor_rss.h: prototype param * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_item renamed field enclosure to blocks. (raptor_rss_insert_identifiers, raptor_rss_emit_item, raptor_free_rss_item, raptor_rss_item_add_block): Renamed item->enclosure to item->blocks and renamed variables. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Rename raptor_rss_enclosure to raptor_rss_block throughout and corrected naming convention. (raptor_new_rss_block): Renamed from raptor_rss_new_enclosure. (raptor_rss_item_add_block): Renamed from raptor_rss_item_add_enclosure. (raptor_free_rss_block): Renamed from raptor_enclosure_free. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c, utils/rapper.c: Added serializer feature RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE (aliasDefaultNamespace) for atom and rss 1.0 serializers to prevent declaring the default namespace twice with a prefix and without. raptor_feature gains RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE raptor_features_list gains new feature (raptor_turtle_writer_set_feature, raptor_sax2_set_feature, raptor_xml_writer_set_feature, raptor_set_feature, raptor_get_feature, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string): enum extensions for raptor_feature switches. struct raptor_serializer_s gains int field feature_alias_default_namespace raptor_rss10_serializer_context gains a flag free_default_nspace to know when to free default namespace now that it may not be needed. (raptor_rss10_serialize_terminate): Use the free_default_nspace flag. (raptor_rss10_build_xml_names): Implement altered namespace declaration rules. (raptor_new_serializer_v2): Initialise default namespace aliasing to true by default. (raptor_serializer_set_feature): Set flag. * src/raptor_rss.h: document struct raptor_rss_enclosure_s fields 2009-02-18 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: Lowmem fixes in raptor_sax2 (raptor_sax2_s): Internal struct gains "failed" field. (raptor_sax2_parse_start): Check for raptor_namespaces_init_v2() failure and set sax2 struct failure flag. (raptor_sax2_start_element, raptor_sax2_end_element, raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): No-op if sax2 struct in failed state. * src/raptor_namespace.c: (raptor_namespaces_init_v2): Check for alloc failure * src/raptor_namespace.c: (raptor_namespaces_qname_from_uri): Init ns to NULL to prevent use-before-init warnings from some optimizing compilers. 2009-02-17 Dave Beckett * src/raptor_namespace.c: (raptor_namespaces_get_default_namespace): Make this work again - look for default namespace in correct bucket. * librdfa/rdfa.c, src/raptor_internal.h, src/raptor_namespace.c: Replace namespace storage from a linked list to a hash on prefix using raptor_hash_ns_string() witb a DJ Bernstein hash. This makes turtle parsing with lots of namespaces (100s) much faster. Based on the initial patch in the bug it fixes. Fixes Issue#0000290 http://bugs.librdf.org/mantis/view.php?id=290 2009-02-10 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): For XMP add a cosmetic newline after * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Adjust predicate_type when removing ordinal identifier type from predicate. Fixes Issue#0000293 http://bugs.librdf.org/mantis/view.php?id=293 2008-11-26 Dave Beckett * docs/tmpl/section-general.sgml, docs/tmpl/section-triples.sgml: sgml docs * tests/turtle/Makefile.am: more workarounds for noisy gnu make * tests/turtle/Makefile.am: workaround gnu make being noisy * tests/Makefile.am, tests/ex-62.rdf, tests/turtle/Makefile.am, tests/turtle/ex-62.rdf: Moved remaining turtle tests to tests/turtle * configure.ac, tests/Makefile.am, tests/all-escape.nt, tests/all-escape.rdf, tests/bad-00.nt, tests/bad-01.nt, tests/bad-02.nt, tests/bad-03.nt, tests/bad-04.nt, tests/bad-05.nt, tests/bad-06.nt, tests/ntriples, tests/ntriples/Makefile.am, tests/ntriples/all-escape.nt, tests/ntriples/all-escape.rdf, tests/ntriples/bad-00.nt, tests/ntriples/bad-01.nt, tests/ntriples/bad-02.nt, tests/ntriples/bad-03.nt, tests/ntriples/bad-04.nt, tests/ntriples/bad-05.nt, tests/ntriples/bad-06.nt, tests/ntriples/test.nt, tests/ntriples/test.out, tests/test.nt, tests/test.out: Moved ntriples tests to tests/ntriples * tests/Makefile.am: Removed unused OWL URLs * configure.ac, tests/ex*rdf, tests/ex*out, tests/bad*rdf, tests/warn*rdf, tests/warn*out, tests/wine*: Moved rdf/xml parsing and serializing tests to tests/rdfxml * src/raptor_nfc.c: (raptor_nfc_check): Invert check for raptor_nfc_check_combiners "check 3" to make legal Unicode sequence U+006b U+0061 U+0304 U+0062 U+006f U+006c as UTF-8 encoded bytes: 0x6b 0x61 0xcc 0x84 0x62 0x6f 0x6c work. Causes additional raptor_nfc_test failures but they are probably(?) not correct. raptor_nfc_test is not currently part of the normal test suite (make check) Fixes Issue#0000259 http://bugs.librdf.org/mantis/view.php?id=259 2008-11-22 Dave Beckett * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string): Calculate new string size correctly. * src/turtle_parser.y: (turtle_parse): Take a length arg and save a strlen inside lexer by using turtle_lexer__scan_bytes 2008-11-18 Dave Beckett * librdfa/rdfa.c: GIT commit 2ddcb3f9e010d0b3d9ee546e807539be5da1b14a The bug appears whenever there is a subject and predicate specified on an element, but no child nodes for the object literal. Fixes Issue#0000289 http://bugs.librdf.org/mantis/view.php?id=289 2008-11-12 Lauri Aalto * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Fixed raptor_log_error_to_handlers() calls when built with expat. Fixes issue #287 http://bugs.librdf.org/mantis/view.php?id=287 2008-11-07 Dave Beckett * configure.ac: handle empty LEX in test 2008-10-13 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (revert r14679, reapply r14459): Reintroduce sax2_initialized counter. This time to work around issues cleaning up libxml2 in case it was never initialized due to a failure earlier in raptor initialization. 2008-10-09 Lauri Aalto * src/raptor_grddl.c: (raptor_terminate_parser_grddl_common): Zero raptor_xslt_sec variable after xsltFreeSecurityPrefs() to prevent double deletions with multiple raptor instances in the same process. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (Revert r14459) Removed sax2_initialized counter from raptor_world. Does not serve its purpose if multiple raptor_worlds used. 2008-10-08 Lauri Aalto * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Revert r14677 as unnecessary * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: (raptor_world_instance): Internal function turned to an API function for legacy support. 2008-10-07 Lauri Aalto * src/raptor.h: Wrap raptor_world declaration to RAPTOR_WORLD_DECLARED preprocessor guards. * src/raptor_general.c: docs 2008-10-06 Dave Beckett * src/raptor.h: RAPTOR_DISABLE_V1 not RAPTOR_DISBALE_V1 2008-10-06 Lauri Aalto * src/raptor_set.c: Refactored raptor_set_test to use raptor v2 functions. * src/raptor_avltree.c: Refactored raptor_avltree_test to use raptor v2 functions. * src/raptor_turtle_writer.c: Refactored raptor_turtle_writer_test to use raptor v2 functions. * src/raptor_xml_writer.c: Refactored raptor_xml_writer_test to use raptor v2 functions. * src/raptor_www_test.c: Refactored raptor_www_test to use raptor v2 functions. * src/raptor_namespace.c: Refactored raptor_namespace_test to use raptor v2 functions. * src/raptor_uri.c: Refactored raptor_uri_test to use raptor v2 functions. * src/raptor_parse.c: Refactored raptor_parse_test to use raptor v2 functions. * utils/rdfdiff.c: Refactored rdfdiff to use raptor v2 APIs + internals. * src/raptor_internal.h, src/raptor_statement.c: Reorganized internal raptor_statement functions. (raptor_statement_copy): Require raptor_world param, replace earlier raptor_statement_copy_common() static function. (raptor_free_statement): Require raptor_world param, replace earlier raptor_free_statement_common() static function. Loses RAPTOR_DISABLE_V1 status. (raptor_print_statement_v1): Pulled static function to library internals. * utils/rapper.c: Refactored rapper to use raptor v2 API. * src/raptor.h, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_uri.c: (raptor_uri_to_relative_uri_string_v2): New v2 API function. raptor_uri_to_relative_uri_string() depends on V1 functions and cannot be used with RAPTOR_DISABLE_V1 or without raptor_init(). * src/raptor_internal.h: Fixed flipped flag * src/raptor_general.c: (raptor_world_open): Fixed return type * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www init/finish to support v2 raptor_world_instance. Retain source/binary compatibility with old API. (raptor_www_init_v2, raptor_www_finish_v2, raptor_www_no_www_library_init_finish_v2): New API functions that work with raptor_world objects. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Decouple raptor_world allocation and initialization to allow setting flags etc. before init. (raptor_world_open): New API function. (raptor_world_s): Internal struct gains opened field. * src/raptor.h, src/raptor_parse.c, src/raptor_serialize.c: (raptor_parser_get_world, raptor_serializer_get_world): Added two new API functions to access raptor_world from a parser/serializer object. * src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_statement.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_xml_writer.c: Added API flag RAPTOR_V2_AVAILABLE. Flagged v1 functions replaced with v2 variants with RAPTOR_V1 - easy to deprecate later. Wrapped v1 functions replaced with v2 variabrs in #ifndef RAPTOR_DISABLE_V1 - easy to remove old implementations if needed. * src/fix-bison: Keep #line references up to date * src/fix-bison, src/n3_parser.y, src/turtle_parser.y: HACK: Use fix-bison to pass in pure bison parser param (rdf_parser*) to %destructor - raptor_world required for raptor_free_uri_v2(). * src/raptor.h, src/raptor_serialize_ntriples.c: Refactored raptor_serialize_ntriples internals to use v2 raptor_world APIs. (raptor_iostream_write_statement_ntriples_v2): New API function that takes in a raptor_world param. 2008-10-03 Lauri Aalto * src/raptor_grddl.c: Refactored raptor_grddl internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Debug prints to use v2 APIs. * src/raptor_serialize.c: (raptor_serializer_register_factory): Fixed compiler warning in debug print. * src/raptor_namespace.c, src/raptor_qname.c, src/turtle_parser.y: Debug prints to use v2 APIs. * src/raptor.h, src/raptor_sequence.c: (raptor_new_sequence_with_handler_context): New API function that supports passing context data (e.g. raptor_world) to free_handler, print_handler. (raptor_sequence_set_print_handler_v2): New API function. (raptor_sequence_free_handler_v2, raptor_sequence_print_handler_v2): New API callback function typedefs for raptor_new_sequence_with_handler_context(), raptor_sequence_set_print_handler_v2(). (raptor_sequence_print_uri): Deprecated API function, should use raptor_uri_print(), raptor_uri_print_v2() instead. (raptor_free_sequence, raptor_sequence_set_at, raptor_sequence_push, raptor_sequence_shift): Support free_handler_v2 (raptor_sequence_print): Support print_handler_v2. * src/raptor_expat.c: (raptor_expat_init): v2 APIs * src/raptor.h, src/raptor_iostream.c, src/raptor_serialize_simple.c: Refactored raptor_iostream internals to use v2 raptor_world APIs. (raptor_iostream_write_uri_v2): New API function that takes in a raptor_world param. (raptor_simple_serialize_statement): Use raptor_iostream_write_uri_v2() instead of raptor_iostream_write_uri(). * utils/rdfdiff.c: (long_options,title_format_string): Use const qualifier for constant data. * utils/rapper.c: (long_options,title_format_string): Use const qualifier for constant data. * src/raptor_www.c: Changed raptor_www_do_www_init_finish to its inverse raptor_www_skip_www_init_finish to make the flag default to 0 -> moved from writable .data chunk to .bss. * librdfa/curie.c: (g_property_reserver_words,g_relrev_reserver_words): Use const qualifier for constant data. 2008-10-02 Lauri Aalto * src/raptor_statement.c: (raptor_statement_compare_v2): Fixed args to raptor_statement_compare_common() * src/raptor_statement.c: (raptor_print_statement_as_ntriples_common): Added const qualifier to helper prototype * src/raptor.h, src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_rss_common.c, src/raptor_serialize_json.c, src/raptor_serialize_rss.c, src/raptor_statement.c: Refactored raptor_statement internals to use v2 raptor_world APIs. (raptor_statement_v2): New API struct for wrapping raptor_statement with raptor_world without breaking source/binary compatibility. (raptor_print_statement_v2, raptor_print_statement_as_ntriples_v2, raptor_statement_compare_v2): New API function variants that work on raptor_statement_v2 objects. (raptor_statement_part_as_counted_string_v2, raptor_statement_part_as_string_v2): New API function variants that take in raptor_world object. (raptor_statement_copy_v2, raptor_statement_copy_v2_from_v1, raptor_free_statement_v2): New internal raptor_statement_v2 lifecycle functions. (raptor_print_abbrev_po): Use raptor_statement_part_as_string_v2(). (raptor_new_rss_item, raptor_rss10_serialize_init, raptor_rss10_move_statements, raptor_rss10_move_anonymous_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_build_items, raptor_rss10_emit_rdfxml_item_triples, raptor_rss10_serialize_end): triples sequences are now sequences of raptor_statement_v2. (raptor_json_serialize_start, raptor_json_serialize_statement): context->avltree is now a tree of raptor_statement_v2. (raptor_statement_copy_common): (Pulled from raptor_statement_copy.) Now also checks for OOM. * librdfa/curie.c, librdfa/rdfa.c: Refactored librdfa raptor integration internals to use v2 raptor_world APIs. 2008-09-23 Lauri Aalto * src/raptor_www_libfetch.c, src/raptor_www_libxml.c: Refactored raptor_www_lib{fetch,xml} internals to use v2 raptor_world APIs. * src/raptor_www_curl.c: Refactored raptor_www_curl internals to use v2 raptor_world APIs. 2008-09-22 Lauri Aalto * src/raptor_abbrev.c, src/raptor_namespace.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_xml.c: Use raptor_new_qname_from_namespace_local_name_v2() instead of raptor_new_qname_from_namespace_local_name() 2008-09-20 Lauri Aalto * src/raptor_sequence.c: (raptor_sequence_set_at): Maintain sequence design contract: "size" consecutive items in "sequence" starting from "start" when setting items more than +1 offset beyond the end of sequence. Fixes Issue#000276 http://bugs.librdf.org/mantis/view.php?id=276 2008-09-19 Lauri Aalto * src/raptor_serialize_rss.c: (raptor_rss_group_map): Internal struct gains world field, cannot trust item to be valid to use item->world. (raptor_free_group_map, raptor_rss_group_map_compare, raptor_rss10_set_item_group): Use/init group_map's raptor_world. (raptor_rss10_get_group_item): Init world field on search group map allocated on stack. * src/raptor_rss_common.c: (raptor_new_rss_item): Init identifier.world as well * src/raptor.h, src/raptor_qname.c: (raptor_new_qname_from_namespace_local_name_v2): New API function that takes in a raptor_world param. Passed in raptor_namespace* may be NULL -> cannot use ns->world. (raptor_qname_copy): Copy qname->world as well. * src/raptor_serialize_json.c: Refactored raptor_serialize_json internals to use v2 raptor_world APIs. * src/raptor_serialize_dot.c: Refactored raptor_serialize_dot internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Refactored raptor_serialize_rss internals to use v2 raptor_world APIs. * src/raptor_serialize_turtle.c: Refactored raptor_serializer_turtle internals to use v2 raptor_world APIs. * src/raptor_serialize_rdfxmla.c: Refactored raptor_serializer_rdfxmla internals to use v2 raptor_world APIs. * src/raptor_avltree.c: (raptor_new_avltree): Bugfix: set world field to passed in value. * src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_internal.h, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c: Refactored raptor_abbrev, raptor_avltree internals to use v2 raptor_world APIs. (raptor_new_abbrev_node, raptor_new_avltree): Internal functions changed to take in raptor_world. (raptor_avltree_s): Moved internal struct definition to raptor_internal.h. Gains world field. (raptor_abbrev_node): Internal struct gains world field. * src/raptor_serialize_json.c: (raptor_json_serializer_start): Fixed accidentally deleted base_uri declaration * src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize_json.c: Refactored raptor_json_writer internals to use v2 raptor_world APIs. (raptor_new_json_writer): Internal function prototype changed. Require raptor_world, do not take uri handlers anymore. * src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_turtle_writer.c: Further internals refactoring to use v2 raptor_uri functions. * src/raptor.h, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_statement.c, src/raptor_uri.c: Further refactored raptor_uri internals to use v2 raptor_world APIs. (raptor_uri_to_relative_counted_uri_string_v2, raptor_uri_print_v2, raptor_uri_to_counted_string_v2, raptor_uri_to_string_v2): New API functions that take in a raptor_world param. (raptor_new_uri_from_rdf_ordinal): Changed internal function to take in raptor_world. * src/raptor_serialize_rdfxml.c: Refactored raptor_serialize_rdfxml internals to use v2 raptor_world APIs. 2008-09-18 Lauri Aalto * src/raptor_librdfa.c: Refactored raptor_librdfa internals to use v2 raptor_world APIs. * src/raptor_guess.c: Refactored raptor_guess internals to use v2 raptor_world APIs. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Refactored raptor_rss internals to use v2 raptor_world APIs. (raptor_rss_field_s, raptor_rss_item_s, raptor_rss_model, raptor_rss_element_s): Internal structs gain world field. (raptor_new_rss_item, raptor_rss_new_field): Internal functions gain world param. * src/ntriples_parse.c: Refactored ntriples_parse internals to use v2 raptor_world APIs. * src/n3_lexer.l, src/n3_parser.y: Refactored n3_parser/n3_lexer internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. 2008-09-12 Lauri Aalto * src/turtle_parser.y: Refactored turtle_parser internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. * src/turtle_lexer.l: Refactored turtle_lexer internals to use v2 raptor_world APIs. * src/n3_parser.y: (FLOATING_LITERAL): missing cast * src/raptor_sax2.c: Refactored raptor_sax2 internals to use v2 raptor_world APIs. * src/raptor_www.c: (raptor_www_fetch): Use raptor_new_uri_for_retrieval_v2() * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_for_xmlbase_v2, raptor_new_uri_for_retrieval_v2): Added new v2 API functions to replace old ones. Refactored internals to use raptor v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_from_id_v2): Added new API function to replace raptor_new_uri_from_id(). Refactored internals to use raptor v2 raptor_world APIs. * src/n3_parser.y, src/raptor_internal.h, src/raptor_xsd.c: Refactored raptor_xsd internals to use v2 raptor_world APIs. (raptor_new_identifier_from_double): Internal function prototype changed. * src/raptor_turtle_writer.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: Refactored raptor_turtle_writer internals to use v2 raptor_world APIs. (raptor_new_turtle_writer): Internal function prototype changed. * src/raptor_set.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_set.c: Refactored raptor_set internals to use v2 raptor_world APIs. (raptor_new_id_set): Internal function changed to require raptor_world param. * src/raptor.h, src/raptor_xml_writer.c: Refactored raptor_xml_writer internals to use v2 raptor_world APIs. (raptor_new_xml_writer_v2): New API function that takes in a raptor_world param. 2008-09-10 Dave Beckett * docs/libraptor.3: extra b 2008-09-10 Lauri Aalto * src/raptor_rss.h: (raptor_rss_namespace_info): Fix const member missing constructor warning in c++ mode. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_world_s, raptor_sax2_init, raptor_sax2_finish): Store raptor_sax2 init counter in raptor_world. Works around resiliency issues in some xml parser implementations where xmlCleanupParser() crashes if xmlInitParser() has not been run. 2008-09-08 Lauri Aalto * src/raptor.h, src/raptor_internal.h: Moved EXTERN_C definitions to internal header - no need to expose in API. * src/raptor.h, src/raptor_iostream.c, src/raptor_parse.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_www.c: Workaround for an armcc c++ mode issue regarding function pointers as arguments: Need explicit extern "C" to get C linkage for C function pointers. * src/raptor_rdfxml.c: (rdf_syntax_terms_info,rdf_content_type_info): Fixed c++ mode warnings about missing const member initializers. Array data is already const by the outermost const. * src/n3_lexer.l, src/turtle_lexer.l: casts for c++ 2008-09-05 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Use fputs when there is no error handler. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_field_zero_one): do not assign same variable field while initing it. * librdfa/rdfa.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Fixes for g++ from Issue#0000270 http://bugs.librdf.org/mantis/view.php?id=270 2008-09-04 Lauri Aalto * src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rdfxml_start_element_handler, raptor_rss_new_enclosure): Bugfix: Initialize world fields in composed raptor_identifiers. * src/raptor_xml.c: Refactored raptor_xml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_identifier.c: Refactored raptor_identifier internals to use v2 raptor_world functions. (raptor_new_identifier_v2): New API function that takes in raptor_world param. (raptor_identifier): API struct gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_identifier) changed. Source compatibility not broken. 2008-09-03 Lauri Aalto * src/raptor_parse.c: (raptor_parse_uri_with_connection): Use raptor_www v2 functions * src/raptor.h, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www internals to use v2 raptor_world functions. (raptor_www_new_v2, raptor_www_new_with_connection_v2): New API functions that take in raptor_world param. (raptor_www_s): Internal struct gains world param. * src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_www.c: Refactored raptor logging to use v2 raptor_world functions. Store world pointer to raptor_sax2, raptor_error_handlers. (raptor_error_handlers): API struct gains world field. BINARY COMPATIBILITY BREAK: struct size and layout changed. (Source compatibility not broken.) (raptor_error_handlers_init_v2): New API function that takes in raptor_world param. (raptor_log_error_to_handlers, raptor_log_error_varargs, raptor_log_error): Internal logging functions now require a raptor_world param (may be NULL). (raptor_sax2_s): Internal struct gains world field. * src/raptor_rss_common.c: (raptor_rss_types_info, raptor_rss_fields_info): Fixed gcc warnings about missing initializers. * src/raptor_internal.h, src/raptor_qname.c: (raptor_free_qname, raptor_qname_copy, raptor_new_qname, raptor_new_qname_from_namespace_local_name): Bugfix: qname nspace field may be NULL. Store world pointer in qname struct and use it instead of indirecting nspace->nstack->world. (raptor_qname_s): Internal struct gains world field. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Refactored raptor_feature internals to use v2 raptor_world functions. (raptor_features_enumerate_v2, raptor_serializer_features_enumerate_v2, raptor_feature_from_uri_v2, raptor_xml_writer_features_enumerate_v2): New API functions that take in raptor_world param. (raptor_features_enumerate_common, raptor_turtle_writer_features_enumerate): Internal functions changed to take in raptor_world param. * src/raptor_qname.c: Refactored raptor_qname internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_internal.h, src/raptor_namespace.c: Refactored raptor_namespace internals to use v2 raptor_world functions. (raptor_new_namespaces_v2, raptor_namespaces_init_v2): New API functions that take in raptor_world param and use the uri handlers defined in it. (raptor_namespace_stack_s): Internal struct gains world field, loses uri_handler, uri_context fields. 2008-09-02 Dave Beckett * src/raptor_nfc_test.c: Update what is being ntested 2008-09-02 Lauri Aalto * src/raptor_serialize.c: (raptor_serializer_error_varargs, raptor_serializer_warning_varargs): Use locator v2 functions * src/raptor.h, src/raptor_locator.c: Refactored raptor_locator internals to use v2 raptor_world functions. (raptor_print_locator_v2, raptor_format_locator_v2, raptor_locator_uri_v2): New API functions that take in a raptor_world param. * src/raptor_uri.c: (raptor_uri_init): Use raptor_world* as default uri handler context. (raptor_default_new_uri): Refactored internals to use v2 raptor_world functions. * src/raptor_serialize.c: (raptor_serialize_start_to_iostream, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_free_serializer, raptor_serializer_set_feature_string): Refactored raptor_serialize internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_parse.c: Refactored raptor_parse internals to use v2 raptor_world functions. (raptor_new_parser_for_content_v2): New API function that takes in a raptor_world param. (raptor_parser_register_factory, raptor_parser_factory_add_alias, raptor_guess_parser_name_v2): Use RAPTOR_DEBUG instead of RAPTOR_FATAL for error messaging and let caller handle the error. These error conditions are really tests for development-time assumptions and should surface in maintainer mode (debug messages enabled). (raptor_start_parse, raptor_free_parser, raptor_parse_file, raptor_parse_file_no_net_filter, raptor_parse_uri_with_connection, raptor_guess_parser_name_v2): Refactored to use v2 raptor_world functions. * src/raptor_general.c, src/raptor_www.c: (raptor_new_world, raptor_free_world, raptor_init, raptor_finish): Moved raptor_www init/finish calls to new_world/free_world. Added a FIXME note to raptor_www to re-engineer the init/finish API. * src/raptor_internal.h, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Made raptor_rss_{namespaces,types,fields}_info arrays const and moved non-const uris/qnames to raptor_world. (raptor_rss_namespace_info): Internal struct loses uri field. (raptor_rss_info): Internal struct oses uri,qname fields. (raptor_world_s): Internal struct gains rss_common_initialised (from raptor_rss_common_initialised static in raptor_rss_common.c); rss_namespaces_info_uris, rss_types_info_uris, rss_types_info_qnames, rss_fields_info_uris, rss_fields_info_qnames from raptor_rss_{namespaces,types,fields}_info arrays. (raptor_rss_item_s): Internal struct gains node_typei field for indexing to uris/qnames in raptor_world. (raptor_rss10_serializer_context): Internal struct gains world field. (raptor_rss_common_init): Require raptor_world param. Return int return code. Allocate and init uri arrays in raptor_world. (raptor_rss_common_terminate): Require raptor_world param. Free allocs by raptor_rss_common_init(). (raptor_rss10_build_xml_names): Allocate and init qname arrays in raptor_world. Store item type index for uri/qname access. Access uris/qnames in raptor_world. (raptor_rss10_serialize_terminate): Free qname arrays in raptor_world. (raptor_rss_model_init): Require raptor_world param. (raptor_rss_parse_init, raptor_rss_start_element_handler, raptor_rss_sax2_new_namespace_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_enclosure, raptor_rss_emit_item, raptor_rss_emit, raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_emit_atom_triples_map, raptor_rss10_emit_rss_items): Access uris/qnames in raptor_world. (raptor_rss_insert_identifiers): Store item type index for uri/qname access. (raptor_rss10_emit_item): Store item type index for uri/qname access. Access uris/qnames in raptor_world. 2008-09-01 Dave Beckett * src/raptor_nfc_test.c: format * src/raptor_nfc_test.c: Make test take file as argument. Add where it can be found * librdfa/curie.c: Merge to GIT 5e29c166212c61d86223d2c4aa97e67fe0655063 2008-09-01 Lauri Aalto * src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish, raptor_init, raptor_finish, raptor_new_world, raptor_free_world): Changed raptor_sax2 init/finish code to the raptor_world model. Take in (unused) raptor_world param. * src/raptor_grddl.c: (raptor_init_parser_grddl_common): Fixed signature to match prototype * src/n3_parser.y, src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_uri.c, src/raptor_www_test.c, src/turtle_parser.y: Moved uri_handler and uri_handler_context to raptor_world. (raptor_new_uri_v2, raptor_new_uri_from_uri_local_name_v2, raptor_new_uri_relative_to_base_v2, raptor_new_uri_for_rdf_concept_v2, raptor_free_uri_v2, raptor_uri_equals_v2, raptor_uri_compare_v2, raptor_uri_copy_v2, raptor_uri_as_string_v2, raptor_uri_as_counted_string_v2, raptor_uri_set_handler_v2, raptor_uri_get_handler_v2): New API functions that take in a raptor_world object. (raptor_uri_init,main): Changed internal function to take in raptor_world param. Changed test code callers to use full raptor_init()/raptor_finish() instead so that the world is properly set up. FIXME: Refactor the raptor_uri opaque abstraction so that it can store raptor_world* - no need to pass in world as an argument to calls that take raptor_uris. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c: Moved serializers sequence to raptor_world. (raptor_serializers_enumerate_v2, raptor_serializer_syntax_name_check_v2, raptor_new_serializer_v2): New API function variants that accept a raptor_world object. (raptor_serializer_s, raptor_seriazlizer_factory_s): Internal structs gain world field. (raptor_serializer_register_factory, raptor_serializers_init, raptor_serializers_finish, raptor_init_serializer_*): Internal functions changed to require raptor_world param. (raptor_delete_serializer_factories): Removed unnecessary prototype. * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Introduced a raptor_world object for storing library-wide data instead of static variables. Moved parsers sequence to raptor_world. (raptor_new_world, raptor_free_world): New API functions, eventually to replace raptor_init() and raptor_finish(). (raptor_parsers_enumerate_v2, raptor_syntaxes_enumerate_v2, raptor_syntax_name_check_v2, raptor_guess_parser_name_v2, raptor_new_parser_v2): New API function variants that accept a raptor_world object. (raptor_parser_s, raptor_parser_factory_s): Internal structs gain world field. (raptor_parser_register_factory, raptor_parser_factory, raptor_parser_get_accept_header_all, raptor_parsers_init, raptor_parsers_finish, raptor_init_parser_*): Internal functions changed to require raptor_world param. (raptor_world_instance): New accessor for a static pointer to a raptor_world instance created by raptor_init(). Required for supporting non-v2 API functions (where v2 variants exist). 2008-08-29 Dave Beckett * src/turtle_parser.y: (raptor_trig_parse_recognise_syntax, raptor_trig_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_librdfa.c: (raptor_librdfa_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/Makefile.am, src/raptor_memnstr.c, src/raptor_memstr.c (from /raptor/trunk/src/raptor_memnstr.c:14406): Renamed raptor_memnstr.c to raptor_memnstr.c * src/raptor_internal.h, src/raptor_memnstr.c: (raptor_memstr): Renamed from raptor_memnstr 2008-08-27 Dave Beckett * src/raptor_memnstr.c: comment * src/raptor_memnstr.c: includes * src/raptor_memnstr.c: internal * src/raptor_internal.h: Added raptor_memnstr() * src/Makefile.am: Added raptor_memnstr.c * src/raptor_memnstr.c: Added raptor_memnstr 2008-08-25 Lauri Aalto * src/fix-flex: Removed additional OOM checks added to flex-generated ensure_buffer_stack(). flex versions 2.5.34 and later generate the OOM checking code themselves. 2008-08-24 Dave Beckett * utils/rapper.c: (main): Make printing triples count at least potentially localizable. * src/raptor_uri.c: Added tests for Issue#0000268 http://bugs.librdf.org/mantis/view.php?id=268 which pass. 2008-08-20 Lauri Aalto * tests/rdfa/Makefile.am: Run tests inside set +e ... set -e 2008-07-10 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Cast to eliminate compiler printf-like format arg warning. 2008-07-04 Dave Beckett * configure.ac: Use AC_PROG_CC AM_PROG_CC_C_O 2008-07-04 Lauri Aalto * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Validate XSD integer, decimal and double literal output. Emit special short forms only if the whole literal value is consumed by strtol() (for integers) or strtod() (for decimals and doubles). Otherwise produce a warning and emit literal in the normal "value"^^ format. Fixes Issue #0000263 http://bugs.librdf.org/mantis/view.php?id=263 2008-07-03 Dave Beckett * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.19 * docs: props 2008-07-02 Dave Beckett * docs/libraptor.3: 2008 2008-07-02 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Produce error messages when raptor_new_uri() fails. Fixes Issue #0000262 http://bugs.librdf.org/mantis/view.php?id=262 2008-06-29 Dave Beckett * tests/feeds/Makefile: fix * tests/feeds/Makefile, tests/feeds/atom.rnc, tests/feeds/atom.rng, tests/feeds/test01.atom, tests/feeds/test01.rss, tests/feeds/test02.atom, tests/feeds/test02.rss, tests/feeds/test03.atom, tests/feeds/test03.rss: Feed examples * tests/feeds: Add feeds 2008-06-25 Dave Beckett * Snapshotted raptor_1_4_18 for 1.4.18 release (SVN 14104) 2008-06-23 Dave Beckett * docs/Makefile.am, utils/Makefile.am: Use $(PERL) not perl 2008-06-20 Dave Beckett * README.html, RELEASE.html, docs/raptor-parsers.xml, utils/rapper.1: Update RDFa pointers to http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/ caniddate rec * src/raptor_sequence.c: (raptor_sequence_set_at): Correct counting when there is old data but no free handler. * tests/rdfa/0011.out, tests/rdfa/0092.out, tests/rdfa/0094.out, tests/rdfa/0099.xhtml, tests/rdfa/0100.out, tests/rdfa/0100.xhtml, tests/rdfa/0101.out, tests/rdfa/0101.xhtml, tests/rdfa/0102.out, tests/rdfa/0102.xhtml, tests/rdfa/0103.out, tests/rdfa/0103.xhtml, tests/rdfa/0104.xhtml, tests/rdfa/0105.out, tests/rdfa/0105.xhtml, tests/rdfa/0106.out, tests/rdfa/0106.xhtml, tests/rdfa/0107.out, tests/rdfa/0107.xhtml, tests/rdfa/0110.out, tests/rdfa/0110.xhtml, tests/rdfa/0111.out, tests/rdfa/0111.xhtml, tests/rdfa/0112.out, tests/rdfa/0112.xhtml, tests/rdfa/Makefile.am: Update approved tests from http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/ as of now 2008-06-19 Dave Beckett * docs/libraptor.3: Added raptor_serialize_start_to_iostream for 1.4.18 * docs/raptor-tutorial-serializing.xml: xml * docs/raptor-tutorial-serializing.xml: Explain raptor_serialize_start and raptor_serialize_start_to_iostream, recommending the latter. * docs/Makefile.am: Call gtkdoc-scan with --deprecated-guards="RAPTOR_DISABLE_DEPRECATED" * src/ntriples_parse.c, src/raptor.h, src/raptor_iostream.c, src/raptor_statement.c, src/raptor_turtle_writer.c, src/raptor_uri.c: Use RAPTOR_DISABLE_DEPRECATED macro to wrap disabling deprecated functions and prototypes * docs/tmpl/section-feature.sgml, docs/tmpl/section-serializer.sgml: docs tmp * src/raptor_iostream.c: typo * docs/raptor-sections.txt: Added raptor_serialize_start_to_iostream * src/raptor_serialize.c: (raptor_serialize_set_namespace): Allow "" as a synonym for NULL prefix. 2008-06-18 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Use _:author for atom author bnode always since atom:author may not be a valid bnode ID. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_field_zero_one): Added. (raptor_rss10_ensure_atom_feed_valid): Use raptor_rss10_ensure_atom_field_zero_one to ensure that fields appear 0 or 1 times for atom feed and entry. 2008-06-15 Dave Beckett * docs/rdfserialize.c: Casts for C++ * librdfa/rdfa.c: GIT commit 8892f4056d9486d7bdd0cc89fe12b3a863a4d418 (rdfa_free_context): rewrite rdfa_free_list(context->context_stack) call to look and do a proper rdfa_free_context() on each returned item that is not ourself. Still leaks one malloc but does not crash parser on error. * src/raptor_librdfa.c: (raptor_librdfa_parse_start): Init librdfa context->error_handlers from static field in raptor_parser structure so that error handlers are passed correctly to librdfa and raptor_sax2 * librdfa/rdfa.c, librdfa/rdfa.h: GIT commit 1a4f7d0352017cf6d55ecbcf7d355badb0c777f9. Do not make a new error_handlers structure for the rdfa context, use the one passed in from the top-level rdfacontext, set by raptor as error_handlers static in the raptor_parser structure * src/raptor_serialize_dot.c: (raptor_dot_serializer_new_node): Return NULL [sparse] * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_grammar): Call raptor_rdfxml_process_property_attributes with NULL not 0 [sparse] * src/raptor_grddl.c: match_table: Use NULL for pointer in sentinal. [sparse] * src/raptor_abbrev.c: (raptor_new_abbrev_node): Return NULL [sparse] * src/raptor_rss.h: raptor_rss_field bitfields should be unsigned [sparse] * src/raptor_sax2.c: #ifdef RAPTOR_XML_EXPAT * src/raptor_rdfxml.c: #ifdef RAPTOR_DEBUG_VERBOSE * src/raptor_nfc_test.c: casts * configure.ac, src/raptor_nfc.h: Use autoconf 2.5.x AC_CHECK_TYPES for u8 and u16 2008-06-14 Dave Beckett * utils/rapper.c: fix comment * utils/rapper.c: Fix HELP_ARG_BOTH quoting as used in help message. 2008-06-13 Dave Beckett * examples/raptor_abort.c, examples/rdfserialize.c: Casts for C++ * src/raptor_serialize_rss.c: Casts to remove warnings when compiling with C++ * librdfa/curie.c, librdfa/rdfa.c, librdfa/rdfa_utils.c, librdfa/triple.c: GIT commit aefb63f96141d64e1a9f5845600feebac6aefa45 librdfa casts to remove warnings when compiling with C++ * src/n3_common.h, src/ntriples_parse.c, src/raptor_expat.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_librdfa.c, src/raptor_libxml.c, src/raptor_locator.c, src/raptor_nfc.c, src/raptor_nfc.h, src/raptor_nfc_test.c, src/raptor_rfc2396.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_simple.c, src/raptor_utf8.c, src/raptor_win32.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libfetch.c, src/raptor_www_libxml.c, src/raptor_www_test.c, src/raptor_xsd.c, src/turtle_common.c, src/turtle_common.h: 2008 * utils/rapper.c: Tidy variables into parser, serializer, other blocks. Output in error, info messages when filename is NULL * src/raptor_sequence.c: (raptor_sequence_set_at): Tidy tortured test. * src/raptor_sequence.c: (raptor_sequence_set_at): Update size when not over-writing an existing item. 2008-06-12 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_move_leftover_statements): Added to move any remaining triples after initial serialize_statement scan, to items or channel. (raptor_rss10_serialize_end): Call raptor_rss10_move_leftover_statements. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Use correct URI for rss:items with new macro RAPTOR_RSS_RSS_items_URI replacing RAPTOR_RSS_RDF_items_URI * src/raptor_rss_common.c: (raptor_rss_model_init): Init RAPTOR_RSS_RSS_items_URI against rss: (rss 1.0) namespace, not rdf: * src/raptor_rss.h: RAPTOR_RSS_RDF_items_URI renamed to RAPTOR_RSS_RSS_items_URI since it is in the rss: (rss 1.0) namespace * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): Use raptor_serialize_start_to_iostream() with no destroying iostream instead of raptor_serialize_start(). * src/raptor.h: Added raptor_serialize_start_to_iostream prototype * src/raptor_serialize.c: (raptor_serialize_start_to_iostream): Added to have the new semantics of not owning and destroying the passed-in iostream * tests/rdfa/Makefile.am: 0094.xhtml fails now * librdfa/rdfa.c: GIT commit c2ca66384c2e201023e0ca7cb4d9e38450459c93 (rdfa_parse_end): Ensure rdfa_pop_item() is called when in raptor too * librdfa/rdfa.c: GIT commit 346046a980aee3ed84f69f482a74f95e2414c267 (start_element): Sort namespaces by prefix and hide overriden ones 2008-06-10 Dave Beckett * librdfa/rdfa.c, librdfa/rdfa.h: Merge to GIT fd8d211db142e14007ea6b3ac3eab090adf0a793 * librdfa/curie.c, librdfa/rdfa.c, librdfa/rdfa.h, librdfa/rdfa_utils.c, librdfa/rdfa_utils.h, librdfa/triple.c: Merge to GIT a119a5ea0f215ec6036e79de30bb1131d9ca5647 * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): correct docs * src/raptor_avltree.c: (main): Do not call an internal debug function raptor_avltree_print() in unit testing. * src/raptor_sequence.c: (main): Remove test for preventing raptor_sequence_set_at() at size+1; this is now allowed. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Ignore any triple with predicate rss:items as it can be infered later for RSS 1.0 and ignore for Atom 1.0 * src/raptor_rss.h, src/raptor_rss_common.c: Added rss:items to raptor_rss_model concepts with macro RAPTOR_RSS_RDF_items_URI * src/raptor_serialize_rss.c: (raptor_rss10_build_items): Skip triples that have no URI value. * src/raptor_sequence.c: (raptor_sequence_set_at): Handle extending the sequence beyond capacity+1 * src/raptor_serialize_rss.c: (raptor_rss10_move_statements): Handled anonymous triples twice and the handled flag did not help - removed. Improved the logic to clearly 'continue' loop when a triple is handled; added comments to say why. Changed signature to return number of triples used, not presently used by callers. * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Off by 1 in declaring user namespaces. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_set_xml_writer): Free any namespaces declared on the old stack, before freeing the stack. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_terminate): Free all allocated namespaces now it doesn't crash things. * src/raptor_serialize_rss.c: Ensure namespaces are freed before the stack they are associated with, so that URI destructor handler calls work. (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate): Add raptor_free_namespace to user_namespaces sequence and call it early. (raptor_rss10_serialize_end): Do not free namespace stack here, as it refers to namespaces that are still alive. * src/raptor_serialize_rss.c: (raptor_rss10_build_items): Make a fake triple subject URI for comparison with seq node ID. 2008-06-09 Dave Beckett * docs/raptor-parsers.xml: Added RDFa parser * docs/raptor-serializers.xml: rss 1.0 and atom 1.0 serializer notes 2008-06-05 Dave Beckett * utils/rapper.c: update the parser/serializer name length to 14 for 'rss-tag-soup' & 'json-triples' which are at the previous max 12 * configure.ac: enable atom serializer for everyone * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_triples_map, raptor_rss10_emit_atom_feed): Adjust raptor_rss10_emit_atom_triples_map calling convention to add element name and code tidy. * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_triples_map): Added, pulled out of raptor_rss10_emit_atom_feed. Skip maps that do not apply to feed element. (raptor_rss10_emit_atom_feed): Call above twice, to generate at:feedmap and at:entrymap. * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement): Set is_xml field when field is content:encoded (raptor_rss10_emit_item): Select rdf:parseType="Literal" for rss output with XML valued literals but prefer CDATA block for content:encoded. 2008-06-04 Dave Beckett * src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c: Make rdfxml and rdfxml-abbrev serializers respect feature writeBaseURI. * src/raptor_feature.c: Adjust RAPTOR_FEATURE_WRITE_BASE_URI description * src/raptor_serialize_rss.c: (raptor_rss10_serialize_end): Respect feature writeBaseURI * src/raptor_serialize_rss.c: raptor_rss10_serializer_context gains xml_literal_dt URI field. (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate): Free xml_literal_dt field. (raptor_rss10_move_statements, raptor_rss10_store_statement): Set is_xml field when an XML literal. (raptor_rss10_emit_atom_feed, raptor_rss10_emit_rss_items): Emit relative URIs. (raptor_rss10_ensure_atom_feed_valid): Set atom:id if not present, to item URI. (raptor_rss10_emit_item): Emit relative URIs except for atom:id For atom:content with a URI value, write and take the type from at:contentType When writing a literal value and it is xml, write an atom type='xhtml'. * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_field gains is_xml field. Added at:contentType / RAPTOR_RSS_FIELD_AT_CONTENT_TYPE field * src/raptor_uri.c: (raptor_uri_to_relative_counted_uri_string): Add support for a base URI with scheme and authority but no path, so the result can be a relative URI starting with '/'. (main): Add a test for the above * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Tidy is_atom/not code. 2008-06-04 Lauri Aalto * src/raptor_serialize_rss.c: Fixed warnings. (raptor_rss10_emit_rdfxml_item_triples, raptor_rss10_serialize_end): Init variables to NULL for some optimizing compilers that warn about possible use-before-init. (raptor_rss10_emit_item): Cast int to enum. 2008-06-04 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Add is_entry flag and use it to decide root name atom:feed or atom:entry for atom serializer. (raptor_rss10_serialize_end): When a feature atom_entry_uri is set, look for a matching item and if found, emit just that as an atom entry document. 2008-06-03 Dave Beckett * src/raptor_rss_common.c: (raptor_rss_set_date_field): cast 2008-06-02 Dave Beckett * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_ATOM_ENTRY_URI to set the Atom Entry document URI for the atom serializer 2008-05-29 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): Remove rdf-xml atom:content for; it's not used. Check for 0 triples and end if nothing to emit. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_feed_valid): ! * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_feed_valid): Remove any atom:content or atom:summary in feed * src/raptor_rss_common.c: raptor_atom_to_rss: rss:description maps to atom:summary * tests/rdfa/Makefile.am: 0058 now passes and the others pass if you re-order the xml namespaces * src/raptor_serialize_rss.c: ws * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_items_valid): Added to check and correct atom id, title, updated and link OR content. (raptor_rss10_emit_item): Handle atom:link being written as - no choice for now on rel. (raptor_rss10_serialize_end): Call raptor_rss10_ensure_atom_items_valid * src/raptor_xml_writer.c: (raptor_xml_writer_start_element_common): Renamed from raptor_iostream_write_xml_element_start. Add indenting of xml namespace declaration attributes when auto indenting is on and there are more than 1. (raptor_xml_writer_end_element_common): Renamed from raptor_iostream_write_xml_element_end (raptor_xml_writer_empty_element, raptor_xml_writer_start_element, raptor_xml_writer_end_element): Update to use new names. * src/raptor_xml_writer.c: (raptor_iostream_write_xml_element_start): Remove all args that can be found in xml_writer. (raptor_xml_writer_empty_element, raptor_xml_writer_start_element): Update to use new raptor_iostream_write_xml_element_start * src/raptor_rss.h, src/raptor_rss_common.c: Added raptor_rss_format_iso_date and raptor_rss_set_date_field. (raptor_rss_date_uplift): Use above * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Generate bnode for author if not present. * librdfa/rdfa.c, librdfa/subject.c: Merge with GIT 8adf69fff952d069e4f6da472d9d8e0acf8fea28 that fixes test case #0058 * src/raptor_serialize_rss.c: Get atom author blank node ID from atom:author string value. 2008-05-28 Dave Beckett * src/raptor_rss.h: Re-order atom fields so that required ones are generated first when going in sequential field order. * src/raptor_rss_common.c, src/raptor_serialize_rss.c: Re-order atom fields so that required ones are generated first when going in sequential field order. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_terminate): Comment out raptor_free_namespace calls - crashes worse than leaks for now. * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Use atom_namespace not default for 'link'. * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): use at:md not atom:md * docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-xml.sgml: added raptor_xml_writer_flush raptor_xml_writer_newline to templates. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_init): Init namespaces with error reporting. * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): Fix root_qname double free * src/raptor_serialize_rss.c: (raptor_rss10_emit_rss_items): Set xml-writer (raptor_rss10_emit_rdfxml_item_triples): Added, pulled rdf/xml block writing out of raptor_rss10_emit_item. Validate you can only use rdf-xml with rss-1.0 serializer and atom-triples with atom serializer. (raptor_rss10_emit_item): Call raptor_rss10_emit_rdfxml_item_triples * src/raptor_rss_common.c: Turn dc:date into atom:updated * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Add * src/raptor_serialize_rss.c: (raptor_rss10_emit_rss_items): Added, pulled RSS 1.0-specific channel XML out of raptor_rss10_emit_item (raptor_rss10_emit_item): Call raptor_rss10_emit_rss_items for RSS 1.0 rdf:Seq and rss:items * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Added, pulled atom-specific entry fields out of raptor_rss10_emit_item (raptor_rss10_emit_item): Call raptor_rss10_emit_item for atom and channel: atom feed. * src/raptor_xml.c: (raptor_xml_element_set_attributes): note @attributes become owned * src/raptor_serialize_rss.c: RSS 1.0 / Atom serializers now support user namespace declarations raptor_rss10_serializer_context gains user_namespaces (raptor_rss10_serialize_init): Init user_namespaces (raptor_rss10_serialize_declare_namespace, raptor_rss10_serialize_declare_namespace_from_namespace): Added. * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Added at:entrymap and at:map in the atom fee when rssTriples=atom-triples. 2008-05-27 Dave Beckett * src/raptor_rss.h: Update ATOMTRIPLES_NAMESPACE_URI * librdfa/curie.c: (rdfa_resolve_curie): Protect strtok_r with NULL string from using a NULL wcptr. 2008-05-26 Dave Beckett * docs/raptor-sections.txt: Added raptor_qname_to_counted_name, raptor_xml_writer_flush and raptor_xml_writer_newline * tests/rdfa/Makefile.am: Update failures to remove those now passing: + 0092: expected XML result corrected + 0094: expected XML result corrected * tests/rdfa/0011.out, tests/rdfa/0092.out, tests/rdfa/0094.out, tests/rdfa/0100.out, tests/rdfa/0101.out, tests/rdfa/0102.out, tests/rdfa/0103.out, tests/rdfa/Makefile.am: update xml results * librdfa/rdfa.c: (start_element): Reverse raptor stack namespace order to match that which librdfa uses. GIT 46929dc0822aa55553d61df5127b2695b8c7acf8 * tests/rdfa/Makefile.am: Update failures to remove those now passing: + 0042: no triples is correct; expected result corrected + 0052: expected result corrected + 0053: expected result corrected + 0091: fixed 0058 still wrong; sparql test case is inadequate * src/raptor.h: Added prototype for raptor_qname_to_counted_name * src/raptor_qname.c: (raptor_qname_to_counted_name): Added. * librdfa/rdfa.c: (start_element): Walk raptor namespace stack to figure out xml literal ns declarations. (raptor_rdfa_start_element, raptor_rdfa_end_element): Pass in qname string. GIT c1313ac3de0dee9903e7b132cb4626708f3df257 * tests/rdfa/0053.out: Update test result for 0053 to correct subject for first triple * tests/rdfa/0083.xhtml, tests/rdfa/0102.xhtml: Update inputs for tests 0083 0102 * tests/rdfa/0052.out: Update test result for 0052 to correct subject * tests/rdfa/0042.out: Update test result for 0042 to expect no triples * tests/rdfa/0011.out, tests/rdfa/0092.out, tests/rdfa/0094.out: Update test results for 0011 0092 0094 to use xmlns with double quotes * librdfa/rdfa.c: (start_element): set xml_lang variable when inside raptor GIT aeac34493258ecf53374b6cbda5eec03f10b841e * librdfa/triple.c: (rdfa_free_triple): Free triple. GIT a64e1f00a53d6858a818156a9115d10b7ecec036 2008-05-25 Dave Beckett * librdfa/curie.c, librdfa/rdfa.c, librdfa/rdfa.h, librdfa/rdfa_utils.c, librdfa/rdfa_utils.h, librdfa/triple.c: Merge to GIT f82c0941956254847e8d51654759b2b45dc00088 * tests/rdfa/Makefile.am: Update expected test failures to add new approved & failing tests: 0042.xhtml 0088.xhtml 0091.xhtml 0092.xhtml 0093.xhtml 0094.xhtml 0100.xhtml 0101.xhtml 0102.xhtml 0103.xhtml Add triple counts to failure message * tests/rdfa/0017.out, tests/rdfa/0017.xhtml, tests/rdfa/0039.out, tests/rdfa/0039.xhtml, tests/rdfa/0040.out, tests/rdfa/0040.xhtml, tests/rdfa/0042.out, tests/rdfa/0042.xhtml, tests/rdfa/0085.out, tests/rdfa/0085.xhtml, tests/rdfa/0088.out, tests/rdfa/0088.xhtml, tests/rdfa/0091.out, tests/rdfa/0091.xhtml, tests/rdfa/0092.out, tests/rdfa/0092.xhtml, tests/rdfa/0093.out, tests/rdfa/0093.xhtml, tests/rdfa/0094.out, tests/rdfa/0094.xhtml, tests/rdfa/0099.out, tests/rdfa/0099.xhtml, tests/rdfa/0100.out, tests/rdfa/0100.xhtml, tests/rdfa/0101.out, tests/rdfa/0101.xhtml, tests/rdfa/0102.out, tests/rdfa/0102.xhtml, tests/rdfa/0103.out, tests/rdfa/0103.xhtml, tests/rdfa/0104.out, tests/rdfa/0104.xhtml, tests/rdfa/0107.out, tests/rdfa/0107.xhtml, tests/rdfa/0108.out, tests/rdfa/0108.xhtml, tests/rdfa/0109.out, tests/rdfa/0109.xhtml, tests/rdfa/Makefile.am: Added RDFa approved tests 0017 0039 0040 0042 0085 0088 0091 0092 0093 0094 0099 0100 0101 0102 0103 0104 0107 0108 0109 where approved tests are given by the SPARQL: BASE PREFIX : SELECT ?test FROM WHERE { ?test :reviewStatus :approved } and http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/rdfa-xhtml1-test-manifest.rdf Last-Modified: Mon, 19 May 2008 10:47:38 GMT 2008-05-24 Dave Beckett * docs/tmpl/section-feature.sgml, docs/tmpl/section-triples.sgml: update docs * librdfa/rdfa.c: (rdfa_free_context): Revert change in GIT d0f2401a9b914f70fff262be602fe92cf5a2e93e. Memory leak remains * src/raptor_librdfa.c: (raptor_librdfa_parse_start): Free any old context. (raptor_librdfa_parse_terminate): Free context. * librdfa/rdfa.c: Declare rdfa_init_context as static since it is only used in rdfa.c. GIT 71dd65d38f70120a205abf73e0cf8fd0bf6f0f27 * librdfa/rdfa.c: (rdfa_free_context): Free context_stack and remove TODO. GIT d0f2401a9b914f70fff262be602fe92cf5a2e93e * librdfa/triple.c: (rdfa_free_triple): free triple. GIT 402f883bfc2d7157eb6f13018ad141450ed47944 * src/raptor_librdfa.c: include rdfa_utils.h * src/raptor_librdfa.c: (raptor_librdfa_generate_statement): free incoming triple 2008-05-22 Lauri Aalto * src/n3_lexer.l, src/turtle_lexer.l: Fixed n3/turtle lexer error handling. Do not report OOM for failed function calls that can fail for other reasons besides OOM, e.g. qname expansion fails due to undeclared prefix. 2008-05-21 Dave Beckett * src/raptor_rdfxml.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c: Use raptor_xml_writer_flush for xml writer * src/raptor.h: Added prototypes for raptor_xml_writer_newline and raptor_xml_writer_flush * src/raptor_xml_writer.c: raptor_xml_writer gains pending_newline flag (raptor_xml_writer_indent): Handle pending_newline feature as well as indenting. (raptor_xml_writer_empty_element, raptor_xml_writer_start_element, raptor_xml_writer_end_element): Call indent if pending_newline. (raptor_xml_writer_newline): Added. (raptor_xml_writer_flush): Added to tidy up at the end of an XML writer. * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement, ): Set is_mapped when going from rss to atom fields. (raptor_rss10_remove_mapped_item_fields, raptor_rss10_remove_mapped_fields): Added to delete field values that were mapped when there is an non-mapped value. (raptor_rss10_serialize_end): Call raptor_rss10_remove_mapped_fields for atom. * src/raptor_rss.c: (raptor_rss_uplift_fields): Set is_mapped when uplifting * src/raptor_rss.h: raptor_rss_field gains is_mapped field 2008-05-19 Dave Beckett * src/raptor_internal.h, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c: Added grouping of triples by key (uri/fakeuri(bnode)) to item using an avltree of raptor_rss_group_map (raptor_free_group_map, raptor_rss_group_map_compare, raptor_rss10_get_group_item, raptor_rss10_set_item_group): Added. (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate): init / free group_map avl tree (raptor_rss10_move_statements): If a statement object is anonymous, move it to the item triples, do not search for a field. Do not move any other fields with anonymous objects. (raptor_rss10_move_anonymous_statements): Added to move blank node closure triples to their item. (raptor_rss10_store_statement): Use avl tree to find an item for a triple (raptor_rss10_serialize_statement): Do not discard blank nodes on input. Set blank node/URI to item mapping. (raptor_rss10_emit_item): Emit different triple block elements, attributes only for atom;content (raptor_rss10_serialize_end): Call raptor_rss10_move_anonymous_statements * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_turtle_writer.c: 2008 * src/raptor_feature.c: RAPTOR_FEATURE_RSS_TRIPLES label shorter * src/raptor_serialize_rss.c: raptor_rss10_serializer_context gains rss_triples_mode (raptor_rss10_serialize_start): Added to set rss_triples_mode from feature_rss_triples. 1 is "rdf-xml" value, 2 is "atom-triples" (raptor_rss10_emit_item): Emit triples when enabled by feature Remove node elements, typed nodes and emit a single node for rss triples mode 2 (raptor_rss10_serializer_register_factory): Init raptor_rss10_serialize_start * src/raptor_serialize_rdfxmla.c: raptor_rdfxmla_context gains fields single_node, write_node_elements, write_typed_nodes (raptor_rdfxmla_emit_resource_uri): Added. (raptor_rdfxmla_emit_resource): Use raptor_rdfxmla_emit_resource_uri (raptor_rdfxmla_emit_subject_properties): Use write_typed_nodes flag to write rdf:type property element. (raptor_rdfxmla_emit_subject): Handle write_typed_nodes to skip typed node element. Handle write_node_elements flag. (raptor_rdfxmla_emit): Do not emit any top-level blank nodes if single_node is set. (raptor_rdfxmla_serialize_init): Init defaults for write_node_elements and write_typed_nodes: true/1. (raptor_rdfxmla_serialize_set_write_rdf_RDF, raptor_rdfxmla_serialize_set_xml_writer): autodocs (raptor_rdfxmla_serialize_set_single_node, raptor_rdfxmla_serialize_set_write_node_elements, raptor_rdfxmla_serialize_set_write_typed_nodes): Added to set internal flags. (raptor_rdfxmla_serialize_end): Free single node URI if present. * src/raptor_internal.h: raptor_serializer_s gains feature_rss_triples Added prototypes for raptor_rdfxmla_serialize_set_single_node, raptor_rdfxmla_serialize_set_write_node_elements and raptor_rdfxmla_serialize_set_write_typed_nodes * src/raptor.h, src/raptor_feature.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added feature rss_triples (RAPTOR_FEATURE_RSS_TRIPLES) for rss-1.0/atom serializers 2008-05-18 Lauri Aalto * tests/rdfa: props 2008-05-17 Dave Beckett * librdfa/rdfa.c, librdfa/rdfa_utils.h, librdfa/subject.c: Update to GIT 402f883bfc2d7157eb6f13018ad141450ed47944 2008-05-15 Dave Beckett * librdfa/rdfa.h: Remove uri_mappings field if LIBRDFA_IN_RAPTOR is defined * docs/tmpl/section-sequence.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-xml.sgml: gtk docs * src/raptor_xml_writer.c: autodocs * src/raptor_avltree.c: de-autodoc internal functions * docs/raptor-sections.txt: Added raptor_sequence_delete_at and raptor_xml_writer_get_depth * librdfa/rdfa.c: Do not call rdfa_update_uri_mappings with LIBRDFA_IN_RAPTOR * tests/rdfa/0060.out, tests/rdfa/Makefile.am: Fix 0060.out to make 4 tests expected to fail * tests/rdfa/Makefile.am: annotate expected test failures * tests/rdfa/Makefile.am: Expect failures: 0011.xhtml 0052.xhtml 0053.xhtml 0058.xhtml 0060.xhtml * configure.ac, tests/Makefile.am, tests/rdfa, tests/rdfa/0001.out, tests/rdfa/0001.xhtml, tests/rdfa/0006.out, tests/rdfa/0006.xhtml, tests/rdfa/0007.out, tests/rdfa/0007.xhtml, tests/rdfa/0008.out, tests/rdfa/0008.xhtml, tests/rdfa/0009.out, tests/rdfa/0009.xhtml, tests/rdfa/0010.out, tests/rdfa/0010.xhtml, tests/rdfa/0011.out, tests/rdfa/0011.xhtml, tests/rdfa/0012.out, tests/rdfa/0012.xhtml, tests/rdfa/0013.out, tests/rdfa/0013.xhtml, tests/rdfa/0014.out, tests/rdfa/0014.xhtml, tests/rdfa/0015.out, tests/rdfa/0015.xhtml, tests/rdfa/0018.out, tests/rdfa/0018.xhtml, tests/rdfa/0019.out, tests/rdfa/0019.xhtml, tests/rdfa/0020.out, tests/rdfa/0020.xhtml, tests/rdfa/0021.out, tests/rdfa/0021.xhtml, tests/rdfa/0023.out, tests/rdfa/0023.xhtml, tests/rdfa/0025.out, tests/rdfa/0025.xhtml, tests/rdfa/0026.out, tests/rdfa/0026.xhtml, tests/rdfa/0027.out, tests/rdfa/0027.xhtml, tests/rdfa/0029.out, tests/rdfa/0029.xhtml, tests/rdfa/0030.out, tests/rdfa/0030.xhtml, tests/rdfa/0031.out, tests/rdfa/0031.xhtml, tests/rdfa/0032.out, tests/rdfa/0032.xhtml, tests/rdfa/0033.out, tests/rdfa/0033.xhtml, tests/rdfa/0034.out, tests/rdfa/0034.xhtml, tests/rdfa/0035.out, tests/rdfa/0035.xhtml, tests/rdfa/0036.out, tests/rdfa/0036.xhtml, tests/rdfa/0037.out, tests/rdfa/0037.xhtml, tests/rdfa/0038.out, tests/rdfa/0038.xhtml, tests/rdfa/0041.out, tests/rdfa/0041.xhtml, tests/rdfa/0046.out, tests/rdfa/0046.xhtml, tests/rdfa/0047.out, tests/rdfa/0047.xhtml, tests/rdfa/0048.out, tests/rdfa/0048.xhtml, tests/rdfa/0049.out, tests/rdfa/0049.xhtml, tests/rdfa/0050.out, tests/rdfa/0050.xhtml, tests/rdfa/0051.out, tests/rdfa/0051.xhtml, tests/rdfa/0052.out, tests/rdfa/0052.xhtml, tests/rdfa/0053.out, tests/rdfa/0053.xhtml, tests/rdfa/0054.out, tests/rdfa/0054.xhtml, tests/rdfa/0055.out, tests/rdfa/0055.xhtml, tests/rdfa/0056.out, tests/rdfa/0056.xhtml, tests/rdfa/0057.out, tests/rdfa/0057.xhtml, tests/rdfa/0058.out, tests/rdfa/0058.xhtml, tests/rdfa/0059.out, tests/rdfa/0059.xhtml, tests/rdfa/0060.out, tests/rdfa/0060.xhtml, tests/rdfa/0061.out, tests/rdfa/0061.xhtml, tests/rdfa/0062.out, tests/rdfa/0062.xhtml, tests/rdfa/0063.out, tests/rdfa/0063.xhtml, tests/rdfa/0064.out, tests/rdfa/0064.xhtml, tests/rdfa/0065.out, tests/rdfa/0065.xhtml, tests/rdfa/0066.out, tests/rdfa/0066.xhtml, tests/rdfa/0067.out, tests/rdfa/0067.xhtml, tests/rdfa/0068.out, tests/rdfa/0068.xhtml, tests/rdfa/0069.out, tests/rdfa/0069.xhtml, tests/rdfa/0070.out, tests/rdfa/0070.xhtml, tests/rdfa/0071.out, tests/rdfa/0071.xhtml, tests/rdfa/0072.out, tests/rdfa/0072.xhtml, tests/rdfa/0073.out, tests/rdfa/0073.xhtml, tests/rdfa/0074.out, tests/rdfa/0074.xhtml, tests/rdfa/0075.out, tests/rdfa/0075.xhtml, tests/rdfa/0076.out, tests/rdfa/0076.xhtml, tests/rdfa/0077.out, tests/rdfa/0077.xhtml, tests/rdfa/0078.out, tests/rdfa/0078.xhtml, tests/rdfa/0079.out, tests/rdfa/0079.xhtml, tests/rdfa/0080.out, tests/rdfa/0080.xhtml, tests/rdfa/0081.out, tests/rdfa/0081.xhtml, tests/rdfa/0082.out, tests/rdfa/0082.xhtml, tests/rdfa/0083.out, tests/rdfa/0083.xhtml, tests/rdfa/0084.out, tests/rdfa/0084.xhtml, tests/rdfa/0086.out, tests/rdfa/0086.xhtml, tests/rdfa/0087.out, tests/rdfa/0087.xhtml, tests/rdfa/0089.out, tests/rdfa/0089.xhtml, tests/rdfa/0090.out, tests/rdfa/0090.xhtml, tests/rdfa/1001.out, tests/rdfa/1001.xhtml, tests/rdfa/Makefile.am: Added RDFA test cases from http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/ * librdfa/curie.c: (rdfa_resolve_curie): Handle undefined namespaces prefix * src/raptor_librdfa.c: (raptor_librdfa_generate_statement): Generate correct bnodes * Makefile.am, configure.ac, librdfa, librdfa/Makefile.am, librdfa/curie.c, librdfa/language.c, librdfa/rdfa.c, librdfa/rdfa.h, librdfa/rdfa_utils.c, librdfa/rdfa_utils.h, librdfa/subject.c, librdfa/triple.c, src/Makefile.am, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c: Added RDFA support via a copy of librdfa linked inside Raptor librdfa/ directory contains a copy of (part of) librdfa http://rdfa.digitalbazaar.com/librdfa/ by Manu Sporny "librdfa is licensed under the GNU Lesser General Public License v2.1 (or newer), GNU General Public License v2.0 (or newer), or the Apache 2.0 License (or newer). Each license is an alternative, and if you select one license, that one alone applies." (same license as raptor) The sources were taken from GIT at http://rdfa.digitalbazaar.com/librdfa.git and patched to work inside raptor. src/raptor_librdfa.c: New raptor parser 'rdfa' * src/raptor_grddl.c: (raptor_grddl_parse_recognise_syntax): Lower scores for xhtml since the mime type gets added in too * src/raptor_grddl.c: (raptor_grddl_parse_recognise_syntax): Do not guess using "xhtml" suffix twice 2008-05-15 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject): Resiliency fix. Check raptor_new_avltree_iterator() return value. * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_properties): Free avltree iterator * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Resiliency fix: do not leak iterator on OOM. 2008-05-14 Dave Beckett * src/raptor_abbrev.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Switch raptor_avltree_cursor_* functions to use raptor_avltree_iterator * tests/Makefile.am: check-rdfxmla, check-turtle-serialize: check status from rapper & rdfdiff * src/raptor_avltree.c: (raptor_avltree_cursor_first, raptor_avltree_cursor_last): Return failure/finished if tree was empty. * src/raptor_avltree.c: (raptor_avltree_iterator_get): finished if no current node * tests/turtle/Makefile.am: check-turtle-serialize: check status from rapper & rdfdiff * src/raptor_avltree.c: (raptor_new_avltree): Zap cursor_iterator * src/raptor_internal.h: Added raptor_avltree_iterator typedef. Added RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES flag Added prototypes for raptor_new_avltree_iterator, raptor_free_avltree_iterator, raptor_avltree_iterator_end, raptor_avltree_iterator_next and raptor_avltree_iterator_get. * src/raptor_avltree.c: Autodocs for (still internal) AVL Tree functions Some whitespace/indenting fixes. (raptor_avltree_add, raptor_avltree_sprout): Will either replace or ignore updates to a duplicate - equivalent - item depending on the new raptor_new_avltree constructor flags arg value RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES. (raptor_avltree_node_leftmost, raptor_avltree_node_rightmost): Accept a range argument to use for searching in a range. (raptor_avltree_node_search_right, raptor_avltree_node_search_left): Added for searching for a node in a direction in a range. (raptor_avltree_node_prev, raptor_avltree_node_next): Handle moving with ranges. (raptor_new_avltree_iterator): Added iterator constructor with direction arg to indicate prev/next direction of iteration, optionally in a range. (raptor_free_avltree_iterator): Added iterator destructor. (raptor_avltree_iterator_end): Added iterator done check method. (raptor_avltree_iterator_next): Added iterator move method. (raptor_avltree_iterator_get): Added iterator get current method. (raptor_avltree_cursor_first, raptor_avltree_cursor_last, raptor_avltree_cursor_prev, raptor_avltree_cursor_next, raptor_avltree_cursor_get): Rewritten in terms of a tree->cursor_iterator iterator. (raptor_avltree_print): Rewritten using an iterator. (raptor_avltree_check_internal, raptor_avltree_check): Use an unsigned int count. (main): Use iterator for going forward check. 2008-05-10 Dave Beckett * src/raptor_abbrev.c: (raptor_abbrev_subject_add_property): Do not lose reference count for inner nodes. * src/raptor_serialize_turtle.c: (raptor_turtl_serialize_statement): use raptor_abbrev_subject_add_property to ignore duplicate triples * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): use raptor_abbrev_subject_add_property to ignore duplicate triples * src/raptor_abbrev.c: (raptor_abbrev_node_cmp): Fix comparison to properly return 0 when literals are truly equal (raptor_abbrev_subject_add_property): Catch duplicates and do not add them. * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_statement): Revert bogus dup triple test. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Revert bogus dup triple test. * tests/turtle/Makefile.am: check-turtle-serialize: do not break on first error; still return failure * src/raptor_turtle_writer.c: (raptor_new_turtle_writer): Make first @base be absolute since there is no base URI at that point. * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_statement): Check whether no new subject, predicate or object nodes were created, in which case this is a duplicate statement that can be ignored. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Check whether no new subject, predicate or object nodes were created, in which case this is a duplicate statement that can be ignored. * src/raptor_abbrev.c: (raptor_abbrev_node_lookup, raptor_abbrev_subject_lookup): Added a created_p output parameter which is set to non-0 if a node was created. * src/raptor_internal.h: raptor_abbrev_node_lookup and raptor_abbrev_subject_lookup gain a created_p output parameter. 2008-05-01 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Fix attrs re-declared warning * src/raptor_serialize_rss.c: Removed indent arg from raptor_rss10_emit_item and comment out indent lines (raptor_rss10_emit_item): Loose indent * src/raptor_serialize_rss.c: With the atom serializer, write any remaining triples for an item as an ... block using the rdf/xml-abbrev serializer. Use auto-indenting XML writer, do not manage indent here anymore. (raptor_rss10_emit_item): Write atom:content block for atom serializer and when triples present. (raptor_rss10_serialize_end) Init auto indent and auto empty xml elements. * src/raptor_serialize_rdfxmla.c: Added new flags to allow an external xml_writer to be given, not write rdf:RDF, initialise the starting xml writer depth and allow an external namespace stack. (raptor_rdfxmla_emit, raptor_rdfxmla_serialize_declare_namespace_from_namespace): Set starting xml writer depth. (raptor_rdfxmla_serialize_init_nstack): Added to separate out stack initialising from raptor_rdfxmla_serialize_init. (raptor_rdfxmla_serialize_init): Call raptor_rdfxmla_serialize_init_nstack() and set rdf:RDF writing to true by default. (raptor_rdfxmla_serialize_terminate): Conditionalise freeing the xml writer and namespaces stack. (raptor_rdfxmla_serialize_set_write_rdf_RDF): Added (raptor_rdfxmla_serialize_set_xml_writer): Added (raptor_rdfxmla_serialize_start): Do not init local xml_writer if one was passed in. (raptor_rdfxmla_ensure_writen_header): Do not write rdf:RDF if not wanted. * src/raptor_rss_common.c: (raptor_new_rss_item): Added, refactoring raptor_rss_model_add_item and raptor_rss_model_add_common content and ensuring triples field is always initialised. * src/raptor_rss.h: Added raptor_new_rss_item prototype. * src/raptor_qname.c: (raptor_new_qname_from_namespace_local_name): Accept NULL namespace to make a namespace-less qname. * src/raptor_xml_writer.c: (raptor_xml_writer_get_depth): Added. * src/raptor_sequence.c: (raptor_sequence_delete_at): Added * src/raptor.h: Added raptor_sequence_delete_at and raptor_xml_writer_get_depth * src/raptor_serialize.c: (raptor_serialize_end): use free_iostream_on_end field to free iostream only if it was internal, not passed in * src/raptor_internal.h: iostream gets free_iostream_on_end field Added raptor_rdfxmla_serialize_set_write_rdf_RDF and raptor_rdfxmla_serialize_set_xml_writer prototypes 2008-04-30 Dave Robillard * src/raptor_turtle_writer.c: (raptor_new_turtle_writer, raptor_turtle_writer_base): Set base URI even if not writing @base directive, so relative URI writing works correctly when @base is disabled. 2008-04-26 Dave Beckett * src/raptor_uri.c: (assert_uri_to_relative): Free base_uri if not NULL 2008-04-25 Dave Beckett * src/raptor_avltree.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_json_writer.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_statement.c, src/raptor_stringbuffer.c, src/raptor_uri.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/raptor_abbrev.c: Use RAPTOR_ASSERT_OBJECT_POINTER_RETURN on destructor object arg. Code comments 2008 2008-04-16 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_end): Reset context->written_header flag to enable serializer object reuse. 2008-04-14 Dave Beckett * src/turtle_lexer.l: Rename fatal_error_longjmp_env to turtle_lexer_fatal_error_longjmp_env * src/n3_lexer.l: Use setjmp/longjmp to return fatal error messages to caller without abort() (n3_lexer_fatal_error): Remove abort() call. main code: setjmp before starting parse. Move code to inside %{ %} block. * src/n3_common.h, src/n3_parser.y, src/turtle_common.h, src/turtle_parser.y: Count errors in syntax parsing and do not report errors after the first one. A workaround instead of adding full bison error parser recovery. * configure.ac, src/turtle_lexer.l: Use setjmp/longjmp to return fatal error messages to caller without abort() (turtle_lexer_fatal_error): Remove abort() call. main code: setjmp before starting parse. Move code to inside %{ %} block. 2008-04-14 Lauri Aalto * src/raptor_rdfxml.c: (raptor_rdfxml_end_element_grammar): Resiliency fixes: check raptor_parser_internal_generate_id() return value * src/raptor_libxml.c: (raptor_libxml_free): Resiliency fix: make sure myDoc is always freed. * src/n3_lexer.l, src/turtle_lexer.l: Reverted from r13787 abort() calls back to *_lexer_fatal_error() - it is assumed that these functions never return. * src/ntriples_parse.c: (raptor_ntriples_generate_statement, raptor_ntriples_string_as_utf8_string): Resiliency fixes: check for alloc failures. 2008-04-13 Dave Beckett * src/raptor_rss_common.c: 2008 * src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rss_model_add_item, raptor_free_rss_item): Add triples, free it. (raptor_clear_rss_item): Deleted, not used. * src/raptor_serialize_rss.c: comments (raptor_rss10_serialize_statement): pass on handled flag from raptor_rss10_store_statement() * src/raptor_guess.c: (raptor_guess_parse_chunk):: Check for raptor_parser_copy_user_state failure and pass on. * src/raptor_grddl.c: (raptor_grddl_ensure_internal_parser): Check for raptor_parser_copy_user_state failure and pass on. Slightly adjust nearby code to remove else. * src/raptor_internal.h, src/raptor_parse.c: (raptor_parser_copy_user_state): Add a return value on failure of allocs. * src/raptor_parse.c: (raptor_parser_copy_user_state): Copy Cache-Control: header and User-Agent: header values to destination parser * src/raptor_internal.h: Note about code changes needed when adding user data to raptor_parser * src/raptor_internal.h: Removed prototypes for removed functions: raptor_parser_error_message_handler, raptor_parser_fatal_error_message_handler, raptor_parser_warning_message_handler, raptor_parser_fatal_error_varargs, raptor_parser_warning_varargs * src/n3_lexer.l, src/parsedate.y, src/raptor_parse.c, src/raptor_rdfxml.c, src/turtle_lexer.l: Remove calls to abort() in mainline code (some aborts still exist in test code for consistency failures in avltree but they are only compiled in with RAPTOR_DEBUG) (raptor_parser_fatal_error): Set parsing failed flag on fatal error. (raptor_parser_fatal_error_message_handler, raptor_parser_error_message_handler, raptor_parser_warning_message_handler): Removed, no longer used. (raptor_rdfxml_start_element_grammar): case RAPTOR_STATE_PARSETYPE_DESCRIPTION... RAPTOR_STATE_PARSETYPE_COLLECTION Remove use of abort() for an ancient check for an object URI that can be worked around. case RAPTOR_STATE_MEMBER_PROPERTYELT: With content type RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL, remove use of abort() for unknown content types related to daml/collections - it will fall through to a fatal error anyway. With default content type, remove abort() and tidy the error message. Parsing will still fail in this case. (n3_lexer_fatal_error, turtle_lexer_fatal_error): Do not call abort. (ToHour): Do not call abort, print message when debugging and return invalid value. 2008-04-12 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_namespaces): Added, pulling namespace scanning out of raptor_rss_parse_chunk. (raptor_rss_parse_chunk): Call above. * src/raptor_rss.c: Add a nspaces_seen[] array in raptor_rss and track namespaces declared either in input (xmlns seen via SAX) or output, when writing a field in RSS1.0 schema. Save them all up and generate before emitting. (raptor_rss_parse_start): Reset nspaces_seen array to none seen. (raptor_rss_sax2_new_namespace_handler): Mark namespace seen, do not pass on to rdf namespace handler just yet. (raptor_rss_parse_chunk): On finish, scan all fields of all items for namespaces and mark those that need declaring. Then call raptor_parser_start_namespace() to start them for the client. 2008-04-11 Dave Beckett * src/raptor_rss.c: (raptor_rss_sax2_new_namespace_handler): Added. (raptor_rss_parse_init): Register raptor_rss_sax2_new_namespace_handler to pass on SAX2 namespace events to the rdf parser. Fixes Issue #0000255 http://bugs.librdf.org/mantis/view.php?id=255 * docs/tmpl/section-triples.sgml: sgml docs * src/raptor_serialize_rss.c: 2008 2008-04-11 Lauri Aalto * src/raptor_general.c: (raptor_init, raptor_finish): Changed raptor_initialised flag to a reference count. 2008-04-05 Dave Beckett * docs/raptor-serializers.xml: Add JSON serializers section 2008-04-03 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_end): Fixed crash when reusing serializer objects. Reset context->written_header flag so that when raptor_rdfxmla_ensure_writen_header() returns success, context->rdf_RDF_element is always non-null. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Fixed rdfxml-xmp segfault. Make sure avltree cursor points to something before trying to indirect it. 2008-04-01 Dave Beckett * src/raptor-config.1: remove undefined macro .l other fixes * NEWS.html, RELEASE.html configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.18 2008-03-29 Dave Beckett * Snapshotted raptor_1_4_17 for 1.4.17 release (SVN 13771) * utils/rapper.c: adjust feature pops * utils/rapper.c: free features * utils/rapper.c: Allow multiple features to be set with -f/--feature by storing them away in two raptor_sequence* lists, one for parser and one for serializer. Then such things like rapper -q -o json -f jsonCallback=foo -f 'jsonExtraData="foo":"bar"' -f relativeURIs ... can be called. * src/raptor_serialize_json.c: (raptor_json_serialize_init): Alter default to serialize with absolute URIs for JSON. (raptor_json_serialize_start): Use feature_relative_uris to decide what base uri to send to JSON writer. 2008-03-27 Dave Beckett * src/raptor_serialize_json.c: (raptor_json_serialize_start): Make callback start with '(' again. 2008-03-26 Dave Beckett * src/raptor_sax2.c: (raptor_sax2_unparsed_entity_decl): Do not return error when there is no handler. (raptor_sax2_external_entity_ref): Error out when there is no handler as the XML cannot be parsed with unknown external entity references. * src/raptor_rdfxml.c, src/raptor_sax2.c: (raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): Moved unparsed entity and external entity reference error messages to sax2 class. (raptor_rdfxml_unparsed_entity_decl_handler, raptor_rdfxml_external_entity_ref_handler): Deleted. (raptor_rdfxml_parse_init): Remove setting handlers * src/raptor_rdfxml.c: (raptor_rdfxml_unparsed_entity_decl_handler, raptor_rdfxml_external_entity_ref_handler): Turn fprintf(stderr...) calls into real raptor_parser_error calls * src/raptor_sax2.c: (raptor_sax2_external_entity_ref): Note failure is happening with 'return 0' * src/raptor.h: raptor_sax2_external_entity_ref_handler autodocs 2008-03-25 Dave Beckett * src/raptor.h, src/raptor_sax2.c, src/raptor_iostream.c: autodocs * docs/libraptor.3: 1.4.17 and lots of formatting tidying * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_json.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_JSON_EXTRA_DATA name jsonExtraData that allows adding data to the end of the top level JSON object on output 2008-03-23 Dave Beckett * docs/tmpl/section-feature.sgml: add json callback feature 2008-03-16 Dave Beckett * configure.ac: fix check for needing to link with -lm * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Fixes to calling raptor_log_error_to_handlers when built with expat. * src/raptor_parse.c: (main): Only define program if RAPTOR_DEBUG * src/raptor_avltree.c: (check_string, main): Casts for C++ * src/raptor_turtle_writer.c: (main): Cast for C++ * src/raptor_uri.c: (main): Remove C99 initializer for C++ * src/raptor_abbrev.c: (raptor_abbrev_node_lookup): Cast for C++ * src/raptor_set.c: (raptor_id_set_add): Casts for C++ * src/raptor_turtle_writer.c: (main): use raptor_iostream_tell instead of deprecated raptor_iostream_get_bytes_written_count * tests/turtle/test-28-out.ttl: Update expected exact turtle serializer result due to AVLTree change in re-ordering the triples * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_json.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_JSON_CALLBACK serializer feature for the JSON serializer to emit a callback block like callback(...); struct raptor_serializer_s gains feature_json_callback. (raptor_free_serializer): Free all string features. (raptor_serializer_set_feature_string, raptor_serializer_get_feature_string): Store/return JSON callback in feature_json_callback. raptor_features_list array gains new entry for RAPTOR_FEATURE_JSON_CALLBACK with name "jsonCallback". (raptor_json_serialize_start): Write callback before serialize start. (raptor_json_serialize_end): Terminate callback after serialize end. * src/raptor.h: Removed raptor_sax2_parse_handle_errors prototype - no such function. 2008-02-25 Lauri Aalto * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_grammar, raptor_rdfxml_end_element_grammar): Check for alloc failures. * src/raptor_xml.c: (raptor_new_xml_element): Check for cdata stringbuffer alloc failure. * src/raptor_sax2.c: (raptor_sax2_start_element): Low-memory cleanup fixes. * src/raptor.h: (raptor_error_handlers): Quick segfault fix: statically allocate RAPTOR_LOG_LEVEL_LAST+1 error handler slots * src/raptor.h: (raptor_error_handlers): Portability fix: avoid "type containing an unknown-size array is not allowed" errors on some compilers. 2008-02-24 Lauri Aalto * src/raptor_www.c: (raptor_www_set_http_cache_control): +1 for zero termination 2008-02-24 Dave Beckett * src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_www.c, src/raptor_www_libxml.c: Added struct raptor_message_handler_closure for user data plus an error handler. (raptor_log_error_simple): Removed, only used in raptor_sax2.c (raptor_log_error_to_handlers): Added to log to an raptor_error_handlers object. (raptor_sax2_simple_error): Tidy error calling to use closure pointer. (raptor_sax2_parse_chunk, raptor_log_error_to_handlers): Use raptor_log_error_to_handlers (raptor_www_set_error_handler, raptor_www_error): Update for closure struct. (raptor_grddl_fetch_uri, raptor_grddl_parse_chunk): Update for closure struct. Tidy saving and restoring error handlers (raptor_new_parser): Init last_log_level for error handlers. (raptor_parse_uri_with_connection, raptor_parser_simple_error, raptor_parser_error_varargs, raptor_parser_error_message_handler, raptor_parser_warning, raptor_parser_warning_message_handler, raptor_set_fatal_error_handler, raptor_set_error_handler, raptor_set_warning_handler): Update for closure struct. (raptor_libxml_warning, raptor_libxml_error_common, raptor_libxml_generic_error, raptor_libxml_xmlStructuredErrorFunc): Update for closure struct. (raptor_www_libxml_init): Update for closure struct. 2008-02-24 Lauri Aalto * src/Makefile.am: flex-generated header file does not need fixing with fix-flex. It already has YY_NO_UNISTD_H guard and all other fix-flex issues are for .c files only. Fixes warnings due to multiple inclusion of raptor_config.h. 2008-02-23 Dave Beckett * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_feature.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libxml.c, src/raptor_xml_writer.c: Add RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL and RAPTOR_FEATURE_WWW_HTTP_USER_AGENT to control WWW. Pass that on in parsers to internal www. raptor_www struct gains cache_control and user_agent fields. (raptor_www_curl_fetch): Disable curl www Pragma: header always. (raptor_www_set_http_cache_control): Added. (raptor_www_set_user_agent, raptor_www_set_proxy): Error checking on malloc failure. Fixes Issue #0000252 http://bugs.librdf.org/mantis/view.php?id=252 2008-02-22 Lauri Aalto * src/raptor_rdfxml.c: (raptor_rdfxml_cdata_grammar): Check for null pointer before indirecting it. * src/raptor_libxml.c: Removed writable static data from raptor_libxml.c 2008-02-16 Dave Beckett * autogen.sh: autogen checks when env prog version is empty. Update all packages to latest autogen.sh 2008-02-09 Dave Beckett * src/raptor_avltree.c, src/raptor_internal.h: (raptor_avltree_remove): Added. (raptor_avltree_delete): Rewritten in terms of raptor_avltree_remove. (main): Add test with raptor_avltree_remove 2008-02-07 Dave Beckett * src/raptor_avltree.c: (raptor_avltree_search_internal): Alter to return the node. (raptor_avltree_search): Use raptor_avltree_search_internal changed 2008-02-07 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Do not throw away return value from raptor_rdfxmla_emit_subject_list_items(). * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Check raptor_avltree_cursor_first() return value. Fixes a NULL indirection crash later on. * src/raptor_avltree.c: (raptor_new_avltree): Initialize print_fn field to NULL. 2008-02-06 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Ensure variable rv is initialized before use. 2008-02-02 Dave Beckett * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Switch raptor_avltree subject->properties from raptor_sequence to raptor_avltree and use an AVL Tree cursor to iterate it. This changes the exact ordering of the output from original order, to sorted by raptor_abbrev_node comparison order. * src/raptor_avltree.c: Export avltree cursor prototypes. Added raptor_data_print_function field. (raptor_avltree_set_print_handler, raptor_avltree_print): Added to print an AVL Tree. (raptor_avltree_sprout_right): Fix failure to set parent correctly in RR rebalancing. (raptor_avltree_dump_internal): Print node value if print_fn is defined. * src/raptor_internal.h: Added raptor_data_print_function typedef. Added raptor_avltree_set_print_handler and raptor_avltree_print prototypes. Added avltree cursor prototypes: raptor_avltree_cursor_first, raptor_avltree_cursor_last, raptor_avltree_cursor_prev, raptor_avltree_cursor_next and raptor_avltree_cursor_get * src/raptor_avltree.c: (compare_strings): update sig * src/raptor_avltree.c, src/raptor_internal.h, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c, src/raptor_set.c: Change raptor_avltree data from raptor_avltree_t typedef to void*. excessive typedefs. Rename raptor_avltree_compare_function to raptor_data_compare_function. Rename raptor_avltree_delete_function to raptor_data_free_function * src/raptor.h, src/raptor_general.c, src/raptor_parse.c, src/raptor_www.c: (raptor_error_handlers_init): Remove all args except object pointer. Add docs. This is currently not called internally so no need for extra arg soup. Use to init error_handlers everywhere. (raptor_new_parser, raptor_www_new_with_connection): Use raptor_error_handlers_init rather than set magic directly. * src/raptor_statement.c: (raptor_statement_compare): Allow subject, predicate or object to have NULL pointers which always sort earlier than pointers with values. 2008-01-29 Lauri Aalto * tests/grddl/Makefile.am: Run GRDDL tests only if GRDDL parser is enabled in configuration. 2008-01-27 Dave Beckett * src/raptor_avltree.c: (raptor_new_avltree): Init size and cursor * src/raptor_avltree.c: struct raptor_avltree gains a cursor field. (raptor_avltree_node_leftmost, raptor_avltree_node_rightmost): Added for code clarity. Really this could be inlined or a macro. (raptor_avltree_node_prev, raptor_avltree_node_next): Added for moving around tree in order. (raptor_avltree_cursor_first, raptor_avltree_cursor_last, raptor_avltree_cursor_prev, raptor_avltree_cursor_next, raptor_avltree_cursor_get): Added avltree cursor with new methods. (main): Added tests for forwards and backwards cursoring. * src/raptor_statement.c: code style * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_start): Indenting * src/raptor_serialize_json.c: (raptor_statement_avltree_compare): Use raptor_statement_compare. * src/Makefile.am, src/raptor.h, src/raptor_general.c, src/raptor_statement.c: Added raptor_statement.c for statement functions. (raptor_statement_compare): Added, based on raptor_json_statement_compare. * src/raptor_turtle_writer.c: (main): Use write_base_uri in test. 2008-01-23 Dave Robillard * src/raptor_serialize_turtle.c: (raptor_turtle_context): Fix comment on written_header for Turtle (not XML). Add feature to control writing @base directive to Turtle files. (RAPTOR_FEATURE_WRITE_BASE_URI): Added. (raptor_new_turtle_writer): Added write_base_uri parameter. 2008-01-22 Dave Beckett * src/raptor_avltree.c: Remove most internal checks as they do not hold while sprouting and rebalancing (raptor_avltree_add, raptor_avltree_delete): Check here afterwards. 2008-01-21 Dave Beckett * src/raptor_avltree.c: Run raptor_avltree_check_node after only if not rebalancing - node is still being moved. * src/raptor_avltree.c: remove QUOTE_FN and flush stderr * src/raptor_avltree.c: Remove other raptor_avltree_check_node before * src/raptor_avltree.c: (raptor_avltree_sprout): Do not run before check, the node is not consistent while it is moving to the right place. * src/raptor_turtle_writer.c: (main) cast for strlen * src/raptor_internal.h: Added prototypes for raptor_avltree_size, raptor_avltree_dump and raptor_avltree_check * src/raptor_avltree.c: raptor_avltree_node gains a parent field raptor_avltree gains a size field (raptor_avltree_sprout): Add a parent node arg for updating parent field on sprouts. (raptor_avltree_add): Call raptor_avltree_sprout with NULL parent. (raptor_avltree_print_node): Added for debugging (raptor_avltree_check_node): Added to check a node for validity of pointers (raptor_avltree_sprout_left, raptor_avltree_sprout_right, raptor_avltree_sprout, raptor_avltree_balance_left, raptor_avltree_balance_right): Update parent pointers and run check functions afterwards. (raptor_avltree_delete_internal): Run check functions (raptor_avltree_size): Added to get tree size. (raptor_avltree_dump_internal, raptor_avltree_dump, raptor_avltree_check_internal, raptor_avltree_check): Added for debugging tree and checking consistency. (main): Added one more test item so tree is not balanced. Run checks during adds and delete. 2008-01-21 Lauri Aalto * src/raptor_rdfxml.c: (raptor_rdfxml_parse_init): Check for allocation failures and return error code if necessary. (raptor_rdfxml_parse_terminate): Do not assume sax2, id_set are initialized. 2008-01-21 Dave Beckett * utils/rdfdiff.c: Changed algorithm - read both files into rdfdiff_file* structures with rdfdiff_collect_statements, removing duplicates for each file then compare afterwards. (rdfdiff_statement_equals): Edited to have one return. (rdfdiff_statement_find): Added (rdfdiff_statement_exists): Uses rdfdiff_statement_find. (rdfdiff_compare_statements): Removed. (main): Use rdfdiff_collect_statements and after both files are read in, walk through and remove common statements from the from_file list. * tests/Makefile.am: show results from check-rdfdiff failing * utils/rdfdiff.c: (rdfdiff_statement_exists): Added. (rdfdiff_collect_statements): Use rdfdiff_statement_exists to not add duplicate statements. * tests/Makefile.am: Set result=1 on errors 2008-01-20 Dave Beckett * tests/turtle/rdf-schema.out, tests/turtle/rdf-schema.ttl: Remove duplicate statements from rdf-schema* now that serializer discards them * src/raptor_abbrev.c: (raptor_abbrev_subject_add_property): Do not save duplicate statements. Fixes Issue #0000245 http://bugs.librdf.org/mantis/view.php?id=245 * src/raptor_avltree.c: (main): Add test for raptor_avltree_search * src/raptor.h, src/raptor_xml.c: autodocs 2008-01-17 Dave Beckett * src/raptor_serialize_json.c: (raptor_json_serialize_init): Change the test for name "json". * src/raptor_serialize_json.c: (raptor_init_serializer_json): Change serializer name 'json-t' to 'json-triples' * src/raptor_serialize_json.c: (raptor_init_serializer_json): Set JSON mime type to application/json. Change serializer name 'json' to resource-centric one and add alias 'json-r'. * src/raptor_xml_writer.c: (main): Use raptor_iostream_tell rather than deprecated raptor_iostream_get_bytes_written_count * src/raptor_serialize_json.c: (raptor_init_serializer_json): Cast * src/raptor_json_writer.c: Added define RAPTOR_JSON_WRITER_DATATYPES to remove unused fields and initialising/freeing supporting commented-out function raptor_json_writer_literal_datatype * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize.c, src/raptor_serialize_json.c: Added JSON serializing support. raptor_json_writer class for formatting JSON. json-r and json-t serializations based on http://n2.talis.com/wiki/RDF_JSON_Specification 2008-01-16 Dave Beckett * src/raptor_turtle_writer.c: (raptor_iostream_write_string_python): Do not write too much raw UTF-8 * src/raptor_turtle_writer.c: (raptor_iostream_write_string_python): Add Long Turtle mode 2, shift JSON to 3. (raptor_turtle_writer_quoted_counted_string): Use mode 2 for triple-quoted long strings * src/raptor_internal.h: Add raptor_turtle_writer_quoted_counted_string replacing raptor_turtle_writer_quoted * src/raptor.h, src/raptor_serialize_ntriples.c, src/raptor_turtle_writer.c: (raptor_iostream_write_string_python): Added renamed from raptor_iostream_write_string_turtle and replacing raptor_iostream_write_string_ntriples. Handles writing to an iostream with escapes in N-Triples, Turtle and JSON with appropriate escapes which are all python like. (raptor_iostream_write_string_turtle): Changed to use raptor_iostream_write_string_python. (raptor_turtle_writer_quoted_counted_string): Renamed from raptor_turtle_writer_quoted and taking a length 2008-01-14 Lauri Aalto * autogen.sh: Do not branch autogen.sh scripts but keep them identical 2008-01-12 Dave Beckett * autogen.sh: automake 1.10 research 2008-01-11 Lauri Aalto * src/n3_parser.y, src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/turtle_parser.y: (raptor_*_serializer_register_factory, raptor_*_parser_register_factory) Return error codes from parser and serializer factory registration functions. (raptor_serializer_register_factory, raptor_parser_register_factory) Check factory function return code. (raptor_parser_factory_add_alias, raptor_parser_factory_add_mime_type, raptor_parser_factory_add_uri) Added error code returns. Bubble up OOM errors to caller. * src/raptor_parse.c, src/raptor_serialize.c: (raptor_parsers_init, raptor_parser_register_factory, raptor_serializer_register_factory): Let raptor_init() handle dying on OOM. * src/n3_parser.y, src/ntriples_parse.c, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/raptor_uri.c, src/turtle_parser.y: Changed raptor internal init functions to return error codes. 2008-01-07 Lauri Aalto * src/raptor.h: Add raptor_error_handlers_init and raptor_sax2 RAPTOR_API exports. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Cast unsigned char -> char. Fixes compilation problems on non-gcc compilers. 2008-01-05 Dave Beckett * src/raptor_rfc2396.c: Update URI resolving for RFC3986 - some abnormal examples have different results or have defined possible results. (raptor_uri_resolve_uri_reference): Remove leading /../ and /./ (main): Update tests for RFC3986 changes * src/raptor_general.c: 2008 2008-01-04 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_ensure_writen_header): Do not assume context->turtle_writer is initialized. * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_init): Require non-NULL rdf:type abbrev node. * src/raptor_abbrev.c: (raptor_abbrev_subject_add_property): Prevent low-memory double deletes - increment object reference counts earlier. * src/raptor_turtle_writer.c: (raptor_turtle_writer_quoted): Check for stringbuffer alloc failures. 2008-01-03 Dave Beckett * src/raptor.h, src/raptor_qname.c: Added raptor_qname_get_counted_value 2008-01-03 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_statement): Return error if raptor_abbrev_node_lookup() or raptor_abbrev_subject_add_property() calls fail. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Removed redundant conditional. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): Check for qname alloc failure, do not pass NULL attributes to XML element. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Lowmem fixes. Return raptor_abbrev_subject_add_property() errors to caller. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): Added int return code. (raptor_rdfxmla_serialize_end) Fixed low-memory crash: make sure context->rdf_RDF_element is not used if NULL. * src/raptor_abbrev.c: (raptor_new_qname_from_resource): Fixed low-memory leaks. * src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: rdfxml-abbrev & turtle serializer error messages: Removed double 0x prefixes - %p already gives one. * src/raptor_iostream.c: Changed raptor_iostream_handler2 initializers from gcc/c99 style to traditional C. 2008-01-02 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_end): Do not assume xml_writer or rdf_RDF_element are initialized. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Check for raptor_abbrev_node_lookup() errors. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): Check for alloc failures. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject): Check for alloc failures. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Check for alloc failures. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_literal): Check for qname attribute alloc failures. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_resource): Check for qname attribute alloc failure. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_list_items): Check for xml element alloc failure. * src/raptor_abbrev.c: (raptor_new_qname_from_resource): Check for alloc failure. * src/raptor_abbrev.c: (raptor_abbrev_node_lookup): Check for lookup node allocation failures. * src/raptor_abbrev.c: (raptor_new_abbrev_node): Check for alloc failures. * src/turtle_parser.y: (raptor_turtle_parse_chunk): Do not leave turtle_parser->buffer a dangling pointer if realloc fails. (raptor_turtle_parse_terminate) When freeing turtle_parser->buffer, do not trust turtle_parser->buffer_length to be in sync. * src/raptor_iostream.c: (raptor_new_iostream_to_filename): Close file on alloc failure. * src/raptor_iostream.c: (raptor_new_iostream_from_filename): Close file on alloc failure. * src/raptor_iostream.c: (raptor_iostream_calculate_modes, raptor_iostream_check_handler, raptor_new_iostream_from_handler2): Fix compiler error on some non-gcc compilers - illegal use of const. 2008-01-01 Dave Beckett * src/raptor_iostream.c: code style * src/raptor_iostream.c: docs * src/raptor_iostream.c: (raptor_iostream_calculate_modes): Use handler2 version for calculations. (raptor_iostream_check_handler): Check handler API versions. (raptor_new_iostream_from_handler2, raptor_new_iostream_to_filename, raptor_new_iostream_to_file_handle, raptor_new_iostream_to_string, raptor_new_iostream_from_filename, raptor_new_iostream_from_file_handle): Set mode once. * src/raptor_iostream.c: Check handler matches requested mode (raptor_iostream_calculate_modes): Added. (raptor_iostream_check_handler): Renamed from raptor_iostream_init_common. (raptor_new_iostream_from_handler2, raptor_new_iostream_to_filename, raptor_new_iostream_to_file_handle, raptor_new_iostream_to_string, raptor_new_iostream_from_filename, raptor_new_iostream_from_file_handle): Use raptor_iostream_check_handler to check things and raptor_iostream_calculate_modes to set mode. * src/raptor_iostream.c: Merge read/write filename code Ensure finish is called to fclose(handle) * src/raptor_iostream.c: (test_*): Replace uses of raptor_iostream_get_bytes_written_count with raptor_iostream_tell * src/raptor_iostream.c: Use unsigned long offset not bytes. (raptor_iostream_get_bytes_written_count): Deprecated for raptor_iostream_tell (raptor_iostream_tell): Added * src/raptor.h: Deprecate raptor_iostream_get_bytes_written_count for raptor_iostream_tell * src/raptor_iostream.c: (raptor_filename_iostream_finish): Added to close filename file handle. raptor_iostream_read_file_handle_handler struct added (raptor_new_iostream_from_file_handle): Added. (test_read_from_file_handle): Enabled. * src/raptor_iostream.c: Put ended EOF into flags * src/raptor_iostream.c: Merge read/write sinks * src/raptor_iostream.c: Add private field to raptor_iostream_s for handling freeing handler2 (raptor_new_iostream_from_handler2): Add const to hamdler2 arg. * src/raptor.h: raptor_iostream_handler2 loses private field - it can be part of internals of raptor_iostream Updated raptor_new_iostream_from_handler2 to make handler2 arg constant pointer to constant data. * src/raptor.h: Added raptor_iostream_read_eof and typedef raptor_iostream_read_eof_func to raptor_iostream_handler2 structure. * src/raptor_iostream.c: (raptor_iostream_read_eof): Added. (main) More unit test refactoring and checking. * src/raptor_iostream.c: Resource cleanup on test failures * src/raptor_iostream.c: Refactor read tests to be units - one function per test. * src/raptor_iostream.c: Refactor write tests to be units - one function per test. * src/raptor_iostream.c: (main): Tests for iostream reading raptor-1.4.21/COPYING0000644000175000017500000004310310444336174011071 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. raptor-1.4.21/RELEASE.html0000644000175000017500000031553711330744113012010 00000000000000 Raptor RDF Parser Library - Release Notes

Raptor RDF Parser Library - Release Notes

Raptor 1.4.21 Changes

This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break is underway.

Fixed Issues:

  • 0000318: Cannot end a Turtle literal with \\ inside triple-quotes
  • 0000319: ntriples parser does not register that it accepts ntriples mime type - text/plain
  • 0000326: Turtle parser allows '.' in qnames which is not-to-spec
  • 0000331: Turtle long literals with raw newlines do not count line numbers correctly
  • 0000332: RDFXML parser finds duplicates and misbehaves (when it shouldn't)
  • 0000337: raptor/turtle outputs invalid qnames which cause syntax errors on parsing

Parser changes

N-Triples parser: Declare acceptance of text/plain mime type with q=0.1

RDFA parser (via librdfa): Updated to fix some buffer management problems when it was passed large blocks (4096 bytes or more), a few memory leaks and some other minor bugs.

RDF/XML parser: Properly reset the ID-checking set at the start of each parse.

Turtle parser: Allow \\ at the end of triple-quoted literals. Forbid '.'s in prefixes and qnames (follow specification). Properly count newlines inside the literals for error reporting.

Serializer changes

Turtle serializer: Forbid '.'s in prefixes and qnames (follow specification).

Other Changes

Updated configure and the build system to use silent rules for the maintainer (by default), or when --enable-silent-rules is passed to configure. This feature requires building with automake 1.11 which requires autoconf 2.62 or newer when building from GIT.

autogen.sh script was updated to enforce the autotools versions above.

Raptor 1.4.20 Changes

This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering.

Fixed Issues:

  • 0000306: rapper doesn't handle datatype=""and xml:lang="" properly with RDFa
  • 0000307: configure fails at vnsprintf test when cross compiling
  • 0000310: Raptor does not like single character namespaces with RDFa
  • 0000312: Ununitialized pointer in example rdfserialize.c causes crash

Parser Changes

GRDDL parser: Fix XML parser context resource leak if raptor_grddl_fetch_uri() fails. Save and restore error handlers properly to prevent crashes when an error is reported during parsing.

RDFA parser (via librdfa): Update to latest librdfa GIT sources with head a438ce68a40e04b399ec2b2c613d0c867d9315c7
now moved to http://github.com/msporny/librdfa to fix handling single character namespaces (Issue#0000310), empty datatype attribute and empty xml:lang attributes (Issue#0000306)

Added three unapproved RDFa tests 0172, 0173 and 0174 to cover the fixes above.

Serializer Changes

Turtle serializer: Applied scalability patch from Chris Cannam. This switches the serializer to use a raptor_avltree instead of a raptor_sequence for the subject and blanks used with raptor_abbrev_node_lookup(). This fixes a performance problem in the serializing and moves lookups from O(N) to O(log N) - from list to balanced tree.

Other Changes

If cross compiling, check for vsnprintf() C99 compatible at runtime by setting define CHECK_VSNPRINTF_RUNTIME during configuration. Fixes Issue#0000307

Use calloc() for allocating a raptor_statement in rdfserializer.c example code to properly initialise state. Fixes Issue#0000312

Use AC_SYS_LARGEFILE to get large file IO checks which allows 32-bit systems to read multi-gigabyte files.

autogen.sh script fix for if test when uname is not in standard OSX dir.

Raptor 1.4.19 Changes

WARNING: FUTURE ABI and API CHANGES. The next release of raptor 1.4.x will include bug fixes only and no new features. New development will move to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering.

Fixed Issues:

  • 0000259: Fix NFC check for legal combiner sequence
  • 0000262: Error when raptor_new_uri() fails in Turtle parser
  • 0000263: Invalid turtle output syntax on empty integer/double/decimal literals
  • 0000266: Default/atom namespace in atom serializer output
  • 0000269: strstr is called in raptor_parse_chunk() on a buffer string, where it should be called on a null-terminating string.
  • 0000270: RSS serializer fixes for g++
  • 0000276: Fix raptor_sequence_set_at() when setting beyond end
  • 0000277: broken collection abbreviation in turtle serialization
  • 0000287: Fix raptor_sax2_parse_chunk() calling raptor_log_error_to_handlers() with expat
  • 0000288: raptor_get_feature function does not return feature value
  • 0000289: Fix RDFa parser problem when there is a subject and predicate specified on an element, but no child nodes for the object literal
  • 0000290: Fix performance problems when turtle parsing with lots of namespaces
  • 0000293: Fix RDF/XML Parser problem with legacy ordinal predicates
  • 0000296: Avoid calling xsltSetDefaultSecurityPrefs()
  • 0000299: Avoid calling xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc()
  • 0000303: rdfa parser does not parse content as RDFa which librdfa+expat alone handles

Parser Changes

raptor_get_feature() now returns the integer value rather than just 1 or 0.
Issue #0000288

Guess parser: return name of guessed parser not 'guess'.

N-Triples parser: Produce error messages when raptor_new_uri() fails.
Issue #0000262

RDFa parser: Fix problem when there is a subject and predicate specified on an element, but no child nodes for the object literal using latest librdfa GIT source with head 2ddcb3f9e010d0b3d9ee546e807539be5da1b14a
Issue #0000289

RSS tag soup parser: Huge internal changes:
Recording more atom core structures in triples (such as author, contributor - person) rather than only channels and items
Introduced a new 'blocks' concept to record single element structured items such as atom category, link and rss enclosure
Added itunes namespace and container.

RDF/XML Parser: Adjust predicate_type when removing ordinal identifier type from predicate.
Issue #0000293

Serializer Changes

Atom 1.0 serializer: Now tested and takes more care to try to generate valid Atom 1.0

Turtle serializer: Validate XSD integer, decimal and double literal output. Emit special short forms only if the whole literal value is consumed by strtol() (for integers) or strtod() (for decimals and doubles). Otherwise produce a warning and emit literal in the normal "value"^^<datatype_uri> format.
Issue #0000263
Fix broken collection abbreviation
Issue #0000277

RSS serializer: Fixes for g++
Issue #0000270
Added a new serializer feature RAPTOR_FEATURE_PREFIX_ELEMENTS (short name prefixElements) for atom and rss 1.0 serializers to decide whether core elements in the default namespace are declared with the prefix or without a prefix.
Removed generation of deprecated predicate ordinals of type RAPTOR_IDENTIFIER_TYPE_ORDINAL and replace with resource type URIs

XML Support Changes

Removed generic calls to xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc() which can be a problem when libxml is shared with other code in memory. They may be called optionally but will do a save/restore of the existing functions. This protection is enabled by the new API call raptor_set_libxml_flags() to set the flags from values in enum raptor_libxml_flags.
Issue #0000299

Use context-specific libslt security configuration to avoid calling generic call xsltSetDefaultSecurityPrefs() which can be a problem when libxslt is shared with other code in memory. Allow the user to set the policy for raptor globally with new API function raptor_set_libxslt_security_preferences().
Issue #0000296

Make libxml SAX2 structured errors register parser-specific handler function raptor_libxml_xmlStructuredErrorFunc() instead of libxml global structured error handler. The libxml flag method above can still enable registerding the global error handlers.

In raptor_sax2_parse_chunk() fixed calls to raptor_log_error_to_handlers() when built with expat.
Issue #0000287

Other Changes

Win32 portability fixes from Lou Sakey:

  • Handle absence of gettimeofday()
  • Call xmlCleanupParser() libxml call last to avoid an access violation on windows.
  • Windows vsnprintf() portability patch
  • raptor_sequence_set_at() fixed to maintain the design contract: provide "size" consecutive items in "sequence" starting from "start" even when setting items more than +1 offset beyond the end of sequence.
    Issue #0000276

rapper(1) utility changes: if counting, do not use a serializer at all.

Internal Changes

More internal changes to be more resiliant after allocation failure (Lauri Aalto)

Reorganised tests in source tree to pull out specific directories for RDF/XML, Turtle, etc.

Use a DJ Bernstein hash to replace a linked list for storing a stack of namespaces. This makes turtle parsing with lots of namespaces (100s) much faster. Based on the initial patch in the bug.
Issue #0000290

Use new internal raptor_memstr() function to compare a string against a buffer that may not be NUL terminated.
Issue #0000269

raptor_error_handlers: API structure gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_error_handlers) changed. Source compatibility not broken.

raptor_identifier: API structure gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_identifier) changed. Source compatibility not broken.

More fixes for compiling with C++

Move some more static data as constant to enable more efficient compilation - moves to data segment of object binary.

Use memmove for overlapping copy, not memcpy when doing relative URI resolving.

Raptor V2 Preparation Changes

Lots of internal changes were made by Lauri Aalto preparing for Raptor V2 to fully attach all static data and config to a new raptor_world object. A new static instance of this class is now used internally behind the existing V1 API and will be required to be constructed by the library user for the V2 API with a new constructor/destructor.

NOTE: The method names here are illustrative of the final V2 names but are not confirmed - These functions are not supported in the 1.4.x series. Some methods will still be altered for fields and (raptor_world) parameters. All constructors should have it as a parameter. All methods will not have them (so for example, all the URI methods named _v2 will lose the world parameter and just have the URI parameter - but that is also because the URI handler/context part will go into raptor_world in V2)

To use the unsupported and experimental V2 functions, define -DRAPTOR_V2_EXPERIMENTAL=1 when building with raptor.

Added raptor_world typedef.

Added raptor world class constructor raptor_world* raptor_new_world(void) and initializer: int raptor_world_open(raptor_world* world)

Added world class destructor: void raptor_free_world(raptor_world* world)

Added new V2 methods:

  void raptor_world_set_libxslt_security_preferences(raptor_world *world,
    void *security_preferences)

  void raptor_world_set_libxml_flags(raptor_world *world,  int flags)

  void raptor_error_handlers_init_v2(raptor_world* world,
    raptor_error_handlers* error_handlers);

Added V2 methods that are versions of existing methods, named with _v2 suffix:

  int raptor_parsers_enumerate_v2(raptor_world* world,
    const unsigned int counter, const char **name, const char **label)

  int raptor_syntax_name_check_v2(raptor_world* world, const char *name);

  void raptor_print_locator_v2(raptor_world* world, FILE *stream,
    raptor_locator* locator);

  const char *raptor_locator_uri_v2(raptor_world* world,
    raptor_locator *locator);

  int raptor_features_enumerate_v2(raptor_world* world,
    const raptor_feature feature, const char **name,
    raptor_uri **uri, const char **label);

  int raptor_serializers_enumerate_v2(raptor_world* world,
    const unsigned int counter, const char **name, const char **label,
    const char **mime_type, const unsigned char **uri_string);

  int raptor_serializer_syntax_name_check_v2(raptor_world* world,
    const char *name);

  int raptor_serializer_features_enumerate_v2(raptor_world* world,
    const raptor_feature feature, const char **name,  raptor_uri **uri,
    const char **label);

Added world pointer to raptor_identifier object

Added V2 identifier class constructor:

  raptor_identifier* raptor_new_identifier_v2(raptor_world* world,
    raptor_identifier_type type, raptor_uri *uri,
    raptor_uri_source uri_source, const unsigned char *id,
    const unsigned char *literal, raptor_uri *literal_datatype,
    const unsigned char *literal_language);

Added V2 parser class method:

  raptor_parser* raptor_new_parser_for_content_v2(raptor_world* world,
    raptor_uri *uri, const char *mime_type, const unsigned char *buffer,
    size_t len, const unsigned char *identifier)
  raptor_world* raptor_parser_get_world(raptor_parser* rdf_parser);

Added V2 serializer class constructor and method:

  raptor_serializer* raptor_new_serializer_v2(raptor_world* world,
    const char *name)
  raptor_world* raptor_serializer_get_world(raptor_serializer* rdf_serializer)

Added V2 statement class raptor_statement_v2 typdef for future replacing of raptor_statement

Added V2 statement class methods:

  void raptor_print_statement_v2(const raptor_statement_v2 * statement,
    FILE *stream);

  unsigned char* raptor_statement_part_as_counted_string_v2(raptor_world* world,
    const void *term, raptor_identifier_type type,
    raptor_uri* literal_datatype, const unsigned char *literal_language,
    size_t* len_p);

  unsigned char* raptor_statement_part_as_string_v2(raptor_world* world,
    const void *term, raptor_identifier_type type,
    raptor_uri* literal_datatype, const unsigned char *literal_language);  

  int raptor_statement_compare_v2(const raptor_statement_v2 *s1,
    const raptor_statement_v2 *s2);

Added V2 uri class methods:

  unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p);

  raptor_uri* raptor_new_uri_v2(raptor_world* world,
    const unsigned char *uri_string);

  raptor_uri* raptor_new_uri_from_uri_local_name_v2(raptor_world* world,
    raptor_uri *uri, const unsigned char *local_name);

  raptor_uri* raptor_new_uri_relative_to_base_v2(raptor_world* world,
    raptor_uri *base_uri, const unsigned char *uri_string);

  raptor_uri* raptor_new_uri_from_id_v2(raptor_world* world,
    raptor_uri *base_uri, const unsigned char *id);

  raptor_uri* raptor_new_uri_for_rdf_concept_v2(raptor_world* world,
    const char *name);

  void raptor_free_uri_v2(raptor_world* world, raptor_uri *uri);

  int raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1,
    raptor_uri* uri2);

  int raptor_uri_compare_v2(raptor_world* world, raptor_uri* uri1,
    raptor_uri* uri2);

  raptor_uri* raptor_uri_copy_v2(raptor_world* world, raptor_uri *uri);

  unsigned char* raptor_uri_as_string_v2(raptor_world* world, raptor_uri *uri);

  unsigned char* raptor_uri_as_counted_string_v2(raptor_world* world,
    raptor_uri *uri, size_t* len_p);

  raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world,
    raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world,
    raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world,
    raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world,
    raptor_uri* old_uri);

  unsigned char* raptor_uri_to_relative_counted_uri_string_v2(raptor_world* world,
    raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p);

  unsigned char* raptor_uri_to_relative_uri_string_v2(raptor_world* world,
    raptor_uri *base_uri,  raptor_uri *reference_uri);

  void raptor_uri_print_v2(raptor_world* world,
    const raptor_uri* uri, FILE *stream);

  unsigned char* raptor_uri_to_counted_string_v2(raptor_world* world,
    raptor_uri *uri, size_t *len_p);

  void raptor_uri_set_handler_v2(raptor_world* world,
    const raptor_uri_handler *handler, void *context);

  void raptor_uri_get_handler_v2(raptor_world* world,
    const raptor_uri_handler **handler, void **context);

Added V2 www class methods:

  raptor_www *raptor_www_new_with_connection_v2(raptor_world* world,
    void* connection);

Added V2 qname class methods:

  raptor_qname* raptor_new_qname_from_namespace_local_name_v2(raptor_world* world,
    raptor_namespace *ns, const unsigned char *local_name,
    const unsigned char *value);

Added V2 namespace class methods:

  raptor_namespace_stack* raptor_new_namespaces_v2(raptor_world* world,
    raptor_simple_message_handler error_handler, void *error_data, int defaults);

  int raptor_namespaces_init_v2(raptor_world* world,
    raptor_namespace_stack *nstack,
    raptor_simple_message_handler error_handler, void *error_data,
    int defaults);

Added V2 sequence class typedefs and methods:

  typedef void (raptor_sequence_free_handler_v2(void* context, void* object));

  typedef void (raptor_sequence_print_handler_v2(void *context, void *object,
    FILE *fh));

  raptor_sequence* raptor_new_sequence_v2(raptor_sequence_free_handler_v2* free_handler,
    raptor_sequence_print_handler_v2* print_handler, void* handler_context);

  void raptor_sequence_set_print_handler_v2(raptor_sequence *seq,
    raptor_sequence_print_handler_v2 *print_handler);

Added V2 iostream class methods:

  int raptor_iostream_write_uri_v2(raptor_world* world,
    raptor_iostream *iostr,  raptor_uri *uri);

  void raptor_iostream_write_statement_ntriples_v2(raptor_world* world,
    raptor_iostream* iostr, const raptor_statement *statement);

Added V2 xml writer class methods:

  raptor_xml_writer* raptor_new_xml_writer_v2(raptor_world* world,
    raptor_namespace_stack *nstack, raptor_iostream* iostr,
    raptor_simple_message_handler error_handler, void *error_data,
    int canonicalize);

  int raptor_xml_writer_features_enumerate_v2(raptor_world* world,
    const raptor_feature feature, const char **name, raptor_uri **uri,
    const char **label);

Raptor 1.4.18 Changes

Fixed Issues:

  • 0000186: Add RDFa support to Raptor
  • 0000255: rss-tag-soup serializer does not generate namespaces so re-serializing in rdf/xml looks wierd for atom

Parser Changes

A new RDFa parser was added (name rdfa) using librdfa to implement it. librdfa is linked as part of Raptor and written by Manu Sporny of Digital Bazaar, licensed with the same license as Raptor.

The RDFa test suite was added to the test and (via librdfa) Raptor passes all but 4 tests which fail due to different output xmlns attribute ordering (which does not matter to XML parsers).

Serializer Changes

Added new function raptor_serialize_start_to_iostream() to have the new semantics of not owning and destroying the passed-in iostream. This allows the caller to serialize to an existing iostream and then to continue to write to it. raptor_serialize_start() owns and then closes the iostream that is passed in.

A new Atom Syndication Format 1.0 (RFC 4287) serializer was added (name atom) using the RSS 1.0 RDF triple model with mapping to atom terms and consideration of atom output format conditions.

RSS 1.0 serializer

  • Allow setting output namespaces for the serializer
  • Allow writing extra RDF triples as RDF/XML attached to RSS items.
  • Recognize predicates with XML Literal and emit as parseType="Literal" or when content:encoded, as a CDATA block, by RSS 1.0 convention.
  • Removed code assumptions about triples appearing in a certain order.
  • Free namespaces and stack in correct order

Turtle serializer now respects the writeBaseURI feature to control generating the @base directive.

Abbreviated serializers (RDF/XML Abbrev and Turtle) now remove duplicate triples.

Added feature RAPTOR_FEATURE_RSS_TRIPLES to add RDF triples to RSS 1.0 or Atom serializer output with values 'rdfxml' or 'atom-triples'. Atom triples writes at:map sections for the atom:entry elements and at:feedmap and at:entrymap sections to the atom:feed elements. at:contentType is used to provide a type attribute value for an atom:content that has a URI value.

Added RAPTOR_FEATURE_ATOM_ENTRY_URI for the Atom serializer to set the URI of an atom entry. If the URI matches the URI of an entry item in the RDF mode of the channel, then an Atom Entry document is generated rather than an Atom Feed document.

QName Class Changes

Added raptor_qname_to_counted_name() to get a formatted qname for a name.

raptor_new_qname_from_namespace_local_name() will accept a NULL namespace to construct a namespace-less qname.

Sequence Class Changes

raptor_sequence_set_at() now handles setting an item at an index in the sequence beyond capacity+1 to automatically extend.

Added raptor_sequence_delete_at() to delete an item at a position in a sequence and return it.

URI Class Changes

raptor_uri_to_relative_counted_uri_string() now has support for a base URI with scheme and authority but no path, so the result can be a relative URI starting with '/'.

XML Writer Class Changes

XML Writer allows adding newlines via raptor_xml_writer_newline() which requires use of raptor_xml_writer_flush() to indicate when XML writer output is finished.

Added raptor_xml_writer_get_depth() to get the current XML writer element stack depth.

Other Changes

Many more resiliance checks were added.

Removed all calls to abort() in code on fatal errors. This requires using setjmp and longjmp inside parsers built with flex and bison.

The Turtle writer may optionally generate @base depending on flags. (This is used by Turtle serializer to handle the writeBaseURI feature)

Tidied error messages for rapper(1) when parsing stdin.

raptor_init() and raptor_finish() use a reference count to ensure initialising and terminating happen at most once each.

Raptor 1.4.17 Changes

The main changes to this release are:

Added two new JSON serializers: resource-centric 'json' (Talis RDF/JSON) and triple-centric 'json-triples'.

Made I/O Stream class raptor_iostream support reading as well as writing with new constructors and new methods.

Added a new public SAX2 API class raptor_sax2 exposing the existing internal API which has been around since the first release of Raptor 8 years ago and runs on top of either expat or libxml2.

Added new public error handlers structure raptor_error_handlers containing a set of (function, data pointers) pairs called raptor_handler_closure for each error log level. Added raptor_log_level enum for the error log level. Added an initialization function for the structure, raptor_error_handlers_init().

Several other API changes, fixes and improvements were made.

Fixed Issues:

  • 0000252: Allow controlling of cache headers in Raptor
  • 0000245: Extra classes added to an OWL object

I/O Stream class changes

Made I/O Stream class raptor_iostream support reading data in addition to writing. (Dave B):

  • Deprecated raptor_iostream_handler structure for new raptor_iostream_handler2 structure which contains the new factory functions for reading.
  • Added new read I/O stream factory handler typedefs raptor_iostream_read_bytes_func and raptor_iostream_read_eof_func.
  • Added new raptor_new_iostream_from_handler2() I/O stream constructor to allow building of read and write iostreams deprecating raptor_new_iostream_from_handler().
  • Added new raptor_iostream_tell() deprecating raptor_iostream_get_bytes_written_count.
  • Added new read I/O Stream constructors: raptor_new_iostream_from_sink(), raptor_new_iostream_from_filename() raptor_new_iostream_from_file_handle() and raptor_new_iostream_from_string()
  • Added new read I/O Stream methods raptor_iostream_read_bytes() and and raptor_iostream_read_eof().

Added new write I/O Stream method raptor_iostream_write_string_python() to write an encoded string to an I/O stream using python / JSON / Turtle / N-Triples / SPARQL escaping rules. (Dave B)

Serializer Class Changes

Added two new JSON serializers (Dave B):

  1. Resource-centric serializer named json based on Talis RDF/JSON Specification
  2. Triple-centric serializer named json-triples based on the SPARQL results in JSON format.

Added new serializer features for the JSON serializers (DaveB):

  • RAPTOR_FEATURE_JSON_CALLBACK (name 'jsonCallback') to set the top-level callback function name wrapper above the outer object.
  • RAPTOR_FEATURE_JSON_EXTRA_DATA (name 'jsonExtraData') to add extra top-level JSON object data.

Example of using the resource-centric serializer while defining a callback:

$ rapper -q -o json -f jsonCallback=foo http://librdf.org/raptor/raptor.rdf
foo(
{
  "http://librdf.org/raptor/#raptor" : {
    "http://usefulinc.com/ns/doap#description" : [ {
...

Statement Class Changes

Added raptor_statement_compare() to provide an ordering between raptor_statement objects. (Dave B)

Parser Class Changes

Added new parser features to control HTTP headers in web requests (Dave B, based on a patch in the bug):
Also never Pragma: header with libcurl ever.
Fixes Issue#0000252

  • RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL to control sending Cache-Control (default: none)
  • RAPTOR_FEATURE_WWW_HTTP_USER_AGENT to control sending User-Agent (default: none)

Turtle parser:

  • Added tests to forbid ' and '''-quoted strings and to forbid () in triple predicate position following the updated Turtle spec. (Dave B)
  • Write ';' statement terminators with a leading space for consistency with '.' terminator. (Dave R)
  • Remove canonicalisation of integer and double to match Turtle latest spec. (Dave B)

QName Class Changes

Added new methods raptor_qname_get_local_name(), raptor_qname_get_value() and raptor_qname_get_counted_value(). (Dave B)

SAX2 Class Changes

Added new public SAX2 API class raptor_sax2 exposind th existing internal one which has been around since the first release of Raptor 8 years ago and runs on top of either expat or libxml2. (Dave B)

  • Constructor: raptor_new_sax2()
  • Destructor: raptor_free_sax2()
  • XML handler methods: raptor_sax2_set_start_element_handler(), raptor_sax2_set_end_element_handler(), raptor_sax2_set_characters_handler(), raptor_sax2_set_cdata_handler(), raptor_sax2_set_comment_handler(), raptor_sax2_set_unparsed_entity_decl_handler() and raptor_sax2_set_external_entity_ref_handler().
  • XML handler factory typedefs: raptor_sax2_start_element_handler, raptor_sax2_end_element_handler, raptor_sax2_characters_handler, raptor_sax2_cdata_handler, raptor_sax2_comment_handler, raptor_sax2_unparsed_entity_decl_handler and raptor_sax2_external_entity_ref_handler.
  • Set XML Namespace handler method: raptor_sax2_set_namespace_handler()
  • Parsing methods: raptor_sax2_parse_start() and raptor_sax2_parse_chunk()
  • Other methods: raptor_sax2_inscope_xml_language() and raptor_sax2_inscope_base_uri()

Serializer Class Changes

Abbreviated serializers (RDF/XML-Abbrev and Turtle):

  • Switched from using a sequence to using an AVL Tree with a cursor to more efficiently (faster) group/sort triples by subject. This changes the previous syntax output order but has no semantic difference. (Dave B)
  • Use the AVL Tree to remove duplicate triples. (Dave B)
    Fixes Issue#0000245

Turtle serializer:

  • Feature RAPTOR_FEATURE_WRITE_BASE_URI added to control writing @base directive to Turtle. (Dave R)
  • Remove canonicalisation of integer and double to match Turtle latest spec. (Dave B)

URI Class Changes

Update URI resolving for RFC3986 changes (Dave B)

WWW Class Changes

Added new method raptor_www_set_http_cache_control() to set the HTTP Cache-Control: header in requests. (Dave B, based on a patch in the bug)
Fixes Issue#0000252

XML Class Changes

Added new method raptor_xml_element_get_language() to get the language associated with an element. (Dave B)

Portability and Resilience Changes

Pass on error failures in parser and serializer factory construction. (Lauri)

Abbreviated serializers (RDF/XML-abbrev and Turtle): low memory and allocation failure fixes. (Lauri)

Altered API function signatures of raptor_uri_set_handler(), raptor_uri_get_handler(), raptor_new_namespaces(), raptor_namespaces_init() and raptor_new_xml_writer() to add appropriate consts. (Lauri)

Portability fixes for RAPTOR_API and other macros. (Lauri)

Removal of many sets of writable static data in N-Triples parser, URI class, Unicode NFC code, libxml support, Turtle writer and XML writer. (Lauri)

Portability fixes for round() and trunc() that are not always available in libc but might be in libm. (Dave B)

Turtle/N3 parsers and serializers, RDF/XML_Abbrev serializer: many low memory fixes and better out of memory errors. (Lauri)

Other Changes

Rewrote internal error log functions to use new error handlers structures and simplify the calls. (Dave B)

Expanded internal raptor_avltree datatype support to add a cursor, allowing it to be used for creating large ordered sequences that need to be walked. (Dave B)

Updated rdfdiff utility to handle duplicate triples in inputs. (Dave B)

raptor_sequence_shift() and raptor_sequence_unshift() are now as efficient as the sequence push and pop operations: O(1). (Lauri)

autogen.sh was updated.

rapper utility can now accept multiple -f / --feature options; previously only one parser and one serializer feature was possible.

Raptor 1.4.16 Changes

The main changes to this release are:

Provide 100% support for the GRDDL W3C Recommendation of 2007-09-11.

The Turtle parser and serializer were updated to support @base for specifying a base URI, following Turtle of 2007-09-11.

The Turtle and RDF/XML serializers had performance improvements for large graphs.

Added a TRiG Parser based on Turtle with named graph support.

Several other API changes, fixes and improvements were made.

Fixed Issues:

  • 0000188: Wrong RAPTOR_API definition for mingw
  • 0000192: raptor_uri_filename_to_uri_string() - getcwd() loop error
  • 0000194: parser and serializer don't recognize the same mime types
  • 0000195: Compile error in raptor_serialize.c debug code
  • 0000207: RDF file can be parsed, but not then serialised.
  • 0000210: RAPTOR_FEATURE_WRITER_XML_DECLARATION broken in Ruby
  • 0000214: Empty rdf:about, plus base-uri, produces incorrect turtle output
  • 0000216: flickrdf segfaults at raptor_serialize_end!
  • 0000217: flickrdf segfaults at raptor_serialize_end!
  • 0000232: libraptor does not correctly free up libxml error handler, causing crashes in subsequent calls to libxml error handlers
  • 0000237: raptor_sequence robustness: item ownership on insert error
  • 0000238: GRDDL parser in SVN overwrites blank nodes when merging graphs
  • 0000239: GRDDL parser in SVN returns 60 less triples with http://www.w3.org/

Namespaces Class Changes

raptor_namespaces_init() now returns an integer status.

Parser Class Changes

Added raptor_graph_handler typedef and raptor_set_graph_handler() to return named graph identifiers during parsing, initially for the TRiG parser.

These were added the GRDDL parser:

  • RAPTOR_FEATURE_MICROFORMATS (microformats) to enable hCard and hCal microformats
  • RAPTOR_FEATURE_HTML_TAG_SOUP (htmlTagSoup) to use the HTML tag soup parser if the XML parsing fails
  • RAPTOR_FEATURE_HTML_LINK (htmlLink) to enable html <link>
  • RAPTOR_FEATURE_WWW_TIMEOUT (wwwTimeout) for setting URI retrieval timeouts during processing

XML Element Class Changes

Added raptor_new_xml_element_from_namespace_local_name() constructor to make an XML element from a local name relative to a raptor_namespace.

Unicode Class Changes

Defined a new raptor_unichar typedef for a Unicode codepoint defined as unsigned long which was the previous type used. Altered the Unicode function to take it as a parameter. raptor_unicode_char_to_utf8(), raptor_utf8_to_unicode_char(), raptor_unicode_is_xml11_namestartchar(), raptor_unicode_is_xml10_namestartchar(), raptor_unicode_is_xml11_namechar() and raptor_unicode_is_xml10_namechar().

URI Class Changes

Added raptor_uri_compare() and raptor_uri_compare_func function pointer for implementing it in the raptor_uri_handler. The handler now has a version field initialised to trigger the new factory method for uri compare when the version is 2 or more.

WWW Class Changes

Added raptor_www_set_connection_timeout() to set the WWW retrieval connection timeout in seconds.

Added raptor_www_final_uri_handler typedef and raptor_www_set_final_uri_handler() to return the final URI seen during WWW retrieval such as after redirects.

Added raptor_www_get_final_uri() to return the final URI after a WWW retrieval which might include redirects.

Parser Changes

The GRDDL parser/processor was substantially updated and now supports 100% of the Gleaning Resource Descriptions from Dialects of Languages (GRDDL) syntax, W3C Recommendation of 2007-09-11:

  • Transforming XML with XSLT 1.0
  • Processing XML namespaces.
  • Transforming XHTML with XSLT 1.0
  • Processing HTML profiles.
  • Handling of base URIs and URI redirects.
  • XInclude processing.
  • Parsing as RDF/XML when it is recognised after a transform.

it also:

  • Handles hCard and hCal microformats when feature RAPTOR_FEATURE_MICROFORMATS is enabled (default enabled).
  • Handles <link type="application/rdf+xml" href="URI" /> to RDF/XML content when feature RAPTOR_FEATURE_HTML_LINK is enabled (default enabled).
  • Attempts parsing with libxml's HTML parser if XML parsing fails, when feature RAPTOR_FEATURE_HTML_TAG_SOUP is enabled (default enabled).
  • Discards errors during recursive processing such as 404s, failure to parse, failure of XSLT processing.
  • Uses XSLT security - denies reading, writing to files, directories or writing to network.
  • Accepts the RAPTOR_FEATURE_NO_NET feature to prevent all networking.
  • Allows fine-grained URI filtering with raptor_parser_set_uri_filter().

RDF/XML parser recognising was updated to just the start of the document for guessing if it should handle content and to try to avoid html URLs.

RSS Tag soup parser recognising was updated to accept with the string 'feed' in the identifier.

TRiG Parser was added based on the Turtle parser, adding named graphs. It returns name graph URis via a callback set with new API call raptor_set_graph_handler()

Turtle parser added @base support, fixed turtle escapes to URIs. Recognising was updated to look for @prefix early in the document.

Serializer Changes

Turtle serialiser changes:

  • Generate @base when an output base URI is given.
  • Properly format Turtle XSD doubles using new snprintf code.
  • Fix unwanted blank line at end of Turtle list abbreviation.
  • Use AVL Tree rather than sequence for significant performance improvement for large serialisations.

RDF/XML serialiser was changed to emit a legal empty RDF/XML document when no triples are serialised and to skip emitting statements with bad predicate uris rather than returning an error.

RDF/XML Abbrev serialiser was changed to use an AVL tree rather than sequence for significant performance improvement for large serialisations.

rapper Utility Changes

Added an --show-graphs option to print named graph URIs as seen (such as with TRiG).

Added -I / --input-uri and -O / --output-uri options to set the input / parsing and output / serializing base URIs separately. Defaults remain the same - the serializer base URI defaults to the input base URI, however it was set.

Portability Changes

Fixes for when building from Subversion on cygwin (EOL issues, Makefiles).

Remove unused semicolons for prevention of compiler warnings.

Fix some uninitialized variables that some compilers complain about.

Allow RAPTOR_ASSERT_DIE to be externally defined.

Allow RAPTOR_WWW_BUFFER_SIZE to be externally defined.

Other Changes

autogen.sh was updated to handle program versions better using an inline perl helper.

Start to add resiliance to memory allocation failures and errors inside the library.

Added AVL Tree code to make much faster key:value lookups. This is used for RDF/XML parser XML ID checks and in the 'abbrev' serializers - Turtle and RDF/XML-Abbrev for looking up nodes.

Better libxml error messages are now returned, mentioning some of the names and values that caused the error.

Raptor 1.4.15 Changes

General Changes

GRDDL parser now passes the (unapproved) test suite for the GRDDL W3C Working Draft 2 March 2007 except for two tests that have been reported as having errors.

When using libcurl as the WWW retrieval library, errors in resolving a URI such as not found (404) are now reported as proper errors and cause parsing to fail rather than just return no triples.

Some improvments where made to guessing for a parser to match some content. Firstly, any mime type with Q <10 is added to the score, don't lose the influence of the mime type entirely. The consequence of this is that Turtle can pretend to be a partial N3 parser. Secondly, the XHTML mime type is now correctly recognised by the GRDDL parser rather than the RSS Tag Soup parser.

Fixed Issues:

  • #0000174: Serializing to rdfxml* with a base_uri doesn't set the xml:base attribute, but does truncate rdf:about and rdf:resource values
  • #0000177: Some URI references mis-resolved
  • #0000178: No errors from accessing 404 URIs
  • #0000180: messages garble output to stdout

Parser and Serializer Changes

Added better error reporting for XML errors using the libxml structured error reporing api. From

$ rapper -i grddl http://librdf.org/LICENSE.txt
rapper: Parsing URI http://librdf.org/LICENSE.txt
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - http://librdf.org/LICENSE.txt:2: 
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - parser 
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - error : 
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - Document is empty
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error -                   Redland RDF Application Framework - License
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error -                   ^
rapper: Failed to parse URI http://librdf.org/LICENSE.txt grddl content
rapper: Parsing returned 0 triples

To this:

$ rapper -i grddl http://librdf.org/LICENSE.txt
rapper: Parsing URI http://librdf.org/LICENSE.txt
rapper: Error - URI http://librdf.org/LICENSE.txt:1 - XML parser error: Document is empty
rapper: Error - URI http://librdf.org/LICENSE.txt:1 - XInclude processing failed for GRDDL document
rapper: Failed to parse URI http://librdf.org/LICENSE.txt grddl content
rapper: Parsing returned 0 triples

GRDDL parser updated to support the GRDDL W3C Working Draft 2 March 2007:

  • Namespace and profile URI handling now works.
  • Run XML Include processing
  • Throw away XML validation errors
  • When a namespace URI is seen that was RDF/XML Mime type, run the RDF/XML parser on the content.
  • Look for substrings inside rel attributes when looking for profiles.
  • Return a warning and do not fail if XSLT sheet is not found
  • Use libxml structured errors for better reporting
  • Removed old hard-coded xslt scripts

Turtle parser was changed to accept the N3 mime type text/rdf+n3 at low Q(quality) so it might work for N3 that is the RDF subset - quite common.

Changed the RSS Tag Soup parser and RSS 1.0 serializer to stop sharing use of the declared namespaces so that when using both at the same time, there is no double-free of the same objects.

Correct the content: namespace URI in the RSS parser and serializers.

Other Changes

rapper gains a -t/--trace option to show URIs traversed. Handy for GRDDL.

raptor_uri_resolve_uri_reference() no longer goes past the end of buffer when the relative URI is ,/

Added an internal API for capturing parsed data as it is seen. Use by GRDDL parser but with no public API.

Added an internal API for structured error reporting. Updates made throughout the library but with no public API.

Internal API raptor_new_sax2() signature changed to just have an error_handlers pointer argument rather than multiple function / user_data pairs.

Raptor 1.4.14 Changes

General Changes

Added a Turtle Terse RDF Triple Language serialiser by Dave Robillard based on the existing RDF/XML-Abbrev serialiser.

Added a GraphViz DOT format serialiser by Evan Nemerson.

The GRDDL parser now does namespace and profile URI recursion and has other improvements and fixes.

Fixed Issues:

  • #0000032: GRDDL indirection feature request
  • #0000141: Crash when GRDDL parser is used with a used-generated blank node ID prefix.
  • #0000143: Crash when GRDDL parser fails to retrieve URI.
  • #0000148: A public function to generate a blank ID would be nice though.
  • #0000155: entity processing in literal property elements (with libxml)
  • #0000157: Crash when RDF/XML Abbrev serializer sees a rdf:type predicate with a literal object.

Configuration Changes

raptor-config gains a --private-libs for the internal libraries used in building raptor, with the public ones only emitted with --libs.

raptor.pc now uses Libs.private for internal dynamically linked libraries.

The libxml minimum version is now 2.6.8 since 2.6.7 crashes on PPC64 Linux. 2.6.8 was released March 2004 so this should be no burden.

Do not use PATH_MAX so raptor can build on Hurd.

Parser Changes

RDF/XML parser now looks for the RDF/XML root element and namespace declaration in the initial bytes of content when guessing. This allows content that is in other mime types such as application/xml to be more likely guessed as RDF/XML.

When guessing a parser to use, if an an exact match is found for the mime type (q=10), then that parser is used.

The GRDDL parser has several changes:

  • Recurses through the root element's namespace URI and the profile URIs. It excludes several common namespace URIs from processing (XHTML, RDF/XML, XML Schema) and does not traverse the GRDDL profile URI itself.
  • Tries to guess which of the RDF/XML or Turtle parser is wanted from an XSLT result. Guessing is performed because not all the XSLT sheets used in the demonstrations set the mime type to match Turtle's unregistered type, or because the return no mime type, or return an XML one, when it was expected RDF/XML would be received.
  • Watches the processed URIs and never visits the same URI more than once in a session.
  • Passes on general XSLT errors to raptor rather than letting the default (printing to stderr) work.
  • Declares XSLT 'base' and 'Base' parameters to allow some XSLT sheets to work - pragmatism.

Serializer Changes

Added a new Turtle Terse RDF Triple Language serializer and two new internal APIs based on the existing RDF/XML-Abbrev serialiser, written by Dave Robillard:

  • turtle_writer for serializing triples to Turtle This may be moved to the public API in a future release.
  • raptor_abbrev for the common 'abbreviated serializer' core that is shared between the RDF/XML-Abbrev and Turtle serializer.

Added a new GraphViz DOT format serialiser writen by Evan Nemerson.

Note that testing the turtle serializing (make test) requires the rdfdiff -u and a few of the tests take some time to run.

Other Changes

Added raptor_home_url_string and raptor_license_string exported strings.

Added raptor_parser_generate_id() as a public function to generate an identifier for a parser.

rdfdiff gains the -u/--base-uri option to specify the from file base URI so that if the from file is a local file or relative URI, it can be given an absolute base.

Failures to retrieve content from a URI using the raptor_www class implementations now return a failure as well as setting the HTTP status code to 403 or 404 as appropriate. Previously success may have been returned with no bytes.

Raptor 1.4.13 Changes

General Changes

Prevent losing memory for a raptor_xml_writer when a serializer is reused several times.

Fixed issues reported on the Redland Issue Tracker:

  • Issue#0000134: Check for equal scheme and authority during construction of relative URIs from two absolute URIs.

Configuration Changes

In maintainer mode, add all the supported compiler -W warning flags to the CFLAGS.

Allow LEX to be set to things that aren't exactly 'flex'.

Documentation Changes

Added single triple serializing example to the tutorial to demonstrate serializing without parsing and building a raptor_statement.

Other Changes

Declare several raptor functions with GCC printf-formatting attributes when using a new enough GCC.

RDF/XML parser now creates literals with raptor_stringbuffer so that it does a lot less copying when constructing longer literals.

Added single raptor_statement serializing example to demonstrate serializing alone without parsing.

Raptor 1.4.12 Changes

Restored the order of serialized syntaxes back to the same as in Raptor 1.4.10 which Redland was relying on - asking to serialize to mime type 'application/rdf+xml' without specifying a parser name in Redland with Raptor 1.4.11 wrote it in XMP instead of RDF/XML as it used to. This happened more often with language bindings. That problem will be fixed in a future release of Redland but for now, this stops wierd things like that happening.

Raptor 1.4.11 Changes

General Changes

Added raptor_get_feature_count() to return the count of features, in preference to using the macro value RAPTOR_FEATURE_LAST.

Added raptor_www_set_uri_filter() method of the WWW class (raptor_www) objects to have an optional URI filter function that checks if the URL given is allowed to be retrieved, or denied entirely.

Fixed issues reported on the Redland Issue Tracker:

  • #0000112: raptor_namespaces_qname_from_uri not public API?
  • #0000110: strcasecmp problem under windows (raptor_rss.c does not compile)
  • #0000091: guess parser should guess the syntax each time it is run, not be fixed
  • #0000089: Add a NONET feature to prevent network fetches
  • #0000041: Allow multiple transformation URLs in data-view:transformation property
  • #0000014: bNode content written twice in rdfxml-abbrev output mode

Documentation Changes

The Raptor Reference Manual now includes descriptions of all the parsers and serializers and the tutorial has a new section describing how to filter URIs and deny network requests.

Parser Changes

Added functionality to prevent network requests either via setting a new feature RAPTOR_FEATURE_NO_NET that denies network requests during a parser operation or with a URI filter function raptor_parser_set_uri_filter(). This function uses raptor_www_set_uri_filter() internally.

Added raptor_get_need_base_uri() to tell if a parser requires a base URI argument. Presently the N-Triples parser is the only parser that does not require a base URI. raptor_start_parse() will now throw an error if no base URI is given and it is needed.

The GRDDL parser was changed to handle a list of URIs in the profile so it now can support dataview:transformation in XML taking a list of transformations as defined in The GRDDL profile for XHTML part of the GRDDL specification. It now also recognises Embedded RDF and HCalendar using well known XPaths and transforms them to RDF triples using well known XSLT sheet URIs.

The Guess parser now resets after each parse and does a fresh guess on the syntax based on the incoming information. Fixes Issue#0000091

The Turtle parser (and experimental N3 parser) were changed to now require base URIs as they always should have. The error messages when reporting problems with grammar tokens now return better responses. Added better memory cleanup during parser error recovery.

Serializer Changes

The RSS 1.0 Serializer now works again.

Updated the RDF/XML Abbreviated serializer to do proper reference counting on the blank/resource nodes used as subjects and objects to prevent dual-triple generation. Fixes the reported Issue#0000014

Other Changes

The internal SAX2 API can also prevent network fetches with the feature RAPTOR_FEATURE_NO_NET.

Fixed a SAX2 problem that caused parsers that use it to leak memory for 1 URI, affected RDF/XML and RSS Tag Soup.

rapper help and verbose message formats were tidied.

Raptor 1.4.10 Changes

General Changes

No parser will now generate a triple with an identifier type RAPTOR_IDENTIFIER_TYPE_ORDINAL. Only identifier type resource, anonymous (blank node) and literal will be generated. All serializers will convert any RAPTOR_IDENTIFIER_TYPE_ORDINAL type on input to type resource.

Configuration Changes

No longer adds LDFLAGS to pkgconfig file raptor.pc and raptor-config fixing Issue#0000097.

Parser Changes

All parsers no longer generate a triple with an identifier type RAPTOR_IDENTIFIER_TYPE_ORDINAL, as deprecated in 1.4.8. The replacement type generated is RAPTOR_IDENTIFIER_TYPE_RESOURCE.

The RSS Tag Soup (rss-tag-soup) parser now makes the triples appear before parser destruction. This caused odd symptoms like parsing in python returning no triples and the parser then crashing during object destruction.

The RDF/XML (rdfxml) parser no longer crashes if a comment is seen outside an element, such as before or after the root element.

Serializer Changes

The RDF/XML (rdfxml) serializer no longer crashes if the serializer is used more than once.

Raptor 1.4.9 Changes

Configuration and Build Changes

Now using Subversion for version control and the Raptor installation instructions explain how to get Raptor from Subversion.

configure now allows --enable-parsers=node and --enable-serializers=none. Using both is possible!

No longer require libxml2 for the RSS Tag Soup parser

Various Win32 fixes and VC build files updates from John Barstow.

Documentation Changes

A new Raptor Tutorial was written covering using all parsing and serializing functions along with example code.

The Raptor Reference Manual now covers 100% of all functions, structs and defines with gtkdoc generated documentation.

rapper utility Changes

rapper now uses namespaces found in parsing to give hints to the serializer as to how to format the output. The result of this is that rapper can be used as an RDF pretty-printer and is especially good at such things as turning flat N-Triples to RDF/XML or RDF/XML-Abbrev. such as:

rapper -q -i ntriples -o rdfxml-abbrev example.nt

Parser Changes

All parsers no longer generate RAPTOR_IDENTIFIER_TYPE_PREDICATE as the statement predicate type, as deprecated in 1.4.8. The replacement type generated is RAPTOR_IDENTIFIER_TYPE_RESOURCE.

The Turtle parser now has true and false boolean literals, which were accidently omiited from the parser in the 1.4.8 update.

Parsers can register capabilities for handling multiple mime types with Q values. These are then used in WWW requests for content in the Accept: header for HTTP. Added raptor_parser_factory_add_mime_type for registering, raptor_parser_get_accept_header to get the accept header values for the types supported by one parser.

From the previous change, the RSS parser now accepts several unregistered RSS mime types as well as the registered Atom one; the RDF/XML parser accepts unregistered mime type text/rdf seen occasionally; the Turtle parser accepts several experimental mime types. All unregistered or experimental types are accepted with lower Q than any registered type.

The RSS Tag Soup parser for RSS* and Atom no longer requires libxml2 (for it's XML Reader API). Internal changes mean that it will fully work on top of expat.

Serializer Changes

The RSS/Atom serializer now uses input namespace declarations to choose namespaces on output.

Added raptor_serialize_set_namespace_from_namespace to set a namespace for serializing from an existing raptor_namespace.

Serializing to RDF/XML (or RDF/XML Abbrev) now does not double-free URI strings. Fixes Issue#0000065

RSS serializer no longer writes the XML header twice.

IOStream Class Changes

Added raptor_iostream_write_uri to directly write a URI to an iostream without the need to go via a string.

Fixed bug in raptor_iostream_write_xml_any_escaped_string failing to write ';' after escaping U+0009 and U+000A

Namespaces Class Changes

Added raptor_namespaces_qname_from_uri to do URI splitting into qname prefering to use the current in-scope namespaces before having to search.

raptor_namespaces_format now NULL-terminates the namespace string. Fixes Issue#0000062

Added raptor_namespace_get_counted_prefix to return a namespace prefix and it's length.

QName Class Changes

Added raptor_qname_get_namespace to get the namespace associated with a QName.

StringBuffer Class Changes

raptor_stringbuffer_append_counted_string and raptor_stringbuffer_append_string now Do nothing on appending a NULL string or a string of length 0. Fixes Issue#0000073

Unicode Class Changes

raptor_utf8_to_unicode_char now also checks for overlong UTF-8 sequences, illegal code positions or out of range codes.

URI Class Changes

Deprecated raptor_uri_is_file_uri which takes a URI string argument for new function raptor_uri_string_is_file_uri which more clearly says that.

Changed all URI string calloc/mallocs to add enough room for a full pointer at the string end to stop valgrind moaning on 64bit systems when looking for the end of string NUL.

raptor_uri_set_handler and raptor_new_iostream_from_handler now take const handler arguments.

WWW Class Changes

Get the curl success status into a long, not an int which causes failure on 64 bit. Fixes Issue#0000075

WWW requests for content to parse now always send an appropriate Accept: header with Q values for the parser, or for the guess parser, all supported mime types.

Internal Changes

Added XML element methods raptor_xml_element_get_attributes and raptor_xml_element_get_attributes_count, raptor_xml_element_is_empty to the SAX2 API.

Many internal changes were made to the SAX2 API to finally separate XML and RDF/XML parts. The SAX2 API is now fully usable on either libxml2 or expat. That last sentence implies a lot of work, by the way.

Raptor 1.4.8 Changes

General Changes

A large source re-arrangement was performed. All C sources and headers that build the library are now in the src dir, general documentation in the doc dir and utilities in the utils dir. This both tidied up the mixture of files at the top level and also enabled better use with gtk-doc.

Future API change: From the next release of Raptor, raptor_statement predicates will return identifiers of type RAPTOR_IDENTIFIER_TYPE_RESOURCE instead of RAPTOR_IDENTIFIER_TYPE_PREDICATE. Identifiers of type RAPTOR_IDENTIFIER_TYPE_ORDINAL may no longer be returned in any statement position (to be confirmed).

Version Control change: Raptor will be switching to use Subversion for version control after the 1.4.8 release. Please check the Redland Subversion site for the latest status or the online Raptor installation notes for the raptor specific subversion installation information.

Configuration Changes

The autogen.sh script for building from CVS was revamped to be more modular.

configure now takes an --enable-gtk-doc option to enable building of the documentation using the gtk-doc utility. It is by default enabled only if the utility is available.

Added a new configure option --enable-serializers (in 1.4.7) to allow the selection of the required RDF serializers from any of those supported.

raptor-config now has a --options argument to list the configured or discovered options of the library such as parsers, serializers and other choices.

Documentation Changes

The GNOME gtk-doc program is now used to automatically extract documentation from source comments into reference documentation. This is then merged with templates and additional documentation to provide a reference manual for raptor as XML document which is turned into HTML along with GNOME devhelp support.

This new documentation intended to replace the libraptor manual page/web page as easier to read document with scope for better expanding with more detail of raptor including examples and tutorial information. The manual page will continue to contain the summary information for the present.

Portability Changes

Fixed a long-standing URI resolution bug on win32 - only remove leading / if there is one present (patch from John C. Barstow)

rapper utility Changes

Altered the -g argument to invoke the guessing parser rather than guess on file/URI name alone. This is now equivalent to choosing an input syntax of guess with -i guess.

Added a --show-namespaces long option (no short version) to show namespaces that are declared in the parsed content.

Parser Changes

A new guessing parser was added, picking the actual parser to use at run-time based on protocol or other information.

Allow a content type returned by a protocol (such as HTTP) to enable choosing of parser at run-time. Added a new optional parser factory method content_type_handler to return this.

Allow parsers to handle several syntaxes rather than only 1 or 2.

Parsers can now return namespace prefix/URI declarations as they are given in the content by the means of a new handler type raptor_namespace_handler and parser method raptor_set_namespace_handler. Duplicate namespace prefix/URIs can be returned.

GRDDL Parser Changes

Bug fix when the entire content is in one chunk (René Puls).

Guessing Parser Changes

A new parser that guesses the actual parser to use at run-time based on a combination of MIME Content-Type, file or URI name and in future, iniital bytes of the content. If the Content-Type is an exact match to a known parser, it is always chosen before trying heuristics.

RDF/XML Parser Changes

When emitting literals, handle a datatyped empty literal. This is a post-REC errata for the revised RDF/XML recommendation. See archived example for further information.

RSS Tag Soup Parser Changes

Added atom 1.0 support including use of the new namespace. Atom 0.3 namespace terms are turned into new properties. Replace atom copies of Dublin Core or RSS properties with the original terms:

Atom 1.0 term Original term
atom:content rss:description
atom:id rss:link
atom:published dc:date
atom:rights dc:rights
atom:title rss:title

Apply the in-scope base URI (such as from xml:base) to atom 1.0 fields that take URI values: atom:id, atom:icon and atom:logo.

Added optional date parsing code to turn XML RSS date fields into ISO format ones, suitable for Atom and XML schema datatypes format. Will use library parsedate code from curl or INN if available.

XML RSS field pubDate is now turned into Dublin Core dc:date field in the ISO format.

XML RSS field content is turned into content:encoded in RDF triples on output with escaping.

Turtle Parser Changes

Updated to support Turtle version 2006-01-02 (announcement).

Switch qname, blank node and prefix definitions to SPARQL ones.

Check for illegal not-hexadecimal \u and \U escape values.

Fix greedy matching of long literals ("""....""") that ended on the last """ found rather than the first.

Added double and decimal constants.

Added optional +- sign to all numeric constants.

Allow \" escape inside long strings.

Take care to reset the generated raptor_statement language and datatype fields when not used.

Serializer Changes

Added a new Atom 1.0 serializer (name atom) by parameterising the RSS 1.0 serializer.

Added a new Adobe XMP compatible serializer (name rdfxml-xmp) by parameterising the RDF/XML Abbreviated serializer. Patch provided by Sid Steward.

All serializers can be chosen at configure time from those available using configure option --enable-serializers.

The RSS parser and serializer can now be independently enabled or disabled. The RSS serializer no longer requires an XML parser.

RDF/XML Serializer / XML Writer Changes

A new XML Writer feature RAPTOR_FEATURE_WRITER_XML_VERSION was added to allow chosing XML 1.0 (value 10) or XML 1.1 output (value 11). This feature is also accepted by serializers as an option and used by the RDF/XML and RDF/XML-Abbrev serializers.

A new XML Writer feature RAPTOR_FEATURE_WRITER_XML_DECLARATION was added to allow omitting the XML declaration (default true).

Added functions raptor_xml_any_escape_string() and raptor_iostream_write_xml_any_escaped_string() which take an XML version. The XML 1.0 functions give errors when attempting to write #x1-#x1f (excluding #x9, #xA, #xD) or #x7F.

Atom 1.0 Serializer Changes

Added a new serializer using the Atom 1.0 format and namespace. This reads RDF triples in the RSS 1.0 model, along with any additional atom 1.0 properties and serializes an Atom 1.0 feed file.

Adobe XMP Serializer Changes

Added a new serializer writing RDF/XML in the profile used by Adobe XMP. Note that this does require RDF triples to be used in a certain style; for example all triple subjects are the "current documment" giving rdf:about="".

URI Class Changes

Fix a bug when adding a default path of / to a URI in functions raptor_new_uri_for_xmlbase() and raptor_new_uri_for_retrieval(). (Bug #0000045)

raptor_uri_equals was altered to accept NULL pointers, which do not compare equal to a non-NULL URI. NULL does equal NULL.

Internal Changes

The internal SAX2 class was extensively changed so that remaining interdependencies with the RDF/XML parser were removed and it can now be re-used for other syntaxes cleanly. Several functions were modified or added.

Removed old and hardly-tested internal support for XML entity resolution (libxml only).

Various fixes for GCC 4 warnings.

Raptor 1.4.7 Changes

Fix a couple of crashes in the RSS tag soup parser / serializer (Dave Beckett, Suzan Foster).

configure now looks for the libxslt/xslt.h header as well as the libxslt library and disables XSLT and GRDDL support it if is missing. This catches systems with the libraries without headers as has happened on some OSX versions.

In serializers rdfxml and rdfxml-abbrev, report failure to serialize to RDF/XML if the predicate URI is not absolute.

Raptor 1.4.6 Changes

Added --with-xslt-config configure option

Added a new parser for Gleaning Resource Descriptions from Dialects of Languages (GRDDL) which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML/XML content into RDF/XML which is the RDF content. It does not support all the GRDDL styles, for example dataview:namespaceTransformation, or perform recursive transformations.

The turtle parser now accepts """long literals"""

XML writer feature support were added in 1.4.5 and not documented. The new functions are: raptor_xml_writer_features_enumerate, raptor_xml_writer_set_feature, raptor_xml_writer_set_feature_string, raptor_xml_writer_get_feature and raptor_xml_writer_get_feature_string. The three XML writer features added are \fBRAPTOR_FEATURE_WRITER_AUTO_INDENT\fR with boolean value (default true) to auto-indent the XML, \fBRAPTOR_FEATURE_WRITER_AUTO_EMPTY\fR with boolean value (default true) to automatically generate empty elements if a start/end element sequence has no content and \fBRAPTOR_FEATURE_WRITER_INDENT_WIDTH\fR with an integer value (default 2) to set the indenting level for the XML.

New build configuration and portability fixes for win32 (John Barstow)

Portability fixes for win32 - added SIZEOF_UNSIGNED_SHORT (Dave Viner, others)

Added a signing memory debugging system to aid checking when raptor-allocated memory is freed in another library or vice-versa enabled by --with-memory-signing configure option (defaults to on in maintainer mode).

Fixed a few internal malloc/frees to use RAPTOR_MALLOC / RAPTOR_FREE so that the above signed memory system worked.

RDF/XML serializer: Use the maximal name when splitting a predicate.
Turn datatyped literals that are rdf:XMLLiteral into inline XML with rdf:parseType="Literal" rather than XML-escaped.

RDF/XML abbreviated serializer: Fix a crash when there is a NULL base URI. Use the maximal name when splitting a predicate.
Turn datatyped literals that are rdf:XMLLiteral into inline XML with rdf:parseType="Literal" rather than XML-escaped.

RSS tag soup parser: Fix crash with unexpected use of alternate attribute.
Update from Suzan Foster to reflect the latest status of the enclosure vocabulary and allow multiple common items and fields.

RSS 1.0 serializer: Added RSS enclosures serializing.

grapper example GTK program now stores the window width and height using gconf2.

Raptor 1.4.5 Changes

Added a new RDF/XML with abbreviations serializer rdfxml-abbrev written by Steve Shepard which handles several of the abbreviations specified by the RDF/XML Syntax Specification (Revised) W3C Recommendation. It is suitable for writing small documents as there are known scaling issues.

The RSS tag soup parser was updated to work better when there is no base URI given. It also now supports reading the RSS 1.1 format and turning it into RSS 1.0 model triples.

Deprecated raptor_ntriples_string_as_utf8_string as rather too internal to be useful, since it only works with a parser.

More fixes to work around the broken libxml2 on Apple OSX 10.3.x with inconsistent shared libraries / headers.

Experimental and incomplete Notation 3 parser - updated to match changes to Turtle. CVS changes only, not enabled in standard builds.

Raptor 1.4.4 Changes

Make the RSS tag soup parser handle RSS 0.9 namespace elements by turning them into RSS 1.0.

Fix a couple of crashes in the RSS 1.0 serialiser when no base URI is used.

Make raptor_uri_to_relative_counted_uri_string work when the base or reference URI have no paths such as like http://example.org

Added portability fixes for Win32 to get Raptor 1.4.3 building with MS Visual Studio using expat and libcurl. The RAPTOR_INTERNAL define was moved to the build configuration and defines added for integral type sizes. Patch from Dave Viner (dviner at apache dot org).

Raptor 1.4.3 Changes

A release with the major new feature of an XML writer API. This is now used along with a new supporting XML element class to improve the existing RDF/XML serializer and to provide a new RSS 1.0 serializer.

This API it is also used by the next release of Rasqal to provide serializing of query results to XML.

The new raptor_xml_writer class functions added are: raptor_new_xml_writer (constructor), raptor_free_xml_writer (destructor), raptor_xml_writer_empty_element, raptor_xml_writer_start_element, raptor_xml_writer_end_element, raptor_xml_writer_cdata, raptor_xml_writer_cdata_counted, raptor_xml_writer_raw, raptor_xml_writer_raw_counted, raptor_xml_writer_comment and raptor_xml_writer_comment_counted.

The new raptor_xml_element class functions added are: raptor_new_xml_element (constructor), raptor_free_xml_element (destructor), raptor_xml_element_get_name, raptor_xml_element_set_attributes, raptor_xml_element_declare_namespace and raptor_iostream_write_xml_element.

Parser Changes

RSS tag soup parser now works with older libxml2s (2.5.10+), including the one shipped with some Apple OSX versions that has an inconsistent header file and library.

RSS tag soup parser recognises/scores more common XML RSS file names.

RSS tag soup parser turns XML RSS <guid isPermaLink="true">val</guid> into RDF/XML form <guid rdf:resource="val"/>, leaving the non isPermaLink form to be a literal value.

A bug was found in libxml2 that causes double expanding of XML entities in RDF/XML. This has been reported but cannot be worked around from raptor. The expat XML parser can be used as an alternative, as it does not have this problem. A test was added for this bug but it will not cause the test suite ('make check') to fail.

Added additional Turtle parser tests that cover Notation 3 syntax that is not part of the Turtle language.

Added raptor_parser_set_feature_string and raptor_parser_get_feature_string methods to set/get string feature values.

Serializer Changes

Added feature relative_uris for serializers. This is used by the RDF/XML serializer and enabled by default.

Added feature start_uri for serializers with a string value to set the start URI for serializing. Not used at present.

Added new methods raptor_serializer_features_enumerate to list serializer features and functions to set/get serializer feature integer or strings values: raptor_serializer_set_feature, raptor_serializer_get_feature, raptor_serializer_set_feature_string and raptor_serializer_get_feature_string.

Added raptor_serialize_set_namespace to allow user declaration of prefix/URI namespaces pairs as serializing hints.

the RDF/XML serializer was improved using the new XML Writer class so it now uses any user-declared namespace hints in it's output and emits relative URIs whenever possible. The latter was provided by a patch from René Puls.

A new RSS 1.0 serializer was added, using the new XML Writer class and using the same structures, classes and properties as the RSS tag soup parser.

URI class changes

Added relative URI generating code from a patch written by René Puls and provide this with two new methods raptor_uri_to_relative_uri_string and raptor_uri_to_relative_counted_uri_string.

Added raptor_uri_print to print a URI to a file handle.

Added methods raptor_uri_to_string and raptor_uri_to_counted_string to return a URI as newly allocated strings.

I/O Stream Changes

Many classes gained methods to write to iostreams, supporting the new XML Writer class functionality. The added methods are: raptor_iostream_write_namespace, raptor_iostream_write_ntriples_string, raptor_iostream_write_qname, raptor_iostream_write_statement_ntriples, raptor_iostream_write_stringbuffer, raptor_iostream_write_xml_element and raptor_iostream_write_xml_escaped_string.

Namespace Class Changes

Added raptor_namespace_copy copy constructor and raptor_new_namespace_from_uri constructor to build a namespace from a raptor_uri object.

Added utility function raptor_new_namespace_parts_from_string to decode syntax of the form xmlns:prefix="uri" into prefix and uri string pairs.

Added raptor_namespaces_find_namespace_by_uri method for namespace stack to find a declared namespace by URI. This complements raptor_namespaces_find_namespace which already provides searching by prefix.

Unicode and UTF-8 Changes

Added several methods for checking characters forming parts of XML 1.0 or XML 1.1 names: raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml10_namechar and raptor_unicode_is_xml11_namechar.

Added a function raptor_utf8_check to check that a string is legal UTF-8 and all the encoded Unicode characters are in the range U+0 <= character <= U+10FFFF

Added a function raptor_xml_name_check to check that a string is a legal XML name (1.0 or 1.1) as well as legal UTF-8.

Other Changes

Feature support: Added raptor_feature_value_type to determine value of a feature - either integer (most) or string.

XML QName class: Added raptor_qname_copy copy constructor.

Sequence class: Added raptor_sequence_join to join two sequences of items, leaving one empty.

Statement class: Added raptor_statement_copy copy constructor and raptor_free_statement destructor. Previously these were internal to raptor.

The rapper utility was modified to add a feature form: -f xmlns:PREFIX="URI" allowing the setting of output serializer namespaces.

The namespace URI string constants exported by raptor are now of type unsigned char*.

Raptor 1.4.2 Changes

Make raptor_xml_escape_string fail correctly when given bad UTF-8 to escape.

Raptor 1.4.1 Changes

Fixed a buffer overrun in decoding a URI scheme in raptor_uri constructors such as raptor_new_uri.

Fixed a crash in RSS enclosures crash when the url attribute seen on a non-<enclosure> element

raptor_xml_escape_string return value has changed to be an int, returning <0 on failure. This allows the empty string encoding an empty string case to work and be distinguished from an error.

Raptor 1.4.0 Changes

A release with the major new feature of providing serializing of RDF triples to syntaxes. It also added a new support class for I/O streams and had other minor fixes.

Added a Raptor Serializer class (raptor_serializer) with similar style to Parser (raptor_parser). Two serializers are provided, for RDF/XML and N-Triples. The serializing can be done to files, C FILE* or to strings. The raptor_iostream class that provides this also allows writing to any other form by creating a custom iostream.

The new raptor_serializer class functions added are: raptor_serializers_enumerate, raptor_serializer_syntax_name_check, raptor_new_serializer, raptor_free_serializer, raptor_serialize_start, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_serialize_statement, raptor_serialize_end, raptor_serializer_get_iostream, raptor_serializer_set_error_handler, raptor_serializer_set_warning_handler and raptor_serializer_get_locator

Added a Raptor I/O stream abstraction in raptor_iostream class to support serializing of RDF to multiple output streams such as to filenames, to C standard I/O FILE* handles and to strings especially for cross-language use. A raptor_iostream_handler can be used to construct a user-defined iostream.

The new raptor_iostream class functions added are: raptor_new_iostream_from_handler, raptor_new_iostream_to_sink, raptor_new_iostream_to_filename, raptor_new_iostream_to_file_handle, raptor_new_iostream_to_string, raptor_free_iostream, raptor_iostream_write_bytes, raptor_iostream_write_byte, raptor_iostream_write_end, raptor_iostream_write_string, raptor_iostream_write_counted_string, raptor_iostream_get_bytes_written_count, raptor_iostream_write_decimal and raptor_iostream_format_hexadecimal.

The rapper utility was modified to use serializer class so that the output formats supported are now N-Triples (-o ntriples) - the default, and RDF/XML (-o rdfxml).

Raptor now exports more static namespace URI strings for general application use: raptor_xml_namespace_uri, raptor_rdf_namespace_uri, raptor_rdf_schema_namespace_uri, raptor_xmlschema_datatypes_namespace_uri, raptor_owl_namespace_uri, and the length raptor_rdf_namespace_uri_len.

The raptor_stringbuffer class gained a new method raptor_stringbuffer_copy_to_string which allows efficient copy-out of a constructed string.

The raptor_www class gained a new method raptor_www_fetch_to_string to allow retrieving of web content as a single string.

RSS tag soup parser gained support for generating triples for enclosures, after a patch from Suzan Foster. Changes made include correcting the enclosures namespace and tidying some memory leaks.

Raptor 1.3.3 Changes

A release with major improvements along with several minor fixes.

Raptor's License was changed from LGPL 2.1/MPL 1.1 to LGPL 2.1/Apache 2

Thanks to Chris Pointon for several patches to make Raptor easier to build under Win32 which were applied, with some slight modifications.

Increased WWW content retrieval buffer size from 256 bytes to 4K since this was causing problems for even moderate size documents.

After testing raptor on a very large RDF/XML file with many rdf:ID values, the check for duplicate values was found to be inefficient in memory and slow. The implementation was improved to be more memory efficient and a new parser feature check_rdf_id was added to disable checking (default is enabled).

Added a new Unicode NFC checker to replace the functionality formally available by calling the GNOME glib function g_utf8_normalize. This new checker is done via several tables and adds approximately 50K to the object size of the library when compiled on x86. This code and tables can be disabled with configure option --disable-nfc-check causing all checks to succeed.

Fix the exporting of raptor_xml_literal_datatype_uri_string and raptor_xml_literal_datatype_uri_string_len as constants for use by applications. Previously raptor.h wasn't doing this correctly.

Added raptor_calloc_memory for allocating zeroed memory inside raptor, for use by applications passing memory in/out of raptor.

Added a new configure option --enable-parsers to allow the selection of the required RDF parsers from any of those supported (RDF/XML, Turtle, N-Triples, RSS tag soup).

Reorganised the sources to split parsing support from RDF/XML to support compiling without this parser.

Updated the RSS Tag Soup parser to start to handle the Atom 0.3 currently being standardised by the IETF Atom Publishing Format and Protocol working group.

Altered the Turtle parser to work with large source documents that exceeded bison limits. Thanks to Geoff Chappell for providing a fix for this.

Rewrote the URI parsing to create an internal structure and improved the relative URI resolving in preparation for future work such as potentially supporting URI canonicalisation such as proposed to be used by Atom.

Raptor 1.3.2 Changes

A release with some minor fixes.

Added a new configure option --with-expat-source=DIR to allow the use of external expat source trees in either the old or newer directory structure style. (Patch from Mark Smith).

Added raptor_alloc_memory for handlers that need to allocate memory in the same heap as raptor uses for raptor_free_memory. This is mostly useful for allocating memory that is freed by raptor in error, ID and statement handlers on win32 which has separate heaps for different DLLs.

A bug was fixed where errors which happened when fetching WWW content were always printed to stderr. They are now passed to the main error routines which allows applications to retrieve them.

Accessor functions were added for parts of the public raptor_locator structure which makes it possible to get structured error information from language bindings via Redland (Patch from Edd Dumbill). The new functions are:

  • int raptor_locator_line(raptor_locator *locator);
  • int raptor_locator_column(raptor_locator *locator);
  • int raptor_locator_byte(raptor_locator *locator);
  • const char * raptor_locator_file(raptor_locator *locator);
  • const char * raptor_locator_uri(raptor_locator *locator);

The Unicode Normal Form C (NFC) checking via the GNOME glib library function g_utf8_normalize is broken, comparing the data it says is failed against other NFC checkers. It is also slower than need be since it is doing full normalizing rather than just checking for NFC, and adds a rather large dependency for just one function. A new portable checker will be added in a later release.

Raptor 1.3.1 Changes

A release primarily to fix some win32 and portability issues.

raptor.h now includes stdarg.h

Corrected the raptor_print_statement declaration in raptor.h for the argument statement to have one less 'const' which matches the actual code.

Made several portability fixes for compiling natively on win32 which doesn't quite do POSIX or C99.

Changed the support for file: URIs and converting to and from filenames. It now %-escapes spaces and % characters on conversion to and from filenames with raptor_uri_uri_string_to_filename, raptor_uri_uri_string_to_filename_fragment and raptor_uri_filename_to_uri_string. For Win32, more tests were added and the format of URIs supported corrected to use the file:///c: form rather than file://c|/

URIs that resolve to directories now return an error when lstat is available to check.

Parser Changes

The Turtle parser was updated to only allow language with non-datatyped literals, allow a '_' immediately after a ':' in qnames and to make a bare ':' qname work correctly.

The Turtle parser was fixed to re-initialise correctly when performing multiple parsings. The other parsers already did this correctly.

Added a warning to the RDF/XML parser for unknown rdf:parseType values, when parsing in lax mode - which is the default. It now tells the user when the parsing is working as 'Literal' mode by finding an unknown value. This is controlled by a new parser feature warn_other_parsetypes which is default set true in lax mode. Parser modes are controlled by the raptor_set_parser_strict method.

Raptor 1.3.0 Changes

A release primarily to provide support for the new Rasqal RDF query library but with some new features and fixes.

Parser Changes

Added a new constructor raptor_new_parser_for_content to guess the parser to use from hints in URIs or content, using a new utility function raptor_guess_parser_name.

Additional checks were added to the RDF/XML parser for RDF-namespaced names in element and attributes and if they are forbidden giving an error otherwise if unknown, giving a warning.

The Turtle parser was updated to correct the collections syntax, allow '-' in names and QNames and to add integer literals. This parser now correctly uses raptor_generate_id when a blank identifier name is needed.

Completed parser feature support by adding raptor_get_feature, raptor_feature_from_uri, and raptor_features_enumerate to get values and enable discovery of supported features at run time. raptor_set_feature was changed to give return a success value

Added a new method raptor_get_mime_type to get the MIME type of the syntax for a parser

raptor_parse_uri_with_connection (which is called by raptor_parse_uri) now sets the HTTP Accept: header to the MIME type of the parser in WWW requests using the new raptor_www_set_http_accept().

rapper changes

Added options -f/--feature for setting features and -g/--guess for guessing syntax from some content or identifiers. See rapper(1) for all rapper options.

Utility function changes

Added raptor_syntax_name_check to check for valid syntax language names.

Added raptor_free_memory to free memory returned by raptor functions.

Added Unicode utility functions raptor_unicode_char_to_utf8 and raptor_utf8_to_unicode_char.

Exported URI string raptor_xml_literal_datatype_uri_string.

Deprecated raptor_print_statement_detailed always intended to be internal.

WWW Class changes

Added support to set the HTTP Accept: header for curl and libxml2 when retrieving HTTP content by the new raptor_www_set_http_accept method.

New classes - Sequence and Stringbuffer

Added a utility class raptor_sequence providing simple sequences that can handle stacks and queues

Added a utility class raptor_stringbuffer for constructing strings from substrings appended or prepended.

Raptor 0.9.0 - Raptor 1.2.0 Changes

Release notes for 1.2.0 and earlier are in the NEWS page or ChangeLog


Copyright (C) 2003-2010 Dave Beckett
Copyright (C) 2003-2005 University of Bristol