Skip to content

Commit

Permalink
Merge branch '4524_cleanup'
Browse files Browse the repository at this point in the history
* 4524_cleanup: (41 commits)
  Update po/*.po files.
  Remove src/editor/.gitignore.
  Indentation using GNU indent-2.2.13.
  clang: fix `-Wconstant-conversion` warning
  clang: fix `-Wpointer-sign` warning
  buildsys: prefer gnu indent (gindent) to bsd indent if available
  buildsys: update ax_gcc_func_attribute to fix fallthrough detection
  clang: fix `-Wimplicit-fallthrough` warning
  clang: fix `-Wconditional-uninitialized` warnings
  buildsys: fix build on macOS with libssh2 present via homebrew
  m4: add Werror when checking for compiler flags
  (path_trunc): optimization.
  (vfs_path_build_url_params_str): minor refactoring.
  (vfs_path_from_str_uri_parser): fix coding style.
  (mc_search__glob_translate_to_regex): reduce variable scope, refactor.
  src/filemanager/find.c: remove unneeded intialization of local variables.
  (do_find): minor refactoring.
  src/filemanager/find.c: ret rid of string duplication.
  (search_content): reduce variable scope.
  (do_find): fix coding style.
  ...
  • Loading branch information
aborodin committed Jun 2, 2024
2 parents 9428697 + 4509e10 commit 4139bb8
Show file tree
Hide file tree
Showing 272 changed files with 4,260 additions and 4,593 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ cppcheck-split-all: \
cppcheck-unusedFunction \
cppcheck-missingInclude

INDENT_CMD = indent \
INDENT_CMD = $(INDENT) \
--gnu-style \
--format-first-column-comments \
--indent-level4 \
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ dnl Check for other tools
dnl ############################################################################

AC_CHECK_TOOL(AR, ar, ar)
AC_CHECK_TOOL(INDENT, gindent, indent)
mc_UNIT_TESTS


Expand Down
37 changes: 19 additions & 18 deletions doc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,34 @@ Version 4.8.31

- Core

* Minimal version of GLib is 2.32.0.
* Minimal version of GLib is 2.32.0.

- VFS

* fish: drop support of native FISH server and protocol. Rename VFS to shell (#4232)
* extfs;
* uc1541 extfs: update up to 3.6 version (#4511)
* s3+: port to Python3 (#4324)
* Support for LZO/LZOP compression format (#4509)
* fish: drop support of native FISH server and protocol. Rename VFS to shell (#4232)
* extfs;
* uc1541 extfs: update up to 3.6 version (#4511)
* s3+: port to Python3 (#4324)
* Support for LZO/LZOP compression format (#4509)

- Misc

* Skins: add color for non-printable characters in editor (#4433)
* Code clean up (#4490)
* Skins: add color for non-printable characters in editor (#4433)

- Fixes

* FTBFS on FreeBSD with ext2fs attribute support (#4493)
* Broken stickchars (-a) mode (#4498)
* Wrong timestamp after resuming of file copy operation (#4499)
* Editor: wrong deletion of marked column (#3761)
* Diff viewer: segfault when display of line numbers is enabled (#4500)
* Tar VFS: broken handling of hard links (#4494)
* Sftp VFS: failure establishing SSH session due hashed host names in ~/.ssh/known_hosts (#4506)
* Shell VFS: incorrect file names with cyrillic or diacritic symbols (#4507)
* mc.ext.ini: incorrect description of of how multiple sections and keys with same names are processed (#4497)
* mc.ext.ini: unescaped backslash \ is treated as invalid escape sequence in glib-2.77.3 and glib-2.79 (#4502)
* mc.ext.ini: file "Makefile.zip" is handled as Makefile not as zip-arhive (#4419)
* FTBFS on FreeBSD with ext2fs attribute support (#4493)
* Broken stickchars (-a) mode (#4498)
* Wrong timestamp after resuming of file copy operation (#4499)
* Editor: wrong deletion of marked column (#3761)
* Diff viewer: segfault when display of line numbers is enabled (#4500)
* Tar VFS: broken handling of hard links (#4494)
* Sftp VFS: failure establishing SSH session due hashed host names in ~/.ssh/known_hosts (#4506)
* Shell VFS: incorrect file names with cyrillic or diacritic symbols (#4507)
* mc.ext.ini: incorrect description of of how multiple sections and keys with same names are processed (#4497)
* mc.ext.ini: unescaped backslash \ is treated as invalid escape sequence in glib-2.77.3 and glib-2.79 (#4502)
* mc.ext.ini: file "Makefile.zip" is handled as Makefile not as zip-arhive (#4419)


Version 4.8.30
Expand Down
2 changes: 1 addition & 1 deletion lib/charsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ free_codepage_desc (gpointer data)
/* returns display codepage */

