Add a global file to list directories that are slow (afs, etc)

Fixes for SuSE compilation.
This commit is contained in:
Miguel de Icaza 1999-02-25 04:21:30 +00:00
parent a57560f5dd
commit ad80925039
10 changed files with 244 additions and 204 deletions

View File

@ -25,6 +25,7 @@ suppbindir = $(libdir)/bin
gnewdir = $(prefix)/share/mc/templates
tidir = $(libdir)/term
extfsdir = $(libdir)/extfs
confdir = $(prefix)/etc
datadir = @datadir@
icondir = $(datadir)/pixmaps/mc
gnomeicondir = @gnomeicondir@
@ -59,7 +60,7 @@ AWK_VAR_OPTION = @AWK_VAR_OPTION@
# No way, to make make happy (except GNU), we cannot use := to append
# something to these, so that's why there is a leading _
XCFLAGS = @CFLAGS@
XCPPFLAGS = @CPPFLAGS@ @MCCPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC) -DLOCALEDIR=\""$(localedir)/"\"
XCPPFLAGS = @CPPFLAGS@ @MCCPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC) -DLOCALEDIR=\""$(localedir)/"\" -DCONFDIR=\""$(confdir)/"\"
XLDFLAGS = @LDFLAGS@
XDEFS = @DEFS@
XLIBS = @LIBS@

View File

@ -18,7 +18,7 @@ LIBFILES_CONST = mc.hint mc.lib mc.menu
TIFILES = README.xterm linux.ti xterm.ad xterm.ti ansi.ti vt100.ti xterm.tcap
DISTLIB = $(LIBFILES_IN) $(LIBFILES_CONST) $(TIFILES) \
Makefile.in tdiff xnc.hlp ncurses.h mc.sh mc.csh mcserv.init \
mcserv.pamd tkmc.wmconfig mc.ext.in.qnx.diff
mcserv.pamd tkmc.wmconfig mc.ext.in.qnx.diff mc.global
all:
@ -44,6 +44,7 @@ install:
do $(INSTALL_DATA) $(builddir)/lib/$$I $(DESTDIR)$(libdir)/$$I; done
for I in $(TIFILES); \
do $(INSTALL_DATA) $(srcdir)/$$I $(DESTDIR)$(tidir)/$$I; done
$(INSTALL_DATA) $(srcdir)/special.dirs $(DESTDIR)$(confdir)
uninstall:
for I in $(LIBFILES_OUT) $(LIBFILES_CONST); \

2
lib/mc.global Normal file
View File

@ -0,0 +1,2 @@
[Special dirs]
list=/afs,/coda,/:,/...,/net

372
po/mc.pot

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,12 @@
1999-02-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
* file.c: Moved FileCopyMode here (thanks to Wolfgang Scherer for
pointing this out) and made it a typedef.
* treestore.c (process_special_dirs): New function.
(should_skip_directory): Load the settings from the global
special.dirs file and from the
* util.c: Test for glibc/linux and if so, do not use getwd, but
getcwd as on this system it is better than popen ("pwd").

View File

@ -156,6 +156,14 @@ char *op_names [3] = {
N_(" Delete ")
};
typedef enum {
RECURSIVE_YES,
RECURSIVE_NO,
RECURSIVE_ALWAYS,
RECURSIVE_NEVER,
RECURSIVE_ABORT
} FileCopyMode;
static int recursive_erase (FileOpContext *ctx, char *s,
long *progress_count, double *progress_bytes);

View File

@ -4,14 +4,6 @@
#include "fileopctx.h"
#include "background.h"
enum {
RECURSIVE_YES,
RECURSIVE_NO,
RECURSIVE_ALWAYS,
RECURSIVE_NEVER,
RECURSIVE_ABORT
} FileCopyMode;
extern int know_not_what_am_i_doing;
struct link;

View File

@ -335,8 +335,14 @@ int boot_current_is_left = 1;
/* Used for keeping track of the original stdout */
int stdout_fd = 0;
/*
* Ugh. Pavel, you shell hack in sfs is BAD.
* We need to kill shell from vfs
*/
#ifndef USE_VFS
/* The user's shell */
char *shell;
#endif
/* mc_home: The home of MC */
char *mc_home;

View File

@ -32,7 +32,13 @@
/* We need this for `regex.h', and perhaps for the Emacs include files. */
#include <sys/types.h>
#if defined(__GLIBC__)
# if __GLIBC__ > 1
# define ELIDE_CODE
# endif
#endif
#ifndef ELIDE_CODE
/* This is for other GNU distributions with internationalized messages. */
#if HAVE_LIBINTL_H || defined (_LIBC)
# include <libintl.h>
@ -5406,6 +5412,7 @@ regfree (preg)
}
#endif /* not emacs */
#endif /* !defined(elide_code) */
/*
Local variables:

View File

@ -689,26 +689,34 @@ tree_store_end_check (void)
tree_store_set_freeze (FALSE);
}
static void
process_special_dirs (GList **special_dirs, char *file)
{
char *token;
char *buffer = g_malloc (4096);
char *s;
GetPrivateProfileString ("Special dirs", "list",
"", buffer, 4096, file);
s = buffer;
while ((token = strtok (s, ",")) != NULL){
*special_dirs = g_list_prepend (*special_dirs, g_strdup (token));
s = NULL;
}
}
gboolean
should_skip_directory (char *dir)
{
static GList *special_dirs, *l;
static GList *special_dirs;
GList *l;
static int loaded;
if (loaded == 0){
char *token;
char *buffer = g_malloc (4096);
char *s;
loaded = 1;
setup_init ();
GetPrivateProfileString ("Special dirs", "list",
"/afs,/coda,/:,/...,/net", buffer, 4096, profile_name);
s = buffer;
while ((token = strtok (s, ",")) != NULL){
special_dirs = g_list_prepend (special_dirs, g_strdup (token));
s = NULL;
}
process_special_dirs (&special_dirs, profile_name);
process_special_dirs (&special_dirs, CONFDIR "mc.global");
}
for (l = special_dirs; l; l = l->next){