2012-05-13  Dave Beckett  <dave@dajobe.org>

	* Snapshotted rasqal_0_9_29 for 0.9.29 release (GIT
	b208e046859c86859449efe2985aca4a3c1bba91)

	* src/rasqal_query_transform.c:
	(rasqal_query_prepare_common): Ignore always 0 GP visit return [clang]

	* src/rasqal_expr_numerics.c:
	(rasqal_expression_evaluate_uuid): Free URI string when want_uri

	* src/rasqal_expr_strings.c: Free input literals to strbefore()
	and strafter()

	(rasqal_expression_evaluate_strbefore)
	(rasqal_expression_evaluate_strafter): Free the input literals on
	success before returning the result

	* src/rasqal_datetime.c:
	(rasqal_xsd_datetime_set_from_timeval): Initialise have_tz to Z

	* src/rasqal_expr_datetimes.c: Free input literals to timezone()
	and tz() evaluations

	(rasqal_expression_evaluate_datetime_timezone)
	(rasqal_expression_evaluate_datetime_tz): Free the input literals
	on success before returning the result

	* NEWS.html, RELEASE.html: 0.9.29

	* src/rasqal_variable.c: Added variable usage debugging if define
	RASQAL_DEBUG_VARIABLE_USAGE set

	* src/rasqal_rowsource_assignment.c:
	(rasqal_new_assignment_rowsource): Take reference to input var

	* src/rasqal_projection.c: docs

	* src/rasqal_query.c: remove dup bound variables print

	* src/sparql_parser.y: Fix sparql_uri_applies destructor
	(GraphRefAll): Call it too.

	* src/sparql_parser.y:
	(ConstructQuery): !where_gp is a failure

	* src/sparql_parser.y:
	(ConstructQuery): Test where_gp not undefined var

	* src/rasqal_graph_pattern.c:
	(rasqal_free_graph_pattern): Free variable

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

	* src/rasqal_rowsource.c: Fix rowsequence reference loss

	(rasqal_rowsource_read_row): If calling
	rasqal_rowsource_read_all_rows internally, do not overwrite a
	rows_sequence pointer.

	(rasqal_rowsource_read_all_rows): Code tidy to aid debugging Report
	saving rows in debug message

	* src/rasqal_rowsource.c: Code indenting

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

	* src/rasqal_engine_sort.c: docs

	* src/sparql_parser.y: Fix literal reference count loss in
	BindingsRow

	(BindingsRow): Do not need to copy literal,
	rasqal_row_set_value_at does it.

	* src/rasqal_engine_sort.c, src/rasqal_literal.c,
	src/rasqal_map.c: Pass obj pointers into rasqal_map compare
	callback

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

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): free old strings on decimal
	promotion.

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): remove decimal string ownership

	* src/rasqal_general.c, src/rasqal_internal.h: Move git-version.h
	include to just one module to speed up recompiles.

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): remember string ownership for
	decimal

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): use string for decimal

	* src/rasqal_literal.c: != !!

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): handle reuse of old decimal string

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): clear shared decimal string on
	free

2012-05-09  Dave Beckett <dave@dajobe.org>

	* README.html: html

	* utils/roqet.1, utils/roqet.c: Add -d none option and make it
	default.

	* src/rasqal_expr_strings.c:
	(rasqal_expression_evaluate_concat): Do not copy NULL URI

	* src/rasqal_literal.c: Cast side-effected returns of size_t to
	unsigned int [clang]

	* src/sparql_lexer.l:
	(rasqal_sparql_name_check): Use & for bit check [clang]

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): Do not destroy object refs

2012-05-08  Dave Beckett <dave@dajobe.org>

	* src/rasqal_rowsource_aggregation.c:
	(rasqal_new_aggregation_rowsource): docs and seq usage in test

	* src/rasqal_rowsource_aggregation.c,
	src/rasqal_rowsource_empty.c, src/rasqal_rowsource_groupby.c,
	src/rasqal_rowsource_project.c: Correct variable reference usage
	in tests and test cleanup

	* src/rasqal_row.c:
	(rasqal_new_row_sequence): Do not double reference to var Internal
	function mostly for tests

	* NEWS.html, RELEASE.html: 0.9.29 not yet

2012-05-07  Dave Beckett <dave@dajobe.org>

	* src/rasqal_variable.c:
	(main): Fix vars reference count leak in test

	* ChangeLog, NEWS.html, README.html, RELEASE.html: 0.9.29

	* INSTALL.html: Add --with-libgcrypt-config --with-digest-library
	and tidy

