// // List of countries. // // Because of stupid size constraints (64k heap size on a // device that has 2.5G of memory and supports an application // of size 10M is just insane) we have to do a baroque encoding // of the country names. // // Anyway, turns out we can conserve space by storing this data // in code so, rather than having a data array e.g.: // let countries = [ "abc", "de" ] // and using countries[i] instead we store the info in a routine e.g.: // function get_name(i) { // switch (i) { // case 0: return mk_ascii('a', 'b', 'c'); // case 1: return mk_ascii('d', 'e'); // } // } // and use get_name(i). // // Using the natural, string array left the app at 67K (over the // limit), using the funcion left the app at 64K (just fits). // // Again, because of storage constraints, we store the timezone // offset at the end of the country name rather than using a // structure or 2 separate arrays. // " Countries;-2", "Afghanistan;32", "Albania;14", "Algeria;14", "Andorra;14", "Angola;14", "Antigua;9", "Argentina;10", "Armenia;17", "Ausralia;23", "Austria;14", "Azerbaijan;17", "Bahamas;8", "Bahrain;16", "Bangladesh;19", "Barbados;9", "Belarus;16", "Belgium;14", "Belize;7", "Benin;14", "Bhutan;19", "Bolivia;9", "Bosnia;14", "Boswana;15", "Brazil;10", "Brunei;21", "Bulgaria;15", "BurkinaFaso;13", "Burundi;15", "Cambodia;20", "Cameroon;14", "Canada;7", "CapeVerde;12", "CAR;14", "Chad;14", "Chile;9", "China;21", "Colombia;8", "Comoros;16", "CostaRica;7", "Croatia;14", "Cuba;8", "Cyprus;15", "Czech;14", "D.Republic;9", "Denmark;14", "Djibouti;16", "Dominica;9", "DRCongo;14", "E.Timor;22", "Ecuador;8", "Egypt;15", "ElSalvador;7", "Eritrea;16", "Estonia;15", "Eswatini;15", "Ethiopia;16", "Fiji;25", "Finland;15", "France;10", "Gabon;14", "Gambia;13", "Georgia;17", "Germany;14", "Ghana;13", "Greece;15", "Grenada;9", "Guatemala;7", "Guinea;13", "Guinea;14", "Guines-Bissau;13", "Guyana;9", "Haiti;8", "Honduras;7", "Hungary;14", "Iceland;13", "India;30", "Indonesia;21", "Iran;31", "Iraq;16", "Ireland;13", "Israel;15", "Italy;14", "IvoryCoast;13", "Jamaica;8", "Japan;22", "Jordan;15", "Kazakhstan;19", "Kenya;16", "N. Korea;22", "S. Korea;22", "Korea;22", "Kosovo;14", "Kuwait;16", "Kyrgyzstan;19", "Laos;20", "Latvia;15", "Lebanon;15", "Lesotho;15", "Liberia;13", "Libya;15", "Liechtenstein;14", "Lithuania;15", "Luxembourg;14", "Madagascar;16", "Malawi;15", "Malaysia;21", "Maldives;18", "Mali;13", "Malta;14", "MarshallI.;25", "Mauritania;13", "Mauritius;17", "Mexico;7", "Moldova;15", "Monaco;14", "Mongolia;21", "Montenegro;14", "Morocco;14", "Mozambique;15", "Myanmar;33", "N.Macedonia;14", "Namibia;14", "Nauru;25", "Nepal;29", "Netherlands;14", "NewGuinea;23", "NewZealand;25", "Nicaragua;7", "Niger;14", "Nigeria;14", "Norway;14", "Oman;17", "Pakistan;18", "Palau;22", "Palestine;15", "Panama;8", "Paraguay;9", "Peru;8", "Philippines;21", "Poland;14", "Portugal;13", "Qatar;16", "R.Congo;14", "Romania;15", "Russia;16", "Rwanda;15", "S.Africa;15", "S.Kitts;9", "S.Lucia;9", "S.Sudan;16", "S.Vincent;9", "Samoa;26", "SanMarino;14", "SaoTome;13", "SaudiArabia;16", "Senegal;13", "Serbia;14", "Seychelles;17", "SierraLeone;13", "Singapore;21", "Slovakia;14", "Slovenia;14", "SolomanI.;24", "Somalia;16", "Spain;14", "SriLanka;30", "Sudan;15", "Suriname;10", "Sweden;14", "Switzerland;14", "Syria;15", "Taiwan;21", "Tajikistan;18", "Tanzania;16", "Thailand;20", "Togo;13", "Tonga;26", "Trinidad;9", "Tunisia;14", "Turkey;16", "Turkmenistan;18", "Tuvalu;25", "UAE;17", "Uganda;16", "UK;13", "Ukraine;15", "Uruguay;10", "USA;8", "Uzbekistan;18", "Vanuatu;24", "Vatican;14", "Venezuela;9", "Vietnam;20", "Yemen;16", "Zambia;15", "Zimbabwe;15"