diff --git a/ChangeLog b/ChangeLog index 1ae120ed1..2a77b2a27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1999-12-28 Andrew V. Samoilov + + * vfs/vfs.c (vfs_parse_filedate): don't decode last columns as year + 2000-01-03 Fatih Demir * configure.in: Added tr -> ALL_LINGUAS . @@ -8,7 +12,7 @@ 1999-12-06 Federico Mena Quintero - * configure.in (VERSION): Bumped version number to 0.42. + * configure.in (VERSION): Bumped version number to 4.5.42. 1999-11-25 Yuri Syrota diff --git a/po/POTFILES.in b/po/POTFILES.in index 7b1353e4d..8dbd69e36 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -66,6 +66,7 @@ src/view.c src/widget.c src/win.c src/wtools.c +vfs/direntry.c vfs/extfs.c vfs/fish.c vfs/ftpfs.c @@ -73,3 +74,4 @@ vfs/mcfs.c vfs/smbfs.c vfs/tar.c vfs/vfs.c +vfs/undelfs.c diff --git a/vfs/extfs.c b/vfs/extfs.c index 4d22ea1a7..8b9719a25 100644 --- a/vfs/extfs.c +++ b/vfs/extfs.c @@ -5,6 +5,8 @@ Rewritten by: 1998 Pavel Machek Additional changes by: 1999 Andrew T. Veliath + $Id$ + This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of @@ -367,7 +369,7 @@ static int read_archive (int fstype, char *name, struct archive **pparc) } pclose (extfsd); #ifdef SCO_FLAVOR - waitpid(-1,NULL,WNOHANG); + waitpid(-1,NULL,WNOHANG); #endif /* SCO_FLAVOR */ *pparc = current_archive; g_free (buffer); @@ -395,10 +397,10 @@ static char *get_path_mangle (char *inname, struct archive **archive, int is_dir fstype = extfs_which( NULL, op ); /* FIXME: we really should pass self pointer. But as we know that extfs_which does not touch vfs *me, it does not matter for now */ - if (!local) - local = ""; if (fstype == -1) return NULL; + if (!local) + local = ""; /* All filesystems should have some local archive, at least * it can be '/'. @@ -564,6 +566,7 @@ void extfs_run (char *file) if ((p = get_path (file, &archive, 0, 0)) == NULL) return; q = name_quote (p, 0); + g_free (p); archive_name = name_quote (get_archive_name(archive), 0); mc_extfsdir = concat_dir_and_file (mc_home, "extfs/"); @@ -578,7 +581,6 @@ void extfs_run (char *file) vfs_die( "shell_execute: implement me!" ); #endif g_free(cmd); - g_free(p); } static void *extfs_open (vfs *me, char *file, int flags, int mode) @@ -1031,7 +1033,7 @@ static int extfs_ungetlocalcopy (vfs *me, char *path, char *local, int has_chang (struct pseudofile *) extfs_open (me, path, O_WRONLY, 0); if (fp == NULL) - return; + return 0; if (!strcmp (fp->entry->inode->local_filename, local)) { fp->entry->inode->has_changed = has_changed; fp->archive->fd_usage--; diff --git a/vfs/undelfs.c b/vfs/undelfs.c index d746bd18d..da9003c2f 100644 --- a/vfs/undelfs.c +++ b/vfs/undelfs.c @@ -338,8 +338,7 @@ undelfs_readdir (void *vfs_info) char *dirent_dest; if (vfs_info != fs){ - message_1s (1, _(" delfs: internal error "), - _(" vfs_info is not fs! ")); + message_1s (1, undelfserr, _(" vfs_info is not fs! ")); return NULL; } if (readdir_ptr == num_delarray) @@ -387,7 +386,7 @@ undelfs_open (vfs *me, char *fname, int flags, int mode) { char *file, *f; ino_t inode, i; - undelfs_file *p; + undelfs_file *p = 0; /* Only allow reads on this file system */ undelfs_get_path (fname, &file, &f); @@ -669,6 +668,16 @@ undelfs_free(vfsid id) undelfs_shutdown (); } +#ifdef ENABLE_NLS +static int +undelfs_init(vfs *me) { + undelfserr = _(undelfserr); + return 1; +} +#else +#define undelfs_init NULL +#endif + vfs vfs_undelfs_ops = { NULL, /* This is place of next pointer */ N_("Undelete filesystem for ext2"), @@ -676,7 +685,7 @@ vfs vfs_undelfs_ops = { "undel:", /* prefix */ NULL, /* data */ 0, /* errno */ - NULL, + undelfs_init, NULL, NULL, /* fill_names */ NULL, diff --git a/vfs/vfs.c b/vfs/vfs.c index aed3ca39c..3731c02ee 100644 --- a/vfs/vfs.c +++ b/vfs/vfs.c @@ -5,6 +5,8 @@ 1995 Jakub Jelinek 1998 Pavel Machek + $Id$ + This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of @@ -355,13 +357,12 @@ vfs_stamp (vfs *v, vfsid id) void vfs_rm_parents (struct vfs_stamping *stamp) { - struct vfs_stamping *st2, *st3; + struct vfs_stamping *parent; - if (stamp){ - for (st2 = stamp, st3 = st2->parent; st3 != NULL; st2 = st3, st3 = st3->parent) - g_free (st2); - - g_free (st2); + while (stamp) { + parent = stamp->parent; + g_free (stamp); + stamp = parent; } } @@ -1598,10 +1599,10 @@ int vfs_parse_filedate(int idx, time_t *t) if (is_num (idx)) { if(is_time(columns[idx], &tim) || (got_year = is_year(columns[idx], &tim))) { - idx++; + idx++; /* This is a special case for ctime() or Mon DD YYYY hh:mm */ - if(is_num (idx) && + if(is_num (idx) && (columns[idx+1][0]) && ((got_year = is_year(columns[idx], &tim)) || is_time(columns[idx], &tim))) idx++; /* time & year or reverse */ } /* only time or date */