Commit Graph

94 Commits

Author SHA1 Message Date
Andrew Borodin
32621b96d1 Ticket #2252: reduce rebuld time.
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>
2021-04-11 16:58:31 +03:00
Andrew Borodin
536fb676d8 (vfs_path_free): add 2nd parameter...
...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>
2021-03-14 19:52:39 +03:00
Andrew Borodin
5a4d1dd122 src/args.c: fix formatting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
9ee52e77c3 Ticket #4179: code clean up before 4.8.27 release.
Update copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
31b37a1f79 Ticket #4050: code cleanup before 4.8.25 release.
Update copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-29 19:10:17 +03:00
Joshua Watt
d009ea7b8b Ticket #4031: add option to control configure args.
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>
2019-11-10 16:24:22 +03:00
Andrew Borodin
1dd8a47987 Ticket #3955: code cleanup before 4.8.23 release.
Update copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:44:40 +03:00
Andrew Borodin
ddd645526a Update copyright years. 2018-02-04 11:30:22 +03:00
Andrew Borodin
73979369d1 Support __attribute__((fallthrough)) if possible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:22 +03:00
David Martin
26a2617256 Ticket #3879: i18n of argument type names in --help blocks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-02 11:24:46 +03:00
Denys Vlasenko
f0d3241ecb Ticket #3805: fix --help option to show correct syntax for editor, viewer and mcdiff
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>
2017-04-15 09:49:29 +03:00
Andrew Borodin
e9fd11bfcd Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 19:12:55 +03:00
Andreas Mohr
72258dcca6 args.c: Make Solaris Studio happy
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>
2016-05-07 16:19:02 +03:00
Andreas Mohr
78db983626 Cleanup: args.c: recude function scope for mcedit_arg_*.
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>
2016-03-04 09:23:37 +03:00
Andreas Mohr
686ce302bd Clarify mc_args__debug_level declare.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
471ea781ca Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andrew Borodin
70fa973f47 Fix typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-05 14:33:21 +03:00
Andrew Borodin
df5e689bba (parse_mc_v_argument): fix unused parameter 'value'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 18:34:43 +03:00
Andreas Mohr
f1b73ffe6e Ticket #3465: add -Wmissing-variable-declarations option...
...and fix relative warnings.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andrew Borodin
3ba8109fe9 (mc_setup_by_args): refactoring of arguments handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andrew Borodin
44bf7e8d80 reset_hp_softkeys variable is used in S-Lang-based mc only.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andrew Borodin
8c88aa01ad Remove code required for GLib < 2.14.0.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:20:54 +03:00
Andrew Borodin
454479549c Update copyright years. 2015-02-26 09:12:08 +03:00
Egmont Koblinger
89d2db5ca3 Ticket #3065: support of italic text.
Italic text is supported by S-Lang since pre2.3.0-107 and NCurses since 5.9.20130831.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-17 15:22:53 +03:00
Andrew Borodin
6d82155270 Massive use of MC_PTR_FREE macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:32:36 +04:00
Slava Zanko
512ad7d962 Make working with GError in more right way (like with exceptions).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-07-22 13:12:07 +04:00
Slava Zanko
29f81d96c9 Ticket #3204: As user, I want to use own default colors for viewer.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-05-07 23:03:33 +03:00
Andrew Borodin
e5203cb023 Fix name of FSF in all *.c files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Andrew Borodin
f0da49345a Collapse list of copyright years to ranges. Add 2014 year.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Andrew Borodin
e7dc599e42 Use "'" instead of "`" for messages and comments quoting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:03 +03:00
Andrew Borodin
e9f883a3cf Cleanup code related to GLib < 2.12.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
b2f97443e2 Refactoring of subshell support.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:47 +04:00
Slava Zanko
80011ad7cb Move global variables to an appropriate place
...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>
2012-10-21 18:19:12 +04:00
Andrew Borodin
72f50b458b Use long for line numbers and columns.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:24 +04:00
Andrew Borodin
e39c697df4 Ticket #2853: standalone mcedit doesn't load saved file position.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-03 10:56:32 +04:00
Andrew Borodin
23c95d36ac Code cleanup: removed unused variables amd removed unnedeed code.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Andrew Borodin
84aa04fa6e Open several files in mc editor from command line.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:26:10 +04:00
Andrew Borodin
4fa4e7568d Skin support for window frames.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:26:10 +04:00
Andrew Borodin
25315360bd (mc_setup_by_args): fixed memory leaks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:11 +03:00
Andrew Borodin
dea3aa9023 Reorder fields in mc_global struct and change type for some of them.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:06:00 +03:00
Andrew Borodin
cce7ccf48a Tweak arguments parsing
...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>
2012-03-17 19:04:22 +03:00
Andrew Borodin
9919577962 Ticket #2738: handle errors at mc sturtup stage.
Don't run MC if configuration directory cannot be created.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-17 19:04:22 +03:00
Slava Zanko
031e994cba changed interface of function mc_setctl() for handle vfs_path_t object as parameter
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
eeaad790ab Changed interface of mc_stat() and mc_lstat() functions
...to handle vfs_path_t object as parameter.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:24 +03:00
Ilia Maslakov
0b631ab1eb Ticket #86 (disable X11 from command line)
added option --no-x, -X for starting mc without X11 support.
    updated documentation: es, hu, it, en, pl, ru, sr.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-12-22 09:04:50 +04:00
Slava Zanko
0138645541 Ticket 1551: Update GPL version from 2 to 3
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Andrew Borodin
05385e1586 Set logfile for smbfs using mc_setctl().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:55 +03:00
Andrew Borodin
0c51a48a71 (mc_setup_by_args): fixed old VFS prefix.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:55 +03:00
Slava Zanko
70ff1dc3aa Removed mc_global.args structure.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Ilia Maslakov
67c35a20a6 Added -g, --oldmouse option to support of NORMAL/BUTTON_EVENT mouse type.
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>
2011-09-08 14:12:10 +04:00