/*
 * iso4217_currency_codes.c
 *
 *  Created on: 09.08.2017.
 *      Author: d-logic
 */

#include "iso4217.h"

iso4217_currency_code_t iso4217_currency_codes[] = {
	{ 8,   "ALL", "Albania Lek" },
	{ 12,  "DZD", "Algeria Dinar" },
	{ 32,  "ARS", "Argentina Peso" },
	{ 36,  "AUD", "Australia Dollar" },
	{ 44,  "BSD", "Bahamas Dollar" },
	{ 48,  "BHD", "Bahrain Dinar" },
	{ 50,  "BDT", "Bangladesh Taka" },
	{ 51,  "AMD", "Armenia Dram" },
	{ 52,  "BBD", "Barbados Dollar" },
	{ 60,  "BMD", "Bermuda Dollar" },
	{ 64,  "BTN", "Bhutan Ngultrum" },
	{ 68,  "BOB", "Bolivia Bolíviano" },
	{ 72,  "BWP", "Botswana Pula" },
	{ 84,  "BZD", "Belize Dollar" },
	{ 90,  "SBD", "Solomon Islands Dollar" },
	{ 96,  "BND", "Brunei Darussalam Dollar" },
	{ 104, "MMK", "Myanmar (Burma) Kyat" },
	{ 108, "BIF", "Burundi Franc" },
	{ 116, "KHR", "Cambodia Riel" },
	{ 124, "CAD", "Canada Dollar" },
	{ 132, "CVE", "Cape Verde Escudo" },
	{ 136, "KYD", "Cayman Islands Dollar" },
	{ 144, "LKR", "Sri Lanka Rupee" },
	{ 152, "CLP", "Chile Peso" },
	{ 156, "CNY", "China Yuan Renminbi" },
	{ 170, "COP", "Colombia Peso" },
	{ 174, "KMF", "Comorian Franc" },
	{ 188, "CRC", "Costa Rica Colon" },
	{ 191, "HRK", "Croatia Kuna" },
	{ 192, "CUP", "Cuba Peso" },
	{ 203, "CZK", "Czech Republic Koruna" },
	{ 208, "DKK", "Denmark Krone" },
	{ 214, "DOP", "Dominican Republic Peso" },
	{ 222, "SVC", "El Salvador Colon" },
	{ 230, "ETB", "Ethiopia Birr" },
	{ 232, "ERN", "Eritrea Nakfa" },
	{ 238, "FKP", "Falkland Islands (Malvinas) Pound" },
	{ 242, "FJD", "Fiji Dollar" },
	{ 262, "DJF", "Djibouti Franc" },
	{ 270, "GMD", "Gambia Dalasi" },
	{ 292, "GIP", "Gibraltar Pound" },
	{ 320, "GTQ", "Guatemala Quetzal" },
	{ 324, "GNF", "Guinea Franc" },
	{ 328, "GYD", "Guyana Dollar" },
	{ 332, "HTG", "Haiti Gourde" },
	{ 340, "HNL", "Honduras Lempira" },
	{ 344, "HKD", "Hong Kong Dollar" },
	{ 348, "HUF", "Hungary Forint" },
	{ 352, "ISK", "Iceland Krona" },
	{ 356, "INR", "India Rupee" },
	{ 360, "IDR", "Indonesia Rupiah" },
	{ 364, "IRR", "Iran Rial" },
	{ 368, "IQD", "Iraq Dinar" },
	{ 376, "ILS", "Israel Shekel" },
	{ 388, "JMD", "Jamaica Dollar" },
	{ 392, "JPY", "Japan Yen" },
	{ 398, "KZT", "Kazakhstan Tenge" },
	{ 400, "JOD", "Jordan Dinar" },
	{ 404, "KES", "Kenya Shilling" },
	{ 408, "KPW", "Korea (North) Won" },
	{ 410, "KRW", "Korea (South) Won" },
	{ 414, "KWD", "Kuwait Dinar" },
	{ 417, "KGS", "Kyrgyzstan Som" },
	{ 418, "LAK", "Laos Kip" },
	{ 422, "LBP", "Lebanon Pound" },
	{ 426, "LSL", "Lesotho Loti" },
	{ 430, "LRD", "Liberia Dollar" },
	{ 434, "LYD", "Libya Dinar" },
	{ 446, "MOP", "Macau Pataca" },
	{ 454, "MWK", "Malawi Kwacha" },
	{ 458, "MYR", "Malaysia Ringgit" },
	{ 462, "MVR", "Maldives (Maldive Islands) Rufiyaa" },
	{ 478, "MRO", "Mauritania Ouguiya" },
	{ 480, "MUR", "Mauritius Rupee" },
	{ 484, "MXN", "Mexico Peso" },
	{ 496, "MNT", "Mongolia Tughrik" },
	{ 498, "MDL", "Moldova Leu" },
	{ 504, "MAD", "Morocco Dirham" },
	{ 512, "OMR", "Oman Rial" },
	{ 516, "NAD", "Namibia Dollar" },
	{ 524, "NPR", "Nepal Rupee" },
	{ 532, "ANG", "Netherlands Antilles Guilder" },
	{ 533, "AWG", "Aruba Guilder" },
	{ 548, "VUV", "Vanuatu Vatu" },
	{ 554, "NZD", "New Zealand Dollar" },
	{ 558, "NIO", "Nicaragua Cordoba" },
	{ 566, "NGN", "Nigeria Naira" },
	{ 578, "NOK", "Norway Krone" },
	{ 586, "PKR", "Pakistan Rupee" },
	{ 590, "PAB", "Panama Balboa" },
	{ 598, "PGK", "Papua New Guinea Kina" },
	{ 600, "PYG", "Paraguay Guarani" },
	{ 604, "PEN", "Peru Sol" },
	{ 608, "PHP", "Philippines Peso" },
	{ 634, "QAR", "Qatar Riyal" },
	{ 643, "RUB", "Russia Ruble" },
	{ 646, "RWF", "Rwanda Franc" },
	{ 654, "SHP", "Saint Helena Pound" },
	{ 678, "STD", "Sao Tome and Principe dobra" },
	{ 682, "SAR", "Saudi Arabia Riyal" },
	{ 690, "SCR", "Seychelles Rupee" },
	{ 694, "SLL", "Sierra Leone Leone" },
	{ 702, "SGD", "Singapore Dollar" },
	{ 704, "VND", "Viet Nam Dong" },
	{ 706, "SOS", "Somalia Shilling" },
	{ 710, "ZAR", "South Africa Rand" },
	{ 728, "SSP", "South Sudanese pound" },
	{ 748, "SZL", "Swaziland Lilangeni" },
	{ 752, "SEK", "Sweden Krona" },
	{ 756, "CHF", "Switzerland Franc" },
	{ 760, "SYP", "Syria Pound" },
	{ 764, "THB", "Thailand Baht" },
	{ 776, "TOP", "Tonga Pa‘anga" },
	{ 780, "TTD", "Trinidad and Tobago Dollar" },
	{ 784, "AED", "United Arab Emirates Dirham" },
	{ 788, "TND", "Tunisia Dinar" },
	{ 800, "UGX", "Uganda Shilling" },
	{ 807, "MKD", "Macedonia Denar" },
	{ 818, "EGP", "Egypt Pound" },
	{ 826, "GBP", "United Kingdom Pound" },
	{ 834, "TZS", "Tanzania Shilling" },
	{ 840, "USD", "United States Dollar" },
	{ 858, "UYU", "Uruguay Peso" },
	{ 860, "UZS", "Uzbekistan Som" },
	{ 882, "WST", "Samoa Tala" },
	{ 886, "YER", "Yemen Rial" },
	{ 901, "TWD", "Taiwan New Dollar" },
	{ 931, "CUC", "Cuba Convertible Peso" },
	{ 932, "ZWL", "Zimbabwe Dollar" },
	{ 933, "BYN", "Belarus Ruble" },
	{ 934, "TMT", "Turkmenistan Manat" },
	{ 936, "GHS", "Ghana Cedi" },
	{ 937, "VEF", "Venezuela Bolívar" },
	{ 938, "SDG", "Sudan Pound" },
	{ 941, "RSD", "Serbia Dinar" },
	{ 943, "MZN", "Mozambique Metical" },
	{ 944, "AZN", "Azerbaijan Manat" },
	{ 946, "RON", "Romania Leu" },
	{ 949, "TRY", "Turkey Lira" },
	{ 950, "XAF", "CFA franc BEAC" },
	{ 951, "XCD", "East Caribbean Dollar" },
	{ 952, "XOF", "CFA franc BCEAO" },
	{ 953, "XPF", "CFP franc (franc Pacifique)" },
	{ 960, "XDR", "IMF Special Drawing Rights" },
	{ 967, "ZMW", "Zambia Kwacha" },
	{ 968, "SRD", "Suriname Dollar" },
	{ 969, "MGA", "Madagascar Ariary" },
	{ 971, "AFN", "Afghanistan Afghani" },
	{ 972, "TJS", "Tajikistan Somoni" },
	{ 973, "AOA", "Angola Kwanza" },
	{ 975, "BGN", "Bulgaria Lev" },
	{ 976, "CDF", "Congo/Kinshasa Franc" },
	{ 977, "BAM", "Bosnia and Herzegovina Convertible Marka" },
	{ 978, "EUR", "Euro" },
	{ 980, "UAH", "Ukraine Hryvnia" },
	{ 981, "GEL", "Georgia Lari" },
	{ 985, "PLN", "Poland Zloty" },
	{ 986, "BRL", "Brazil Real" },
	{ 0, "---", "Unknown currency" }
};
//------------------------------------------------------------------------------
int findCurrencyIndexByNumCode(uint16_t num_code)
{
	int i = 0;

	do {
		if (iso4217_currency_codes[i].num_code == num_code)
			break;
		i++;
	} while (iso4217_currency_codes[i].num_code != 0);

	return i;
}
//------------------------------------------------------------------------------
