* tree.c: Remove dead code.
* treestore.c (tree_store_add_entry): Make static. (tree_store_start_check): Likewise.
Этот коммит содержится в:
родитель
8cde1fd052
Коммит
39d5093acb
@ -1,5 +1,9 @@
|
||||
2003-10-14 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* tree.c: Remove dead code.
|
||||
* treestore.c (tree_store_add_entry): Make static.
|
||||
(tree_store_start_check): Likewise.
|
||||
|
||||
* cmd.c: Cleanup of unneeded global functions and data.
|
||||
* color.c: Likewise.
|
||||
* dir.c: Likewise.
|
||||
|
57
src/tree.c
57
src/tree.c
@ -96,63 +96,6 @@ static tree_entry *forw_ptr (tree_entry *ptr, int *count)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Add a directory to the list of directories */
|
||||
static tree_entry *tree_add_entry (WTree *tree, char *name)
|
||||
{
|
||||
if (!tree)
|
||||
return 0;
|
||||
|
||||
return tree_store_add_entry (name);
|
||||
}
|
||||
|
||||
/* Append a directory to the list of directories */
|
||||
static tree_entry *tree_append_entry (WTree *tree, char *name)
|
||||
{
|
||||
tree_entry *current, *new;
|
||||
int i, len;
|
||||
int submask = 0;
|
||||
|
||||
/* We assume the directory is not yet in the list */
|
||||
|
||||
new = g_new (tree_entry, 1);
|
||||
if (!tree->store->tree_first){
|
||||
/* Empty list */
|
||||
tree->store->tree_first = new;
|
||||
new->prev = NULL;
|
||||
} else {
|
||||
tree->tree_last->next = new;
|
||||
new->prev = tree->tree_last;
|
||||
}
|
||||
new->next = NULL;
|
||||
tree->store->tree_last = new;
|
||||
|
||||
/* Calculate attributes */
|
||||
new->name = g_strdup (name);
|
||||
len = strlen (new->name);
|
||||
new->sublevel = 0;
|
||||
for (i = 0; i < len; i++)
|
||||
if (new->name [i] == PATH_SEP){
|
||||
new->sublevel++;
|
||||
new->subname = new->name + i + 1;
|
||||
}
|
||||
submask = 1 << new->sublevel;
|
||||
submask &= (2 << new->sublevel) - 1;
|
||||
new->submask = submask;
|
||||
new->mark = 0;
|
||||
|
||||
/* Correct the submasks of the previous entries */
|
||||
current = new->prev;
|
||||
while (current && current->sublevel > new->sublevel){
|
||||
current->submask |= 1 << new->sublevel;
|
||||
current = current->prev;
|
||||
}
|
||||
|
||||
/* The entry has now been appended */
|
||||
return new;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
remove_callback (tree_entry *entry, void *data)
|
||||
{
|
||||
|
@ -49,6 +49,8 @@
|
||||
|
||||
static TreeStore ts;
|
||||
|
||||
static tree_entry *tree_store_add_entry(char *name);
|
||||
|
||||
static void
|
||||
tree_store_dirty(int state)
|
||||
{
|
||||
@ -386,7 +388,7 @@ tree_store_save(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
tree_entry *
|
||||
static tree_entry *
|
||||
tree_store_add_entry(char *name)
|
||||
{
|
||||
int flag = -1;
|
||||
@ -631,7 +633,7 @@ tree_store_mark_checked(const char *subname)
|
||||
}
|
||||
|
||||
/* Mark the subdirectories of the current directory for delete */
|
||||
tree_entry *
|
||||
static tree_entry *
|
||||
tree_store_start_check(char *path)
|
||||
{
|
||||
tree_entry *current, *retval;
|
||||
|
@ -37,9 +37,7 @@ typedef struct {
|
||||
TreeStore *tree_store_get (void);
|
||||
int tree_store_load (void);
|
||||
int tree_store_save (void);
|
||||
tree_entry *tree_store_add_entry (char *name);
|
||||
void tree_store_remove_entry (char *name);
|
||||
tree_entry *tree_store_start_check (char *path);
|
||||
tree_entry *tree_store_start_check_cwd (void);
|
||||
void tree_store_mark_checked (const char *subname);
|
||||
void tree_store_end_check (void);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user