diff --git a/src/ChangeLog b/src/ChangeLog index 9af8a34a9..3700565a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2003-10-24 Pavel Roskin + * fileopctx.h: Define struct FileOpContext. + * background.h: Avoid conditional declarations. + * dir.h: Eliminate DIR_H_INCLUDE_HANDLE_DIRENT. Adjust all callers. Remove unused code. * dlg.h: Remove unused code. diff --git a/src/background.c b/src/background.c index 97ed814a4..150e89dbd 100644 --- a/src/background.c +++ b/src/background.c @@ -118,7 +118,7 @@ unregister_task_running (pid_t pid, int fd) * -1 on failure */ int -do_background (FileOpContext *ctx, char *info) +do_background (struct FileOpContext *ctx, char *info) { int comm[2]; /* control connection stream */ pid_t pid; @@ -414,7 +414,7 @@ parent_call_header (void *routine, int argc, enum ReturnType type, FileOpContext } int -parent_call (void *routine, FileOpContext *ctx, int argc, ...) +parent_call (void *routine, struct FileOpContext *ctx, int argc, ...) { va_list ap; int i; diff --git a/src/background.h b/src/background.h index ea0b364cb..f8199d06c 100644 --- a/src/background.h +++ b/src/background.h @@ -30,11 +30,9 @@ extern struct TaskList *task_list; void tell_parent (int msg); -/* fileopctx.h must be included for FileOpContext to be defined */ -#ifdef FILEOPCTX_H -int do_background (FileOpContext *ctx, char *info); -int parent_call (void *routine, FileOpContext *ctx, int argc, ...); -#endif /* FILEOPCTX_H */ +struct FileOpContext; +int do_background (struct FileOpContext *ctx, char *info); +int parent_call (void *routine, struct FileOpContext *ctx, int argc, ...); void unregister_task_running (pid_t, int fd); diff --git a/src/fileopctx.h b/src/fileopctx.h index 84222ab46..cb092639d 100644 --- a/src/fileopctx.h +++ b/src/fileopctx.h @@ -19,7 +19,7 @@ typedef int (*mc_stat_fn) (char *filename, struct stat *buf); /* This structure describes a context for file operations. It is used to update * the progress windows and pass around options. */ -typedef struct { +typedef struct FileOpContext { /* The estimated time of arrival in seconds */ double eta_secs;