Refactoring.
[midnight-commander.git] / src / main.h
blobce47b00663365fa92c5c2829d1e02c56e2d738f2
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 /*** enums ***************************************************************************************/
14 /* run mode and params */
15 typedef enum
17 MC_RUN_FULL = 0,
18 MC_RUN_EDITOR,
19 MC_RUN_VIEWER,
20 MC_RUN_DIFFVIEWER
21 } mc_run_mode_t;
23 enum cd_enum
25 cd_parse_command,
26 cd_exact
30 /*** structures declarations (and typedefs of structures)*****************************************/
32 struct mc_fhl_struct;
34 /*** global variables defined in .c file *********************************************************/
36 extern mc_run_mode_t mc_run_mode;
38 * MC_RUN_FULL: dir for left panel
39 * MC_RUN_EDITOR: file to edit
40 * MC_RUN_VIEWER: file to view
41 * MC_RUN_DIFFVIEWER: first file to compare
43 extern char *mc_run_param0;
45 * MC_RUN_FULL: dir for right panel
46 * MC_RUN_EDITOR: unused
47 * MC_RUN_VIEWER: unused
48 * MC_RUN_DIFFVIEWER: second file to compare
50 extern char *mc_run_param1;
52 extern int quit;
53 /* Set to TRUE to suppress printing the last directory */
54 extern gboolean print_last_revert;
55 /* If set, then print to the given file the last directory we were at */
56 extern char *last_wd_string;
58 extern struct mc_fhl_struct *mc_filehighlight;
60 extern int use_internal_view;
61 extern int use_internal_edit;
63 #ifdef HAVE_CHARSET
64 extern int source_codepage;
65 extern int default_source_codepage;
66 extern int display_codepage;
67 extern char *autodetect_codeset;
68 extern gboolean is_autodetect_codeset_enabled;
69 #else
70 extern int eight_bit_clean;
71 extern int full_eight_bits;
72 #endif /* !HAVE_CHARSET */
74 extern int utf8_display;
76 extern int midnight_shutdown;
78 extern char *shell;
79 extern const char *mc_prompt;
81 extern char *mc_home;
82 extern char *mc_home_alt;
84 extern const char *home_dir;
86 /*** declarations of public functions ************************************************************/
88 #ifdef HAVE_SUBSHELL_SUPPORT
89 int load_prompt (int fd, void *unused);
90 #endif
92 int 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 */