Added a typedef for a function. Added more const-ness to the function arguments.
Этот коммит содержится в:
родитель
748279de99
Коммит
db3f21b702
@ -964,7 +964,7 @@ vfs_s_retrieve_file (struct vfs_class *me, struct vfs_s_inode *ino)
|
||||
/* ------------------------------- mc support ---------------------------- */
|
||||
|
||||
static void
|
||||
vfs_s_fill_names (struct vfs_class *me, void (*func)(char *))
|
||||
vfs_s_fill_names (struct vfs_class *me, fill_names_f func)
|
||||
{
|
||||
struct vfs_s_super *a = MEDATA->supers;
|
||||
char *name;
|
||||
|
@ -104,7 +104,7 @@ static char extfs_need_archive [MAXEXTFS];
|
||||
static int extfs_no = 0;
|
||||
|
||||
static void
|
||||
extfs_fill_names (struct vfs_class *me, void (*func) (char *))
|
||||
extfs_fill_names (struct vfs_class *me, fill_names_f func)
|
||||
{
|
||||
struct archive *a = first_archive;
|
||||
char *name;
|
||||
|
@ -846,7 +846,7 @@ fish_fh_open (struct vfs_class *me, struct vfs_s_fh *fh, int flags,
|
||||
}
|
||||
|
||||
static void
|
||||
fish_fill_names (struct vfs_class *me, void (*func)(char *))
|
||||
fish_fill_names (struct vfs_class *me, fill_names_f func)
|
||||
{
|
||||
struct vfs_s_super *super = MEDATA->supers;
|
||||
char *flags;
|
||||
|
@ -1653,7 +1653,7 @@ ftpfs_done (struct vfs_class *me)
|
||||
}
|
||||
|
||||
static void
|
||||
ftpfs_fill_names (struct vfs_class *me, void (*func)(char *))
|
||||
ftpfs_fill_names (struct vfs_class *me, fill_names_f func)
|
||||
{
|
||||
struct vfs_s_super *super = MEDATA->supers;
|
||||
char *name;
|
||||
|
@ -90,7 +90,7 @@ mcfs_get_host_and_username (const char *path, char **host, char **user,
|
||||
}
|
||||
|
||||
static void
|
||||
mcfs_fill_names (struct vfs_class *me, void (*func) (char *))
|
||||
mcfs_fill_names (struct vfs_class *me, fill_names_f func)
|
||||
{
|
||||
int i;
|
||||
char *name;
|
||||
|
@ -275,7 +275,7 @@ static void sfs_free (vfsid id)
|
||||
g_free (cur);
|
||||
}
|
||||
|
||||
static void sfs_fill_names (struct vfs_class *me, void (*func)(char *))
|
||||
static void sfs_fill_names (struct vfs_class *me, fill_names_f func)
|
||||
{
|
||||
struct cachedfile *cur = head;
|
||||
|
||||
|
@ -322,7 +322,7 @@ smbfs_init (struct vfs_class * me)
|
||||
}
|
||||
|
||||
static void
|
||||
smbfs_fill_names (struct vfs_class *me, void (*func)(char *))
|
||||
smbfs_fill_names (struct vfs_class *me, fill_names_f func)
|
||||
{
|
||||
int i;
|
||||
char *path;
|
||||
|
@ -897,7 +897,6 @@ mc_ungetlocalcopy (const char *pathname, const char *local, int has_changed)
|
||||
(*vfs->ungetlocalcopy)(vfs, path, local, has_changed) :
|
||||
mc_def_ungetlocalcopy (vfs, path, local, has_changed);
|
||||
g_free (path);
|
||||
g_free (local);
|
||||
return return_value;
|
||||
}
|
||||
|
||||
@ -956,7 +955,7 @@ vfs_shut (void)
|
||||
* and handles them to an upper layer
|
||||
*/
|
||||
void
|
||||
vfs_fill_names (void (*func)(char *))
|
||||
vfs_fill_names (fill_names_f func)
|
||||
{
|
||||
struct vfs_class *vfs;
|
||||
|
||||
|
@ -13,6 +13,8 @@ struct vfs_stamping;
|
||||
#define VFSF_LOCAL 1 /* Class is local (not virtual) filesystem */
|
||||
#define VFSF_NOLINKS 2 /* Hard links not supported */
|
||||
|
||||
typedef void (*fill_names_f) (const char *);
|
||||
|
||||
struct vfs_class {
|
||||
struct vfs_class *next;
|
||||
char *name; /* "FIles over SHell" */
|
||||
@ -23,7 +25,7 @@ struct vfs_class {
|
||||
|
||||
int (*init) (struct vfs_class *me);
|
||||
void (*done) (struct vfs_class *me);
|
||||
void (*fill_names) (struct vfs_class *me, void (*)(char *));
|
||||
void (*fill_names) (struct vfs_class *me, fill_names_f);
|
||||
|
||||
int (*which) (struct vfs_class *me, /*FIXME:const*/ char *path);
|
||||
|
||||
@ -123,7 +125,7 @@ vfs_file_is_local (const char *filename)
|
||||
return vfs_file_class_flags (filename) & VFSF_LOCAL;
|
||||
}
|
||||
|
||||
void vfs_fill_names (void (*)(char *));
|
||||
void vfs_fill_names (fill_names_f);
|
||||
char *vfs_translate_url (const char *);
|
||||
|
||||
#ifdef USE_NETCODE
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user