1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-08 06:02:22 +03:00

pgindent run for 8.2.

This commit is contained in:
Bruce Momjian
2006-10-04 00:30:14 +00:00
parent 451e419e98
commit f99a569a2e
522 changed files with 21297 additions and 17170 deletions

View File

@@ -1,4 +1,4 @@
/*
/*
* EAN13.h
* PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
*
@@ -6,142 +6,143 @@
* http://www.gs1.org/productssolutions/idkeys/support/prefix_list.html
*
* IDENTIFICATION
* $PostgreSQL: pgsql/contrib/isn/EAN13.h,v 1.1 2006/09/09 04:07:52 tgl Exp $
* $PostgreSQL: pgsql/contrib/isn/EAN13.h,v 1.2 2006/10/04 00:29:45 momjian Exp $
*
*/
/* where the digit set begins, and how many of them are in the table */
const unsigned EAN13_index[10][2] = {
{0, 6},
{6, 1},
{7, 1},
{8, 5},
{13, 20},
{33, 15},
{48, 19},
{67, 23},
{90, 17},
{107, 12},
{0, 6},
{6, 1},
{7, 1},
{8, 5},
{13, 20},
{33, 15},
{48, 19},
{67, 23},
{90, 17},
{107, 12},
};
const char *EAN13_range[][2] = {
{"000", "019"}, /* GS1 US */
{"020", "029"}, /* Restricted distribution (MO defined) */
{"030", "039"}, /* GS1 US */
{"040", "049"}, /* Restricted distribution (MO defined) */
{"050", "059"}, /* Coupons */
{"060", "099"}, /* GS1 US */
{"100", "139"}, /* GS1 US */
{"200", "299"}, /* Restricted distribution (MO defined) */
{"300", "379"}, /* GS1 France */
{"380", "380"}, /* GS1 Bulgaria */
{"383", "383"}, /* GS1 Slovenija */
{"385", "385"}, /* GS1 Croatia */
{"387", "387"}, /* GS1 BIH (Bosnia-Herzegovina) */
{"400", "440"}, /* GS1 Germany */
{"450", "459"}, /* GS1 Japan */
{"460", "469"}, /* GS1 Russia */
{"470", "470"}, /* GS1 Kyrgyzstan */
{"471", "471"}, /* GS1 Taiwan */
{"474", "474"}, /* GS1 Estonia */
{"475", "475"}, /* GS1 Latvia */
{"476", "476"}, /* GS1 Azerbaijan */
{"477", "477"}, /* GS1 Lithuania */
{"478", "478"}, /* GS1 Uzbekistan */
{"479", "479"}, /* GS1 Sri Lanka */
{"480", "480"}, /* GS1 Philippines */
{"481", "481"}, /* GS1 Belarus */
{"482", "482"}, /* GS1 Ukraine */
{"484", "484"}, /* GS1 Moldova */
{"485", "485"}, /* GS1 Armenia */
{"486", "486"}, /* GS1 Georgia */
{"487", "487"}, /* GS1 Kazakstan */
{"489", "489"}, /* GS1 Hong Kong */
{"490", "499"}, /* GS1 Japan */
{"500", "509"}, /* GS1 UK */
{"520", "520"}, /* GS1 Greece */
{"528", "528"}, /* GS1 Lebanon */
{"529", "529"}, /* GS1 Cyprus */
{"530", "530"}, /* GS1 Albania */
{"531", "531"}, /* GS1 MAC (FYR Macedonia) */
{"535", "535"}, /* GS1 Malta */
{"539", "539"}, /* GS1 Ireland */
{"540", "549"}, /* GS1 Belgium & Luxembourg */
{"560", "560"}, /* GS1 Portugal */
{"569", "569"}, /* GS1 Iceland */
{"570", "579"}, /* GS1 Denmark */
{"590", "590"}, /* GS1 Poland */
{"594", "594"}, /* GS1 Romania */
{"599", "599"}, /* GS1 Hungary */
{"600", "601"}, /* GS1 South Africa */
{"603", "603"}, /* GS1 Ghana */
{"608", "608"}, /* GS1 Bahrain */
{"609", "609"}, /* GS1 Mauritius */
{"611", "611"}, /* GS1 Morocco */
{"613", "613"}, /* GS1 Algeria */
{"616", "616"}, /* GS1 Kenya */
{"618", "618"}, /* GS1 Ivory Coast */
{"619", "619"}, /* GS1 Tunisia */
{"621", "621"}, /* GS1 Syria */
{"622", "622"}, /* GS1 Egypt */
{"624", "624"}, /* GS1 Libya */
{"625", "625"}, /* GS1 Jordan */
{"626", "626"}, /* GS1 Iran */
{"627", "627"}, /* GS1 Kuwait */
{"628", "628"}, /* GS1 Saudi Arabia */
{"629", "629"}, /* GS1 Emirates */
{"640", "649"}, /* GS1 Finland */
{"690", "695"}, /* GS1 China */
{"700", "709"}, /* GS1 Norway */
{"729", "729"}, /* GS1 Israel */
{"730", "739"}, /* GS1 Sweden */
{"740", "740"}, /* GS1 Guatemala */
{"741", "741"}, /* GS1 El Salvador */
{"742", "742"}, /* GS1 Honduras */
{"743", "743"}, /* GS1 Nicaragua */
{"744", "744"}, /* GS1 Costa Rica */
{"745", "745"}, /* GS1 Panama */
{"746", "746"}, /* GS1 Republica Dominicana */
{"750", "750"}, /* GS1 Mexico */
{"754", "755"}, /* GS1 Canada */
{"759", "759"}, /* GS1 Venezuela */
{"760", "769"}, /* GS1 Schweiz, Suisse, Svizzera */
{"770", "770"}, /* GS1 Colombia */
{"773", "773"}, /* GS1 Uruguay */
{"775", "775"}, /* GS1 Peru */
{"777", "777"}, /* GS1 Bolivia */
{"779", "779"}, /* GS1 Argentina */
{"780", "780"}, /* GS1 Chile */
{"784", "784"}, /* GS1 Paraguay */
{"786", "786"}, /* GS1 Ecuador */
{"789", "790"}, /* GS1 Brasil */
{"800", "839"}, /* GS1 Italy */
{"840", "849"}, /* GS1 Spain */
{"850", "850"}, /* GS1 Cuba */
{"858", "858"}, /* GS1 Slovakia */
{"859", "859"}, /* GS1 Czech */
{"860", "860"}, /* GS1 YU (Serbia & Montenegro) */
{"865", "865"}, /* GS1 Mongolia */
{"867", "867"}, /* GS1 North Korea */
{"869", "869"}, /* GS1 Turkey */
{"870", "879"}, /* GS1 Netherlands */
{"880", "880"}, /* GS1 South Korea */
{"884", "884"}, /* GS1 Cambodia */
{"885", "885"}, /* GS1 Thailand */
{"888", "888"}, /* GS1 Singapore */
{"890", "890"}, /* GS1 India */
{"893", "893"}, /* GS1 Vietnam */
{"899", "899"}, /* GS1 Indonesia */
{"900", "919"}, /* GS1 Austria */
{"930", "939"}, /* GS1 Australia */
{"940", "949"}, /* GS1 New Zealand */
{"950", "950"}, /* GS1 Head Office */
{"955", "955"}, /* GS1 Malaysia */
{"958", "958"}, /* GS1 Macau */
{"977", "977"}, /* Serial publications (ISSN) */
{"978", "978"}, /* Bookland (ISBN) */
{"979", "979"}, /* International Standard Music Number (ISMN) and ISBN contingent */
{"980", "980"}, /* Refund receipts */
{"981", "982"}, /* Common Currency Coupons */
{"990", "999"}, /* Coupons */
{"000", "019"}, /* GS1 US */
{"020", "029"}, /* Restricted distribution (MO defined) */
{"030", "039"}, /* GS1 US */
{"040", "049"}, /* Restricted distribution (MO defined) */
{"050", "059"}, /* Coupons */
{"060", "099"}, /* GS1 US */
{"100", "139"}, /* GS1 US */
{"200", "299"}, /* Restricted distribution (MO defined) */
{"300", "379"}, /* GS1 France */
{"380", "380"}, /* GS1 Bulgaria */
{"383", "383"}, /* GS1 Slovenija */
{"385", "385"}, /* GS1 Croatia */
{"387", "387"}, /* GS1 BIH (Bosnia-Herzegovina) */
{"400", "440"}, /* GS1 Germany */
{"450", "459"}, /* GS1 Japan */
{"460", "469"}, /* GS1 Russia */
{"470", "470"}, /* GS1 Kyrgyzstan */
{"471", "471"}, /* GS1 Taiwan */
{"474", "474"}, /* GS1 Estonia */
{"475", "475"}, /* GS1 Latvia */
{"476", "476"}, /* GS1 Azerbaijan */
{"477", "477"}, /* GS1 Lithuania */
{"478", "478"}, /* GS1 Uzbekistan */
{"479", "479"}, /* GS1 Sri Lanka */
{"480", "480"}, /* GS1 Philippines */
{"481", "481"}, /* GS1 Belarus */
{"482", "482"}, /* GS1 Ukraine */
{"484", "484"}, /* GS1 Moldova */
{"485", "485"}, /* GS1 Armenia */
{"486", "486"}, /* GS1 Georgia */
{"487", "487"}, /* GS1 Kazakstan */
{"489", "489"}, /* GS1 Hong Kong */
{"490", "499"}, /* GS1 Japan */
{"500", "509"}, /* GS1 UK */
{"520", "520"}, /* GS1 Greece */
{"528", "528"}, /* GS1 Lebanon */
{"529", "529"}, /* GS1 Cyprus */
{"530", "530"}, /* GS1 Albania */
{"531", "531"}, /* GS1 MAC (FYR Macedonia) */
{"535", "535"}, /* GS1 Malta */
{"539", "539"}, /* GS1 Ireland */
{"540", "549"}, /* GS1 Belgium & Luxembourg */
{"560", "560"}, /* GS1 Portugal */
{"569", "569"}, /* GS1 Iceland */
{"570", "579"}, /* GS1 Denmark */
{"590", "590"}, /* GS1 Poland */
{"594", "594"}, /* GS1 Romania */
{"599", "599"}, /* GS1 Hungary */
{"600", "601"}, /* GS1 South Africa */
{"603", "603"}, /* GS1 Ghana */
{"608", "608"}, /* GS1 Bahrain */
{"609", "609"}, /* GS1 Mauritius */
{"611", "611"}, /* GS1 Morocco */
{"613", "613"}, /* GS1 Algeria */
{"616", "616"}, /* GS1 Kenya */
{"618", "618"}, /* GS1 Ivory Coast */
{"619", "619"}, /* GS1 Tunisia */
{"621", "621"}, /* GS1 Syria */
{"622", "622"}, /* GS1 Egypt */
{"624", "624"}, /* GS1 Libya */
{"625", "625"}, /* GS1 Jordan */
{"626", "626"}, /* GS1 Iran */
{"627", "627"}, /* GS1 Kuwait */
{"628", "628"}, /* GS1 Saudi Arabia */
{"629", "629"}, /* GS1 Emirates */
{"640", "649"}, /* GS1 Finland */
{"690", "695"}, /* GS1 China */
{"700", "709"}, /* GS1 Norway */
{"729", "729"}, /* GS1 Israel */
{"730", "739"}, /* GS1 Sweden */
{"740", "740"}, /* GS1 Guatemala */
{"741", "741"}, /* GS1 El Salvador */
{"742", "742"}, /* GS1 Honduras */
{"743", "743"}, /* GS1 Nicaragua */
{"744", "744"}, /* GS1 Costa Rica */
{"745", "745"}, /* GS1 Panama */
{"746", "746"}, /* GS1 Republica Dominicana */
{"750", "750"}, /* GS1 Mexico */
{"754", "755"}, /* GS1 Canada */
{"759", "759"}, /* GS1 Venezuela */
{"760", "769"}, /* GS1 Schweiz, Suisse, Svizzera */
{"770", "770"}, /* GS1 Colombia */
{"773", "773"}, /* GS1 Uruguay */
{"775", "775"}, /* GS1 Peru */
{"777", "777"}, /* GS1 Bolivia */
{"779", "779"}, /* GS1 Argentina */
{"780", "780"}, /* GS1 Chile */
{"784", "784"}, /* GS1 Paraguay */
{"786", "786"}, /* GS1 Ecuador */
{"789", "790"}, /* GS1 Brasil */
{"800", "839"}, /* GS1 Italy */
{"840", "849"}, /* GS1 Spain */
{"850", "850"}, /* GS1 Cuba */
{"858", "858"}, /* GS1 Slovakia */
{"859", "859"}, /* GS1 Czech */
{"860", "860"}, /* GS1 YU (Serbia & Montenegro) */
{"865", "865"}, /* GS1 Mongolia */
{"867", "867"}, /* GS1 North Korea */
{"869", "869"}, /* GS1 Turkey */
{"870", "879"}, /* GS1 Netherlands */
{"880", "880"}, /* GS1 South Korea */
{"884", "884"}, /* GS1 Cambodia */
{"885", "885"}, /* GS1 Thailand */
{"888", "888"}, /* GS1 Singapore */
{"890", "890"}, /* GS1 India */
{"893", "893"}, /* GS1 Vietnam */
{"899", "899"}, /* GS1 Indonesia */
{"900", "919"}, /* GS1 Austria */
{"930", "939"}, /* GS1 Australia */
{"940", "949"}, /* GS1 New Zealand */
{"950", "950"}, /* GS1 Head Office */
{"955", "955"}, /* GS1 Malaysia */
{"958", "958"}, /* GS1 Macau */
{"977", "977"}, /* Serial publications (ISSN) */
{"978", "978"}, /* Bookland (ISBN) */
{"979", "979"}, /* International Standard Music Number (ISMN)
* and ISBN contingent */
{"980", "980"}, /* Refund receipts */
{"981", "982"}, /* Common Currency Coupons */
{"990", "999"}, /* Coupons */
{NULL, NULL}
};

