2014-12-15  Dave Beckett  <dave@dajobe.org>

	* Snapshotted rasqal_0_9_33 for 0.9.33 release (GIT 75040ce428844b5ad6f0f9d0ba2b9ff2d75d3c45)

2014-12-14  Dave Beckett <dave@dajobe.org>

	* NEWS.html, RELEASE.html: 0.9.33

	* src/rasqal_query_results.c: Skip only one triple in CONSTRUCT
	with unbound vars

	(rasqal_query_results_get_triple): Alter skipping to use
	rasqal_query_results_next_triple rather than reset to next result
	when a triple has an unbound or non-RDF part.

	Fixes Issue #0000583
	http://bugs.librdf.org/mantis/view.php?id=583

2014-12-07  Dave Beckett <dave@dajobe.org>

	* docs/tmpl/rasqal-unused.sgml, docs/tmpl/section-unused.sgml:
	Update tmpls

	* src/rasqal_literal.c, src/rasqal_query.c,
	src/rasqal_query_transform.c, src/rasqal_query_write.c,
	src/rasqal_result_formats.c, src/rasqal_update.c,
	utils/check_query.c, utils/roqet.c, utils/to-ntriples.c: Revert
	8e53443f3333ce907d3c78647036d5bb36a96aaf - adding default cases
	Too noisy for unreachable code.

	* ChangeLog, NEWS.html, RELEASE.html: 0.9.33

	* utils/roqet.1, utils/roqet.c: Add support for protocol queries
	against a local file

	Added format -p <SPARQL protocol URI> <query URI> [base URI]

	Fixes Issue #0000546
	http://bugs.librdf.org/mantis/view.php?id=546

	* utils/roqet.c: Replace a bunch of help printf with puts and
	simply

2014-12-05  Dave Beckett <dave@dajobe.org>

	* ChangeLog, RELEASE.html: 0.9.33

2014-11-27  Dave Beckett <dave@dajobe.org>

	* src/rasqal_format_sparql_xml.c, src/rasqal_rowsource_service.c:
	Fix variables count for SPARQL XML results

	(rasqal_service_rowsource_ensure_variables): Copy variables in
	(rasqal_sparql_xml_sax2_end_element_handler): Take variables count
	from rowsource size, not vars_table size.

	Fixes Issue #0000588
	http://bugs.librdf.org/mantis/view.php?id=588

	* src/rasqal_rowsource.c: rasqal_rowsource_copy_variables add
	debug error report

	* Merge pull request #5 from rhmccullough/mkr-table mKR relation
	CSV output for bindings results

2014-11-24  Richard H. McCullough <rhmccullough@gmail.com>

	* src/rasqal_format_sv.c:
	append ";" to end of variable list

	* src/rasqal_algebra.c, src/rasqal_data_graph.c,
	src/rasqal_decimal.c, src/rasqal_expr.c,
	src/rasqal_expr_evaluate.c, src/rasqal_format_html.c,
	src/rasqal_format_json.c, src/rasqal_format_rdf.c,
	src/rasqal_format_sparql_xml.c, src/rasqal_format_sv.c,
	src/rasqal_literal.c, src/rasqal_query_write.c,
	src/rasqal_results_compare.c, src/rasqal_rowsource_aggregation.c,
	src/rasqal_rowsource_triples.c, src/rasqal_variable.c,
	src/strcasecmp.c: Replace type %d (for enums) with %u in error
	messages (-Wformat)

2014-11-23  Richard H. McCullough <rhmccullough@gmail.com>

	* src/rasqal_format_sv.c:
	mKR relation output for select commands

2014-11-23  Dave Beckett <dave@dajobe.org>

	* src/rasqal_regex.c: pcre regex offset casts (-Wconversion)

	* src/snprintf.c: Remove not needed cast for snprintf
	(-Wconversion)

	* src/rasqal_result_formats.c: sequnce index casts (-Wconversion)

	* src/rasqal_random.c: mtwist_u32rand cast (-Wconversion)

	* src/rasqal_query_transform.c: memcpy cast (-Wconversion)

	* src/rasqal_random.c: getpid cast (-Wconversion)

	* src/rasqal_query_transform.c, src/rasqal_row.c: unsigned flag
	casts (-Wconversion)

	* src/rasqal_query_transform.c, src/rasqal_raptor.c,
	src/rasqal_result_formats.c, src/rasqal_row.c,
	src/rasqal_row_compatible.c, src/rasqal_rowsource_aggregation.c,
	src/rasqal_rowsource_join.c, src/rasqal_rowsource_project.c,
	src/rasqal_rowsource_triples.c, src/rasqal_rowsource_union.c,
	src/rasqal_variable.c: calloc casts (-Wconversion)

	* src/rasqal_general.c: Unicode character width casts
	(-Wconversion)

	* src/rasqal_format_table.c: Table widths casts (-Wconversion)

	* src/rasqal_format_sparql_xml.c:
	raptor_stringbuffer_append_counted_string cast -bad (-Wconversion)

	* src/rasqal_digest.c: rasqal_digest_buffeer casts for mash
	(-Wconversion)

	* src/rasqal_decimal.c: snprintf cast (-Wconversion)

	* src/rasqal_format_sparql_xml.c, src/rasqal_format_sv.c:
	raptor_iostream_read_bytes casts - bad (-Wconversion)

	* src/rasqal_format_sv.c, src/rasqal_literal.c,
	src/rasqal_result_formats.c: char casts (-Wconversion)

	* src/rasqal_graph_pattern.c, src/rasqal_map.c,
	src/rasqal_query_write.c, src/rasqal_rowsource.c: Indent casts
	(-Wconversion)

	* src/rasqal_format_rdf.c, src/rasqal_format_sv.c,
	src/rasqal_general.c, src/rasqal_query_results.c: Loop var casts
	(-Wconversion)

	* src/rasqal_format_sv.c: Signed SV results score (-Wconversion)

	* utils/check_query.c, utils/roqet.c: Unsigned indent
	(-Wconversion)

	* src/rasqal_algebra.c, src/rasqal_internal.h,
	src/rasqal_projection.c, src/rasqal_query.c: distinct, limit,
	offset are ints. wildcard is 0 or 1 (-Wconversion)

	* src/rasqal_results_compare.c: Casts for results compare
	(-Wconversion)

	* src/rasqal.h.in, src/rasqal_data_graph.c: Data graph takes
	unsigned flags (-Wconversion)

	* src/rasqal_sort.c: Casts for sorting (-Wconversion)

	* src/rasqal_xsd_datatypes.c: Casts for xsd (-Wconversion)

	* src/rasqal_datetime.c: Casts for datetime formatting
	(-Wconversion)

	* configure.ac: Remove -Wswitch-bool enabled by default in gcc

	* tests/engine/rasqal_construct_test.c,
	tests/engine/rasqal_limit_test.c, tests/engine/rasqal_order_test.c:
	Disable "-Wformat-nonliteral" with GCC pragma for test codes

