2008-06-28  Dave Beckett <dave@dajobe.org>

	* tests/engine/rasqal_graph_test.c: Remove C99 .field = value
	since C++ (or at least G++ 4.0.0) does not support it.

	* src/rasqal_decimal.c, src/rasqal_expr.c, src/rasqal_general.c,
	src/rasqal_raptor.c: Casts for C++

2008-06-26  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h: words

	* Makefile.am, docs/Makefile.am, tests/Makefile.am,
	tests/engine/Makefile.am, tests/laqrs/Makefile.am,
	tests/laqrs/syntax/Makefile.am, tests/rdql/Makefile.am,
	tests/rdql/testsuite/Makefile.am, tests/sparql/Expr1/Makefile.am,
	tests/sparql/Expr2/Makefile.am,
	tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprEquals/Makefile.am, tests/sparql/Makefile.am,
	tests/sparql/SyntaxDev/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am,
	tests/sparql/SyntaxFull/Makefile.am,
	tests/sparql/ValueTesting/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/examples/Makefile.am,
	tests/sparql/part1/Makefile.am, tests/sparql/regex/Makefile.am,
	tests/sparql/simple/Makefile.am, tests/sparql/sort/Makefile.am,
	tests/sparql/survey/Makefile.am, tests/sparql/syntax/Makefile.am,
	utils/Makefile.am, utils/getopt.c, utils/rasqal_getopt.h,
	utils/roqet.c: 2008

	* INSTALL.html, LICENSE.html, NEWS.html, README.html,
	RELEASE.html, TODO.html, docs/README.html: 2008

	* Makefile.am, docs/Makefile.am, src/Makefile.am,
	tests/Makefile.am, tests/engine/Makefile.am,
	tests/laqrs/Makefile.am, tests/laqrs/syntax/Makefile.am,
	tests/rdql/Makefile.am, tests/rdql/testsuite/Makefile.am,
	tests/sparql/Expr1/Makefile.am, tests/sparql/Expr2/Makefile.am,
	tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprEquals/Makefile.am, tests/sparql/Makefile.am,
	tests/sparql/SyntaxDev/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am,
	tests/sparql/SyntaxFull/Makefile.am,
	tests/sparql/ValueTesting/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/examples/Makefile.am,
	tests/sparql/part1/Makefile.am, tests/sparql/regex/Makefile.am,
	tests/sparql/simple/Makefile.am, tests/sparql/sort/Makefile.am,
	tests/sparql/survey/Makefile.am, tests/sparql/syntax/Makefile.am,
	utils/Makefile.am: 2008

	* src/rasqal.h, src/rasqal_datetime.c, src/rasqal_decimal.c,
	src/rasqal_engine.c, src/rasqal_expr.c, src/rasqal_feature.c,
	src/rasqal_general.c, src/rasqal_graph_pattern.c,
	src/rasqal_internal.h, src/rasqal_limit_test.c,
	src/rasqal_literal.c, src/rasqal_map.c, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_query_test.c,
	src/rasqal_raptor.c, src/rasqal_redland.c,
	src/rasqal_result_formats.c, src/rasqal_rowsource.c,
	src/rasqal_skiplist.c, src/rasqal_sparql_xml.c,
	src/rasqal_xsd_datatypes.c, src/rdql_common.h,
	src/sparql_common.h, src/strcasecmp.c, src/win32_rasqal_config.h:
	2008

	* utils/roqet.c: Add --store-results BOOL when debugging, calling
	(currently) internal rasqal_query_set_store_results

	* docs/Makefile.am: note FIXME for updating

	* src/rasqal.h: autodocs

	* docs/tmpl/section-triples_source.sgml: templates

	* docs/rasqal-overrides.txt: override rasqal_triples_source
	FIXME automate keeping this up-to-date

	* src/rasqal_general.c: (rasqal_free_world): autodocs

	* docs/rasqal-sections.txt: Removed rasqal_triples_match_s

	* docs/tmpl/rasqal-unused.sgml, docs/tmpl/section-expression.sgml,
	docs/tmpl/section-general.sgml,
	docs/tmpl/section-graph_pattern.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-prefix.sgml,
	docs/tmpl/section-query.sgml,
	docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-query_results_formatter.sgml,
	docs/tmpl/section-triples_source.sgml,
	docs/tmpl/section-unused.sgml, docs/tmpl/section-variable.sgml:
	Update tmpls

	* docs/rasqal-overrides.txt: override rasqal_triples_match
	FIXME automate keeping this up-to-date

	* docs/rasqal-sections.txt: Added rasqal_triples_match_s

	* docs/tmpl/section-xsd.sgml: title

	* src/rasqal_engine.c: Remove RASQAL_ENGINE_EVAL_LAZY macro and
	trigger off query->store_results flag.  struct
	rasqal_rowsource_engine_context gains offset field and renamed
	need_map to need_store_results
	(rasqal_rowsource_engine_init): Init row offset
	(rasqal_rowsource_engine_process): Add read all flag, use context
	offset and if not reading all, end after one result when not
	storing.
	(rasqal_rowsource_engine_read_row,
	rasqal_rowsource_engine_read_all_rows): Add read all flag.
	(rasqal_engine_execute_and_save): Remove local rowsource here and
	use one in query_results so that stored and lazy queries can use
	it.
	(rasqal_engine_execute_run): Stored and lazy both use this code an
	init a rowsource, use rasqal_engine_execute_and_save if necessary.
	(rasqal_engine_execute_next_lazy): Renamed from
	rasqal_engine_excute_next_lazy. Removed FIXME to execute with
	rowsource.

	* src/rasqal.h: describe rasqal_triples_match function prototypes.
	another prototype fix.  update prototypes to make gtkdoc-scan
	happier: use param names.

	* docs/rasqal-overrides.txt: override world

	* docs/rasqal-sections.txt: more new functions/macros

	* src/rasqal.h: remove ws for gtkdoc-scan

	* src/rasqal.h: autodocs

	* docs/rasqal-sections.txt: Added rasqal_free_world
	rasqal_new_variable_from_variable rasqal_new_world
	rasqal_query_results_formatter_read rasqal_query_results_read
	rasqal_world

	* docs/rasqal-sections.txt: Removed rasqal_expression_foreach_fn
	rasqal_expression_foreach rasqal_graph_pattern_get_flags

	* docs/rasqal-sections.txt: Remove rasqal_finish rasqal_init
	rasqal_new_floating_literal

	* src/rasqal_query.c: (rasqal_query_set_store_results): Added.

	* src/rasqal_internal.h: Added rasqal_query_set_store_results
	struct rasqal_query_s gains a store_result field.

	* utils/roqet.c: Separate use of HAVE_GETOPT_H (external header)
	from HAVE_GETOPT (internal)

	* src/sparql_parser.y: Include unistd.h if present.

	* configure.ac: Try unistd.h when searching for optind

	* src/rasqal_decimal.c: (main): Use %f for double, not %lf

	* configure.ac: Use AC_PROG_CC and AM_PROG_CC_C_O to replace
	AM_PROG_CC_STDC (obsolete) to stop configure warnings

	* src/sparql_parser.y: Separate use of HAVE_GETOPT_H (external
	header) from HAVE_GETOPT (internal)

2008-06-23  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c, src/rasqal_query.c, src/rasqal_redland.c:
	(rasqal_literal_to_redland_node, rasqal_free_literal,
	rasqal_literal_print, rasqal_literal_as_boolean,
	rasqal_literal_as_integer, rasqal_literal_as_floating,
	rasqal_literal_as_uri, rasqal_literal_as_string_flags,
	rasqal_literal_rdql_promote_calculate, rasqal_literal_compare,
	rasqal_literal_equals_flags, rasqal_query_write_sparql_literal,
	rasqal_query_write_sparql_expression): Replaced abort() with
	RASQAL_FATAL[12]() mostly as the default: action of switch()
	statements.  This calls abort() only for developer use, just a
	warning for end users.

2008-06-22  Dave Beckett <dave@dajobe.org>

	* utils/roqet.1: split main & other options

	* utils/roqet.1: formatting

	* utils/roqet.1: update for 0.9.15 & 0.9.16

	* utils/roqet.c: 2008
	(rdql_parser_error): Removed, unused code.

	* docs/librasqal.3: Noted removal of rasqal_init and rasqal_finish

2008-06-21  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h, src/rasqal_expr.c, src/rasqal_graph_pattern.c:
	Removed deprecated functions and macros.
	(rasqal_graph_pattern_get_flags): Deleted.
	(rasqal_expression_foreach): Deleted.  RASQAL_LITERAL_FLOATING
	macro deleted.  rasqal_expression_foreach_fn typedef deleted.

	* docs/librasqal.3: Updated for old release 0.9.15 of 2007-11-17

	* src/rasqal-config.in: Add /usr/include/rasqal to cflags

	* src/Makefile.am: Install rasqal headers in /usr/include/rasqal
	as promised

2008-05-22  Lauri Aalto <laalto@iki.fi>

	* src/sparql_lexer.l: Fixed sparql 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.
	(sparql_lexer_fatal_error): Removed abort() call, let caller
	terminate the lexer.

2008-05-16  Dave Beckett <dave@dajobe.org>

	* src/rasqal_result_formats.c:
	(rasqal_iostream_write_json_boolean): Renamed from
	raptor_iostream_write_json_boolean and fix to emit a " before the
	name.

2008-05-06  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c: (rasqal_query_prepare): Resiliency fix:
	avoid raptor_free_memory(0)

2008-05-05  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_free_gp_data,
	rasqal_free_engine_execution_data): Assert on passed in pointer,
	not on uninitialized variable.

2008-05-01  Dave Beckett <dave@dajobe.org>

	* src/rasqal_decimal.c, src/rasqal_engine.c, src/rasqal_expr.c,
	src/rasqal_general.c, src/rasqal_graph_pattern.c,
	src/rasqal_literal.c, src/rasqal_map.c, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_result_formats.c,
	src/rasqal_rowsource.c, src/rasqal_skiplist.c: Add NULL pointer
	asset checks for destructors

	* src/sparql_lexer.l: Use setjmp/longjmp to handle error recovery

	* src/rdql_lexer.l: Use setjmp/longjmp to handle error recovery

	* src/rdql_parser.y: (rdql_query_error): Return void, it never has
	a status

	* src/rasqal_internal.h: Added asset macros

2008-04-15  Dave Beckett <dave@dajobe.org>

	* RELEASE.html: html

2008-04-14  Dave Beckett <dave@dajobe.org>

	* src/rdql_common.h, src/rdql_parser.y, src/sparql_common.h,
	src/sparql_parser.y: Count errors in SPARQL and RDQL syntax
	parsing and do not report errors after the first one.  A
	workaround instead of adding full bison error parser recovery.

2008-04-14  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c: (rasqal_literal_as_node): Resiliency fix:
	Check for NULL literal.

2008-04-09  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c: (rasqal_literal_as_node): Turn variables
	pointing to non-string literals into string literals. Fixes
	"Triple with unknown object skipped" errors in graph queries like
	SPARQL CONSTRUCT.

2008-03-29  Dave Beckett <dave@dajobe.org>

	* utils/srxread.c: Update for rasqal_new_query_results_formatter
	world param.

2008-02-25  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_general.c, src/rasqal_query.c: Ported rasqal to
	r13695 raptor error handler changes.

2008-02-24  Lauri Aalto <laalto@iki.fi>

	* 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 rasqal_config.h.

2008-02-16  Dave Beckett <dave@dajobe.org>

	* autogen.sh, autogen.sh, autogen.sh, autogen.sh, autogen.sh:
	autogen checks when env prog version is empty. Update all packages
	to latest autogen.sh

2008-02-12  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_rowsource_engine_finish):
	Low-memory leak fix. Ensure map is always freed.

2008-02-07  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_engine_execute_and_save): Set
	finished flag if returning finished status. Another fix to prevent
	reaching the r13516 FIXME HACK abort() branch in
	rasqal_engine_excute_next_lazy() in low-memory situations.

	* src/rasqal_engine.c: (rasqal_rowsource_engine_process): Removed
	unreachable conditional code.

	* src/rasqal_engine.c: (rasqal_engine_execute_and_save): Set query
	results to finished state if results_sequence is NULL. Prevents
	reaching the r13516 FIXME HACK abort() branch in
	rasqal_engine_excute_next_lazy() on low-memory situations.

2008-02-02  Dave Beckett <dave@dajobe.org>

	* src/rasqal_sparql_xml.c:
	(rasqal_query_results_get_rowsource_sparql_xml):
	Use updated SVN raptor_error_handlers_init call.

2008-01-29  Lauri Aalto <laalto@iki.fi>

	* src/Makefile.am: Fixed configuration error: build rasqal getopt
	if GETOPT is true, not vice versa. Fixes sparql_parser_test in
	some environments where getopt.h declares optind/optarg
	differently from rasqal_getopt. E.g. on cygwin getopt.h has
	__declspec(dllimport) declarations.

2008-01-28  Lauri Aalto <laalto@iki.fi>

	* src/sparql_parser.y: sparql_parser_test: Fixed crash from
	calling rasqal_free_world() with an uninitialized world.

2008-01-20  Dave Beckett <dave@dajobe.org>

	* docs/Makefile.am, tests/rdql/testsuite/Makefile.am,
	tests/sparql/Expr1/Makefile.am, tests/sparql/Expr2/Makefile.am,
	tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprEquals/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am,
	tests/sparql/SyntaxFull/Makefile.am,
	tests/sparql/ValueTesting/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/examples/Makefile.am,
	tests/sparql/part1/Makefile.am, tests/sparql/regex/Makefile.am,
	tests/sparql/simple/Makefile.am, tests/sparql/sort/Makefile.am,
	tests/sparql/survey/Makefile.am, tests/sparql/syntax/Makefile.am,
	utils/Makefile.am: Replace bare perl with $(PERL)

	* src/Makefile.am: Make sparql_parser_test work when getopt isn't around

	* tests/engine/rasqal_order_test.c: Back to Unix line endings

	* configure.ac, src/rasqal_decimal.c: Added test for gmp_version

	* configure.ac: Use gmp.h in mpfr.h check just to prevent
	configure warning, not to ever use it

	* configure.ac, docs/tmpl/rasqal-unused.sgml,
	docs/tmpl/section-general.sgml,
	docs/tmpl/section-graph_pattern.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-query.sgml,
	docs/tmpl/section-query_results_formatter.sgml,
	docs/tmpl/section-triples_source.sgml: Make MPFR test check for
	functions in mpfr that are not in ancient gmp version of mpfr

2008-01-15  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_engine_bind_construct_variables):
	Create copies of variable values to prevent literal double
	deletion.

	* src/rasqal_query_results.c: (rasqal_new_query_results):
	Explicitly set bindings results type for select queries. Worked
	previously because RASQAL_QUERY_RESULTS_BINDINGS == 0.
	(rasqal_query_results_set_variables): Removed commented out code.

	* src/rasqal_internal.h: Removed rdf uri extern references - uris
	moved to rasqal_world.

2008-01-14  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c: (rasqal_prefix_id) Moved from
	rasqal_query.c to rasqal_query_results.c static function. Do not
	free passed in string.
	(rasqal_query_results_get_triple) Do not change nodeids of
	existing blanks but create new blanks for new prefixed
	nodeids.
	Fixes Issue http://bugs.librdf.org/mantis/view.php?id=242
	Do not leak stored query_result->triples.

	* configure.ac: Applied rasqal_strcasecmp configuration patch from
	http://bugs.librdf.org/mantis/view.php?id=249

	* src/rasqal_literal.c: (rasqal_literal_as_node): Refactored to
	simpler form. rasqal_new_literal_from_literal(NULL) returns NULL
	since r12808.

	* autogen.sh: Do not branch autogen.sh scripts but keep them
	identical

2008-01-13  Dave Beckett <dave@dajobe.org>

	* autogen.sh: automake 1.0 docs

2008-01-13  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_rowsource_engine_ensure_variables):
	Update rowsource size properly for construct queries.

2008-01-11  Lauri Aalto <laalto@iki.fi>

	* src/rasqal.h, src/rasqal_query.c: (rasqal_query_add_prefix):
	Changed to return an error code. API function signature touched
	but source compatibility not broken.

	* src/rasqal.h, src/rasqal_query.c: (rasqal_query_add_variable):
	Changed to return an error code. API function signature touched
	but source compatibility not broken.

	* src/rasqal.h,
	(rasqal_graph_pattern_add_sub_graph_pattern): Changed to return an
	error code. API function signature touched but source
	compatibility not broken.

2008-01-10  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_general.c, src/rasqal_internal.h: (rasqal_world_s)
	Removed usage field. No longer needed.

	* src/rasqal.h, src/rasqal_literal.c: API break: Removed
	rasqal_new_floating_literal()

	* src/rasqal_internal.h,
	src/rasqal_literal.c (rasqal_new_numeric_literal): Changed
	function param ordering to be consistent with
	e.g. rasqal_new_integer_literal().

	* src/rasqal.h, src/rasqal_engine.c, src/rasqal_general.c,
	src/rasqal_internal.h, src/rasqal_limit_test.c,
	src/rasqal_query.c, src/rasqal_query_results.c,
	src/rasqal_query_test.c, src/rasqal_raptor.c,
	src/rasqal_redland.c, src/rasqal_result_formats.c,
	src/rdql_parser.y, src/sparql_parser.y,
	tests/engine/rasqal_graph_test.c,
	tests/engine/rasqal_order_test.c, utils/roqet.c: API break:
	Removed rasqal api functions deprecated in the recent
	re-engineering efforts. Renamed new *2 functions to original names
	that now take in a rasqal_world pointer.

	* src/rdql_lexer.l, src/sparql_lexer.l: Fixed lexer tests -
	initialize query->world needed by rasqal_literal constructors

	* src/rasqal_expr.c, src/rasqal_internal.h, src/rasqal_literal.c,
	src/rasqal_query.c, src/rasqal_xsd_datatypes.c,
	src/sparql_parser.y: Moved xsd namespace uri and datatype uris to
	rasqal_world.
	(rasqal_xsd_datatype_uri_to_type, rasqal_xsd_datatype_type_to_uri,
	rasqal_xsd_is_datatype_uri, rasqal_xsd_datatype_uri_parent_type):
	Functions now take in a rasqal_world pointer.

	* utils/srxread.c: Updated srxread to new
	rasqal_query_results_formatter_read() API

	* src/rasqal.h, src/rasqal_engine.c, src/rasqal_redland.c: Updated
	rasqal_redland to new rasqal_literal API. Store rasqal_world
	pointer to rasqal_triples_match structure.  Compiles but not
	tested.

	* src/rasqal.h, src/rasqal_expr.c, src/rasqal_internal.h,
	src/rasqal_literal.c, src/rasqal_query_results.c,
	src/rasqal_raptor.c, src/rasqal_result_formats.c,
	src/rasqal_sparql_xml.c, src/rdql_lexer.l, src/rdql_parser.y,
	src/sparql_lexer.l, src/sparql_parser.y: Added rasqal_world
	pointer to rasqal_literal.
	(rasqal_new_*_literal, rasqal_new_decimal_literal_from_decimal):
	API break. rasqal_literal constructors take in rasqal_world
	pointer.
	(rasqal_new_floating_literal): Old deprecated function changed to
	return NULL.
	(rasqal_new_string_literal_node): Now takes in a rasqal_world*
	param.
	(rasqal_query_results_get_rowsource_func): Now takes in a
	rasqal_world* param.
	(rasqal_query_results_formatter_read): API break. Takes in
	rasqal_world pointer. Passed to get_rowsource function.
	(rasqal_query_results_get_rowsource_sparql_xml): Store
	rasqal_world* in rowsource context for creating new literals.

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_datatype_check): Fixed
	compiler warning about signed-unsigned comparison

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_init,
	rasqal_xsd_datatype_check, rasqal_xsd_datatype_label): Use
	compile-time initialization for xsd datatype names and check
	functions. Prepare for moving xsd uris to rasqal_world.

	* src/rasqal_expr.c: Fixed xsd init/finish in rasqal_expr tests.

2008-01-09  Lauri Aalto <laalto@iki.fi>

	* src/rasqal.h, src/rasqal_general.c, src/rasqal_result_formats.c:
	const function params make no sense - they will be copies
	anyway (pointer-to-const params would make sense)

	* src/rasqal_general.c, src/rasqal_internal.h,
	src/rasqal_xsd_datatypes.c: (rasqal_xsd_init, rasqal_xsd_finish):
	Add world param. Not used yet.

	* src/rasqal.h, src/rasqal_engine.c, src/rasqal_general.c,
	src/rasqal_internal.h, src/rasqal_raptor.c, src/rasqal_redland.c:
	Moved triples_source_factory to rasqal_world.
	(rasqal_set_triples_source_factory): Deprecated API
	function. Replaced with rasqal_set_triples_source_factory2() that
	takes in a world parameter.
	(rasqal_raptor_init, rasqal_redland_init): Now take a world param
	and use rasqal_set_triples_source_factory2().

	* src/rasqal_internal.h: (rasqal_log_error_varargs): Declare with
	printf format attribute. Fixes gcc warnings.

	* src/rasqal_decimal.c: Fixed compiler warning in rasqal_decimal
	test code with RASQAL_DECIMAL_NONE configuration.

	* utils/roqet.c: Update roqet to non-deprecated API.

	* src/rasqal.h, src/rasqal_general.c, src/rasqal_internal.h,
	src/rasqal_query_results.c, src/rasqal_result_formats.c,
	src/rasqal_sparql_xml.c: Moved static query_results_formats
	sequence to rasqal_world.
	(rasqal_query_results_formats_enumerate,
	rasqal_query_results_formats_check,
	rasqal_new_query_results_formatter,
	rasqal_new_query_results_formatter_by_mime_type): Deprecated API
	functions. Replaced with corresponding *2 versions that take in a
	rasqal_world pointer.
	(rasqal_query_results_format_register_factory): Take in
	rasqal_world param. Return an error code. Use calloc not malloc
	for structs. Replace RASQAL_FATAL with fatal log message + return
	error code.
	(rasqal_init_result_formats): Take in a rasqal_world param. Check
	and return error codes from
	rasqal_query_results_format_register_factory() calls.
	(rasqal_init_result_format_sparql_xml): Take in a rasqal_world
	param, return an error code. Check and return error codes from
	rasqal_query_results_format_register_factory() calls.
	(rasqal_finish_result_formats): Take in a rasqal_world param.
	(rasqal_query_results_read, rasqal_query_results_write): Use
	non-deprecated API.

	* src/rasqal_graph_pattern.c, src/rasqal_query.c,
	src/rasqal_result_formats.c: Added FIXME notes to places where
	RASQAL_FATAL macros are used for handling runtime failures and not
	programming errors. Should change the code to handle runtime
	failures more gracefully.

	* src/rasqal_general.c, src/rasqal_internal.h, src/rdql_parser.y,
	src/sparql_parser.y: (rasqal_query_engine_register_factory):
	Changed function to return an int error code. On OOM, log an error
	and return an error code, do not die with a fatal error.
	(rasqal_init_query_engine_*): Return error code from
	rasqal_query_engine_register_factory().

	* src/rasqal_general.c, src/rasqal_internal.h,
	src/rasqal_query_results.c, src/rasqal_raptor.c,
	src/rasqal_redland.c, src/rasqal_result_formats.c,
	src/rdql_parser.y, src/sparql_parser.y: Changed rasqal internal
	init functions to return an int error code.
	(rasqal_new_world): Check for init function failures and return
	NULL on failure.
	(rasqal_init): Check for NULL world.

	* src/rasqal_internal.h: (rasqal_world_s) comments

	* src/rasqal_general.c, src/rasqal_internal.h: Eliminated
	rasqal_initialised, rasqal_initialising, rasqal_finishing
	statics. Provide protection against recursive rasqal_init() calls
	by making the static world object a reference-counted singleton.

	* src/rasqal_expr.c, src/rasqal_general.c, src/rasqal_internal.h,
	src/sparql_parser.y: Moved rdf uris to rasqal_world.
	(rasqal_uri_init): Take in world parameter, return an error code.
	(rasqal_uri_finish): Take in world parameter.
	(rasqal_new_world): Check rasqal_uri_init() return value.