2012-05-05  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_transform.c: Replace out-of-scope FILTER vars
	with constant FALSE

	(rasqal_query_filter_variable_scope): Added to check scope of vars
	in filter using an upwards GP walk wih
	rasqal_graph_pattern_get_parent() and
	rasqal_graph_pattern_variable_bound_below().

	(rasqal_query_prepare_common): Call
	rasqal_query_filter_variable_scope() after tree GPs have been
	enumerated.  This has the consequence that constant join
	conditions may be not optimized out.

	Fixes last SPARQL 1.0 test suite failure:
	SPARQL 1.0 Summary:
	  SPARQL 1.0 total passes: 441
	  SPARQL 1.0 total failures: 0

	* src/rasqal_graph_pattern.c, src/rasqal_internal.h:
	(rasqal_graph_pattern_variable_bound_below): Added

	* src/rasqal_graph_pattern.c, src/rasqal_internal.h:
	(rasqal_graph_pattern_get_parent): Added

	* src/rasqal_rowsource_join.c: Handle a constant join expression
	correctly.  This is not optimal at this point but it is correct.
	For a FALSE join condition for a LEFT JOIN it should never read
	anything from the right rowsource.  Currently it reads every row
	and throws them all away

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

	* src/rasqal_rowsource_groupby.c:
	(rasqal_new_groupby_rowsource): Tidy con init [clang]

	* src/rasqal_rowsource_aggregation.c:
	(rasqal_new_aggregation_rowsource): Init con to NULL [clang]

	* src/rasqal_literal.c:
	(rasqal_new_literal_from_promotion): init len to prevent [clang]
	warning

	* libmtwist: Update libmtwist

	* src/rasqal_regex.c:
	(rasqal_regex_replace_posix): Free result on failure [clang]

	* src/rasqal_format_rdf.c:
	(rasqal_rowsource_rdf_process): Error path for malloc [clang]

	* src/rasqal_rowsource_aggregation.c:
	(rasqal_new_aggregation_rowsource): Free con on error [clang]

	* src/rasqal_rowsource_groupby.c:
	(rasqal_new_groupby_rowsource): Free con on error [clang]

	* src/rasqal_rowsource.c:
	(rasqal_rowsource_add_variable): Arg check [clang]

	* src/rasqal_literal.c:
	(rasqal_literal_as_counted_string): Check error_p [clang]

	* src/rasqal_algebra.c:
	(rasqal_algebra_basic_graph_pattern_to_algebra): return NULL [clang]

2012-05-02  Dave Beckett <dave@dajobe.org>

	* configure.ac, src/rasqal_digest.c, src/rasqal_internal.h: Make
	libgcrypt work as a digest backend

	Added configure arg --with-libgcrypt-config=PATH to
	libgcrypt-config Made --with-digest-library=gcrypt work

	(rasqal_digest_buffer): gcrypt version works and uses lower level
	functions.  Removed const attribute on an output parameter.

	* docs/tmpl/section-expression.sgml: Update tmpls

	* configure.ac, src/rasqal_expr_numerics.c: Fix libuuid configure
	tests

	* configure.ac, src/rasqal_expr_numerics.c: Add internal uuid
	configure and macro

	* configure.ac, src/rasqal.h.in, src/rasqal_expr.c,
	src/rasqal_expr_evaluate.c, src/rasqal_expr_numerics.c,
	src/rasqal_internal.h, src/rasqal_query_write.c,
	src/sparql_lexer.l, src/sparql_parser.y:
	Add UUID and STRUUID

	rasqal_op gains RASQAL_EXPR_UUID and RASQAL_EXPR_STRUUID

	(rasqal_expression_evaluate_uuid): Added to evaluate both
	Implementation uses libuuid if it exists or uses rasqal random to
	generate a random UUID (v4).

	(rasqal_expression_evaluate_uriuuid)
	(rasqal_expression_evaluate_struuid): Added as wrappers to above