2014-11-22  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_test.c, src/rasqal_rowsource_triples.c: Disable
	"-Wformat-nonliteral" with GCC pragma for test code

	* configure.ac: Document -Wconversion disabled

	* src/rasqal_algebra.c, src/rasqal_expr.c,
	src/rasqal_expr_evaluate.c, src/rasqal_expr_numerics.c,
	src/rasqal_expr_strings.c: Cast macros for -Wconversion (work in
	progress; many to go)

	* src/rasqal_algebra.c, src/rasqal_internal.h, src/rasqal_query.c:
	Make internal limit, offset and distinct vars be unsigned (-Wconversion)

	(rasqal_new_orderby_algebra_node, rasqal_new_slice_algebra_node):
	Take unsigned vars.

	(rasqal_algebra_query_add_slice, rasqal_query_print): Fix checks for
	<= 0 that now can be just = 0

	* src/rasqal.h.in, src/rasqal_expr.c:
	(rasqal_new_group_concat_expression): Unsigned bit flags

	* configure.ac: Document -Wcast-qual is noisy

	* configure.ac: Remove gcc warnings included in -Wall
	-Wlogical-not-parentheses -Wsizeof-array-argument -Wbool-compare

	* configure.ac:
	Disable -Wswitch-default again

	* src/rasqal_literal.c, src/rasqal_query.c,
	src/rasqal_query_transform.c, src/rasqal_query_write.c,
	src/rasqal_result_formats.c, src/rasqal_update.c,
	utils/check_query.c, utils/roqet.c, utils/to-ntriples.c: Add some
	default: cases (-Wswitch-default)

	* configure.ac: Add -Wswitch-default

	* configure.ac: Enable -Wconversion

	* src/rasqal_format_sv.c: Use size_t for sv size (-Wconversion)
	rasqal_rowsource_sv_context field variables_count changes to
	size_t to capture full sv size

	* .travis.yml:
	Travis CI: Try to exclude some matrix combinations

	* configure.ac: Enable -Wformat=2 for gcc

	* utils/check_query.c, utils/roqet.c, utils/srxread.c,
	utils/testrunner.c: Remove static string printfs in utilities
	(-Wformat)

	* .travis.yml, scripts/install-bison3.sh: Travis-CI fixes -
	apt-get update

	* src/rasqal_rowsource_join.c: Trailing ,

	* src/rasqal_format_html.c: C style comment

	* src/rasqal.h.in, src/rasqal_internal.h: Remove trailing ,s (C90)

2014-11-21  Dave Beckett <dave@dajobe.org>

	* scripts/install-raptor.sh: Tidy code

	* docs/tmpl/rasqal-unused.sgml,
	docs/tmpl/section-graph_pattern.sgml,
	docs/tmpl/section-literal.sgml,
	docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-unused.sgml:
	Update tmpls

	* src/rasqal.h.in: Document arg4 for rasqal_expression

	* src/rasqal_format_sv.c: De-comment

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_get_triples): Put decl first (C90)

	* scripts/fix-bison.pl, scripts/fix-flex.pl,
	scripts/fix-groff-xhtml.pl, scripts/fix-gtkdoc-header.pl: Update
	scripts

2014-11-03  Dave Beckett <dave@dajobe.org>

	* Merge pull request #4 from dajobe/multi-expr-unroll Evaluate
	expressions in document order left-to-right

2014-11-02  Dave Beckett <dave@dajobe.org>

	* src/sparql_parser.y: ME2 to MuExOpUnaryExpression

	* src/sparql_parser.y:
	Make debug expr conditionalized

	* src/sparql_parser.y: More debug prints.  Join AE2List and AE2
	sequences

	* src/rasqal_internal.h, src/sparql_parser.y: Refactoring seems ok

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_get_triples): Declare vars first (C90)

	* src/sparql_parser.y:
	(sparql_parse): Fix debug set variable

	* src/rasqal_expr.c:
	debug message for expr is constant

	* .travis.yml: raptor 2.0.15 is latest

	* src/rasqal_xsd_datatypes.c:
	(rasqal_xsd_check_integer_format): Write check, no need for strtol()

2014-10-19  Dave Beckett <dave@dajobe.org>

	* docs/rasqal-changes.tsv: Fix fields count

	* scripts/process-changes.pl: Make process-changes.pl report wrong
	fields count

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt: Add new
	methods to changelog

	* Merge pull request #1 from cosminbasca/master
	new getter functions: rasqal_graph_pattern_get_triples,
	rasqal_literal_get_type, rasqal_literal_get_language

	* scripts/install-raptor.sh: fix install names

	* .travis.yml: -;

	* .travis.yml, scripts/install-raptor.sh: Try to install raptor if
	it's not there

	* .travis.yml, scripts/install-bison3.sh: Travis CI

2014-10-10  Dave Beckett <dave@dajobe.org>

	* scripts/fix-bison.pl, scripts/fix-gtkdoc-header.pl: perms

	* utils/Makefile.am: fix-groff-xhtml.pl

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

	* src/Makefile.am: Further fix flex/bison rules to silence them in
	normal runs

	* src/Makefile.am: Add use of AM_V_GEN to make make V=0 look good

	After change to Raptor's turtle parser/lexer rules

	* docs/Makefile.am, scripts/Makefile.am, scripts/fix-bison,
	scripts/fix-bison.pl, scripts/fix-flex, scripts/fix-flex.pl,
	scripts/fix-groff-xhtml, scripts/fix-groff-xhtml.pl,
	src/Makefile.am: Rename scripts/fix-* to add .pl suffix

	* configure.ac: Add some GCC5 warning flags

	* configure.ac, src/rasqal_internal.h: Use __FUNCTION__ (c99)
	replacing __func__ (c90)

	* Merge pull request #3 from hroptatyr/compiler-support Intel C
	compiler (icc) support

2014-10-09  Sebastian Freundt <freundt@ga-group.nl>

	* configure.ac: Always use AC_LANG_WERROR when checking for
	compiler warning flags

	Many gcc-compatible compilers (icc, clang, etc.) verbosely ignore
	gcc command line flags issuing a warning of some sort.  Catch
	these warnings and turn them into errors when checking for support
	of specific warning flags.

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

	* ChangeLog, RELEASE.html: 0.9.33

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

	* INSTALL.html: Fix flex url

	* INSTALL.html, README.html: Bye bye sf

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

	* src/rasqal_rowsource.c:
	(rasqal_new_rowsource_from_handler): Init default size to 0

	(rasqal_rowsource_add_variable): Remove workaround needed for
	above.

	* tests/sparql/warnings/manifest.ttl:
	there is no test_4

	* src/rasqal_internal.h, src/rasqal_query_results.c,
	src/rasqal_row.c, utils/check_query.c, utils/manifest.c:
	rasqal_query_results_sort simplified

	(rasqal_query_results_sort): Switch to use of internal helper for
	sorting and rasqal_variables_table_get_order() to order the
	variables in a result by name.

	(rasqal_query_results_sort_compare_row): replaces
	rasqal_row_compare_arg() and uses a private context struct
	rqr_context.  Update callers of rasqal_query_results_sort()

	* src/rasqal_internal.h, src/rasqal_variable.c:
	(rasqal_variables_table_get_order): Added

	* src/rasqal_internal.h, src/rasqal_literal.c:
	(rasqal_literal_array_compare_by_order): Added sort+arg helper

	* src/rasqal_literal.c: docs

	* src/rasqal_internal.h, src/rasqal_row.c, utils/check_query.c,
	utils/manifest.c:
	(rasqal_row_compare_arg): Renamed from rasqal_row_compare Update
	callers

	* utils/Makefile.am:
	Add all-programs rule for testing

	* src/rasqal_query_results.c, utils/check_query.c:
	(rasqal_query_results_sort): Add user_data arg

	If raptor is 2.0.15 or newer, uses raptor_sequence_sort_r
	otherwise uses internal rasqal_sequence_as_sorted() to alter the
	result sequence directly.  Update callers

	* configure.ac, src/Makefile.am, src/rasqal_internal.h,
	src/rasqal_sort.c:
	(rasqal_sequence_as_sorted): Added if raptor < 2.0.15 Uses inline static rasqal_ssort_r()

	* src/Makefile.am, src/ssort.h: Add ssort.h defining static
	rasqal_ssort_r() public domain

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

	* src/rasqal_internal.h, src/rasqal_query_results.c,
	utils/manifest.c: Revert "(rasqal_query_results_sort): Takes just
	result arg" This reverts commit
	4a8bbb35926c6a27b0a217bbbe6910ca95ef1426.

	* src/rasqal_internal.h, src/rasqal_query_results.c,
	utils/manifest.c:
	(rasqal_query_results_sort): Takes just result arg

	* utils/manifest.c:
	(manifest_testsuite_run_suite): Take copy of test into result seqs

	* utils/manifest.c, utils/manifest.h:
	Add reference count model for
	manifest_test (manifest_new_test_from_test): Added

	* utils/testrunner.c: free result after getting state

2014-06-19  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c:
	(manifest_manifests_run): Do not leak ts->tests sequence

