mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
f75a6470ca
Sun Jan 31 20:04:13 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * vfs/vfs.c (vfs_strip_suffix_from_filename): Whoever replaces every occurance of 0 with NULL should stop this stupidy. And replacing '\0' with NULL is plain wrong!!. Reverted this replacement. * vfs/ftpfs.c (load_no_proxy_list): ditto Fri Jan 29 22:55:56 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * slang/slang.h: renamed to slang-mc.h * slang/Makefile.in: delete slang.h on "make clean" * configure.in: link slang/slang-mc.h to slang/slang.h when the included slang is used. Problem was that MC's slang.h was used when we compiled with an already installed SLang and the systems header file were included with <slang/slang.h>. Unfortunatly I can't use AC_LINK_FILES to make the links because if we needn't make any links AC_LINK_FILES makes a link from srcdir to top_builddir (builddir != srcdir). Temporary add $LGPM to $LIBS when checking for the resizeterm and keyok functions (ncurses might be linked against GPM). Substitude PACKAGE (intl/Makefile makes use of it) Sun Jan 31 19:42:47 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * gnome/Makefile.in (install_mx): make it work with srcdir != builddir (gmc.gnorba is located in $srcdir) * src/hotlist.c (add_new_entry_input, add_new_group_input): Make the quick_widget arrays static and various changes needed because they are now static. add_widgets_i18n recalculates button positions which get lost when the quick_widget arrays are non static. * src/screen.c (to_buffer): nul terminate string when using strncpy * src/setup.c: Save and restore new option ftpfs_first_cd_then_ls. Sun Jan 31 19:57:24 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * vfs/ftpfs.c (insert_dot): New function. Insert a "." into the linked list. Stat'ing the root directory of a ftpfs fails if the dot is missing. (retrieve_dir): insert "." into the linked list if the ftp server haven't send it. Sun Jan 31 19:50:24 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * The following changes make ftpfs work with a remote AmiTCP server are the result of somehow longish EMail debugging session. I don't know any public server of this kind but I was told the combination Unix/Amiga boxes are often used in intranets. * vfs/ftpfs.c (translate_path): New function. Translate a Unix path, i.e. MC's internal path representation (e.g. /somedir/somefile) to a path valid for the remote server. Every path transfered to the remote server has to be mangled by this function right prior to sending it. Currently only Amiga ftp servers are handled in a special manner. * vfs/ftpfs.c (various places): use translate_path * vfs/ftpfs.c (login_server): Assume we have to mangle pathnames if the greatings string from the server contains the word Amiga. If this assumption is wrong I have to find another way to turn on path translation. * vfs/ftpfs.c (ftpfs_get_current_directory): Prepend a leading slash if it is missing. MC needs it as seperator between hostname and path in its internal url representation.
92 lines
2.4 KiB
C
92 lines
2.4 KiB
C
/* ftpfs.h */
|
|
|
|
#if !defined(__FTPFS_H)
|
|
#define __FTPFS_H
|
|
|
|
struct direntry
|
|
{
|
|
char *name;
|
|
int count;
|
|
char *linkname;
|
|
char *local_filename, *remote_filename;
|
|
int local_is_temp:1;
|
|
int freshly_created:1;
|
|
struct stat local_stat;
|
|
struct stat s;
|
|
struct stat *l_stat;
|
|
struct connection *bucket;
|
|
|
|
int data_sock; /* For linear_ operations */
|
|
int linear_state;
|
|
#define LS_NONLIN 0 /* Not using linear access at all */
|
|
#define LS_LINEAR_CLOSED 1 /* Using linear access, but not open, yet */
|
|
#define LS_LINEAR_OPEN 2 /* Using linear access, open */
|
|
};
|
|
|
|
struct dir
|
|
{
|
|
int count;
|
|
struct timeval timestamp;
|
|
char *remote_path;
|
|
struct linklist *file_list;
|
|
int symlink_status;
|
|
};
|
|
|
|
/* valid values for dir->symlink_status */
|
|
#define FTPFS_NO_SYMLINKS 0
|
|
#define FTPFS_UNRESOLVED_SYMLINKS 1
|
|
#define FTPFS_RESOLVED_SYMLINKS 2
|
|
#define FTPFS_RESOLVING_SYMLINKS 3
|
|
|
|
struct connection {
|
|
char *host;
|
|
char *user;
|
|
char *current_directory;
|
|
char *home;
|
|
char *updir;
|
|
char *password;
|
|
int port;
|
|
int sock;
|
|
struct linklist *dcache;
|
|
ino_t __inode_counter;
|
|
int lock;
|
|
int failed_on_login; /* used to pass the failure reason to upper levels */
|
|
int use_proxy; /* use a proxy server */
|
|
int result_pending;
|
|
int use_source_route;
|
|
int use_passive_connection;
|
|
int remote_is_amiga; /* No leading slash allowed for AmiTCP (Amiga) */
|
|
int isbinary;
|
|
int cwd_defered; /* current_directory was changed but CWD command hasn't
|
|
been sent yet */
|
|
int strict_rfc959_list_cmd; /* ftp server doesn't understand
|
|
"LIST -la <path>"; use "CWD <path>"/
|
|
"LIST" instead */
|
|
};
|
|
|
|
#define qhost(b) (b)->host
|
|
#define quser(b) (b)->user
|
|
#define qcdir(b) (b)->current_directory
|
|
#define qport(b) (b)->port
|
|
#define qsock(b) (b)->sock
|
|
#define qlock(b) (b)->lock
|
|
#define qdcache(b) (b)->dcache
|
|
#define qhome(b) (b)->home
|
|
#define qupdir(b) (b)->updir
|
|
#define qproxy(b) (b)->use_proxy
|
|
|
|
/* Increased since now we may use C-r to reread the contents */
|
|
#define FTPFS_DIRECTORY_TIMEOUT 30 * 60
|
|
|
|
#define DO_RESOLVE_SYMLINK 1
|
|
#define DO_OPEN 2
|
|
#define DO_FREE_RESOURCE 4
|
|
|
|
extern char *ftpfs_anonymous_passwd;
|
|
extern char *ftpfs_proxy_host;
|
|
extern int ftpfs_directory_timeout;
|
|
extern int ftpfs_always_use_proxy;
|
|
|
|
void ftpfs_init_passwd ();
|
|
#endif
|