View File

@@ -1,4 +1,4 @@
/*
/*
* ISBN.h
* PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
*
@@ -7,39 +7,39 @@
* http://www.isbn.org/
*
* IDENTIFICATION
* $PostgreSQL: pgsql/contrib/isn/ISBN.h,v 1.1 2006/09/09 04:07:52 tgl Exp $
* $PostgreSQL: pgsql/contrib/isn/ISBN.h,v 1.2 2006/10/04 00:29:45 momjian Exp $
*
* 0-393-04002-X => 039304002(X) <=> 039304002 <=> (978)039304002 <=> 978039304002(9) <=> 978-0-393-04002-9
*
*
* ISBN 0 3 9 3 0 4 0 0 2
* Weight 10 9 8 7 6 5 4 3 2
* Product 0 + 27 + 72 + 21 + 0 + 20 + 0 + 0 + 4 = 144
* 144 / 11 = 13 remainder 1
* Check digit 11 - 1 = 10 = X
* ISBN 0 3 9 3 0 4 0 0 2
* Weight 10 9 8 7 6 5 4 3 2
* Product 0 + 27 + 72 + 21 + 0 + 20 + 0 + 0 + 4 = 144
* 144 / 11 = 13 remainder 1
* Check digit 11 - 1 = 10 = X
* => 0-393-04002-X
*
* ISBN 9 7 8 0 3 9 3 0 4 0 0 2
* Weight 1 3 1 3 1 3 1 3 1 3 1 3
* Product 9 + 21 + 8 + 0 + 3 + 27 + 3 + 0 + 4 + 0 + 0 + 6 = 81
* 81 / 10 = 8 remainder 1
* Check digit 10 - 1 = 9
* ISBN 9 7 8 0 3 9 3 0 4 0 0 2
* Weight 1 3 1 3 1 3 1 3 1 3 1 3
* Product 9 + 21 + 8 + 0 + 3 + 27 + 3 + 0 + 4 + 0 + 0 + 6 = 81
* 81 / 10 = 8 remainder 1
* Check digit 10 - 1 = 9
* => 978-0-393-04002-9
*
*/
/* where the digit set begins, and how many of them are in the table */
const unsigned ISBN_index[10][2] = {
{0, 6},
{6, 6},
{12, 8},
{20, 10},
{30, 6},
{36, 12},
{48, 0},
{48, 5},
{53, 59},
{112, 573},
{0, 6},
{6, 6},
{12, 8},
{20, 10},
{30, 6},
{36, 12},
{48, 0},
{48, 5},
{53, 59},
{112, 573},
};
const char *ISBN_range[][2] = {

View File

@@ -1,4 +1,4 @@
/*
/*
* ISMN.h
* PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
*
@@ -6,23 +6,23 @@
* http://www.ismn-international.org
*
* IDENTIFICATION
* $PostgreSQL: pgsql/contrib/isn/ISMN.h,v 1.1 2006/09/09 04:07:52 tgl Exp $
* $PostgreSQL: pgsql/contrib/isn/ISMN.h,v 1.2 2006/10/04 00:29:45 momjian Exp $
*
* M-3452-4680-5 <=> (0)-3452-4680-5 <=> 0345246805 <=> 9790345246805 <=> 979-0-3452-4680-5
*
* (M counts as 3)
* ISMN M 3 4 5 2 4 6 8 0
* Weight 3 1 3 1 3 1 3 1 3
* Product 9 + 3 + 12 + 5 + 6 + 4 + 18 + 8 + 0 = 65
* 65 / 10 = 6 remainder 5
* Check digit 10 - 5 = 5
* (M counts as 3)
* ISMN M 3 4 5 2 4 6 8 0
* Weight 3 1 3 1 3 1 3 1 3
* Product 9 + 3 + 12 + 5 + 6 + 4 + 18 + 8 + 0 = 65
* 65 / 10 = 6 remainder 5
* Check digit 10 - 5 = 5
* => M-3452-4680-5
*
* ISMN 9 7 9 0 3 4 5 2 4 6 8 0
* Weight 1 3 1 3 1 3 1 3 1 3 1 3
* Product 9 + 21 + 9 + 0 + 3 + 12 + 5 + 6 + 4 + 18 + 8 + 0 = 95
* 95 / 10 = 9 remainder 5
* Check digit 10 - 5 = 5
* ISMN 9 7 9 0 3 4 5 2 4 6 8 0
* Weight 1 3 1 3 1 3 1 3 1 3 1 3
* Product 9 + 21 + 9 + 0 + 3 + 12 + 5 + 6 + 4 + 18 + 8 + 0 = 95
* 95 / 10 = 9 remainder 5
* Check digit 10 - 5 = 5
* => 979-0-3452-4680-5
*
* Since mod10(9*1 + 7*3 + 9*1 + 0*3) = mod10(M*3) = mod10(3*3) = 9; the check digit remains the same.
@@ -31,16 +31,16 @@
/* where the digit set begins, and how many of them are in the table */
const unsigned ISMN_index[10][2] = {
{0, 5},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{0, 5},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
{5, 0},
};
const char *ISMN_range[][2] = {
{"0-000", "0-099"},

View File

@@ -1,4 +1,4 @@
/*
/*
* ISSN.h
* PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
*
@@ -6,25 +6,25 @@
* http://www.issn.org/
*
* IDENTIFICATION
* $PostgreSQL: pgsql/contrib/isn/ISSN.h,v 1.1 2006/09/09 04:07:52 tgl Exp $
* $PostgreSQL: pgsql/contrib/isn/ISSN.h,v 1.2 2006/10/04 00:29:45 momjian Exp $
*
* 1144-875X <=> 1144875(X) <=> 1144875 <=> (977)1144875 <=> 9771144875(00) <=> 977114487500(7) <=> 977-1144-875-00-7
*
*
* ISSN 1 1 4 4 8 7 5
* Weight 8 7 6 5 4 3 2
* Product 8 + 7 + 24 + 20 + 32 + 21 + 10 = 122
* 122 / 11 = 11 remainder 1
* Check digit 11 - 1 = 10 = X
*
* ISSN 1 1 4 4 8 7 5
* Weight 8 7 6 5 4 3 2
* Product 8 + 7 + 24 + 20 + 32 + 21 + 10 = 122
* 122 / 11 = 11 remainder 1
* Check digit 11 - 1 = 10 = X
* => 1144-875X
*
* ISSN 9 7 7 1 1 4 4 8 7 5 0 0
* Weight 1 3 1 3 1 3 1 3 1 3 1 3
* Product 9 + 21 + 7 + 3 + 1 + 12 + 4 + 24 + 7 + 15 + 0 + 0 = 103
* 103 / 10 = 10 remainder 3
* Check digit 10 - 3 = 7
*
* ISSN 9 7 7 1 1 4 4 8 7 5 0 0
* Weight 1 3 1 3 1 3 1 3 1 3 1 3
* Product 9 + 21 + 7 + 3 + 1 + 12 + 4 + 24 + 7 + 15 + 0 + 0 = 103
* 103 / 10 = 10 remainder 3
* Check digit 10 - 3 = 7
* => 977-1144875-00-7 ?? <- suplemental number (number of the week, month, etc.)
* ^^ 00 for non-daily publications (01=Monday, 02=Tuesday, ...)
* ^^ 00 for non-daily publications (01=Monday, 02=Tuesday, ...)
*
* The hyphenation is always in after the four digits of the ISSN code.
*
@@ -32,16 +32,16 @@
/* where the digit set begins, and how many of them are in the table */
const unsigned ISSN_index[10][2] = {
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
{0, 1},
};
const char *ISSN_range[][2] = {
{"0000-000", "9999-999"},

View File

@@ -1,27 +1,27 @@
/*
/*
* ISSN.h
* PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
*
* No information available for UPC prefixes
*
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/contrib/isn/UPC.h,v 1.1 2006/09/09 04:07:52 tgl Exp $
* $PostgreSQL: pgsql/contrib/isn/UPC.h,v 1.2 2006/10/04 00:29:45 momjian Exp $
*
*/
/* where the digit set begins, and how many of them are in the table */
const unsigned UPC_index[10][2] = {
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
};
const char *UPC_range[][2] = {
{NULL, NULL}

File diff suppressed because it is too large Load Diff