2011-01-30  Dave Beckett  <dave@dajobe.org>

	* Snapshotted rasqal_0_9_24 for 0.9.24 release (GIT commit
	17c89f4f3643385e61e25afec9a3599cacf6dedd)

	* tests/sparql/update/Makefile.am, tests/sparql/update/add-3.rq,
	tests/sparql/update/copy-3.rq, tests/sparql/update/move-3.rq: Add
	tests for ADD, COPY, MOVE with 2 DEFAULT args

	* src/rasqal_update.c:
	(rasqal_new_update_operation): Allow ADD, COPY, MOVE to have 2
	NULL args.

	* RELEASE.html, docs/rasqal-changes.tsv, src/rasqal.h.in:
	Documentation fixes for 0.9.24 Add ADD, MOVE, COPY notes about
	source/dest graphs

	Add rasqal_graph_pattern_get_flattened_triples and new enums to
	API changes

2011-01-29  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr.c:
	(rasqal_new_group_concat_expression): Add
	RASQAL_EXPR_FLAG_AGGREGATE

	* src/sparql_parser.y, tests/sparql/update/Makefile.am,
	tests/sparql/update/multiple-1.rq: Support SPARQL 1.1 Update
	DELETE WHERE { }

	(DeleteQuery): Add DELETE WHERE { } storing the triples in
	update->delete_templates

	Add and enable DELETE WHERE tests delete-where-1.rq and
	delete-where-2.rq which were in GIT already but not called.

	* src/sparql_lexer.l, src/sparql_parser.y,
	tests/sparql/update/Makefile.am,
	tests/sparql/update/delete-data-2.rq,
	tests/sparql/update/insert-2.rq,
	tests/sparql/update/multiple-1.rq:
	Require ; between update operations

	Add test for multiple operations in one update

	Adjust tests to match new syntax: delete-data-2.rq insert-2.rq

	Alter sparql lexer and parser test buffer size to 4K

	* src/rasqal_literal.c:
	(rasqal_free_literal): Free datetime datatype URI

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

	* src/rasqal_algebra.c:
	(rasqal_algebra_extract_aggregate_expression_visit): Correct
	variable references for aggregate work: give map a reference.

	* src/rasqal_rowsource_aggregation.c: autodocs

	* src/rasqal_rowsource.c: autodocs

2011-01-28  Dave Beckett <dave@dajobe.org>

	* src/rasqal_algebra.c:
	(rasqal_algebra_query_add_aggregation): Clean up ae if no
	aggregation in query.

	* src/rasqal_rowsource_aggregation.c:
	(rasqal_aggregation_rowsource_finish): Free con->expr_data

	* src/rasqal_solution_modifier.c:
	(rasqal_free_solution_modifier): Free having conditions

	* src/rasqal_algebra.c, src/rasqal_dataset.c, src/rasqal_engine.c,
	src/rasqal_format_table.c, src/rasqal_formula.c,
	src/rasqal_general.c, src/rasqal_graph.c,
	src/rasqal_graph_pattern.c, src/rasqal_map.c,
	src/rasqal_result_formats.c, src/rasqal_row_compatible.c,
	src/rasqal_rowsource.c, src/rasqal_triples_source.c,
	src/rasqal_update.c: Make all object destructors simply return on
	a NULL object pointer

	* src/rasqal_projection.c:
	(rasqal_free_projection): Free if pointer NOT NULL

	* src/rasqal_literal.c:
	(rasqal_new_variable_literal): Only free variable if calloc fails

	* docs/rasqal-sections.txt, src/rasqal.h.in,
	src/rasqal_internal.h, src/rasqal_query_write.c,
	src/rasqal_update.c, src/sparql_lexer.l, src/sparql_parser.y,
	tests/sparql/update/Makefile.am, tests/sparql/update/add-1.rq,
	tests/sparql/update/add-2.rq, tests/sparql/update/copy-1.rq,
	tests/sparql/update/copy-2.rq, tests/sparql/update/move-1.rq,
	tests/sparql/update/move-2.rq: Added support for SPARQL 1.1 Update
	draft ADD, MOVE, COPY parsing.

	rasqal_update_type gains new enum values RASQAL_UPDATE_TYPE_ADD,
	RASQAL_UPDATE_TYPE_MOVE and RASQAL_UPDATE_TYPE_COPY

	Added new enum rasqal_update_graph_applies

	rasqal_update_operation gains new applies field for CLEAR and DROP
	to signify they apply to multiple graphs.

	(rasqal_query_write_graphref): Added method for writing uri or
	DEFAULT or Named or ALL

	(rasqal_query_write_sparql_20060406): Write out new tokens and use
	rasqal_query_write_graphref() for terms.  Refactor.  SPARQL
	lexer/parser adds the new tokens ADD, MOVE, COPY and TO.

	(AddQuery, MoveQuery, CopyQuery): Added.

	(UpdateOperation): Add above alternatives to updates.

	(SilentOpt): Added to return silent flag.

	(CreateQuery, DropQuery, LoadQuery): Refactored to use above flag
	and save several code blocks.  Move around the warnings for
	deprecated SPARQL 1.1 and LAQRS syntax.

	(GraphRefAll): Added for Clear and Drop (excluding GraphRef)

	(rasqal_new_update_operation): Add applies arg.

	(rasqal_update_operation_print): Print new ops, document URI and
	applies.  Added tests for SPARQL 1.1 Update ADD, MOVE, COPY

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

	* src/rasqal_literal.c: Free a few more variable references

	(rasqal_new_variable_literal): Free passed in variable on error

	(rasqal_free_literal): Free variable if not NULL.

	* src/rasqal_literal.c:
	(rasqal_free_literal): Free reference-counted variables

	* utils/roqet.c: Make tidy_query free the query

