static void menu_action_setting_disp_set_label_menu_file_core( file_list_t* list, unsigned *w, unsigned type, unsigned i, const char *label, char *s, size_t len, const char *entry_label, const char *path, char *s2, size_t len2) { const char *alt = NULL; strlcpy(s, "(CORE)", len); menu_list_get_alt_at_offset(list, i, &alt); *w = strlen(s); if (alt) strlcpy(s2, alt, len2); }
/** * menu_entries_list_get_first_char: * @list : File list handle. * @offset : Offset index of element. * * Gets the first character of an element in the * file list. * * Returns: first character of element in file list. **/ static INLINE int menu_entries_list_get_first_char( file_list_t *list, unsigned offset) { int ret; const char *path = NULL; menu_list_get_alt_at_offset(list, offset, &path); ret = tolower(*path); /* "Normalize" non-alphabetical entries so they * are lumped together for purposes of jumping. */ if (ret < 'a') ret = 'a' - 1; else if (ret > 'z') ret = 'z' + 1; return ret; }