1
1

2001-05-30 Ludovic Drolez <ludovic.drolez@freealter.com>

* sfs.c (sfs_init): Don't hardcode location of sfs.ini,
	use mc_home to make mc relocatable.
Этот коммит содержится в:
Andrew V. Samoilov 2001-05-30 12:05:50 +00:00
родитель 823c83aa9e
Коммит f52cfa5607
2 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,8 @@
2001-05-30 Ludovic Drolez <ludovic.drolez@freealter.com>
* sfs.c (sfs_init): Don't hardcode location of sfs.ini,
use mc_home to make mc relocatable.
2001-05-28 Andrew V. Samoilov <sav@bcs.zp.ua>
* sfs.c (shell): Variable moved to ...

Просмотреть файл

@ -291,12 +291,18 @@ static int sfs_ungetlocalcopy (vfs *me, char *path, char *local, int has_changed
static int sfs_init (vfs *me)
{
FILE *cfg = fopen (LIBDIR "extfs/sfs.ini", "r");
char *mc_sfsini;
FILE *cfg;
mc_sfsini = concat_dir_and_file (mc_home, "extfs/sfs.ini");
cfg = fopen (mc_sfsini, "r");
if (!cfg){
fprintf (stderr, _("Warning: %sextfs/sfs.ini not found\n"), LIBDIR);
fprintf (stderr, _("Warning: %s not found\n"), mc_sfsini);
free (mc_sfsini);
return 0;
}
free (mc_sfsini);
sfs_no = 0;
while (sfs_no < MAXFS){
@ -304,7 +310,7 @@ static int sfs_init (vfs *me)
char *c, *semi = NULL, flags = 0;
int i;
if (!fgets (key, 250, cfg))
if (!fgets (key, sizeof (key), cfg))
break;
if (*key == '#')
@ -326,7 +332,7 @@ static int sfs_init (vfs *me)
}
c = semi + 1;
while ((*c != ' ') && (*c != 9)) {
while ((*c != ' ') && (*c != '\t')) {
switch (*c) {
case '1': flags |= F_1; break;
case '2': flags |= F_2; break;