2011-01-27  Dave Beckett  <dave@dajobe.org>

	* Snapshotted rasqal_0_9_23 for 0.9.23 release (GIT
	c2105bc8f4ccc77bb407213aa19c2a9e57c42531)

	* tests/sparql/Expr1/Makefile.am, tests/sparql/Expr2/Makefile.am:
	Mark 4 SPARQL 1.0 tests as passing after NULL literal comparison
	fixes.
	Expr1:
	  Tests "OPTIONAL-FILTER" and "OPTIONAL - Outer FILTER" now pass
	Expr2:
	  Tests "Test 'boolean effective value' - optional" and 
	  "Test 'boolean effective value' - unknown types" now pass

	* NEWS.html, RELEASE.html, src/rasqal_literal.c:
	(rasqal_literal_equals_flags): Make comparisons with one or more
	NULLs work.

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

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

	* src/rasqal_literal.c:
	(rasqal_literal_array_compare): Sort NULLs earlier in SPARQL
	ordering.
	Fixes Issue#0000407
	http://bugs.librdf.org/mantis/view.php?id=407

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

	* scripts/process-changes.pl: Sort by new version, newest first.
	Put package title in section only. Handle multiple old/new version
	pairs

	* docs/Makefile.am: Rasqal name

	* ChangeLog, ChangeLog.8, Makefile.am: Add ChangeLog.8 for 2010

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

	* scripts/process-changes.pl:
	Update to version from librdf

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

	* src/rasqal_query_write.c:
	(rasqal_query_write_sparql_triple_data): Emit GRAPH lit { ... }
	correctly

	* src/sparql_parser.y:
	(GraphTemplate): Tidy conditions and do cleanup

	* src/sparql_parser.y:
	(GraphTemplate): Apply GRAPH to triples sequence directly

	* src/rasqal_query_write.c:
	(rasqal_query_write_sparql_triple_data): Handle triples templates

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_get_flattened_triples_visit): Handle empty
	seq.

	* src/sparql_parser.y: Return flat triples in update insert/delete
	templates

	(GraphTriples, UpdateQuery): Use
	rasqal_triples_sequence_set_origin() to expand BGP/GGP into a flat
	sequence of triples for caller.

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_get_flattened_triples_visit): Use
	rasqal_triples_sequence_set_origin().

	* src/rasqal_internal.h, src/rasqal_triple.c:
	(rasqal_triples_sequence_set_origin): Added to set the same graph
	URI origin for a sequence of rasqal_triple

	* src/sparql_parser.y: Make update operations
	insert/delete_template fields store seq of triples.

	(GraphTemplate, ModifyTemplate): Now seq of
	rasqal_triple (GraphTemplate): Use
	rasqal_graph_pattern_get_flattened_triples() to turn a basic graph
	pattern or one with GRAPH gp into a sequence of triples.

	* src/rasqal.h.in, src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_get_flattened_triples): Added to flatten
	triple templates

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

	* src/rasqal_update.c:
	(rasqal_new_update_operation): Correct internal docs

	* src/rasqal.h.in: rasqal_update_operation docs

