/* Gets title of the permissions dialog. Returns pointer to a temporary string * of file name in the view or to a statically allocated string. */ static const char * get_title(void) { static char title[64]; const int first_file_index = get_first_file_index(); if(is_one_file_selected(first_file_index)) { return view->dir_entry[first_file_index].name; } snprintf(title, sizeof(title), "%d files", get_selection_size(first_file_index)); return title; }
/* Gets title of the permissions dialog. Returns pointer to a temporary string * of file name in the view or to a statically allocated string. */ static const char * get_title(void) { static char title[NAME_MAX]; const int first_file_index = get_first_file_index(); if(is_one_file_selected(first_file_index)) { snprintf(title, sizeof(title), " %s ", view->dir_entry[first_file_index].name); } else { snprintf(title, sizeof(title), " %d files ", get_selection_size(first_file_index)); } return title; }