static void
load_codepages_list_from_file (GPtrArray ** list, const char *fname)
load_codepages_list_from_file (GPtrArray **list, const char *fname)
{
FILE *f;
char buf[BUF_MEDIUM];
Expand Down
8 changes: 4 additions & 4 deletions lib/event/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ GTree *mc_event_grouplist = NULL;
/* --------------------------------------------------------------------------------------------- */

gboolean
mc_event_init (GError ** mcerror)
mc_event_init (GError **mcerror)
{
mc_return_val_if_error (mcerror, FALSE);

Expand All @@ -74,7 +74,7 @@ mc_event_init (GError ** mcerror)
/* --------------------------------------------------------------------------------------------- */

gboolean
mc_event_deinit (GError ** mcerror)
mc_event_deinit (GError **mcerror)
{
mc_return_val_if_error (mcerror, FALSE);

Expand All @@ -92,7 +92,7 @@ mc_event_deinit (GError ** mcerror)
/* --------------------------------------------------------------------------------------------- */

gboolean
mc_event_mass_add (const event_init_t * events, GError ** mcerror)
mc_event_mass_add (const event_init_t *events, GError **mcerror)
{
size_t array_index;

Expand All @@ -113,7 +113,7 @@ mc_event_mass_add (const event_init_t * events, GError ** mcerror)
/* --------------------------------------------------------------------------------------------- */

gboolean
mc_event_present (const gchar * event_group_name, const gchar * event_name)
mc_event_present (const gchar *event_group_name, const gchar *event_name)
{
GTree *event_group;
GPtrArray *callbacks;
Expand Down
20 changes: 10 additions & 10 deletions lib/event/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ mc_event_group_destroy_value (gpointer data)
/* --------------------------------------------------------------------------------------------- */

gboolean
mc_event_add (const gchar * event_group_name, const gchar * event_name,
mc_event_callback_func_t event_callback, gpointer event_init_data, GError ** mcerror)
mc_event_add (const gchar *event_group_name, const gchar *event_name,
mc_event_callback_func_t event_callback, gpointer event_init_data, GError **mcerror)
{
GTree *event_group;
GPtrArray *callbacks;
Expand Down Expand Up @@ -95,7 +95,7 @@ mc_event_add (const gchar * event_group_name, const gchar * event_name,
/* --------------------------------------------------------------------------------------------- */

void
mc_event_del (const gchar * event_group_name, const gchar * event_name,
mc_event_del (const gchar *event_group_name, const gchar *event_name,
mc_event_callback_func_t event_callback, gpointer event_init_data)
{
GTree *event_group;
Expand All @@ -122,7 +122,7 @@ mc_event_del (const gchar * event_group_name, const gchar * event_name,
/* --------------------------------------------------------------------------------------------- */

void
mc_event_destroy (const gchar * event_group_name, const gchar * event_name)
mc_event_destroy (const gchar *event_group_name, const gchar *event_name)
{
GTree *event_group;

Expand All @@ -136,7 +136,7 @@ mc_event_destroy (const gchar * event_group_name, const gchar * event_name)
/* --------------------------------------------------------------------------------------------- */

void
mc_event_group_del (const gchar * event_group_name)
mc_event_group_del (const gchar *event_group_name)
{

if (mc_event_grouplist != NULL && event_group_name != NULL)
Expand All @@ -146,8 +146,8 @@ mc_event_group_del (const gchar * event_group_name)
/* --------------------------------------------------------------------------------------------- */

GTree *
mc_event_get_event_group_by_name (const gchar * event_group_name, gboolean create_new,
GError ** mcerror)
mc_event_get_event_group_by_name (const gchar *event_group_name, gboolean create_new,
GError **mcerror)
{
GTree *event_group;

Expand Down Expand Up @@ -175,8 +175,8 @@ mc_event_get_event_group_by_name (const gchar * event_group_name, gboolean creat
/* --------------------------------------------------------------------------------------------- */

GPtrArray *
mc_event_get_event_by_name (GTree * event_group, const gchar * event_name, gboolean create_new,
GError ** mcerror)
mc_event_get_event_by_name (GTree *event_group, const gchar *event_name, gboolean create_new,
GError **mcerror)
{
GPtrArray *callbacks;

Expand All @@ -199,7 +199,7 @@ mc_event_get_event_by_name (GTree * event_group, const gchar * event_name, gbool
/* --------------------------------------------------------------------------------------------- */

mc_event_callback_t *
mc_event_is_callback_in_array (GPtrArray * callbacks, mc_event_callback_func_t event_callback,
mc_event_is_callback_in_array (GPtrArray *callbacks, mc_event_callback_func_t event_callback,
gpointer event_init_data)
{
guint array_index;
Expand Down
2 changes: 1 addition & 1 deletion lib/event/raise.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
/* --------------------------------------------------------------------------------------------- */

gboolean
mc_event_raise (const gchar * event_group_name, const gchar * event_name, gpointer event_data)
mc_event_raise (const gchar *event_group_name, const gchar *event_name, gpointer event_data)
{
GTree *event_group;
GPtrArray *callbacks;
Expand Down
6 changes: 3 additions & 3 deletions lib/filehighlight/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ mc_fhl_filter_free (gpointer data)
/* --------------------------------------------------------------------------------------------- */

void
mc_fhl_array_free (mc_fhl_t * fhl)
mc_fhl_array_free (mc_fhl_t *fhl)
{
if (fhl->filters != NULL)
{
Expand Down Expand Up @@ -104,7 +104,7 @@ mc_fhl_new (gboolean need_auto_fill)
/* --------------------------------------------------------------------------------------------- */

void
mc_fhl_free (mc_fhl_t ** fhl)
mc_fhl_free (mc_fhl_t **fhl)
{
if (fhl == NULL || *fhl == NULL)
return;
Expand All @@ -117,7 +117,7 @@ mc_fhl_free (mc_fhl_t ** fhl)
/* --------------------------------------------------------------------------------------------- */

void
mc_fhl_clear (mc_fhl_t * fhl)
mc_fhl_clear (mc_fhl_t *fhl)
{
if (fhl != NULL)
{
Expand Down
36 changes: 18 additions & 18 deletions lib/filehighlight/get-color.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

/*inline functions */
inline static gboolean
mc_fhl_is_file (const file_entry_t * fe)
mc_fhl_is_file (const file_entry_t *fe)
{
#if HAVE_S_ISREG == 0
(void) fe;
Expand All @@ -60,15 +60,15 @@ mc_fhl_is_file (const file_entry_t * fe)
/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_file_exec (const file_entry_t * fe)
mc_fhl_is_file_exec (const file_entry_t *fe)
{
return is_exe (fe->st.st_mode);
}

/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_dir (const file_entry_t * fe)
mc_fhl_is_dir (const file_entry_t *fe)
{
#if HAVE_S_ISDIR == 0
(void) fe;
Expand All @@ -79,7 +79,7 @@ mc_fhl_is_dir (const file_entry_t * fe)
/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_link (const file_entry_t * fe)
mc_fhl_is_link (const file_entry_t *fe)
{
#if HAVE_S_ISLNK == 0
(void) fe;
Expand All @@ -90,31 +90,31 @@ mc_fhl_is_link (const file_entry_t * fe)
/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_hlink (const file_entry_t * fe)
mc_fhl_is_hlink (const file_entry_t *fe)
{
return (fe->st.st_nlink > 1);
}

/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_link_to_dir (const file_entry_t * fe)
mc_fhl_is_link_to_dir (const file_entry_t *fe)
{
return mc_fhl_is_link (fe) && fe->f.link_to_dir != 0;
}

/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_stale_link (const file_entry_t * fe)
mc_fhl_is_stale_link (const file_entry_t *fe)
{
return mc_fhl_is_link (fe) ? (fe->f.stale_link != 0) : !mc_fhl_is_file (fe);
}

/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_device_char (const file_entry_t * fe)
mc_fhl_is_device_char (const file_entry_t *fe)
{
#if HAVE_S_ISCHR == 0
(void) fe;
Expand All @@ -125,7 +125,7 @@ mc_fhl_is_device_char (const file_entry_t * fe)
/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_device_block (const file_entry_t * fe)
mc_fhl_is_device_block (const file_entry_t *fe)
{
#if HAVE_S_ISBLK == 0
(void) fe;
Expand All @@ -136,7 +136,7 @@ mc_fhl_is_device_block (const file_entry_t * fe)
/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_special_socket (const file_entry_t * fe)
mc_fhl_is_special_socket (const file_entry_t *fe)
{
#if HAVE_S_ISSOCK == 0
(void) fe;
Expand All @@ -147,7 +147,7 @@ mc_fhl_is_special_socket (const file_entry_t * fe)
/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_special_fifo (const file_entry_t * fe)
mc_fhl_is_special_fifo (const file_entry_t *fe)
{
#if HAVE_S_ISFIFO == 0
(void) fe;
Expand All @@ -158,7 +158,7 @@ mc_fhl_is_special_fifo (const file_entry_t * fe)
/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_special_door (const file_entry_t * fe)
mc_fhl_is_special_door (const file_entry_t *fe)
{
#if HAVE_S_ISDOOR == 0
(void) fe;
Expand All @@ -169,7 +169,7 @@ mc_fhl_is_special_door (const file_entry_t * fe)
/* --------------------------------------------------------------------------------------------- */

inline static gboolean
mc_fhl_is_special (const file_entry_t * fe)
mc_fhl_is_special (const file_entry_t *fe)
{
return
(mc_fhl_is_special_socket (fe) || mc_fhl_is_special_fifo (fe)
Expand All @@ -179,8 +179,8 @@ mc_fhl_is_special (const file_entry_t * fe)
/* --------------------------------------------------------------------------------------------- */

static int
mc_fhl_get_color_filetype (const mc_fhl_filter_t * mc_filter, const mc_fhl_t * fhl,
const file_entry_t * fe)
mc_fhl_get_color_filetype (const mc_fhl_filter_t *mc_filter, const mc_fhl_t *fhl,
const file_entry_t *fe)
{
gboolean my_color = FALSE;

Expand Down Expand Up @@ -258,8 +258,8 @@ mc_fhl_get_color_filetype (const mc_fhl_filter_t * mc_filter, const mc_fhl_t * f
/* --------------------------------------------------------------------------------------------- */

static int
mc_fhl_get_color_regexp (const mc_fhl_filter_t * mc_filter, const mc_fhl_t * fhl,
const file_entry_t * fe)
mc_fhl_get_color_regexp (const mc_fhl_filter_t *mc_filter, const mc_fhl_t *fhl,
const file_entry_t *fe)
{
(void) fhl;

Expand All @@ -277,7 +277,7 @@ mc_fhl_get_color_regexp (const mc_fhl_filter_t * mc_filter, const mc_fhl_t * fhl
/* --------------------------------------------------------------------------------------------- */

int
mc_fhl_get_color (const mc_fhl_t * fhl, const file_entry_t * fe)
mc_fhl_get_color (const mc_fhl_t *fhl, const file_entry_t *fe)
{
guint i;
int ret;
Expand Down
Loading

0 comments on commit 4139bb8

Please sign in to comment.