From 2538dbfdd35feb3cf5778cf18b5790afcba9647d Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Mon, 11 Nov 2002 07:35:08 +0000 Subject: [PATCH] * file.c (panel_get_file): Make static. * filegui.h: Eliminate use of WANT_WIDGETS. * setup.h: Likewise. * menu.h: Declare struct WMenu. * main.h: Don't include menu.h, use forward declaration. --- src/ChangeLog | 6 ++++++ src/file.c | 2 +- src/filegui.h | 8 -------- src/main.c | 2 +- src/main.h | 5 +++-- src/menu.h | 2 +- src/panel.h | 2 +- src/setup.c | 4 ++-- src/setup.h | 11 ++++------- 9 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 60c170897..0778b201f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2002-11-11 Pavel Roskin + * file.c (panel_get_file): Make static. + * filegui.h: Eliminate use of WANT_WIDGETS. + * setup.h: Likewise. + * menu.h: Declare struct WMenu. + * main.h: Don't include menu.h, use forward declaration. + * dlg.h: Move movefn definition ... * win.h: ... where it's used. Remove unused definitions. * win.c: Remove unused code. diff --git a/src/file.c b/src/file.c index efe074fc0..81c2e9f97 100644 --- a/src/file.c +++ b/src/file.c @@ -1554,7 +1554,7 @@ erase_dir_iff_empty (FileOpContext *ctx, char *s) /* {{{ Panel operate routines */ /* Returns currently selected file or the first marked file if there is one */ -char * +static char * panel_get_file (WPanel *panel, struct stat *stat_buf) { int i; diff --git a/src/filegui.h b/src/filegui.h index 9a8f57c00..51486f8cb 100644 --- a/src/filegui.h +++ b/src/filegui.h @@ -1,14 +1,6 @@ #ifndef __FILEGUI_H #define __FILEGUI_H -/* - * GUI callback routines - */ - void fmd_init_i18n (int force); -#ifdef WANT_WIDGETS -char *panel_get_file (WPanel *panel, struct stat *stat_buf); -#endif - #endif diff --git a/src/main.c b/src/main.c index 489e01010..4824149fe 100644 --- a/src/main.c +++ b/src/main.c @@ -109,7 +109,7 @@ WPanel *right_panel; WTree *the_tree; /* The Menubar */ -WMenu *the_menubar; +struct WMenu *the_menubar; /* Pointers to the selected and unselected panel */ WPanel *current_panel = NULL; diff --git a/src/main.h b/src/main.h index d26811de4..43a468991 100644 --- a/src/main.h +++ b/src/main.h @@ -158,8 +158,9 @@ extern WLabel *the_hint; extern Dlg_head *midnight_dlg; extern Dlg_head *edit_dlg; extern WLabel *process_status; -#include "menu.h" -extern WMenu *the_menubar; + +struct WMenu; +extern struct WMenu *the_menubar; #endif /* WANT_WIDGETS */ void edition_pre_exec (void); diff --git a/src/menu.h b/src/menu.h index bd7568283..2f5fe3316 100644 --- a/src/menu.h +++ b/src/menu.h @@ -31,7 +31,7 @@ typedef sMenu *Menu; extern int menubar_visible; /* The button bar menu */ -typedef struct { +typedef struct WMenu { Widget widget; int active; /* If the menubar is in use */ diff --git a/src/panel.h b/src/panel.h index c4a8ce6b7..27d382ef7 100644 --- a/src/panel.h +++ b/src/panel.h @@ -33,7 +33,7 @@ enum panel_display_enum { struct format_e; struct hist_entry; -typedef struct { +typedef struct WPanel { Widget widget; dir_list dir; /* Directory contents */ diff --git a/src/setup.c b/src/setup.c index 6e7ee28b8..4e7f852c0 100644 --- a/src/setup.c +++ b/src/setup.c @@ -216,7 +216,7 @@ static const struct { }; void -panel_save_setup (WPanel *panel, char *section) +panel_save_setup (struct WPanel *panel, char *section) { char buffer [BUF_TINY]; int i; @@ -299,7 +299,7 @@ panel_save_type (char *section, int type) } void -save_panel_types () +save_panel_types (void) { int type; diff --git a/src/setup.h b/src/setup.h index 174bbf766..cf91eca4e 100644 --- a/src/setup.h +++ b/src/setup.h @@ -7,17 +7,14 @@ void save_configure (void); void load_setup (void); void save_setup (void); void done_setup (void); -#ifdef WANT_WIDGETS -void panel_save_setup (WPanel *panel, char *section); -void panel_load_setup (WPanel *panel, char *section); -#else -void panel_save_setup (); -void panel_load_setup (); -#endif void load_key_defs (void); void save_panel_types (void); char *load_anon_passwd (void); +struct WPanel; +void panel_save_setup (struct WPanel *panel, char *section); +void panel_load_setup (struct WPanel *panel, char *section); + extern char *profile_name; extern char *global_profile_name;