2011-01-21  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr.c:
	(rasqal_expression_compare): Compare op to RASQAL_EXPR_UNKNOWN

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

	* src/sparql_parser.y: When language feature is not allowed, use
	YYERROR to unwind stack and abort query cleanly

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

	* Snapshotted rasqal_0_9_22 for 0.9.22 release (GIT
	b2b04e39695cced136e1d24d00d84066868d0c89)

	* docs/librasqal.3: skeleton

	* utils/Makefile.am: move check-query to EXTRA for now

	* utils/roqet.1: formatting

	* src/rasqal_general.c: 2011

	* configure.ac, src/.gitignore, src/rasqal.h.in,
	src/win32_rasqal_config.h, src/win32_rasqal_config.h.in:
	Substitute rasqal versions into src/rasqal.h.in and
	src/win32_rasqal_config.h.in

	* rasqal-src-config.in: pkg-config raptor2 only

	* configure.ac: RAPTOR_MIN_VERSION 2.0.0

	* configure.ac: AC_SUBST(RAPTOR_MIN_VERSION)

	* configure.ac: RASQAL_LIBTOOL_VERSION 3:0:0 causing soname bump

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

	* scripts/process-changes.pl: Make changes generate 1 page per
	changeset. Sort output by function, type or enum name

	* docs/rasqal-changes.tsv: 0.9.22 changes

	* src/rasqal.h.in: code style

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

	* src/rasqal.h.in: document rasqal_generate_bnodeid_handler.
	Added enum rasqal_query_results_format_flags for bitflags

	* docs/rasqal-sections.txt: Added rasqal_generate_bnodeid_handler,
	rasqal_query_results_format_flags.  Removed
	rasqal_query_results_formatter_get_mime_type,
	raptor_message_handler

	* docs/rasqal-sections.txt: updated sections

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

	* src/rasqal.h.in:
	(rasqal_new_query_results_formatter,
	rasqal_new_query_results_formatter_for_content): Added RASQAL_API
	exports to public API functions.

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

	* src/rasqal.h.in: Removed raptor_message_handler

	* docs/.gitignore, docs/Makefile.am, docs/rasqal-changes.tsv,
	docs/rasqal-docs.xml, scripts/Makefile.am,
	scripts/process-changes.pl: Generate Rasqal changes doc sections
	
	Generate the changes using an update version process-changes.pl
	from raptor V2 that can handle multiple sections for different
	old/new versions as well as omitting sections that have no
	content.

	* src/rasqal.h.in, src/rasqal_data_graph.c, src/rasqal_expr.c,
	src/rasqal_general.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_result_formats.c,
	src/rasqal_service.c, src/rasqal_variable.c, src/rdql_parser.y,
	src/sparql_parser.y, tests/engine/rasqal_graph_test.c,
	tests/engine/rasqal_triples_test.c, utils/check_query.c,
	utils/roqet.1, utils/roqet.c, utils/srxread.c, utils/srxwrite.c:
	
	Remove all deprecated functions and rename foo2() to foo()

	rasqal_generate_bnodeid_handler takes a world object (was
	rasqal_generate_bnodeid_handler2)

	(rasqal_world_set_generate_bnodeid_handler):
	takes a rasqal_generate_bnodeid_handler arg (was
	rasqal_generate_bnodeid_handler2)

	Removed deprecated: rasqal_query_set_fatal_error_handler,
	rasqal_query_set_error_handler, rasqal_query_set_warning_handler,
	rasqal_query_set_default_generate_bnodeid_parameters,
	rasqal_query_set_generate_bnodeid_handler,
	rasqal_query_results_formats_enumerate,
	rasqal_new_query_results_formatter_by_mime_type,
	rasqal_query_results_formatter_get_mime_type,
	rasqal_new_data_graph, rasqal_new_coalesce_expression,
	rasqal_new_variable_typed,
	rasqal_new_variable.

	(rasqal_query_add_data_graph): Takes a data_graph arg instead of
	uri, name and flags (renamed from rasqal_query_add_data_graph2)

	(rasqal_query_results_write, rasqal_query_results_read): Take a
	name, mime_type, format_uri, base_uri args instead of format_uri,
	base_uri. (Renamed from rasqal_query_results_write2 and
	rasqal_query_results_read2 respectively).

	(rasqal_query_results_formats_check): Takes name, format URI,
	mime_type flags instead of name, uri and type. (Renamed from
	rasqal_query_results_formats_check2)

	(rasqal_new_query_results_formatter): Takes name, format type,
	format URI args instead of just name, format URI (renamed from
	rasqal_new_query_results_formatter2)

	(rasqal_new_query_results_formatter_for_content): Replaces
	rasqal_new_query_results_formatter_by_mime_type and takes optional
	buffer with length and identifer.

	(rasqal_new_function_expression): Added params and flags args to
	handle aggregate expressions. (Renamed from
	rasqal_new_function_expression2)

	roqet: delete deprecated -w arg. Use -d structure instead.

	* src/rasqal.h.in, src/rasqal_data_graph.c, src/rasqal_expr.c,
	src/rasqal_query_results.c, src/rasqal_result_formats.c,
	src/rasqal_variable.c: Add if !defined(RASQAL_DISABLE_DEPRECATED)
	around remaining deprecated functions

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

	* src/rasqal.h.in, src/rasqal_expr.c, src/rasqal_internal.h,
	src/rasqal_query.c: Added RASQAL_DISABLE_DEPRECATED macros around
	things that are going away

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

	* INSTALL.html, configure.ac, rasqal.pc.in, src/rasqal.h.in,
	src/rasqal_algebra.c, src/rasqal_dataset.c, src/rasqal_engine.c,
	src/rasqal_engine_sort.c, src/rasqal_expr.c,
	src/rasqal_format_rdf.c, src/rasqal_format_sparql_xml.c,
	src/rasqal_format_table.c, src/rasqal_general.c,
	src/rasqal_graph_pattern.c, src/rasqal_internal.h,
	src/rasqal_literal.c, src/rasqal_map.c, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_query_transform.c,
	src/rasqal_query_write.c, src/rasqal_raptor.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_project.c,
	src/rasqal_rowsource_rowsequence.c, src/rasqal_rowsource_sort.c,
	src/rasqal_service.c, src/rasqal_variable.c, src/rdql_lexer.l,
	src/rdql_parser.y, src/sparql_lexer.l, src/sparql_parser.y,
	utils/Makefile.am, utils/check_query.c, utils/roqet.c: Kill
	support for Raptor V1

