# HG changeset patch # User zas_ # Date 1210769940 0 # Node ID db373fb1b9d8304d139f43a06c09c3f706d114a7 # Parent 4154b8be989bb33fd625a951c68fc2e96f9547b2 Merge vflist_row_by_path() into vflist_index_by_path(). diff -r 4154b8be989b -r db373fb1b9d8 src/view_file_list.c --- a/src/view_file_list.c Wed May 14 10:40:43 2008 +0000 +++ b/src/view_file_list.c Wed May 14 12:59:00 2008 +0000 @@ -1045,7 +1045,7 @@ return g_list_nth_data(vf->list, row); } -static gint vflist_row_by_path(ViewFile *vf, const gchar *path, FileData **fd) +gint vflist_index_by_path(ViewFile *vf, const gchar *path) { gint p = 0; GList *work; @@ -1055,25 +1055,16 @@ work = vf->list; while (work) { - FileData *fd_n = work->data; - if (strcmp(path, fd_n->path) == 0) - { - if (fd) *fd = fd_n; - return p; - } + FileData *fd = work->data; + if (strcmp(path, fd->path) == 0) return p; + work = work->next; p++; } - if (fd) *fd = NULL; return -1; } -gint vflist_index_by_path(ViewFile *vf, const gchar *path) -{ - return vflist_row_by_path(vf, path, NULL); -} - gint vflist_count(ViewFile *vf, gint64 *bytes) { if (bytes)