VFS: internal changes in vfs_path_t type.
[midnight-commander.git] / src / main.h
blobb24ff2759a53394f435543fe645e91466cc8573e
1 /** \file main.h
2 * \brief Header: this is a main module header
3 */
5 #ifndef MC__MAIN_H
6 #define MC__MAIN_H
8 #include "lib/global.h"
10 /*** typedefs(not structures) and defined constants **********************************************/
12 #define MAX_MACRO_LENGTH 1024
14 /*** enums ***************************************************************************************/
16 /* run mode and params */
18 enum cd_enum
20 cd_parse_command,
21 cd_exact
24 /*** structures declarations (and typedefs of structures)*****************************************/
26 typedef struct macro_action_t
28 unsigned long action;
29 int ch;
30 } macro_action_t;
32 typedef struct macros_t
34 int hotkey;
35 GArray *macro;
36 } macros_t;
38 struct mc_fhl_struct;
40 /*** global variables defined in .c file *********************************************************/
43 * MC_RUN_FULL: dir for left panel
44 * MC_RUN_EDITOR: file to edit
45 * MC_RUN_VIEWER: file to view
46 * MC_RUN_DIFFVIEWER: first file to compare
48 extern char *mc_run_param0;
50 * MC_RUN_FULL: dir for right panel
51 * MC_RUN_EDITOR: unused
52 * MC_RUN_VIEWER: unused
53 * MC_RUN_DIFFVIEWER: second file to compare
55 extern char *mc_run_param1;
57 extern int quit;
58 /* Set to TRUE to suppress printing the last directory */
59 extern gboolean print_last_revert;
60 /* If set, then print to the given file the last directory we were at */
61 extern char *last_wd_string;
63 extern struct mc_fhl_struct *mc_filehighlight;
65 extern int use_internal_view;
66 extern int use_internal_edit;
68 #ifdef HAVE_CHARSET
69 extern int default_source_codepage;
70 extern char *autodetect_codeset;
71 extern gboolean is_autodetect_codeset_enabled;
72 #endif /* !HAVE_CHARSET */
74 extern char *shell;
75 extern const char *mc_prompt;
77 /* index to record_macro_buf[], -1 if not recording a macro */
78 extern int macro_index;
80 /* macro stuff */
81 extern struct macro_action_t record_macro_buf[MAX_MACRO_LENGTH];
83 extern GArray *macros_list;
85 /*** declarations of public functions ************************************************************/
87 #ifdef HAVE_SUBSHELL_SUPPORT
88 gboolean do_load_prompt (void);
89 int load_prompt (int fd, void *unused);
90 #endif
92 gboolean do_cd (const char *new_dir, enum cd_enum cd_type);
93 void update_xterm_title_path (void);
95 /*** inline functions ****************************************************************************/
97 #endif /* MC__MAIN_H */