1998-02-27 07:54:42 +03:00
|
|
|
#ifndef __MAIN_H
|
|
|
|
#define __MAIN_H
|
|
|
|
/* Toggling functions */
|
2002-01-17 10:17:54 +03:00
|
|
|
void toggle_fast_reload (void);
|
|
|
|
void toggle_mix_all_files (void);
|
1998-02-27 07:54:42 +03:00
|
|
|
void toggle_show_backup (void);
|
|
|
|
void toggle_show_hidden (void);
|
|
|
|
|
|
|
|
enum {
|
|
|
|
RP_NOCLEAR,
|
|
|
|
RP_CLEAR
|
|
|
|
};
|
|
|
|
|
|
|
|
#define UP_OPTIMIZE 0
|
|
|
|
#define UP_RELOAD 1
|
|
|
|
#define UP_ONLY_CURRENT 2
|
|
|
|
|
|
|
|
#define UP_KEEPSEL (char *) -1
|
|
|
|
|
|
|
|
extern int quote;
|
|
|
|
extern volatile int quit;
|
|
|
|
|
|
|
|
/* Execute functions: the base and the routines that use it */
|
|
|
|
void do_execute (const char *shell, const char *command, int internal_command);
|
|
|
|
#define execute_internal(command,args) do_execute (command, args, 1)
|
|
|
|
|
|
|
|
/* Execute functions that use the shell to execute */
|
1998-04-24 05:08:06 +04:00
|
|
|
void shell_execute (char *command, int flags);
|
1998-02-27 07:54:42 +03:00
|
|
|
void execute (char *command);
|
|
|
|
|
|
|
|
/* This one executes a shell */
|
2001-06-15 01:21:25 +04:00
|
|
|
void exec_shell (void);
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
void subshell_chdir (char *command);
|
|
|
|
|
|
|
|
/* See main.c for details on these variables */
|
|
|
|
extern int mark_moves_down;
|
|
|
|
extern int auto_menu;
|
|
|
|
extern int pause_after_run;
|
|
|
|
extern int auto_save_setup;
|
|
|
|
extern int use_internal_view;
|
|
|
|
extern int use_internal_edit;
|
2001-10-23 05:39:25 +04:00
|
|
|
extern char *view_one_file;
|
|
|
|
extern char *edit_one_file;
|
1998-02-27 07:54:42 +03:00
|
|
|
extern int fast_reload_w;
|
|
|
|
extern int clear_before_exec;
|
|
|
|
extern int mou_auto_repeat;
|
|
|
|
extern char *other_dir;
|
|
|
|
extern int mouse_move_pages;
|
|
|
|
extern int mouse_move_pages_viewer;
|
2001-06-06 02:49:15 +04:00
|
|
|
|
|
|
|
#ifdef HAVE_CHARSET
|
|
|
|
extern int source_codepage;
|
|
|
|
extern int display_codepage;
|
|
|
|
#else
|
1998-02-27 07:54:42 +03:00
|
|
|
extern int eight_bit_clean;
|
|
|
|
extern int full_eight_bits;
|
2001-06-26 01:36:38 +04:00
|
|
|
#endif /* !HAVE_CHARSET */
|
2001-06-06 02:49:15 +04:00
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
extern int confirm_view_dir;
|
|
|
|
extern int fast_refresh;
|
|
|
|
extern int navigate_with_arrows;
|
2001-09-08 08:06:03 +04:00
|
|
|
extern int force_ugly_line_drawing;
|
1998-02-27 07:54:42 +03:00
|
|
|
extern int drop_menus;
|
|
|
|
extern int cd_symlinks;
|
|
|
|
extern int show_all_if_ambiguous;
|
|
|
|
extern int slow_terminal;
|
|
|
|
extern int update_prompt; /* To comunicate with subshell */
|
|
|
|
extern int confirm_delete;
|
|
|
|
extern int confirm_execute;
|
|
|
|
extern int confirm_exit;
|
|
|
|
extern int confirm_overwrite;
|
|
|
|
extern int force_colors;
|
|
|
|
extern int boot_current_is_left;
|
|
|
|
extern int acs_vline;
|
|
|
|
extern int acs_hline;
|
|
|
|
extern int use_file_to_check_type;
|
|
|
|
extern int searching;
|
|
|
|
extern int vfs_use_limit;
|
|
|
|
extern int alternate_plus_minus;
|
|
|
|
extern int only_leading_plus_minus;
|
|
|
|
extern int ftpfs_directory_timeout;
|
|
|
|
extern int output_starts_shell;
|
|
|
|
extern int midnight_shutdown;
|
|
|
|
extern char search_buffer [256];
|
|
|
|
extern char cmd_buf [512];
|
1999-03-30 10:09:56 +04:00
|
|
|
extern char *cmdline_geometry;
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
/* The menu panels */
|
|
|
|
extern int is_right; /* If the selected menu was the right */
|
|
|
|
#define MENU_PANEL (is_right ? right_panel : left_panel)
|
|
|
|
#define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
|
|
|
|
|
|
|
|
/* Useful macros to avoid too much typing */
|
|
|
|
#define cpanel get_current_panel()
|
|
|
|
#define opanel get_other_panel()
|
|
|
|
|
|
|
|
typedef void (*key_callback) ();
|
|
|
|
/* FIXME: We have to leave this type ambiguous, because `key_callback'
|
|
|
|
is used both for functions that take an argument and ones that don't.
|
|
|
|
That ought to be cleared up. */
|
|
|
|
|
|
|
|
/* The keymaps are of this type */
|
|
|
|
typedef struct {
|
|
|
|
int key_code;
|
|
|
|
key_callback fn;
|
|
|
|
} key_map;
|
|
|
|
|
1998-04-30 07:21:52 +04:00
|
|
|
void update_panels (int force_update, char *current_file);
|
1998-02-27 07:54:42 +03:00
|
|
|
void create_panels (void);
|
|
|
|
void repaint_screen (void);
|
|
|
|
void outrefresh_screen (void);
|
|
|
|
void suspend_cmd (void);
|
|
|
|
void do_update_prompt (void);
|
|
|
|
|
|
|
|
extern char *shell;
|
|
|
|
|
1999-06-23 01:02:08 +04:00
|
|
|
/* directory specified on command line for startup */
|
|
|
|
extern char *this_dir;
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
void clr_scr (void);
|
|
|
|
void restore_console (void);
|
|
|
|
|
|
|
|
enum cd_enum {
|
|
|
|
cd_parse_command,
|
|
|
|
cd_exact
|
|
|
|
};
|
|
|
|
|
1998-04-17 04:21:53 +04:00
|
|
|
int do_cd (char *new_dir, enum cd_enum cd_type); /* For find.c */
|
|
|
|
void change_panel (void);
|
|
|
|
void init_sigchld (void); /* For subshell.c */
|
|
|
|
int load_prompt (int fd, void *unused);
|
1998-02-27 07:54:42 +03:00
|
|
|
void save_cwds_stat (void);
|
|
|
|
void copy_prog_name (void);
|
1998-04-17 04:21:53 +04:00
|
|
|
int quiet_quit_cmd (void); /* For cmd.c and command.c */
|
1998-02-27 07:54:42 +03:00
|
|
|
|
1998-04-17 04:21:53 +04:00
|
|
|
void untouch_bar (void);
|
|
|
|
void touch_bar (void);
|
|
|
|
void load_hint (void);
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2001-10-20 11:01:08 +04:00
|
|
|
void print_vfs_message(char *msg, ...)
|
|
|
|
__attribute__ ((format (printf, 1, 2)));
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2000-05-04 Valery Kornienkov <vlk@dimavb.st.simbirsk.su>
* src/user.c: Add macro %k it is block file name
Add macro %e it is error file name
Add macro %i it is cursor column indent of spaces, only for edit
Add macro %y, it is syntax of current file in editor, only for edit
Add condition y , it is syntax pattern of current file in edit
Add macro %x it is extension of current file
Add macro %m it is current menu filename
2000-05-04 Valery Kornienkov <vlk@dimavb.st.simbirsk.su>
* gtkedit/editcmd.c: Modify External Formatter (was C indent formatter) .
Autocreate a scripts in home, from templates /usr/lib/mc/edit.indent.rc,
edit.ispell.rc, etc. Remove leading and trailing spaces into _(""),
(the message of David H. Martin <dmartina@usa.net>)
2000-05-05 Valery Kornienkov <vlk@dimavb.st.simbirsk.su>
* src/user.c: Add condition (x filename) into mc.menu .
for "Open next a free console" and like.
2000-05-04 Valery Kornienkov <vlk@dimavb.st.simbirsk.su>
src/user.c: fix segfault in chunk_alloc of glibc, when into condition
of .mnu we have quoted space. (~.mc/menu: + f \.\ test$).
2000-05-04 Valery Kornienkov <vlk@dimavb.st.simbirsk.su>
* gtkedit/edit.c:
Add ability user edit menus: system: /usr/lib/mc/cedit.menu,
* gtkedit/editmenu.c: home: ~/.cedit.menu, local: .cedit.menu
Marked block is access now from an user edit menu
Access ~/.cedit/cooledit.block for insert to cursor place from
user edit menu.
Created system cedit.menu
2000-05-04 Valery Kornienkov <vlk@dimavb.st.simbirsk.su>
* gtkedit/editdraw.c:
Improved a status string of cool editor for best understand,
and to add char,hex view.
2000-05-04 Richard Hestilow <hestgray@ionet.net>
* gnome/gdesktop.c: Fixes snap to grid.
2000-05-09 05:18:27 +04:00
|
|
|
void edit_user_menu_cmd (void);
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
extern char *prompt;
|
|
|
|
extern char *mc_home;
|
2001-09-08 08:06:03 +04:00
|
|
|
char *get_mc_lib_dir (void);
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
int maybe_cd (int char_code, int move_up_dir);
|
|
|
|
void do_possible_cd (char *dir);
|
|
|
|
|
|
|
|
#ifdef WANT_WIDGETS
|
|
|
|
extern WButtonBar *the_bar;
|
|
|
|
extern WLabel *the_prompt;
|
|
|
|
extern WLabel *the_hint;
|
|
|
|
extern Dlg_head *midnight_dlg;
|
2001-08-21 10:32:41 +04:00
|
|
|
extern Dlg_head *edit_dlg;
|
|
|
|
extern WLabel *process_status;
|
2002-11-11 10:35:08 +03:00
|
|
|
|
|
|
|
struct WMenu;
|
|
|
|
extern struct WMenu *the_menubar;
|
2001-06-26 01:36:38 +04:00
|
|
|
#endif /* WANT_WIDGETS */
|
1998-02-27 07:54:42 +03:00
|
|
|
|
1998-04-24 05:08:06 +04:00
|
|
|
void edition_pre_exec (void);
|
|
|
|
void edition_post_exec (void);
|
|
|
|
|
1998-12-03 00:27:27 +03:00
|
|
|
void done_menu (void);
|
|
|
|
void init_menu (void);
|
|
|
|
void exec_shell (void);
|
|
|
|
|
2002-09-11 02:04:11 +04:00
|
|
|
#ifdef NATIVE_WIN32
|
1998-02-27 07:54:42 +03:00
|
|
|
# define MC_BASE ""
|
|
|
|
#else
|
|
|
|
# define MC_BASE "/.mc/"
|
2002-09-11 02:04:11 +04:00
|
|
|
#endif /* !NATIVE_WIN32 */
|
1998-12-15 22:53:55 +03:00
|
|
|
|
|
|
|
/* Back hack to define the following routines only if the client code
|
|
|
|
* has included panel.h
|
|
|
|
*/
|
|
|
|
#ifdef __PANEL_H
|
|
|
|
|
|
|
|
#ifndef PANEL_DEFS_DONE
|
|
|
|
#define PANEL_DEFS_DONE
|
|
|
|
void directory_history_add (WPanel *panel, char *s);
|
|
|
|
int do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type);
|
|
|
|
int midnight_callback (struct Dlg_head *h, int id, int msg);
|
2001-06-26 01:36:38 +04:00
|
|
|
#endif /* !PANEL_DEFS_DONE */
|
|
|
|
#endif /* __PANEL_H */
|
|
|
|
|
|
|
|
#endif /* !__MAIN_H */
|