function getdist(section, dist, a) { if (section in _getdist) { return _getdist[section] } dist = section ldist = tolower(dist) if (match(ldist, /^non-us\/[^\/]*/)) { dist = "non-US" substr(dist, 7, RLENGTH - 6) } else if (ldist == "non-us") { dist = "non-US/main" #} else if (match(dist, /^[^\/]*\//)) { # dist = substr(dist, 1, RLENGTH - 1) } else { dist = "main" } return _getdist[section] = dist }