2008-01-08  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr.c: (rasqal_expression_evaluate_strmatch): Fix
	error/warning messages in RASQAL_REGEX_{PCRE,NONE} configurations.

2008-01-07  Dave Beckett <dave@dajobe.org>

	* src/rdql_parser.y, src/sparql_parser.y: rdql and sparql warnings
	do not fail the query

	* src/rasqal_engine.c, src/rasqal_expr.c, src/rasqal_general.c,
	src/rasqal_result_formats.c, src/rasqal_sparql_xml.c,
	src/rdql_parser.y, src/sparql_parser.y: Set query failed flag when
	calling new log error functions

	* src/rdql_parser.y, src/sparql_parser.y: (rdql_query_error,
	sparql_query_error): Set failed flag on query

	* src/rasqal_general.c: (rasqal_new_world): Init error handlers
	magic here

	* src/rasqal_query.c: (rasqal_new_query2): Set query->world

	* src/rasqal_engine.c, src/rasqal_expr.c, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_raptor.c,
	src/rasqal_result_formats.c, src/rasqal_sparql_xml.c,
	src/rdql_lexer.l, src/rdql_parser.y, src/sparql_lexer.l,
	src/sparql_parser.y: Replace calls to
	rasqal_query_warning/error/fatal using rasqal_query with
	rasqal_log_error_simple or rasqal_log_error_varargs and
	rasqal_world

	* src/rasqal_internal.h: Fix RASQAL_PRINTF_FORMAT use for
	rasqal_log_error_simple

	* src/rasqal_general.c: (rasqal_log_error_simple,
	rasqal_log_error_varargs, rasqal_log_error): Added, using error
	handlers inside rasqal_world*
	(rasqal_query_simple_error): Added for query errors from
	namespaces API.
	(rasqal_query_fatal_error, rasqal_query_fatal_error_varargs,
	rasqal_query_error, rasqal_query_simple_error,
	rasqal_query_error_varargs, rasqal_query_warning,
	rasqal_query_warning_varargs): Removed.

	* src/rasqal_internal.h: rasqal_query gains a rasqal_world field
	and loses fatal/error/warning user data and handlers.
	Added methods of rasqal_world: rasqal_log_error_simple,
	rasqal_log_error_varargs, rasqal_log_error,
	rasqal_query_simple_error.
	Removed rasqal_query_fatal_error,
	rasqal_query_fatal_error_varargs, rasqal_query_error,
	rasqal_query_simple_error, rasqal_query_error_varargs,
	rasqal_query_warning, rasqal_query_warning_varargs.
	rasqal_world gains error_handlers field.

	* src/rasqal_general.c, src/rasqal_query.c, src/rdql_parser.y,
	src/sparql_parser.y: (sparql_parse, rdql_parse,
	rasqal_query_execute): Remove calls to unused query factory method
	execute.  (rasqal_sparql_query_engine_execute,
	rasqal_rdql_query_engine_execute): Removed

2008-01-07  Lauri Aalto <laalto@iki.fi>

	* tests/engine/rasqal_graph_test.c: Fixed eol style in
	rasqal_graph_test.c
	
2008-01-07  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h: struct rasqal_query_engine_factory_s
	remove execute() factory method

2008-01-07  Lauri Aalto <laalto@iki.fi>

	* utils/roqet.c, utils/srxread.c: Update utils to non-deprecated APIs.

	* src/rasqal_limit_test.c, src/rasqal_query_test.c,
	src/rasqal_xsd_datatypes.c, src/rdql_lexer.l, src/rdql_parser.y,
	src/sparql_lexer.l, src/sparql_parser.y,
	tests/engine/rasqal_graph_test.c,
	tests/engine/rasqal_order_test.c: Update tests to non-deprecated
	APIs.

	* src/rasqal.h, src/rasqal_general.c, src/rasqal_internal.h,
	src/rasqal_query.c, src/rdql_parser.y, src/sparql_parser.y: First
	increment on moving rasqal static data to behind a world object
	like librdf: move query_engines to rasqal_world.  Preserve old
	library API but deprecate functions where a world object would be
	needed and provide a new function. Deprecated functions provide
	backwards compatibility with a static rasqal_world variable that
	can be flagged out at compile time with NO_STATIC_DATA.
	(rasqal_init, rasqal_finish): Deprecated, use rasqal_new_world()
	and rasqal_free_world().
	(rasqal_languages_enumerate, rasqal_language_name_check,
	rasqal_new_query): Deprecated, use the the *2 versions with a
	world object instead.
	(rasqal_init_query_engine_*, rasqal_query_engine_register_factory,
	rasqal_get_query_engine_factory): Internal functions to take in
	rasqal_world parameter.

	* src/rasqal_engine.c,
	src/rasqal_rowsource.c: (rasqal_engine_make_rowsource,
	rasqal_new_rowsource_from_handler): Re-engineer fix from
	r13534. Make rasqal_new_rowsource_from_handler() to take ownership
	of the passed in context in all cases. Set rowsource->user_data
	and rowsource->handler earlier as they are needed by
	rasqal_free_rowsource().

	* src/rasqal_engine.c: (rasqal_engine_make_rowsource): Lowmem leak
	fix. Free rasqal_rowsource_engine_context if
	rasqal_new_rowsource_from_handler() fails.

	* src/rasqal_query_results.c:
	(rasqal_query_results_set_variables(rasqal_query_results): Set
	query_results->size late to ensure it is not larger than the
	number of valid pointers in the arrays. Use calloc and not malloc
	for pointer arrays.

	* src/rasqal_query_results.c: (rasqal_query_results_set_variables):
	Fix low-memory crashes by keeping query_results variables and
	variable_names in sync with results size.

	* src/rasqal_query_results.c: (rasqal_query_results_set_variables):
	Do not leak old variables_sequence.

	* src/rasqal_query.c: (rasqal_query_execute): Cleaned up commented
	out code.

2008-01-05  Dave Beckett <dave@dajobe.org>

	* src/rasqal_result_formats.c:
	(rasqal_query_results_formatter_read): error path

	* src/rasqal_rowsource.c: code style

	* src/rasqal_sparql_xml.c: Code style

	* src/rasqal_general.c: 2008

	* src/rasqal_query_results.c: (rasqal_free_query_results): Free
	variables_sequence 

	* src/rasqal_sparql_xml.c: (rasqal_rowsource_sparql_xml_finish):
	Free any base_uri given.

	* Last known good revision 13398: 'make check' succeeds.

2008-01-05  Dave Beckett <dave@dajobe.org>

	* src/Makefile.am, src/rasqal_result_format_sparql_xml.c,
	src/rasqal_sparql_xml.c: Filename too long. mv
	rasqal_result_format_sparql_xml.c rasqal_sparql_xml.c

	* src/rasqal_engine.c: (rasqal_engine_query_result_row_update):
	Pass in results, it's not a field of row anymore.
	(rasqal_engine_query_result_row_compare): Use
	rasqal_rowsource_get_query to get query from a row's rowsource.
	Added rowsource for execute and save method with context
	rasqal_rowsource_engine_context
	(rasqal_rowsource_engine_init, rasqal_rowsource_engine_finish,
	rasqal_rowsource_engine_ensure_variables,
	rasqal_rowsource_engine_read_row,
	rasqal_rowsource_engine_read_all_rows,
	rasqal_rowsource_engine_get_query): Added as rowsource handlers
	for execute and save method.
	(rasqal_rowsource_engine_process): Added as helper for above.
	(rasqal_engine_make_rowsource): Added to construct the rowsource
	for the execute and save method
	(rasqal_engine_execute_and_save): Cut down into all the rowsource
	functions above.  The rowsource is made here and destroyed here.
	(rasqal_engine_excute_next_lazy): Call
	rasqal_new_query_result_row() wrongly with NULL in order to just
	get it compiling.  Added an abort() to ensure nobody ever calls
	this.  Since lazy execution is disabled for now, this should not
	happen.  Added FIXME note.

	* src/rasqal_result_format_sparql_xml.c: Rename internal
	functions/structs from *xml_result4* to *sparql_xml*
	rasqal_rowsource_sparql_xml_context gains rowsource and
	variables_count fields, loses results and variables_sequence.
	(rasqal_sparql_xml_sax2_start_element_handler): Remove
	variables_sequence code.  Use rasqal_rowsource_add_variable to add
	a variable.  Use rasqal_rowsource_get_variable_offset_by_name to
	lookup variable names.
	(rasqal_sparql_xml_sax2_end_element_handler): Initialise
	variables_count and indicate header is done at end of 'head'
	element.
	(rasqal_rowsource_sparql_xml_init): Init rowsource.
	(rasqal_rowsource_sparql_xml_finish): Delete variables_sequence
	free.
	(rasqal_rowsource_sparql_xml_process): Added, pulled from old
	rasqal_rowsource_xml_result4_read_row to update needed data.
	(rasqal_rowsource_sparql_xml_ensure_variables): Added to ensure
	variables are found via rasqal_rowsource_sparql_xml_process.
	(rasqal_rowsource_sparql_xml_read_row): Use
	rasqal_rowsource_sparql_xml_process to get rows.

	* src/rasqal_query_results.c: (rasqal_new_query_results): Update
	rasqal_query_results_set_variables call with 0 order_size.
	(rasqal_free_query_results): Free rowsource with
	rasqal_free_rowsource.
	(rasqal_new_query_result_row): Take rowsource arg and delegate all
	size stuff to rowsource.  Use rasqal_rowsource_get_sizes to get
	the sizes.
	(rasqal_query_results_set_variables): Add order_size arg.  Do a
	true copy of the incoming variables.
	(rasqal_query_result_row_print): Use rowsource to get row info.

	* src/rasqal_query.c: (rasqal_query_execute): Remove old commented
	out hack and use rasqal_query_results_set_variables with
	order_size.

	* src/rasqal_internal.h: rasqal_query_row gains rowsource field
	replacing results.
	rasqal_query_results gains rowsource field.
	rasqal_rowsource_ensure_variables_func renamed from
	rasqal_rowsource_update_variables_func and no longer takes results
	arg.
	Added handlers rasqal_rowsource_read_all_rows_func and
	rasqal_rowsource_get_query_func
	rasqal_rowsource_handler gains handlers for read_all_rows and
	get_query. update_variables handler is renamed ensure_variables.
	Moved struct rasqal_rowsource_s from rasqal_rowsource.c to here.
	Updated rasqal_new_rowsource_from_handler to take flag arg and
	defined one flag RASQAL_ROWSOURCE_FLAGS_ORDERING.
	Added prototypes for rasqal_rowsource_read_all_rows,
	rasqal_rowsource_get_query, rasqal_rowsource_add_variable,
	rasqal_rowsource_get_sizes, rasqal_rowsource_get_variable_by_offset and
	rasqal_rowsource_get_variable_offset_by_name
	Adjust rasqal_new_query_result_row prototype to now take a rowsource arg
	Adjust rasqal_query_results_set_variables to now take an order_size
	arg too.

	* src/rasqal_rowsource.c: Moved struct rasqal_rowsource_s back
	into rasqal_internal.h
	(rasqal_new_rowsource_from_handler): Added flags arg to allow
	maintaining an extra of row of values in a
	rasqal_query_results_row, of size order_size.
	(rasqal_rowsource_add_variable): Added for adding a variable to
	the sequence and maintaining the counts for row width and order
	values row width.
	(rasqal_rowsource_update_variables): Rename to use
	ensure_variables factory name.  Call
	rasqal_query_results_set_variables here.
	(rasqal_rowsource_read_row): field ended is now called finished.
	(rasqal_rowsource_read_all_rows): Added to get a sequence from the
	results either via a factory method, or building it here.
	(rasqal_rowsource_get_query): Added, to return the query
	associated if any.
	(rasqal_rowsource_get_sizes): Added, to return the row width and
	order values row width.
	(rasqal_rowsource_get_variable_by_offset): Added, to return a
	variable in the sequence.
	(rasqal_rowsource_get_variable_offset_by_name): Added to lookup a
	variable by name.

	* src/rasqal_expr.c: (rasqal_new_variable_from_variable): Added.
	(rasqal_new_expression_from_expression): Return NULL if asked to
	copy NULL.

	* src/rasqal.h: Added rasqal_new_variable_from_variable

2008-01-04  Dave Beckett <dave@dajobe.org>

	* src/rasqal_result_formats.c: (rasqal_query_results_formatter_read):
	Call rasqal_rowsource_update_variables with results arg.

	* src/rasqal_internal.h: rasqal_rowsource_update_variables_func
	gains results arg rasqal_rowsource_update_variables gains results
	arg.

	* utils/srxread.c: Removed everything except main code.
	(main): Rewrite in terms of formatter and use
	rasqal_query_results_formatter_read to fill in results.

	* src/rasqal_rowsource.c: (rasqal_new_rowsource_from_handler):
	Check handler not rowsource->handler

	* src/Makefile.am, src/rasqal_internal.h,
	src/rasqal_result_format_sparql_xml.c,
	src/rasqal_result_formats.c: Move SPARQL XML functions from
	rasqal_result_formats.c to rasqal_result_format_sparql_xml.c.  Add
	rasqal_result_format_sparql_xml.c to library

	* utils/srxread.c:: copy src/rasqal_result_format_sparql_xml.c to
	utils/srxread.c

	* src/rasqal_result_format_sparql_xml.c: Move utils/srxread.c to
	src/rasqal_result_format_sparql_xml.c

	* src/rasqal_result_formats.c:
	(rasqal_query_results_format_register_factory): Add get_rowsource
	arg.
	(rasqal_init_result_formats): Init rowsource for sparql xml
	reader, remove reader for same.
	(rasqal_rowsource_xml_result4_init,
	rasqal_rowsource_xml_result4_finish,
	rasqal_rowsource_xml_result4_update_variables,
	rasqal_rowsource_xml_result4_read_row): Skeleton functions added.
	struct rasqal_rowsource_xml_result4_handler added.
	(rasqal_query_results_getrowsource_xml_result4): Added.
	(rasqal_query_results_read_xml_result4): Removed.
	(rasqal_query_results_formatter_read): Use get_rowsource factory
	method if the reader method is missing.

	* src/Makefile.am: Add rasqal_rowsource.c

	* src/rasqal_rowsource.c: Add rasqal_rowsource.c

	* utils/srxread.c: rewrite in style of rowsource handler
	functions.  srxread_userdata becomes
	rasqal_rowsource_xml_result4_context ud becomes con
	(init_ud): Added
	(rasqal_rowsource_xml_result4_read_row): Renamed from get_row_ud
	(rasqal_rowsource_xml_result4_finish): Renamed from free_ud

	* src/rasqal_internal.h: Added rasqal_rowsource typedef and
	handler typedefs: rasqal_rowsource_init_func,
	rasqal_rowsource_finish_func,
	rasqal_rowsource_update_variables_func,
	rasqal_rowsource_read_row_func,.  Added rasqal_rowsource_handler
	typedef.  Added rasqal_new_rowsource_from_handler,
	rasqal_free_rowsource, rasqal_rowsource_update_variables,
	rasqal_rowsource_read_row, rasqal_rowsource_get_rows_count Added
	rasqal_query_results_get_rowsource_func handler for results
	formatter.  rasqal_query_results_format_factory gains
	get_rowsource field.

	* src/rasqal_query_results.c:
	(rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name,
	rasqal_query_results_get_boolean): Remove unused var query

	* utils/srxread.c: Use rasqal_query_result_row_set_value_at

	* src/rasqal_internal.h,
	src/rasqal_query_results.c: (rasqal_query_result_row_set_value_at):
	Added

2008-01-03  Dave Beckett <dave@dajobe.org>

	* utils/srxread.c: Use raptor_qname_get_counted_value

	* utils/srxread.c: Document and re-order ud fields.
	Removed variables_count - can be done by counting sequence.

	* utils/srxread.c: Switch from init/parse/free ud to create/get
	row/free ud
	(create_ud): Renamed from init_ud.  Allocate ud
	(get_row_ud): Renamed from parse_ud: Store rows in temporary array
	during one SAX2 parse / callback sequence and return first one to
	caller.
	(free_ud): Free ud
	(main): Use get_row_ud to get rows and store in results.

	* utils/srxread.c: Set variables as soon as possible - at end of
	head element.  Save rows to internal sequence then move after
	returning from sax2 parse.

	* src/rasqal_internal.h,
	src/rasqal_query_results.c: (rasqal_query_results_add_row): Added

	* utils/srxread.c: (init_ud): returns status, remove sax2 local var
	(parse_ud): remove printf.
	(main): Handle init_ud failure

	* utils/srxread.c: (main): use rasqal_query_results_get_bindings_count

	* utils/srxread.c: pull userdata code from main() into init_ud(),
	parse_ud() and free_ud()

	* utils/srxread.c: Use rasqal_new_string_literal_node to prevent
	formation of native types. Push rows correctly

	* src/rasqal_literal.c: (rasqal_new_string_literal_common): static

	* src/rasqal_engine.c: (rasqal_engine_check_limit_offset,
	rasqal_engine_bind_construct_variables): Handle NULL query

	* src/rasqal_literal.c: (rasqal_new_string_literal_common): Added,
	pulled out of rasqal_new_string_literal with extra flags arg to
	avoid native type promotion.
	(rasqal_new_string_literal): Use rasqal_new_string_literal_common
	with native type promotion
	(rasqal_new_string_literal_node): Added, using
	rasqal_new_string_literal_common without native type promotion.

	* src/rasqal_internal.h: Added rasqal_new_string_literal_node prototype

2008-01-03  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c: (rasqal_query_execute): Commented out unused
	variable.

	* src/rasqal_query_results.c: (rasqal_query_results_get_binding_name):
	Fix low-memory crash: check for NULL variables array. Removed
	unnecessary local variable.

	* src/rasqal_query.c: (rasqal_query_execute): Commented out unused
	& leaked variables_sequence copy.

	* src/rasqal_query_results.c: (rasqal_query_results_set_variables):
	Do not change query_results type -
	rasqal_query_results_set_variables() is called from
	rasqal_query_execute() for all types of queries.

	* src/rasqal_query.c: (rasqal_query_execute): Added FIXME note for
	a memory leak.

	* src/rasqal_query_results.c: (rasqal_free_query_results,
	rasqal_query_results_set_variables): Do not leak
	query_results->variables, query_results->variable_names

	* src/rasqal_query_results.c: (rasqal_free_query_results): Fix
	double deletion - variables_sequence is owned by query not
	query_results.

2008-01-03  Dave Beckett <dave@dajobe.org>

	* utils/srxread.c: Update to set variables with no values and use
	query results formatter to emit results.

	* src/rasqal_query.c: (rasqal_query_execute): Update call to
	rasqal_query_results_set_variables with a new sequence of
	variables, not names.  It shares variables with rasqal_query for
	now - this is a HACK and needs fixing.

	* src/rasqal_query_results.c: (rasqal_new_query_results): Use
	rasqal_query_results_set_variables when setting bindings.
	(rasqal_free_query_results): Free variables_sequence
	(rasqal_query_results_get_count): Handle NULL query
	(rasqal_query_results_get_bindings): No need for query here, get
	variable_names from results.
	(rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_name): Get variables size from
	query_results size.
	(rasqal_query_results_get_binding_value_by_name): Get variables from
	query_results variables[]
	(rasqal_query_results_set_variables): Just get a variables_sequence,
	everything else can be computed from it.
	(rasqal_query_result_row_print): Get variable_names from query_results.

	* src/rasqal_internal.h: struct rasqal_query_results_s  gains
	fields: variables_sequence, variables just like rasqal_query_s

	* src/rasqal_expr.c: (rasqal_new_variable_typed): Work when query
	is NULL.

2008-01-02  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c: (rasqal_new_query_results): Init
	query results type
	(rasqal_query_results_is_bindings,
	rasqal_query_results_is_boolean, rasqal_query_results_is_graph,
	rasqal_query_results_is_syntax): Use query results type.

	* src/rasqal_internal.h: Added rasqal_query_results_type enum
	rasqal_query_results_s gains type field

	* utils/srxread.c: Replace FILE* to with read raptor_iostream

	* utils/srxread.c: Conditional-compile tracing with RASQAL_DEBUG > 2

	* docs/rasqal-sections.txt: remove
	rasqal_query_results_formats_enumerate_full

	* src/rasqal_result_formats.c: compile

	* utils/roqet.c: Update for rasqal_query_results_formats_enumerate
	taking mime_type and flags pointer args.

	* src/rasqal_result_formats.c:
	(rasqal_query_results_format_register_factory): Add reader arg.
	(rasqal_init_result_formats): Register readers, only
	rasqal_query_results_read_xml_result4 for "xml" name.
	(rasqal_query_results_read_xml_result4): Added.
	(rasqal_query_results_formats_enumerate_full): Removed
	(rasqal_query_results_formats_enumerate): Added two args - mime_type
	and flags.  Was rasqal_query_results_formats_enumerate_full with just
	mime_type.  Set flags if pointer is not null.
	(rasqal_query_results_read_xml_result4): Added, doing no work.
	(rasqal_query_results_formatter_write): Added, moved from
	rasqal_query_results.c
	(rasqal_query_results_formatter_read): Added.

	* src/rasqal_query_results.c: (rasqal_query_results_formatter_write):
	Moved to rasqal_result_formats.c
	(rasqal_query_results_read): Added

	* src/rasqal_internal.h: Renamed rasqal_query_results_writer
	typedef to rasqal_query_results_formatter_func
	rasqal_query_results_format_factory gains reader field.

	* src/rasqal.h: Added rasqal_query_results_read.  Removed
	rasqal_query_results_formats_enumerate_full and added two args to
	rasqal_query_results_formats_enumerate: mime_type and flags.
	Added rasqal_query_results_formatter_read

2008-01-02  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c: (rasqal_query_execute) Low-memory fixes. Set
	query_results->executed flag earlier to enable cleanup with
	rasqal_free_query_results(). Check for variable_names sequence
	alloc failure. Pass ownership of variable_names sequence to
	query_results earlier to clean it up with
	rasqal_free_query_results() on error.

	* src/rasqal_query.c: (rasqal_query_execute) Check for var_name
	alloc failures.

2007-12-28  Dave Beckett <dave@dajobe.org>

	* utils/srxread.c: init fh

	* utils/srxread.c: init before arg check

	* utils/srxread.c: Pass variable_names ownership

	* utils/srxread.c: use memset properly

	* src/rasqal_query.c: (rasqal_query_execute): Initialise
	variable_names using rasqal_query_results_set_variables.

	* src/rasqal_engine.c: (rasqal_engine_query_result_row_print):
	Renamed to public rasqal_query_result_row_print.

	* src/rasqal_query_results.c: (rasqal_free_query_results): Free
	variable_names
	(rasqal_query_results_set_variables): set variable_names.
	(rasqal_query_result_row_print): Added - renamed from
	rasqal_engine_query_result_row_print.

	* src/rasqal_internal.h: struct rasqal_query_results_s gains field
	variable_names.
	Added rasqal_query_result_row_print prototype

	* utils/Makefile.am: Remove srxread_CPPFLAGS

	* utils/srxread.c: Use 1.4.17 raptor API

	* configure.ac: Require raptor 1.4.17 for SAX2 API

	* configure.ac, RELEASE.html, NEWS.html, src/win32_rasqal_config.h:
	Bump version to 0.9.16
	Update libtool version to 1:0:0

2007-12-09  Dave Beckett <dave@dajobe.org>

	* utils/Makefile.am, utils/srxread.c: Added test SPARQL XML
	results reader.  Incomplete

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c,
	utils/Makefile.am: (rasqal_new_query_result_row,
	rasqal_new_query_result_row_from_query_result_row,
	rasqal_free_query_result_row): Added based on previously
	engine-specific rasqal_engine_new_query_result_row,
	rasqal_engine_new_query_result_row_from_query_result_row and
	rasqal_engine_free_query_result_row.
	(rasqal_new_query_result_row): No longer does the
	rasqal_engine_query_result_row_update work, so that has to be
	called externally.
	(rasqal_engine_excute_next_lazy): Call
	rasqal_engine_query_result_row_update after
	rasqal_new_query_result_row.
	(rasqal_query_results_set_variables,
	(rasqal_query_results_set_order_conditions): Added.
	(rasqal_query_execute): Call rasqal_query_results_set_variables
	and rasqal_query_results_set_order_conditions.

	* src/rasqal_engine.c: Switch to non-lazy execution

	* src/rasqal_engine.c: Add RASQAL_ENGINE_EVAL_LAZY macro to
	enable/disable lazy evaluation.  Existing code and default is
	enabled.
	(rasqal_engine_check_limit_offset): Limit to 1 result when query
	is an ASK.
	(rasqal_engine_new_query_result_row): Allow non-bindings,
	non-graph queries to enter here, when doing ASK for example.
	(rasqal_engine_execute_and_save): Allow map to be optional if
	need_map is not true.
	(rasqal_engine_execute_run): Use RASQAL_ENGINE_EVAL_LAZY to call
	lazy or save version of execution.

2007-11-29  Lauri Aalto <laalto@iki.fi>

	* src/rasqal.h: Guard against double declaration of
	rasqal_query_results_formatter.

2007-11-26  Dave Beckett <dave@dajobe.org>

	* autogen.sh: Update to handle OSX glibtoolize and optional ltdl

2007-11-19  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr.c: (rasqal_expression_evaluate) Fix memory leak
	in RASQAL_EXPR_LANG.

	* tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprEquals/Makefile.am: Revert r13225 - make check to
	pass with svn HEAD raptor

	* src/rasqal_query.c, src/rasqal_result_formats.c: Reapply r13173
	reverted in r13199 - compile cleanly against svn HEAD raptor.

2007-11-17  Dave Beckett <dave@dajobe.org>

	* Snapshotted rasqal_0_9_15 for 0.9.15 release (SVN 13232)

	* tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprEquals/Makefile.am: Revert test results to match
	builing with raptor 1.4.16

	* src/rasqal_literal.c: (rasqal_new_decimal_literal): Fix after
	doc change

	* docs/rasqal-sections.txt, docs/tmpl/section-unused.sgml: docs

	* docs/tmpl/section-literal.sgml, docs/tmpl/section-unused.sgml,
	docs/tmpl/section-xsd.sgml: docs

	* src/rasqal_datetime.c: docs

	* src/rasqal_literal.c: docs

	* docs/rasqal-sections.txt: update new functions

2007-11-15  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h, src/rasqal_literal.c, src/sparql_lexer.l: Restore
	rasqal_new_decimal_literal back to APi signature from 0.9.14.  Add
	rasqal_new_decimal_literal_from_decimal to build from a
	rasqal_xsd_decimal

2007-11-15  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr.c: (rasqal_expression_as_boolean,
	rasqal_expression_as_integer, rasqal_expression_compare) Removed
	unused functions - eliminates compiler warnings.

2007-11-14  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query.c, src/rasqal_result_formats.c: Revert r13173
	for compiling against raptor 1.4.16 (or earlier)
	raptor_uri_handler

2007-11-14  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_datetime.c: Fix copyright notice - it's all this
	year. Add contributions notice.
	Move tests to main().

2007-11-13  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_raptor.c: indent tabs -> spaces

2007-11-13  Dave Beckett <dave@dajobe.org>

	* configure.ac: Require raptor 1.4.16 for uri compare factory method

	* src/rasqal_literal.c: (rasqal_literal_ebv): Handle decimal zero

	* src/rasqal.h: Added rasqal_xsd_decimal_is_zero prototype

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_is_zero): Added.
	(rasqal_xsd_decimal_divide): Use rasqal_xsd_decimal_is_zero.

	* src/Makefile.am, src/rasqal_datetime.c (from
	/rasqal/trunk/src/rasqal_xsd_datatypes.c:13190),
	src/rasqal_internal.h, src/rasqal_xsd_datatypes.c: Added
	rasqal_datetime.c for XSD dateTime code.  Added
	rasqal_xsd_datetime_check() internal function for checking

	* tests/laqrs/syntax/Makefile.am, tests/laqrs/syntax/insert.rq:
	Added insert.rq

	* docs/tmpl/section-expression.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-unused.sgml:
	docs updates

	* tests/sparql/examples/Makefile.am:
	sparql-query-example-Testing-Values-0 now passes

	* src/rasqal_raptor.c: (rasqal_raptor_bind_match): Use
	rasqal_literal_equals_flags with RASQAL_COMPARE_RDF to compare for
	equality.  Also, this may be cheaper than using
	rsaqal_literal_compare.

	* src/rdql_parser.y: Set RDQL default compare_flags to
	RASQAL_COMPARE_URI

	* src/sparql_parser.y: add missing ;

2007-11-12  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c:
	(rasqal_query_result_literal_sequence_compare): Call
	rasqal_literal_compare with RASQAL_COMPARE_URI

	* src/rasqal_literal.c: (rasqal_literal_compare): Use
	RASQAL_COMPARE_URI to allow comparison of URIs.  It's not allowed
	via the < operator but is ok when using literal with SPARQL ORDER
	BY

	* src/rasqal.h: rasqal_compare_flags add RASQAL_COMPARE_URI

	* tests/sparql/check-sparql: Invoke roqet correctly with named graphs

	* Last known good revision 13179: 'make check' succeeds.

	* src/rasqal_literal.c: (rasqal_literal_equals_flags): For XQUERY
	style, try RDF term equality if numeric promotion fails.
	Add debug messages

2007-11-12  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_internal.h, src/rasqal_xsd_datatypes.c: Pulled
	rasqal_xsd_datatype_info from rasqal_xsd_datatypes.c to
	rasqal_internal.h

	* src/rasqal_query.c, src/rasqal_result_formats.c: Make
	raptor_uri_handlers const.

2007-11-11  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr.c: (rasqal_expression_evaluate): Revert:
	RASQAL_EXPR_NEQ return type errors again.

	* src/rasqal_internal.h: Update rasqal_literal_string_to_native
	prototype

	* src/rasqal_literal.c: (rasqal_literal_string_to_native): Add
	flags arg to use to pass on to rasqal_xsd_datatype_check.
	(rasqal_new_string_literal): Call rasqal_literal_string_to_native
	with flags=1 so that a literal with a bad lexical form is kept but
	never converted to native type.
	(rasqal_literal_expand_qname): Call
	rasqal_literal_string_to_native with flags=0 for original check.

	* src/rasqal_expr.c: (rasqal_expression_evaluate): RASQAL_EXPR_NEQ
	type errors are not equal.

2007-11-07  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_general.c: (rasqal_uri_init) Check for oom.
	(rasqal_uri_finish) Do not leave dangling pointers.

2007-11-06  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_feature.c: fix eol style

	* src/rasqal.h: Allow RASQAL_API to be externally defined e.g. in
	a static config.h. Remove __SYMBIAN32__ case.

	* src/rasqal_internal.h: Allow flagging out writable static data
	in RASQAL_DEPRECATED macros with NO_STATIC_DATA.

	* src/rasqal_expr.c, src/rasqal_feature.c,
	src/rasqal_graph_pattern.c, src/rasqal_literal.c,
	src/rasqal_query.c, src/rasqal_xsd_datatypes.c: Remove writable
	static data. Make const arrays const.

2007-10-31  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr.c: (rasqal_expression_evaluate) Avoid
	division-by-zero exceptions in RASQAL_EXPR_REM.

	* src/rasqal_expr.c: (rasqal_expression_evaluate) Ensure NULL
	result and no leaks on error.

	* src/rasqal_expr.c: (rasqal_expression_evaluate) Do not leak
	literal args in DATATYPE expressions.

2007-10-30  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_graph_pattern.c, src/rasqal_query.c: Move
	rasqal_graph_pattern_* functions from rasqal_query.c to
	rasqal_graph_pattern.c

	* src/rdql_lexer.l: Lowmem leak fixes. Merged experimental lexer
	leak prevention code from sparql_lexer r12922.
	Flagged with LEXER_ALLOC_TRACKING, disabled by default.

2007-10-29  Dave Beckett <dave@dajobe.org>

	* tests/sparql/ExprEquals/Makefile.am: "Equality - 2 var - test
	equals" now passes

	* tests/sparql/ExprBuiltins/Makefile.am: str-2 now passes

	* src/rasqal_literal.c: (rasqal_literal_get_rdf_term_type): Not
	static and use parent type to handle XSD numeric sub-types.

	* src/rasqal_internal.h: Add rasqal_literal_get_rdf_term_type

	* src/rasqal_expr.c: (rasqal_expression_evaluate):
	RASQAL_EXPR_LANG and RASQAL_EXPR_DATATYPE: Handle only for RDF
	Term literals including INTEGER etc using
	rasqal_literal_get_rdf_term_type() RASQAL_EXPR_ISLITERAL: Use
	rasqal_literal_get_rdf_term_type() to check for
	literal type.

2007-10-29  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c: (rasqal_literal_set_typed_value) Don't
	need to copy literal string if no new string passed in.

 	* src/rasqal_literal.c: (rasqal_new_typed_literal) Ensure type is
	set before calling rasqal_free_literal().
	(rasqal_literal_set_typed_value) Do not free strings that are not
	owned.

	* src/rasqal_literal.c: (rasqal_literal_set_typed_value) Do not
	leak string

	* src/rasqal_literal.c: (rasqal_new_decimal_literal) Return NULL
	if rasqal_xsd_datatype_type_to_uri() fails.

	* src/rasqal_literal.c: (rasqal_literal_set_typed_value) Fix
	leaking datatype uris

	* src/rasqal_literal.c: (rasqal_new_decimal_literal) Make a copy
	of datatype uri.

	* src/rasqal_literal.c: (rasqal_new_typed_literal) Do not return
	stale pointers.

2007-10-28  Dave Beckett <dave@dajobe.org>

	* tests/rdql/testsuite/check-rdql: Remove xsd:string mutation

	* src/rasqal_literal.c: (rasqal_literal_string_to_native): Remove
	removal of xsd:string datatype.
	(rasqal_literal_string_equals): Make "xx" and "xx"^^xsd:string
	compare equal here.

	* tests/sparql/ExprEquals/Makefile.am: "Equality 1-1 -- graph" and
	"Equality 1-2 -- graph" now fail

	* tests/sparql/ValueTesting/Makefile.am: extendedType-ne-fail
	extendedType-literal-ne now pass

	* src/rasqal_literal.c: (rasqal_literal_string_to_native): Turn
	"xx"^^xsd:string into "xx"
	(rasqal_literal_string_equals): Added, pulled out of
	rasqal_literal_equals_flags.
	(rasqal_literal_equals_flags): Update SPARQL checks - do
	promotions only for sparql.  Give type error if have incompatible
	types. Mov RASQAL_LITERAL_PATTERN and RASQAL_LITERAL_QNAME into
	error case; these should never be compared.

	* src/rasqal_expr.c: (rasqal_expression_evaluate): Use
	rasqal_literal_equals_flags for RASQAL_EXPR_EQ and
	RASQAL_EXPR_NEQ. Implement RASQAL_EXPR_SAMETERM with
	rasqal_literal_equals_flags too.

	* src/rdql_lexer.l: Double constant preserves the string using
	rasqal_new_typed_literal

	* tests/rdql/testsuite/check-rdql: (toDebug): Turn
	"xx"^^xsd:string into "xx" Unidiffs

	* tests/rdql/testsuite/Makefile.am: Failing tests now 1-09 B-17

	* src/rasqal_raptor.c: (rasqal_raptor_triple_match): Match RDF
	terms with rasqal_literal_equals_flags and RASQAL_COMPARE_RDF.

2007-10-28  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr.c: (rasqal_expression_evaluate) double var no
	longer needed after unary minus changes in r13091

2007-10-28  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c: (rasqal_query_result_literal_sequence_compare):
	Revert: use query compare flags since that is based on the 'A < B'
	operator which is value comparison.

	* src/rasqal_engine.c: (rasqal_query_result_literal_sequence_compare):
	Compare as RDF Terms always.
	(rasqal_query_result_literal_sequence_equals): Equality as RDF
	Terms always.

	* src/rasqal_literal.c: (rasqal_literal_get_rdf_term_type): Added.
	(rasqal_literal_compare): Do not always promote - saves copying
	objects. Add RASQAL_COMPARE_RDF to compare as RDF terms.
	(rasqal_literal_equals_flags): Add RASQAL_COMPARE_RDF to check for
	equality as RDF terms.  Uses rasqal_literal_get_rdf_term_type()
	Add a quick check for string compares - not equal if lengths are
	different.

	* src/rasqal.h: Added rasqal_compare_flags enum RASQAL_COMPARE_RDF
	for comparing as RDF terms.

2007-10-28  Lauri Aalto <laalto@iki.fi>

	* tests/rdql/testsuite/Makefile.am,
	tests/sparql/ExprBuiltins/Makefile.am: RDQL B-07 B-20 tests now
	pass. SPARQL str-1 test now passes.

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_negate) Fix
	RASQAL_DECIMAL_GMP negation.