2011-01-04  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr_strings.c:
	(rasqal_unicode_utf8_substr): Fixed integer conversion resulting
	in change of sign

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

	* src/rasqal_expr_strings.c:
	(rasqal_unicode_utf8_substr): End substr after length unichars

	* RELEASE.html, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c, src/rasqal_internal.h: Execute SUBSTR()
	2 and 3-arg versions

	(rasqal_unicode_utf8_substr): Added to do unicode UTF-8 substr
	using 0-offset index.

	(rasqal_expression_evaluate_substr): Added to implement SPARQL 1.1
	draft SUBSTR() using above.  Adjust XSD string 1-offset indexes.

	(rasqal_expression_evaluate): Call above for RASQAL_EXPR_SUBSTR

	* RELEASE.html, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c, src/rasqal_internal.h: Execute
	ENCODE_FOR_URI()

	(rasqal_expression_evaluate_encode_for_uri): Added to implement
	SPARQL 1.1 draft ENCODE_FOR_URI()

	(rasqal_expression_evaluate): Call above for
	RASQAL_EXPR_ENCODE_FOR_URI.

	* INSTALL.html, LICENSE.html, NEWS.html, README.html,
	RELEASE.html, TODO.html, docs/rasqal-docs.xml: #2011

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

	* utils/check_query.c: Raptor V1 support by importing V2 stuff.
	Sigh.

	* src/rasqal.h.in, src/rasqal_query_results.c:
	(rasqal_query_results_get_row_by_offset): Added to access stored
	query result rows

	* src/rasqal_query_results.c:
	(rasqal_query_check_limit_offset): negative offsets are errors

	* src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query_results.c:
	(rasqal_query_check_limit_offset): Renamed from
	rasqal_query_results_check_limit_offset Renamed since this no
	longer uses (reads/writes) any query result state Updated callers.

	* src/rasqal_query_results.c:
	(rasqal_query_results_check_limit_offset): Just check, do not set
	finished flag

	* src/rasqal_engine.c, src/rasqal_query_results.c: Adjust callers
	of rasqal_query_results_check_limit_offset() to set finished flag
	explicitly

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

	* src/rasqal_format_rdf.c: Eliminated initialized data - added
	const to ptr that does not need to be modified

	* src/rasqal_expr_strings.c, src/rasqal_query_results.c:
	(rasqal_expression_evaluate_concat,rasqal_query_results_rewind):
	Init variables before using them

	* src/rasqal_dataset.c, src/rasqal_query_results.c:
	(rasqal_dataset_init_match_internal,rasqal_query_results_get_type):
	Fixed int-enum warnings

	* src/rasqal_expr.c: fixed non-ascii comment

	* src/rasqal_expr_strings.c:
	(rasqal_expression_evaluate_set_case): Fixed compiler warnings

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

	* utils/check_query.c:
	(compare_query_results_compare): renamed to match code style

	* src/rasqal.h.in, src/rasqal_query_results.c: Added rewindable
	query results

	(rasqal_query_results_rewind): Added.

	(rasqal_query_results_execute_and_store_results): Calls above to
	reset the state after execution of all rows.  Adjust return to be
	failure so that empty result sets are not an error.

	(rasqal_query_results_get_row_from_saved): Return a copy of a row
	from a sequence rather then use the raptor_sequence_delete_at to
	allow rewinding to work.

	* src/rasqal.h.in, src/rasqal_internal.h, src/rasqal_query.c:
	(rasqal_query_set_store_results): Moved to public API.  Resets to
	unset after a prepare

	* tests/sparql/check-sparql:
	protect test for undef var

	* src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c: Alter rasqal_query_execute_with_engine
	to allow storing query results

	(rasqal_query_execute_with_engine): Construct a query result and
	then call rasqal_query_results_execute_with_engine() to execute
	it, passing in any query store_results flag directly.

	(rasqal_query_results_execute_with_engine): Alter signature to
	become a method query_results class, adding a store_results flag
	argument and just do executing not construction and executing -
	misnamed by code style.  Result is now a success int value.

	* utils/check_query.c:
	Add query results comparison local class

	(check_query_log_handler, check_query_error_handler): Tidy to
	print nicer messages if there is no locator

	(new_compare_query_results, free_compare_query_results,
	compare_query_results_set_log_handler,
	compare_compare_query_results): Added skeleton of a query results
	comparison class.

	* utils/check_query.c:
	(check_query_read_results): Added for code tidy.

	* utils/check_query.c: Allow -F/--format to set parser or query
	results format name.

	* utils/check_query.c: Print out expected and actual bindings
	result

	* utils/check_query.c: Init ds to NULL

	* src/rasqal_internal.h: Add V1 raptor_new_iostream_from_filename
	macro

	* utils/check_query.c: Read expected result

	* src/rasqal.h.in: raptor_uri

	* src/rasqal_format_rdf.c, src/rasqal_format_sparql_xml.c: Add
	query results recongising for 'rdf', 'turtle' and 'xml'
	formatters.

	(rasqal_query_results_rdfxml_recognise_syntax,
	rasqal_query_results_turtle_recognise_syntax,
	rasqal_query_results_xml_recognise_syntax): Added. All recognising
	just a few suffixes.

	* src/rasqal_internal.h: recognise not recognize

	* src/rasqal.h.in, src/rasqal_internal.h,
	src/rasqal_result_formats.c: Add query results format guessing.

	(rasqal_world_guess_query_results_format_name): Added to guess
	format based on format URI, mime type, some sample content or an
	identifier.

	(rasqal_new_query_results_formatter_for_content): Added to use
	above to construct a formatter from content.

	Typedef rasqal_query_results_recognize_syntax_func added
	rasqal_query_results_format_factory gains recognize_syntax
	optional factory method.

	* utils/roqet.c:
	(roqet_init_query): Remove unused results variable

	* utils/check_query.c: Use iostream and dataset to read graph
	results.

	* utils/check_query.c:
	(check_query_init_query): Added to pull init query code out of
	main

	* utils/.gitignore, utils/Makefile.am, utils/check_query.c: Add
	start of check_query utility

	* src/rasqal_query_results.c: Use rasqal_query_get_result_type in
	query engine execution

	(rasqal_query_results_execute_with_engine): Call
	rasqal_query_get_result_type() to get expected type and use
	RASQAL_QUERY_RESULTS_UNKNOWN for error case.

	* src/rasqal.h.in, src/rasqal_query.c:
	(rasqal_query_get_result_type): Added to determine expected result
	type from query structure Based on logic from
	rasqal_query_results_execute_with_engine()

	* src/rasqal.h.in: rasqal_query_results_type gains
	RASQAL_QUERY_RESULTS_UNKNOWN

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