2012-04-30  Dave Beckett <dave@dajobe.org>

	* docs/tmpl/section-literal.sgml, docs/tmpl/section-query.sgml,
	docs/tmpl/section-utilities.sgml, src/rasqal_regex.c:
	rasqal_regex_replace arg docs and update tmpls

	* docs/rasqal-changes.tsv, docs/rasqal-docs.xml,
	docs/rasqal-sections.txt, docs/tmpl/section-utilities.sgml,
	src/rasqal.h.in, src/rasqal_internal.h, src/rasqal_regex.c: Move
	rasqal_regex_replace to the public API

	(rasqal_regex_replace): Made public
	Fixes Issue #0000504 http://bugs.librdf.org/mantis/view.php?id=504

	* docs/rasqal-docs.xml: 2012

	* src/rasqal_query_transform.c: Update query prepartion for
	rasqal_query_graph_pattern_visit2

	(rasqal_query_prepare_count_graph_pattern): Renamed from
	rasqal_query_prepare_count_graph_patterns since it deals with 1.

	(rasqal_query_enumerate_graph_patterns): Added, calling
	rasqal_query_prepare_count_graph_pattern and using
	rasqal_query_graph_pattern_visit2() result.

	(rasqal_query_prepare_common): Check return code from
	rasqal_query_graph_pattern_visit2 calls.  Use
	rasqal_query_enumerate_graph_patterns() to do enumeration.

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt,
	src/rasqal.h.in, src/rasqal_query.c:
	(rasqal_query_graph_pattern_visit2): Added deprecating
	rasqal_query_graph_pattern_visit

	* src/rasqal_algebra.c: Added
	rasqal_algebra_new_boolean_constant_expr

	(rasqal_algebra_new_boolean_constant_expr): Renamed from
	rasqal_algebra_new_true_expr() and added internal docs

2012-04-18  Dave Beckett <dave@dajobe.org>

	* src/rasqal_algebra.c:
	(rasqal_algebra_graph_pattern_to_algebra): More extra debug info

	* src/rasqal_algebra.c:
	(rasqal_algebra_new_true_expr): Added and use it

2012-04-11  Dave Beckett <dave@dajobe.org>

	* RELEASE.html: 0.9.29 - no rdql

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

	* docs/tmpl/section-xsd.sgml: Update tmpls

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt: Added
	rasqal_xsd_datetime_equals2

	* src/rasqal_general.c: 2012

	* utils/roqet.c: catch another malloc failure

	* utils/roqet.c:
	(print_help): added to make main shorter

	* utils/check_query.c:
	(check_query_read_file_string): Error handling for malloc

	* utils/check_query.c: allocate buffer from heap not stack to
	prevent >4K stack frame

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

	* src/rasqal_query_transform.c:
	(rasqal_query_merge_graph_patterns): Do not merge { FILTER }

	* tests/rdql/testsuite/Makefile.am: Mark RDQL test B-01 as failing
	- don't care

	* src/rasqal_literal.c: Enable DISTINCT to use RDF term comparison

	(rasqal_literal_string_equals_flags): Renamed from
	rasqal_literal_string_equals and adds flags arg to set the
	equality mode - value RASQAL_COMPARE_XQUERY, RDF term
	RASQAL_COMPARE_RDF or RDQL RASQAL_COMPARE_URI.  Do not equate ""
	and ""^^xsd:string unless value or RDQL mode

	Update callers of rasqal_literal_string_equals to use
	rasqal_literal_string_equals_flags and pass in flags.

	(rasqal_literal_same_term): Use literal value comparison with
	rasqal_literal_string_equals_flags.

	* src/rasqal_engine_sort.c: rowsorting for distinct uses RDF term
	comparisons

	(rasqal_engine_new_rowsort_map): When distinct, set literal
	compare_flags to use RDF term comparison

2012-04-02  Dave Beckett <dave@dajobe.org>

	* src/rdql_lexer.l, src/sparql_lexer.l:
	(main): Throw away unused values instead of storing in buffer

	* src/rasqal_random.c:
	(main): Throw away unused random results in testing

	* src/rasqal_regex.c:
	(main): locator is only needed for RASQAL_REGEX_PCRE

	* src/rasqal_query_results.c:
	(rasqal_query_results_get_triple): Rewrite loop logic to set skip at
	end

