diff options
author | Robert Haas <rhaas@postgresql.org> | 2010-10-19 22:24:33 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2010-10-19 22:48:19 -0400 |
commit | 6d1af7b2180719102a907bd3e35d218b43e76ad1 (patch) | |
tree | fd69b2105de08b961879d4ca91fac9842fea542d /contrib/isn/isn.c | |
parent | 691a67b922f2e8374356215228700958165e7d44 (diff) | |
download | postgresql-6d1af7b2180719102a907bd3e35d218b43e76ad1.tar.gz postgresql-6d1af7b2180719102a907bd3e35d218b43e76ad1.zip |
Updates to contrib/isn ISBN tables.
Jan Otto, reviewed by Peter Geoghegan
Diffstat (limited to 'contrib/isn/isn.c')
-rw-r--r-- | contrib/isn/isn.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c index 979358f9a6c..602a9472a34 100644 --- a/contrib/isn/isn.c +++ b/contrib/isn/isn.c @@ -573,7 +573,7 @@ ean2string(ean13 ean, bool errorOK, char *result, bool shortType) /* find out what type of hyphenation is needed: */ if (!strncmp("978-", result, search)) - { /* ISBN */ + { /* ISBN -13 978-range */ /* The string should be in this form: 978-??000000000-0" */ type = ISBN; TABLE = ISBN_range; @@ -593,6 +593,13 @@ ean2string(ean13 ean, bool errorOK, char *result, bool shortType) TABLE = ISMN_range; TABLE_index = ISMN_index; } + else if (!strncmp("979-", result, search)) + { /* ISBN-13 979-range */ + /* The string should be in this form: 979-??000000000-0" */ + type = ISBN; + TABLE = ISBN_range_new; + TABLE_index = ISBN_index_new; + } else if (*result == '0') { /* UPC */ /* The string should be in this form: 000-00000000000-0" */ |