3 /* Toggling functions */
4 void toggle_fast_reload (void);
5 void toggle_mix_all_files (void);
6 void toggle_show_backup (void);
7 void toggle_show_hidden (void);
16 #define UP_ONLY_CURRENT 2
18 #define UP_KEEPSEL (char *) -1
21 extern volatile int quit
;
23 /* Execute functions: the base and the routines that use it */
24 void do_execute (const char *shell
, const char *command
, int internal_command
);
25 #define execute_internal(command,args) do_execute (command, args, 1)
27 /* Execute functions that use the shell to execute */
28 void shell_execute (char *command
, int flags
);
29 void execute (char *command
);
31 /* This one executes a shell */
32 void exec_shell (void);
34 void subshell_chdir (char *command
);
36 /* See main.c for details on these variables */
37 extern int mark_moves_down
;
39 extern int pause_after_run
;
40 extern int auto_save_setup
;
41 extern int use_internal_view
;
42 extern int use_internal_edit
;
43 extern char *view_one_file
;
44 extern char *edit_one_file
;
45 extern int fast_reload_w
;
46 extern int clear_before_exec
;
47 extern int mou_auto_repeat
;
48 extern char *other_dir
;
49 extern int mouse_move_pages
;
52 extern int source_codepage
;
53 extern int display_codepage
;
55 extern int eight_bit_clean
;
56 extern int full_eight_bits
;
57 #endif /* !HAVE_CHARSET */
59 extern int confirm_view_dir
;
60 extern int fast_refresh
;
61 extern int navigate_with_arrows
;
62 extern int force_ugly_line_drawing
;
63 extern int drop_menus
;
64 extern int cd_symlinks
;
65 extern int show_all_if_ambiguous
;
66 extern int slow_terminal
;
67 extern int update_prompt
; /* To comunicate with subshell */
68 extern int confirm_delete
;
69 extern int confirm_execute
;
70 extern int confirm_exit
;
71 extern int confirm_overwrite
;
72 extern int force_colors
;
73 extern int boot_current_is_left
;
76 extern int use_file_to_check_type
;
78 extern int vfs_use_limit
;
79 extern int alternate_plus_minus
;
80 extern int only_leading_plus_minus
;
81 extern int output_starts_shell
;
82 extern int midnight_shutdown
;
83 extern char search_buffer
[256];
84 extern char cmd_buf
[512];
85 extern char *cmdline_geometry
;
87 /* Ugly hack in order to distinguish between left and right panel in menubar */
88 extern int is_right
; /* If the selected menu was the right */
89 #define MENU_PANEL (is_right ? right_panel : left_panel)
90 #define MENU_PANEL_IDX (is_right ? 1 : 0)
91 #define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
93 typedef void (*key_callback
) ();
94 /* FIXME: We have to leave this type ambiguous, because `key_callback'
95 is used both for functions that take an argument and ones that don't.
96 That ought to be cleared up. */
98 /* The keymaps are of this type */
104 void update_panels (int force_update
, char *current_file
);
105 void create_panels (void);
106 void repaint_screen (void);
107 void outrefresh_screen (void);
108 void suspend_cmd (void);
109 void do_update_prompt (void);
113 /* directory specified on command line for startup */
114 extern char *this_dir
;
117 void restore_console (void);
124 int do_cd (char *new_dir
, enum cd_enum cd_type
); /* For find.c */
125 void change_panel (void);
126 void init_sigchld (void); /* For subshell.c */
127 int load_prompt (int fd
, void *unused
);
128 void save_cwds_stat (void);
129 int quiet_quit_cmd (void); /* For cmd.c and command.c */
131 void untouch_bar (void);
132 void touch_bar (void);
133 void update_xterm_title_path (void);
134 void load_hint (int force
);
136 void print_vfs_message(char *msg
, ...)
137 __attribute__ ((format (printf
, 1, 2)));
140 extern char *mc_home
;
141 char *get_mc_lib_dir (void);
143 int maybe_cd (int char_code
, int move_up_dir
);
144 void do_possible_cd (char *dir
);
147 extern WButtonBar
*the_bar
;
148 extern WLabel
*the_prompt
;
149 extern WLabel
*the_hint
;
150 extern Dlg_head
*midnight_dlg
;
151 extern Dlg_head
*edit_dlg
;
152 extern WLabel
*process_status
;
155 extern struct WMenu
*the_menubar
;
156 #endif /* WANT_WIDGETS */
158 void edition_pre_exec (void);
159 void edition_post_exec (void);
161 void done_menu (void);
162 void init_menu (void);
167 # define MC_BASE "/.mc/"
168 #endif /* !NATIVE_WIN32 */
171 void directory_history_add (struct WPanel
*panel
, char *s
);
172 int do_panel_cd (struct WPanel
*panel
, char *new_dir
, enum cd_enum cd_type
);
174 #endif /* !__MAIN_H */