2007-10-27  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c: (rasqal_literal_as_node): Copy NUL when
	stringifying.

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_format_double): Correct len

	* src/rasqal_literal.c: (rasqal_literal_set_typed_value): Do not
	try to canonicalize DOUBLE values.

	* src/rasqal_literal.c: (rasqal_literal_set_typed_value): Set
	string len for dateTime
	(rasqal_literal_as_node): strncpy

	* src/sparql_lexer.l: Use rasqal_xsd_datatype_check to check for
	decimal and double syntax rather than scanf.

	* src/rasqal_literal.c: (rasqal_new_literal_from_promotion): less
	debug output

	* Last known good revision 13092: 'make check' succeeds.

	* src/rasqal_literal.c: (rasqal_literal_negate): Init type

	* src/rasqal_expr.c: (rasqal_expression_evaluate): For
	RASQAL_EXPR_UMINUS use rasqal_literal_negate

	* src/rasqal_internal.h: Added rasqal_literal_negate prototype

	* src/rasqal_literal.c: (rasqal_literal_add,
	rasqal_literal_subtract, rasqal_literal_multiply,
	rasqal_literal_divide): Promote to get to decimals for evaluation.
	(rasqal_literal_negate): Added.

	* src/rasqal.h: Added rasqal_xsd_decimal_negate

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_negate): Added

	* src/rasqal_literal.c: (rasqal_new_decimal_literal): Set literal type

	* src/rasqal_literal.c: (rasqal_literal_string_to_native): Do not
	call rasqal_free_literal here.

	* src/rasqal_literal.c: (rasqal_literal_add,
	rasqal_literal_subtract, rasqal_literal_multiply,
	rasqal_literal_divide): Do calculations as integer, double or
	decimal.

	* src/rasqal_literal.c: (rasqal_new_decimal_literal): Add decimal
	arg to construct a new decimal literal based on a string or XSD
	Decimal.

	* src/sparql_lexer.l: Update rasqal_new_decimal_literal call

	* src/rasqal.h: rasqal_new_decimal_literal takes string / decimal.

	* src/rasqal_literal.c: (rasqal_literal_set_typed_value): Allow
	string to be NULL to use existing literal string.
	(rasqal_literal_string_to_native): Use NULL above

	* src/rasqal_literal.c: Everwhere: only write to *error if error
	is not NULL.
	(rasqal_literal_set_typed_value): Free any existing string before
	overwriting.

	* src/rasqal_literal.c: (rasqal_literal_set_typed_value): Copy NULL

	* src/rasqal_literal.c: Fix casts

	* src/sparql_lexer.l: Use rasqal_new_typed_literal for integer.

	* src/rasqal_literal.c: (rasqal_literal_set_typed_value): Added,
	pulled out of rasqal_literal_string_to_native.
	(rasqal_new_typed_literal, rasqal_new_decimal_literal,
	rasqal_literal_string_to_native): Altered to use
	rasqal_literal_set_typed_value removing duplicate code for setting
	decimals.

	* src/rasqal.h: rasqal_new_typed_literal renamed from
	rasqal_new_integer_literal_from_string

	* src/rasqal_engine.c: (rasqal_query_result_literal_sequence_equals):
	Pass on any type errors as not equal.

	* src/rasqal_internal.h: rasqal_literal_equals_flags add error
	pointer arg.

	* src/rasqal_literal.c: (rasqal_literal_equals_flags): Add an
	error pointer arg.

	* docs/tmpl/section-xsd.sgml: XSD Decimals templaet

	* src/rasqal_decimal.c: Autodocs

	* docs/rasqal-sections.txt: Add new functions

	* docs/rasqal-docs.xml: Added section-xsd

2007-10-27  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c: (rasqal_new_integer_literal_from_string)
	Need to have literal usage and type set before calling
	rasqal_free_literal() on failure.

2007-10-27  Dave Beckett <dave@dajobe.org>

	* src/sparql_lexer.l: Use rasqal_new_integer_literal_from_string
	for integer literal. Remove hex literals - they are not allowed in
	SPARQL.

	* src/rasqal.h,
	src/rasqal_literal.c: (rasqal_new_integer_literal_from_string):
	Added to preserve integer literal original lexical form.

	* src/rasqal_internal.h,
	src/rasqal_literal.c: (rasqal_literal_promote_numerics): Renamed
	from rasqal_literal_promote_calculate

2007-10-25  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c: (rasqal_query_prepare_count_graph_patterns)
	Prevent a later lowmem crash caused by graph pattern count and
	graph pattern sequence getting out of sync.

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_as_string) Better
	formatting with RASQAL_DECIMAL_NONE
	(main) Ignore rasqal_decimal_test failures with
	RASQAL_DECIMAL_NONE - insufficient precision with doubles. Test
	for <0, ==0 or >0 when testing rasqal_xsd_decimal_compare(), not
	exact value like -1.

	* src/rasqal_map.c: (rasqal_map_node_add_kv) Return error if
	rasqal_new_map_node() failed

	* src/rasqal_map.c: (rasqal_map_add_kv) Return error if
	rasqal_new_map_node() failed

	* src/rasqal_expr.c: (rasqal_expression_evaluate) Remove memset()
	overhead - init vars when actually needed.

2007-10-24  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr.c: (rasqal_expression_evalate) Fix bug in
	RASQAL_EXPR_OR and refactor RASQAL_EXPR_{AND,OR}.

	* src/rasqal_expr.c: (rasqal_expression_evaluate_strmatch,
	rasqal_expression_evaluate) Init error vars to zero

	* src/rasqal_expr.c: (rasqal_expression_evaluate_strmatch) Pulled
	function from rasqal_expression_evaluate().
	(rasqal_expression_evaluate) Reduce stack consumption of a
	recursive function by about 90% (depending on compiler and
	architecture) - do not allocate separate variables for each switch
	case and pack in unions variables that are not needed
	simultaneously.

	* src/rasqal_literal.c: (rasqal_literal_string_to_native) Lowmem
	leak fix: make sure decimal literal string is not leaked.

	* src/rasqal_literal.c: (rasqal_free_literal) Do not leak decimal
	literal datatype uris.

2007-10-23  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c: (rasqal_literal_print): Write URIs out
	properly escaped Unicode.

2007-10-23  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr.c: (rasqal_expression_evaluate) Check for alloc
	failures

2007-10-22  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c: (rasqal_new_literal_from_promotion) Fix
	rasqal_new_integer_literal() params.
	(rasqal_literal_rdql_promote_calculate) Fix lits array init.

2007-10-22  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: fix curdir

	* tests/sparql/check-sparql: Remove curdir from debug outputs

	* docs/tmpl/section-triple.sgml: Added RASQAL_TRIPLE_GRAPH,
	RASQAL_TRIPLE_SPO and RASQAL_TRIPLE_SPOG

	* docs/tmpl/section-expression.sgml: Added RASQAL_EXPR_SAMETERM

	* src/rasqal_literal.c: (rasqal_literal_compare): Restore d assignment

	* src/rasqal_literal.c: Remove unused double_to_int

	* src/rasqal_literal.c: (rasqal_literal_rdql_promote_calculate):
	Pull out of rasqal_literal_compare
	(rasqal_literal_compare): Use above.

	* Last known good revision 13011: 'make check' succeeds.

	* src/rasqal_literal.c: (rasqal_literal_compare): Fix xquery
	compare ordering when types are different and cannot promote.

	* src/rasqal_literal.c: (rasqal_literal_compare): Fix float/double
	compare.

	* src/rasqal_literal.c: (rasqal_literal_compare): Fix float/double
	compare with fabs

	* src/rasqal_literal.c: (rasqal_literal_compare): Return type
	error if rasqal_new_literal_from_promotion fails

	* src/rasqal_literal.c: (rasqal_new_literal_from_promotion):
	Handle rasqal_new_literal_from_promotion failing.

	* src/rasqal_literal.c: death in debug message

	* src/rasqal_literal.c: casts for warnings

	* src/rasqal_literal.c: (rasqal_new_literal_from_promotion): Do
	not assume l->string is set.

	* src/rasqal_literal.c: (rasqal_new_literal_from_promotion): Allow
	nop promotion

	* src/rasqal_literal.c: (rasqal_literal_compare): Fix error from
	string compare.

	* src/rasqal_literal.c: docs
	(rasqal_literal_compare): Fix uri compare.

	* src/rasqal_literal.c: (rasqal_literal_string_compare): Added,
	pulled out of rasqal_literal_compare.
	(rasqal_literal_compare): Call above.

	* src/rasqal_literal.c: (rasqal_new_literal_from_promotion): Call
	rasqal_new_string_literal with copy of string which is an input
	parameter.

	* src/rasqal_literal.c: (rasqal_new_literal_from_promotion):
	Added, pulled out of rasqal_literal_compare.
	(rasqal_literal_compare): Use above.

	* src/rasqal_literal.c: (rasqal_literal_equals_flags): Start to
	add XQuery/SPARQL promotions.

	* src/rasqal_literal.c: (rasqal_literal_equals_flags): Added

	* src/rasqal_engine.c:
	(rasqal_query_result_literal_sequence_equals): Added to compare
	two arrays of literal for equality
	(rasqal_engine_query_result_row_compare): Use
	rasqal_query_result_literal_sequence_equals when just doing
	distinct, no sorting.

	* src/rasqal_internal.h: Added rasqal_literal_equals_flags prototype

2007-10-21  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_decimal.c: Make rasqal_decimal.c compile with
	RASQAL_DECIMAL_NONE

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_equals) Catch flagging
	error and prevent warning about uninitialized rc variable.

