Skip to content

Commit

Permalink
Merge branch '4490_cleanup'
Browse files Browse the repository at this point in the history
* 4490_cleanup: (31 commits)
  Update po/*.po files.
  ext.d/image.sh: use exiftool in addition to exif to view image metadata.
  ext.d/image.sh: check $DISPLAY in the xpm View action.
  mc.ext.ini: support avif images.
  mc.ext.ini: add View action for webp images.
  Update copyright years.
  (main): call tty_check_term() right after mc_args_parse().
  Refactor learn keys.
  Use g_string_new_take().
  (test_glob_prepare_replace_str): remove unneeded type cast.
  maint/utils/update-years.sh: replaced unportable 'sed -i' command.
  maint/utils/update-years.sh: add src/man2hlp/man2hlp.in.
  src/man2hlp/man2hlp.in: collapse copyright years.
  (str_utf8_offset_to_pos): change type of variable.
  (mc_search_regex__get_max_num_of_replace_tokens): refactor loop.
  lib/widget/input_complete.c: remove intermediate variables.
  mcedit: add intermediate variables to make code more readable and debuggable.
  (is_blank): refactor loop.
  (edit_help): use help node of editor dialog.
  (tree_execute_cmd): move CK_Help handler to separate function tree_help()
  ...
  • Loading branch information
aborodin committed Jan 14, 2024
2 parents 6abea99 + 5e5593e commit e850db3
Show file tree
Hide file tree
Showing 307 changed files with 1,101 additions and 897 deletions.
120 changes: 58 additions & 62 deletions doc/man/ru/mc.1.in

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/charsets.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Text conversion from one charset to another.
Copyright (C) 2001-2023
Copyright (C) 2001-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/event/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Handle events in application.
Interface functions: init/deinit; start/stop
Copyright (C) 2011-2023
Copyright (C) 2011-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/event/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Handle any events in application.
Manage events: add, delete, destroy, search
Copyright (C) 2011-2023
Copyright (C) 2011-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/event/raise.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Handle any events in application.
Raise events.
Copyright (C) 2011-2023
Copyright (C) 2011-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/filehighlight/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
File highlight plugin.
Interface functions
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/filehighlight/get-color.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
File highlight plugin.
Interface functions. get color pair index for highlighted file.
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/filehighlight/ini-file-read.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
File highlight plugin.
Reading and parse rules from ini-files
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
37 changes: 36 additions & 1 deletion lib/glibcompat.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
GLIB - Library of useful routines for C programming
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down Expand Up @@ -140,6 +140,41 @@ g_queue_clear_full (GQueue * queue, GDestroyNotify free_func)

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

#if ! GLIB_CHECK_VERSION (2, 77, 0)
/**
* g_string_new_take:
* @init: (nullable): initial text used as the string.
* Ownership of the string is transferred to the #GString.
* Passing NULL creates an empty string.
*
* Creates a new #GString, initialized with the given string.
*
* After this call, @init belongs to the #GString and may no longer be
* modified by the caller. The memory of @data has to be dynamically
* allocated and will eventually be freed with g_free().
*
* Returns: the new #GString
*/
GString *
g_string_new_take (char *init)
{
GString *string;

if (init == NULL)
return g_string_new (NULL);

string = g_slice_new (GString);

string->str = init;
string->len = strlen (string->str);
string->allocated_len = string->len + 1;

return string;
}
#endif /* ! GLIB_CHECK_VERSION (2, 77, 0) */

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

/**
* mc_g_string_copy:
* @dest: (not nullable): the destination #GString. Its current contents are destroyed
Expand Down
4 changes: 4 additions & 0 deletions lib/glibcompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ void g_clear_list (GList ** list_ptr, GDestroyNotify destroy);
void g_queue_clear_full (GQueue * queue, GDestroyNotify free_func);
#endif /* ! GLIB_CHECK_VERSION (2, 60, 0) */

#if ! GLIB_CHECK_VERSION (2, 77, 0)
GString *g_string_new_take (char *init);
#endif /* ! GLIB_CHECK_VERSION (2, 77, 0) */

/* There is no such API in GLib2 */
GString *mc_g_string_copy (GString * dest, const GString * src);