2014-06-15  Dave Beckett <dave@dajobe.org>

	* tests/sparql/SyntaxFull/manifest.ttl: Remove syntax-bnodes-03.rq
	and syntax-bnodes-04.rq from manifest too

	* tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprBuiltins/data-builtin-1.ttl,
	tests/sparql/ExprBuiltins/result-datatype-1.ttl: Fix
	data-builtin-1.ttl result-datatype-1.ttl to match upstream

	* src/rasqal_results_compare.c:
	(rasqal_results_compare_compare): If no vars, don't compare var sets

	* src/rasqal_format_rdf.c:
	Remove all vars from empty results files (no rows)

	(rasqal_rowsource_rdf_process): If a result set is found with no
	rows, remove all vars too.

	* src/rasqal_internal.h, src/rasqal_rowsource.c:
	(rasqal_rowsource_remove_all_variables): Added - internal

	* utils/manifest.c:
	(manifest_new_test): Fix approval URI check

	* utils/manifest.c:
	(manifest_test_print): Make test flag printing more compact.

	* tests/sparql/SyntaxFull/Makefile.am,
	tests/sparql/SyntaxFull/syntax-bnodes-03.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-04.rq: Remove never approved
	tests SyntaxFull/syntax-bnodes-0[34].rq

	* tests/sparql/SyntaxFull/manifest.ttl: syntax-bnodes-03.rq and
	syntax-bnodes-04.rq were never approved

	* tests/sparql/federated/Makefile.am,
	tests/sparql/federated/manifest.ttl: Add manifest.ttl to
	tests/sparql/federated

	* tests/sparql/update/Makefile.am, tests/sparql/update/manifest.ttl:
	Add manifest.ttl to tests/sparql/update/

	* utils/manifest.c:
	(manifest_test_print): Tidy and indent test printing

	* utils/manifest.c:
	(manifest_test_print): Add all flags

	* utils/manifest.c:
	(manifest_testsuite_run): Fix default state for non-syntax tests

	* utils/testrunner.c: Testrunner result state is based on
	testsuite result state

	Now ignores error/warning counts as these may be OK if the tests
	are expected to fail.

	* utils/manifest.c: More debug test result reporting

	* utils/manifest.c:
	(manifest_testsuite_run_suite): Return state based on failures

	* utils/manifest.c:
	Handle syntax tests: do not try to run query.

	(manifest_test_run): After prepare/parse, end for a syntax test.
	For non-syntax tests, log error and stop.

	* utils/manifest.c: XFAIL and UXPASS are now internal; do not
	report them

	* utils/manifest.c: Print debug test result state

	* utils/manifest.c, utils/manifest.h, utils/testrunner.c: Enable
	running only approved tests.

	(manifest_testsuite_run_suite): Add approved arg and check it.

	(manifest_manifests_run): Add approved arg and use to run suite
	with it above.  Add -a/--approved arg to testrunner utility

	* utils/manifest.c:
	(manifest_testsuite_result_format): Print verbose uxpass

	* utils/manifest.c:
	(manifest_testsuite_result_format): Format uxpass better

	* utils/manifest.c: Count and repott skipped tests
	(update/protocol) Report STATE_LAST (SKIP) in summaries

2014-06-11  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c:
	(manifest_test_run): Print expected graph triples using
	rasqal_dataset_print() in debug mode.  Do not fail with an actual
	graph result at results stage.

	* utils/manifest.c: Handle reading RDF graph results: default to
	guess and set a base URI

	* src/rasqal_dataset.c:
	(rasqal_dataset_print): Added

	* src/rasqal_dataset.c, src/rasqal_internal.h: Added
	rasqal_dataset_triples iterator class

	(rasqal_dataset_get_triples_iterator,
	rasqal_free_dataset_triples_iterator): Added constructor and
	destructor.

	(rasqal_dataset_triples_iterator_get)
	(rasqal_dataset_triples_iterator_next): Added methods to get and
	move

	* utils/manifest.c:
	(manifest_test_run): Warn and return if there is no query.

	* utils/manifest.c:
	(manifest_test_print): Handle non-querys

	* src/rasqal_literal.c:
	(rasqal_literal_as_uri): Just return NULL when it's not a URI

	* src/rasqal_query_results.c:
	(rasqal_query_results_sort): Survive being asked to sort a NULL
	sequence.

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

	* src/rasqal_expr_strings.c:
	(rasqal_expression_evaluate_concat): Fix SPARQL concat() types and
	languages

2014-06-08  Dave Beckett <dave@dajobe.org>

	* src/rasqal_results_compare.c:
	(rasqal_results_compare_compare): Blanks compare equal always

	* configure.ac: Prefer PCRE regex library since it works with
	Unicode

	* utils/manifest.c:
	(manifest_new_test): Add print handler for data graphs sequence

	* utils/manifest.c: nl

	* src/rasqal_internal.h, src/rasqal_row.c: Ensure weak rowsource
	reference is never freed

	rasqal_row gains flags field. loses unused variable_names field
	too.

	(rasqal_row_set_rowsource, rasqal_row_set_weak_rowsource):
	Set / reset the weak rowosource flag to ensure only strong
	references are freed.

2014-06-04  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c: Block out debug print blocks

	* src/rasqal_query_results.c: code style

	* src/sparql_parser.y: Set eval context base URI when BASE <uri>
	is parsed

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

	* utils/manifest.c: formatting

	* src/rasqal_literal.c:
	(rasqal_literal_as_uri): Do not lookup NULL variable value

	* utils/manifest.c:
	(manifest_test_run): Split reporting actual vs checking actual Allows tests with no expected value to pass.

	* utils/manifest.c: Split out reporting expected (if present) and
	checking it matches

	* utils/manifest.c: Report test details during run
	(manifest_test_print): Added

	(manifest_test_run): Call above in debug mode

	* utils/manifest.c: less debug

	* utils/manifest.c: NL

	* src/rasqal_rowsource_aggregation.c: Handle missing aggregation
	total for AVG

	(rasqal_builtin_agg_expression_execute_result): If there is no total
	literal, do not do a divide.

	* utils/manifest.c: Support results no expected results for e.g.
	syntax tests

	(manifest_new_test): Handle qt:query <uri> for just a query URI, no
	data or results.

	(manifest_test_run): Handle NULL expected or actual results and
	compare them either is NULL.

	* src/sparql_parser.y: Set base URI after query parsing to get it
	from BASE

	(rasqal_sparql_query_language_prepare): Call
	rasqal_evaluation_context_set_base_uri()

2014-06-01  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr_strings.c: Make strbefore and strafter preserve,
	check languages and operate on strings

	(rasqal_expression_evaluate_strbefore,
	rasqal_expression_evaluate_strafter): Check
	rasqal_literal_is_string() on both needle and haystack.  If
	haystack has a language, make sure it matches needle with
	rasqal_literal_string_languages_compare().  Copy needle language
	to result.

	* src/rasqal_internal.h, src/rasqal_literal.c:
	(rasqal_literal_is_string): Added helper

	* src/rasqal_internal.h, src/rasqal_literal.c: Add helpers for
	comparing string datatypes and languages

	(rasqal_literal_string_datatypes_compare,
	rasqal_literal_string_languages_compare): Added, pulled out of
	rasqal_literal_string_compare().

	(rasqal_literal_string_compare): Updated to use them. Now does case
	independent language compare.

	(rasqal_literal_string_equals_flags): Use
	rasqal_literal_string_languages_compare().

2014-06-01  Dave Beckett <dave@dajobe.org>

	* src/rasqal_datetime.c:
	Fix datetime timezone issues

	(rasqal_xsd_datetime_normalize, rasqal_xsd_datetime_parse,
	rasqal_xsd_timezone_format): Store -/+ timezone minutes correctly

	(rasqal_xsd_datetime_get_timezone_as_counted_string): Handle no TZ