2011-01-01  Dave Beckett <dave@dajobe.org>

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

	* tests/sparql/check-sparql: Handle file: URIs properly for
	reading rdf results

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): Document l->string ownership for
	decimal.

	* src/rasqal_decimal.c:
	(rasqal_xsd_decimal_set_string): Strip leading '+' from decimal
	string for MPFR and GMP

	* src/rasqal_expr_evaluate.c:
	(rasqal_expression_evaluate_datatype): Free literal after getting
	a reference to dt_uri

	* src/rasqal_expr_evaluate.c:
	(rasqal_expression_evaluate): Fix RASQAL_EXPR_DATATYPE return
	value.

	* src/rasqal_format_sparql_xml.c, src/rasqal_general.c,
	src/rasqal_query.c, src/rasqal_redland.c: Replace strcpy with
	memcpy since strcpy() special features are not needed

	* src/rasqal_expr_evaluate.c, src/rasqal_expr_strings.c,
	src/rasqal_format_rdf.c, src/rasqal_literal.c: Replace
	rasqal_literal_as_string + strlen() on result with
	rasqal_literal_as_counted_string() call

	* src/rasqal_internal.h, src/rasqal_literal.c: Ensure true/false
	literal strings have lengths set consistently

	* src/rasqal.h.in, src/rasqal_literal.c:
	(rasqal_literal_as_counted_string): Added to get the literal
	string with length.

	* src/rasqal_expr_datetimes.c: autodocs

	* src/rasqal_expr_datetimes.c:
	(rasqal_expression_evaluate_datetime_timezone): No need to use len

	* src/rasqal_datetime.c:
	(rasqal_xsd_datetime_get_timezone_as_counted_string): Remove
	sprintf for small integers.

	* src/rasqal_expr_datetimes.c, src/rasqal_expr_evaluate.c,
	src/rasqal_internal.h:
	(rasqal_expression_evaluate_datetime_timezone): Added to execute
	TIMEZONE()

	* src/rasqal.h.in, src/rasqal_datetime.c:
	(rasqal_xsd_datetime_get_timezone_as_counted_string): Added to
	turn a timezone into a duration string
