Fix cursor position after execution of external script.
[midnight-commander/osp/staryto3.git] / src / main.h
blob4550e9f57137f07e3c51f12d6870738b68fdb2ac
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 GArray *macros_list;
101 /* index to record_macro_buf[], -1 if not recording a macro */
102 extern int macro_index;
104 /*** declarations of public functions ************************************************************/
106 #ifdef HAVE_SUBSHELL_SUPPORT
107 int load_prompt (int fd, void *unused);
108 #endif
110 int do_cd (const char *new_dir, enum cd_enum cd_type);
111 void update_xterm_title_path (void);
113 /*** inline functions ****************************************************************************/
115 #endif /* MC__MAIN_H */