Commit Graph

48 Commits

Author SHA1 Message Date
Samuel Bingner
d352220604 Ticket #3930: clarify name of struct stat members for Apple compilation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-08-19 11:37:20 +03:00
Andrew Borodin
8b6f4ef2c2 Use gboolean instead of int in file/dir sort related functions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +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
Andrew Borodin
8b14798cc4 setup: split integer and boolean options.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
9a39e35dc3 Use g_assert() instead of assert(3).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
6127e5aea6 Get rid of #define const_cast(). 2016-09-11 11:11:01 +03:00
Andrew Borodin
2151edaff2 Get rid of global variables mc_main_config and mc_panels_config.
Use mc_global.main_config and mc_global.panels_congig instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
bc14ff44c8 Remove min() and max() macros. Use MIN() and MAX() macros from GLib.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Yury V. Zaytsev
a8f512c12c Remove unneeded struct keyword for typedef'd structs
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-04 09:23:38 +03:00
Slava Zanko
0e79be1b7a Introduce mc_shell_t type.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2016-01-01 11:48:06 +03:00
Alexander Kriegisch
f596c916a4 New subshell types Busybox ash + Debian ash (dash) and some more enhancements plus fish chdir bugfix
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-11-10 11:55:35 +03:00
Andrew Borodin
d9ad3d2e32 Clarify __attribute ((format (printf))) usage.
Thanks Andreas Mohr <and@gmx.li> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-05 14:33:20 +03:00
Andrew Borodin
b698b7e834 Ticket #3435: clang compiler fixes/cleanups.
Since O_* macros are used in lib/global.h, include <fcntl.h> there.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andrew Borodin
42e7e39bd8 Add IS_PATH_SEP macro and use it.
Also massive use of PATH_SEP and PATH_SEP_STR macros.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:13:02 +03:00
Andrew Borodin
be938c611b Ticket #3247: refactoring of status_msg engine.
Initial commit: create global timer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:19:25 +04:00
Andrew Borodin
5e7e9ddf32 Ticket #3151: lib/global.h: remove declaration of refresh_screen().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Slava Zanko
0b0f7e3975 Refactoring: use define DEFAULT_CHARSET for "ASCII" charset.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-21 13:35:59 +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
ae6e647845 (mc_global_t::shell): new member to store user's shell
...instead of global variable "shell".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Mikulas Patocka
b475e31255 Portability: ESC_CHAR is defined in /usr/include/langinfo.h in some systems
...so undefine it to avoid warning.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
1d3132c08f Clarify of sig_atomic_t usage (got from Mutt).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
82bb9c39da Define winch_flag as volatile sig_atomic_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +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
94bd4b1f78 Code indentation.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-07-17 17:04:05 +04: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
c7bde637f9 Tweak background operations support.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Andrew Borodin
f7f37f674e Check assert.h header and use it conditionally.
assert(3) should be replaced with g_assert().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Andrew Borodin
e2b67a33ba Ticket #2740: code cleanup before 4.8.2 release.
Removes references to AC_HEADER_STDC macro, marked as obsolescent
in the Autoconf 2.60 release.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:56 +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
Sergey
3e1b644f41 Ticket #2372 (Editor sometimes shows multibyte UTF-8 chars as two dots)
Sometimes when text contain multibyte UTF-8 chars, editor shows two dots instead of some letter.
When moving text cursor after that letter it will be displayed properly.
When moving cursor back (before letter) it will be displayed again as two dots.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

added UTF8_CHAR_LEN

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-10-24 11:19:03 +04:00
Oswald Buddenhagen
1c0cc50a3f Ticket #2639: doesn't compile when using --disable-nls
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-23 16:21:36 +04:00
Slava Zanko
41af257135 Added configuration option 'preallocate_space' for toggle space preallocating behaviour.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-20 10:51:08 +03:00
Slava Zanko
a1e34b8dfa Code cleanup after runing splint on src/main.c file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-17 13:30:03 +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
Slava Zanko
bfbe9b94ae Removed global variable slow_tty
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
8d44ed297b Moved xterm_flag global variable to mc_global.tty.xterm_flag
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
f40887c3c6 Lib: removed includes to "src" directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
746653fda2 Removed mc_main_error_quark() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
6016620f42 Remove backlinks from lib to src - move global variables(used in lib) to mc_global structure (see lib/global.c)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:50 +02:00
Andrew Borodin
fe8c5390ad Fix of uintmax_t variables output.
Use PRIuMAX and PRIXMAX instead of ju and jX modifiers respectively
for formatted output of uintmax_t variables.
If PRIXMAX is not defined (i.e. in Solaris9), use PRIxMAX instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-03 10:58:39 +03:00
Andrew Borodin
fdb61594df Cleanup of main.[ch].
All file panels related stuff was moved to midnight.[ch].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Andrew Borodin
8d1708225c Don't include lib/util.h via lib/global.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
1685730d7c OS-specific defines are moved from lib/util.h into lib/global.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Slava Zanko
feb733663f Code indentation in lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:20 +03:00
Slava Zanko
2fa4d9b952 Move logging.[ch] into library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:26 +02:00
Slava Zanko
c764f3b84c Changes for build after moving util.[ch]
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:24 +02:00
Slava Zanko
93dbc46e9c Reorganization of sources. Part 1.
* moved src/global.h into lib/global.h
 * moved glibcompat.[ch] from ./src/ into ./lib/
 * moved fs.h from ./src/ into ./lib/

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:23 +02:00