changeset 39:474d562c7268

2002-10-15 Brian Masney <masneyb@gftp.org> * lib/config_file.c - enable combo in GTK port for Proxy server type * lib/misc.c (gftp_sort_filelist) - make sure prev pointer to first entry is NULL * lib/protocols.c (copy_token) - when setting the end position of the token to \0, after we're done set it back to the origional position * src/gtk/gftp-gtk.c, src/gtk/menu-items.c - changed g_list_first (list) to just list
author masneyb
date Wed, 16 Oct 2002 02:11:09 +0000
parents 0bd328793122
children 66c064fd05bc
files ChangeLog lib/config_file.c lib/misc.c lib/protocols.c src/gtk/gftp-gtk.c src/gtk/menu-items.c
diffstat 6 files changed, 28 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 16 01:18:34 2002 +0000
+++ b/ChangeLog	Wed Oct 16 02:11:09 2002 +0000
@@ -1,3 +1,15 @@
+2002-10-15 Brian Masney <masneyb@gftp.org>
+	* lib/config_file.c - enable combo in GTK port for Proxy server type
+
+	* lib/misc.c (gftp_sort_filelist) - make sure prev pointer to first
+	entry is NULL
+
+	* lib/protocols.c (copy_token) - when setting the end position of 
+	the token to \0, after we're done set it back to the origional position
+
+	* src/gtk/gftp-gtk.c, src/gtk/menu-items.c - changed g_list_first (list)
+	to just list
+
 2002-10-13 Brian Masney <masneyb@gftp.org>
         * lib/gftp.h (struct gftp_config_vars_tag) - remove shown flag and
         added ports_shown flag. Added GFTP_PORTS_TEXT, GFTP_PORTS_GTK,
@@ -52,7 +64,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.17 2002/10/14 02:46:12 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.18 2002/10/16 02:11:06 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/config_file.c	Wed Oct 16 01:18:34 2002 +0000
+++ b/lib/config_file.c	Wed Oct 16 02:11:09 2002 +0000
@@ -93,7 +93,7 @@
 	N_("If you disable this feature, then gFTP will only send LIST to the remote server instead of LIST -L"), NULL, GFTP_PORT_ALL},
 
   {"", "", (void *) 0x1, CONFIG_TABLE, "", NULL, GFTP_PORT_GTK},
-  {"", N_("Proxy server type"), (void *) 0x1, CONFIG_COMBO, "PS", NULL, 0},
+  {"", N_("Proxy server type"), (void *) 0x1, CONFIG_COMBO, "PS", NULL, GFTP_PORT_GTK},
   {"proxy_config", N_("Proxy config"), &proxy_config, CONFIG_TEXT,
 	N_("This specifies how your proxy server expects us to log in"), NULL, GFTP_PORT_GTK},
   {"", N_("%pu = proxy user"), (void *) 0x1, CONFIG_LABEL, "", NULL, 0},
--- a/lib/misc.c	Wed Oct 16 01:18:34 2002 +0000
+++ b/lib/misc.c	Wed Oct 16 02:11:09 2002 +0000
@@ -1205,6 +1205,9 @@
   else
     filelist = g_list_concat (filelist, files);
 
+  /* I haven't check this, but I'm pretty sure some older versions of glib
+     had a bug that the prev pointer wasn't being sent to NULL */
+  filelist->prev = NULL;
   return (filelist);
 }
 
--- a/lib/protocols.c	Wed Oct 16 01:18:34 2002 +0000
+++ b/lib/protocols.c	Wed Oct 16 02:11:09 2002 +0000
@@ -1234,6 +1234,7 @@
       startpos = goto_next_token (startpos);
     }
 
+  /* FIXME - this is a bug if there is some extra spaces in the file */
   /* See if this is a Cray directory listing. It has the following format:
      drwx------     2 feiliu    g913     DK  common      4096 Sep 24  2001 wv */
   if (cols == 11 && strstr (str, "->") == NULL)
@@ -1367,16 +1368,19 @@
 copy_token (char **dest, char *source)
 {
   /* This function is used internally by gftp_parse_ls () */
-  char *endpos;
+  char *endpos, savepos;
 
   endpos = source;
   while (*endpos != ' ' && *endpos != '\t' && *endpos != '\0')
     endpos++;
   if (*endpos == '\0')
     return (NULL);
+
+  savepos = *endpos;
   *endpos = '\0';
   *dest = g_malloc (endpos - source + 1);
   strcpy (*dest, source);
+  *endpos = savepos;
 
   /* Skip the blanks till we get to the next entry */
   source = endpos + 1;
@@ -1391,10 +1395,13 @@
 {
   while (*pos != ' ' && *pos != '\t' && *pos != '\0')
     pos++;
+
   if (pos == '\0')
     return (pos);
+
   while ((*pos == ' ' || *pos == '\t') && *pos != '\0')
     pos++;
+
   return (pos);
 }
 
--- a/src/gtk/gftp-gtk.c	Wed Oct 16 01:18:34 2002 +0000
+++ b/src/gtk/gftp-gtk.c	Wed Oct 16 02:11:09 2002 +0000
@@ -885,7 +885,7 @@
   int num, dir, success;
   gftp_file *tempfle;
 
-  filelist = g_list_first (wdata->files);
+  filelist = wdata->files;
   templist = GTK_CLIST (wdata->listbox)->selection;
   num = 0;
   templist = get_next_selection (templist, &filelist, &num);
--- a/src/gtk/menu-items.c	Wed Oct 16 01:18:34 2002 +0000
+++ b/src/gtk/menu-items.c	Wed Oct 16 02:11:09 2002 +0000
@@ -358,7 +358,7 @@
   wdata->show_selected = 0;
   gtk_clist_freeze (GTK_CLIST (wdata->listbox));
   i = 0;
-  templist = g_list_first (wdata->files);
+  templist = wdata->files;
   while (templist != NULL)
     {
       tempfle = (gftp_file *) templist->data;
@@ -476,7 +476,7 @@
                      wdata->request->chdir != NULL))
     return (0);
 
-  filelist = g_list_first (wdata->files);
+  filelist = wdata->files;
   templist = GTK_CLIST (wdata->listbox)->selection;
   num = 0;
   templist = get_next_selection (templist, &filelist, &num);