2007-10-21  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c: Switch rasqal_literal with type
	RASQAL_LITERAL_DECIMAL from stored as a double stored as an
	rasqal_xsd_decimal.
	(rasqal_new_decimal_literal, rasqal_literal_string_to_native,
	rasqal_free_literal, rasqal_literal_as_integer,
	rasqal_literal_as_floating, rasqal_literal_equals): Use new fields
	for decimal.

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_equals): Renamed from
	rasqal_xsd_decimal_equal

	* src/rasqal.h: rasqal_literal now stores decimals as
	rasqal_xsd_decimal. rasqal_xsd_decimal_equals renamed from
	rasqal_xsd_decimal_equal

	* Last known good revision 12976: 'make check' succeeds.

	* src/rasqal.h, src/rasqal_decimal.c, src/rasqal_internal.h: Move
	rasqal_xsd_decimal prototypes to rasqal.h and rename
	constructor/destructor to match convention

	* src/rasqal_decimal.c, src/rasqal_internal.h: Move
	rasqal_xsd_decimal prototypes to rasqal_internal.h

	* src/rasqal_decimal.c: (main): Tests are silent on success

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_init): Set to 32
	digits precision

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_as_string): less strlen

	* src/rasqal_decimal.c: ;

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_clear_string): All
	strings are rasqal alloced.
	(rasqal_xsd_decimal_as_string): Handle zero better.

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_as_string): No longer
	format as ints, always generate -?X.YeZ

	* src/rasqal_decimal.c: Prevent 0.0e-1, make it 0.0e0

	* src/rasqal_decimal.c: Ensure trailing zeroes are not all removed
	in MPFR cleanup. Clear result strings when computing.

	* src/rasqal_decimal.c: Catch malloc failures

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_as_string): Adjust
	MPFR output to remove leading 0s and have 1 leading digit.  Adjust
	GMP output to have 1 leading digit.
	(rasqal_xsd_decimal_print): Use string from
	rasqal_xsd_decimal_as_string.

	* src/rasqal_decimal.c: Flags made explicit.
	Annotate free()

	* src/rasqal_decimal.c: (rasqal_xsd_decimal_as_counted_string): Added.

	* src/rasqal_decimal.c: Preserve original string as str. Fix
	output formatting better for GMP

	* src/rasqal_decimal.c: Added GMP

	* configure.ac: Added --with-decimal to choose mpfr, gmp, none
	Added --with-mpfr=DIR to set prefix for mpfr install.
	Added MPFR and GMP presence tests.
	Added decimal choice to summary

	* src/Makefile.am: Added rasqal_decimal.c to library

	* configure.ac: AC_MSG_RESULT

	* src/Makefile.am: Added rasqal_decimal_test

	* src/rasqal_decimal.c: Moved macros to ../configure.ac

	* configure.ac: Add checks and defines for MPFR and decimal

	* src/rasqal_decimal.c: XSD decimal via some external library

2007-10-18  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_engine_query_result_row_update) Fix
	SPARQL sort-3 segfault: Evaluating order condition expression may
	return NULL.

	* src/rasqal_engine.c: (rasqal_engine_query_result_row_to_nodes,
	rasqal_engine_execute_run) Allow empty result sets - not an error.

	* src/rasqal_literal.c: (rasqal_literal_cast) Check for new_string
	alloc failure

	* src/rasqal_result_formats.c: (rasqal_query_results_write_xml_result4)
	Fix segfault when binding value literal is not a node type.

	* src/rasqal_engine.c: (rasqal_engine_query_result_row_to_nodes)
	Return an error if cannot convert a literal to node. Do not just
	leave a non-node literal row values.

	(rasqal_engine_execute_run) Check
	rasqal_engine_query_result_row_to_nodes() return value.

	* src/rasqal_engine.c: (rasqal_engine_query_result_row_update)
	Free literal returned by evaluation of order condition
	expressions.

2007-10-17  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_free_gp_data) Remove unnecessary
	start_column check - the root cause for start_column<0 was fixed
	in r12884.

	* tests/sparql/ExprBuiltins/Makefile.am: Expect SPARQL
	ExprBuiltins str-1 to fail.

	* src/fix-flex: (fix-flex) Also remove generated yy_fatal_error()
	declaration to avoid warning about declared but non-defined static
	function. Fix line offset off-by-one by not including $ in printed
	match when patching lex_destroy(). Fix .h #line directives as
	well.

	* src/fix-flex: (fix-flex) Remove generated yy_fatal_error()
	definition to avoid warnings about unused function.

	* src/rdql_lexer.l, src/sparql_lexer.l: (sparql_lexer_fatal_error,
	rdql_lexer_fatal_error) Portability: avoid depending on varargs
	implementation internals.

	* src/sparql_lexer.l: (sparql_lexer) Replace out-of-memory
	yyterminate() calls with more informative SPARQL_LEXER_OOM macros.

	* src/rdql_lexer.l,
	src/sparql_lexer.l: (sparql_lexer_cleanup,rdql_lexer_cleanup) Does
	not have to be non-static.

	* src/fix-flex, src/rasqal_internal.h, src/rdql_lexer.l,
	src/sparql_lexer.l: (rasqal_query_s) Added lexer_user_data for
	storing re-entrant lexer internal data.

	(fix-flex) Replace calls to yy_fatal_error() with YY_FATAL_ERROR
	macro.  Add alloc failure checks to generated ensure_stack().
	Call custom cleanup() function in lex_destroy().  Removed
	prefixing free(ptr) with NULL guard - rasqal lexers now have
	yyfree replacements that check for NULL.  Fix .c #line numbers.

	(sparql_lexer) Specify noyyalloc, noyyrealloc, noyyfree options to
	prevent flex from generating alloc/realloc/free functions.  Define
	YY_FATAL_ERROR macro to sparql_lexer_fatal_error().

	Added experimental low-memory memory leak prevention code under
	LEXER_ALLOC_TRACKING flag (disabled by default) - easier and
	probably more failsafe than patching large amounts of generated C
	in fix-flex. The leak itself is YY_BUFFER_STATE struct that is not
	freed when ensure_stack() encounters an OOM fatal error -
	previously ensure_stack() segfaulted but now fix-flex patches it
	to just leak memory.

	(sparql_lexer_fatal_error) Added replacement for default error
	handler. Uses rasqal query fatal error reporting mechanisms if
	possible. abort()s and does not exit() like the generated error
	handler would do.
	(sparql_lexer_cleanup) Added function that gets called by
	sparql_lexer_lexer_destroy() patched by fix-flex. Cleans up memory
	leaks (if any) when LEXER_ALLOC_TRACKING flag is enabled,
	otherwise a no-op.
	(sparql_lexer_alloc) Added allocator function as needed after the
	noyyalloc option. If LEXER_ALLOC_TRACKING flag is disabled, it's
	just the plain malloc(). Otherwise stores allocated pointer to an
	alloc tracker stored in lexer_user_data in rasqal_query_s to allow
	cleanup by sparql_lexer_cleanup().
	(sparql_lexer_realloc) Added realloc function as needed after the
	noyyrealloc option. If LEXER_ALLOC_TRACKING flag is disabled, it's
	just the plain realloc(). Otherwise it uses the alloc tracker in
	lexer_user_data.
	(sparql_lexer_free) Added free function as needed after the
	noyyfree option. If LEXER_ALLOC_TRACKING flag is disabled, it's
	just the plain free() with NULL check. Otherwise it uses the alloc
	tracker in lexer_user_data.

	(rdql_lexer) Specify noyyalloc, noyyrealloc, noyyfree options to
	prevent flex from generating alloc/realloc/free functions.  Define
	YY_FATAL_ERROR macro to rdql_lexer_fatal_error().
	(rdql_lexer_fatal_error) Added replacement for default error
	handler. Uses rasqal query fatal error reporting mechanisms if
	possible. abort()s and does not exit() like the generated error
	handler would do.
	(rdql_lexer_cleanup) Added empty function that gets called by
	rdql_lexer_lex_destroy() patched by fix-flex.
	(rdql_lexer_alloc,rdql_lexer_realloc) Added functions as needed
	after noyyalloc and noyyrealloc options.
	(rdql_lexer_free) Added function as needed after noyyfree
	option. Checks for NULL ptr unlike the generated yyfree().

2007-10-16  Lauri Aalto <laalto@iki.fi>

	* src/fix-bison: (fix-bison) Fix .c #line references - was still
	off by one.

	* src/fix-bison: (fix-bison) Fix .c #line references. Fix script indent.

	* src/sparql_parser.y: (sparql_parse) Check lexer init return code.

2007-10-15  Dave Beckett <dave@dajobe.org>

	* tests/rdql/testsuite/Makefile.am: Document B-07 B-20 as failing
	since core changes to normalize xsd:double format for SPARQL cause
	these to fail now

2007-10-15  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c: (rasqal_new_string_literal) Free datatype
	as uri and not as cstring on error.

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_datatype_uri_parent_type)
	fix comments

	* src/sparql_parser.y: Memory leak fix: add %destructor for Object

	* src/rasqal_engine.c: (rasqal_engine_convert_blank_node_to_anonymous_variable)
	Fix low memory crashes due to variable literals with NULL
	value. Changed function to return an int error code.
	(rasqal_engine_build_anonymous_variables) Bubble up errors from
	rasqal_engine_convert_blank_node_to_anonymous_variable().
	(rasqal_engine_prepare) Bubble up errors from
	rasqal_engine_build_anonymous_variables().

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_datetime_normalize) Fix
	bugs in day normalization: uninitialized var t in y2 expression;
	add the correct number of days when going down a month
	boundary (and not the number of days next month).
	(test_datetimes) Add tests to catch the bug. Was not caught before
	because January and December both have 31 days.
	(test_datetime_parser_tostring) Print relevant information to
	stderr on test failure.

	* src/rasqal_literal.c: (rasqal_literal_string_to_native) Remove
	unnecessary if

2007-10-15  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c: docs

2007-10-14  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c: (rasqal_new_double_literal): Use
	rasqal_xsd_format_double to format a double.
	(rasqal_literal_string_to_native): Use rasqal_xsd_format_double to
	format a new double.

	* src/rasqal_internal.h: Added rasqal_xsd_format_double prototype

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_format_double): Added to
	properly format an xsd:double

	* src/sparql_lexer.l: Added SPARQL_NAME_CHECK_ALLOW_09_FIRST
	NCNAME2: Added allowing 0-9
	(QNAME,BNAME,BNAME2): Use NCNAME2 instead of NCNAME to allow 0-9
	first.
	(rasqal_sparql_name_check): Use SPARQL_NAME_CHECK_ALLOW_09_FIRST
	to allow 0-9 as the first character.

	* tests/sparql/ValueTesting/Makefile.am:
	typePromotion-decimal-decimal-fail passes again

	* src/rasqal_literal.c: (rasqal_literal_cast): Use
	rasqal_xsd_datatype_check() to check if a cast from string is
	allowed.

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_init,
	rasqal_xsd_finish): Do not try to init, free NULL names.

	* src/rasqal_expr.c: (rasqal_expression_evaluate): Moved
	RASQAL_EXPR_PLUS, RASQAL_EXPR_MINUS, RASQAL_EXPR_STAR and
	RASQAL_EXPR_SLASH evaluation to rasqal_literal_add,
	rasqal_literal_subtract, rasqal_literal_multiply,
	rasqal_literal_divide respectively.

	* src/rasqal_xsd_datatypes.c: table sparql_xsd_names now includes
	the types that promote to xsd:integer
	(rasqal_xsd_init): Init the URIs of the types above.
	(rasqal_xsd_datatype_uri_parent_type): Added to get the parent
	type of a datatype URI.
	(rasqal_xsd_datatype_is_numeric): Added to check if an XSD type is
	numeric.

	* src/rasqal_literal.c: (rasqal_new_integer_literal): Initialise
	parent_type to decimal.
	(rasqal_literal_string_to_native): Native integers have a decimal
	parent.
	(rasqal_new_string_literal): Initialise parent type.
	(rasqal_literal_promote_calculate): Added to calculate XSD type
	promotions.
	(rasqal_literal_is_numeric): Added to determine a numeric literal.
	(rasqal_literal_add, rasqal_literal_subtract,
	rasqal_literal_multiply, rasqal_literal_divide): Added based on
	the expression code for literals.

	* src/rasqal_internal.h: Added prototypes for rasqal_literal_is_numeric,
	rasqal_literal_promote_calculate, rasqal_literal_add,
	rasqal_literal_subtract, rasqal_literal_multiply,
	rasqal_literal_divide, rasqal_xsd_datatype_uri_parent_type and
	rasqal_xsd_datatype_is_numeric

	* src/rasqal.h: rasqal_literal_s gains field parent_type for XSD
	type hierarchy.

	* Last known good revision 12894: 'make check' succeeds.

	* tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/manifest.ttl,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-graph-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-graph-06.rq: Removed
	tests syntax-graph-02.rq syntax-graph-06.rq with GRAPH blank nodes
	which are no longer legal SPARQL

	* tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/manifest.ttl,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-bnodes-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-bnodes-04.rq: Removed
	tests syntax-bnodes-03.rq syntax-bnodes-04.rq with blank nodes in
	predicate which are no longer legal SPARQL

	* tests/sparql/ValueTesting/Makefile.am: Add
	typePromotion-decimal-decimal-fail to failures until type
	promotions are fixed.

	* tests/sparql/syntax/Makefile.am,
	tests/sparql/syntax/construct0.rq: Removed construct0.rq test
	since CONSTRUCT * is no longer legal sparql

	* src/rasqal_literal.c: (rasqal_literal_compare): Use
	raptor_uri_compare from raptor 1.4.16 instead of strcmp.  Protect
	checking rdf literal language and datatypes in a comparison to
	only happen when both literals were originally strings.

	* src/rasqal_raptor.c: (rasqal_raptor_triple_match): Debug
	messages
	(rasqal_raptor_triple_present): Set the match parts dependent of
	whether the triple has an origin.

	* src/rasqal_xsd_datatypes.c: (rasqal_xsd_datetime_to_string):
	Does not return a string that is required to be const.

2007-10-13  Dave Beckett <dave@dajobe.org>

	* src/rasqal_xsd_datatypes.c: Code style - comments, whitespace,
	indenting.
	(rasqal_xsd_datetime_normalize): Added, pulled out of
	rasqal_xsd_datetime_parse_and_normalize

2007-10-12  Lauri Aalto <laalto@iki.fi>

	* src/sparql_parser.y: (OrderConditionList) Fix memory leak when
	sequence creation fails.

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c:
	Fix error where a sequence alloc error in
	rasqal_engine_join_graph_patterns() leaves gp in stale state.
	(rasqal_engine_move_constraints,
	rasqal_engine_join_graph_patterns) Changed to return an int error
	code.
	(rasqal_engine_merge_graph_patterns, rasqal_engine_merge_triples,
	rasqal_engine_remove_empty_group_graph_patterns) Set modified flag
	to negative to signal error codes.
	(rasqal_query_prepare) Do gp merge only if factory->prepare()
	succeeded. Use negative values of the modified flag to signal
	errors from gp visitors.

	* src/rasqal_engine.c: (rasqal_engine_graph_pattern_init) Bubble
	up errors from subgp init.

	* src/sparql_parser.y: Memory leak fixes:
	Add Filter %destructor.
	(AdditiveExpression) Free MultiplicativeExpression when
	rasqal_new_literal_expression() for a numeric literal fails.

	* src/rasqal_literal.c: (rasqal_new_integer_literal,
	rasqal_new_double_literal, rasqal_new_float_literal,
	rasqal_new_decimal_literal, rasqal_new_boolean_literal,
	rasqal_literal_as_node) Check rasqal_xsd_datatype_type_to_uri()
	return value.

	* src/rasqal_xsd_datatypes.c: (sparql_xsd_datatypes_table) Init
	static variable to NULL.
	(rasqal_xsd_init) Check for rasqal_xsd_namespace_uri alloc
	failure.
	(rasqal_xsd_finish) Set static pointers to NULL to prevent
	dangling pointers.
	(rasqal_xsd_datatype_uri_to_type, rasqal_xsd_datatype_type_to_uri,
	rasqal_xsd_datatype_check, rasqal_xsd_datatype_label) Check that
	sparql_xsd_datatypes_table is allocated.

	* src/rasqal_engine.c: (rasqal_new_engine_execution_data) Check
	raptor_sequence_set_at() return value. Fixes memory leak when
	setting (n+1)th item and setting nth item had failed.

2007-10-11  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_xsd_datatypes.c: Fix compiler warning

	* tests/sparql/examples/Makefile.am:
	sparql-query-example-Testing-Values-0 (ex11_0) was broken by
	recent changes in literal handling.

	* tests/sparql/examples/Makefile.am: makefile comments

	* tests/sparql/examples/Makefile.am:
	sparql-query-example-Testing-Values-RDFterm-equal-2 (ex11.2.3.1_1)
	now passes

	* src/rasqal_literal.c: (rasqal_literal_string_to_native) Promote
	xsd:dateTime literals to canonical literal form - strcmp() now
	works better when comparing datetime literals.

	* src/Makefile.am, src/rasqal_internal.h,
	src/rasqal_xsd_datatypes.c: (rasqal_xsd_datetime_string_to_canonical)
	Added library internal function for upgrading xsd:dateTime strings
	to canonical form.
	(rasqal_xsd_datetime_parse_and_normalize,
	rasqal_xsd_datetime_to_string) Added module internal functions for
	dealing with xsd:dateTime strings.
	(rasqal_xsd_check_dateTime_format) Use
	rasqal_xsd_datetime_parse_and_normalize() for format checking.
	(days_per_month) Added helper function for
	rasqal_xsd_datetime_parse_and_normalize().
	(rasqal_xsd_datetime) Replaced struct with a version that can be
	used for normalization and does not use bitfields. Second
	fractions stored as string, not as double.
	(test_datetime_parser_tostring, test_datetimes, main) Added test
	code for xsd:dateTime handling.
	(Makefile.am): Moved rasqal_xsd_datatypes_test from local_tests to
	TESTS.

2007-10-10  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_raptor.c: (rasqal_raptor_triple_present,
	rasqal_raptor_triples_match_context) Fix compiler warnings about
	enum-int mismatches.

2007-10-09  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: Invoke roqet with -D for data
	graphs (not named)

	* utils/roqet.c: Added -D/--data for data graphs and -G/--named
	for named graphs (-s is a synonym for this)

	* src/rasqal_raptor.c: (rasqal_raptor_new_triples_source): Use the
	named graph URI for the source literal to distinguish default and
	named graphs.
	(rasqal_raptor_triple_match): Add a parts field for the fields of
	the triple to match to distinguish a graph query with no binding
	from a non-graph query.  Add checks for graph/non-graph query when
	finding an origin in a triple so that they match.
	(rasqal_raptor_init_triples_match): Init the parts being looked
	for depending on whether t->origin is present.

	* src/rasqal_engine.c: (rasqal_engine_execute_run): Allow
	rasqal_engine_excute_next_lazy to return finished on first
	execution, for an empty result set.

	* src/rasqal_query.c: (rasqal_query_execute): It is not a failure
	for rasqal_engine_execute_run to be immediately finished, it is
	just an empty results set.

	* src/rasqal.h: (enum rasqal_triple_parts): Added
	RASQAL_TRIPLE_GRAPH as alias for RASQAL_TRIPLE_ORIGIN,
	RASQAL_TRIPLE_SPO for triple parts and RASQAL_TRIPLE_SPOG for all
	parts including graph.

	* src/sparql_parser.y: (DefaultGraphClause): Set graph name to
	NULL for default graph.

	* src/rasqal_raptor.c: (rasqal_raptor_triple_match): If a named
	graph triple is present, do not match a triple pattern with
	nothing in the 'origin'.

	* tests/sparql/check-sparql: handle dt:graphData

	* tests/sparql/dawg/graph/data-g3-dup.ttl,
	tests/sparql/dawg/graph/manifest.ttl: Update to DAWG test suite
	graph dir 2007-10-09

	* tests/sparql/dawg/dataset/data-g1-dup.ttl,
	tests/sparql/dawg/dataset/data-g2-dup.ttl,
	tests/sparql/dawg/dataset/data-g3-dup.ttl,
	tests/sparql/dawg/dataset/data-g4-dup.ttl,
	tests/sparql/dawg/dataset/dataset-09b.rq,
	tests/sparql/dawg/dataset/dataset-10b.rq,
	tests/sparql/dawg/dataset/dataset-12b.rq,
	tests/sparql/dawg/dataset/manifest.ttl: Update to DAWG test suite
	dataset dir 2007-10-09

	* tests/sparql/check-sparql: Handle DAWG dawgt:approval
	dawgt:Withdrawn tests

	* src/rasqal_expr.c: (rasqal_expression_evaluate): Make
	RASQAL_EXPR_BOUND work again.

2007-10-08  Dave Beckett <dave@dajobe.org>

	* src/sparql_parser.y: Added SAMETERM token for SPARQL keyword
	sameTerm() Added lexer tokens DOUBLE_POSITIVE_LITERAL,
	DOUBLE_NEGATIVE_LITERAL, INTEGER_POSITIVE_LITERAL,
	INTEGER_NEGATIVE_LITERAL, DECIMAL_POSITIVE_LITERAL,
	DECIMAL_NEGATIVE_LITERAL.  Some token re-orderings and
	renumberings.
	(Query): Move dataset, wher, group, order and limit to elsewhere
	like sparql grammar.
	(Prolog, PRefixDeclOpt): Rename to PrefixDeclListOpt
	(SelectQuery, DescribeQuery, ConstructQuery, AskQuery): Add
	appropriate datasets, where, and solution modifier if allowed.
	(ConstructQuery): Remove CONSTRUCT * - no longer in the grammar.
	(DefaultGraphClause, NamedGraphClause): Use SourceSelector
	(SourceSelector, SolutionModifier): Added like SPARQL grammar.
	(LimitOffsetClausesOpt): Renamed from LimitOffsetOpt, like SPARQL
	grammar.
	(Filter): Added, like SPARQL grammar.
	(ObjectList): Uses a list of Object like SPARQL grammar
	(Object): Added, like SPARQL grammar.
	(Verb): Changed to be VarOrIRIref not VarOrBlankNodeOrIRIref like
	SPARQL grammar
	(VarOrBlankNodeOrIRIref): Removed, no longer used.
	(GraphTerm): Use NumericLiteral like SPARQL grammar.
	(AdditiveExpression): Use NumericLiteralPositive and
	NumericLiteralNegative to allow unary minus/plus to work.  like
	SPARQL grammar.
	(BuiltInCall): Add SAMETERM.
	(NumericLiteral, NumericLiteralUnsigned, NumericLiteralPositive,
	NumericLiteralNegative): Added like SPARQL grammar

	* src/sparql_lexer.l: Added INTEGER macro
	Added SAMETERM SPARQL keyword
	Made INTEGER, DECIMAL and DOUBLE return either UNSIGNED_, POSITIVE_ or
	NEGATIVE_ tokens to help out the parser.

	* src/rasqal_query.c: (rasqal_query_write_sparql_expression_op):
	Added new RASQAL_EXPR_SAMETERM for SPARQL keyword sameTerm.

	* src/rasqal_expr.c: (rasqal_expression_clear,
	rasqal_expression_visit, rasqal_expression_evaluate,
	rasqal_expression_print, rasqal_expression_is_constant): Added new
	RASQAL_EXPR_SAMETERM for SPARQL keyword sameTerm().  Evaluation
	not implemented yet.

	* src/rasqal.h: Added new rasqal_op expression
	RASQAL_EXPR_SAMETERM for SPARQL keyword sameTerm()