2014-05-31  Dave Beckett <dave@dajobe.org>

	* src/rasqal_format_sparql_xml.c:
	(rasqal_rowsource_sparql_xml_get_boolean): Get value before freeing
	context.  Coverity CID 65381

2014-05-27  Dave Beckett <dave@dajobe.org>

	* src/rasqal_format_sparql_xml.c:
	(rasqal_sparql_xml_sax2_end_element_handler): Set row offset

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

	* src/rasqal_row.c:
	(rasqal_row_compare): Less debugging, now RASQAL_DEBUG > 1

	* src/rasqal_literal.c: Less literal comparison debugging, now
	RASQAL_DEBUG > 1

	* src/rasqal_format_sparql_xml.c: less debugging, protected by
	TRACE_XML or higher RASQAL_DEBUG

	* src/rasqal_format_sparql_xml.c: Fix chunked parsing of literals
	in literal body

	Switch to use an appending stringbuffer to avoid
	truncated/overwritten literals when the element content was
	delivered in multiple literal chunks - especially a problem near
	unicode.

	(rasqal_sparql_xml_sax2_start_element_handler): Initialise sb.

	(rasqal_sparql_xml_sax2_characters_handler): Add content to sb

	(rasqal_sparql_xml_sax2_end_element_handler): Form single value /
	value_len vars from sb content.  Use it for literal values and
	checking boolean.  Reset sb at end

	(rasqal_sparql_xml_free_context): Free any sb.

	* src/rasqal_result_formats.c:
	(rasqal_query_results_formatter_read): Refactor to use switch

	* utils/check_query.c: Support boolean results in check-query and
	check for pass/fail.

	* utils/manifest.c: Support boolean results in manifest code and
	check for pass/fail.

	* src/rasqal_format_sparql_xml.c: Add boolean result format
	support for SPARQL XML

	Refactor XMl parsing code to handle bindings / boolean

	(rasqal_sparql_xml_start): Added to init XML parsing

	(rasqal_sparql_xml_sax2_start_element_handler): Handle boolean
	element start (NOP).

	(rasqal_sparql_xml_sax2_characters_handler): Handle boolean
	element content - save it.

	(rasqal_sparql_xml_sax2_end_element_handler): Handle boolean
	element content: - allow <head> to end with no variables - check
	string for 'true' or 'false'.  FIXME: handle case independent?

	(rasqal_rowsource_sparql_xml_init): Move most of it to
	rasqal_sparql_xml_start() (rasqal_rowsource_sparql_xml_finish):
	Move most of it to rasqal_sparql_xml_free_context()

	(rasqal_sparql_xml_init_context): Added, pulled out of
	rasqal_query_results_get_rowsource_sparql_xml()

	(rasqal_sparql_xml_free_context): Added, pulled out of
	rasqal_rowsource_sparql_xml_finish()

	(rasqal_rowsource_sparql_xml_get_boolean): Added new factory
	method to do all the XML work right here.

	(rasqal_query_results_get_rowsource_sparql_xml): Slimmed down
	calling rasqal_sparql_xml_init_context() to do most init working.

	(rasqal_query_results_sparql_xml_register_factory): Register
	get_boolean method.

	* src/rasqal_result_formats.c:
	(rasqal_query_results_formatter_read): Allow boolean results

	* src/rasqal_internal.h, src/rasqal_result_formats.c: Add support
	for boolean results from a query result format.

	rasqal_query_results_get_boolean_func handler func added.

	struct rasqal_query_results_format_factory_s gains factory method
	get_boolean with type above.

	(rasqal_query_results_formatter_get_boolean): Added to call method
	get_boolean if not NULL.

	* src/rasqal_internal.h, src/rasqal_query_results.c:
	(rasqal_query_results_set_boolean): Added internal method

	* utils/manifest.c: Turn "not supported" debug messages into
	rasqal logged messages

	* utils/manifest.c: debug messages

	* src/rasqal_query_results.c:
	(rasqal_query_results_update_query_bindings): Handle NULL v
	[coverity CID 63531] Although the logic makes this very unlikely

	* utils/manifest.c: nl

	* utils/manifest.c:
	(manifest_testsuite_result_format): Handle empty t->result

	* src/rasqal.h.in, src/rasqal_query.c, src/rasqal_query_results.c,
	src/rasqal_service.c, utils/results.c, utils/srxread.c,
	utils/srxwrite.c:
	rasqal_query_results manages it's own variables
	table now

	(rasqal_new_query_results2): Deprecated for
	rasqal_new_query_results without the vars_table parameter that is
	now ignored.  (rasqal_query_results_ensure_have_row_internal):
	Ensure the vars table is built once from the first row seen.

	(rasqal_query_results_get_binding_name): Get binding name from
	query results vars table rather than row.

	(rasqal_query_execute_with_engine,
	rasqal_new_query_results_from_string, rasqal_service_execute,
	srxread, srxwrite): Updated all callers of
	rasqal_new_query_results() to use rasqal_new_query_results2() with
	no vars table.

	* src/rasqal_internal.h, src/rasqal_query_results.c,
	src/rasqal_row.c: Use query results vars table to get names

	(rasqal_query_results_get_bindings): Use
	rasqal_variables_table_get_names() on query results vars table.

	(rasqal_row_get_names): Removed since no longer used.

	* src/rasqal_query_results.c: Copy row values from query results
	vars table to query.

	(rasqal_query_results_update_query_bindings): Renamed from
	rasqal_query_results_update_bindings and now reads from query
	results vars table and copies row values into query vars table.
	Primary for CONSTRUCT

	* src/rasqal_internal.h, src/rasqal_variable.c: Revert
	"(rasqal_variables_table_get_names): Remove and variable_names
	field" This reverts commit
	71a1110913c2c57245fc4106586e7910cd83c758.

	* docs/tmpl/section-query_results_formatter.sgml: update tmpl

	* src/rasqal_bindings.c:
	(rasqal_new_bindings_from_var_values): Init size to 0

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt,
	src/rasqal.h.in, src/rasqal_result_formats.c, utils/results.c,
	utils/roqet.c:
	Fix rasqal_query_results_formats_check return value.

	(rasqal_query_results_formats_check2): Added implementing
	specification correctly; non-0 if format exists.

	(rasqal_query_results_formats_check): Deprecated

	Updated callers to use the logic.

	* Merge pull request #2 from hroptatyr/fix/formats_check
	Fix r_g_q_results_formatter_factory() to produce the result
	advertised in 130fa83

2014-05-24  Dave Beckett <dave@dajobe.org>

	* docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-row.sgml, docs/tmpl/section-triples_source.sgml,
	docs/tmpl/section-variables-table.sgml: Update tmpls

	* src/rasqal_internal.h, src/rasqal_query_results.c,
	src/rasqal_row.c: Allow getting variables from a row

	(rasqal_row_get_variable_by_offset): Added

	(rasqal_query_results_get_binding_name): Use above instead of
	variables table.

	* src/rasqal_row.c: Add rowsource reference counting to rasqal_row

	* src/rasqal_bindings.c:
	(rasqal_new_bindings_from_var_values): Hanle NULL values sequence

	* src/rasqal_internal.h, src/rasqal_row.c, src/rasqal_rowsource.c,
	src/rasqal_rowsource_assignment.c,
	src/rasqal_rowsource_distinct.c, src/rasqal_rowsource_graph.c,
	src/rasqal_rowsource_join.c, src/rasqal_rowsource_project.c,
	src/rasqal_rowsource_rowsequence.c, src/rasqal_rowsource_union.c:
	Let rows change their rowsource

	(rasqal_row_set_rowsource): Added for general internal use

	(rasqal_row_set_weak_rowsource): Added for rowsource_rowsequence
	so it does not hold circular references to itself in the rows it
	stores in it's sequence.

	* src/rasqal_query.c:
	(rasqal_query_get_variable): docs

	* src/rasqal_results_compare.c:
	(rasqal_new_results_compare): free v2 only if new

	* src/rasqal_results_compare.c:
	(rasqal_new_results_compare): free v2 after last use

	* src/rasqal_rowsource_aggregation.c:
	(main): Fix output_var_name leak using rasqal_variables_table_add2()

	* src/rasqal_results_compare.c:
	(rasqal_new_results_compare): Fix leak of vars

	* src/rasqal_row.c: docs

	* src/rasqal_rowsource.c:
	(rasqal_new_rowsource_from_handler): set usage earlier

	* src/rasqal_internal.h, src/rasqal_rowsource.c: Make rowsource
	usage counted

	(rasqal_new_rowsource_from_rowsource): Added

	* src/rasqal_internal.h, src/rasqal_variable.c:
	(rasqal_variables_table_get_names): Remove and variable_names field

	* src/rasqal_query_results.c:
	(rasqal_query_results_get_bindings): Use rasqal_row_get_names()

	* src/rasqal_internal.h, src/rasqal_row.c: Compute sequence of
	variable names for row on demand (rasqal_row_get_names): Added
	internal method

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

	* src/rasqal_results_compare.c:
	(rasqal_new_results_compare): Allocate defined_in_map 2x larger

