FIXED: library(prolog_xref): properly handle op/3 terms in the export list of loaded modules. Notably fixes colouring for files loading clpfd which exports its operators before its predicates (which is totally fine).
FIXED: clause_info/4: fixed if decompilation qualifies the head.
FIXED: Avoid crash in findall/3 if we perform a shift/reset (e.g., tabling) inside the generator.
PORT: Support compilation without gmp. Matthias Gondan.
ENHANCED: Do not setup command line editing of the environment variable TERM is set to dumb. Fixed ediprolog interaction.
TEST: Remove test for deleted rb_clone/4.
MODIFIED: Support multiple occurrences of `-g goal` command line options and exit 1 if one fails or 2 if one throws an exception. Suggested by Markus Triska.
MODIFIED: library(rbtrees): deleted rb_visit/3, rb_keys/3 and rb_clone/4. The difference list versions use unconventional argument order and are probably not very useful in the context of trees. Also made variable names in documentation consistent and more inline with the rest of the documentation. Should have been two commits, but that is now too late

ADDED: rb_fold/4
MODIFIED: removed rb_lookupall/3 and fixed rb_in/3 These changes are aimed at clarifying the status of variables in keys and duplicate keys. After discussions on the mailing list, we established that is is ok for keys to contain variables, in which case, key matching is based on (==)/2 equivalence of terms (and not on unifiability, subsumption or structural equality).
It also seems to be the case that a tree with more than one entry for a given key is an invalid tree (and is rejected by is_rbtree/1).
Taking these together, we can conclude that the old rb_lookupall/3 was redundant, since there should only ever be one value for a given key whether or not that key contains variables. Instead, rb_lookup/3 should be used. I've taken the possibly drastic step of removing rb_lookupall/3 completely, but another option would be to leave it in but deprecated and with dire warnings.
Also, the old rb_in/3 was diverting to lookup/3 for nonvariable keys. This was giving incorrect behaviour for partially instantiated keys, since the tree may contain several keys that unify with the given term. My initial fix was to replace the nonvar(Key) with a +ground(Test). However, further consideration has lead me to remove that clause of rb_in/3 entirely. The reasoning behind this is:
if you want fast lookup, use rb_lookup/3;
making rb_in/3 check the key argument with ground/1 forces it to examine the whole term and removing that clause makes rb_in/3 cleaner;
the rest of the rbtrees interface is relies on (==)/2 equality between keys, where as the nondeterministic mode of rb_in/3 relies on unification of keys. This is fine, but mixing both meanings in one predicate depending on the instantiation state of the key muddies the semantics, relies on extra-logical which lead (as we have seen) to a bug, and generally feels not quite right.
In further support of this change, this is exactly what assoc:gen_assoc/3 does, leaving get_assoc/3 the job of doing O(log N) lookups. Also, assoc:ord_list_to_assoc also prevents the creation of duplicate keys.
INSTALL: Avoid failing if the documentation is missing.
PORT: MinGW issue wrt. ETIMEDOUT. Matthias Gondan.
FIXED: pi_to_head/2: protect against an infinite loop.
FIXED: Make '$find_predicate'/2 fail if the unknown flag is warning. Douglas Miles.
ENHANCED: (#=)/2 now automatically uses powm/3 in many relevant cases. It is the job of the Prolog environment, not of application programmers, to use fast low-level predicates in cases of practical relevance. Ideally, programmers only need to use (#=)/2 to express equality over integers, without having to care about ordering, instantiation, special cases etc.
For example, consider commit b380cad24cbe5102a549bfb8f7406e34a2b99e1a in the SSL package, where Pow #= Signature^Exponent mod Modulus is used to verify a certificate's signature with the CLP(FD) constraint (#=)/2.
If the arguments are sufficiently instantiated, this constraint is now automatically compiled to Pow is powm(Signature,Exponent,Modulus), making the query run ca. 30 000 times faster. This also works if we write the constraint as Signature^Exponent mod Modulus #= Pow, which may be more natural to Prolog programmers with a strong mathematical background.
Integer constraints of the form A^B mod M also occur in DH key exchange, which is used to ensure forward secrecy in (HTTPS) web applications.
DOC: powm/3: Instead of (**)/2, use (^)/2 for integer exponentiation.
PORT: Avoid trying to compile dlopen or emulations thereof if EMULATE_DLOPEN is active. Matthias Gondan.
FIXED: Issue#197: too long options in a saved state were ignored.
FIXED: Do not overwrite stream error if a user handler already set it.
FIXED: Issue#195: format_time/3 handling of %f. Eyal Drechter.
DOC: License text
DOC: Fixed two BibTeX errors
DOC: Fixed non-terminated ifnum
PPA: Avoid duplicating version tag
DOC: LaTeX formatting
BUILD: Fix windows clean version check
FIXED: meta-calling call/N. Samer Abdallah.
Package archive:
DOC: Document formats that are supported by archive_create/3.
Package clib:
FIXED: directory_file_path/3: mode (+,-,+) if the directory = '.'
Package http:
FIXED: Make http:sni_options/2 work again, by importing library(ssl). It is unclear to me how this worked at all previously (it did!), and why it broke. It is necessary to import library(ssl) due to the use of ssl_context/3 when using http:sni_options/2.
Package pengines:
FIXED: Avoid illegal multibyte warning for Torbjörn
Package semweb:
ENHANCED: rdf_save_turtle/3: write file name when writing to a stream
ENHANCED: turtle_write_pn_local/2 to minimise use of
FIXED: Rewrite of local name handling broke prefix suggestion
FIXED: > and inside an IRI must be escaped using uXXXX.
MODIFIED: Exploit Turtle extended local name conventions to write better Turtle.
MODIFIED: turtle_pn_local/1 to deal with the current Turtle syntax restrictions for local names. This patch also adds turtle_write_pn_local/2 and iri_turtle_prefix/2
ADDED: rdf_graph_prefixes/3: option get_prefix(:Pred) to better support Turtle.
ADDED: rdf_global_id/2 to safe predicates.
FIXED: Typo in declaration (harmless)
FIXED: Possible assertion error on a negative amount of garbage triples. Wouter Beek.
Package ssl:
ADDED: hmac/1 option for all hash predicates of library(crypto). A hash-based message authentication code (HMAC) can be used to simultaneously verify the integrity and authenticity of data.
The new hmac(+Key) option is now available for all hash predicates of library(crypto), enabling HMAC computation with a given key.
This option is a significant generalization of hmac_sha/4 from library(sha): Starting with OpenSSL 1.1.0, hash-based MACs are now available for all provided digest algorithms with library(crypto).
library(xmldsig) is a use case that needs this functionality.
Package xpce:
FIXED: Put XPCE locking around `as file' API that allows Prolog to read/write XPCE editors, etc. This fixes at least one reason why the system often crashes if a spy-point set using tspy/1 is trapped on a thread.
FIXED: Detection of indentation and tab/spaces for the current file.
Package zlib:
ENHANCED: gzopen/4: set file_name property of stream
ENHANCED: Properly propagate zlib read errors to the stream.