diff lib/rfc959.c @ 136:84b3e69807a2

2003-4-18 Brian Masney <masneyb@gftp.org> * lib/config_file.c lib/gftp.h - removed gftp_option_type_subtree, gftp_option_type_table and gftp_option_type_newtable * lib/config_file.c - implemented gftp_set_request_option() * lib/gftp.h lib/config_file.c - changed declaration of ui_print_function in struct gftp_option_type. Also added ui_save_function field to this structure * lib/gftp.h added local_options_vars num_local_options_vars variables to gftp_request * lib/local.c (local_set_directory) - small improvements to this function * lib/misc.c - added gftp_copy_local_options() * lib/options.h - fix declaration of General tab * lib/protocols.c - free local options * lib/rfc2068.c - check to see if we're connecting to a FTP site via proxy * lib/rfc959.c lib/protocols.c - changes for CRAY directory listings * src/gtk/gftp-gtk.h - added struct gftp_options_dialog_data and struct gftp_textcomboedt_widget_data * src/gtk/options_dialog.c - start to use new configuration interface * src/gtk/transfer.c - remove FIXME note. This is already in lib/gftp.h
author masneyb
date Fri, 18 Apr 2003 19:38:34 +0000
parents 1e65871fdfa1
children c363b08e0118
line wrap: on
line diff
--- a/lib/rfc959.c	Fri Apr 18 16:02:38 2003 +0000
+++ b/lib/rfc959.c	Fri Apr 18 19:38:34 2003 +0000
@@ -20,16 +20,18 @@
 #include "gftp.h"
 static const char cvsid[] = "$Id$";
 
+/* FIXME - add coversion functios for %n to \n */
+
 static gftp_textcomboedt_data gftp_proxy_type[] = {
-  {N_("none"), ""},
-  {N_("SITE command"), "USER %pu\nPASS %pp\nSITE %hh\nUSER %hu\nPASS %hp\n"},
-  {N_("user@host"), "USER %pu\nPASS %pp\nUSER %hu@%hh\nPASS %hp\n"},
-  {N_("user@host:port"), "USER %hu@%hh:%ho\nPASS %hp\n"},
-  {N_("AUTHENTICATE"), "USER %hu@%hh\nPASS %hp\nSITE AUTHENTICATE %pu\nSITE RESPONSE %pp\n"},
-  {N_("user@host port"), "USER %hu@%hh %ho\nPASS %hp\n"},
-  {N_("user@host NOAUTH"), "USER %hu@%hh\nPASS %hp\n"},
-  {N_("HTTP Proxy"), "http"},
-  {N_("Custom"), ""},
+  {N_("none"), "", 0},
+  {N_("SITE command"), "USER %pu\nPASS %pp\nSITE %hh\nUSER %hu\nPASS %hp\n", 0},
+  {N_("user@host"), "USER %pu\nPASS %pp\nUSER %hu@%hh\nPASS %hp\n", 0},
+  {N_("user@host:port"), "USER %hu@%hh:%ho\nPASS %hp\n", 0},
+  {N_("AUTHENTICATE"), "USER %hu@%hh\nPASS %hp\nSITE AUTHENTICATE %pu\nSITE RESPONSE %pp\n", 0},
+  {N_("user@host port"), "USER %hu@%hh %ho\nPASS %hp\n", 0},
+  {N_("user@host NOAUTH"), "USER %hu@%hh\nPASS %hp\n", 0},
+  {N_("HTTP Proxy"), "http", 0},
+  {N_("Custom"), "", GFTP_TEXTCOMBOEDT_EDITABLE},
   {NULL, NULL}
 };
 
@@ -42,18 +44,6 @@
    gftp_option_type_text, "", NULL, 0,
    N_("This is the password that will be used whenever you log into a remote FTP server as anonymous"), 
    GFTP_PORT_ALL, NULL},
