Fix output of ISBN-13 numbers beginning with 979.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: d7d4bd2c3b89bb06dbdd900221862ea905b67aeb
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2015-08-02T19:12:41Z
Releases: 9.4.5
Fix output of ISBN-13 numbers beginning with 979.

An EAN beginning with 979 (but not 9790 - those are ISMN's) are accepted
as ISBN numbers, but they cannot be represented in the old, 10-digit ISBN
format. They must be output in the new 13-digit ISBN-13 format. We printed
out an incorrect value for those.

Also add a regression test, to test this and some other basic functionality
of the module.

Patch by Fabien Coelho. This fixes bug #13442, reported by B.Z. Backpatch
to 9.1, where we started to recognize ISBN-13 numbers.

Files

PathChange+/−
contrib/isn/expected/isn.out added +222 −0
contrib/isn/isn.c modified +17 −10
contrib/isn/Makefile modified +2 −0
contrib/isn/sql/isn.sql added +104 −0