2014-05-11  Dave Beckett <dave@dajobe.org>

	* docs/rasqal-changes.tsv:
	remove spaces

	* docs/rasqal-changes.tsv:
	Added new enum values from 0.9.28 - 0.9.30

	0.9.28: RASQAL_LITERAL_DATE
	0.9.29: RASQAL_EXPR_STRUUID and RASQAL_EXPR_UUID
	0.9.30: RASQAL_GRAPH_PATTERN_OPERATOR_VALUES

	* docs/rasqal-changes.tsv: rasqal_new_4op_expression was added in
	0.9.28

	* docs/rasqal-changes.tsv:
	RASQAL_EXPR_MD5 was added in 0.9.26

	* docs/rasqal-docs.xml: 2014

2014-05-03  Dave Beckett <dave@dajobe.org>

	* configure.ac: Handle flex not being installed

2014-04-29  Dave Beckett <dave@dajobe.org>

	* scripts/fix-bison: Move fixup before line offset change

2014-04-28  Dave Beckett <dave@dajobe.org>

	* ChangeLog, RELEASE.html: 0.9.33

	* Remove dead code from bison output

	* scripts/fix-bison: Remove dead code from bison output

2014-04-26  Dave Beckett <dave@dajobe.org>

	* src/sparql_parser.y:
	YYYERR_MSG_GOTO always sets errmsg Also fix YYDEBUG undef

	* src/sparql_parser.y:
	(Collection, GrpahNodeListNotEmpty): Tidy error path

	* src/rasqal_literal.c:
	(rasqal_literal_cast): Handle more failure conditions [coverity CID 48453]

	* src/sparql_lexer.l:
	(sparql_skip_c_comment): Simplify and remove dead code [coverity CID 43033]

	* utils/results.c:
	(rasqal_cmdline_read_results): Error path dead code [coverity CID 43032]

	* src/rasqal_literal.c:
	(rasqal_literal_divide): Dead code [coverity CID 43031]

	* src/rasqal_expr_datetimes.c:
	(rasqal_expression_evaluate_datetime_part): dead code [coverity CID 43030]

	* src/rasqal_rowsource_project.c:
	(rasqal_project_rowsource_read_row): dead code [coverity CID 43029]

	* src/rasqal_rowsource_triples.c:
	(rasqal_triples_rowsource_read_row): dead code [coverity CID 43028]

	* src/rasqal_algebra.c:
	(rasqal_algebra_graph_graph_pattern_to_algebra): dead code
	elimination [coverity CID 43025]

	* src/rasqal_algebra.c:
	(rasqal_algebra_filter_graph_pattern_to_algebra): dead code
	elimination [coverity CID 43016]

	* src/rasqal_algebra.c:
	(rasqal_algebra_basic_graph_pattern_to_algebra): dead code
	elimination [coverity CID 43015]

	* src/rasqal_rowsource_aggregation.c:
	(rasqal_builtin_agg_expression_execute_init): cleanup on error path
	[coverity CID 43027]

	* src/rasqal_expr_strings.c:
	(rasqal_expression_evaluate_concat): unused var result

	* src/rasqal_expr_strings.c:
	(rasqal_expression_evaluate_concat): dead code in cleanup [coverity CID 43026]

	* src/rasqal_algebra.c:
	(rasqal_algebra_service_graph_pattern_to_algebra): Dead code in
	cleanup [coverity CID 43024]

	* src/rasqal_row.c:
	(rasqal_new_row_sequence): Tidy error path - dead code [coverity CID 43022]

	* src/rasqal_algebra.c:
	(rasqal_algebra_let_graph_pattern_to_algebra): Simplify and fix
	error path [coverity CID 43021]

	* src/rasqal_datetime.c:
	(rasqal_xsd_datetime_compare2): Fix NULL datetime compares [coverity CID 43020]

	* src/rasqal_datetime.c:
	(rasqal_xsd_date_compare): Fix NULL date compares [coverity CID 43019]

	* src/rasqal_datetime.c:
	(rasqal_xsd_timezone_format): Dead code [coverity CID 43018]

	* src/rasqal_algebra.c:
	(rasqal_algebra_filter_graph_pattern_to_algebra): Dead code
	[coverity CID 43016]

	* src/rasqal_algebra.c:
	(rasqal_algebra_basic_graph_pattern_to_algebra): Dead code [coverity CID 43015]

	* src/rasqal_literal.c:
	(rasqal_literal_cast): Handle NULL error_p [coverity CID 45071]

	* src/rasqal_expr_strings.c:
	(rasqal_expression_evaluate_concat): Handle NULL error_p [coverity CID 45070]

	* src/rasqal_literal.c:
	(rasqal_literal_as_boolean): Handle NULL error_p [coverity CID 45069]

	* src/rasqal_rowsource_aggregation.c:
	(rasqal_builtin_agg_expression_execute_reset): Error path [coverity CID 43076]

	* src/rasqal_raptor.c:
	(rasqal_raptor_init_triples_source_common): !

	* src/rasqal_engine_algebra.c: fix error_p path

2014-04-24  Dave Beckett <dave@dajobe.org>

	* src/rasqal_engine_algebra.c, src/rasqal_expr_datetimes.c,
	src/rasqal_expr_evaluate.c, src/rasqal_expr_numerics.c,
	src/rasqal_expr_strings.c, src/rasqal_literal.c: Fix multiple
	checks where error_p may be NULL

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): double/float always free string
	[coverity CID 43051]

	* src/rasqal_rowsource_assignment.c:
	(rasqal_assignment_rowsource_read_row): NULL row [coverity CID 43039]

	* src/rasqal_raptor.c:
	(rasqal_raptor_init_triples_source_common): Error path [coverity CID 43038]

	(rasqal_raptor_init_triples_source_common): Shortcut return path
	when there are no source literals or error path
	[coverity CID 43038]

	* src/rasqal_graph_pattern.c:
	(rasqal_new_values_graph_pattern): NULL pointer [coverity CID 43037]

	* src/rasqal_literal.c:
	Cast to int before type diff of enums [coverity CID 43036]

	(rasqal_literal_compare): Cast to int before type diff of enums
	[coverity CID 43036]

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

	* src/rasqal_literal.c: Cast to int before type diff of enums
	[coverity CID 43036]

	(rasqal_literal_compare): Cast to int before type diff of enums
	[coverity CID 43036]