2012-03-28  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query.c, tests/sparql/check-sparql, utils/roqet.c:
	Update test runner

	(rasqal_query_print): Print projected variable names for test
	runner

	tests/sparql/check-sparql: merge from redland-testing and fixup
	always get variables from results header

	utils/roqet: print projected variable names

	* tests/sparql/check-sparql: preserve v=NULL for roqet output

	* tests/sparql/check-sparql: return v=NULL for variables unset in
	a result row

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

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

	* tests/sparql/check-sparql:
	(toDebug): quote result str

	* README.html, RELEASE.html, configure.ac,
	src/rasqal_expr_strings.c, src/rasqal_general.c: Require Raptor
	2.0.7 or newer.

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

	* src/rasqal_literal.c:
	(rasqal_new_string_literal_common): Use bitwise & - thanks Lauri

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

	* src/sparql_parser.y: Empty ArgList returns empty seq not NULL

	* src/rasqal_xsd_datatypes.c:
	(rasqal_xsd_format_double): Move exponent and terminate properly.

	* src/rasqal_literal.c:
	(rasqal_new_string_literal_node) docs

	* src/rasqal_literal.c:
	(rasqal_literal_string_to_native): Only flag now is canonicalizing

	(rasqal_new_string_literal_common): Takes native type promotion
	and canonicalizing flag.

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): Add canonicalize parameter to
	set string

	* src/rasqal_literal.c, utils/check_query.c: Always
	rasqal_literal_string_to_native before rasqal_literal_equals_flags

	* src/rasqal_decimal.c:
	(rasqal_xsd_decimal_as_string): Canonical decimal ends in .0
	Correct test results for canonical decimal format

	* src/rasqal_xsd_datatypes.c:
	(rasqal_xsd_format_double): Return 0.0E0 for zero

	* src/rasqal_literal.c: Fix numeric promotion with one decimal and
	one float/double.

	(rasqal_literal_promote_numerics): Promote decimal with
	float/double to float/decimal following XPath rules - B1 1.b
	http://www.w3.org/TR/xpath20/#dt-type-promotion

2012-03-23  Dave Beckett <dave@dajobe.org>

	* utils/check_query.c: Call rasqal_query_add_data_graph() after
	prepare

	* src/rasqal_expr_evaluate.c: Evaluate COALESCE following sparql
	1.1 rules

	(rasqal_expression_evaluate_coalesce): Ignore evaluation errors in
	sequence of expressions until a good result is found.

2012-03-19  Dave Beckett <dave@dajobe.org>

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

	* src/rasqal_rowsource_aggregation.c: Fix AVG test to expect a
	decimal result

2012-03-18  Dave Beckett <dave@dajobe.org>

	* src/rasqal_rowsource_aggregation.c: Do not set aggregate
	expression value on error

	* src/rasqal_literal.c:
	(rasqal_literal_divide): Result is decimal if both args are integer

	* src/rasqal_literal.c: Promote date to datetime in comparisons
	and ensure Zulu TZ

	(rasqal_new_literal_from_promotion, rasqal_literal_equals_flags):
	Promote date to datetime.

	(rasqal_literal_equals_flags): Use rasqal_xsd_datetime_equals2
	returning error for incomparible.

	* src/rasqal.h.in, src/rasqal_datetime.c:
	(rasqal_xsd_datetime_equals2): Added, deprecating
	rasqal_xsd_datetime_equals Return incomparible flag to caller.

	* docs/rasqal-changes.tsv, src/rasqal.h.in, src/rasqal_datetime.c,
	src/rasqal_literal.c:
	(rasqal_xsd_date_equals): Returns incomparible pointer This allows
	the test to fail when across timelines that are incomparible.

	(rasqal_literal_equals_flags): Update to take error return.

	* tests/sparql/check-sparql: $core_dumped earlier

	* src/rasqal_datetime.c:
	(rasqal_xsd_timezone_format): Generate sign from inverse of adjusted
	minutes

