1
1

Added a typedef for a function. Added more const-ness to the function arguments.

Этот коммит содержится в:
Roland Illig 2004-08-16 16:34:11 +00:00
родитель 748279de99
Коммит db3f21b702
9 изменённых файлов: 12 добавлений и 11 удалений

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

@ -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