3 /* Toggling functions */
4 void toggle_eight_bit (void);
5 void toggle_clean_exec (void);
6 void toggle_show_backup (void);
7 void toggle_show_hidden (void);
8 void toggle_show_mini_status (void);
9 void toggle_align_extensions (void);
10 void toggle_mix_all_files (void);
11 void toggle_fast_reload (void);
12 void toggle_confirm_delete (void);
21 #define UP_ONLY_CURRENT 2
23 #define UP_KEEPSEL (char *) -1
26 extern volatile int quit
;
28 void mc_tree_store_load (void);
29 void mc_tree_store_save (void);
31 /* Execute functions: the base and the routines that use it */
32 void do_execute (const char *shell
, const char *command
, int internal_command
);
33 #define execute_internal(command,args) do_execute (command, args, 1)
35 /* Execute functions that use the shell to execute */
36 void shell_execute (char *command
, int flags
);
37 void execute (char *command
);
39 /* This one executes a shell */
42 void subshell_chdir (char *command
);
44 /* See main.c for details on these variables */
45 extern int mark_moves_down
;
47 extern int pause_after_run
;
48 extern int auto_save_setup
;
49 extern int use_internal_view
;
50 extern int use_internal_edit
;
51 #ifdef USE_INTERNAL_EDIT
52 extern int option_word_wrap_line_length
;
53 extern int edit_key_emulation
;
54 extern int option_tab_spacing
;
55 extern int option_fill_tabs_with_spaces
;
56 extern int option_return_does_auto_indent
;
57 extern int option_backspace_through_tabs
;
58 extern int option_fake_half_tabs
;
59 extern int option_save_mode
;
60 extern int option_backup_ext_int
;
61 extern int option_auto_para_formatting
;
62 extern int option_typewriter_wrap
;
63 extern int edit_confirm_save
;
64 extern int option_syntax_highlighting
;
65 #endif /* ! USE_INTERNAL_EDIT */
66 extern int fast_reload_w
;
67 extern int clear_before_exec
;
68 extern int mou_auto_repeat
;
69 extern char *other_dir
;
70 extern int mouse_move_pages
;
71 extern int mouse_move_pages_viewer
;
72 extern int eight_bit_clean
;
73 extern int full_eight_bits
;
74 extern int confirm_view_dir
;
75 extern int fast_refresh
;
76 extern int navigate_with_arrows
;
77 extern int advanced_chfns
;
78 extern int drop_menus
;
79 extern int cd_symlinks
;
80 extern int show_all_if_ambiguous
;
81 extern int slow_terminal
;
82 extern int update_prompt
; /* To comunicate with subshell */
83 extern int confirm_delete
;
84 extern int confirm_execute
;
85 extern int confirm_exit
;
86 extern int confirm_overwrite
;
87 extern int iconify_on_exec
;
88 extern int force_colors
;
89 extern int boot_current_is_left
;
92 extern int use_file_to_check_type
;
94 extern int vfs_use_limit
;
95 extern int alternate_plus_minus
;
96 extern int only_leading_plus_minus
;
97 extern int ftpfs_directory_timeout
;
98 extern int output_starts_shell
;
99 extern int midnight_shutdown
;
100 extern char search_buffer
[256];
101 extern char cmd_buf
[512];
102 extern int run_desktop
;
105 #define MENU_PANEL get_current_panel ()
106 #define SELECTED_IS_PANEL 1
108 /* The menu panels */
109 extern int is_right
; /* If the selected menu was the right */
110 #define MENU_PANEL (is_right ? right_panel : left_panel)
111 #define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
114 /* Useful macros to avoid too much typing */
115 #define cpanel get_current_panel()
116 #define opanel get_other_panel()
118 typedef void (*key_callback
) ();
119 /* FIXME: We have to leave this type ambiguous, because `key_callback'
120 is used both for functions that take an argument and ones that don't.
121 That ought to be cleared up. */
123 /* The keymaps are of this type */
129 void update_panels (int force_update
, char *current_file
);
130 void create_panels (void);
131 void repaint_screen (void);
132 void outrefresh_screen (void);
133 void suspend_cmd (void);
134 void do_update_prompt (void);
136 extern char control_file
[];
139 /* FIXME: remove this when using slang */
140 extern const int status_using_ncurses
;
143 void restore_console (void);
150 int do_cd (char *new_dir
, enum cd_enum cd_type
); /* For find.c */
151 void change_panel (void);
152 void init_sigchld (void); /* For subshell.c */
153 int load_prompt (int fd
, void *unused
);
154 void save_cwds_stat (void);
155 void copy_prog_name (void);
156 int quiet_quit_cmd (void); /* For cmd.c and command.c */
159 void untouch_bar (void);
160 void touch_bar (void);
161 void load_hint (void);
163 void print_vfs_message(char *msg
, ...);
166 extern char *mc_home
;
168 int maybe_cd (int char_code
, int move_up_dir
);
169 void do_possible_cd (char *dir
);
172 extern WButtonBar
*the_bar
;
173 extern WLabel
*the_prompt
;
174 extern WLabel
*the_hint
;
175 extern Dlg_head
*midnight_dlg
;
176 extern WLabel
*process_status
;
178 extern WMenu
*the_menubar
;
180 extern Dlg_head
*midnight_dlg
;
184 void edition_pre_exec (void);
185 void edition_post_exec (void);
187 void done_menu (void);
188 void init_menu (void);
189 void exec_shell (void);
191 void main_corba_register_server (void);
196 # define MC_BASE "/.mc/"
200 /* Back hack to define the following routines only if the client code
201 * has included panel.h
205 #ifndef PANEL_DEFS_DONE
206 #define PANEL_DEFS_DONE
207 void directory_history_add (WPanel
*panel
, char *s
);
208 int do_panel_cd (WPanel
*panel
, char *new_dir
, enum cd_enum cd_type
);
209 void update_one_panel_widget (WPanel
*panel
, int force_update
, char *current_file
);
210 int midnight_callback (struct Dlg_head
*h
, int id
, int msg
);