2012-02-20  Dave Beckett <dave@dajobe.org>

	* src/rasqal_datetime.c:
	(rasqal_xsd_datetime_equals): Work if dt1 or dt2 are NULL

	* tests/sparql/check-sparql:
	Update check-sparql from testing repo

	* src/rasqal_internal.h, src/rasqal_literal.c,
	src/rasqal_xsd_datatypes.c: Move xsd boolean string check to xsd
	code

	(rasqal_xsd_boolean_value_from_string): Renamed from
	rasqal_literal_string_interpreted_as_boolean

	* src/rasqal.h.in, src/rasqal_datetime.c: autodocs

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt,
	src/rasqal.h.in, src/rasqal_datetime.c, src/rasqal_literal.c:
	Replace rasqal_xsd_date_compare2 with rasqal_xsd_date_compare and
	rename

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt,
	src/rasqal.h.in, src/rasqal_datetime.c: autodocs

	* src/rasqal_datetime.c:
	(rasqal_xsd_timezone_format): How did this ever work?

	* src/rasqal_datetime.c, src/rasqal_internal.h: Never normalize
	date or dateTime fields on parsing

	(rasqal_xsd_date_parse): simplify without normalizing.

	(rasqal_xsd_date_normalize): Added but internal/standalone tests
	since it is not a public API or used outside the test code.

	(rasqal_new_xsd_datetime): make a datetime copy and normalize that
	to get the time_on_timeline.

	(rasqal_xsd_datetime_to_counted_string)

	(rasqal_xsd_date_to_counted_string)

	(rasqal_xsd_date_string_to_canonical): Updated docs.

	(rasqal_xsd_datetime_check, rasqal_xsd_date_check): Just parse, do
	not touch value with normalizing.

	(rasqal_new_xsd_date): Set hour
	to noon for normalizing internal datetime using
	rasqal_xsd_datetime_normalize.

	(test_datetime_parse_and_normalize)

	(test_date_parse_and_normalize): Moved to test code from static
	functions that were only used here.

	(main): Adjust test code expected results so that parsing and
	normalizing does not drop the TZ if it was there in the first
	place, even when normalizing.

	* src/rasqal_datetime.c:
	(rasqal_xsd_datetime_normalize): Clearly set have_tz to N or Z

	* src/rasqal.h.in, src/rasqal_datetime.c: Handle XSD timezone
	recording and generating properly

	rasqal_xsd_date and rasqal_xsd_datetime gain a have_tz flag field
	that indicates the state of the timezone_minutes.

	(rasqal_xsd_datetime_normalize): Use have_tz to choose when to
	normalize.

	(rasqal_xsd_datetime_parse): Record N, Z or Y for have_tz

	(rasqal_new_xsd_datetime_from_xsd_date): Copy have_tz field.

	(rasqal_xsd_timezone_format): Renamed from
	rasqal_xsd_datetime_timezone_format() and take the timezone fields
	as input.

	(rasqal_xsd_datetime_to_counted_string)
	(rasqal_xsd_datetime_get_tz_as_counted_string): Use
	rasqal_xsd_timezone_format with new args.

	(rasqal_xsd_datetime_equals): Use have_tz fields.

	(rasqal_xsd_date_to_counted_string): Use
	rasqal_xsd_timezone_format and generate timezone field if needed.

	(rasqal_new_xsd_date): Copy the have_tz field.

	* utils/roqet.c: Add data graphs after prepare

	* src/rasqal_internal.h, src/rasqal_query.c, src/sparql_parser.y:
	Try to not lose data when reparsing into same query

	(rasqal_query_reset_select_query): Added to delete existing data,
	used before a parse

	(rasqal_query_set_modifier): Added to update
	modifier but free any existing first.

	(rasqal_sparql_query_language_prepare): SPARQL parser now calls
	rasqal_query_reset_select_query to do the reset before a parse.

	* src/rasqal_rowsource_slice.c: Count input and output row offsets
	for slice rowsource

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

	* tests/engine/rasqal_limit_test.c:
	Test subselect limits

	* tests/engine/rasqal_limit_test.c:
	Add subquery limit offset check for Issue #0000493
	http://bugs.librdf.org/mantis/view.php?id=493

	* src/rasqal_datetime.c:
	(rasqal_xsd_datetime_get_seconds_as_decimal): Fix str buffer

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

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

	* src/rasqal.h.in, src/rasqal_datetime.c:
	(rasqal_new_xsd_datetime_from_xsd_date): Added constructor from a
	date

	* src/rasqal_literal.c:
	(rasqal_literal_compare): Use non-deprecated date/datetime compare
	methods

	* src/rasqal.h.in, src/rasqal_datetime.c: XSD date and dateTime
	compares use timeontimeline and timezone info

	(rasqal_xsd_date_compare2): Added deprecating
	rasqal_xsd_date_compare and returning incomparible state.

	(rasqal_xsd_datetime_compare2): Added deprecating
	rasqal_xsd_datetime_compare and returning incomparible state.

	(rasqal_xsd_timeline_compare): Added internal routine comparing
	timelines with/without timezones using XSD dateTime order relation
	rules.

	(test_date_compare, test_datetime_compare): Added testing code.

	(main): Call above to test comparisons.

	* src/rasqal_datetime.c:
	Compare date equality checking timezones

	(rasqal_xsd_date_equals): Use timezone_minutes

	(test_date_equals): Added testing function

	(main): Added date equality tests using above.

	* src/rasqal_datetime.c:
	Compare datetime equality with timeline and
	timezones

	(rasqal_xsd_datetime_equals): Uses time_on_timeline.

	(test_datetime_equals): Tester code aded (main): Added tests

	* src/rasqal.h.in, src/rasqal_datetime.c: Add time_on_timeline and
	timezone_minutes fields to date and datetime classes

