deletion of now useless functions
This commit is contained in:
53
dir.c
53
dir.c
@@ -295,59 +295,6 @@ void print_dir(WINDOW *win, char print_info, dir *dir){
|
||||
}
|
||||
}
|
||||
|
||||
char update_selected_file(){
|
||||
char ret = -1; /* -1 on empty or inaccessible file, 0 on unchanged file, 1 on changed file */
|
||||
|
||||
/*
|
||||
if (selected_file_current >= mid_file_count) {
|
||||
selected_file_current = mid_file_count-1;
|
||||
}
|
||||
if (selected_file_current != selected_file_last && selected_file_last <= mid_file_count) {
|
||||
mid_content[selected_file_last].status &= ~FILE_STATUS_HOVER;
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
mid_dir.current_dir.status |= FILE_STATUS_HOVER;
|
||||
selected_file_last = selected_file_current;
|
||||
*/
|
||||
return ret;
|
||||
}
|
||||
void dir_set_selected_file_current(unsigned long selected_file_current){
|
||||
/*
|
||||
if (mid_content->file_name) {
|
||||
current_dir->selected_file_current = selected_file_current;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
unsigned long dir_get_selected_file_current(){
|
||||
|
||||
/*
|
||||
current_dir = visited_dirs;
|
||||
if (mid_content->file_name[0] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
char hit = 0;
|
||||
char *path = getcwd(NULL, 0);
|
||||
while(current_dir->next != NULL) {
|
||||
if (strcmp(path, current_dir->path) == 0) {
|
||||
hit = 1;
|
||||
break;
|
||||
}
|
||||
current_dir = current_dir->next;
|
||||
}
|
||||
if (hit == 0) {
|
||||
current_dir->next = malloc(sizeof(linked_dir));
|
||||
current_dir->next->next = NULL;
|
||||
current_dir->next->path = path;
|
||||
return 0;
|
||||
} else {
|
||||
free(path);
|
||||
return current_dir->selected_file_current;
|
||||
}
|
||||
*/
|
||||
}
|
||||
void dir_init(){
|
||||
visited_dirs = malloc(sizeof(linked_dir));
|
||||
visited_dirs->path = getcwd(NULL, 0);
|
||||
|
||||
Reference in New Issue
Block a user