-  {"passive_transfer", N_("Passive file transfers"), 
-   gftp_option_type_checkbox, GINT_TO_POINTER(1), NULL, 0,
-   N_("If this is enabled, then the remote FTP server will open up a port for the data connection. If you are behind a firewall, you will need to enable this. Generally, it is a good idea to keep this enabled unless you are connecting to an older FTP server that doesn't support this. If this is disabled, then gFTP will open up a port on the client side and the remote server will attempt to connect to it."),
-   GFTP_PORT_ALL, NULL},
-  {"resolve_symlinks", N_("Resolve Remote Symlinks (LIST -L)"), 
-   gftp_option_type_checkbox, GINT_TO_POINTER(1), NULL, 0,
-   N_("The remote FTP server will attempt to resolve symlinks in the directory listings. Generally, this is a good idea to leave enabled. The only time you will want to disable this is if the remote FTP server doesn't support the -L option to LIST"), 
-   GFTP_PORT_ALL, NULL},
-  {"ascii_transfers", N_("Transfer files in ASCII mode"), 
-   gftp_option_type_checkbox, GINT_TO_POINTER(0), NULL, 0,
-   N_("If you are transfering a text file from Windows to UNIX box or vice versa, then you should enable this. Each system represents newlines differently for text files. If you are transfering from UNIX to UNIX, then it is safe to leave this off. If you are downloading binary data, you will want to disable this."), 
-   GFTP_PORT_ALL, NULL},
   {"ftp_proxy_host", N_("Proxy hostname:"), 
    gftp_option_type_text, "", NULL, 0,
    N_("Firewall hostname"), GFTP_PORT_ALL, NULL},
@@ -70,13 +60,24 @@
    gftp_option_type_text, "", NULL, 0,
    N_("Your firewall account (optional)"), GFTP_PORT_ALL, NULL},
   
-  {"", "", gftp_option_type_newtable, "", NULL, 0, "", GFTP_PORT_GTK, NULL},
-
   {"proxy_config", N_("Proxy server type:"),
    gftp_option_type_textcomboedt, "", gftp_proxy_type, 0,
    N_("This specifies how your proxy server expects us to log in. You can specify a 2 character replacement string prefixed by a % that will be replaced with the proper data. The first character can be either p for proxy or h for the host of the FTP server. The second character can be u (user), p (pass), h (host), o (port) or a (account). For example, to specify the proxy user, you can you type in %pu"), 
    GFTP_PORT_ALL, NULL},
 
+  {"passive_transfer", N_("Passive file transfers"), 
+   gftp_option_type_checkbox, GINT_TO_POINTER(1), NULL, 0,
+   N_("If this is enabled, then the remote FTP server will open up a port for the data connection. If you are behind a firewall, you will need to enable this. Generally, it is a good idea to keep this enabled unless you are connecting to an older FTP server that doesn't support this. If this is disabled, then gFTP will open up a port on the client side and the remote server will attempt to connect to it."),
+   GFTP_PORT_ALL, NULL},
+  {"resolve_symlinks", N_("Resolve Remote Symlinks (LIST -L)"), 
+   gftp_option_type_checkbox, GINT_TO_POINTER(1), NULL, 0,
+   N_("The remote FTP server will attempt to resolve symlinks in the directory listings. Generally, this is a good idea to leave enabled. The only time you will want to disable this is if the remote FTP server doesn't support the -L option to LIST"), 
+   GFTP_PORT_ALL, NULL},
+  {"ascii_transfers", N_("Transfer files in ASCII mode"), 
+   gftp_option_type_checkbox, GINT_TO_POINTER(0), NULL, 0,
+   N_("If you are transfering a text file from Windows to UNIX box or vice versa, then you should enable this. Each system represents newlines differently for text files. If you are transfering from UNIX to UNIX, then it is safe to leave this off. If you are downloading binary data, you will want to disable this."), 
+   GFTP_PORT_ALL, NULL},
+
   {NULL, NULL, 0, NULL, NULL, 0, NULL, 0, NULL}
 };
 
@@ -398,6 +399,8 @@
     request->server_type = GFTP_DIRTYPE_UNIX;
   else if (strcmp (stpos, "VMS") == 0)
     request->server_type = GFTP_DIRTYPE_VMS;
+  else if (strcmp (stpos, "CRAY") == 0)
+    request->server_type = GFTP_DIRTYPE_CRAY;
   else
     request->server_type = GFTP_DIRTYPE_OTHER;