Mercurial > gftp.yaz
diff lib/misc.c @ 207:cf4098008615
2003-7-1 Brian Masney <masneyb@gftp.org>
* lib/httpcommon.h lib/rfc2068.c - more HTTP improvements. Mostly with
chunked file transfers. Also fixed several memory leaks. Added more
informative error messages to aid in debugging. Size parsing fixes
* lib/misc.c (base64_encode) - alphabet fix (+ wasn't a valid
character, it should have been /) (thanks to Holger Kiehl
<Holger.Kiehl@dwd.de> for pointing this out)
* lib/config_file.c lib/gftp.h - added copy function for options
variables. The functions gftp_config_file_copy_text(),
gftp_config_file_copy_ptr_contents() and gftp_config_file_copy_color()
were added
* lib/protocols.c - make sure the remote_charsets string is restored
properly after it is used
* src/gtk/bookmarks.c - remove memory leak comments, these are fixed
now
* src/gtk/transfer.c - removed start_file_transfers variable
* src/gtk/misc-gtk.c src/gtk/gftp-gtk.h lib/misc.c lib/gftp.h - moved
get_next_selection() to lib
* acinclude.h (AC_TYPE_SOCKLEN_T) - AC_DEFINE fix (from
Nathan Robertson <nathanr@nathanr.net>)
author | masneyb |
---|---|
date | Wed, 02 Jul 2003 01:44:57 +0000 |
parents | 9b2de8d3fafe |
children | 6de9a8280aa4 |
line wrap: on
line diff
--- a/lib/misc.c Sat Jun 28 13:52:44 2003 +0000 +++ b/lib/misc.c Wed Jul 02 01:44:57 2003 +0000 @@ -967,7 +967,7 @@ table[i + 52] = '0' + i; table[62] = '+'; - table[63] = '-'; + table[63] = '/'; num = strlen (str) / 3; if (strlen (str) % 3 > 0) @@ -1068,3 +1068,50 @@ exit (0); } + +GList * +get_next_selection (GList * selection, GList ** list, int *curnum) +{ + gftp_file * tempfle; + int i, newpos; + + newpos = GPOINTER_TO_INT (selection->data); + i = *curnum - newpos; + + if (i < 0) + { + while (i != 0) + { + tempfle = (*list)->data; + if (tempfle->shown) + { + ++*curnum; + i++; + } + *list = (*list)->next; + } + } + else if (i > 0) + { + while (i != 0) + { + tempfle = (*list)->data; + if (tempfle->shown) + { + --*curnum; + i--; + } + *list = (*list)->prev; + } + } + + tempfle = (*list)->data; + while ((*list)->next && !tempfle->shown) + { + *list = (*list)->next; + tempfle = (*list)->data; + } + return (selection->next); +} + +