* fish.c (fish_fill_names): New function, replacement for
generic vfs_s_fill_names() which didn't work right with fish.
Этот коммит содержится в:
родитель
ead99974fb
Коммит
b68a8a5ca8
@ -1,5 +1,8 @@
|
|||||||
2002-07-19 Pavel Roskin <proski@gnu.org>
|
2002-07-19 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* fish.c (fish_fill_names): New function, replacement for
|
||||||
|
generic vfs_s_fill_names() which didn't work right with fish.
|
||||||
|
|
||||||
* undelfs.c (undelfs_opendir): Use parametrized messages without
|
* undelfs.c (undelfs_opendir): Use parametrized messages without
|
||||||
VFS name for success and failure.
|
VFS name for success and failure.
|
||||||
* fish.c (dir_load): Use new messages from undelfs.c, indicate
|
* fish.c (dir_load): Use new messages from undelfs.c, indicate
|
||||||
|
33
vfs/fish.c
33
vfs/fish.c
@ -831,6 +831,37 @@ static struct vfs_s_data fish_data = {
|
|||||||
linear_close
|
linear_close
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
fish_fill_names (vfs *me, void (*func)(char *))
|
||||||
|
{
|
||||||
|
struct vfs_s_super * super = fish_data.supers;
|
||||||
|
char *flags;
|
||||||
|
char *name;
|
||||||
|
|
||||||
|
while (super){
|
||||||
|
switch (SUP.flags & (FISH_FLAG_RSH | FISH_FLAG_COMPRESSED)) {
|
||||||
|
case 0:
|
||||||
|
flags = "";
|
||||||
|
break;
|
||||||
|
case FISH_FLAG_RSH:
|
||||||
|
flags = ":r";
|
||||||
|
break;
|
||||||
|
case FISH_FLAG_COMPRESSED:
|
||||||
|
flags = ":C";
|
||||||
|
break;
|
||||||
|
case FISH_FLAG_RSH | FISH_FLAG_COMPRESSED:
|
||||||
|
flags = "";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
name = g_strconcat ("/#sh:", SUP.user, "@", SUP.host, flags,
|
||||||
|
"/", SUP.cwdir, NULL);
|
||||||
|
(*func)(name);
|
||||||
|
g_free (name);
|
||||||
|
super = super->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
vfs vfs_fish_ops = {
|
vfs vfs_fish_ops = {
|
||||||
NULL, /* This is place of next pointer */
|
NULL, /* This is place of next pointer */
|
||||||
"fish",
|
"fish",
|
||||||
@ -840,7 +871,7 @@ vfs vfs_fish_ops = {
|
|||||||
0, /* errno */
|
0, /* errno */
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
vfs_s_fill_names,
|
fish_fill_names,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
vfs_s_open,
|
vfs_s_open,
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user