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 #ifdef USE_INTERNAL_EDIT
46 extern int edit (const char *file
, int line
);
47 extern int option_word_wrap_line_length
;
48 extern int edit_key_emulation
;
49 extern int option_tab_spacing
;
50 extern int option_fill_tabs_with_spaces
;
51 extern int option_return_does_auto_indent
;
52 extern int option_backspace_through_tabs
;
53 extern int option_fake_half_tabs
;
54 extern int option_save_mode
;
55 extern int option_backup_ext_int
;
56 extern int option_auto_para_formatting
;
57 extern int option_typewriter_wrap
;
58 extern int edit_confirm_save
;
59 extern int option_syntax_highlighting
;
60 #endif /* ! USE_INTERNAL_EDIT */
61 extern int fast_reload_w
;
62 extern int clear_before_exec
;
63 extern int mou_auto_repeat
;
64 extern char *other_dir
;
65 extern int mouse_move_pages
;
66 extern int mouse_move_pages_viewer
;
69 extern int source_codepage
;
70 extern int display_codepage
;
72 extern int eight_bit_clean
;
73 extern int full_eight_bits
;
74 #endif /* !HAVE_CHARSET */
76 extern int confirm_view_dir
;
77 extern int fast_refresh
;
78 extern int navigate_with_arrows
;
79 extern int force_ugly_line_drawing
;
80 extern int advanced_chfns
;
81 extern int drop_menus
;
82 extern int cd_symlinks
;
83 extern int show_all_if_ambiguous
;
84 extern int slow_terminal
;
85 extern int update_prompt
; /* To comunicate with subshell */
86 extern int confirm_delete
;
87 extern int confirm_execute
;
88 extern int confirm_exit
;
89 extern int confirm_overwrite
;
90 extern int iconify_on_exec
;
91 extern int force_colors
;
92 extern int boot_current_is_left
;
95 extern int use_file_to_check_type
;
97 extern int vfs_use_limit
;
98 extern int alternate_plus_minus
;
99 extern int only_leading_plus_minus
;
100 extern int ftpfs_directory_timeout
;
101 extern int output_starts_shell
;
102 extern int midnight_shutdown
;
103 extern char search_buffer
[256];
104 extern char cmd_buf
[512];
105 extern char *cmdline_geometry
;
107 /* The menu panels */
108 extern int is_right
; /* If the selected menu was the right */
109 #define MENU_PANEL (is_right ? right_panel : left_panel)
110 #define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
112 /* Useful macros to avoid too much typing */
113 #define cpanel get_current_panel()
114 #define opanel get_other_panel()
116 typedef void (*key_callback
) ();
117 /* FIXME: We have to leave this type ambiguous, because `key_callback'
118 is used both for functions that take an argument and ones that don't.
119 That ought to be cleared up. */
121 /* The keymaps are of this type */
127 void update_panels (int force_update
, char *current_file
);
128 void create_panels (void);
129 void repaint_screen (void);
130 void outrefresh_screen (void);
131 void suspend_cmd (void);
132 void do_update_prompt (void);
134 extern char control_file
[];
137 /* directory specified on command line for startup */
138 extern char *this_dir
;
141 void restore_console (void);
148 int do_cd (char *new_dir
, enum cd_enum cd_type
); /* For find.c */
149 void change_panel (void);
150 void init_sigchld (void); /* For subshell.c */
151 int load_prompt (int fd
, void *unused
);
152 void save_cwds_stat (void);
153 void copy_prog_name (void);
154 int quiet_quit_cmd (void); /* For cmd.c and command.c */
157 void untouch_bar (void);
158 void touch_bar (void);
159 void load_hint (void);
161 void print_vfs_message(char *msg
, ...)
162 __attribute__ ((format (printf
, 1, 2)));
164 void edit_user_menu_cmd (void);
167 extern char *mc_home
;
168 char *get_mc_lib_dir (void);
170 int maybe_cd (int char_code
, int move_up_dir
);
171 void do_possible_cd (char *dir
);
174 extern WButtonBar
*the_bar
;
175 extern WLabel
*the_prompt
;
176 extern WLabel
*the_hint
;
177 extern Dlg_head
*midnight_dlg
;
178 extern Dlg_head
*edit_dlg
;
179 extern WLabel
*process_status
;
181 extern WMenu
*the_menubar
;
182 #endif /* WANT_WIDGETS */
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);
194 # define MC_BASE "/.mc/"
197 /* Back hack to define the following routines only if the client code
198 * has included panel.h
202 #ifndef PANEL_DEFS_DONE
203 #define PANEL_DEFS_DONE
204 void directory_history_add (WPanel
*panel
, char *s
);
205 int do_panel_cd (WPanel
*panel
, char *new_dir
, enum cd_enum cd_type
);
206 void update_one_panel_widget (WPanel
*panel
, int force_update
, char *current_file
);
207 int midnight_callback (struct Dlg_head
*h
, int id
, int msg
);
208 #endif /* !PANEL_DEFS_DONE */
209 #endif /* __PANEL_H */
211 #endif /* !__MAIN_H */