2012-02-15  Dave Beckett <dave@dajobe.org>

	* src/rasqal_algebra.c, src/rasqal_digest_sha1.c,
	src/rasqal_expr_datetimes.c, src/rasqal_expr_strings.c,
	src/rasqal_feature.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_general.c, src/rasqal_literal.c,
	src/rasqal_query_results.c, src/rasqal_query_write.c,
	src/rasqal_raptor.c, src/rasqal_row.c,
	src/rasqal_rowsource_aggregation.c,
	src/rasqal_rowsource_groupby.c, src/rasqal_rowsource_triples.c,
	src/rasqal_service.c, src/rasqal_xsd_datatypes.c,
	src/rdql_lexer.l, src/rdql_parser.y, src/sparql_lexer.l,
	src/sparql_parser.y: Record good and bad casts to const unsigned
	char*

	* src/rasqal_digest.c, src/rasqal_expr_datetimes.c,
	src/rasqal_literal.c, src/rasqal_query_results.c,
	src/rasqal_query_transform.c, src/rasqal_variable.c,
	src/rdql_lexer.l, src/sparql_lexer.l: Record good and bad casts to
	unsigned char*

	* src/rasqal_datetime.c, src/rasqal_expr.c,
	src/rasqal_expr_evaluate.c, src/rasqal_expr_strings.c,
	src/rasqal_feature.c, src/rasqal_format_rdf.c,
	src/rasqal_format_sparql_xml.c, src/rasqal_format_table.c,
	src/rasqal_general.c, src/rasqal_literal.c, src/rasqal_prefix.c,
	src/rasqal_query.c, src/rasqal_query_results.c,
	src/rasqal_query_test.c, src/rasqal_raptor.c, src/rasqal_regex.c,
	src/rasqal_result_formats.c, src/rasqal_row.c,
	src/rasqal_rowsource.c, src/rasqal_rowsource_aggregation.c,
	src/rasqal_rowsource_groupby.c, src/rasqal_rowsource_join.c,
	src/rasqal_rowsource_project.c, src/rasqal_rowsource_triples.c,
	src/rasqal_rowsource_union.c, src/rasqal_service.c,
	src/rasqal_variable.c, src/rasqal_xsd_datatypes.c,
	src/rdql_lexer.l, src/sparql_lexer.l, src/sparql_parser.y: Record
	good and bad casts to const char*

	* src/rasqal_datetime.c, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c, src/rasqal_format_html.c,
	src/rasqal_format_sparql_xml.c, src/rasqal_format_table.c,
	src/rasqal_general.c, src/rasqal_iostream.c, src/rasqal_literal.c,
	src/rasqal_query.c, src/rasqal_query_results.c,
	src/rasqal_query_test.c, src/rasqal_random.c,
	src/rasqal_result_formats.c, src/rasqal_rowsource_triples.c,
	src/rasqal_xsd_datatypes.c, src/rdql_lexer.l, src/rdql_parser.y,
	src/sparql_lexer.l, src/sparql_parser.y: Record good and bad casts
	to char*

	* src/rasqal_algebra.c, src/rasqal_dataset.c,
	src/rasqal_datetime.c, src/rasqal_digest.c,
	src/rasqal_expr_numerics.c, src/rasqal_literal.c,
	src/rasqal_random.c, src/rasqal_rowsource.c, src/snprintf.c,
	src/strcasecmp.c, utils/roqet.c: Record good and bad casts to
	unsigned int

	* src/snprintf.c:
	(rasqal_format_integer): Fix off by 1 in length calculation for
	integers wider than width

	* src/rasqal_datetime.c, src/rasqal_internal.h, src/snprintf.c:
	(rasqal_format_integer): Change return type to size_t

	* src/rasqal_algebra.c, src/rasqal_datetime.c,
	src/rasqal_engine.c, src/rasqal_expr.c, src/rasqal_expr_strings.c,
	src/rasqal_format_sparql_xml.c, src/rasqal_format_table.c,
	src/rasqal_graph_pattern.c, src/rasqal_iostream.c,
	src/rasqal_literal.c, src/rasqal_query.c,
	src/rasqal_query_write.c, src/rasqal_random.c, src/rasqal_regex.c,
	src/rasqal_rowsource.c, src/rasqal_rowsource_join.c,
	src/rasqal_update.c, src/rasqal_xsd_datatypes.c, src/snprintf.c,
	src/sparql_lexer.l, src/sparql_parser.y, src/strcasecmp.c: Record
	good and bad casts to int

	Using RASQAL_GOOD_CAST and RASQAL_BAD_CAST macros.  When bad there
	are some notes.

	* src/rasqal_xsd_datatypes.c: Fix int cast in
	rasqal_xsd_format_double

	(rasqal_xsd_format_double): Handle trailing_zero_start as a size_t
	so add a have_trailing_zero flag to mark when it is valid.

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

	* src/rasqal_query_transform.c:
	(rasqal_query_remove_empty_group_graph_patterns): Only for GROUP