2014-04-20  Dave Beckett <dave@dajobe.org>

	* src/rasqal_rowsource_sort.c:
	(rasqal_sort_rowsource_process): con->map is never NULL [coverity CID 43035]

	* src/rasqal_literal.c: not static

	* src/rasqal_internal.h: meh

	* src/rasqal_internal.h:
	extern static for boolean consts

	* src/rasqal_engine_algebra.c:
	(rasqal_algebra_filter_algebra_node_to_rowsource): error path
	cleanup [coverity CID 43042]

	* src/rasqal_expr.c:
	(rasqal_expression_convert_aggregate_to_variable): Free output expr
	on error path [coverity CID 43041]

	* src/rasqal_engine_algebra.c:
	(rasqal_algebra_graph_algebra_node_to_rowsource): error path
	[coverity CID 43044 43043]

	* src/rasqal_algebra.c:
	(rasqal_algebra_group_graph_pattern_to_algebra): use goto fail for
	cleanup [coverity CID 43044 43045]

	* src/rasqal_format_rdf.c:
	(rasqal_rowsource_rdf_process): error path leak [coverity CID 43046]

	* src/rasqal_format_rdf.c:
	(rasqal_rowsource_rdf_process): error path leak [coverity CID 43047]

	* src/rasqal_result_formats.c:
	(rasqal_world_guess_query_results_format_name): error path leak
	[coverity CID 43048]

	* src/rasqal_rowsource_project.c:
	(rasqal_project_rowsource_ensure_variables): loop 0 to size-1
	[coverity CID 43040] This would never overrun since
	raptor_sequence_get_at() would cause the loop exit first.

	* src/rasqal_bindings.c:
	(rasqal_new_bindings_from_var_values) error path leak [coverity CID 43049]

	* src/rasqal_rowsource_service.c:
	(rasqal_new_service_rowsource): error path leak [coverity CID 43050]

	* src/rasqal_datetime.c:
	Initialize datetime time_on_timeline
	[coverity CID 43082 43083]

	* src/rasqal_query_write.c:
	(rasqal_query_write_data_format_comment): copy paste error
	[coverity CID 43014]

	* src/rasqal_format_sparql_xml.c, src/rasqal_internal.h,
	src/rasqal_literal.c: Define statics for true/false so object
	compare is ok [coverity CID 43012]

	* scripts/fix-bison: Import from raptor

	* scripts/fix-flex: Import from raptor

	* configure.ac, src/sparql_lexer.l:
	Define FLEX_VERSION_DECIMAL and
	use to not duplicate column prototypes.

2014-04-07  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c:
	(manifest_indent_multiline): Use max_lines_count

2014-04-04  Dave Beckett <dave@dajobe.org>

	* utils/Makefile.am, utils/check_query.c, utils/compare_results.c,
	utils/manifest.c, utils/rasqalcmdline.h: Switch to
	rasqal_results_compare API

	* src/rasqal_results_compare.c:
	(rasqal_results_compare_compare): Use binding mapping.  Reports
	slight better messages about different variable sets.

	* src/rasqal_internal.h, src/rasqal_results_compare.c: Start
	porting compare_results api to rsaqal_results_compare

	(rasqal_new_results_compare): Add label args

	(struct rasqal_results_compare_s): Store world, query results,
	labels and log data.

	(rasqal_results_compare_set_log_handler): Added

	(rasqal_results_compare_compare): Added.  Name needs to change
	Update test code

	* src/rasqal_internal.h, src/rasqal_results_compare.c: Hide
	rasqal_results_compare internals

	* src/rasqal_internal.h, src/rasqal_results_compare.c:
	(rasqal_results_compare_variables_equal): Renamed from
	rasqal_results_compare_equal

	* src/rasqal_results_compare.c: ws

	* src/rasqal_internal.h, src/rasqal_results_compare.c: make
	rasqal_results_compare internal

	* src/Makefile.am, src/rasqal_internal.h,
	src/rasqal_results_compare.c, src/rasqal_results_compatible.c:
	Rename module / class name to rasqal_results_compare

	* docs/rasqal-changes.tsv: tab

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt: Added
	rasqal_new_query_results_from_string to docs and changes

	* src/rasqal_results_compatible.c:
	(rasqal_new_results_compatible): index is i not size

	* src/Makefile.am, src/rasqal_query_results.c: Add query results
	tests for from string module

	* src/rasqal_internal.h, src/rasqal_results_compatible.c: Added
	tests for rasqal_results_compatible module
	- Removed duplicate variables_table field; use vt.
	- Made counts into unsigned.
	(rasqal_new_results_compatible): Init all offsets to -1 not 0.
	(rasqal_free_results_compatible): Free map and variables table.
	(rasqal_results_compatible_equal): look for non-negative offsets
	for equality.
	(main): Added tests

	* src/rasqal_query_results.c:
	(rasqal_new_query_results_from_string): Make string_len optional.

	* src/rasqal.h.in, src/rasqal_query_results.c:
	(rasqal_new_query_results_from_string): Always guess formatter from
	data Remove formatter arg.

	* src/rasqal_query_results.c:
	(rasqal_new_query_results_from_string): Guess formatter from data If @formatter is NULL guess it using input data via
	rasqal_world_guess_query_results_format_name()

2014-03-30  Dave Beckett <dave@dajobe.org>

	* src/Makefile.am, src/rasqal_internal.h,
	src/rasqal_results_compatible.c: Added rasqal_results_compatible
	class and skeleton tests Needs a way to initialise
	rasqal_query_results

	* src/rasqal.h.in, src/rasqal_query_results.c:
	(rasqal_new_query_results_from_string): Added

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

	* src/rasqal_rowsource_aggregation.c:
	(main): Use rasqal_variables_table_add2

	* docs/rasqal-changes.tsv: fix old/new vers

	* docs/rasqal-sections.txt: Add rasqal_triples_error_handler2

	* docs/rasqal-changes.tsv: Add 0.9.33 typedefs to docs

	* docs/rasqal-changes.tsv: Sort blocks correctly

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt: Add
	rasqal_variables_table_add2 to docs

2014-03-27  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h.in: Set RASQAL_TRIPLES_SOURCE_FACTORY_MAX_VERSION 3
	after earlier change

	* libsv, src/rasqal_format_sv.c, src/sv_config.h: Update libsv and
	rename sv_init to sv_new

	* src/rasqal_expr_numerics.c: Handle byte/word alignment with
	RASQAL_UUID_INTERNAL (clang)

2014-03-26  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c, utils/manifest.h:
	Pull test_string arg out of
	manifest_testsuite_run_suite

	(manifest_test_matches_string): Moved test matching here

	(manifest_testsuite_select_tests_by_string): Use
	manifest_test_matches_string to select a test.

	(manifest_testsuite_run_suite): Remove matching

	(manifest_manifests_run): Use
	manifest_testsuite_select_tests_by_string() to match before
	running.

2014-03-24  Dave Beckett <dave@dajobe.org>

	* ChangeLog, ChangeLog.11, Makefile.am: ChangeLog.11 for 2013

2014-03-22  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c, utils/manifest.h, utils/testrunner.c:
	Pass in
	test_string arg to allow running one test out of suite

	(manifest_testsuite_run_suite): Add test_string arg and use it to
	check for test name or test literal match.

	(manifest_manifests_run): Add test_string arg for above.

	(main): Add -t / --test arg for setting a test to run.

	* utils/testrunner.c:
	Do not break out early if argc count is wrong

	* utils/testrunner.c:
	Get Base URI from right arg

	* utils/manifest.c:
	Add testsuite reporting and multi-line reporting

	(manifest_indent_multiline): Add to indent multi-line strings.

	(manifest_testsuite_result_format): Added to format a testsuite
	result in the desired style.  Use manifest_indent_multiline.

2014-03-17  Dave Beckett <dave@dajobe.org>

	* src/rasqal_format_html.c, src/rasqal_format_json.c,
	src/rasqal_format_sv.c: Remove decl inside switch (clang
	-Wunreachable-code)

	The above is probably a clang mis-warning since the decls work
	fine before first case.

	* src/rasqal_literal.c, src/rasqal_query_write.c: Remove return
	after break (clang -Wunreachable-code)

2014-03-16  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c: Free acutal_results

	* utils/compare_results.c:
	(compare_query_results_compare): Do not leak row memory

	* utils/check_query.c:
	(compare_query_results_compare): Do not leak row memory

