Direct commit: fixed visibility scope for global variable GArray *macros_list
[pantumic.git] / src / main.h
blob42d833a701068111d93b63d4f6b1b36ec3b39995
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 */
17 typedef enum
19 MC_RUN_FULL = 0,
20 MC_RUN_EDITOR,
21 MC_RUN_VIEWER,
22 MC_RUN_DIFFVIEWER
23 } mc_run_mode_t;
25 enum cd_enum
27 cd_parse_command,
28 cd_exact
31 /*** structures declarations (and typedefs of structures)*****************************************/
33 typedef struct macro_action_t
35 unsigned long action;
36 int ch;
37 } macro_action_t;
39 typedef struct macros_t
41 int hotkey;
42 GArray *macro;
43 } macros_t;
45 /* macro stuff */
46 struct macro_action_t record_macro_buf[MAX_MACRO_LENGTH];
48 struct mc_fhl_struct;
50 /*** global variables defined in .c file *********************************************************/
52 extern mc_run_mode_t mc_run_mode;
54 * MC_RUN_FULL: dir for left panel
55 * MC_RUN_EDITOR: file to edit
56 * MC_RUN_VIEWER: file to view
57 * MC_RUN_DIFFVIEWER: first file to compare
59 extern char *mc_run_param0;
61 * MC_RUN_FULL: dir for right panel
62 * MC_RUN_EDITOR: unused
63 * MC_RUN_VIEWER: unused
64 * MC_RUN_DIFFVIEWER: second file to compare
66 extern char *mc_run_param1;
68 extern int quit;
69 /* Set to TRUE to suppress printing the last directory */
70 extern gboolean print_last_revert;
71 /* If set, then print to the given file the last directory we were at */
72 extern char *last_wd_string;
74 extern struct mc_fhl_struct *mc_filehighlight;
76 extern int use_internal_view;
77 extern int use_internal_edit;
79 #ifdef HAVE_CHARSET
80 extern int source_codepage;
81 extern int default_source_codepage;
82 extern int display_codepage;
83 extern char *autodetect_codeset;
84 extern gboolean is_autodetect_codeset_enabled;
85 #else
86 extern int eight_bit_clean;
87 extern int full_eight_bits;
88 #endif /* !HAVE_CHARSET */
90 extern int utf8_display;
92 extern int midnight_shutdown;
94 extern char *shell;
95 extern const char *mc_prompt;
97 extern char *mc_sysconfig_dir;
98 extern char *mc_share_data_dir;
100 /* index to record_macro_buf[], -1 if not recording a macro */
101 extern int macro_index;
103 extern GArray *macros_list;
105 /*** declarations of public functions ************************************************************/
107 #ifdef HAVE_SUBSHELL_SUPPORT
108 int load_prompt (int fd, void *unused);
109 #endif
111 int do_cd (const char *new_dir, enum cd_enum cd_type);
112 void update_xterm_title_path (void);
114 /*** inline functions ****************************************************************************/
116 #endif /* MC__MAIN_H */