mirror of https://github.com/MidnightCommander/mc
2000-02-25 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
Patch by Andrew V. Samoilov <sav@bcs.zp.ua> * vfs.[ch] (vfs_canon, mc_open, vfs_file_is_local, mc_(un)?getlocalcopy): added const qualifier (mc_def_getlocalcopy): tempnam() returns malloc()ed buffer, so, free() it, not g_free(); (vfs_canon): prepend filename by cwd when tilde '~' cannot be expanded;
This commit is contained in:
parent
6521c7afbd
commit
0b25d26cf0
|
@ -1,3 +1,13 @@
|
|||
2000-02-25 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
|
||||
|
||||
Patch by Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* vfs.[ch] (vfs_canon, mc_open, vfs_file_is_local,
|
||||
mc_(un)?getlocalcopy): added const qualifier
|
||||
(mc_def_getlocalcopy): tempnam() returns malloc()ed buffer,
|
||||
so, free() it, not g_free();
|
||||
(vfs_canon): prepend filename by cwd when tilde '~' cannot be expanded;
|
||||
|
||||
2000-02-23 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
|
||||
|
||||
* cpio.c: cpio.h is missing, so don't try to include it. (It is
|
||||
|
|
|
@ -39,7 +39,7 @@ enum {
|
|||
STATUS_OK,
|
||||
STATUS_TRAIL,
|
||||
STATUS_FAIL,
|
||||
STATUS_EOF,
|
||||
STATUS_EOF
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -101,7 +101,7 @@ static int cpio_create_entry(vfs *me, vfs_s_super *super, struct stat *stat, cha
|
|||
static int cpio_read(void *fh, char *buffer, int count);
|
||||
|
||||
#define CPIO_POS(super) cpio_position
|
||||
/* #define CPIO_POS(super) (super)->u.cpio.fd /* If some time reentrancy should be needed */
|
||||
//#define CPIO_POS(super) (super)->u.cpio.fd /* If some time reentrancy should be needed */
|
||||
|
||||
#define CPIO_SEEK_SET(super, where) mc_lseek((super)->u.cpio.fd, CPIO_POS(super) = (where), SEEK_SET)
|
||||
#define CPIO_SEEK_CUR(super, where) mc_lseek((super)->u.cpio.fd, CPIO_POS(super) += (where), SEEK_SET)
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#undef HAVE_HACKED_SSH
|
||||
|
||||
#include "utilvfs.h"
|
||||
#include "../src/dialog.h" /* For MSG_ERROR */
|
||||
|
||||
#include "xdirentry.h"
|
||||
#include "vfs.h"
|
||||
|
|
|
@ -154,6 +154,9 @@ static char reply_str [80];
|
|||
c) strip trailing "/."
|
||||
*/
|
||||
|
||||
static char *ftpfs_get_current_directory (vfs *me, vfs_s_super *super);
|
||||
static int ftpfs_chdir_internal (vfs *me, vfs_s_super *super, char *remote_path);
|
||||
|
||||
static char *
|
||||
translate_path (vfs *me, vfs_s_super *super, const char *remote_path)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/* ftpfs.h */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#if !defined(__FTPFS_H)
|
||||
#define __FTPFS_H
|
||||
|
||||
|
@ -90,8 +92,6 @@ extern int ftpfs_directory_timeout;
|
|||
extern int ftpfs_always_use_proxy;
|
||||
|
||||
void ftpfs_init_passwd (void);
|
||||
static char *ftpfs_get_current_directory (vfs *me, vfs_s_super *super);
|
||||
static int ftpfs_chdir_internal (vfs *me, vfs_s_super *super, char *remote_path);
|
||||
|
||||
#define OPT_FLUSH 1
|
||||
#define OPT_IGNORE_ERROR 2
|
||||
|
|
|
@ -1239,7 +1239,7 @@ smbfs_open_link(char *host, char *path, char *user, int *port, char *this_pass)
|
|||
if (my_errno != EPERM)
|
||||
return 0;
|
||||
message_1s (1, MSG_ERROR,
|
||||
" Authentication failed ");
|
||||
_(" Authentication failed "));
|
||||
|
||||
/* authentication failed, try again */
|
||||
authinfo_remove (bucket->host, bucket->service);
|
||||
|
|
|
@ -157,7 +157,7 @@ struct utimbuf {
|
|||
void vfs_rm_parents (struct vfs_stamping *stamp);
|
||||
char *vfs_path (char *path);
|
||||
char *vfs_strip_suffix_from_filename (char *filename);
|
||||
char *vfs_canon (char *path);
|
||||
char *vfs_canon (const char *path);
|
||||
char *mc_get_current_wd (char *buffer, int bufsize);
|
||||
int vfs_current_is_local (void);
|
||||
#if 0
|
||||
|
@ -165,7 +165,7 @@ struct utimbuf {
|
|||
int vfs_current_is_tarfs (void);
|
||||
int vfs_current_is_cpiofs (void);
|
||||
#endif
|
||||
int vfs_file_is_local (char *name);
|
||||
int vfs_file_is_local (const char *name);
|
||||
int vfs_file_is_ftp (char *filename);
|
||||
int vfs_file_is_smb (char *filename);
|
||||
char *vfs_get_current_dir (void);
|
||||
|
|
|
@ -123,7 +123,7 @@ typedef struct vfs_s_super {
|
|||
int fd;
|
||||
struct stat stat;
|
||||
int type; /* Type of the archive */
|
||||
/* int pos; /* In case reentrancy will be needed */
|
||||
/*int pos; In case reentrancy will be needed */
|
||||
struct defer_inode *defered; /* List of inodes for which another entries may appear */
|
||||
} cpio;
|
||||
} u;
|
||||
|
|
Loading…
Reference in New Issue