2014-03-15  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c, utils/manifest.h:
	(manifest_test_run): Enable comparing bindings results

	ISSUE: leaks memory since freeing rasqal_query_result*
	actual_results causes a crash due to raptor genid handler

	* utils/results.c:
	(rasqal_rowsource_rdf_process): Free base URI on success

	* utils/manifest.c:
	Comment in reading bindings results

	* src/rasqal_format_rdf.c:
	(rasqal_rowsource_rdf_process): Free literals used in reading

	* utils/results.c:
	(rasqal_cmdline_read_results): Handle
	rasqal_query_results_formatter_read fail

	* utils/manifest.c:
	(manifest_test_run): Read expected result files.  - Add error logging to replace RASQAL_DEBUG* - Handle NULL result

	* utils/results.c:
	(rasqal_cmdline_read_results): Free base URI string

	* utils/manifest.c:
	(manifest_manifests_run): Fix joining results. Handle NULL result.

2014-03-13  Dave Beckett <dave@dajobe.org>

	* utils/read_files.c: docs

	* src/sparql_parser.y:
	(VarName): Free variable name after rasqal_variables_table_add2

	* utils/manifest.c: free query_filename

	* utils/srxwrite.c:
	Use rasqal_variables_table_add2() in srxwrite

	* src/rasqal.h.in, src/rasqal_algebra.c, src/rasqal_format_rdf.c,
	src/rasqal_format_sparql_xml.c, src/rasqal_format_sv.c,
	src/rasqal_query_transform.c, src/rasqal_row.c,
	src/rasqal_variable.c, src/sparql_parser.y:
	(rasqal_variables_table_add2): Added deprecating
	rasqal_variables_table_add

	Added rasqal_variables_table_add2 to take a more sensible argument
	style with copying the input parameters name and value, and
	allowing name length to be optionally given.  Results in smaller
	calling code and better ownership semantics.

2014-03-11  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c, utils/manifest.h: Store background and named
	graphs in sequence

	manifest_test gains a single raptor_sequence of rasqal_data_graph
	and loses the 'data' and 'data_graph' fields.

	* utils/check_query.c, utils/roqet.c: Make utils use
	rasqal_cmdline_read_data_graph() shared code

	* utils/read_files.c:
	(rasqal_cmdline_read_data_graph): Now handles stdin "-" from roqet.

	* utils/rasqalcmdline.h, utils/read_files.c:
	(rasqal_cmdline_read_data_graph): Added from arg handling for graphs

	* utils/manifest.c:
	(manifest_test_run): Read and parse queries

	* utils/manifest.c, utils/manifest.h:
	(manifest_test_get_query_language): Added

	* utils/Makefile.am: Add _DEPENDENCIES rules for programs so they
	will rebuild libraries

	* utils/testrunner.c: make seq own the URIs so it frees them
	correctly

	* utils/testrunner.c:
	(testrunner_log_handler): data arg is rasqal_world (and unused) Do
	not try to abort thing that is not a parser

2014-03-08  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c:
	(manifest_manifests_run): Total failure if cannot create test suite

	* utils/manifest.c:
	Read query string files

	* utils/manifest.c, utils/manifest.h:
	Save manifest_world* in
	manifest_test

	* utils/manifest.c:
	(manifest_test_run): Handle test result being NULL

	* utils/check_query.c, utils/rasqalcmdline.h, utils/read_files.c,
	utils/roqet.c: Remove program args from rasqal_cmdline_read*
	methods

	Replace with use of rasqal_world and log handler

	* utils/read_files.c:
	Use rasqal_alloc_memory / rasqal_free_memory

	* utils/manifest.c:
	remove dummy code

	* utils/manifest.c:
	(manifest_test_run): Renamed from manifest_testsuite_run_test

	Remove testsuite parameter and pass in PATH (for now)

	* utils/manifest.c: ws

	* utils/Makefile.am, utils/check_query.c, utils/compare_results.c,
	utils/rasqalcmdline.h: Add compare_results.c module

	Move code from check_query.c into librasqalcmdline.la

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

	* utils/manifest.c: Move UPDATE / PROTOCOL test checking to
	running of tests

	(manifest_new_testsuite): Remove check
	(manifest_testsuite_run_test, manifest_testsuite_run_suite): Add
	check

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

	* utils/manifest.c:
	Conditionalize RASQAL_DEBUG

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

	* utils/manifest.c:
	Move declarations to start of block (C90)

	* utils/testrunner.c:
	Move declarations to start of block (C90)

	* utils/manifest.c: Fixes for C++ Add compare around return value
	of strstr

	(manifest_new_testsuite): Remove unused rc variable, and reset ts
	on failure.

	* utils/manifest.c:
	Fixes for C++

	* utils/manifest.c, utils/manifest.h, utils/testrunner.c:
	(manifest_testsuite_run_suite): Takes a sequence of manifest URIs

2014-03-03  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c, utils/testrunner.c: docs

2014-03-02  Dave Beckett <dave@dajobe.org>

	* utils/testrunner.c:
	Add testrunner utility arg handling

	* utils/.gitignore, utils/Makefile.am, utils/manifest.c,
	utils/manifest.h, utils/testrunner.c: Split into testrunner main
	and manifest.c / manifest.h headers

	* utils/manifest.c: Naming convention of methods

	* utils/manifest.c: ws

	* utils/manifest.c: Move all test result details into
	manifest_test_result.

	(manfest_run_test): Add skeleton code

	* utils/manifest.c: Add support for qt:query for test query URI
	Also rename tq_ to qt_ to match turtle usage

	* utils/manifest.c: Remove unused ent:entailmentRegime and
	namespace ent:

	* utils/manifest.c: Add checks for entailmentRegime

	* utils/manifest.c: Decode test approval and withdrawn state

	* utils/manifest.c: Added dawgt: namespace and dawgt:approval URI
	and literal

	* utils/manifest.c: Fix null test type test

	* utils/manifest.c: Move all test graph reading to
	manifest_new_test()

	* utils/manifest.c: Added manifest_world object to hold shared
	uris and literals

	* utils/manifest.c: Add decoding of mf:resultCardinality into a
	test flag

	* utils/manifest.c:
	(manifest_decode_test_type): Move error checking outside function

	* utils/manifest.c: Store decoded type flags in test object

	(manifest_new_test): Lose expect arg and add flags arg.  Set
	expect field from flags.

	* utils/manifest.c: Adjust debug levels

	* utils/manifest.c: Fix error paths to not use uninitialized
	testsuite data

	* utils/manifest.c: Decode test type into flags and use it

	(manifest_decode_test_type): Added for decoding a test URI

	(manifest_new_testsuite): Handle failure, skipping update and
	protocol tests.

	* utils/manifest.c: Store test data URI and data graph URIs from
	manifest Reads qt:data qt:dataGraph fields from action node.  Do
	not store action node itself.

	* utils/manifest.c: Debug messages

	* utils/manifest.c: Store test query result URI (file) in
	manifest_test

	* utils/manifest.c:
	Fix ownership for test parameters and fields

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

	* utils/manifest.c: ws

	* utils/manifest.c:
	Finished decoding of manifests

	(manifest_new_test): Added; uses a rasqal_literal as ID, not a
	uri-like string that might be a blank node either.

	(manifest_free_test): Add rest of fields.

	(manifest_new_testsuite): Added mf:name, mf:action, rdf:first,
	rdf:rest and rdf:nil Decode RDF collection of tests into test
	objects.

	* utils/manifest.c: fix fputc wrong order

	* utils/manifest.c: Add start of testsuite runner Added states for
	xfail, uxpass, skip

	(manifest_test_state_char, manifest_test_state_label): Added to
	turn states into labels.

	(manifest_new_test_result): Added to create test result with a
	sequence of tests per state.

	(manifest_free_test_result): Free sequence of tests/state

	(manifest_free_test): Added to support above.

	(manifest_indent): Added for indenting.

	(manifest_run_testsuite): Added doing test counting but no actual
	running yet.

	(manifest_test_manifests): create a test result and
	manipulate aggregating tests.

	* utils/manifest.c: ws

	* utils/manifest.c: Fix testsuite alloc/frees

	* utils/manifest.c:
	(manifest_free_testsuite): Free more fields

	* utils/manifest.c: free URI and concept literals

	* utils/manifest.c: Fix node cleanup

	* utils/manifest.c:
	Add tidying for test results (manifest_free_test_result): Added

	* utils/manifest.c: docs

	* utils/manifest.c: Added manifest_testsuite constructor and
	destructor

	(manifest_new_testsuite): Added, based on manifest_read_plan()
	that builds it from a manifest file.

	(manifest_free_testsuite): Added.

	(manifest_test_manifests): Added to test a sequence of manifest
	docs

	(main): Use manifest_test_manifests()

