Optimization of ini files load.
[midnight-commander.git] / src / main.h
blobeebf640568802fbff213ffa28cefcd399179e1a6
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"
9 #include "lib/vfs/vfs.h"
11 /*** typedefs(not structures) and defined constants **********************************************/
13 #define MAX_MACRO_LENGTH 1024
15 /*** enums ***************************************************************************************/
17 /* run mode and params */
19 enum cd_enum
21 cd_parse_command,
22 cd_exact
25 /*** structures declarations (and typedefs of structures)*****************************************/
27 typedef struct macro_action_t
29 unsigned long action;
30 int ch;
31 } macro_action_t;
33 typedef struct macros_t
35 int hotkey;
36 GArray *macro;
37 } macros_t;
39 struct mc_fhl_struct;
41 /*** global variables defined in .c file *********************************************************/
44 * MC_RUN_FULL: dir for left panel
45 * MC_RUN_EDITOR: file to edit
46 * MC_RUN_VIEWER: file to view
47 * MC_RUN_DIFFVIEWER: first file to compare
49 extern char *mc_run_param0;
51 * MC_RUN_FULL: dir for right panel
52 * MC_RUN_EDITOR: unused
53 * MC_RUN_VIEWER: unused
54 * MC_RUN_DIFFVIEWER: second file to compare
56 extern char *mc_run_param1;
58 extern int quit;
59 /* Set to TRUE to suppress printing the last directory */
60 extern gboolean print_last_revert;
61 /* If set, then print to the given file the last directory we were at */
62 extern char *last_wd_string;
64 extern struct mc_fhl_struct *mc_filehighlight;
66 extern int use_internal_view;
67 extern int use_internal_edit;
69 #ifdef HAVE_CHARSET
70 extern int default_source_codepage;
71 extern char *autodetect_codeset;
72 extern gboolean is_autodetect_codeset_enabled;
73 #endif /* !HAVE_CHARSET */
75 extern char *shell;
76 extern const char *mc_prompt;
78 /* index to record_macro_buf[], -1 if not recording a macro */
79 extern int macro_index;
81 /* macro stuff */
82 extern struct macro_action_t record_macro_buf[MAX_MACRO_LENGTH];
84 extern GArray *macros_list;
86 /*** declarations of public functions ************************************************************/
88 #ifdef HAVE_SUBSHELL_SUPPORT
89 gboolean do_load_prompt (void);
90 int load_prompt (int fd, void *unused);
91 #endif
93 gboolean do_cd (const vfs_path_t * new_dir_vpath, enum cd_enum cd_type);
94 void update_xterm_title_path (void);
96 void title_path_prepare (char **path, char **login);
98 /*** inline functions ****************************************************************************/
100 #endif /* MC__MAIN_H */