2007-10-07  Dave Beckett <dave@dajobe.org>

	* src/rasqal_xsd_datatypes.c: (main) Comment out all of old test
	code that's not used or usable.

	* configure.ac: Remove --enable-datatypes

	* src/rasqal_expr.c: (main): Needs more init for xsd module.

	* src/rasqal_internal.h, src/rasqal_xsd_datatypes.c: Remove last
	uses of static rasqal_xsd_TYPE_uri uris

	* src/sparql_lexer.l: altered cast for change to
	rasqal_new_decimal_literal.

	* tests/sparql/check-sparql: Use config->{execute} and set to
	false for syntax test types

	* tests/sparql/check-sparql: revert: Debugging run_test for $debug>0

	* tests/sparql/check-sparql: Debugging run_test for $debug>1

	* tests/sparql/check-sparql: Debugging manifest for $debug>1

	* src/rasqal.h: typedef rasqal_literal: note decimal inits
	value.floating

	* src/rasqal_literal.c: (rasqal_new_decimal_literal): Initialise
	the floating field.

	* src/rasqal.h: Move the FIRST XSD to include
	RASQAL_LITERAL_STRING aka xsd:string

	* src/rasqal_query.c: (rasqal_query_write_sparql_literal): Use
	rasqal_xsd_datatype_type_to_uri to get xsd:dateTime URI.

	* src/rasqal_expr.c: (rasqal_expression_evaluate):
	RASQAL_EXPR_DATATYPE - ensure a plain literal with no datatype
	returns datatype xsd:string.

	* src/sparql_parser.y: (sparql_is_builtin_xsd_datatype): Removed.
	Use rasqal_xsd_is_datatype_uri instead

	* src/rasqal_literal.c, src/rasqal_xsd_datatypes.c: Move XSD
	functions to rasqal_xsd_datatypes.c

	* src/rasqal_internal.h: Added prototypes for
	rasqal_xsd_datatype_uri_to_type, rasqal_xsd_datatype_type_to_uri,
	rasqal_xsd_datatype_check, rasqal_xsd_datatype_label and
	rasqal_xsd_is_datatype_uri

	* src/rasqal_general.c: Move XSD uris init/free to
	rasqal_xsd_datatypes.c

	* src/Makefile.am: Add rasqal_xsd_datatypes.c to compilation

	* src/rasqal_internal.h: Added rasqal_new_numeric_literal

	* src/rasqal_expr.c: (rasqal_expression_evaluate):
	RASQAL_EXPR_UMINUS, RASQAL_EXPR_PLUS, RASQAL_EXPR_MINUS,
	RASQAL_EXPR_STAR and RASQAL_EXPR_SLASH now use
	rasqal_new_numeric_literal.  RASQAL_EXPR_LITERAL: Turn a literal
	into a literal value here, removing mention of variables.

	* src/rasqal_literal.c: (rasqal_new_float_literal): Added.
	(rasqal_new_decimal_literal) Now takes a const char* arg.
	(rasqal_new_numeric_literal): Added

	* src/rasqal.h: Added rasqal_new_float_literal
	rasqal_new_decimal_literal now takes a const char*

	* tests/sparql/check-sparql: debug query type

	* src/rasqal_expr.c: (rasqal_expression_evaluate): Print
	expression again when printing result.

	* src/rasqal_literal.c: (rasqal_literal_as_integer,
	rasqal_literal_as_floating): Convert decimal to integer, floating
	too.
	(rasqal_literal_compare): Decimal can be used as a double.
	(rasqal_literal_as_integer): Decimal can be turned into an an
	integer.
	(rasqal_literal_equals): Compare decimal as doubles.

	* src/rasqal_literal.c: (rasqal_literal_print): Debug message tweak

	* src/rasqal_engine.c: docs

	* src/rasqal_engine.c: (rasqal_engine_query_result_row_to_nodes):
	Added to turn internal literal types into just URI/blank/string
	literal RDF nodes.
	(rasqal_engine_execute_run): Call
	rasqal_engine_query_result_row_to_nodes for first result row.
	(rasqal_engine_execute_next): Call
	rasqal_engine_query_result_row_to_nodes for all new rows.

	* src/rasqal_engine.c: prototype

	* src/rasqal_engine.c: Moved rasqal_engine_excute_next_lazy

	* src/rasqal_engine.c: (rasqal_engine_get_result_row): Added
	(rasqal_engine_get_result_values): Uses
	rasqal_engine_get_result_row.
	(rasqal_engine_execute_next_from_saved): Added
	(rasqal_engine_execute_next): Use
	rasqal_engine_execute_next_from_saved.

2007-10-06  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine.c: Code style

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c:
	Remove rasqal_query field binding_values as it is not needed

	* src/rasqal_engine.c: Docs
	(rasqal_engine_get_result_values): Renamed from
	rasqal_engine_get_results_values

	* src/rasqal_query_results.c: Renamed
	rasqal_engine_get_results_values to
	rasqal_engine_get_result_values

	* src/rasqal_internal.h: Renamed rasqal_engine_get_results_values
	to rasqal_engine_get_result_values

	* src/rasqal_engine.c: docs

	* src/rasqal_engine.c: Add a bunch of internal docs.
	(rasqal_engine_query_result_row_update): Do not throw away
	datatype information early.  Do not throw it away for ordering.
	(rasqal_engine_excute_next_lazy): Renamed from
	rasqal_engine_query_results_update since it is only used in lazy
	evaluation.
	(rasqal_engine_execute_and_save): Added to pull out the code from
	rasqal_engine_execute_run that is run when results are wanted to
	be saved.
	(rasqal_engine_execute_run): Documentation of execution operation
	and change to use rasqal_engine_execute_and_save
	(rasqal_engine_execute_next): Docs and change to use
	rasqal_engine_excute_next_lazy.

	* src/rasqal.h: Added rasqal_literal_value.

	* src/rasqal_literal.c: (rasqal_new_literal_from_literal): Return
	NULL if NULL was given.
	(rasqal_literal_value): Added, to return a value and looking up
	variable literals.

	* tests/sparql/check-sparql: Order expected results using rs:index
	predicate if it's present.

2007-10-05  Lauri Aalto <laalto@iki.fi>

	* src/sparql_parser.y: (PropertyListNotEmpty) Refactored to not
	use raptor_sequence_disown_at()

	* src/rasqal_literal.c: (sparql_xsd_datatypes_table) Fix compiler
	warning: cast int to enum.
	(rasqal_literal_cast) Return a copy of the literal when casting to
	same type.

2007-10-05  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c: (rasqal_literal_check_boolean_format):
	Note not strictly conforming.
	(rasqal_literal_check_dateTime_format): Add even more caveats.
	(rasqal_literal_check_decimal_format): Update to be conformant.
	(rasqal_literal_check_double_format): Note not strictly
	confirming.
	(rasqal_literal_check_float_format): Note not strictly confirming.
	(rasqal_literal_check_integer_format): Note is conformant.

	* src/rasqal_literal.c: Added start of format checking for XSD
	literal strings.  This code should probably be moved into a
	separate module and connected to the other skeletal datatype code.
	(rasqal_literal_check_boolean_format,
	rasqal_literal_check_dateTime_format,
	rasqal_literal_check_decimal_format,
	rasqal_literal_check_double_format,
	rasqal_literal_check_float_format,
	rasqal_literal_check_integer_format): Added of which only boolean
	and integer are fully correct.
	(struct sparql_xsd_datatypes_table): Table added.
	(rasqal_xsd_init, rasqal_xsd_finish): Added to initialise table.
	(rasqal_literal_string_to_native): Use sparql_xsd_datatypes_table
	table to drive validation and to avoid URI comparisons.
	(rasqal_literal_cast): Do allowed type conversion checks and then
	pass on to rasqal_new_string_literal to test the allowed syntax.

	* src/rasqal_internal.h: Added rasqal_xsd_init and rasqal_xsd_finish.

	* src/rasqal_general.c: (rasqal_init, rasqal_finish): Init/free
	the XSD code with rasqal_xsd_init() and rasqal_xsd_finish().

2007-10-04  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr.c: unused var

	* src/rasqal_expr.c: (rasqal_expression_evaluate): Use
	rasqal_literal_cast for RASQAL_EXPR_CAST evaluation.

	* src/rasqal_internal.h: Added rasqal_literal_cast

	* src/rasqal_literal.c: (rasqal_literal_cast): Added for casting
	between literal types

	* src/rasqal.h: Added rasqal_literal_datatype

	* src/rasqal_literal.c: (rasqal_new_boolean_literal): Set boolean
	datatype.
	(rasqal_literal_datatype): Added to get a literal datatype URI if
	it has one.

	* tests/sparql/check-sparql: Allow choosing unique test by regex
	on the test URI since sometimes the name is not unique.

	* tests/sparql/check-sparql: Replace so-called XML::Simple with
	XML::DOM which is actually simpler, and even as a bonus, works.

2007-10-04  Lauri Aalto <laalto@iki.fi>

	* src/sparql_parser.y: Check for alloc failures. Free allocated
	resources and YYERROR on failure. Added YYERROR_MSG macro to help
	with debugging.

	* src/sparql_lexer.l: lexer: yyterminate() on alloc failures.
	(sparql_copy_string_token) Check for alloc failures.

	* src/rasqal_expr.c: (rasqal_new_3op_expression) Do not free null
	arg3 on alloc error.

2007-10-03  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: tweak output

	* tests/sparql/dawg/optional-filter/expr-4-result.ttl,
	tests/sparql/dawg/optional-filter/expr-4.rq,
	tests/sparql/dawg/optional-filter/expr-5-result-not-simplified.ttl,
	tests/sparql/dawg/optional-filter/expr-5-result-simplified.ttl,
	tests/sparql/dawg/optional-filter/expr-5.rq: new DAWG tests

	* tests/sparql/dawg/optional-filter/data-1.ttl,
	tests/sparql/dawg/optional-filter/expr-1-result.ttl,
	tests/sparql/dawg/optional-filter/expr-2-result.ttl,
	tests/sparql/dawg/optional-filter/expr-3-result.ttl,
	tests/sparql/dawg/optional-filter/manifest.ttl: updated DAWG tests

	* src/rasqal_raptor.c: (rasqal_raptor_triple_match): debug printf

	* src/rasqal_literal.c: (rasqal_literal_string_to_native): Promote
	xsd:decimal to RASQAL_LITERAL_DECIMAL

	* src/sparql_lexer.l: Add support for @lang and ^^datatype after
	triple quoted literals.
	(sparql_copy_string_token): Skip repeated terminating delimiters.

2007-10-03  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c: (rasqal_literal_as_node) Return NULL if
	new literal string allocation fails. No need to handle boolean
	datatypes as a special case.

	* src/rasqal_literal.c: indent, style

	* src/rasqal_literal.c: (rasqal_new_integer_literal,
	rasqal_new_double_literal, rasqal_new_decimal_literal,
	rasqal_new_string_literal) Set usage flag early to enable cleanup
	with rasqal_free_literal().

	* src/rasqal_literal.c: (rasqal_formula_join) Free second formula
	even if neither formula has triples.

2007-10-02  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: try to fix the pain of using XML::Simple

	* tests/sparql/check-sparql: Save rasqal_date in output EARL

2007-10-02  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_literal.c,
	tests/sparql/examples/Makefile.am: (rasqal_literal_compare) Return
	type error when comparing plain and typed literals.  Fixes
	tests/sparql/examples/ex11_0
	(sparql-query-example-Testing-Values-0).

	* src/sparql_parser.y, tests/sparql/examples/Makefile.am:
	(FilteredBasicGraphPattern) Push BlockOfTriplesOpt instead of
	shifting.
	Fixes Issue#000200 http://bugs.librdf.org/mantis/view.php?id=200
	Fixes tests/sparql/examples/ex3 (sparql-query-example-e).

