The build system runs configure script after switching to another branch
or changeset, which basically means that each git operation which
modifies HEAD will cause a full rebuild. This is highly annoying, in
particular during bisecting.
Solution:
Don't define version in config.h.
Add mc_version member to mc_global_t structure and use it instead of
VERSION macro.
Now only lib/global.c depends on MC version.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...to free or not to free the string representation
of vfs_path_t object.
It allows to get rid of string duplication in following cases:
vfs_path_t *vpath;
char *path;
...
vpath = vfs_path_from_str (...);
path = g_strdup (vfs_path_as_str (vpath));
vfs_path_free (vpath);
Now we can write:
vfs_path_t *vpath;
char *path;
...
vpath = vfs_path_from_str (...);
path = vfs_path_free (vpath, FALSE);
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Embedding the configure time options into the executable can lead to
non-reproducible builds, since configure options often have embedded
paths. Add a configure time option to control if the configure args are
embedded so this can be disabled.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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>
Make Solaris Studio 12.4 & 12.5 happy.
"args.c", line 180: warning: initialization type mismatch
"args.c", line 188: warning: initialization type mismatch
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Reduce to scope for
mcedit_arg_new (const char *file_name, long line_number)
mcedit_arg_vpath_new (vfs_path_t * file_vpath, long line_number)
and move to file scope section.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...and move update_xterm_title_path() and title_path_prepare()
from src/main.c to src/filemanager/layout.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
...to allow to show info about mc options regardless of the fact that
configuration directories cannot be created.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Required for some terminals (screen/tmux) to force needed mouse type
(BUTTON_EVENT by default).
Normal tracking mode sends an escape sequence on both button press and release.
Mouse highlight tracking notifies a program of a button press, receives a range of
lines from the program, highlights the region covered by the mouse within that
range until button release, and then sends the program the release coordinates.
It is enabled by specifying parameter 1001 to DECSET.
Button-event tracking is essentially the same as normal tracking, but xterm also
reports button-motion events. Motion events are reported only if the mouse pointer
has moved to a different character cell. It is enabled by specifying parameter 1002 to DECSET.
On button press or release, xterm sends the same codes used by normal tracking mode.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
changed mc.1.in, added description of command line options -g, --oldmouse.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>