Header And Logo

PostgreSQL
| The world's most advanced open source database.

ISSN.h

Go to the documentation of this file.
00001 /*
00002  * ISSN.h
00003  *    PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
00004  *
00005  * Information recompiled by Kronuz on November 12, 2004
00006  * http://www.issn.org/
00007  *
00008  * IDENTIFICATION
00009  *    contrib/isn/ISSN.h
00010  *
00011  * 1144-875X <=> 1144875(X) <=> 1144875 <=> (977)1144875 <=> 9771144875(00) <=> 977114487500(7) <=> 977-1144-875-00-7
00012  *
00013  *
00014  * ISSN         1   1   4    4    8    7    5
00015  * Weight       8   7   6    5    4    3    2
00016  * Product      8 + 7 + 24 + 20 + 32 + 21 + 10 = 122
00017  *              122 / 11 = 11 remainder 1
00018  * Check digit  11 - 1 = 10 = X
00019  * => 1144-875X
00020  *
00021  * ISSN         9   7    7   1   1   4    4   8    7   5    0   0
00022  * Weight       1   3    1   3   1   3    1   3    1   3    1   3
00023  * Product      9 + 21 + 7 + 3 + 1 + 12 + 4 + 24 + 7 + 15 + 0 + 0 = 103
00024  *              103 / 10 = 10 remainder 3
00025  * Check digit  10 - 3 = 7
00026  * => 977-1144875-00-7 ??  <- suplemental number (number of the week, month, etc.)
00027  *                ^^ 00 for non-daily publications (01=Monday, 02=Tuesday, ...)
00028  *
00029  * The hyphenation is always in after the four digits of the ISSN code.
00030  *
00031  */
00032 
00033 /* where the digit set begins, and how many of them are in the table */
00034 const unsigned ISSN_index[10][2] = {
00035     {0, 1},
00036     {0, 1},
00037     {0, 1},
00038     {0, 1},
00039     {0, 1},
00040     {0, 1},
00041     {0, 1},
00042     {0, 1},
00043     {0, 1},
00044     {0, 1},
00045 };
00046 const char *ISSN_range[][2] = {
00047     {"0000-000", "9999-999"},
00048     {NULL, NULL}
00049 };