2014-02-28  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c:
	Rename enum

2014-02-25  Dave Beckett <dave@dajobe.org>

	* utils/manifest.c:
	Decode manifest, description, path, entries

2014-02-24  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr.c, src/rasqal_expr_evaluate.c,
	src/rasqal_literal.c, src/rasqal_query.c, src/rasqal_raptor.c,
	utils/check_query.c: Fix unreachable code - break after return
	mostly.

	(rasqal_expression_visit): More substantial update to set result
	var and return in one place.

	* configure.ac:
	Add -Wunreachable-code

	* src/rasqal_dataset.c, src/rasqal_internal.h:
	(rasqal_dataset_load_graph_uri): Added

	* tests/improve:
	Replace expect_fail with expect=value

	* tests/sparql/check-sparql: Import check-sparql changes from
	testing repo 7113a34565409463b9804f1381b5d1ea7ebc95f6 - Back out
	of negative logic: replace expect_fail with expect=value
	c25354ad2dcb4635906e5c9729bee1f588108b62 - fix yesno
	9ca0b6cc1f74e3972039ba6d019e494902b957ec - Report all config vars
	used.

	* NEWS.html, RELEASE.html, configure.ac:
	Bumped version to 0.9.33

2014-02-23  Dave Beckett <dave@dajobe.org>

	* tests/improve: Put indent, verbose, dryun as arguments not in
	testsuite obj.

	* utils/.gitignore, utils/Makefile.am, utils/manifest.c: Add
	manifest utility

	* Snapshotted rasqal_0_9_32 for 0.9.32 release (GIT cdb85abbfe2dc7c740970a92399b734be544cc1c)

2014-02-22  Dave Beckett <dave@dajobe.org>

	* tests/algebra/Makefile.am: Restore t:path with current dir so
	that convert_graph_pattern is found

	* tests/algebra/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/aggregate/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/bugs/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,
	tests/sparql/warnings/Makefile.am: No need for manifest ttl
	t:precondition now that XML::DOM is not needed

	* INSTALL.html: No need for XML::DOM check

	* src/rasqal_expr_numerics.c: Fix OSSP UUID include

	* configure.ac, 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/aggregate/Makefile.am,
	tests/sparql/bound/Makefile.am, tests/sparql/bugs/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,
	tests/sparql/warnings/Makefile.am: Remove use of rapper,
	RAPPER_PATH and t:path in test ttl config

	* tests/improve, tests/sparql/check-sparql: Make improve and
	check-sparql use to-ntriples instead of rapper

	* utils/.gitignore, utils/Makefile.am, utils/to-ntriples.c: Add
	to-ntriples utility for use by test scripts

	* tests/improve: Make improve not use undefined array references

	* configure.ac: Reword raptor version message since
	RAPTOR_MIN_VERSION is a minimum (>=)

	* configure.ac: Improve raptor2 check to distinguish raptor too
	old from not present.

	* src/sparql_parser.y: Alter SPARQL disabled feature messages to
	point to SPARQL 1.1

	* src/sparql_common.h, src/sparql_parser.y: Adjust SPARQL 1.0 and
	SPARQL 1.1 feature flags

	Fixes Issue #0000558
	http://bugs.librdf.org/mantis/view.php?id=558

2014-02-19  Dave Beckett <dave@dajobe.org>

	* src/sparql_parser.y:
	(rasqal_sparql_query_language_init): Handle NULL name

	Fixes Issue #0000567
	http://bugs.librdf.org/mantis/view.php?id=567

2014-02-18  Dave Beckett <dave@dajobe.org>

	* ChangeLog, NEWS.html, RELEASE.html: 0.9.32

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

	* src/rasqal_algebra.c, src/rasqal_datetime.c,
	src/rasqal_decimal.c, src/rasqal_expr.c, src/rasqal_literal.c,
	src/rasqal_random.c, src/rasqal_regex.c,
	src/rasqal_row_compatible.c, src/rasqal_rowsource.c,
	src/rasqal_rowsource_aggregation.c, src/rasqal_rowsource_empty.c,
	src/rasqal_rowsource_groupby.c, src/rasqal_rowsource_join.c,
	src/rasqal_rowsource_project.c,
	src/rasqal_rowsource_rowsequence.c,
	src/rasqal_rowsource_service.c, src/rasqal_rowsource_triples.c,
	src/rasqal_rowsource_union.c, src/rasqal_variable.c,
	src/rasqal_xsd_datatypes.c, src/sparql_lexer.l,
	src/sparql_parser.y, src/strcasecmp.c: Add STANDALONE if/ifndef
	STANDALONE ... endif comments

	* src/rasqal_decimal.c: Wrap more xsd_decimal code for internal
	use, not in test runner

	* src/rasqal_decimal.c: Rewrite test code to use usual xsd decimal
	constructor / destructors

	* src/rasqal_xsd_datatypes.c: Add STANDALONE wrappers to prevent
	'main' symbol appearing in library

	Make rasqal_xsd_check_double_format an internal non-static symbol

	Fixes Issue #0000564
	http://bugs.librdf.org/mantis/view.php?id=564

	* src/strcasecmp.c: Protect rasqal_strcasecmp* from appearing in
	standalone compile

2014-01-26  Dave Beckett <dave@dajobe.org>

	* libsv: update libsv

	* configure.ac: Reverting "Make libsv into a config subdir"

	Revert "Make libsv into a config subdir" This reverts commit
	a453c53656de630709a9b61854b90f8aa6d1c32b.

	* configure.ac: Make libsv into a config subdir

2014-01-25  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: Tidy redirect syntax

2014-01-22  Dave Beckett <dave@dajobe.org>

	* INSTALL.html, LICENSE.html, NEWS.html, README.html,
	RELEASE.html, TODO.html: 2014

2014-01-19  Dave Beckett <dave@dajobe.org>

	* libsv: Update libsv

2014-01-15  Dave Beckett <dave@dajobe.org>

	* autogen.sh: Create NEWS and README

2014-01-14  Dave Beckett <dave@dajobe.org>

	* libmtwist, libsv: Update submodules

	* Makefile.am: Fix HTML rules

2014-01-12  Dave Beckett <dave@dajobe.org>

	* .travis.yml: travis CI

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

	* NEWS.html, RELEASE.html: 0.9.32

	* configure.ac: Make ossp work as a uuid library option

	--with-uuid-library=ossp and automatic discovery of ossp UUID now
	work

	* configure.ac: Use AC_CHECK_PROGS to find pcre-config and
	libgcrypt-config

	AC_CHECK_PROG doesn't default to setting it as found!

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

	* src/rasqal_general.c, src/sparql_lexer.l, src/sparql_parser.y:
	2014

	* src/sparql_parser.y: Remove lots of (rasqal_query*)rq casts no
	longer needed

	* src/sparql_lexer.l: docs

	* src/sparql_lexer.l: Remove YY_NO_INPUT - do need yyinput() /
	input()

	* src/sparql_lexer.l: Set YY_NO_INPUT

	* src/sparql_lexer.l:
	Add missing get/set column prototypes.

	debian flex 2.5.35-10.1 added these column header prototypes in
	re-entrant mode.  standard flex omits them

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

	* configure.ac, src/Makefile.am, src/sparql_lexer.l,
	src/sparql_parser.y:
	Update to use Bison 3.0

	Update configure check to accept only Bison (not yacc) 3.0.0 or
	newer

	Updated sparql parser with 3.0 directives

	Updated sparql lexer to add bison bridge