Expand Down
2 changes: 1 addition & 1 deletion lib/global.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Global structure for some library-related variables
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Slavaz: Warning! this file is deprecated and should be replaced
by mcevents functional.
Copyright (C) 1994-2023
Copyright (C) 1994-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/keybind.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Definitions of key bindings.
Copyright (C) 2005-2023
Copyright (C) 2005-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/lock.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
File locking
Copyright (C) 2003-2023
Copyright (C) 2003-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/logging.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Provides a log file to ease tracing the program.
Copyright (C) 2006-2023
Copyright (C) 2006-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/mcconfig/common.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Configure module for the Midnight Commander
Copyright (C) 1994-2023
Copyright (C) 1994-2024
Free Software Foundation, Inc.
This file is part of the Midnight Commander.
Expand Down
2 changes: 1 addition & 1 deletion lib/mcconfig/get.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Configure module for the Midnight Commander
Copyright (C) 1994-2023
Copyright (C) 1994-2024
Free Software Foundation, Inc.
This file is part of the Midnight Commander.
Expand Down
2 changes: 1 addition & 1 deletion lib/mcconfig/history.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Configure module for the Midnight Commander
Copyright (C) 1994-2023
Copyright (C) 1994-2024
Free Software Foundation, Inc.
Authors:
Expand Down
2 changes: 1 addition & 1 deletion lib/mcconfig/paths.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
paths to configuration files
Copyright (C) 2010-2023
Copyright (C) 2010-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/mcconfig/set.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Configure module for the Midnight Commander
Copyright (C) 1994-2023
Copyright (C) 1994-2024
Free Software Foundation, Inc.
This file is part of the Midnight Commander.
Expand Down
2 changes: 1 addition & 1 deletion lib/search/glob.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Search text engine.
Glob-style pattern matching
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/search/hex.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Search text engine.
HEX-style pattern matching
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/search/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Search text engine.
Common share code for module.
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/search/normal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Search text engine.
Plain search
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
9 changes: 4 additions & 5 deletions lib/search/regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Search text engine.
Regex search
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down Expand Up @@ -397,17 +397,16 @@ mc_search_regex__get_max_num_of_replace_tokens (const gchar * str, gsize len)
{
int max_token = 0;
gsize loop;

for (loop = 0; loop < len - 1; loop++)
{
if (str[loop] == '\\' && g_ascii_isdigit (str[loop + 1]))
{
if (strutils_is_char_escaped (str, &str[loop]))
continue;
if (max_token < str[loop + 1] - '0')
max_token = str[loop + 1] - '0';
continue;
}
if (str[loop] == '$' && str[loop + 1] == '{')
else if (str[loop] == '$' && str[loop + 1] == '{')
{
gsize tmp_len;

Expand All @@ -430,7 +429,7 @@ mc_search_regex__get_max_num_of_replace_tokens (const gchar * str, gsize len)
g_free (tmp_str);
}
}
}

return max_token;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/search/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Search text engine.
Interface functions
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/serialize.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Provides a serialize/unserialize functionality for INI-like formats.
Copyright (C) 2011-2023
Copyright (C) 2011-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/shell.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Provides a functions for working with shell.
Copyright (C) 2006-2023
Copyright (C) 2006-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/skin/colors-old.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Skins engine.
Work with colors - backward compatibility
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/skin/colors.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Skins engine.
Work with colors
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/skin/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Skins engine.
Interface functions
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/skin/hc-skins.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Skins engine.
Set of hardcoded skins
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/skin/ini-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Skins engine.
Reading and parse ini-files
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/skin/lines.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Skins engine.
Work with line draving chars.
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/strutil/replace.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Functions for replacing substrings in strings.
Copyright (C) 2013-2023
Copyright (C) 2013-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/strutil/strescape.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Functions for escaping and unescaping strings
Copyright (C) 2009-2023
Copyright (C) 2009-2024
Free Software Foundation, Inc.
Written by:
Expand Down
2 changes: 1 addition & 1 deletion lib/strutil/strutil.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Common strings utilities
Copyright (C) 2007-2023
Copyright (C) 2007-2024
Free Software Foundation, Inc.
Written by:
Expand Down
Loading

0 comments on commit e850db3

Please sign in to comment.