2011-12-13  Dave Beckett <dave@dajobe.org>

	* src/rasqal_datetime.c:
	Size of xsd:Date prefix is 6 not 7

2012-02-13  Lauri Aalto <laalto@iki.fi>

	* autogen.sh:
	require automake 1.11.2+ for -Wextra-portability

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

	* configure.ac:
	Report raptor version in build summary

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

	* src/rasqal_digest_md5.c, src/rasqal_digest_sha1.c,
	src/rasqal_internal.h: Added RASQAL_BAD_CAST RASQAL_GOOD_CAST
	after raptor

	Added it to MD5 and SHA1 calls where a len turns into a size_t

	* build/.gitignore: ar-lib

	* configure.ac:
	Add automake option -Wextra-portability and
	AM_PROG_AR to make it happy

2012-02-05  Dave Beckett <dave@dajobe.org>

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

	* src/rasqal.h.in, src/rasqal_datetime.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_results.c, src/rasqal_query_write.c,
	src/rasqal_xsd_datatypes.c: Added RASQAL_LITERAL_DATE for xsd:Date

	rasqal_literal_type gains RASQAL_LITERAL_DATE but it is
	unfortunately not in the FIRST_XSD to LAST_XSD range so needs it's
	own handling.

	(rasqal_new_xsd_date): Fix call to rasqal_xsd_datetime_parse() to
	unset isDateTime flag.

	(rasqal_xsd_check_date_format): Added.  Add xsd:date to recognized
	datatype URIs in XSD module.

	(rasqal_xsd_datatype_uri_to_type, rasqal_xsd_datatype_type_to_uri)
	(rasqal_xsd_datatype_check, rasqal_xsd_datatype_parent_type): Add
	date support as an XSD type that is not in the FIRST..LAST range.

	(rasqal_new_numeric_literal): Handle RASQAL_LITERAL_DATE via
	rasqal_new_xsd_date()

	(rasqal_free_literal): Updated for date Updated many other methods
	to pretty much do the same thing as RASQAL_LITERAL_DATETIME for
	RASQAL_LITERAL_DATE.

	(rasqal_literal_compare): Use new rasqal_xsd_date_compare

	(rasqal_literal_equals_flags): Use new rasqal_xsd_date_equals

	(rasqal_literal_cast): Allow casting string to date and date to
	string.

2011-12-04  Dave Beckett <dave@dajobe.org>

	* src/Makefile.am, src/rasqal_xsd_datatypes.c: Eliminate never
	used code in rasqal_xsd_datatypes.c Removed empty test code

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt,
	src/rasqal.h.in, src/rasqal_datetime.c, src/rasqal_internal.h: Add
	rasqal_xsd_date for XSD:Date

	(rasqal_new_xsd_date, rasqal_free_xsd_datetime): Added constructor
	and destructor

	(rasqal_xsd_date_to_counted_string, rasqal_xsd_date_to_string)
	(rasqal_xsd_date_equals, rasqal_xsd_date_compare): Added core
	methods

2011-12-03  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_results.c: Fix blank node generation for
	constructs

	(rasqal_literal_to_result_term): Added, pulled out of
	rasqal_query_results_get_triple().  Rewrite blank node IDs to be
	prefixed by the result number, only if the original value was a
	blank node from the CONSTRUCT otherwise leave it alone.

	(rasqal_query_results_get_triple): Use above to turn rasqal values
	into raptor terms and constrain to the RDF rules.

2011-11-20  Dave Beckett <dave@dajobe.org>

	* configure.ac: search for AWK and use it

