int main () { while (gets (str) != NULL) { len = strlen (str); for (int i = 0; i < len; i++) { if (str[i] == 'A' && is_apple(i)) { printf ("%s\n", s1); i += 4; } else if (str[i] == 'S' && is_sony(i)) { printf ("%s\n", s2); i += 3; } else if (str[i] == 'i') { if (is_iphone(i)) { printf ("%s\n", s1); i += 5; } else if (is_ipod(i)) { printf ("%s\n", s1); i += 3; } else if (is_ipad(i)) { printf ("%s\n", s1); i += 3; } } } } return 0; }
void boot( void ) { uint16_t boot_device = fw_cfg_read_i16(FW_CFG_BOOT_DEVICE); fword("update-chosen"); if (boot_device == 'm') { check_preloaded_kernel(); } if (is_apple()) { update_nvram(); } }