diff lib/gftp.h @ 91:8c37d73d3f1f

2003-1-21 Brian Masney <masneyb@gftp.org> * lib/gftp.h - added server type defines. Added server_type field to gftp_request * lib/local.c - use S_ISDIR and S_ISLINK macros * lib/protocols.c - (gftp_parse_ls*) - use hints from server_type for parsing directory listing * lib/rfc959.c - added function rfc959_syst. Call this on startup * lib/protocols.c lib/rfc959.c lib/sshv2.c - pass request structure to gftp_parse_ls * lib/sshv2.c - set server_type to be GFTP_TYPE_UNIX
author masneyb
date Tue, 21 Jan 2003 23:46:03 +0000
parents 6df043359b41
children 5f9ad9facf0e
line wrap: on
line diff
--- a/lib/gftp.h	Tue Jan 21 05:50:53 2003 +0000
+++ b/lib/gftp.h	Tue Jan 21 23:46:03 2003 +0000
@@ -96,6 +96,15 @@
 #include <dmalloc.h>
 #endif
 
+/* Server types (used by FTP protocol from SYST command) */
+#define GFTP_TYPE_UNIX		1
+#define GFTP_TYPE_EPLF		2
+#define GFTP_TYPE_CRAY		3	
+#define GFTP_TYPE_NOVELL	4	
+#define GFTP_TYPE_DOS		5	
+#define GFTP_TYPE_VMS		6	
+#define GFTP_TYPE_OTHER 	7
+
 /* Error types */
 #define GFTP_ERETRYABLE		-1
 #define GFTP_EFATAL		-2
@@ -217,7 +226,8 @@
   struct hostent host, *hostp;  /* Remote host we are connected to */
 #endif
 
-  int data_type;		/* ASCII or BINARY (FTP only) */
+  int data_type,		/* ASCII or BINARY (FTP only) */
+      server_type;		/* The type of server we are connected to */
   unsigned int use_proxy : 1,           /* Go out of proxy server */
                always_connected : 1,
                need_hostport : 1,
@@ -498,6 +508,7 @@
 extern gftp_config_vars config_file_vars[];
 extern gftp_proxy_type proxy_type[];
 extern gftp_color send_color, recv_color, error_color, misc_color;
+extern struct lconv *my_localeinfo;
 
 /* cache.c */
 int gftp_new_cache_entry 		( gftp_request * request );
@@ -780,7 +791,8 @@
 void gftp_calc_kbs 			( gftp_transfer * tdata, 
 				 	  ssize_t num_read );
 
-int gftp_parse_ls 			( const char *lsoutput, 
+int gftp_parse_ls 			( gftp_request * request,
+					  const char *lsoutput, 
 					  gftp_file *fle );
 
 int gftp_get_all_subdirs 		( gftp_transfer * transfer,