2011-11-18  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h.in: this is rasqal

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

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

	* Snapshotted rasqal_0_9_28 for 0.9.28 release (GIT
	6618f96e1be4693f1f73be138dd94c46ecc98376)

2011-11-16  Dave Beckett <dave@dajobe.org>

	* configure.ac:
	Make sure raptor is new enough or fail configure

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

	* .gitmodules, autogen.sh, configure.ac, libmtwist,
	src/Makefile.am, src/mtwist_config.h, src/rasqal_random.c: Add
	libmtwist as a submodule to implement random

	* RELEASE.html: 0.9.28

	* src/Makefile.am: Made git-version.h a non-distributable source
	file.

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

	* src/rasqal_general.c:
	(rasqal_log_error_varargs): Use raptor_vasprintf for raptor >= 2.0.5

2011-10-24  Dave Beckett <dave@dajobe.org>

	* src/rasqal_mt_rand.c: Remove rasqal includes

	* src/rasqal_mt_rand.c: multiple code style fixes.

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

	* src/rasqal_mt_rand.c: RASQAL_MT_MATRIX_A

	* src/Makefile.am, src/rasqal_mt_rand.c, src/rasqal_random.c:
	Mersenne Twister functions

	* configure.ac, src/rasqal_random.c: Use GNU MP random routines if
	GMP was configured

	* src/rasqal_random.c: Do not cast int to double, let arithmetic
	promote it

	* src/rasqal_random.c:
	(rasqal_new_random): Set initial seed from system

	* src/rasqal_expr.c, src/rasqal_expr_numerics.c,
	src/rasqal_internal.h, src/rasqal_random.c: Rename random methods;
	add double function

	(rasqal_random_seed): Renamed from rasqal_random_srand

	(rasqal_random_irand): Renamed from rasqal_random_rand

	(rasqal_random_drand): Added returning a double Updated callers to
	use new names.

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

	* INSTALL.html, configure.ac:
	Make random approach configurable

	Added --with-random-approach=ALGO to select from the choices

	It is still an error to have nothing, since rand() is always
	available in POSIX.

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

	* src/rasqal_random.c: RASQAL_RANDOM_STATE_SIZE

	* src/rasqal_random.c: fixes for initstate_r and random_r

	* src/Makefile.am, src/rasqal.h.in, src/rasqal_expr.c,
	src/rasqal_expr_numerics.c, src/rasqal_internal.h,
	src/rasqal_query.c, src/rasqal_random.c: Switch random to an
	object and add tests rasqal_random: added new structure with RNG
	state

	(rasqal_random_get_system_seed): Takes a world pointer.

	(rasqal_new_random): Renamed from rasqal_random_init

	(rasqal_free_random): Renamed from rasqal_random_finish

	(rasqal_random_rand): Document range is 0..RAND_MAX inclusive.

	(rasqal_new_evaluation_context): Create RNG object.

	(rasqal_evaluation_context_set_rand_seed)

	(rasqal_expression_evaluate_rand, rasqal_query_prepare): Use RNG
	object to set seed and get a number.

2011-10-19  Nicholas J Humfrey <njh@aelius.com>

	* src/rasqal_format_sv.c: Added W3C Format URIs for SPARQL 1.1
	Query Results CSV and TSV Formats.

	Added See Also URIs for CSV format.

2011-10-18  Dave Beckett <dave@dajobe.org>

	* configure.ac, src/rasqal.h.in, src/rasqal_random.c: Add support
	for glibc random_r() and prefer re-entrant random routines

	random_r() is a glibc extension

	Prefer the re-entrant random number generators in order:
	random_r(), rand_r() then the portable but not so safe: random()
	and rand().

2011-10-17  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h.in, src/rasqal_expr.c, src/rasqal_internal.h,
	src/rasqal_random.c: With initstate(), save old state

	rasqal_evaluation_context gains a field old_random_state

	(rasqal_random_init): Altered to be an initializer

	(rasqal_random_finished): Added to be a finisher

	(rasqal_random_srand): Renamed from rasqal_random_init.

	Updated callers

2011-10-16  Dave Beckett <dave@dajobe.org>

	* configure.ac, src/rasqal.h.in, src/rasqal_expr.c,
	src/rasqal_expr_numerics.c, src/rasqal_internal.h,
	src/rasqal_query.c, src/rasqal_random.c: Update random support to
	enable use of BSD random() and prefer it

	rasqal_evaluation_context gains a buffer for BSD random to use.
[--snip--]
