void MCArraysEvalKeys(MCExecContext& ctxt, MCArrayRef p_array, MCStringRef& r_string) { if (MCArrayListKeys(p_array, '\n', r_string)) return; ctxt . Throw(); }
void MCLicenseGetRevLicenseInfo(MCExecContext& ctxt, MCStringRef& r_info) { static const char *s_deploy_targets[] = { "Windows", "Mac OS X", "Linux", "iOS", "Android", "Windows Mobile", "Linux Mobile", "Server", "iOS Embedded", "Android Embedded", "HTML5", "FileMaker", }; bool t_success; MCAutoStringRef t_info; t_success = MCStringCreateMutable(0, &t_info); MCStringRef t_license_name; t_license_name = MClicenseparameters . license_name; if (t_license_name == nil) t_license_name = kMCEmptyString; MCStringRef t_license_org; t_license_org = MClicenseparameters . license_organization; if (t_license_org == nil) t_license_org = kMCEmptyString; MCAutoStringRef t_class; if (t_success) t_success = MCStringFromLicenseClass(MClicenseparameters . license_class, false, &t_class); if (t_success) t_success = MCStringAppendFormat(*t_info, "%@\n%@\n%@\n%u\n", t_license_name, t_license_org, *t_class, MClicenseparameters . license_multiplicity); if (MClicenseparameters . deploy_targets != 0) { bool t_first; t_first = true; for(uint32_t i = 0; t_success && i < sizeof(s_deploy_targets) / sizeof(s_deploy_targets[0]); i++) { if ((MClicenseparameters . deploy_targets & (1 << i)) != 0) { t_success = MCStringAppendFormat(*t_info, t_first ? "%s" : ",%s", s_deploy_targets[i]); t_first = false; } } } // AL-2014-11-04: [[ Bug 13865 ]] Don't add an extra line between deploy targets and addons if (t_success && MClicenseparameters . addons != nil) { MCAutoStringRef t_keys; t_success = (MCArrayListKeys(MClicenseparameters . addons, ',', &t_keys) && MCStringAppendFormat(*t_info, "\n%@", *t_keys)); } if (t_success) if (MCStringAppendFormat(*t_info, "\n%s", MCStringIsEmpty(MClicenseparameters . license_token) ? "Global" : "Local") && MCStringCopy(*t_info, r_info)) return; ctxt . Throw(); }