mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 09:19:24 +03:00
f0d3241ecb
Before the patch: --help shows the same text for all tools, only "mc" is replaced by tool name. For example, "mcedit --help" says: Usage: mcedit [OPTION...] [+number] [this_dir] [other_panel_dir] +number - Set initial line number for the internal editor which is wrong: mcedit does not take [this_dir] [other_panel_dir] syntax, that's mc syntax. After the patch, each tool has its own syntax string shown. "Usage:" message for each tool is as follows now: mc [OPTION...] [this_dir] [other_panel_dir] mcedit [OPTION...] [+lineno] file1[:lineno] [file2[:lineno]...] mcview [OPTION...] file mcdiff [OPTION...] file1 file2 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
59 lines
1.8 KiB
C
59 lines
1.8 KiB
C
#ifndef MC__ARGS_H
|
|
#define MC__ARGS_H
|
|
|
|
#include "lib/global.h" /* gboolean */
|
|
#include "lib/vfs/vfs.h" /* vfs_path_t */
|
|
|
|
/*** typedefs(not structures) and defined constants **********************************************/
|
|
|
|
/*** enums ***************************************************************************************/
|
|
|
|
/*** structures declarations (and typedefs of structures)*****************************************/
|
|
|
|
typedef struct
|
|
{
|
|
vfs_path_t *file_vpath;
|
|
long line_number;
|
|
} mcedit_arg_t;
|
|
|
|
/*** global variables defined in .c file *********************************************************/
|
|
|
|
extern gboolean mc_args__force_xterm;
|
|
extern gboolean mc_args__nomouse;
|
|
extern gboolean mc_args__force_colors;
|
|
extern gboolean mc_args__nokeymap;
|
|
extern char *mc_args__last_wd_file;
|
|
extern char *mc_args__netfs_logfile;
|
|
extern char *mc_args__keymap_file;
|
|
#ifdef ENABLE_VFS_SMB
|
|
extern int mc_args__debug_level;
|
|
#endif
|
|
|
|
/*
|
|
* MC_RUN_FULL: dir for left panel
|
|
* MC_RUN_EDITOR: list of files to edit
|
|
* MC_RUN_VIEWER: file to view
|
|
* MC_RUN_DIFFVIEWER: first file to compare
|
|
*/
|
|
extern void *mc_run_param0;
|
|
/*
|
|
* MC_RUN_FULL: dir for right panel
|
|
* MC_RUN_EDITOR: unused
|
|
* MC_RUN_VIEWER: unused
|
|
* MC_RUN_DIFFVIEWER: second file to compare
|
|
*/
|
|
extern char *mc_run_param1;
|
|
|
|
/*** declarations of public functions ************************************************************/
|
|
|
|
void mc_setup_run_mode (char **argv);
|
|
gboolean mc_args_parse (int *argc, char ***argv, const char *translation_domain, GError ** mcerror);
|
|
gboolean mc_args_show_info (void);
|
|
gboolean mc_setup_by_args (int argc, char **argv, GError ** mcerror);
|
|
|
|
void mcedit_arg_free (mcedit_arg_t * arg);
|
|
|
|
/*** inline functions ****************************************************************************/
|
|
|
|
#endif /* MC__ARGS_H */
|