2007-10-01  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_free_gp_data) Free triple_meta even
	if gp is NULL.
	(rasqal_engine_graph_pattern_init(rasqal_query_results) Check for
	triple_meta alloc failure.

2007-09-30  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: Add SVN info to version for EARL output

	* tests/sparql/dawg, tests/sparql/dawg/LICENSE,
	tests/sparql/dawg/README, tests/sparql/dawg/algebra,
	tests/sparql/dawg/algebra/data-1.ttl,
	tests/sparql/dawg/algebra/data-2.ttl,
	tests/sparql/dawg/algebra/filter-nested-1.rq,
	tests/sparql/dawg/algebra/filter-nested-1.srx,
	tests/sparql/dawg/algebra/filter-nested-2.rq,
	tests/sparql/dawg/algebra/filter-nested-2.srx,
	tests/sparql/dawg/algebra/filter-placement-1.rq,
	tests/sparql/dawg/algebra/filter-placement-1.srx,
	tests/sparql/dawg/algebra/filter-placement-2.rq,
	tests/sparql/dawg/algebra/filter-placement-2.srx,
	tests/sparql/dawg/algebra/filter-placement-3.rq,
	tests/sparql/dawg/algebra/filter-placement-3.srx,
	tests/sparql/dawg/algebra/filter-scope-1.rq,
	tests/sparql/dawg/algebra/filter-scope-1.srx,
	tests/sparql/dawg/algebra/join-combo-1.rq,
	tests/sparql/dawg/algebra/join-combo-1.srx,
	tests/sparql/dawg/algebra/join-combo-2.rq,
	tests/sparql/dawg/algebra/join-combo-2.srx,
	tests/sparql/dawg/algebra/join-combo-graph-1.ttl,
	tests/sparql/dawg/algebra/join-combo-graph-2.ttl,
	tests/sparql/dawg/algebra/manifest.ttl,
	tests/sparql/dawg/algebra/opt-filter-1.rq,
	tests/sparql/dawg/algebra/opt-filter-1.srx,
	tests/sparql/dawg/algebra/opt-filter-1.ttl,
	tests/sparql/dawg/algebra/opt-filter-2.rq,
	tests/sparql/dawg/algebra/opt-filter-2.srx,
	tests/sparql/dawg/algebra/opt-filter-2.ttl,
	tests/sparql/dawg/algebra/opt-filter-3.rq,
	tests/sparql/dawg/algebra/opt-filter-3.srx,
	tests/sparql/dawg/algebra/opt-filter-3.ttl,
	tests/sparql/dawg/algebra/two-nested-opt-alt.rq,
	tests/sparql/dawg/algebra/two-nested-opt-alt.srx,
	tests/sparql/dawg/algebra/two-nested-opt.rq,
	tests/sparql/dawg/algebra/two-nested-opt.srx,
	tests/sparql/dawg/algebra/two-nested-opt.ttl,
	tests/sparql/dawg/algebra/var-scope-join-1.rq,
	tests/sparql/dawg/algebra/var-scope-join-1.srx,
	tests/sparql/dawg/algebra/var-scope-join-1.ttl,
	tests/sparql/dawg/algebra-expressions.txt, tests/sparql/dawg/ask,
	tests/sparql/dawg/ask/ask-1.rq, tests/sparql/dawg/ask/ask-1.srx,
	tests/sparql/dawg/ask/ask-4.rq, tests/sparql/dawg/ask/ask-4.srx,
	tests/sparql/dawg/ask/ask-7.rq, tests/sparql/dawg/ask/ask-7.srx,
	tests/sparql/dawg/ask/ask-8.rq, tests/sparql/dawg/ask/ask-8.srx,
	tests/sparql/dawg/ask/data.ttl,
	tests/sparql/dawg/ask/manifest.ttl, tests/sparql/dawg/basic,
	tests/sparql/dawg/basic/base-prefix-1.rq,
	tests/sparql/dawg/basic/base-prefix-1.srx,
	tests/sparql/dawg/basic/base-prefix-2.rq,
	tests/sparql/dawg/basic/base-prefix-2.srx,
	tests/sparql/dawg/basic/base-prefix-3.rq,
	tests/sparql/dawg/basic/base-prefix-3.srx,
	tests/sparql/dawg/basic/base-prefix-4.rq,
	tests/sparql/dawg/basic/base-prefix-4.srx,
	tests/sparql/dawg/basic/base-prefix-5.rq,
	tests/sparql/dawg/basic/base-prefix-5.srx,
	tests/sparql/dawg/basic/bgp-no-match.rq,
	tests/sparql/dawg/basic/bgp-no-match.srx,
	tests/sparql/dawg/basic/data-1.ttl,
	tests/sparql/dawg/basic/data-2.ttl,
	tests/sparql/dawg/basic/data-3.ttl,
	tests/sparql/dawg/basic/data-4.ttl,
	tests/sparql/dawg/basic/data-5.ttl,
	tests/sparql/dawg/basic/data-6.ttl,
	tests/sparql/dawg/basic/data-7.ttl,
	tests/sparql/dawg/basic/list-1.rq,
	tests/sparql/dawg/basic/list-1.srx,
	tests/sparql/dawg/basic/list-2.rq,
	tests/sparql/dawg/basic/list-2.srx,
	tests/sparql/dawg/basic/list-3.rq,
	tests/sparql/dawg/basic/list-3.srx,
	tests/sparql/dawg/basic/list-4.rq,
	tests/sparql/dawg/basic/list-4.srx,
	tests/sparql/dawg/basic/manifest.ttl,
	tests/sparql/dawg/basic/prefix-name-1.rq,
	tests/sparql/dawg/basic/prefix-name-1.srx,
	tests/sparql/dawg/basic/quotes-1.rq,
	tests/sparql/dawg/basic/quotes-1.srx,
	tests/sparql/dawg/basic/quotes-2.rq,
	tests/sparql/dawg/basic/quotes-2.srx,
	tests/sparql/dawg/basic/quotes-3.rq,
	tests/sparql/dawg/basic/quotes-3.srx,
	tests/sparql/dawg/basic/quotes-4.rq,
	tests/sparql/dawg/basic/quotes-4.srx,
	tests/sparql/dawg/basic/spoo-1.rq,
	tests/sparql/dawg/basic/spoo-1.srx,
	tests/sparql/dawg/basic/term-1.rq,
	tests/sparql/dawg/basic/term-1.srx,
	tests/sparql/dawg/basic/term-2.rq,
	tests/sparql/dawg/basic/term-2.srx,
	tests/sparql/dawg/basic/term-3.rq,
	tests/sparql/dawg/basic/term-3.srx,
	tests/sparql/dawg/basic/term-4.rq,
	tests/sparql/dawg/basic/term-4.srx,
	tests/sparql/dawg/basic/term-5.rq,
	tests/sparql/dawg/basic/term-5.srx,
	tests/sparql/dawg/basic/term-6.rq,
	tests/sparql/dawg/basic/term-6.srx,
	tests/sparql/dawg/basic/term-7.rq,
	tests/sparql/dawg/basic/term-7.srx,
	tests/sparql/dawg/basic/term-8.rq,
	tests/sparql/dawg/basic/term-8.srx,
	tests/sparql/dawg/basic/term-9.rq,
	tests/sparql/dawg/basic/term-9.srx,
	tests/sparql/dawg/basic/var-1.rq,
	tests/sparql/dawg/basic/var-1.srx,
	tests/sparql/dawg/basic/var-2.rq,
	tests/sparql/dawg/basic/var-2.srx,
	tests/sparql/dawg/bnode-coreference,
	tests/sparql/dawg/bnode-coreference/data.ttl,
	tests/sparql/dawg/bnode-coreference/manifest.ttl,
	tests/sparql/dawg/bnode-coreference/query.rq,
	tests/sparql/dawg/bnode-coreference/result.ttl,
	tests/sparql/dawg/boolean-effective-value,
	tests/sparql/dawg/boolean-effective-value/data-1.ttl,
	tests/sparql/dawg/boolean-effective-value/data-2.ttl,
	tests/sparql/dawg/boolean-effective-value/manifest.ttl,
	tests/sparql/dawg/boolean-effective-value/query-bev-1.rq,
	tests/sparql/dawg/boolean-effective-value/query-bev-2.rq,
	tests/sparql/dawg/boolean-effective-value/query-bev-3.rq,
	tests/sparql/dawg/boolean-effective-value/query-bev-4.rq,
	tests/sparql/dawg/boolean-effective-value/query-bev-5.rq,
	tests/sparql/dawg/boolean-effective-value/query-bev-6.rq,
	tests/sparql/dawg/boolean-effective-value/query-boolean-literal.rq,
	tests/sparql/dawg/boolean-effective-value/result-bev-1.ttl,
	tests/sparql/dawg/boolean-effective-value/result-bev-2.ttl,
	tests/sparql/dawg/boolean-effective-value/result-bev-3.ttl,
	tests/sparql/dawg/boolean-effective-value/result-bev-4.ttl,
	tests/sparql/dawg/boolean-effective-value/result-bev-5.ttl,
	tests/sparql/dawg/boolean-effective-value/result-bev-6.ttl,
	tests/sparql/dawg/boolean-effective-value/result-boolean-literal.ttl,
	tests/sparql/dawg/bound,
	tests/sparql/dawg/bound/bound1-result.ttl,
	tests/sparql/dawg/bound/bound1.rq,
	tests/sparql/dawg/bound/data.ttl,
	tests/sparql/dawg/bound/manifest.ttl, tests/sparql/dawg/cast,
	tests/sparql/dawg/cast/cast-bool.rq,
	tests/sparql/dawg/cast/cast-bool.srx,
	tests/sparql/dawg/cast/cast-dT.rq,
	tests/sparql/dawg/cast/cast-dT.srx,
	tests/sparql/dawg/cast/cast-dbl.rq,
	tests/sparql/dawg/cast/cast-dbl.srx,
	tests/sparql/dawg/cast/cast-dec.rq,
	tests/sparql/dawg/cast/cast-dec.srx,
	tests/sparql/dawg/cast/cast-flt.rq,
	tests/sparql/dawg/cast/cast-flt.srx,
	tests/sparql/dawg/cast/cast-int.rq,
	tests/sparql/dawg/cast/cast-int.srx,
	tests/sparql/dawg/cast/cast-str.rq,
	tests/sparql/dawg/cast/cast-str.srx,
	tests/sparql/dawg/cast/data.ttl,
	tests/sparql/dawg/cast/manifest.ttl, tests/sparql/dawg/construct,
	tests/sparql/dawg/construct/data-ident.ttl,
	tests/sparql/dawg/construct/data-opt.ttl,
	tests/sparql/dawg/construct/data-reif.ttl,
	tests/sparql/dawg/construct/manifest.ttl,
	tests/sparql/dawg/construct/query-construct-optional.rq,
	tests/sparql/dawg/construct/query-ident.rq,
	tests/sparql/dawg/construct/query-reif-1.rq,
	tests/sparql/dawg/construct/query-reif-2.rq,
	tests/sparql/dawg/construct/query-subgraph.rq,
	tests/sparql/dawg/construct/result-construct-optional.ttl,
	tests/sparql/dawg/construct/result-ident.ttl,
	tests/sparql/dawg/construct/result-reif.ttl,
	tests/sparql/dawg/construct/result-subgraph.ttl,
	tests/sparql/dawg/dataset, tests/sparql/dawg/dataset/data-g1.ttl,
	tests/sparql/dawg/dataset/data-g2.ttl,
	tests/sparql/dawg/dataset/data-g3.ttl,
	tests/sparql/dawg/dataset/data-g4.ttl,
	tests/sparql/dawg/dataset/dataset-01.rq,
	tests/sparql/dawg/dataset/dataset-01.ttl,
	tests/sparql/dawg/dataset/dataset-02.rq,
	tests/sparql/dawg/dataset/dataset-02.ttl,
	tests/sparql/dawg/dataset/dataset-03.rq,
	tests/sparql/dawg/dataset/dataset-03.ttl,
	tests/sparql/dawg/dataset/dataset-04.rq,
	tests/sparql/dawg/dataset/dataset-04.ttl,
	tests/sparql/dawg/dataset/dataset-05.rq,
	tests/sparql/dawg/dataset/dataset-05.ttl,
	tests/sparql/dawg/dataset/dataset-06.rq,
	tests/sparql/dawg/dataset/dataset-06.ttl,
	tests/sparql/dawg/dataset/dataset-07.rq,
	tests/sparql/dawg/dataset/dataset-07.ttl,
	tests/sparql/dawg/dataset/dataset-08.rq,
	tests/sparql/dawg/dataset/dataset-08.ttl,
	tests/sparql/dawg/dataset/dataset-09.rq,
	tests/sparql/dawg/dataset/dataset-09.ttl,
	tests/sparql/dawg/dataset/dataset-10.rq,
	tests/sparql/dawg/dataset/dataset-10.ttl,
	tests/sparql/dawg/dataset/dataset-11.rq,
	tests/sparql/dawg/dataset/dataset-11.ttl,
	tests/sparql/dawg/dataset/dataset-12.rq,
	tests/sparql/dawg/dataset/dataset-12.ttl,
	tests/sparql/dawg/dataset/manifest.ttl,
	tests/sparql/dawg/distinct,
	tests/sparql/dawg/distinct/data-all.ttl,
	tests/sparql/dawg/distinct/data-node.ttl,
	tests/sparql/dawg/distinct/data-num.ttl,
	tests/sparql/dawg/distinct/data-opt.ttl,
	tests/sparql/dawg/distinct/data-star.ttl,
	tests/sparql/dawg/distinct/data-str.ttl,
	tests/sparql/dawg/distinct/distinct-1-results.srx,
	tests/sparql/dawg/distinct/distinct-1.rq,
	tests/sparql/dawg/distinct/distinct-2.rq,
	tests/sparql/dawg/distinct/distinct-all.srx,
	tests/sparql/dawg/distinct/distinct-node.srx,
	tests/sparql/dawg/distinct/distinct-num.srx,
	tests/sparql/dawg/distinct/distinct-opt.srx,
	tests/sparql/dawg/distinct/distinct-star-1.rq,
	tests/sparql/dawg/distinct/distinct-star-1.srx,
	tests/sparql/dawg/distinct/distinct-str.srx,
	tests/sparql/dawg/distinct/manifest.ttl,
	tests/sparql/dawg/distinct/no-distinct-1.rq,
	tests/sparql/dawg/distinct/no-distinct-2.rq,
	tests/sparql/dawg/distinct/no-distinct-all.srx,
	tests/sparql/dawg/distinct/no-distinct-node.srx,
	tests/sparql/dawg/distinct/no-distinct-num.srx,
	tests/sparql/dawg/distinct/no-distinct-opt.srx,
	tests/sparql/dawg/distinct/no-distinct-str.srx,
	tests/sparql/dawg/expr-builtin,
	tests/sparql/dawg/expr-builtin/data-builtin-1.ttl,
	tests/sparql/dawg/expr-builtin/data-builtin-2.ttl,
	tests/sparql/dawg/expr-builtin/data-langMatches-de.ttl,
	tests/sparql/dawg/expr-builtin/data-langMatches.ttl,
	tests/sparql/dawg/expr-builtin/lang-case-insensitive-eq.srx,
	tests/sparql/dawg/expr-builtin/lang-case-insensitive-ne.srx,
	tests/sparql/dawg/expr-builtin/lang-case-sensitivity-eq.rq,
	tests/sparql/dawg/expr-builtin/lang-case-sensitivity-ne.rq,
	tests/sparql/dawg/expr-builtin/lang-case-sensitivity.ttl,
	tests/sparql/dawg/expr-builtin/manifest.ttl,
	tests/sparql/dawg/expr-builtin/q-blank-1.rq,
	tests/sparql/dawg/expr-builtin/q-datatype-1.rq,
	tests/sparql/dawg/expr-builtin/q-datatype-2.rq,
	tests/sparql/dawg/expr-builtin/q-datatype-3.rq,
	tests/sparql/dawg/expr-builtin/q-iri-1.rq,
	tests/sparql/dawg/expr-builtin/q-isliteral-1.rq,
	tests/sparql/dawg/expr-builtin/q-lang-1.rq,
	tests/sparql/dawg/expr-builtin/q-lang-2.rq,
	tests/sparql/dawg/expr-builtin/q-lang-3.rq,
	tests/sparql/dawg/expr-builtin/q-langMatches-1.rq,
	tests/sparql/dawg/expr-builtin/q-langMatches-2.rq,
	tests/sparql/dawg/expr-builtin/q-langMatches-3.rq,
	tests/sparql/dawg/expr-builtin/q-langMatches-4.rq,
	tests/sparql/dawg/expr-builtin/q-langMatches-de-de.rq,
	tests/sparql/dawg/expr-builtin/q-str-1.rq,
	tests/sparql/dawg/expr-builtin/q-str-2.rq,
	tests/sparql/dawg/expr-builtin/q-str-3.rq,
	tests/sparql/dawg/expr-builtin/q-str-4.rq,
	tests/sparql/dawg/expr-builtin/q-uri-1.rq,
	tests/sparql/dawg/expr-builtin/result-blank-1.ttl,
	tests/sparql/dawg/expr-builtin/result-datatype-1.ttl,
	tests/sparql/dawg/expr-builtin/result-datatype-2.srx,
	tests/sparql/dawg/expr-builtin/result-datatype-3.srx,
	tests/sparql/dawg/expr-builtin/result-iri-1.ttl,
	tests/sparql/dawg/expr-builtin/result-isliteral-1.ttl,
	tests/sparql/dawg/expr-builtin/result-lang-1.srx,
	tests/sparql/dawg/expr-builtin/result-lang-2.srx,
	tests/sparql/dawg/expr-builtin/result-lang-3.srx,
	tests/sparql/dawg/expr-builtin/result-langMatches-1.ttl,
	tests/sparql/dawg/expr-builtin/result-langMatches-2.ttl,
	tests/sparql/dawg/expr-builtin/result-langMatches-3.ttl,
	tests/sparql/dawg/expr-builtin/result-langMatches-4.ttl,
	tests/sparql/dawg/expr-builtin/result-langMatches-de.ttl,
	tests/sparql/dawg/expr-builtin/result-str-1.ttl,
	tests/sparql/dawg/expr-builtin/result-str-2.ttl,
	tests/sparql/dawg/expr-builtin/result-str-3.ttl,
	tests/sparql/dawg/expr-builtin/result-str-4.ttl,
	tests/sparql/dawg/expr-builtin/result-uri-1.ttl,
	tests/sparql/dawg/expr-equals,
	tests/sparql/dawg/expr-equals/data-eq.ttl,
	tests/sparql/dawg/expr-equals/manifest.ttl,
	tests/sparql/dawg/expr-equals/query-eq-1.rq,
	tests/sparql/dawg/expr-equals/query-eq-2.rq,
	tests/sparql/dawg/expr-equals/query-eq-3.rq,
	tests/sparql/dawg/expr-equals/query-eq-4.rq,
	tests/sparql/dawg/expr-equals/query-eq-5.rq,
	tests/sparql/dawg/expr-equals/query-eq-graph-1.rq,
	tests/sparql/dawg/expr-equals/query-eq-graph-2.rq,
	tests/sparql/dawg/expr-equals/query-eq-graph-3.rq,
	tests/sparql/dawg/expr-equals/query-eq-graph-4.rq,
	tests/sparql/dawg/expr-equals/query-eq-graph-5.rq,
	tests/sparql/dawg/expr-equals/query-eq2-1.rq,
	tests/sparql/dawg/expr-equals/query-eq2-2.rq,
	tests/sparql/dawg/expr-equals/query-eq2-graph-1.rq,
	tests/sparql/dawg/expr-equals/result-eq-1.ttl,
	tests/sparql/dawg/expr-equals/result-eq-2.ttl,
	tests/sparql/dawg/expr-equals/result-eq-3.ttl,
	tests/sparql/dawg/expr-equals/result-eq-4.ttl,
	tests/sparql/dawg/expr-equals/result-eq-5.ttl,
	tests/sparql/dawg/expr-equals/result-eq-graph-1.ttl,
	tests/sparql/dawg/expr-equals/result-eq-graph-2.ttl,
	tests/sparql/dawg/expr-equals/result-eq-graph-3.ttl,
	tests/sparql/dawg/expr-equals/result-eq-graph-4.ttl,
	tests/sparql/dawg/expr-equals/result-eq-graph-5.ttl,
	tests/sparql/dawg/expr-equals/result-eq2-1.ttl,
	tests/sparql/dawg/expr-equals/result-eq2-2.ttl,
	tests/sparql/dawg/expr-equals/result-eq2-graph-1.ttl,
	tests/sparql/dawg/expr-ops, tests/sparql/dawg/expr-ops/data.ttl,
	tests/sparql/dawg/expr-ops/manifest.ttl,
	tests/sparql/dawg/expr-ops/query-ge-1.rq,
	tests/sparql/dawg/expr-ops/query-le-1.rq,
	tests/sparql/dawg/expr-ops/query-minus-1.rq,
	tests/sparql/dawg/expr-ops/query-mul-1.rq,
	tests/sparql/dawg/expr-ops/query-plus-1.rq,
	tests/sparql/dawg/expr-ops/query-unminus-1.rq,
	tests/sparql/dawg/expr-ops/query-unplus-1.rq,
	tests/sparql/dawg/expr-ops/result-ge-1.srx,
	tests/sparql/dawg/expr-ops/result-le-1.srx,
	tests/sparql/dawg/expr-ops/result-minus-1.srx,
	tests/sparql/dawg/expr-ops/result-mul-1.srx,
	tests/sparql/dawg/expr-ops/result-plus-1.srx,
	tests/sparql/dawg/expr-ops/result-unminus-1.srx,
	tests/sparql/dawg/expr-ops/result-unplus-1.srx,
	tests/sparql/dawg/extended-manifest-evaluation.ttl,
	tests/sparql/dawg/graph, tests/sparql/dawg/graph/data-g1.ttl,
	tests/sparql/dawg/graph/data-g2.ttl,
	tests/sparql/dawg/graph/data-g3.ttl,
	tests/sparql/dawg/graph/data-g4.ttl,
	tests/sparql/dawg/graph/graph-01.rq,
	tests/sparql/dawg/graph/graph-01.ttl,
	tests/sparql/dawg/graph/graph-02.rq,
	tests/sparql/dawg/graph/graph-02.ttl,
	tests/sparql/dawg/graph/graph-03.rq,
	tests/sparql/dawg/graph/graph-03.ttl,
	tests/sparql/dawg/graph/graph-04.rq,
	tests/sparql/dawg/graph/graph-04.ttl,
	tests/sparql/dawg/graph/graph-05.rq,
	tests/sparql/dawg/graph/graph-05.ttl,
	tests/sparql/dawg/graph/graph-06.rq,
	tests/sparql/dawg/graph/graph-06.ttl,
	tests/sparql/dawg/graph/graph-07.rq,
	tests/sparql/dawg/graph/graph-07.ttl,
	tests/sparql/dawg/graph/graph-08.rq,
	tests/sparql/dawg/graph/graph-08.ttl,
	tests/sparql/dawg/graph/graph-09.rq,
	tests/sparql/dawg/graph/graph-09.ttl,
	tests/sparql/dawg/graph/graph-10.rq,
	tests/sparql/dawg/graph/graph-10.ttl,
	tests/sparql/dawg/graph/graph-11.rq,
	tests/sparql/dawg/graph/graph-11.ttl,
	tests/sparql/dawg/graph/manifest.ttl, tests/sparql/dawg/i18n,
	tests/sparql/dawg/i18n/.htaccess,
	tests/sparql/dawg/i18n/kanji-01-results.ttl,
	tests/sparql/dawg/i18n/kanji-01.rq,
	tests/sparql/dawg/i18n/kanji-02-results.ttl,
	tests/sparql/dawg/i18n/kanji-02.rq,
	tests/sparql/dawg/i18n/kanji.ttl,
	tests/sparql/dawg/i18n/manifest.ttl,
	tests/sparql/dawg/i18n/normalization-01-results.ttl,
	tests/sparql/dawg/i18n/normalization-01.rq,
	tests/sparql/dawg/i18n/normalization-01.ttl,
	tests/sparql/dawg/i18n/normalization-02-results.ttl,
	tests/sparql/dawg/i18n/normalization-02.rq,
	tests/sparql/dawg/i18n/normalization-02.ttl,
	tests/sparql/dawg/i18n/normalization-03-results.ttl,
	tests/sparql/dawg/i18n/normalization-03.rq,
	tests/sparql/dawg/i18n/normalization-03.ttl,
	tests/sparql/dawg/manifest-evaluation.ttl,
	tests/sparql/dawg/manifest-syntax.ttl,
	tests/sparql/dawg/open-world,
	tests/sparql/dawg/open-world/data-1.ttl,
	tests/sparql/dawg/open-world/data-2.ttl,
	tests/sparql/dawg/open-world/data-3.ttl,
	tests/sparql/dawg/open-world/data-4.ttl,
	tests/sparql/dawg/open-world/date-1-result.srx,
	tests/sparql/dawg/open-world/date-1.rq,
	tests/sparql/dawg/open-world/date-2-result.srx,
	tests/sparql/dawg/open-world/date-2.rq,
	tests/sparql/dawg/open-world/date-3-result.srx,
	tests/sparql/dawg/open-world/date-3.rq,
	tests/sparql/dawg/open-world/date-4-result.srx,
	tests/sparql/dawg/open-world/date-4.rq,
	tests/sparql/dawg/open-world/manifest.ttl,
	tests/sparql/dawg/open-world/open-cmp-01-result.srx,
	tests/sparql/dawg/open-world/open-cmp-01.rq,
	tests/sparql/dawg/open-world/open-cmp-02-result.srx,
	tests/sparql/dawg/open-world/open-cmp-02.rq,
	tests/sparql/dawg/open-world/open-eq-01-result.srx,
	tests/sparql/dawg/open-world/open-eq-01.rq,
	tests/sparql/dawg/open-world/open-eq-02-result.srx,
	tests/sparql/dawg/open-world/open-eq-02.rq,
	tests/sparql/dawg/open-world/open-eq-03-result.srx,
	tests/sparql/dawg/open-world/open-eq-03.rq,
	tests/sparql/dawg/open-world/open-eq-04-result.srx,
	tests/sparql/dawg/open-world/open-eq-04.rq,
	tests/sparql/dawg/open-world/open-eq-05-result.srx,
	tests/sparql/dawg/open-world/open-eq-05.rq,
	tests/sparql/dawg/open-world/open-eq-06-result.srx,
	tests/sparql/dawg/open-world/open-eq-06.rq,
	tests/sparql/dawg/open-world/open-eq-07-result.srx,
	tests/sparql/dawg/open-world/open-eq-07.rq,
	tests/sparql/dawg/open-world/open-eq-08-result.srx,
	tests/sparql/dawg/open-world/open-eq-08.rq,
	tests/sparql/dawg/open-world/open-eq-09-result.srx,
	tests/sparql/dawg/open-world/open-eq-09.rq,
	tests/sparql/dawg/open-world/open-eq-10-result.srx,
	tests/sparql/dawg/open-world/open-eq-10.rq,
	tests/sparql/dawg/open-world/open-eq-11-result.srx,
	tests/sparql/dawg/open-world/open-eq-11.rq,
	tests/sparql/dawg/open-world/open-eq-12-result.srx,
	tests/sparql/dawg/open-world/open-eq-12.rq,
	tests/sparql/dawg/open-world/sameTerm-StringSimpleLiteralCmp.srx,
	tests/sparql/dawg/open-world/sameTerm-eq-StringSimpleLiteralCmp.srx,
	tests/sparql/dawg/open-world/sameTerm-eq.rq,
	tests/sparql/dawg/open-world/sameTerm-eq.srx,
	tests/sparql/dawg/open-world/sameTerm-manifest.ttl,
	tests/sparql/dawg/open-world/sameTerm-not-eq-StringSimpleLiteralCmp.srx,
	tests/sparql/dawg/open-world/sameTerm-not-eq.rq,
	tests/sparql/dawg/open-world/sameTerm-not-eq.srx,
	tests/sparql/dawg/open-world/sameTerm.rq,
	tests/sparql/dawg/open-world/sameTerm.srx,
	tests/sparql/dawg/open-world/sameTerm.ttl,
	tests/sparql/dawg/optional,
	tests/sparql/dawg/optional/complex-data-1.ttl,
	tests/sparql/dawg/optional/complex-data-2.ttl,
	tests/sparql/dawg/optional/data.ttl,
	tests/sparql/dawg/optional/manifest.ttl,
	tests/sparql/dawg/optional/q-opt-1.rq,
	tests/sparql/dawg/optional/q-opt-2.rq,
	tests/sparql/dawg/optional/q-opt-3.rq,
	tests/sparql/dawg/optional/q-opt-complex-1.rq,
	tests/sparql/dawg/optional/q-opt-complex-2.rq,
	tests/sparql/dawg/optional/q-opt-complex-3.rq,
	tests/sparql/dawg/optional/q-opt-complex-4.rq,
	tests/sparql/dawg/optional/result-opt-1.ttl,
	tests/sparql/dawg/optional/result-opt-2.ttl,
	tests/sparql/dawg/optional/result-opt-3.ttl,
	tests/sparql/dawg/optional/result-opt-complex-1.ttl,
	tests/sparql/dawg/optional/result-opt-complex-2.ttl,
	tests/sparql/dawg/optional/result-opt-complex-3.ttl,
	tests/sparql/dawg/optional/result-opt-complex-4.ttl,
	tests/sparql/dawg/optional-filter,
	tests/sparql/dawg/optional-filter/data-1.ttl,
	tests/sparql/dawg/optional-filter/expr-1-result.ttl,
	tests/sparql/dawg/optional-filter/expr-1.rq,
	tests/sparql/dawg/optional-filter/expr-2-result.ttl,
	tests/sparql/dawg/optional-filter/expr-2.rq,
	tests/sparql/dawg/optional-filter/expr-3-result.ttl,
	tests/sparql/dawg/optional-filter/expr-3.rq,
	tests/sparql/dawg/optional-filter/manifest.ttl,
	tests/sparql/dawg/regex, tests/sparql/dawg/regex/manifest.ttl,
	tests/sparql/dawg/regex/regex-data-01.ttl,
	tests/sparql/dawg/regex/regex-query-001.rq,
	tests/sparql/dawg/regex/regex-query-002.rq,
	tests/sparql/dawg/regex/regex-query-003.rq,
	tests/sparql/dawg/regex/regex-query-004.rq,
	tests/sparql/dawg/regex/regex-result-001.ttl,
	tests/sparql/dawg/regex/regex-result-002.ttl,
	tests/sparql/dawg/regex/regex-result-003.ttl,
	tests/sparql/dawg/regex/regex-result-004.ttl,
	tests/sparql/dawg/slice, tests/sparql/dawg/solution-seq,
	tests/sparql/dawg/solution-seq/data.ttl,
	tests/sparql/dawg/solution-seq/manifest.ttl,
	tests/sparql/dawg/solution-seq/slice-01.rq,
	tests/sparql/dawg/solution-seq/slice-02.rq,
	tests/sparql/dawg/solution-seq/slice-03.rq,
	tests/sparql/dawg/solution-seq/slice-04.rq,
	tests/sparql/dawg/solution-seq/slice-10.rq,
	tests/sparql/dawg/solution-seq/slice-11.rq,
	tests/sparql/dawg/solution-seq/slice-12.rq,
	tests/sparql/dawg/solution-seq/slice-13.rq,
	tests/sparql/dawg/solution-seq/slice-20.rq,
	tests/sparql/dawg/solution-seq/slice-21.rq,
	tests/sparql/dawg/solution-seq/slice-22.rq,
	tests/sparql/dawg/solution-seq/slice-23.rq,
	tests/sparql/dawg/solution-seq/slice-24.rq,
	tests/sparql/dawg/solution-seq/slice-results-01.ttl,
	tests/sparql/dawg/solution-seq/slice-results-02.ttl,
	tests/sparql/dawg/solution-seq/slice-results-03.ttl,
	tests/sparql/dawg/solution-seq/slice-results-04.ttl,
	tests/sparql/dawg/solution-seq/slice-results-10.ttl,
	tests/sparql/dawg/solution-seq/slice-results-11.ttl,
	tests/sparql/dawg/solution-seq/slice-results-12.ttl,
	tests/sparql/dawg/solution-seq/slice-results-13.ttl,
	tests/sparql/dawg/solution-seq/slice-results-20.ttl,
	tests/sparql/dawg/solution-seq/slice-results-21.ttl,
	tests/sparql/dawg/solution-seq/slice-results-22.ttl,
	tests/sparql/dawg/solution-seq/slice-results-23.ttl,
	tests/sparql/dawg/solution-seq/slice-results-24.ttl,
	tests/sparql/dawg/sort, tests/sparql/dawg/sort/.manifest.ttl.swp,
	tests/sparql/dawg/sort/data-sort-1.ttl,
	tests/sparql/dawg/sort/data-sort-11.ttl,
	tests/sparql/dawg/sort/data-sort-3.ttl,
	tests/sparql/dawg/sort/data-sort-4.ttl,
	tests/sparql/dawg/sort/data-sort-6.ttl,
	tests/sparql/dawg/sort/data-sort-7.ttl,
	tests/sparql/dawg/sort/data-sort-8.ttl,
	tests/sparql/dawg/sort/data-sort-9.ttl,
	tests/sparql/dawg/sort/data-sort-builtin.ttl,
	tests/sparql/dawg/sort/data-sort-function.ttl,
	tests/sparql/dawg/sort/data-sort-numbers.ttl,
	tests/sparql/dawg/sort/extended-manifest.ttl,
	tests/sparql/dawg/sort/manifest.ttl,
	tests/sparql/dawg/sort/query-sort-1.rq,
	tests/sparql/dawg/sort/query-sort-10.rq,
	tests/sparql/dawg/sort/query-sort-2.rq,
	tests/sparql/dawg/sort/query-sort-3.rq,
	tests/sparql/dawg/sort/query-sort-4.rq,
	tests/sparql/dawg/sort/query-sort-5.rq,
	tests/sparql/dawg/sort/query-sort-6.rq,
	tests/sparql/dawg/sort/query-sort-9.rq,
	tests/sparql/dawg/sort/query-sort-builtin.rq,
	tests/sparql/dawg/sort/query-sort-function.rq,
	tests/sparql/dawg/sort/query-sort-numbers.rq,
	tests/sparql/dawg/sort/result-sort-1.rdf,
	tests/sparql/dawg/sort/result-sort-10.rdf,
	tests/sparql/dawg/sort/result-sort-11.ttl,
	tests/sparql/dawg/sort/result-sort-2.rdf,
	tests/sparql/dawg/sort/result-sort-3.rdf,
	tests/sparql/dawg/sort/result-sort-4.rdf,
	tests/sparql/dawg/sort/result-sort-5.rdf,
	tests/sparql/dawg/sort/result-sort-6.rdf,
	tests/sparql/dawg/sort/result-sort-7.rdf,
	tests/sparql/dawg/sort/result-sort-8.rdf,
	tests/sparql/dawg/sort/result-sort-9.rdf,
	tests/sparql/dawg/sort/result-sort-builtin.ttl,
	tests/sparql/dawg/sort/result-sort-function.ttl,
	tests/sparql/dawg/sort/result-sort-numbers.ttl,
	tests/sparql/dawg/syntax, tests/sparql/dawg/syntax-sparql1,
	tests/sparql/dawg/syntax-sparql1/manifest.ttl,
	tests/sparql/dawg/syntax-sparql1/syntax-basic-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-basic-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-basic-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-basic-04.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-basic-05.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-basic-06.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-bnodes-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-bnodes-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-bnodes-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-bnodes-04.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-bnodes-05.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-expr-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-expr-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-expr-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-expr-04.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-expr-05.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-forms-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-forms-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-limit-offset-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-limit-offset-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-limit-offset-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-limit-offset-04.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lists-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lists-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lists-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lists-04.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lists-05.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-04.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-05.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-06.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-07.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-08.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-09.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-10.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-11.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-12.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-13.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-14.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-15.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-16.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-17.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-18.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-19.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-lit-20.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-order-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-order-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-order-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-order-04.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-order-05.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-order-06.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-order-07.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-pat-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-pat-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-pat-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-pat-04.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-qname-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-qname-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-qname-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-qname-04.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-qname-05.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-qname-06.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-qname-07.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-qname-08.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-02.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-03.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-05.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-06.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-07.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-08.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-09.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-10.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-11.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-12.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-13.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-struct-14.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-union-01.rq,
	tests/sparql/dawg/syntax-sparql1/syntax-union-02.rq,
	tests/sparql/dawg/syntax-sparql2,
	tests/sparql/dawg/syntax-sparql2/manifest.ttl,
	tests/sparql/dawg/syntax-sparql2/syntax-bnode-01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-bnode-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-bnode-03.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-dataset-01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-dataset-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-dataset-03.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-dataset-04.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-esc-01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-esc-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-esc-03.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-esc-04.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-esc-05.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-ask-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-construct01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-construct02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-construct03.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-construct04.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-construct06.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-describe01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-describe02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-select-01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-form-select-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-function-01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-function-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-function-03.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-function-04.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-03.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-04.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-05.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-06.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-07.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-08.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-09.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-10.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-11.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-12.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-13.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-general-14.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-graph-01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-graph-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-graph-03.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-graph-04.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-graph-05.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-keywords-01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-keywords-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-keywords-03.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-lists-01.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-lists-02.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-lists-03.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-lists-04.rq,
	tests/sparql/dawg/syntax-sparql2/syntax-lists-05.rq,
	tests/sparql/dawg/syntax-sparql3,
	tests/sparql/dawg/syntax-sparql3/manifest.ttl,
	tests/sparql/dawg/syntax-sparql3/syn-01.rq,
	tests/sparql/dawg/syntax-sparql3/syn-02.rq,
	tests/sparql/dawg/syntax-sparql3/syn-03.rq,
	tests/sparql/dawg/syntax-sparql3/syn-04.rq,
	tests/sparql/dawg/syntax-sparql3/syn-05.rq,
	tests/sparql/dawg/syntax-sparql3/syn-06.rq,
	tests/sparql/dawg/syntax-sparql3/syn-07.rq,
	tests/sparql/dawg/syntax-sparql3/syn-08.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-01.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-02.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-03.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-04.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-05.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-06.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-07.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-08.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-09.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-10.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-11.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-12.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-13.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-14.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-15.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-16.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-17.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-18.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-19.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-20.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-21.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-22.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-23.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-24.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-25.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-26.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-27.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-28.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-29.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-30.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-31.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-bnode-dot.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-bnodes-missing-pvalues-01.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-bnodes-missing-pvalues-02.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-empty-optional-01.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-empty-optional-02.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-filter-missing-parens.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-lone-list.rq,
	tests/sparql/dawg/syntax-sparql3/syn-bad-lone-node.rq,
	tests/sparql/dawg/syntax-sparql3/syn-blabel-cross-filter.rq,
	tests/sparql/dawg/syntax-sparql3/syn-blabel-cross-graph-bad.rq,
	tests/sparql/dawg/syntax-sparql3/syn-blabel-cross-optional-bad.rq,
	tests/sparql/dawg/syntax-sparql3/syn-blabel-cross-union-bad.rq,
	tests/sparql/dawg/syntax-sparql4,
	tests/sparql/dawg/syntax-sparql4/manifest.ttl,
	tests/sparql/dawg/syntax-sparql4/syn-09.rq,
	tests/sparql/dawg/syntax-sparql4/syn-10.rq,
	tests/sparql/dawg/syntax-sparql4/syn-11.rq,
	tests/sparql/dawg/syntax-sparql4/syn-bad-34.rq,
	tests/sparql/dawg/syntax-sparql4/syn-bad-35.rq,
	tests/sparql/dawg/syntax-sparql4/syn-bad-36.rq,
	tests/sparql/dawg/syntax-sparql4/syn-bad-37.rq,
	tests/sparql/dawg/syntax-sparql4/syn-bad-38.rq,
	tests/sparql/dawg/syntax-sparql4/syn-bad-GRAPH-breaks-BGP.rq,
	tests/sparql/dawg/syntax-sparql4/syn-bad-OPT-breaks-BGP.rq,
	tests/sparql/dawg/syntax-sparql4/syn-bad-UNION-breaks-BGP.rq,
	tests/sparql/dawg/syntax-sparql4/syn-leading-digits-in-prefixed-names.rq,
	tests/sparql/dawg/triple-match,
	tests/sparql/dawg/triple-match/data-01.ttl,
	tests/sparql/dawg/triple-match/data-02.ttl,
	tests/sparql/dawg/triple-match/data-03.ttl,
	tests/sparql/dawg/triple-match/dawg-data-01.ttl,
	tests/sparql/dawg/triple-match/dawg-tp-01.rq,
	tests/sparql/dawg/triple-match/dawg-tp-02.rq,
	tests/sparql/dawg/triple-match/dawg-tp-03.rq,
	tests/sparql/dawg/triple-match/dawg-tp-04.rq,
	tests/sparql/dawg/triple-match/dawg-tp-05.rq,
	tests/sparql/dawg/triple-match/manifest.ttl,
	tests/sparql/dawg/triple-match/result-tp-01.ttl,
	tests/sparql/dawg/triple-match/result-tp-02.ttl,
	tests/sparql/dawg/triple-match/result-tp-03.ttl,
	tests/sparql/dawg/triple-match/result-tp-04.ttl,
	tests/sparql/dawg/type-promotion,
	tests/sparql/dawg/type-promotion/false.ttl,
	tests/sparql/dawg/type-promotion/manifest.ttl,
	tests/sparql/dawg/type-promotion/tP-byte-short-fail.rq,
	tests/sparql/dawg/type-promotion/tP-byte-short.rq,
	tests/sparql/dawg/type-promotion/tP-decimal-decimal.rq,
	tests/sparql/dawg/type-promotion/tP-double-decimal-fail.rq,
	tests/sparql/dawg/type-promotion/tP-double-decimal.rq,
	tests/sparql/dawg/type-promotion/tP-double-double.rq,
	tests/sparql/dawg/type-promotion/tP-double-float-fail.rq,
	tests/sparql/dawg/type-promotion/tP-double-float.rq,
	tests/sparql/dawg/type-promotion/tP-float-decimal-fail.rq,
	tests/sparql/dawg/type-promotion/tP-float-decimal.rq,
	tests/sparql/dawg/type-promotion/tP-float-float.rq,
	tests/sparql/dawg/type-promotion/tP-int-short.rq,
	tests/sparql/dawg/type-promotion/tP-integer-short.rq,
	tests/sparql/dawg/type-promotion/tP-long-short.rq,
	tests/sparql/dawg/type-promotion/tP-negativeInteger-short.rq,
	tests/sparql/dawg/type-promotion/tP-nonNegativeInteger-short.rq,
	tests/sparql/dawg/type-promotion/tP-nonPositiveInteger-short.rq,
	tests/sparql/dawg/type-promotion/tP-positiveInteger-short.rq,
	tests/sparql/dawg/type-promotion/tP-short-byte-fail.rq,
	tests/sparql/dawg/type-promotion/tP-short-decimal.rq,
	tests/sparql/dawg/type-promotion/tP-short-double.rq,
	tests/sparql/dawg/type-promotion/tP-short-float.rq,
	tests/sparql/dawg/type-promotion/tP-short-int-fail.rq,
	tests/sparql/dawg/type-promotion/tP-short-long-fail.rq,
	tests/sparql/dawg/type-promotion/tP-short-short-fail.rq,
	tests/sparql/dawg/type-promotion/tP-short-short.rq,
	tests/sparql/dawg/type-promotion/tP-unsignedByte-short.rq,
	tests/sparql/dawg/type-promotion/tP-unsignedInt-short.rq,
	tests/sparql/dawg/type-promotion/tP-unsignedLong-short.rq,
	tests/sparql/dawg/type-promotion/tP-unsignedShort-short.rq,
	tests/sparql/dawg/type-promotion/tP.ttl,
	tests/sparql/dawg/type-promotion/true.ttl: Import DAWG latest
	SPARQL tests

2007-09-30  Lauri Aalto <laalto@iki.fi>

	* tests/sparql/check-sparql: Recognize
	http://jena.hpl.hp.com/2005/05/test-manifest-extra#TestSyntax and
	#TestBadSyntax as syntax tests.

	* tests/sparql/check-sparql: Use stderr consistently for debug messages.

2007-09-29  Dave Beckett <dave@dajobe.org>

	* src/rasqal_result_formats.c: Adjust for
	raptor_new_xml_element_from_namespace_local_name signature change

2007-09-28  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr.c: (rasqal_new_data_graph) Does not take
	ownership or uri & name_uri but copies them.

2007-09-27  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_engine.c: (rasqal_free_gp_data) Do not assume graph
	pattern is non-NULL.

2007-09-26  Dave Beckett <dave@dajobe.org>

	* autogen.sh: autogen.sh with perl version grep script

2007-09-26  Lauri Aalto <laalto@iki.fi>

	* src, tests/engine, tests/laqrs, tests/laqrs/syntax, utils:
	Props: ignore .exes, Makefile, Makefile.in

2007-09-25  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_result_formats.c: (rasqal_query_results_write_xml_result4)
	Refactoring: Replaced rasqal_query_results_new_xml_element() with
	raptor_new_xml_element_from_namespace_local_name().

2007-09-24  Lauri Aalto <laalto@iki.fi>

	* 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-21  Lauri Aalto <laalto@iki.fi>

	* src/sparql_parser.y: (rasqal_sparql_query_engine_terminate)
	Clean up nicely even if could not init query engine.

	* src/rasqal_internal.h, src/rasqal_query.c, src/rdql_parser.y,
	src/sparql_parser.y: (rasqal queries) Added query string length
	field to rasqal_query_s. Moved padding query strings with two
	YY_END_OF_BUFFER_CHARs (NULs) from bison parsers to
	rasqal_query_prepare() - prevents a memory leak if there's an
	error parsing the string. Removed query_string from *_parse()
	prototypes as the query string is already available in the query
	structure passed in.

	* src/rasqal_result_formats.c: (rasqal_query_results_write_xml_result4)
	Check for alloc failures and clean up on error.

	* src/rasqal_query_results.c: (rasqal_query_results_reset) Do not
	clear executed flag to allow cleanup on partially initialized
	results.

	* src/rasqal_general.c: rasqal_general: Check for alloc failures
	and clean up on error.

	* src/rasqal_general.c: (rasqal_finish) Allow cleanup even if init
	was incomplete

	* src/rasqal_engine.c: (rasqal_engine_merge_graph_patterns) Fix
	constant 1 > 1 check for the number of triples.

	* src/rasqal_engine.c: (rasqal_engine_graph_pattern_init)
	Robustness fixes

	* src/rasqal_engine.c: (rasqal_free_gp_data) Check against
	negative start_column

	* src/rasqal_engine.c: (rasqal_engine_graph_pattern_init) Check
	for alloc failure

	* src/rasqal_engine.c: (rasqal_engine_merge_triples) Fix compiler
	warning about uninitialized variables.

	* src/rasqal_engine.c: (rasqal_engine_prepare) Check
	rasqal_engine_assign_variables() return value.

	* src/rasqal_engine.c: rasqal_engine: Check for alloc failures and
	clean up on errors.

	* src/rasqal_expr.c: rasqal_expr: Fix compiler warnings about not
	returning a value from a non-void function (for compilers that do
	not recognize abort() as non-returning function).

	* src/rasqal_expr.c: rasqal_expr: Check for alloc failures and
	clean up on errors.

	* src/rasqal_graph_pattern.c: rasqal_graph_pattern: Check for
	alloc failures and clean up on errors.

	* src/rasqal_literal.c: (rasqal_formula_join) Free formulas and
	return NULL on error.

	* src/rasqal_literal.c: rasqal_literal: Fix compiler warnings
	about uninitialized variables. Fix compiler warnings about not
	returning a value from a non-void function (for compilers that do
	not recognize abort() as non-returning function).

	* src/rasqal_literal.c: rasqal_literal: Check for alloc
	failures. Clean up on failure.

	* src/rasqal_query.c: rasqal_query: Check for alloc
	failures. Clean up on failure.

	* src/rasqal_query.c: (rasqal_new_query) Check for alloc
	failures. Clean up on failure.

	* src/rasqal_query.c: (rasqal_query_escape_counted_string) Fix
	compiler warning about type punning.

	* src/rasqal_query_results.c: (rasqal_free_query_results) Do not
	indirect query_results before making sure it is not NULL.

	* src/rasqal_query_results.c: (rasqal_new_query_results) Check for
	alloc failure

	* src/rasqal_result_formats.c: rasqal_result_formats: Check for
	alloc failures. Clean up on failure.

	* src/fix-bison: bison parsers / fix-bison: Fix compiler warning
	about empty declarations (remove semicolon).

	* src/rasqal_feature.c: Fix typos in comments

	* Makefile.am, autogen.sh, configure.ac, data/Makefile.am,
	docs/Makefile.am, src/Makefile.am, tests/Makefile.am,
	tests/engine/Makefile.am, tests/laqrs/Makefile.am,
	tests/laqrs/syntax/Makefile.am, tests/rdql/Makefile.am,
	tests/rdql/testsuite/Makefile.am, tests/sparql/Expr1/Makefile.am,
	tests/sparql/Expr2/Makefile.am,
	tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprEquals/Makefile.am, tests/sparql/Makefile.am,
	tests/sparql/SyntaxDev/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am,
	tests/sparql/SyntaxFull/Makefile.am,
	tests/sparql/ValueTesting/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/examples/Makefile.am,
	tests/sparql/part1/Makefile.am, tests/sparql/regex/Makefile.am,
	tests/sparql/simple/Makefile.am, tests/sparql/sort/Makefile.am,
	tests/sparql/survey/Makefile.am, tests/sparql/syntax/Makefile.am,
	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

	* src/Makefile.am, tests/engine/Makefile.am: Added $(EXEEXT)s to
	Makefiles to fix "make clean" on cygwin. Partial fix to
	http://bugs.librdf.org/mantis/view.php?id=235

	* autogen.sh: rasqal autogen.sh $dir quoting. Partial fix to
	http://bugs.librdf.org/mantis/view.php?id=234

2007-09-20  Dave Beckett <dave@dajobe.org>

	* tests/sparql/SyntaxFull/Makefile.am: Expect 2 more failures :(

	* tests/engine/rasqal_order_test.c: Formatting

2007-09-19  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: Fix exit

	* src/sparql_parser.y: Protect destructors from calling on NULL
	object - such as in an error case.

	* src/sparql_lexer.l: Move bare +, - alone to after recognising
	all other numerics.

	* src/sparql_lexer.l: Allow unary +/- before an integer.

	* src/sparql_parser.y: (OrderCondition): Allow a built-in call at
	the top level

	* src/sparql_parser.y: (LimitOffsetOpt): Added to allow LIMIT and
	OFFSET in any order or absent.
	(LimitClause): Renamed from LimitClauseOpt
	(OffsetClause): Renamed from OffsetClauseOpt

	* tests/sparql/check-sparql: Output EARL.  Handle syntax only tests

2007-09-18  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: help

	* tests/sparql/check-sparql: use perl Getopt::Long and Pod::Usage

2007-08-25  Dave Beckett <dave@dajobe.org>

	* src/rasqal_limit_test.c: Tidy messages

	* src/Makefile.am, src/rasqal_engine.c, src/rasqal_limit_test.c:
	Added rasqal_iimit_test.c

2007-08-24  Dave Beckett <dave@dajobe.org>

	* data/Makefile.am, data/letters.nt: Added letters.nt

	* src/rasqal_literal.c: (rasqal_literal_as_integer): Return
	integer values correctly.  How did this ever work?
	Fixes Issue#0000221 http://bugs.librdf.org/mantis/view.php?id=221

	* src/sparql_parser.y: Destruct all tokens so memory does not leak
	on error.
	Fixes Issue#0000225 http://bugs.librdf.org/mantis/view.php?id=225

	* tests/sparql/check-sparql: guess for xml:lang

	* tests/sparql/check-sparql: tidy

	* tests/sparql/check-sparql: Crude srx reading

	* tests/sparql/Makefile.am: Removed BNodes dir

	* tests/sparql/Makefile.am: Added BNodes

	* tests/sparql/check-sparql: Add error messages when rapper fails
	- and abort test. Fix more assumptions when no result is expected.

2007-08-23  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: (read_rdf_results_file): Renamed from
	read_turtle_results_file and guesses result rdf format - turtle/n3
	or rdf seem to be the choiecs.

	* tests/sparql/check-sparql: Refactored to pull out
	read_turtle_results_file

	* tests/sparql/check-sparql: pull apart results creation from
	writing result.out

	* src/rasqal_result_formats.c: Delete old SPARQL XML Result
	formats to leave just the latest draft and JSON.

	* src/Makefile.am, src/rasqal_general.c, src/rasqal_internal.h,
	src/rasqal_query_results.c, src/rasqal_result_formats.c (from
	/rasqal/trunk/src/rasqal_query_results.c:12462): Moved query
	result formatter code into new rasqal_result_formats.c from
	rasqal_query_results.c

2007-08-22  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c: (rasqal_query_results_get_boolean):
	Do not return error on finished. Finished has no meaning for
	boolean result.

	* src/rasqal_query_results.c: (rasqal_query_results_get_boolean):
	Simplify since now rasqal_engine_query_results_update does all the
	work.  Just count the results returned so far which will be at
	least 1 if there are any results.

	* src/rasqal_engine.c: (rasqal_engine_query_results_update): Let
	this be called for a boolean result, to get the first one.

2007-08-19  Dave Beckett <dave@dajobe.org>

	* src/sparql_parser.y: (BasedeclOpt): Use
	rasqal_query_set_base_uri to ensure the URI fields are updated
	correctly.
	Fixes Issue#0000219 http://bugs.librdf.org/mantis/view.php?id=219

	* src/rasqal_internal.h: Added rasqal_query_set_base_uri prototype

	* src/rasqal_query.c: (rasqal_query_prepare): Use
	rasqal_query_set_base_uri.
	(rasqal_query_set_base_uri): Added

	* src/rasqal_query_results.c: (rasqal_query_results_get_boolean):
	Get the first result row from a query in order to answer ASK.
	Fixes Issue#0000193 http://bugs.librdf.org/mantis/view.php?id=193

	* src/sparql_lexer.l: (rasqal_sparql_name_check): debug cast

	* src/sparql_parser.y: (WhereClauseOpt): Remove warning about
	optional SPARQL WHERE although it is still a dumb idea to have
	useless keywords.
	Fixes Issue#0000204 http://bugs.librdf.org/mantis/view.php?id=204

	* src/rasqal_expr.c: (rasqal_language_matches): * does not match a
	langString with no language.
	Fixes Issue#0000201 http://bugs.librdf.org/mantis/view.php?id=201

	* tests/sparql/ExprBuiltins/result-langMatches-3.ttl,
	tests/sparql/ExprBuiltins/result-langMatches-4.ttl: Fix expected
	result fixes for langMatches-[34]
	http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/2006Jun/0050.html

2007-08-17  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h: Applied rasqal part of symbian portability fix for
	Issue#0000203 http://bugs.librdf.org/mantis/view.php?id=203

2007-07-06  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c: Add 4th version of SPARQL XML
	Results format.
	(rasqal_init_query_results): Use
	rasqal_query_results_write_xml_result4 for latest version
	2007-06-14 named "xml" and demote previous one 2006-01-25 to name
	"xml-v3"
	(rasqal_query_results_write_xml_result4): Added to implement
	version 2007-06-14 with removal of attributes 'ordered' and
	'distinct'.

2007-06-13  Dave Beckett <dave@dajobe.org>

	* tests/sparql/ExprBuiltins/Makefile.am: LangMatches-2
	LangMatches-3 LangMatches-4 all pass leaving 2 failures

	* src/rasqal_expr.c: (rasqal_language_matches): Added to do proper
	language tag/range matching.
	(rasqal_expression_evaluate): RASQAL_EXPR_LANG:  Return an empty
	string for no language and NULL (error) for not a literal.
	RASQAL_EXPR_LANGMATCHES: Use rasqal_language_matches() above.
	Fixes Issue#0000201 http://bugs.librdf.org/mantis/view.php?id=201
	and makes tests sparql/ExprBuiltins/LangMatches-[234] pass.

2007-06-12  Dave Beckett <dave@dajobe.org>

	* tests/sparql/Expr2/Makefile.am: Fix for issue #0000199 makes
	query-bev-[1-4].rq pass

	* src/rasqal_literal.c: (rasqal_literal_as_boolean): Implement
	SPARQL EBV rules here.
	Fixes Issue#0000199 http://bugs.librdf.org/mantis/view.php?id=199
	and makes tests sparql/Expr2/query-bev-[1-4].rq pass

	* src/rasqal_redland.c: (redland_node_to_rasqal_literal): Casts
	for picky compiler.
	Fixes Issue#0000198 http://bugs.librdf.org/mantis/view.php?id=198

	* src/rasqal_expr.c: (rasqal_expression_evaluate): case
	RASQAL_EXPR_STR_MATCH, RASQAL_EXPR_STR_NMATCH and  RASQAL_EXPR_REGEX.
	Use pcre_free(re) to free PCRE object
	Fixes Issue#0000196 http://bugs.librdf.org/mantis/view.php?id=196

2007-06-02  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c: (rasqal_literal_as_floating): It is
	possible to promote a decimal to a float.
	Fixes Issue#0000197 http://bugs.librdf.org/mantis/view.php?id=197

2007-05-26  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h: Use RASQAL_API not RAPTOR_API here
	Fixes Issue#0000191 http://bugs.librdf.org/mantis/view.php?id=191

	* src/rasqal_literal.c: (rasqal_literal_string_to_native): Free
	original string for boolean, replacing with static.
	(rasqal_free_literal): Free boolean literal's datatype URI.  Fixes
	Issue#0000190 http://bugs.librdf.org/mantis/view.php?id=190

	* src/rasqal.h: Allow _declspec and __declspec
	Fixes Issue#0000188 http://bugs.librdf.org/mantis/view.php?id=188

2007-05-21  Dave Beckett <dave@dajobe.org>

	* configure.ac: Add -Wformat-security

2007-04-23  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c: (rasqal_literal_compare): Declare
	rasqal_literal_type type and add rest of cases to switches.

	* NEWS.html, configure.ac, src/win32_rasqal_config.h: Bump version
	to 0.9.15

2007-04-22  Dave Beckett  <dave@dajobe.org>

	* Snapshotted rasqal_0_9_14 for 0.9.14 release (SVN 12127)

	* docs/librasqal.3: rasqal_query_get_explain

	* docs/librasqal.3: 0.9.14 from 6 months ago

	* autogen.sh: Update autogen.sh

	* rasqal.pc.in: Add Libs.private

	* src/rasqal-config.in, src/rasqal_engine.c, src/rasqal_literal.c,
	src/rasqal_query.c, src/rasqal_query_results.c,
	src/rasqal_raptor.c, utils/roqet.c: casts for C++

	* docs/tmpl/section-expression.sgml, docs/tmpl/section-query.sgml,
	docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-query_results_formatter.sgml: docs

2007-04-21  Dave Beckett  <dave@dajobe.org>


	* src/rasqal.h: variable has @expression field.

	* src/rasqal_engine.c, src/rasqal_internal.h: Revert query engine
	back to 'working' optionals.  At least working as well as they did
	in the last release

	* src/rasqal.h: rasqal_expression has no variable

	* docs/tmpl/section-unused.sgml: expression no variable

	* docs/tmpl/section-query.sgml: rasqal_query_set_distinct

	* src/rasqal_graph_pattern.c: (rasqal_new_graph_pattern): Make
	static, only used here.

	* src/sparql_parser.y: (SelectTerm): Renamed from
	SelectExpressionTerm
	(SelectExpression): Uses AggregateExpression or Expression.
	(AggregateExpression): Added, just using CountAggregateExpression.
	(CountAggregateExpression): Added for COUNT(expr) and COUNT(*)

	* tests/laqrs/syntax/Makefile.am, tests/laqrs/syntax/count1.rq,
	tests/laqrs/syntax/count2.rq, tests/laqrs/syntax/count3.rq,
	tests/laqrs/syntax/count4.rq: more COUNT tests

	* utils/roqet.c: Declare any query namespaces in the output
	serializer

	* utils/roqet.c: Allow -r to take a serializer argument.  Check it
	with raptor_serializer_syntax_name_check

	* tests/Makefile.am: No local_tests here for 6 months

	* tests/laqrs/Makefile.am, tests/laqrs/check-laqrs: remove
	check-laqrs

	* tests/laqrs/syntax/Makefile.am: renames

	* tests/laqrs/syntax/bad-select-expr.rq: comment

	* src/sparql_parser.y: (SelectExpressionTerm): Do not allow a
	select expression to contain the variable name it is named for.
	(SelectExpression): Tidy error returns.

	* src/rasqal_internal.h: Added rasqal_expression_mentions_variable
	prototype

	* src/rasqal_expr.c: (rasqal_expression_has_variable): Added.
	(rasqal_expression_mentions_variable): Added to check if an
	expression mentions a rasqal_variable.

	* src/rasqal.h: rasqal_expression does not need a rasqal_variable
	field.

	* tests/laqrs, tests/laqrs/Makefile.am, tests/laqrs/check-laqrs,
	tests/laqrs/syntax, tests/laqrs/syntax/Makefile.am,
	tests/laqrs/syntax/bad-select-expr.rq,
	tests/laqrs/syntax/bug156.rq, tests/laqrs/syntax/coverage.rq,
	tests/laqrs/syntax/data.n3, tests/laqrs/syntax/delete.rq,
	tests/laqrs/syntax/explain.rq: laqrs

	* src/sparql_parser.y: (SelectExpressionListTail): A list or a
	wildcard.
	(SelectExpressionListTail): Added to ensure select expression list
	is always 1 or more item.
	(SelectExpressionTerm): A variable ?var or a select expression
	assigned to a name
	(SelectExpression): Docs and forbid COUNT in sparql.

	* src/sparql_parser.y: Move '*' to SelectExpressionList from
	SelectQuery

	* src/sparql_parser.y: Add getopt() simple handling for -d and -i
	LANGUAGE for sparql and laqrs.

	* configure.ac: Added tests/laqrs/syntax/Makefile

	* configure.ac: add tests/laqrs/Makefile

	* tests/Makefile.am: Add laqrs sub dir

	* src/rdql_lexer.l: Allow '-' in language tags

	* src/sparql_lexer.l: Allow '-' in language tags
	Fixes Issue#0000182 http://bugs.librdf.org/mantis/view.php?id=182

	* src/sparql_lexer.l: Make <_:NAME> (an illegal URI) act like _:NAME.
	Fixes Issue#0000152 http://bugs.librdf.org/mantis/view.php?id=152

	* tests/sparql/syntax/Makefile.am,
	tests/sparql/syntax/blankuri.rq: added blankuri.rq

2007-04-15  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_engine.c: (rasqal_engine_query_result_row_compare):
	Only do distinct=1 DISTINCT, no code for REDUCE yet.

	* src/rasqal_query_results.c:
	(rasqal_query_results_write_xml_result3): Allow for a potential
	new output argument reduced=true/false.  Not yet enabled.

	* src/rasqal_query.c: (rasqal_query_get_distinct): Rename arg to
	distinct_mode.
	(rasqal_query_set_distinct): Rename arg to distinct_mode and
	accept values 0, 1 and 2.
	(rasqal_query_print, rasqal_query_write_sparql_20060406): Print
	distinct or reduced.

2007-04-14  Dave Beckett  <dave@dajobe.org>

	* src/rasqal.h: Alter rasqal_query_set_distinct arg to be named
	distinct_mode (no API change)

	* src/rasqal_internal.h: (struct rasqal_query_s): distinct now
	takes 0, 1 or 2 to allow for REDUCED.

	* src/sparql_parser.y: Add REDUCED token
	(SelectQuery): Add REDUCED wherever DISTINCT can go

	* src/sparql_lexer.l: Add REDUCED keyword

	* tests/rdql/testsuite/check-rdql: add debug if RASQAL_DEBUG set

	* tests/sparql/check-sparql: hardcode turtle as input type add
	debug if RASQAL_DEBUG set

	* tests/rdql/testsuite/check-rdql: hardcode turtle as input type

2007-04-08  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_engine.c:
	(rasqal_engine_triple_graph_pattern_get_next_match): Fix revision
	with an exact match in a 1 TP query.

2007-03-25  Dave Beckett  <dave@dajobe.org>

	* utils/roqet.c: Print all informational and help messages to
	stderr.  Only results of querying and the help (-h/--help) message
	goes to stdout now.

2007-03-07  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_engine.c: (rasqal_optional_graph_pattern_execute_init,
	rasqal_optional_graph_pattern_execute_bind): Restored.

2007-03-06  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_engine.c: Removed rasqal_engine_gp_data unused fields
	optional_graph_pattern, optional_graph_pattern_matches_count,
	matches_returned Added rasqal_engine_gp_data field matches
	(rasqal_engine_triple_graph_pattern_get_next_match): Side effect
	return matches count.
	(rasqal_basic_graph_pattern_execute_bind): Count matches.
	(rasqal_group_graph_pattern_execute_init): Init start and current
	graph patterns.
	(rasqal_group_graph_pattern_execute_bind): Count matches, use
	start_graph_pattern for backtracing.
	(asqal_engine_graph_pattern_init): Merged
	rasqal_engine_graph_pattern_reset and
	rasqal_engine_graph_pattern_init
	(rasqal_engine_move_to_graph_pattern): Deleted.
	(rasqal_engine_execute_run_graph_pattern): Return step
	(rasqal_engine_execute_run): Use step and pass on counts.

	* src/rasqal_internal.h: removed new_bindings_count

2007-03-04  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_engine.c: Add STEP_IGNORE to handle things such as
	empty group graph patterns that neither bind nor otherwise affect
	the results.  Restore rasqal_engine_step_names table.
	rasqal_engine_execute_gp_handler method execute_bind returns a
	rasqal_engine_step
	(rasqal_basic_graph_pattern_execute_bind): Return step. Still
	works.
	(rasqal_optional_graph_pattern_execute_bind): Return steps. Still
	untested.
	(rasqal_group_graph_pattern_execute_init): Added. Works.
	(rasqal_group_graph_pattern_execute_bind): Added. Works.
	(rasqal_engine_execute_run_graph_pattern): Convert from step to
	rc.  Testing state: src/ tests/rdql tests all work.

	* src/rasqal_query.c: Define RASQAL_NO_GP_MERGE to enable/disable
	empty graph merging

	* src/rasqal_engine.c: Remove
	rasqal_engine_group_graph_pattern_get_next_match

	* src/rasqal_engine.c: docs

	* src/rasqal_engine.c: Here we go.  Throughout replace "graph
	pattern POINTER" with "graph pattern INDEX"
	(rasqal_basic_graph_pattern_execute_init): Added, with code from
	rasqal_engine_graph_pattern_reset for triples.
	(rasqal_basic_graph_pattern_execute_bind): Added, with code from
	rasqal_engine_do_step for triples and calling
	rasqal_engine_triple_graph_pattern_get_next_match to do the triple
	pattern matching.  WORKS on a trivial example.
	(rasqal_optional_graph_pattern_execute_bind): Added, with code
	from rasqal_engine_do_optional_step. UNTESTED.
	rasqal_engine_execute_gp_handlers table does basic init/bind,
	optional bind.
	(rasqal_engine_graph_pattern_order): Removed.
	(rasqal_engine_graph_pattern_reset): Do less, moved into
	gp-specific init.
	(rasqal_engine_graph_pattern_init): Can return failure.
	(rasqal_engine_do_step, rasqal_engine_do_optional_step): Merged
	above.
	(rasqal_engine_store_query_results): Debug messages here.
	(rasqal_engine_execute_run_graph_pattern): Added to call the
	execute_bind handler method.
	(rasqal_engine_execute_run): Remove outer_gp and old code, use
	rasqal_engine_execute_run_graph_pattern to do the work.

	* src/rasqal_engine.c: struct rasqal_engine_gp_data gains matched,
	finished fields
	(rasqal_engine_graph_pattern_reset): Init matched, finished fields
	(rasqal_engine_graph_pattern_init): Remove sort.
	(rasqal_engine_do_step, rasqal_engine_do_optional_step,
	rasqal_engine_execute_run): use gp_data->matched, finished

	* src/rasqal_internal.h: struct rasqal_graph_pattern loses
	matched, finished fields

	* src/rasqal_graph_pattern.c: (rasqal_new_graph_pattern): Lose
	finished field.

	* src/rasqal_engine.c: (rasqal_engine_execute_init): Remove hack
	to restructure top-level GP

	* src/rasqal_engine.c: typedef rasqal_engine_execute_gp_handler
	Added handler field to rasqal_engine_gp_data
	(rasqal_new_engine_gp_data): Error checking Added NULL
	rasqal_engine_execute_gp_handlers array.
	(rasqal_new_engine_execution_data): Init handler field.

	* src/rasqal_engine.c: Rename rasqal_new_engine_gp_data from
	rasqal_new_gp_data

	* src/rasqal_engine.c, src/rasqal_graph_pattern.c,
	src/rasqal_internal.h, src/rasqal_query.c: Docucomments.
	(rasqal_new_graph_pattern): Add op arg and use it.

	* src/rasqal_engine.c: Docs.  Use rasqal_query_results_reset call
	replacing rasqal_query_results_init

	* src/rasqal_query_results.c: (rasqal_query_results_reset) Renamed
	from rasqal_query_results_init

	* src/rasqal_internal.h: rasqal_query_results_reset renamed from
	rasqal_query_results_init

	* src/rasqal_query.c: (rasqal_query_execute): Handle failing to
	make query results object.

	* src/sparql_parser.y: Use
	rasqal_engine_new_basic_graph_pattern_from_formula.

	* src/rdql_parser.y: Use rasqal_new_basic_graph_pattern.

	* src/rasqal_engine.c:
	(rasqal_engine_new_basic_graph_pattern_from_formula): renamed from
	rasqal_engine_new_graph_pattern_from_formula
	Use rasqal_new_basic_graph_pattern.

	* src/rasqal_internal.h: Added rasqal_new_basic_graph_pattern
	renamed from rasqal_new_graph_pattern_from_triples.  Removed
	rasqal_graph_pattern_add_triples Added
	rasqal_engine_new_basic_graph_pattern_from_formula renamed from
	rasqal_engine_new_graph_pattern_from_formula

	* src/rasqal_graph_pattern.c: (rasqal_new_graph_pattern): Warning
	this is mostly internal and does not init all fields.
	(rasqal_new_basic_graph_pattern): Renamed from
	rasqal_new_graph_pattern_from_triples - API change.
	(rasqal_new_graph_pattern_from_sequence): Tidied.
	(rasqal_graph_pattern_add_triples): Removed - API change.

2007-02-27  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_engine.c: (rasqal_engine_execute_run): Pull out
	invariants to top.

	* src/rasqal_engine.c: (rasqal_engine_execute_run): Tidy inlining more

	* src/rasqal_engine.c: (rasqal_engine_execute_run): Tidy inlining

2007-02-26  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_engine.c: (rasqal_engine_execute_run): Inline
	rasqal_engine_get_next_result into here.

	* src/rasqal_query_results.c: (rasqal_query_results_get_boolean):
	Remove rasqal_engine_get_next_result and use
	rasqal_engine_execute_run then look for sequence size.

	* src/rasqal_query.c: (rasqal_query_get_genid): one more byte

	* src/rasqal_engine.c, src/rasqal_internal.h: (rasqal_engine_run):
	Removed, never called

	* src/rasqal_engine.c: removed rasqal_engine_query_results_update

	* src/rasqal_engine.c: tidy

	* src/rasqal_engine.c,
	src/rasqal_internal.h: (rasqal_engine_store_query_results): Added.
	Store offset in rasqal_engine_execution_data

	* src/rasqal_engine.c, src/rasqal_internal.h, src/rasqal_query.c:
	Move rasqal_map inside rasqal_engine_execute_data

	* src/rasqal_engine.c: (rasqal_engine_execute_order): Do less work
	when not ordering or distinct, just store results in seq.

	* src/rasqal_engine.c: (rasqal_engine_execute_next): LAZY removal:
	Always use results in order_conditions_sequence.

	* src/rasqal_engine.c: (order_conditions_sequence): LAZY removal:
	Always store results in order_conditions_sequence.

	* docs/tmpl/section-query.sgml: new docs

2007-02-21  Dave Beckett  <dave@dajobe.org>

	* src/sparql_lexer.l: Added LAQRS DELETE and INSERT

	* src/sparql_parser.y: (DeleteQuery, InsertQuery): Added.

	* src/rasqal_query.c: Add rasqal_query_verb_labels labels for
	DELETE and INSERT.

	* src/rasqal_engine.c: (rasqal_engine_expand_wildcards):
	Handle switch RASQAL_QUERY_VERB_DELETE and RASQAL_QUERY_VERB_INSERT
	(rasqal_engine_assign_variables): Init size to 0

	* src/rasqal.h: Added LAQRS RASQAL_QUERY_VERB_DELETE and
	RASQAL_QUERY_VERB_INSERT

2007-02-17  Dave Beckett  <dave@dajobe.org>

	* utils/roqet.1: -r words

2007-02-09  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_raptor.c: rasqal_raptor_triples_source_user_data
	gains query field, source_uri field replacing list of URIs and
	mapped_id_base, mapped_id_base_len.
	(rasqal_raptor_generate_id_handler): Added, to either add the
	user_bnodeid to a graph-specific base, or to generate an ID
	otherwise.
	(rasqal_raptor_new_triples_source): Init uris each time, keep
	literals around till destruction.  Set the generated ID handler
	for raptor to rasqal_raptor_generate_id_handler.
	(rasqal_raptor_free_triples_source): Do not free URIs in list, or
	uris array.

	* src/rasqal_query.c: (rasqal_query_get_genid): Added simple genid
	generation from a single counter held in the query plus a given
	base.

	* src/rasqal_internal.h: Remove genid_bsae again

	* src/rasqal_internal.h: Added rasqal_query_get_genid

2007-02-08  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_query.c: (rasqal_query_write_sparql_graph_pattern):
	Write GRAPH parameter correctly in output.

2007-02-07  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_query_results.c: (rasqal_query_results_get_triple,
	rasqal_query_results_next_triple): Simplify and use
	rasqal_engine_execute_next to handle limit and offset.  This patch
	with the previous commits
	Fixes Issue#0000167 http://bugs.librdf.org/mantis/view.php?id=167

	* src/rasqal_engine.c: (rasqal_engine_assign_variables): Abstract
	from assigning variables just for a select, also assign them for a
	construct but put them in the variables_sequence.
	(rasqal_engine_get_next_result,
	rasqal_engine_query_result_row_update,
	rasqal_engine_new_query_result_row): Use size of variables from
	either variables_sequence for construct, otherwise
	select_variables_count.
	(rasqal_engine_query_result_row_update,
	rasqal_engine_new_query_result_row,
	rasqal_engine_query_results_update): Allow graph results to call
	this.
	(rasqal_engine_query_result_row_print): Work for construct too.
	(rasqal_engine_bind_construct_variables): Added, to substitute in
	variable bindings from a ordered query result row.
	(rasqal_engine_execute_order): Run
	rasqal_engine_bind_construct_variables after ordering.
	(rasqal_engine_execute_next): Run
	rasqal_engine_bind_construct_variables after getting next result.

	* src/rasqal_internal.h: docs - variables may be bound when
	constructs triples are present as well as when selects variables
	are around

	* src/rasqal_query_results.c: (rasqal_query_results_get_triple,
	rasqal_query_results_next_triple): Check limit when getting
	results for triples, such as SPARQL CONSTRUCT.  offset may work
	but not tested much.  Addresses issue
	http://bugs.librdf.org/mantis/view.php?id=167

2007-01-24  Dave Beckett  <dave@dajobe.org>

	* utils/roqet.c: (roqet_query_write_variable): Added.
	(roqet_query_walk): Use above to print out a variable with
	possible expression value.

	* configure.ac: Added LAQRS query language - maintainer only.

2007-01-23  Dave Beckett  <dave@dajobe.org>

	* src/sparql_parser.y: Added LAQRS tokens EXPLAIN GROUP COUNT AS
	protected by sparql->extended flag.
	(ExplainOpt): Added for optional EXPLAIN
	(SelectQuery): VarList is now a SelectExpressionList
	(SelectExpressionList): Can take SelectExpression AS VarName when
	extended.
	(SelectExpression): Added, to handle variables as well as
	COUNT(expr), COUNT(*) generating a VARSTAR expression.
	(GroupClauseOpt): Add GROUP BY to sorting.
	(Var): Takes a VarName.
	(rasqal_sparql_query_engine_init): Init extended flag based on
	language name.
	(rasqal_init_query_engine_laqrs): Added.

	* src/sparql_lexer.l: Added LAQRS keywords - EXPLAIN, GROUP,
	COUNT, AS New state SPID for variable names after AS

	* src/sparql_common.h: rasqal_sparql_query_engine_s gains SPARQL
	extended flag

	* src/rasqal_engine.c: (rasqal_query_build_declared_in): Do not
	warn if a variable expression is given.

	* src/rasqal_general.c: (rasqal_init): Init LAQRS if enabled.

	* src/rasqal_query.c: (rasqal_new_query, rasqal_free_query):
	Free/init new group_conditions_sequence sequence.
	(rasqal_query_get_explain, rasqal_query_set_explain): Added to
	get/set explain flag.
	(rasqal_query_print): Print explain flag, group conditions
	sequence.
	(rasqal_query_get_group_conditions_sequence,
	rasqal_query_get_group_condition): Added to get all or one group
	condition.
	(rasqal_query_write_sparql_variable): Modified to display variable
	expressions when present.
	(rasqal_sparql_op_labels): Add LAQRS labels.
	(rasqal_query_write_sparql_expression,
	rasqal_query_write_sparql_graph_pattern, ): Handle new LAQRS
	expressions, group condition sequences and query flags.

	* src/rasqal_expr.c: (rasqal_free_variable): Free new optional
	expression field.
	(rasqal_variable_print): Print new optional expression field.
	(rasqal_new_0op_expression): Added no-arg (constant) expression
	constructor.  Initially for RASQAL_EXPR_VARSTAR.
	(rasqal_new_1op_expression): Handle docs mentioning new 1-op
	expressions RASQAL_EXPR_GROUP_COND_ASC,
	RASQAL_EXPR_GROUP_COND_DESC, RASQAL_EXPR_COUNT.
	(rasqal_expression_clear, rasqal_expression_visit,
	rasqal_expression_evaluate, rasqal_expression_print,
	rasqal_expression_is_constant): Handle new expressions above

	* src/rasqal.h: rasqal_variable gains expression field.  Added
	expression types RASQAL_EXPR_GROUP_COND_ASC,
	RASQAL_EXPR_GROUP_COND_DESC, RASQAL_EXPR_COUNT and
	RASQAL_EXPR_VARSTAR Added prototypes for query methods
	rasqal_query_get_explain, rasqal_query_set_explain,
	rasqal_query_get_group_conditions_sequence,
	rasqal_query_get_group_condition.  Added rasqal_new_0op_expression
	expression constructor with no arguments, a constant.

	* NEWS.html, configure.ac, src/win32_rasqal_config.h: Bumped
	version to 0.9.14

	* src/rasqal_query_results.c: (rasqal_query_results_write): Allow
	serializing of finished/empty results.

	* configure.ac: Fix GNU bison check again, using raptor style.

2007-01-22  Dave Beckett  <dave@dajobe.org>

	* configure.ac: make bison version check work on V1 version
	message format

2007-01-20  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_internal.h: Ensure  rasqal_strcasecmp and
	rasqal_strncasecmp get prototypes.
	Fixes Issue#0000160 http://bugs.librdf.org/mantis/view.php?id=160

2007-01-16  Dave Beckett  <dave@dajobe.org>

	* utils/roqet.c: 2007
	Use rasqal_license_string and rasqal_home_url_string
	Add some more rasqal_finish() before exit

	* src/rasqal.h: Added prototypes for rasqal_license_string and
	rasqal_home_url_string

	* src/rasqal_general.c: 2007
	Added rasqal_license_string and rasqal_home_url_string

2007-01-07  Dave Beckett  <dave@dajobe.org>

	* src/rasqal_query_results.c:
	(rasqal_query_results_format_register_factory):
	Gains mime_type arg.
	(rasqal_init_query_results): Add mime type to query result format
	registrations.
	(rasqal_query_results_is_bindings,
	rasqal_query_results_is_boolean, rasqal_query_results_is_graph):
	True only if no results formatter is specified.
	(rasqal_query_results_is_syntax): Added to check if a query result
	is a syntax.
	(rasqal_query_results_formats_enumerate_full): Added to return
	mime type also.
	(rasqal_get_query_results_formatter_factory): Add mime type arg.
	(rasqal_query_results_formats_check): Added to check if a
	formatter exists for the given name, uri and/or mime type.
	(rasqal_new_query_results_formatter_by_mime_type): Added to
	construct a formatter by mime type alone.
	(rasqal_query_results_formatter_get_mime_type): Added to get the
	mime type of a built formatter.

	* src/rasqal.h: Added prototypes for
	rasqal_query_results_is_syntax,
	rasqal_query_results_formats_enumerate_full,
	rasqal_query_results_formats_check,
	rasqal_new_query_results_formatter_by_mime_type and
	rasqal_query_results_formatter_get_mime_type.

	* src/rasqal_query.c: (rasqal_free_query): Free
	query_results_formatter_name if set.

	* src/rasqal_internal.h: struct rasqal_query_s gains
	query_results_formatter_name field

