diff --git a/Makefile.am b/Makefile.am index ec5b4dc3bf..3295f81303 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/configure.ac b/configure.ac index 5cf1f2f743..12556f563b 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/doc/NEWS b/doc/NEWS index 1414d9bfb1..c1a95616c5 100644 --- a/doc/NEWS +++ b/doc/NEWS @@ -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 diff --git a/lib/charsets.c b/lib/charsets.c index ddd113cfe4..0df5ecb210 100644 --- a/lib/charsets.c +++ b/lib/charsets.c @@ -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]; diff --git a/lib/event/event.c b/lib/event/event.c index 1c782f806f..0da1d0ae2d 100644 --- a/lib/event/event.c +++ b/lib/event/event.c @@ -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); @@ -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); @@ -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; @@ -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; diff --git a/lib/event/manage.c b/lib/event/manage.c index 4657af586c..22ae1f8a80 100644 --- a/lib/event/manage.c +++ b/lib/event/manage.c @@ -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; @@ -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; @@ -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; @@ -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) @@ -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; @@ -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; @@ -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; diff --git a/lib/event/raise.c b/lib/event/raise.c index 8806b02fcb..ecad4b7c68 100644 --- a/lib/event/raise.c +++ b/lib/event/raise.c @@ -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; diff --git a/lib/filehighlight/common.c b/lib/filehighlight/common.c index 71994aa859..bff518fd8e 100644 --- a/lib/filehighlight/common.c +++ b/lib/filehighlight/common.c @@ -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) { @@ -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; @@ -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) { diff --git a/lib/filehighlight/get-color.c b/lib/filehighlight/get-color.c index 41224083c6..503a097b17 100644 --- a/lib/filehighlight/get-color.c +++ b/lib/filehighlight/get-color.c @@ -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; @@ -60,7 +60,7 @@ 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); } @@ -68,7 +68,7 @@ mc_fhl_is_file_exec (const file_entry_t * fe) /* --------------------------------------------------------------------------------------------- */ 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; @@ -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; @@ -90,7 +90,7 @@ 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); } @@ -98,7 +98,7 @@ mc_fhl_is_hlink (const file_entry_t * fe) /* --------------------------------------------------------------------------------------------- */ 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; } @@ -106,7 +106,7 @@ mc_fhl_is_link_to_dir (const file_entry_t * fe) /* --------------------------------------------------------------------------------------------- */ 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); } @@ -114,7 +114,7 @@ mc_fhl_is_stale_link (const file_entry_t * 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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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) @@ -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; @@ -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; @@ -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; diff --git a/lib/filehighlight/ini-file-read.c b/lib/filehighlight/ini-file-read.c index 249c143b9f..9dacafee6a 100644 --- a/lib/filehighlight/ini-file-read.c +++ b/lib/filehighlight/ini-file-read.c @@ -52,7 +52,7 @@ /* --------------------------------------------------------------------------------------------- */ static void -mc_fhl_parse_fill_color_info (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, const gchar * group_name) +mc_fhl_parse_fill_color_info (mc_fhl_filter_t *mc_filter, mc_fhl_t *fhl, const gchar *group_name) { (void) fhl; @@ -62,7 +62,7 @@ mc_fhl_parse_fill_color_info (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, const /* --------------------------------------------------------------------------------------------- */ static gboolean -mc_fhl_parse_get_file_type_id (mc_fhl_t * fhl, const gchar * group_name) +mc_fhl_parse_get_file_type_id (mc_fhl_t *fhl, const gchar *group_name) { mc_fhl_filter_t *mc_filter; @@ -107,7 +107,7 @@ mc_fhl_parse_get_file_type_id (mc_fhl_t * fhl, const gchar * group_name) /* --------------------------------------------------------------------------------------------- */ static gboolean -mc_fhl_parse_get_regexp (mc_fhl_t * fhl, const gchar * group_name) +mc_fhl_parse_get_regexp (mc_fhl_t *fhl, const gchar *group_name) { mc_fhl_filter_t *mc_filter; gchar *regexp; @@ -135,7 +135,7 @@ mc_fhl_parse_get_regexp (mc_fhl_t * fhl, const gchar * group_name) /* --------------------------------------------------------------------------------------------- */ static gboolean -mc_fhl_parse_get_extensions (mc_fhl_t * fhl, const gchar * group_name) +mc_fhl_parse_get_extensions (mc_fhl_t *fhl, const gchar *group_name) { mc_fhl_filter_t *mc_filter; gchar **exts, **exts_orig; @@ -185,7 +185,7 @@ mc_fhl_parse_get_extensions (mc_fhl_t * fhl, const gchar * group_name) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_fhl_read_ini_file (mc_fhl_t * fhl, const gchar * filename) +mc_fhl_read_ini_file (mc_fhl_t *fhl, const gchar *filename) { if (fhl == NULL || filename == NULL || !exist_file (filename)) return FALSE; @@ -201,7 +201,7 @@ mc_fhl_read_ini_file (mc_fhl_t * fhl, const gchar * filename) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_fhl_init_from_standard_files (mc_fhl_t * fhl) +mc_fhl_init_from_standard_files (mc_fhl_t *fhl) { gchar *name; gboolean ok; @@ -230,7 +230,7 @@ mc_fhl_init_from_standard_files (mc_fhl_t * fhl) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_fhl_parse_ini_file (mc_fhl_t * fhl) +mc_fhl_parse_ini_file (mc_fhl_t *fhl) { gchar **group_names, **orig_group_names; gboolean ok; diff --git a/lib/fs.h b/lib/fs.h index 40d29f4a35..bb4c705dc8 100644 --- a/lib/fs.h +++ b/lib/fs.h @@ -98,9 +98,6 @@ #define MC_MAXPATHLEN MAXPATHLEN #endif -/* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */ -#define NLENGTH(dirent) (strlen ((dirent)->d_name)) - /* DragonFlyBSD doesn't provide MAXNAMLEN macro */ #ifndef MAXNAMLEN #define MAXNAMLEN NAME_MAX diff --git a/lib/glibcompat.c b/lib/glibcompat.c index 27d81a2476..a5387d41d9 100644 --- a/lib/glibcompat.c +++ b/lib/glibcompat.c @@ -101,8 +101,8 @@ g_direct_equal (gconstpointer v1, gconstpointer v2) * Since: 2.54 */ gboolean -g_ptr_array_find_with_equal_func (GPtrArray * haystack, gconstpointer needle, GEqualFunc equal_func, - guint * index_) +g_ptr_array_find_with_equal_func (GPtrArray *haystack, gconstpointer needle, GEqualFunc equal_func, + guint *index_) { guint i; @@ -138,7 +138,7 @@ g_ptr_array_find_with_equal_func (GPtrArray * haystack, gconstpointer needle, GE * Since: 2.64 */ void -g_clear_slist (GSList ** slist_ptr, GDestroyNotify destroy) +g_clear_slist (GSList **slist_ptr, GDestroyNotify destroy) { GSList *slist; @@ -169,7 +169,7 @@ g_clear_slist (GSList ** slist_ptr, GDestroyNotify destroy) * Since: 2.64 */ void -g_clear_list (GList ** list_ptr, GDestroyNotify destroy) +g_clear_list (GList **list_ptr, GDestroyNotify destroy) { GList *list; @@ -202,7 +202,7 @@ g_clear_list (GList ** list_ptr, GDestroyNotify destroy) * Since: 2.60 */ void -g_queue_clear_full (GQueue * queue, GDestroyNotify free_func) +g_queue_clear_full (GQueue *queue, GDestroyNotify free_func) { g_return_if_fail (queue != NULL); @@ -263,7 +263,7 @@ g_string_new_take (char *init) * There is no such API in GLib2. */ GString * -mc_g_string_copy (GString * dest, const GString * src) +mc_g_string_copy (GString *dest, const GString *src) { g_return_val_if_fail (src != NULL, NULL); g_return_val_if_fail (dest != NULL, NULL); @@ -286,7 +286,7 @@ mc_g_string_copy (GString * dest, const GString * src) * There is no such API in GLib2. */ GString * -mc_g_string_dup (const GString * s) +mc_g_string_dup (const GString *s) { GString *ret = NULL; @@ -297,3 +297,32 @@ mc_g_string_dup (const GString * s) } /* --------------------------------------------------------------------------------------------- */ + +/** + * mc_g_string_append_c_len: + * @s: (not nullable): the destination #GString. + * @c: the byte to append onto the end of @s + * @len: the number of bytes @c to append onto the end of @s + * @return: @s + * + * Adds @len bytes @c onto the end of @s. + * + * There is no such API in GLib2. + */ +GString * +mc_g_string_append_c_len (GString *s, gchar c, guint len) +{ + g_return_val_if_fail (s != NULL, NULL); + + if (len != 0) + { + guint s_len = s->len; + + g_string_set_size (s, s->len + len); + memset (s->str + s_len, (unsigned char) c, len); + } + + return s; +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/lib/glibcompat.h b/lib/glibcompat.h index e2f84f5d93..9ab3b47f50 100644 --- a/lib/glibcompat.h +++ b/lib/glibcompat.h @@ -40,6 +40,9 @@ GString *mc_g_string_copy (GString * dest, const GString * src); /* There is no such API in GLib2 */ GString *mc_g_string_dup (const GString * s); +/* There is no such API in GLib2 */ +GString *mc_g_string_append_c_len (GString * s, gchar c, guint len); + /*** inline functions ****************************************************************************/ #endif /* MC_GLIBCOMPAT_H */ diff --git a/lib/hook.c b/lib/hook.c index 94ae5a9bb9..68b2245311 100644 --- a/lib/hook.c +++ b/lib/hook.c @@ -54,7 +54,7 @@ /* --------------------------------------------------------------------------------------------- */ void -add_hook (hook_t ** hook_list, void (*hook_fn) (void *), void *data) +add_hook (hook_t **hook_list, void (*hook_fn) (void *), void *data) { hook_t *new_hook = g_new (hook_t, 1); @@ -68,7 +68,7 @@ add_hook (hook_t ** hook_list, void (*hook_fn) (void *), void *data) /* --------------------------------------------------------------------------------------------- */ void -execute_hooks (hook_t * hook_list) +execute_hooks (hook_t *hook_list) { hook_t *new_hook = NULL; hook_t *p; @@ -101,7 +101,7 @@ execute_hooks (hook_t * hook_list) /* --------------------------------------------------------------------------------------------- */ void -delete_hook (hook_t ** hook_list, void (*hook_fn) (void *)) +delete_hook (hook_t **hook_list, void (*hook_fn) (void *)) { hook_t *new_list = NULL; hook_t *current, *next; @@ -120,7 +120,7 @@ delete_hook (hook_t ** hook_list, void (*hook_fn) (void *)) /* --------------------------------------------------------------------------------------------- */ gboolean -hook_present (hook_t * hook_list, void (*hook_fn) (void *)) +hook_present (hook_t *hook_list, void (*hook_fn) (void *)) { hook_t *p; diff --git a/lib/keybind.c b/lib/keybind.c index 2fed74ec13..c0b8820910 100644 --- a/lib/keybind.c +++ b/lib/keybind.c @@ -415,7 +415,7 @@ sort_command_names (void) /* --------------------------------------------------------------------------------------------- */ static void -keymap_add (GArray * keymap, long key, long cmd, const char *caption) +keymap_add (GArray *keymap, long key, long cmd, const char *caption) { if (key != 0 && cmd != CK_IgnoreKey) { @@ -433,7 +433,7 @@ keymap_add (GArray * keymap, long key, long cmd, const char *caption) /* --------------------------------------------------------------------------------------------- */ void -keybind_cmd_bind (GArray * keymap, const char *keybind, long action) +keybind_cmd_bind (GArray *keymap, const char *keybind, long action) { char *caption = NULL; long key; @@ -476,7 +476,7 @@ keybind_lookup_actionname (long action) /* --------------------------------------------------------------------------------------------- */ const char * -keybind_lookup_keymap_shortcut (const global_keymap_t * keymap, long action) +keybind_lookup_keymap_shortcut (const global_keymap_t *keymap, long action) { if (keymap != NULL) { @@ -492,7 +492,7 @@ keybind_lookup_keymap_shortcut (const global_keymap_t * keymap, long action) /* --------------------------------------------------------------------------------------------- */ long -keybind_lookup_keymap_command (const global_keymap_t * keymap, long key) +keybind_lookup_keymap_command (const global_keymap_t *keymap, long key) { if (keymap != NULL) { diff --git a/lib/lock.c b/lib/lock.c index 204b17b030..71691ee417 100644 --- a/lib/lock.c +++ b/lib/lock.c @@ -116,7 +116,7 @@ lock_build_name (void) /* --------------------------------------------------------------------------------------------- */ static char * -lock_build_symlink_name (const vfs_path_t * fname_vpath) +lock_build_symlink_name (const vfs_path_t *fname_vpath) { const char *elpath; char *str_filename, *str_dirname, *symlink_name; @@ -197,7 +197,7 @@ lock_get_info (const char *lockfname) Warning: Might do screen refresh and lose edit->force */ int -lock_file (const vfs_path_t * fname_vpath) +lock_file (const vfs_path_t *fname_vpath) { char *lockfname = NULL, *newlock, *msg; struct stat statbuf; @@ -276,7 +276,7 @@ lock_file (const vfs_path_t * fname_vpath) */ int -unlock_file (const vfs_path_t * fname_vpath) +unlock_file (const vfs_path_t *fname_vpath) { char *lockfname; const char *elpath; diff --git a/lib/mcconfig/common.c b/lib/mcconfig/common.c index 4891a39f3c..e821e94bf7 100644 --- a/lib/mcconfig/common.c +++ b/lib/mcconfig/common.c @@ -48,7 +48,7 @@ /* --------------------------------------------------------------------------------------------- */ static gboolean -mc_config_new_or_override_file (mc_config_t * mc_config, const gchar * ini_path, GError ** mcerror) +mc_config_new_or_override_file (mc_config_t *mc_config, const gchar *ini_path, GError **mcerror) { gchar *data, *written_data; gsize len, total_written; @@ -104,7 +104,7 @@ mc_config_new_or_override_file (mc_config_t * mc_config, const gchar * ini_path, /* --------------------------------------------------------------------------------------------- */ mc_config_t * -mc_config_init (const gchar * ini_path, gboolean read_only) +mc_config_init (const gchar *ini_path, gboolean read_only) { mc_config_t *mc_config; struct stat st; @@ -148,7 +148,7 @@ mc_config_init (const gchar * ini_path, gboolean read_only) /* --------------------------------------------------------------------------------------------- */ void -mc_config_deinit (mc_config_t * mc_config) +mc_config_deinit (mc_config_t *mc_config) { if (mc_config != NULL) { @@ -161,7 +161,7 @@ mc_config_deinit (mc_config_t * mc_config) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_config_has_param (const mc_config_t * mc_config, const char *group, const gchar * param) +mc_config_has_param (const mc_config_t *mc_config, const char *group, const gchar *param) { char *value; gboolean ret; @@ -178,7 +178,7 @@ mc_config_has_param (const mc_config_t * mc_config, const char *group, const gch /* --------------------------------------------------------------------------------------------- */ gboolean -mc_config_has_group (mc_config_t * mc_config, const char *group) +mc_config_has_group (mc_config_t *mc_config, const char *group) { if (mc_config == NULL || group == NULL) return FALSE; @@ -189,7 +189,7 @@ mc_config_has_group (mc_config_t * mc_config, const char *group) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_config_del_key (mc_config_t * mc_config, const char *group, const gchar * param) +mc_config_del_key (mc_config_t *mc_config, const char *group, const gchar *param) { if (mc_config == NULL || group == NULL || param == NULL) return FALSE; @@ -200,7 +200,7 @@ mc_config_del_key (mc_config_t * mc_config, const char *group, const gchar * par /* --------------------------------------------------------------------------------------------- */ gboolean -mc_config_del_group (mc_config_t * mc_config, const char *group) +mc_config_del_group (mc_config_t *mc_config, const char *group) { if (mc_config == NULL || group == NULL) return FALSE; @@ -211,7 +211,7 @@ mc_config_del_group (mc_config_t * mc_config, const char *group) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_config_read_file (mc_config_t * mc_config, const gchar * ini_path, gboolean read_only, +mc_config_read_file (mc_config_t *mc_config, const gchar *ini_path, gboolean read_only, gboolean remove_empty) { mc_config_t *tmp_config; @@ -261,7 +261,7 @@ mc_config_read_file (mc_config_t * mc_config, const gchar * ini_path, gboolean r /* --------------------------------------------------------------------------------------------- */ gboolean -mc_config_save_file (mc_config_t * mc_config, GError ** mcerror) +mc_config_save_file (mc_config_t *mc_config, GError **mcerror) { mc_return_val_if_error (mcerror, FALSE); @@ -274,7 +274,7 @@ mc_config_save_file (mc_config_t * mc_config, GError ** mcerror) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_config_save_to_file (mc_config_t * mc_config, const gchar * ini_path, GError ** mcerror) +mc_config_save_to_file (mc_config_t *mc_config, const gchar *ini_path, GError **mcerror) { mc_return_val_if_error (mcerror, FALSE); diff --git a/lib/mcconfig/get.c b/lib/mcconfig/get.c index 4793b6191e..00cc0e10de 100644 --- a/lib/mcconfig/get.c +++ b/lib/mcconfig/get.c @@ -46,7 +46,7 @@ /* --------------------------------------------------------------------------------------------- */ gchar ** -mc_config_get_groups (const mc_config_t * mc_config, gsize * len) +mc_config_get_groups (const mc_config_t *mc_config, gsize *len) { gchar **ret = NULL; @@ -66,7 +66,7 @@ mc_config_get_groups (const mc_config_t * mc_config, gsize * len) /* --------------------------------------------------------------------------------------------- */ gchar ** -mc_config_get_keys (const mc_config_t * mc_config, const gchar * group, gsize * len) +mc_config_get_keys (const mc_config_t *mc_config, const gchar *group, gsize *len) { gchar **ret = NULL; @@ -86,8 +86,8 @@ mc_config_get_keys (const mc_config_t * mc_config, const gchar * group, gsize * /* --------------------------------------------------------------------------------------------- */ gchar * -mc_config_get_string (mc_config_t * mc_config, const gchar * group, - const gchar * param, const gchar * def) +mc_config_get_string (mc_config_t *mc_config, const gchar *group, + const gchar *param, const gchar *def) { GIConv conv; GString *buffer; @@ -121,8 +121,8 @@ mc_config_get_string (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ gchar * -mc_config_get_string_raw (mc_config_t * mc_config, const gchar * group, - const gchar * param, const gchar * def) +mc_config_get_string_raw (mc_config_t *mc_config, const gchar *group, + const gchar *param, const gchar *def) { gchar *ret; @@ -144,7 +144,7 @@ mc_config_get_string_raw (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ gboolean -mc_config_get_bool (mc_config_t * mc_config, const gchar * group, const gchar * param, gboolean def) +mc_config_get_bool (mc_config_t *mc_config, const gchar *group, const gchar *param, gboolean def) { if (mc_config == NULL || group == NULL || param == NULL) return def; @@ -161,7 +161,7 @@ mc_config_get_bool (mc_config_t * mc_config, const gchar * group, const gchar * /* --------------------------------------------------------------------------------------------- */ int -mc_config_get_int (mc_config_t * mc_config, const gchar * group, const gchar * param, int def) +mc_config_get_int (mc_config_t *mc_config, const gchar *group, const gchar *param, int def) { if (mc_config == NULL || group == NULL || param == NULL) return def; @@ -178,8 +178,8 @@ mc_config_get_int (mc_config_t * mc_config, const gchar * group, const gchar * p /* --------------------------------------------------------------------------------------------- */ gchar ** -mc_config_get_string_list (mc_config_t * mc_config, const gchar * group, - const gchar * param, gsize * length) +mc_config_get_string_list (mc_config_t *mc_config, const gchar *group, + const gchar *param, gsize *length) { if (mc_config == NULL || group == NULL || param == NULL) return NULL; @@ -190,8 +190,8 @@ mc_config_get_string_list (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ gboolean * -mc_config_get_bool_list (mc_config_t * mc_config, const gchar * group, - const gchar * param, gsize * length) +mc_config_get_bool_list (mc_config_t *mc_config, const gchar *group, + const gchar *param, gsize *length) { if (mc_config == NULL || group == NULL || param == NULL) return NULL; @@ -202,8 +202,8 @@ mc_config_get_bool_list (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ int * -mc_config_get_int_list (mc_config_t * mc_config, const gchar * group, - const gchar * param, gsize * length) +mc_config_get_int_list (mc_config_t *mc_config, const gchar *group, + const gchar *param, gsize *length) { if (mc_config == NULL || group == NULL || param == NULL) return NULL; diff --git a/lib/mcconfig/history.c b/lib/mcconfig/history.c index 57249c4c37..7724d4f7d2 100644 --- a/lib/mcconfig/history.c +++ b/lib/mcconfig/history.c @@ -125,7 +125,7 @@ mc_config_history_get_recent_item (const char *name) * Load history from the mc_config */ GList * -mc_config_history_load (mc_config_t * cfg, const char *name) +mc_config_history_load (mc_config_t *cfg, const char *name) { size_t i; GList *hist = NULL; @@ -188,7 +188,7 @@ mc_config_history_load (mc_config_t * cfg, const char *name) * Save history to the mc_config, but don't save config to file */ void -mc_config_history_save (mc_config_t * cfg, const char *name, GList * h) +mc_config_history_save (mc_config_t *cfg, const char *name, GList *h) { GIConv conv = INVALID_CONV; GString *buffer; diff --git a/lib/mcconfig/paths.c b/lib/mcconfig/paths.c index fbb71c3f6c..94ac1b4312 100644 --- a/lib/mcconfig/paths.c +++ b/lib/mcconfig/paths.c @@ -56,8 +56,7 @@ static const struct { char **basedir; const char *filename; -} mc_config_files_reference[] = -{ +} mc_config_files_reference[] = { /* *INDENT-OFF* */ /* config */ { &mc_config_str, MC_CONFIG_FILE }, @@ -101,7 +100,7 @@ static const struct /* --------------------------------------------------------------------------------------------- */ static void -mc_config_mkdir (const char *directory_name, GError ** mcerror) +mc_config_mkdir (const char *directory_name, GError **mcerror) { mc_return_if_error (mcerror); @@ -113,7 +112,7 @@ mc_config_mkdir (const char *directory_name, GError ** mcerror) /* --------------------------------------------------------------------------------------------- */ static char * -mc_config_init_one_config_path (const char *path_base, const char *subdir, GError ** mcerror) +mc_config_init_one_config_path (const char *path_base, const char *subdir, GError **mcerror) { char *full_path; @@ -144,7 +143,7 @@ mc_config_init_one_config_path (const char *path_base, const char *subdir, GErro /* --------------------------------------------------------------------------------------------- */ void -mc_config_init_config_paths (GError ** mcerror) +mc_config_init_config_paths (GError **mcerror) { const char *profile_root; char *dir; diff --git a/lib/mcconfig/set.c b/lib/mcconfig/set.c index ce6d887ba3..ded0bb856e 100644 --- a/lib/mcconfig/set.c +++ b/lib/mcconfig/set.c @@ -42,7 +42,7 @@ /* --------------------------------------------------------------------------------------------- */ static gchar * -mc_config_normalize_before_save (const gchar * value) +mc_config_normalize_before_save (const gchar *value) { GIConv conv; GString *buffer; @@ -74,8 +74,8 @@ mc_config_normalize_before_save (const gchar * value) /* --------------------------------------------------------------------------------------------- */ void -mc_config_set_string_raw (mc_config_t * mc_config, const gchar * group, - const gchar * param, const gchar * value) +mc_config_set_string_raw (mc_config_t *mc_config, const gchar *group, + const gchar *param, const gchar *value) { if (mc_config != NULL && group != NULL && param != NULL && value != NULL) g_key_file_set_string (mc_config->handle, group, param, value); @@ -84,8 +84,8 @@ mc_config_set_string_raw (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ void -mc_config_set_string_raw_value (mc_config_t * mc_config, const gchar * group, - const gchar * param, const gchar * value) +mc_config_set_string_raw_value (mc_config_t *mc_config, const gchar *group, + const gchar *param, const gchar *value) { if (mc_config != NULL && group != NULL && param != NULL && value != NULL) g_key_file_set_value (mc_config->handle, group, param, value); @@ -94,8 +94,8 @@ mc_config_set_string_raw_value (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ void -mc_config_set_string (mc_config_t * mc_config, const gchar * group, - const gchar * param, const gchar * value) +mc_config_set_string (mc_config_t *mc_config, const gchar *group, + const gchar *param, const gchar *value) { if (mc_config != NULL && group != NULL && param != NULL && value != NULL) { @@ -110,8 +110,7 @@ mc_config_set_string (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ void -mc_config_set_bool (mc_config_t * mc_config, const gchar * group, - const gchar * param, gboolean value) +mc_config_set_bool (mc_config_t *mc_config, const gchar *group, const gchar *param, gboolean value) { if (mc_config != NULL && group != NULL && param != NULL) g_key_file_set_boolean (mc_config->handle, group, param, value); @@ -120,7 +119,7 @@ mc_config_set_bool (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ void -mc_config_set_int (mc_config_t * mc_config, const gchar * group, const gchar * param, int value) +mc_config_set_int (mc_config_t *mc_config, const gchar *group, const gchar *param, int value) { if (mc_config != NULL && group != NULL && param != NULL) g_key_file_set_integer (mc_config->handle, group, param, value); @@ -129,8 +128,8 @@ mc_config_set_int (mc_config_t * mc_config, const gchar * group, const gchar * p /* --------------------------------------------------------------------------------------------- */ void -mc_config_set_string_list (mc_config_t * mc_config, const gchar * group, - const gchar * param, const gchar * const value[], gsize length) +mc_config_set_string_list (mc_config_t *mc_config, const gchar *group, + const gchar *param, const gchar *const value[], gsize length) { if (mc_config != NULL && group != NULL && param != NULL && value != NULL && length != 0) g_key_file_set_string_list (mc_config->handle, group, param, value, length); @@ -139,8 +138,8 @@ mc_config_set_string_list (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ void -mc_config_set_bool_list (mc_config_t * mc_config, const gchar * group, - const gchar * param, gboolean value[], gsize length) +mc_config_set_bool_list (mc_config_t *mc_config, const gchar *group, + const gchar *param, gboolean value[], gsize length) { if (mc_config != NULL && group != NULL && param != NULL && value != NULL && length != 0) g_key_file_set_boolean_list (mc_config->handle, group, param, value, length); @@ -149,8 +148,8 @@ mc_config_set_bool_list (mc_config_t * mc_config, const gchar * group, /* --------------------------------------------------------------------------------------------- */ void -mc_config_set_int_list (mc_config_t * mc_config, const gchar * group, - const gchar * param, int value[], gsize length) +mc_config_set_int_list (mc_config_t *mc_config, const gchar *group, + const gchar *param, int value[], gsize length) { if (mc_config != NULL && group != NULL && param != NULL && value != NULL && length != 0) g_key_file_set_integer_list (mc_config->handle, group, param, value, length); diff --git a/lib/search.h b/lib/search.h index 07372c2592..71a77ac26f 100644 --- a/lib/search.h +++ b/lib/search.h @@ -173,14 +173,14 @@ gboolean mc_search_run (mc_search_t * mc_search, const void *user_data, gsize st gboolean mc_search_is_type_avail (mc_search_type_t search_type); -const mc_search_type_str_t *mc_search_types_list_get (size_t * num); +const mc_search_type_str_t *mc_search_types_list_get (size_t *num); GString *mc_search_prepare_replace_str (mc_search_t * mc_search, GString * replace_str); char *mc_search_prepare_replace_str2 (mc_search_t * lc_mc_search, const char *replace_str); gboolean mc_search_is_fixed_search_str (const mc_search_t * lc_mc_search); -gchar **mc_search_get_types_strings_array (size_t * num); +gchar **mc_search_get_types_strings_array (size_t *num); gboolean mc_search (const gchar * pattern, const gchar * pattern_charset, const gchar * str, mc_search_type_t type); diff --git a/lib/search/glob.c b/lib/search/glob.c index c2c711672b..8e514e10ab 100644 --- a/lib/search/glob.c +++ b/lib/search/glob.c @@ -47,9 +47,8 @@ /* --------------------------------------------------------------------------------------------- */ static GString * -mc_search__glob_translate_to_regex (const GString * astr) +mc_search__glob_translate_to_regex (const GString *astr) { - const char *str = astr->str; GString *buff; gsize loop; gboolean inside_group = FALSE; @@ -58,31 +57,36 @@ mc_search__glob_translate_to_regex (const GString * astr) for (loop = 0; loop < astr->len; loop++) { + const char *str = astr->str; + gboolean not_escaped; + + not_escaped = !str_is_char_escaped (str, str + loop); + switch (str[loop]) { case '*': - if (!str_is_char_escaped (str, &(str[loop]))) + if (not_escaped) { g_string_append (buff, inside_group ? ".*" : "(.*)"); continue; } break; case '?': - if (!str_is_char_escaped (str, &(str[loop]))) + if (not_escaped) { g_string_append (buff, inside_group ? "." : "(.)"); continue; } break; case ',': - if (!str_is_char_escaped (str, &(str[loop]))) + if (not_escaped) { g_string_append_c (buff, inside_group ? '|' : ','); continue; } break; case '{': - if (!str_is_char_escaped (str, &(str[loop]))) + if (not_escaped) { g_string_append_c (buff, '('); inside_group = TRUE; @@ -90,7 +94,7 @@ mc_search__glob_translate_to_regex (const GString * astr) } break; case '}': - if (!str_is_char_escaped (str, &(str[loop]))) + if (not_escaped) { g_string_append_c (buff, ')'); inside_group = FALSE; @@ -162,8 +166,8 @@ mc_search__translate_replace_glob_to_regex (const char *str) /*** public functions ****************************************************************************/ void -mc_search__cond_struct_new_init_glob (const char *charset, mc_search_t * lc_mc_search, - mc_search_cond_t * mc_search_cond) +mc_search__cond_struct_new_init_glob (const char *charset, mc_search_t *lc_mc_search, + mc_search_cond_t *mc_search_cond) { GString *tmp; @@ -183,8 +187,8 @@ mc_search__cond_struct_new_init_glob (const char *charset, mc_search_t * lc_mc_s /* --------------------------------------------------------------------------------------------- */ gboolean -mc_search__run_glob (mc_search_t * lc_mc_search, const void *user_data, - gsize start_search, gsize end_search, gsize * found_len) +mc_search__run_glob (mc_search_t *lc_mc_search, const void *user_data, + gsize start_search, gsize end_search, gsize *found_len) { return mc_search__run_regex (lc_mc_search, user_data, start_search, end_search, found_len); } @@ -192,7 +196,7 @@ mc_search__run_glob (mc_search_t * lc_mc_search, const void *user_data, /* --------------------------------------------------------------------------------------------- */ GString * -mc_search_glob_prepare_replace_str (mc_search_t * lc_mc_search, GString * replace_str) +mc_search_glob_prepare_replace_str (mc_search_t *lc_mc_search, GString *replace_str) { GString *repl, *res; diff --git a/lib/search/hex.c b/lib/search/hex.c index 4860805c46..61478c11dd 100644 --- a/lib/search/hex.c +++ b/lib/search/hex.c @@ -57,7 +57,7 @@ typedef enum /* --------------------------------------------------------------------------------------------- */ static GString * -mc_search__hex_translate_to_regex (const GString * astr, mc_search_hex_parse_error_t * error_ptr, +mc_search__hex_translate_to_regex (const GString *astr, mc_search_hex_parse_error_t *error_ptr, int *error_pos_ptr) { GString *buff; @@ -135,8 +135,8 @@ mc_search__hex_translate_to_regex (const GString * astr, mc_search_hex_parse_err /* --------------------------------------------------------------------------------------------- */ void -mc_search__cond_struct_new_init_hex (const char *charset, mc_search_t * lc_mc_search, - mc_search_cond_t * mc_search_cond) +mc_search__cond_struct_new_init_hex (const char *charset, mc_search_t *lc_mc_search, + mc_search_cond_t *mc_search_cond) { GString *tmp; mc_search_hex_parse_error_t error = MC_SEARCH_HEX_E_OK; @@ -215,8 +215,8 @@ mc_search__cond_struct_new_init_hex (const char *charset, mc_search_t * lc_mc_se /* --------------------------------------------------------------------------------------------- */ gboolean -mc_search__run_hex (mc_search_t * lc_mc_search, const void *user_data, - gsize start_search, gsize end_search, gsize * found_len) +mc_search__run_hex (mc_search_t *lc_mc_search, const void *user_data, + gsize start_search, gsize end_search, gsize *found_len) { return mc_search__run_regex (lc_mc_search, user_data, start_search, end_search, found_len); } @@ -224,7 +224,7 @@ mc_search__run_hex (mc_search_t * lc_mc_search, const void *user_data, /* --------------------------------------------------------------------------------------------- */ GString * -mc_search_hex_prepare_replace_str (mc_search_t * lc_mc_search, GString * replace_str) +mc_search_hex_prepare_replace_str (mc_search_t *lc_mc_search, GString *replace_str) { (void) lc_mc_search; diff --git a/lib/search/lib.c b/lib/search/lib.c index 1158e833a3..f4a85a8683 100644 --- a/lib/search/lib.c +++ b/lib/search/lib.c @@ -53,7 +53,7 @@ const char *STR_E_RPL_INVALID_TOKEN = N_("Invalid token number %d"); /*** file scope type declarations ****************************************************************/ -typedef gboolean (*case_conv_fn) (const char *ch, char **out, size_t * remain); +typedef gboolean (*case_conv_fn) (const char *ch, char **out, size_t *remain); /*** forward declarations (file scope functions) *************************************************/ @@ -64,7 +64,7 @@ typedef gboolean (*case_conv_fn) (const char *ch, char **out, size_t * remain); /* --------------------------------------------------------------------------------------------- */ static GString * -mc_search__change_case_str (const char *charset, const GString * str, case_conv_fn case_conv) +mc_search__change_case_str (const char *charset, const GString *str, case_conv_fn case_conv) { GString *ret; const char *src_ptr; @@ -153,7 +153,7 @@ mc_search__recode_str (const char *str, gsize str_len, const char *charset_from, GString * mc_search__get_one_symbol (const char *charset, const char *str, gsize str_len, - gboolean * just_letters) + gboolean *just_letters) { GString *converted_str; const gchar *next_char; @@ -191,7 +191,7 @@ mc_search__get_one_symbol (const char *charset, const char *str, gsize str_len, /* --------------------------------------------------------------------------------------------- */ GString * -mc_search__tolower_case_str (const char *charset, const GString * str) +mc_search__tolower_case_str (const char *charset, const GString *str) { return mc_search__change_case_str (charset, str, str_tolower); } @@ -199,7 +199,7 @@ mc_search__tolower_case_str (const char *charset, const GString * str) /* --------------------------------------------------------------------------------------------- */ GString * -mc_search__toupper_case_str (const char *charset, const GString * str) +mc_search__toupper_case_str (const char *charset, const GString *str) { return mc_search__change_case_str (charset, str, str_toupper); } @@ -207,7 +207,7 @@ mc_search__toupper_case_str (const char *charset, const GString * str) /* --------------------------------------------------------------------------------------------- */ gchar ** -mc_search_get_types_strings_array (size_t * num) +mc_search_get_types_strings_array (size_t *num) { gchar **ret; int lc_index; diff --git a/lib/search/normal.c b/lib/search/normal.c index 9d86b44ad6..9e788e63ad 100644 --- a/lib/search/normal.c +++ b/lib/search/normal.c @@ -47,7 +47,7 @@ /* --------------------------------------------------------------------------------------------- */ static void -mc_search__normal_translate_to_regex (GString * str) +mc_search__normal_translate_to_regex (GString *str) { gsize loop; @@ -72,6 +72,7 @@ mc_search__normal_translate_to_regex (GString * str) case '|': g_string_insert_c (str, loop, '\\'); loop++; + break; default: break; } @@ -82,8 +83,8 @@ mc_search__normal_translate_to_regex (GString * str) /* --------------------------------------------------------------------------------------------- */ void -mc_search__cond_struct_new_init_normal (const char *charset, mc_search_t * lc_mc_search, - mc_search_cond_t * mc_search_cond) +mc_search__cond_struct_new_init_normal (const char *charset, mc_search_t *lc_mc_search, + mc_search_cond_t *mc_search_cond) { mc_search__normal_translate_to_regex (mc_search_cond->str); mc_search__cond_struct_new_init_regex (charset, lc_mc_search, mc_search_cond); @@ -92,15 +93,15 @@ mc_search__cond_struct_new_init_normal (const char *charset, mc_search_t * lc_mc /* --------------------------------------------------------------------------------------------- */ gboolean -mc_search__run_normal (mc_search_t * lc_mc_search, const void *user_data, - gsize start_search, gsize end_search, gsize * found_len) +mc_search__run_normal (mc_search_t *lc_mc_search, const void *user_data, + gsize start_search, gsize end_search, gsize *found_len) { return mc_search__run_regex (lc_mc_search, user_data, start_search, end_search, found_len); } /* --------------------------------------------------------------------------------------------- */ GString * -mc_search_normal_prepare_replace_str (mc_search_t * lc_mc_search, GString * replace_str) +mc_search_normal_prepare_replace_str (mc_search_t *lc_mc_search, GString *replace_str) { (void) lc_mc_search; diff --git a/lib/search/regex.c b/lib/search/regex.c index a0f255f67e..465c3d3449 100644 --- a/lib/search/regex.c +++ b/lib/search/regex.c @@ -65,8 +65,7 @@ typedef enum /* --------------------------------------------------------------------------------------------- */ static gboolean -mc_search__regex_str_append_if_special (GString * copy_to, const GString * regex_str, - gsize * offset) +mc_search__regex_str_append_if_special (GString *copy_to, const GString *regex_str, gsize *offset) { const char *special_chars[] = { "\\s", "\\S", @@ -123,8 +122,8 @@ mc_search__regex_str_append_if_special (GString * copy_to, const GString * regex /* --------------------------------------------------------------------------------------------- */ static void -mc_search__cond_struct_new_regex_hex_add (const char *charset, GString * str_to, - const GString * one_char) +mc_search__cond_struct_new_regex_hex_add (const char *charset, GString *str_to, + const GString *one_char) { GString *upp, *low; gsize loop; @@ -155,8 +154,8 @@ mc_search__cond_struct_new_regex_hex_add (const char *charset, GString * str_to, /* --------------------------------------------------------------------------------------------- */ static void -mc_search__cond_struct_new_regex_accum_append (const char *charset, GString * str_to, - GString * str_from) +mc_search__cond_struct_new_regex_accum_append (const char *charset, GString *str_to, + GString *str_from) { GString *recoded_part; gsize loop = 0; @@ -208,7 +207,7 @@ mc_search__cond_struct_new_regex_accum_append (const char *charset, GString * st * this job itself. */ static GString * -mc_search__cond_struct_new_regex_ci_str (const char *charset, const GString * astr) +mc_search__cond_struct_new_regex_ci_str (const char *charset, const GString *astr) { GString *accumulator, *spec_char, *ret_str; gsize loop; @@ -265,12 +264,12 @@ mc_search__cond_struct_new_regex_ci_str (const char *charset, const GString * as * requirement by glib and it might crash otherwise. See: mc ticket 3449. * Be careful: there might be embedded NULs in the strings. */ static gboolean -mc_search__g_regex_match_full_safe (const GRegex * regex, - const gchar * string, +mc_search__g_regex_match_full_safe (const GRegex *regex, + const gchar *string, gssize string_len, gint start_position, GRegexMatchFlags match_options, - GMatchInfo ** match_info, GError ** error) + GMatchInfo **match_info, GError **error) { char *string_safe, *p, *end; gboolean ret; @@ -318,8 +317,8 @@ mc_search__g_regex_match_full_safe (const GRegex * regex, /* --------------------------------------------------------------------------------------------- */ static mc_search__found_cond_t -mc_search__regex_found_cond_one (mc_search_t * lc_mc_search, mc_search_regex_t * regex, - GString * search_str) +mc_search__regex_found_cond_one (mc_search_t *lc_mc_search, mc_search_regex_t *regex, + GString *search_str) { #ifdef SEARCH_TYPE_GLIB GError *mcerror = NULL; @@ -364,7 +363,7 @@ mc_search__regex_found_cond_one (mc_search_t * lc_mc_search, mc_search_regex_t * /* --------------------------------------------------------------------------------------------- */ static mc_search__found_cond_t -mc_search__regex_found_cond (mc_search_t * lc_mc_search, GString * search_str) +mc_search__regex_found_cond (mc_search_t *lc_mc_search, GString *search_str) { gsize loop1; @@ -391,7 +390,7 @@ mc_search__regex_found_cond (mc_search_t * lc_mc_search, GString * search_str) /* --------------------------------------------------------------------------------------------- */ static int -mc_search_regex__get_max_num_of_replace_tokens (const gchar * str, gsize len) +mc_search_regex__get_max_num_of_replace_tokens (const gchar *str, gsize len) { int max_token = 0; gsize loop; @@ -434,7 +433,7 @@ mc_search_regex__get_max_num_of_replace_tokens (const gchar * str, gsize len) /* --------------------------------------------------------------------------------------------- */ static char * -mc_search_regex__get_token_by_num (const mc_search_t * lc_mc_search, gsize lc_index) +mc_search_regex__get_token_by_num (const mc_search_t *lc_mc_search, gsize lc_index) { int fnd_start = 0, fnd_end = 0; @@ -455,8 +454,8 @@ mc_search_regex__get_token_by_num (const mc_search_t * lc_mc_search, gsize lc_in /* --------------------------------------------------------------------------------------------- */ static gboolean -mc_search_regex__replace_handle_esc_seq (const GString * replace_str, const gsize current_pos, - gsize * skip_len, int *ret) +mc_search_regex__replace_handle_esc_seq (const GString *replace_str, const gsize current_pos, + gsize *skip_len, int *ret) { char *curr_str = &(replace_str->str[current_pos]); char c = curr_str[1]; @@ -537,8 +536,8 @@ mc_search_regex__replace_handle_esc_seq (const GString * replace_str, const gsiz /* --------------------------------------------------------------------------------------------- */ static int -mc_search_regex__process_replace_str (const GString * replace_str, const gsize current_pos, - gsize * skip_len, replace_transform_type_t * replace_flags) +mc_search_regex__process_replace_str (const GString *replace_str, const gsize current_pos, + gsize *skip_len, replace_transform_type_t *replace_flags) { int ret = -1; const char *curr_str = &(replace_str->str[current_pos]); @@ -629,8 +628,8 @@ mc_search_regex__process_replace_str (const GString * replace_str, const gsize c /* --------------------------------------------------------------------------------------------- */ static void -mc_search_regex__process_append_str (GString * dest_str, const char *from, gsize len, - replace_transform_type_t * replace_flags) +mc_search_regex__process_append_str (GString *dest_str, const char *from, gsize len, + replace_transform_type_t *replace_flags) { gsize loop; gsize char_len; @@ -684,9 +683,8 @@ mc_search_regex__process_append_str (GString * dest_str, const char *from, gsize /* --------------------------------------------------------------------------------------------- */ static void -mc_search_regex__process_escape_sequence (GString * dest_str, const char *from, gsize len, - replace_transform_type_t * replace_flags, - gboolean is_utf8) +mc_search_regex__process_escape_sequence (GString *dest_str, const char *from, gsize len, + replace_transform_type_t *replace_flags, gboolean is_utf8) { gsize i = 0; unsigned int c = 0; @@ -789,8 +787,8 @@ mc_search_regex__process_escape_sequence (GString * dest_str, const char *from, /* --------------------------------------------------------------------------------------------- */ void -mc_search__cond_struct_new_init_regex (const char *charset, mc_search_t * lc_mc_search, - mc_search_cond_t * mc_search_cond) +mc_search__cond_struct_new_init_regex (const char *charset, mc_search_t *lc_mc_search, + mc_search_cond_t *mc_search_cond) { if (lc_mc_search->whole_words && !lc_mc_search->is_entire_line) { @@ -906,8 +904,8 @@ mc_search__cond_struct_new_init_regex (const char *charset, mc_search_t * lc_mc_ /* --------------------------------------------------------------------------------------------- */ gboolean -mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data, - gsize start_search, gsize end_search, gsize * found_len) +mc_search__run_regex (mc_search_t *lc_mc_search, const void *user_data, + gsize start_search, gsize end_search, gsize *found_len) { mc_search_cbret_t ret = MC_SEARCH_CB_NOTFOUND; gsize current_pos, virtual_pos; @@ -1018,7 +1016,7 @@ mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data, /* --------------------------------------------------------------------------------------------- */ GString * -mc_search_regex_prepare_replace_str (mc_search_t * lc_mc_search, GString * replace_str) +mc_search_regex_prepare_replace_str (mc_search_t *lc_mc_search, GString *replace_str) { GString *ret; diff --git a/lib/search/search.c b/lib/search/search.c index ddbdc2b5f3..0c7343fdfb 100644 --- a/lib/search/search.c +++ b/lib/search/search.c @@ -64,7 +64,7 @@ static const mc_search_type_str_t mc_search__list_types[] = { /* --------------------------------------------------------------------------------------------- */ static mc_search_cond_t * -mc_search__cond_struct_new (mc_search_t * lc_mc_search, const GString * str, const char *charset) +mc_search__cond_struct_new (mc_search_t *lc_mc_search, const GString *str, const char *charset) { mc_search_cond_t *mc_search_cond; @@ -133,7 +133,7 @@ mc_search__cond_struct_free (gpointer data) */ mc_search_t * -mc_search_new (const gchar * original, const gchar * original_charset) +mc_search_new (const gchar *original, const gchar *original_charset) { if (original == NULL) return NULL; @@ -152,7 +152,7 @@ mc_search_new (const gchar * original, const gchar * original_charset) */ mc_search_t * -mc_search_new_len (const gchar * original, gsize original_len, const gchar * original_charset) +mc_search_new_len (const gchar *original, gsize original_len, const gchar *original_charset) { mc_search_t *lc_mc_search; @@ -175,7 +175,7 @@ mc_search_new_len (const gchar * original, gsize original_len, const gchar * ori /* --------------------------------------------------------------------------------------------- */ void -mc_search_free (mc_search_t * lc_mc_search) +mc_search_free (mc_search_t *lc_mc_search) { if (lc_mc_search == NULL) return; @@ -205,7 +205,7 @@ mc_search_free (mc_search_t * lc_mc_search) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_search_prepare (mc_search_t * lc_mc_search) +mc_search_prepare (mc_search_t *lc_mc_search) { GPtrArray *ret; @@ -272,8 +272,8 @@ mc_search_prepare (mc_search_t * lc_mc_search) * is in lc_mc_search->error_str. */ gboolean -mc_search_run (mc_search_t * lc_mc_search, const void *user_data, - gsize start_search, gsize end_search, gsize * found_len) +mc_search_run (mc_search_t *lc_mc_search, const void *user_data, + gsize start_search, gsize end_search, gsize *found_len) { gboolean ret = FALSE; @@ -338,7 +338,7 @@ mc_search_is_type_avail (mc_search_type_t search_type) /* --------------------------------------------------------------------------------------------- */ const mc_search_type_str_t * -mc_search_types_list_get (size_t * num) +mc_search_types_list_get (size_t *num) { /* don't count last NULL item */ if (num != NULL) @@ -350,7 +350,7 @@ mc_search_types_list_get (size_t * num) /* --------------------------------------------------------------------------------------------- */ GString * -mc_search_prepare_replace_str (mc_search_t * lc_mc_search, GString * replace_str) +mc_search_prepare_replace_str (mc_search_t *lc_mc_search, GString *replace_str) { GString *ret; @@ -384,7 +384,7 @@ mc_search_prepare_replace_str (mc_search_t * lc_mc_search, GString * replace_str /* --------------------------------------------------------------------------------------------- */ char * -mc_search_prepare_replace_str2 (mc_search_t * lc_mc_search, const char *replace_str) +mc_search_prepare_replace_str2 (mc_search_t *lc_mc_search, const char *replace_str) { GString *ret; GString *replace_str2; @@ -398,7 +398,7 @@ mc_search_prepare_replace_str2 (mc_search_t * lc_mc_search, const char *replace_ /* --------------------------------------------------------------------------------------------- */ gboolean -mc_search_is_fixed_search_str (const mc_search_t * lc_mc_search) +mc_search_is_fixed_search_str (const mc_search_t *lc_mc_search) { if (lc_mc_search == NULL) return FALSE; @@ -424,7 +424,7 @@ mc_search_is_fixed_search_str (const mc_search_t * lc_mc_search) */ gboolean -mc_search (const gchar * pattern, const gchar * pattern_charset, const gchar * str, +mc_search (const gchar *pattern, const gchar *pattern_charset, const gchar *str, mc_search_type_t type) { gboolean ret; @@ -451,7 +451,7 @@ mc_search (const gchar * pattern, const gchar * pattern_charset, const gchar * s /* --------------------------------------------------------------------------------------------- */ int -mc_search_getstart_result_by_num (mc_search_t * lc_mc_search, int lc_index) +mc_search_getstart_result_by_num (mc_search_t *lc_mc_search, int lc_index) { if (lc_mc_search == NULL) return 0; @@ -473,7 +473,7 @@ mc_search_getstart_result_by_num (mc_search_t * lc_mc_search, int lc_index) /* --------------------------------------------------------------------------------------------- */ int -mc_search_getend_result_by_num (mc_search_t * lc_mc_search, int lc_index) +mc_search_getend_result_by_num (mc_search_t *lc_mc_search, int lc_index) { if (lc_mc_search == NULL) return 0; @@ -502,7 +502,7 @@ mc_search_getend_result_by_num (mc_search_t * lc_mc_search, int lc_index) */ void -mc_search_set_error (mc_search_t * lc_mc_search, mc_search_error_t code, const gchar * format, ...) +mc_search_set_error (mc_search_t *lc_mc_search, mc_search_error_t code, const gchar *format, ...) { lc_mc_search->error = code; diff --git a/lib/serialize.c b/lib/serialize.c index 6021af5a80..7b03601113 100644 --- a/lib/serialize.c +++ b/lib/serialize.c @@ -56,7 +56,7 @@ static void G_GNUC_PRINTF (2, 3) -prepend_error_message (GError ** error, const char *format, ...) +prepend_error_message (GError **error, const char *format, ...) { char *prepend_str; char *split_str; @@ -79,7 +79,7 @@ prepend_error_message (GError ** error, const char *format, ...) static const char * go_to_end_of_serialized_string (const char *non_serialized_data, - const char *already_serialized_part, size_t * offset) + const char *already_serialized_part, size_t *offset) { size_t calculated_offset; const char *semi_ptr = strchr (non_serialized_data + 1, SRLZ_DELIM_C); @@ -109,7 +109,7 @@ go_to_end_of_serialized_string (const char *non_serialized_data, */ char * -mc_serialize_str (const char prefix, const char *data, GError ** error) +mc_serialize_str (const char prefix, const char *data, GError **error) { if (data == NULL) { @@ -132,7 +132,7 @@ mc_serialize_str (const char prefix, const char *data, GError ** error) #define FUNC_NAME "mc_serialize_str()" char * -mc_deserialize_str (const char prefix, const char *data, GError ** error) +mc_deserialize_str (const char prefix, const char *data, GError **error) { size_t data_len; @@ -196,7 +196,7 @@ mc_deserialize_str (const char prefix, const char *data, GError ** error) */ char * -mc_serialize_config (mc_config_t * data, GError ** error) +mc_serialize_config (mc_config_t *data, GError **error) { gchar **groups, **group_iterator; GString *buffer; @@ -278,7 +278,7 @@ mc_serialize_config (mc_config_t * data, GError ** error) } mc_config_t * -mc_deserialize_config (const char *data, GError ** error) +mc_deserialize_config (const char *data, GError **error) { char *current_group = NULL, *current_param = NULL, *current_value = NULL; size_t current_position = 0; diff --git a/lib/shell.c b/lib/shell.c index 2a10b90fcd..b93486b0e3 100644 --- a/lib/shell.c +++ b/lib/shell.c @@ -142,7 +142,7 @@ mc_shell_get_from_env (void) /* --------------------------------------------------------------------------------------------- */ static void -mc_shell_recognize_real_path (mc_shell_t * mc_shell) +mc_shell_recognize_real_path (mc_shell_t *mc_shell) { if (strstr (mc_shell->path, "/zsh") != NULL || strstr (mc_shell->real_path, "/zsh") != NULL || getenv ("ZSH_VERSION") != NULL) @@ -196,7 +196,7 @@ mc_shell_recognize_real_path (mc_shell_t * mc_shell) /* --------------------------------------------------------------------------------------------- */ static void -mc_shell_recognize_path (mc_shell_t * mc_shell) +mc_shell_recognize_path (mc_shell_t *mc_shell) { /* If shell is not symlinked to busybox, it is safe to assume it is a real shell */ if (strstr (mc_shell->path, "/bash") != NULL || getenv ("BASH") != NULL) diff --git a/lib/skin/colors-old.c b/lib/skin/colors-old.c index 3430cd6419..2c8512726a 100644 --- a/lib/skin/colors-old.c +++ b/lib/skin/colors-old.c @@ -147,7 +147,7 @@ mc_skin_colors_old_transform (const char *old_color, const char **group, const c /* --------------------------------------------------------------------------------------------- */ static void -mc_skin_colors_old_configure_one (mc_skin_t * mc_skin, const char *the_color_string) +mc_skin_colors_old_configure_one (mc_skin_t *mc_skin, const char *the_color_string) { gchar **colors, **orig_colors; @@ -193,7 +193,7 @@ mc_skin_colors_old_configure_one (mc_skin_t * mc_skin, const char *the_color_str /* --------------------------------------------------------------------------------------------- */ void -mc_skin_colors_old_configure (mc_skin_t * mc_skin) +mc_skin_colors_old_configure (mc_skin_t *mc_skin) { mc_skin_colors_old_configure_one (mc_skin, mc_global.tty.setup_color_string); mc_skin_colors_old_configure_one (mc_skin, mc_global.tty.term_color_string); diff --git a/lib/skin/colors.c b/lib/skin/colors.c index 688866ead0..fa571f607b 100644 --- a/lib/skin/colors.c +++ b/lib/skin/colors.c @@ -50,7 +50,7 @@ int mc_skin_color__cache[MC_SKIN_COLOR_CACHE_COUNT]; /* --------------------------------------------------------------------------------------------- */ static tty_color_pair_t * -mc_skin_color_get_from_hash (mc_skin_t * mc_skin, const gchar * group, const gchar * key) +mc_skin_color_get_from_hash (mc_skin_t *mc_skin, const gchar *group, const gchar *key) { gchar kname[BUF_TINY]; tty_color_pair_t *mc_skin_color; @@ -71,7 +71,7 @@ mc_skin_color_get_from_hash (mc_skin_t * mc_skin, const gchar * group, const gch #if 0 static void -mc_skin_color_remove_from_hash (mc_skin_t * mc_skin, const gchar * group, const gchar * key) +mc_skin_color_remove_from_hash (mc_skin_t *mc_skin, const gchar *group, const gchar *key) { gchar kname[BUF_TINY]; if (group == NULL || key == NULL) @@ -88,8 +88,8 @@ mc_skin_color_remove_from_hash (mc_skin_t * mc_skin, const gchar * group, const /* --------------------------------------------------------------------------------------------- */ static void -mc_skin_color_add_to_hash (mc_skin_t * mc_skin, const gchar * group, const gchar * key, - tty_color_pair_t * mc_skin_color) +mc_skin_color_add_to_hash (mc_skin_t *mc_skin, const gchar *group, const gchar *key, + tty_color_pair_t *mc_skin_color) { gchar *kname; @@ -106,7 +106,7 @@ mc_skin_color_add_to_hash (mc_skin_t * mc_skin, const gchar * group, const gchar /* --------------------------------------------------------------------------------------------- */ static tty_color_pair_t * -mc_skin_color_get_with_defaults (const gchar * group, const gchar * name) +mc_skin_color_get_with_defaults (const gchar *group, const gchar *name) { tty_color_pair_t *mc_skin_color; @@ -127,7 +127,7 @@ mc_skin_color_get_with_defaults (const gchar * group, const gchar * name) /* If an alias is found, alloc a new string for the resolved value and free the input parameter. Otherwise it's a no-op returning the original string. */ static gchar * -mc_skin_color_look_up_alias (mc_skin_t * mc_skin, gchar * str) +mc_skin_color_look_up_alias (mc_skin_t *mc_skin, gchar *str) { gchar *orig, *str2; int hop = 0; @@ -180,7 +180,7 @@ mc_skin_color_look_up_alias (mc_skin_t * mc_skin, gchar * str) /* --------------------------------------------------------------------------------------------- */ static tty_color_pair_t * -mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const gchar * key) +mc_skin_color_get_from_ini_file (mc_skin_t *mc_skin, const gchar *group, const gchar *key) { gsize items_count; gchar **values; @@ -221,7 +221,7 @@ mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const /* --------------------------------------------------------------------------------------------- */ static void -mc_skin_color_set_default_for_terminal (mc_skin_t * mc_skin) +mc_skin_color_set_default_for_terminal (mc_skin_t *mc_skin) { tty_color_pair_t *mc_skin_color; @@ -324,7 +324,7 @@ mc_skin_color_cache_init (void) /* --------------------------------------------------------------------------------------------- */ static gboolean -mc_skin_color_check_inisection (const gchar * group) +mc_skin_color_check_inisection (const gchar *group) { return !((strcasecmp ("skin", group) == 0) || (strcasecmp ("aliases", group) == 0) || (strcasecmp ("lines", group) == 0) || (strncasecmp ("widget-", group, 7) == 0)); @@ -333,7 +333,7 @@ mc_skin_color_check_inisection (const gchar * group) /* --------------------------------------------------------------------------------------------- */ static void -mc_skin_color_check_bw_mode (mc_skin_t * mc_skin) +mc_skin_color_check_bw_mode (mc_skin_t *mc_skin) { gchar **groups, **orig_groups; @@ -356,7 +356,7 @@ mc_skin_color_check_bw_mode (mc_skin_t * mc_skin) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) +mc_skin_color_parse_ini_file (mc_skin_t *mc_skin) { gboolean ret = FALSE; gsize items_count; @@ -408,7 +408,7 @@ mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) /* --------------------------------------------------------------------------------------------- */ int -mc_skin_color_get (const gchar * group, const gchar * name) +mc_skin_color_get (const gchar *group, const gchar *name) { tty_color_pair_t *mc_skin_color; diff --git a/lib/skin/common.c b/lib/skin/common.c index e94977c2b8..986b7216ce 100644 --- a/lib/skin/common.c +++ b/lib/skin/common.c @@ -113,7 +113,7 @@ mc_skin_try_to_load_default (void) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_skin_init (const gchar * skin_override, GError ** mcerror) +mc_skin_init (const gchar *skin_override, GError **mcerror) { gboolean is_good_init = TRUE; GError *error = NULL; @@ -198,7 +198,7 @@ mc_skin_deinit (void) /* --------------------------------------------------------------------------------------------- */ gchar * -mc_skin_get (const gchar * group, const gchar * key, const gchar * default_value) +mc_skin_get (const gchar *group, const gchar *key, const gchar *default_value) { if (mc_global.tty.ugly_line_drawing) return g_strdup (default_value); diff --git a/lib/skin/hc-skins.c b/lib/skin/hc-skins.c index 1a13decfab..26a20ed73e 100644 --- a/lib/skin/hc-skins.c +++ b/lib/skin/hc-skins.c @@ -47,7 +47,7 @@ /* --------------------------------------------------------------------------------------------- */ void -mc_skin_hardcoded_blackwhite_colors (mc_skin_t * mc_skin) +mc_skin_hardcoded_blackwhite_colors (mc_skin_t *mc_skin) { mc_config_set_string (mc_skin->config, "core", "_default_", "default;default"); mc_config_set_string (mc_skin->config, "core", "selected", "A_REVERSE"); @@ -85,7 +85,7 @@ mc_skin_hardcoded_blackwhite_colors (mc_skin_t * mc_skin) /* --------------------------------------------------------------------------------------------- */ void -mc_skin_hardcoded_space_lines (mc_skin_t * mc_skin) +mc_skin_hardcoded_space_lines (mc_skin_t *mc_skin) { /* single lines */ set_lines ("vert", " "); @@ -115,7 +115,7 @@ mc_skin_hardcoded_space_lines (mc_skin_t * mc_skin) /* --------------------------------------------------------------------------------------------- */ void -mc_skin_hardcoded_ugly_lines (mc_skin_t * mc_skin) +mc_skin_hardcoded_ugly_lines (mc_skin_t *mc_skin) { /* single lines */ set_lines ("vert", "|"); diff --git a/lib/skin/ini-file.c b/lib/skin/ini-file.c index 24d7c25f47..813c98f884 100644 --- a/lib/skin/ini-file.c +++ b/lib/skin/ini-file.c @@ -49,7 +49,7 @@ /* --------------------------------------------------------------------------------------------- */ static void -mc_skin_get_list_from_dir (const gchar * base_dir, GPtrArray * list) +mc_skin_get_list_from_dir (const gchar *base_dir, GPtrArray *list) { gchar *name; GDir *dir; @@ -99,7 +99,7 @@ string_array_comparator (gconstpointer a, gconstpointer b) /* --------------------------------------------------------------------------------------------- */ static gboolean -mc_skin_ini_file_load_search_in_dir (mc_skin_t * mc_skin, const gchar * base_dir) +mc_skin_ini_file_load_search_in_dir (mc_skin_t *mc_skin, const gchar *base_dir) { char *file_name, *file_name2; @@ -147,7 +147,7 @@ mc_skin_list (void) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_skin_ini_file_load (mc_skin_t * mc_skin) +mc_skin_ini_file_load (mc_skin_t *mc_skin) { char *file_name; @@ -180,7 +180,7 @@ mc_skin_ini_file_load (mc_skin_t * mc_skin) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_skin_ini_file_parse (mc_skin_t * mc_skin) +mc_skin_ini_file_parse (mc_skin_t *mc_skin) { mc_skin->description = mc_config_get_string (mc_skin->config, "skin", "description", "- no description -"); @@ -197,7 +197,7 @@ mc_skin_ini_file_parse (mc_skin_t * mc_skin) /* --------------------------------------------------------------------------------------------- */ void -mc_skin_set_hardcoded_skin (mc_skin_t * mc_skin) +mc_skin_set_hardcoded_skin (mc_skin_t *mc_skin) { mc_skin->config = mc_config_init (NULL, TRUE); diff --git a/lib/skin/lines.c b/lib/skin/lines.c index 436f55577f..2f75dd4cd0 100644 --- a/lib/skin/lines.c +++ b/lib/skin/lines.c @@ -45,7 +45,7 @@ /* --------------------------------------------------------------------------------------------- */ static int -mc_skin_lines_load_frm (mc_skin_t * mc_skin, const char *name) +mc_skin_lines_load_frm (mc_skin_t *mc_skin, const char *name) { int ret; char *frm_val; @@ -62,7 +62,7 @@ mc_skin_lines_load_frm (mc_skin_t * mc_skin, const char *name) /* --------------------------------------------------------------------------------------------- */ void -mc_skin_lines_parse_ini_file (mc_skin_t * mc_skin) +mc_skin_lines_parse_ini_file (mc_skin_t *mc_skin) { if (mc_global.tty.slow_terminal) mc_skin_hardcoded_space_lines (mc_skin); diff --git a/lib/strutil.h b/lib/strutil.h index 4c321dd253..aa8fd4cd60 100644 --- a/lib/strutil.h +++ b/lib/strutil.h @@ -356,13 +356,13 @@ gboolean str_iscombiningmark (const char *ch); * decrase remain by size of returned characters * if out is not big enough, do nothing */ -gboolean str_toupper (const char *ch, char **out, size_t * remain); +gboolean str_toupper (const char *ch, char **out, size_t *remain); /* write upper from of first characters in ch into out * decrase remain by size of returned characters * if out is not big enough, do nothing */ -gboolean str_tolower (const char *ch, char **out, size_t * remain); +gboolean str_tolower (const char *ch, char **out, size_t *remain); /* return length of text in characters * I diff --git a/lib/strutil/filevercmp.c b/lib/strutil/filevercmp.c index c0a28ddd35..c906573cf4 100644 --- a/lib/strutil/filevercmp.c +++ b/lib/strutil/filevercmp.c @@ -48,7 +48,7 @@ * Otherwise, *len should be nonnegative, s is a char array, and *len does not change. */ static ssize_t -file_prefixlen (const char *s, ssize_t * len) +file_prefixlen (const char *s, ssize_t *len) { size_t n = (size_t) (*len); /* SIZE_MAX if N == -1 */ size_t i = 0; diff --git a/lib/strutil/strutil.c b/lib/strutil/strutil.c index 4e24e7f0a7..bc7f6ae4af 100644 --- a/lib/strutil/strutil.c +++ b/lib/strutil/strutil.c @@ -101,7 +101,7 @@ str_test_not_convert (const char *enc) /* --------------------------------------------------------------------------------------------- */ static estr_t -_str_convert (GIConv coder, const char *string, int size, GString * buffer) +_str_convert (GIConv coder, const char *string, int size, GString *buffer) { estr_t state = ESTR_SUCCESS; gssize left; @@ -153,9 +153,7 @@ _str_convert (GIConv coder, const char *string, int size, GString * buffer) case G_CONVERT_ERROR_NO_CONVERSION: /* Conversion between the requested character sets is not supported. */ g_free (tmp_buff); - tmp_buff = g_strnfill (strlen (string), '?'); - g_string_append (buffer, tmp_buff); - g_free (tmp_buff); + mc_g_string_append_c_len (buffer, '?', strlen (string)); return ESTR_FAILURE; case G_CONVERT_ERROR_ILLEGAL_SEQUENCE: @@ -186,12 +184,7 @@ _str_convert (GIConv coder, const char *string, int size, GString * buffer) g_string_append (buffer, tmp_buff); g_free (tmp_buff); if ((int) bytes_read < left) - { - left = left - bytes_read; - tmp_buff = g_strnfill (left, '?'); - g_string_append (buffer, tmp_buff); - g_free (tmp_buff); - } + mc_g_string_append_c_len (buffer, '?', left - bytes_read); return ESTR_PROBLEM; case G_CONVERT_ERROR_BAD_URI: /* Don't know how handle this error :( */ @@ -288,7 +281,7 @@ str_close_conv (GIConv conv) /* --------------------------------------------------------------------------------------------- */ estr_t -str_convert (GIConv coder, const char *string, GString * buffer) +str_convert (GIConv coder, const char *string, GString *buffer) { return _str_convert (coder, string, -1, buffer); } @@ -296,7 +289,7 @@ str_convert (GIConv coder, const char *string, GString * buffer) /* --------------------------------------------------------------------------------------------- */ estr_t -str_nconvert (GIConv coder, const char *string, int size, GString * buffer) +str_nconvert (GIConv coder, const char *string, int size, GString *buffer) { return _str_convert (coder, string, size, buffer); } @@ -304,7 +297,7 @@ str_nconvert (GIConv coder, const char *string, int size, GString * buffer) /* --------------------------------------------------------------------------------------------- */ gchar * -str_conv_gerror_message (GError * mcerror, const char *def_msg) +str_conv_gerror_message (GError *mcerror, const char *def_msg) { return used_class.conv_gerror_message (mcerror, def_msg); } @@ -312,7 +305,7 @@ str_conv_gerror_message (GError * mcerror, const char *def_msg) /* --------------------------------------------------------------------------------------------- */ estr_t -str_vfs_convert_from (GIConv coder, const char *string, GString * buffer) +str_vfs_convert_from (GIConv coder, const char *string, GString *buffer) { estr_t result = ESTR_SUCCESS; @@ -327,7 +320,7 @@ str_vfs_convert_from (GIConv coder, const char *string, GString * buffer) /* --------------------------------------------------------------------------------------------- */ estr_t -str_vfs_convert_to (GIConv coder, const char *string, int size, GString * buffer) +str_vfs_convert_to (GIConv coder, const char *string, int size, GString *buffer) { return used_class.vfs_convert_to (coder, string, size, buffer); } @@ -335,7 +328,7 @@ str_vfs_convert_to (GIConv coder, const char *string, int size, GString * buffer /* --------------------------------------------------------------------------------------------- */ void -str_printf (GString * buffer, const char *format, ...) +str_printf (GString *buffer, const char *format, ...) { va_list ap; va_start (ap, format); @@ -347,7 +340,7 @@ str_printf (GString * buffer, const char *format, ...) /* --------------------------------------------------------------------------------------------- */ void -str_insert_replace_char (GString * buffer) +str_insert_replace_char (GString *buffer) { used_class.insert_replace_char (buffer); } @@ -756,7 +749,7 @@ str_isdigit (const char *ch) /* --------------------------------------------------------------------------------------------- */ gboolean -str_toupper (const char *ch, char **out, size_t * remain) +str_toupper (const char *ch, char **out, size_t *remain) { return used_class.char_toupper (ch, out, remain); } @@ -764,7 +757,7 @@ str_toupper (const char *ch, char **out, size_t * remain) /* --------------------------------------------------------------------------------------------- */ gboolean -str_tolower (const char *ch, char **out, size_t * remain) +str_tolower (const char *ch, char **out, size_t *remain) { return used_class.char_tolower (ch, out, remain); } @@ -994,7 +987,7 @@ strrstr_skip_count (const char *haystack, const char *needle, size_t skip_count) */ uintmax_t -parse_integer (const char *str, gboolean * invalid) +parse_integer (const char *str, gboolean *invalid) { uintmax_t n; char *suffix; diff --git a/lib/strutil/strutil8bit.c b/lib/strutil/strutil8bit.c index 468e6ea991..7ecd988c87 100644 --- a/lib/strutil/strutil8bit.c +++ b/lib/strutil/strutil8bit.c @@ -79,7 +79,7 @@ DECLARE_CTYPE_WRAPPER (tolower) /* --------------------------------------------------------------------------------------------- */ static void -str_8bit_insert_replace_char (GString * buffer) +str_8bit_insert_replace_char (GString *buffer) { g_string_append_c (buffer, replch); } @@ -195,7 +195,7 @@ str_8bit_iscombiningmark (const char *text) /* --------------------------------------------------------------------------------------------- */ static int -str_8bit_toupper (const char *text, char **out, size_t * remain) +str_8bit_toupper (const char *text, char **out, size_t *remain) { if (*remain <= 1) return FALSE; @@ -209,7 +209,7 @@ str_8bit_toupper (const char *text, char **out, size_t * remain) /* --------------------------------------------------------------------------------------------- */ static gboolean -str_8bit_tolower (const char *text, char **out, size_t * remain) +str_8bit_tolower (const char *text, char **out, size_t *remain) { if (*remain <= 1) return FALSE; @@ -239,7 +239,7 @@ str_8bit_length2 (const char *text, int size) /* --------------------------------------------------------------------------------------------- */ static gchar * -str_8bit_conv_gerror_message (GError * mcerror, const char *def_msg) +str_8bit_conv_gerror_message (GError *mcerror, const char *def_msg) { GIConv conv; gchar *ret; @@ -272,7 +272,7 @@ str_8bit_conv_gerror_message (GError * mcerror, const char *def_msg) /* --------------------------------------------------------------------------------------------- */ static estr_t -str_8bit_vfs_convert_to (GIConv coder, const char *string, int size, GString * buffer) +str_8bit_vfs_convert_to (GIConv coder, const char *string, int size, GString *buffer) { estr_t result = ESTR_SUCCESS; diff --git a/lib/strutil/strutilascii.c b/lib/strutil/strutilascii.c index eb0a742688..47db11aa45 100644 --- a/lib/strutil/strutilascii.c +++ b/lib/strutil/strutilascii.c @@ -52,7 +52,7 @@ static const char replch = '?'; /* --------------------------------------------------------------------------------------------- */ static void -str_ascii_insert_replace_char (GString * buffer) +str_ascii_insert_replace_char (GString *buffer) { g_string_append_c (buffer, replch); } @@ -168,7 +168,7 @@ str_ascii_iscombiningmark (const char *text) /* --------------------------------------------------------------------------------------------- */ static int -str_ascii_toupper (const char *text, char **out, size_t * remain) +str_ascii_toupper (const char *text, char **out, size_t *remain) { if (*remain <= 1) return FALSE; @@ -182,7 +182,7 @@ str_ascii_toupper (const char *text, char **out, size_t * remain) /* --------------------------------------------------------------------------------------------- */ static gboolean -str_ascii_tolower (const char *text, char **out, size_t * remain) +str_ascii_tolower (const char *text, char **out, size_t *remain) { if (*remain <= 1) return FALSE; @@ -212,7 +212,7 @@ str_ascii_length2 (const char *text, int size) /* --------------------------------------------------------------------------------------------- */ static gchar * -str_ascii_conv_gerror_message (GError * mcerror, const char *def_msg) +str_ascii_conv_gerror_message (GError *mcerror, const char *def_msg) { /* the same as str_utf8_conv_gerror_message() */ if (mcerror != NULL) @@ -224,7 +224,7 @@ str_ascii_conv_gerror_message (GError * mcerror, const char *def_msg) /* --------------------------------------------------------------------------------------------- */ static estr_t -str_ascii_vfs_convert_to (GIConv coder, const char *string, int size, GString * buffer) +str_ascii_vfs_convert_to (GIConv coder, const char *string, int size, GString *buffer) { (void) coder; g_string_append_len (buffer, string, size); diff --git a/lib/strutil/strutilutf8.c b/lib/strutil/strutilutf8.c index 9142f3d1df..8358b13f5e 100644 --- a/lib/strutil/strutilutf8.c +++ b/lib/strutil/strutilutf8.c @@ -80,7 +80,7 @@ str_unichar_iscombiningmark (gunichar uni) /* --------------------------------------------------------------------------------------------- */ static void -str_utf8_insert_replace_char (GString * buffer) +str_utf8_insert_replace_char (GString *buffer) { g_string_append (buffer, replch); } @@ -277,7 +277,7 @@ str_utf8_cprev_noncomb_char (const char **text, const char *begin) /* --------------------------------------------------------------------------------------------- */ static gboolean -str_utf8_toupper (const char *text, char **out, size_t * remain) +str_utf8_toupper (const char *text, char **out, size_t *remain) { gunichar uni; size_t left; @@ -300,7 +300,7 @@ str_utf8_toupper (const char *text, char **out, size_t * remain) /* --------------------------------------------------------------------------------------------- */ static gboolean -str_utf8_tolower (const char *text, char **out, size_t * remain) +str_utf8_tolower (const char *text, char **out, size_t *remain) { gunichar uni; size_t left; @@ -398,7 +398,7 @@ str_utf8_length_noncomb (const char *text) #if 0 static void -str_utf8_questmark_sustb (char **string, size_t * left, GString * buffer) +str_utf8_questmark_sustb (char **string, size_t *left, GString *buffer) { char *next; @@ -412,7 +412,7 @@ str_utf8_questmark_sustb (char **string, size_t * left, GString * buffer) /* --------------------------------------------------------------------------------------------- */ static gchar * -str_utf8_conv_gerror_message (GError * mcerror, const char *def_msg) +str_utf8_conv_gerror_message (GError *mcerror, const char *def_msg) { if (mcerror != NULL) return g_strdup (mcerror->message); @@ -423,7 +423,7 @@ str_utf8_conv_gerror_message (GError * mcerror, const char *def_msg) /* --------------------------------------------------------------------------------------------- */ static estr_t -str_utf8_vfs_convert_to (GIConv coder, const char *string, int size, GString * buffer) +str_utf8_vfs_convert_to (GIConv coder, const char *string, int size, GString *buffer) { estr_t result = ESTR_SUCCESS; @@ -1346,7 +1346,7 @@ str_utf8_caseprefix (const char *text, const char *prefix) static char * str_utf8_create_key_gen (const char *text, gboolean case_sen, - gchar * (*keygen) (const gchar * text, gssize size)) + gchar *(*keygen) (const gchar *text, gssize size)) { char *result; diff --git a/lib/strutil/tokenize.c b/lib/strutil/tokenize.c index 3c861dee00..4aa17e6602 100644 --- a/lib/strutil/tokenize.c +++ b/lib/strutil/tokenize.c @@ -69,7 +69,7 @@ str_tokenize_word (const char *string, int start) { int i = start; char delimiter = '\0'; - char delimopen; + char delimopen = '\0'; int nestdelim = 0; if (member (string[i], "()\n")) /* XXX - included \n, but why? been here forever */ diff --git a/lib/strutil/xstrtol.c b/lib/strutil/xstrtol.c index 5695c1958f..9f7664cfcb 100644 --- a/lib/strutil/xstrtol.c +++ b/lib/strutil/xstrtol.c @@ -48,7 +48,7 @@ /* --------------------------------------------------------------------------------------------- */ static strtol_error_t -bkm_scale (uintmax_t * x, int scale_factor) +bkm_scale (uintmax_t *x, int scale_factor) { if (UINTMAX_MAX / scale_factor < *x) { @@ -63,7 +63,7 @@ bkm_scale (uintmax_t * x, int scale_factor) /* --------------------------------------------------------------------------------------------- */ static strtol_error_t -bkm_scale_by_power (uintmax_t * x, int base, int power) +bkm_scale_by_power (uintmax_t *x, int base, int power) { strtol_error_t err = LONGINT_OK; while (power-- != 0) @@ -76,7 +76,7 @@ bkm_scale_by_power (uintmax_t * x, int base, int power) /* --------------------------------------------------------------------------------------------- */ strtol_error_t -xstrtoumax (const char *s, char **ptr, int base, uintmax_t * val, const char *valid_suffixes) +xstrtoumax (const char *s, char **ptr, int base, uintmax_t *val, const char *valid_suffixes) { char *t_ptr; char **p; diff --git a/lib/tty/color-ncurses.c b/lib/tty/color-ncurses.c index 055a3afbbc..867473ed8c 100644 --- a/lib/tty/color-ncurses.c +++ b/lib/tty/color-ncurses.c @@ -103,7 +103,7 @@ color_get_attr (int color_pair) /* --------------------------------------------------------------------------------------------- */ static void -mc_tty_color_pair_init_special (tty_color_lib_pair_t * mc_color_pair, +mc_tty_color_pair_init_special (tty_color_lib_pair_t *mc_color_pair, int fg1, int bg1, int fg2, int bg2, int attr) { if (has_colors () && !mc_tty_color_disable) @@ -145,7 +145,7 @@ tty_color_deinit_lib (void) /* --------------------------------------------------------------------------------------------- */ void -tty_color_try_alloc_lib_pair (tty_color_lib_pair_t * mc_color_pair) +tty_color_try_alloc_lib_pair (tty_color_lib_pair_t *mc_color_pair) { if (mc_color_pair->fg <= (int) SPEC_A_REVERSE) { @@ -231,7 +231,7 @@ tty_set_normal_attrs (void) /* --------------------------------------------------------------------------------------------- */ gboolean -tty_use_256colors (GError ** error) +tty_use_256colors (GError **error) { (void) error; @@ -241,7 +241,7 @@ tty_use_256colors (GError ** error) /* --------------------------------------------------------------------------------------------- */ gboolean -tty_use_truecolors (GError ** error) +tty_use_truecolors (GError **error) { /* Not yet supported in ncurses */ g_set_error (error, MC_ERROR, -1, _("True color not supported with ncurses.")); diff --git a/lib/tty/color-slang.c b/lib/tty/color-slang.c index 33344b5938..d27e15a40b 100644 --- a/lib/tty/color-slang.c +++ b/lib/tty/color-slang.c @@ -99,7 +99,7 @@ has_colors (gboolean disable, gboolean force) /* --------------------------------------------------------------------------------------------- */ static void -mc_tty_color_pair_init_special (tty_color_lib_pair_t * mc_color_pair, +mc_tty_color_pair_init_special (tty_color_lib_pair_t *mc_color_pair, const char *fg1, const char *bg1, const char *fg2, const char *bg2, SLtt_Char_Type mask) { @@ -145,7 +145,7 @@ tty_color_deinit_lib (void) /* --------------------------------------------------------------------------------------------- */ void -tty_color_try_alloc_lib_pair (tty_color_lib_pair_t * mc_color_pair) +tty_color_try_alloc_lib_pair (tty_color_lib_pair_t *mc_color_pair) { if (mc_color_pair->fg <= (int) SPEC_A_REVERSE) { @@ -213,7 +213,7 @@ tty_set_normal_attrs (void) /* --------------------------------------------------------------------------------------------- */ gboolean -tty_use_256colors (GError ** error) +tty_use_256colors (GError **error) { gboolean ret; @@ -229,7 +229,7 @@ tty_use_256colors (GError ** error) /* --------------------------------------------------------------------------------------------- */ gboolean -tty_use_truecolors (GError ** error) +tty_use_truecolors (GError **error) { char *colorterm; diff --git a/lib/tty/color.c b/lib/tty/color.c index 78d50b73d5..881e708c67 100644 --- a/lib/tty/color.c +++ b/lib/tty/color.c @@ -74,7 +74,7 @@ static GHashTable *mc_tty_color__hashtable = NULL; /* --------------------------------------------------------------------------------------------- */ static void -mc_color__deinit (tty_color_pair_t * color) +mc_color__deinit (tty_color_pair_t *color) { g_free (color->fg); g_free (color->bg); @@ -153,7 +153,7 @@ tty_use_colors (void) /* --------------------------------------------------------------------------------------------- */ int -tty_try_alloc_color_pair (const tty_color_pair_t * color, gboolean is_temp) +tty_try_alloc_color_pair (const tty_color_pair_t *color, gboolean is_temp) { gboolean is_base; gchar *color_pair; @@ -220,7 +220,7 @@ tty_color_free_all (void) /* --------------------------------------------------------------------------------------------- */ void -tty_color_set_defaults (const tty_color_pair_t * color) +tty_color_set_defaults (const tty_color_pair_t *color) { mc_color__deinit (&tty_color_defaults); diff --git a/lib/tty/key.c b/lib/tty/key.c index 8e7770bdf2..c64c0e7628 100644 --- a/lib/tty/key.c +++ b/lib/tty/key.c @@ -584,7 +584,7 @@ select_cmp_by_fd (gconstpointer a, gconstpointer b) /* --------------------------------------------------------------------------------------------- */ static int -add_selects (fd_set * select_set) +add_selects (fd_set *select_set) { int top_fd = 0; @@ -608,7 +608,7 @@ add_selects (fd_set * select_set) /* --------------------------------------------------------------------------------------------- */ static void -check_selects (fd_set * select_set) +check_selects (fd_set *select_set) { while (disabled_channels == 0) { @@ -690,7 +690,7 @@ create_sequence (const char *seq, int code, int action) /* --------------------------------------------------------------------------------------------- */ static void -define_sequences (const key_define_t * kd) +define_sequences (const key_define_t *kd) { int i; @@ -745,7 +745,7 @@ getch_with_delay (void) /* --------------------------------------------------------------------------------------------- */ static void -xmouse_get_event (Gpm_Event * ev, gboolean extended) +xmouse_get_event (Gpm_Event *ev, gboolean extended) { static gint64 tv1 = 0; /* Force first click as single */ static int clicks = 0; @@ -1173,7 +1173,7 @@ getch_with_timeout (unsigned int delay_us) /* --------------------------------------------------------------------------------------------- */ static void -learn_store_key (GString * buffer, int c) +learn_store_key (GString *buffer, int c) { if (c == ESC_CHAR) g_string_append (buffer, "\\e"); @@ -1191,7 +1191,7 @@ learn_store_key (GString * buffer, int c) /* --------------------------------------------------------------------------------------------- */ static void -k_dispose (key_def * k) +k_dispose (key_def *k) { if (k != NULL) { diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c index 752825b6e1..e012feb303 100644 --- a/lib/tty/tty-slang.c +++ b/lib/tty/tty-slang.c @@ -94,8 +94,7 @@ static const struct { int key_code; const char *key_name; -} key_table[] = -{ +} key_table[] = { /* *INDENT-OFF* */ { KEY_F (0), "k0" }, { KEY_F (1), "k1" }, diff --git a/lib/tty/x11conn.c b/lib/tty/x11conn.c index dfd6454716..cdb60f13fc 100644 --- a/lib/tty/x11conn.c +++ b/lib/tty/x11conn.c @@ -87,7 +87,7 @@ static gboolean longjmp_allowed = FALSE; /* --------------------------------------------------------------------------------------------- */ static int -x_io_error_handler (Display * dpy) +x_io_error_handler (Display *dpy) { (void) dpy; @@ -103,7 +103,7 @@ x_io_error_handler (Display * dpy) /* --------------------------------------------------------------------------------------------- */ static int -x_error_handler (Display * dpy, XErrorEvent * ee) +x_error_handler (Display *dpy, XErrorEvent *ee) { (void) ee; (void) func_XCloseDisplay (dpy); @@ -205,7 +205,7 @@ mc_XOpenDisplay (const char *displayname) /* --------------------------------------------------------------------------------------------- */ int -mc_XCloseDisplay (Display * display) +mc_XCloseDisplay (Display *display) { if (x11_available ()) { @@ -230,8 +230,8 @@ mc_XCloseDisplay (Display * display) /* --------------------------------------------------------------------------------------------- */ Bool -mc_XQueryPointer (Display * display, Window win, Window * root_return, - Window * child_return, int *root_x_return, int *root_y_return, +mc_XQueryPointer (Display *display, Window win, Window *root_return, + Window *child_return, int *root_x_return, int *root_y_return, int *win_x_return, int *win_y_return, unsigned int *mask_return) { Bool retval; diff --git a/lib/util.c b/lib/util.c index b766f7ca1a..6bbcb5b069 100644 --- a/lib/util.c +++ b/lib/util.c @@ -111,7 +111,7 @@ is_8bit_printable (unsigned char c) /* --------------------------------------------------------------------------------------------- */ static char * -resolve_symlinks (const vfs_path_t * vpath) +resolve_symlinks (const vfs_path_t *vpath) { char *p, *p2; char *buf, *buf2, *q, *r, c; @@ -332,16 +332,12 @@ const char * path_trunc (const char *path, size_t trunc_len) { vfs_path_t *vpath; - char *secure_path; const char *ret; - vpath = vfs_path_from_str (path); - secure_path = vfs_path_to_str_flags (vpath, 0, VPF_STRIP_PASSWORD); + vpath = vfs_path_from_str_flags (path, VPF_STRIP_PASSWORD); + ret = str_trunc (vfs_path_as_str (vpath), trunc_len); vfs_path_free (vpath, TRUE); - ret = str_trunc (secure_path, trunc_len); - g_free (secure_path); - return ret; } @@ -456,11 +452,12 @@ size_trunc_len (char *buffer, unsigned int len, uintmax_t size, int units, gbool */ #endif }; - /* *INDENT-ON* */ + static const char *const suffix[] = { "", "K", "M", "G", "T", "P", "E", "Z", "Y", "R", "Q", NULL }; static const char *const suffix_lc[] = { "", "k", "m", "g", "t", "p", "e", "z", "y", "r", "q", NULL }; + /* *INDENT-ON* */ const char *const *sfx = use_si ? suffix_lc : suffix; int j = 0; @@ -597,7 +594,7 @@ extension (const char *filename) char * load_mc_home_file (const char *from, const char *filename, char **allocated_filename, - size_t * length) + size_t *length) { char *hintfile_base, *hintfile; char *lang; @@ -1029,7 +1026,7 @@ convert_controls (const char *p) */ char * -diff_two_paths (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +diff_two_paths (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { int j, prevlen = -1, currlen; char *my_first = NULL, *my_second = NULL; @@ -1100,7 +1097,7 @@ diff_two_paths (const vfs_path_t * vpath1, const vfs_path_t * vpath2) */ GList * -list_append_unique (GList * list, char *text) +list_append_unique (GList *list, char *text) { GList *lc_link; @@ -1140,8 +1137,8 @@ list_append_unique (GList * list, char *text) */ void -load_file_position (const vfs_path_t * filename_vpath, long *line, long *column, off_t * offset, - GArray ** bookmarks) +load_file_position (const vfs_path_t *filename_vpath, long *line, long *column, off_t *offset, + GArray **bookmarks) { char *fn; FILE *f; @@ -1231,8 +1228,8 @@ load_file_position (const vfs_path_t * filename_vpath, long *line, long *column, */ void -save_file_position (const vfs_path_t * filename_vpath, long line, long column, off_t offset, - GArray * bookmarks) +save_file_position (const vfs_path_t *filename_vpath, long line, long column, off_t offset, + GArray *bookmarks) { static size_t filepos_max_saved_entries = 0; char *fn, *tmp_fn; @@ -1275,7 +1272,7 @@ save_file_position (const vfs_path_t * filename_vpath, long line, long column, o if (bookmarks != NULL) for (i = 0; i < bookmarks->len && i < MAX_SAVED_BOOKMARKS; i++) if (fprintf (f, ";%zu", g_array_index (bookmarks, size_t, i)) < 0) - goto write_position_error; + goto write_position_error; if (fprintf (f, "\n") < 0) goto write_position_error; @@ -1478,7 +1475,7 @@ mc_get_profile_root (void) */ void -mc_propagate_error (GError ** dest, int code, const char *format, ...) +mc_propagate_error (GError **dest, int code, const char *format, ...) { if (dest != NULL && *dest == NULL) { @@ -1504,7 +1501,7 @@ mc_propagate_error (GError ** dest, int code, const char *format, ...) */ void -mc_replace_error (GError ** dest, int code, const char *format, ...) +mc_replace_error (GError **dest, int code, const char *format, ...) { if (dest != NULL) { @@ -1533,7 +1530,7 @@ mc_replace_error (GError ** dest, int code, const char *format, ...) * @return TRUE if clock skew detected, FALSE otherwise */ gboolean -mc_time_elapsed (gint64 * timestamp, gint64 delay) +mc_time_elapsed (gint64 *timestamp, gint64 delay) { gint64 now; diff --git a/lib/util.h b/lib/util.h index a59e2c698f..c03ff6db9b 100644 --- a/lib/util.h +++ b/lib/util.h @@ -186,7 +186,7 @@ char *diff_two_paths (const vfs_path_t * vpath1, const vfs_path_t * vpath2); const char *x_basename (const char *fname); char *load_mc_home_file (const char *from, const char *filename, char **allocated_filename, - size_t * length); + size_t *length); /* uid/gid managing */ void init_groups (void); diff --git a/lib/utilunix.c b/lib/utilunix.c index 1a43cee288..97f8349d93 100644 --- a/lib/utilunix.c +++ b/lib/utilunix.c @@ -113,7 +113,7 @@ static int_cache gid_cache[GID_CACHE_SIZE]; /* --------------------------------------------------------------------------------------------- */ static char * -i_cache_match (int id, int_cache * cache, int size) +i_cache_match (int id, int_cache *cache, int size) { int i; @@ -126,7 +126,7 @@ i_cache_match (int id, int_cache * cache, int size) /* --------------------------------------------------------------------------------------------- */ static void -i_cache_add (int id, int_cache * cache, int size, char *text, int *last) +i_cache_add (int id, int_cache *cache, int size, char *text, int *last) { g_free (cache[*last].string); cache[*last].string = g_strdup (text); @@ -167,7 +167,7 @@ my_fork (void) /* --------------------------------------------------------------------------------------------- */ static void -my_system__save_sigaction_handlers (my_system_sigactions_t * sigactions) +my_system__save_sigaction_handlers (my_system_sigactions_t *sigactions) { struct sigaction ignore; @@ -186,7 +186,7 @@ my_system__save_sigaction_handlers (my_system_sigactions_t * sigactions) /* --------------------------------------------------------------------------------------------- */ static void -my_system__restore_sigaction_handlers (my_system_sigactions_t * sigactions) +my_system__restore_sigaction_handlers (my_system_sigactions_t *sigactions) { sigaction (SIGINT, &sigactions->intr, NULL); sigaction (SIGQUIT, &sigactions->quit, NULL); @@ -220,7 +220,7 @@ my_system_make_arg_array (int flags, const char *shell) /* --------------------------------------------------------------------------------------------- */ static void -mc_pread_stream (mc_pipe_stream_t * ps, const fd_set * fds) +mc_pread_stream (mc_pipe_stream_t *ps, const fd_set *fds) { size_t buf_len; ssize_t read_len; @@ -496,7 +496,7 @@ my_systemv_flags (int flags, const char *command, char *const argv[]) */ mc_pipe_t * -mc_popen (const char *command, gboolean read_out, gboolean read_err, GError ** error) +mc_popen (const char *command, gboolean read_out, gboolean read_err, GError **error) { mc_pipe_t *p; const char *const argv[] = { "/bin/sh", "sh", "-c", command, NULL }; @@ -558,7 +558,7 @@ mc_popen (const char *command, gboolean read_out, gboolean read_err, GError ** e */ void -mc_pread (mc_pipe_t * p, GError ** error) +mc_pread (mc_pipe_t *p, GError **error) { gboolean read_out, read_err; fd_set fds; @@ -624,7 +624,7 @@ mc_pread (mc_pipe_t * p, GError ** error) */ GString * -mc_pstream_get_string (mc_pipe_stream_t * ps) +mc_pstream_get_string (mc_pipe_stream_t *ps) { char *s; size_t size, i; @@ -666,7 +666,7 @@ mc_pstream_get_string (mc_pipe_stream_t * ps) */ void -mc_pclose (mc_pipe_t * p, GError ** error) +mc_pclose (mc_pipe_t *p, GError **error) { int res; diff --git a/lib/vfs/direntry.c b/lib/vfs/direntry.c index 5f9a8efbf1..294df5f1bb 100644 --- a/lib/vfs/direntry.c +++ b/lib/vfs/direntry.c @@ -378,7 +378,7 @@ vfs_s_new_fh (struct vfs_s_inode *ino, gboolean changed) /* --------------------------------------------------------------------------------------------- */ static void -vfs_s_free_fh (struct vfs_s_subclass *s, vfs_file_handler_t * fh) +vfs_s_free_fh (struct vfs_s_subclass *s, vfs_file_handler_t *fh) { if (s->fh_free != NULL) s->fh_free (fh); @@ -391,7 +391,7 @@ vfs_s_free_fh (struct vfs_s_subclass *s, vfs_file_handler_t * fh) /* ------------------------ readdir & friends ----------------------------- */ static struct vfs_s_inode * -vfs_s_inode_from_path (const vfs_path_t * vpath, int flags) +vfs_s_inode_from_path (const vfs_path_t *vpath, int flags) { struct vfs_s_super *super; struct vfs_s_inode *ino; @@ -420,7 +420,7 @@ vfs_s_inode_from_path (const vfs_path_t * vpath, int flags) /* --------------------------------------------------------------------------------------------- */ static void * -vfs_s_opendir (const vfs_path_t * vpath) +vfs_s_opendir (const vfs_path_t *vpath) { struct vfs_s_inode *dir; struct dirhandle *info; @@ -492,7 +492,7 @@ vfs_s_closedir (void *data) /* --------------------------------------------------------------------------------------------- */ static int -vfs_s_chdir (const vfs_path_t * vpath) +vfs_s_chdir (const vfs_path_t *vpath) { void *data; @@ -507,7 +507,7 @@ vfs_s_chdir (const vfs_path_t * vpath) /* --------------------------- stat and friends ---------------------------- */ static int -vfs_s_internal_stat (const vfs_path_t * vpath, struct stat *buf, int flag) +vfs_s_internal_stat (const vfs_path_t *vpath, struct stat *buf, int flag) { struct vfs_s_inode *ino; @@ -521,7 +521,7 @@ vfs_s_internal_stat (const vfs_path_t * vpath, struct stat *buf, int flag) /* --------------------------------------------------------------------------------------------- */ static int -vfs_s_readlink (const vfs_path_t * vpath, char *buf, size_t size) +vfs_s_readlink (const vfs_path_t *vpath, char *buf, size_t size) { struct vfs_s_inode *ino; size_t len; @@ -751,7 +751,7 @@ vfs_s_ferrno (struct vfs_class *me) */ static vfs_path_t * -vfs_s_getlocalcopy (const vfs_path_t * vpath) +vfs_s_getlocalcopy (const vfs_path_t *vpath) { vfs_file_handler_t *fh; vfs_path_t *local = NULL; @@ -782,7 +782,7 @@ vfs_s_getlocalcopy (const vfs_path_t * vpath) */ static int -vfs_s_ungetlocalcopy (const vfs_path_t * vpath, const vfs_path_t * local, gboolean has_changed) +vfs_s_ungetlocalcopy (const vfs_path_t *vpath, const vfs_path_t *local, gboolean has_changed) { (void) vpath; (void) local; @@ -793,7 +793,7 @@ vfs_s_ungetlocalcopy (const vfs_path_t * vpath, const vfs_path_t * local, gboole /* --------------------------------------------------------------------------------------------- */ static int -vfs_s_setctl (const vfs_path_t * vpath, int ctlop, void *arg) +vfs_s_setctl (const vfs_path_t *vpath, int ctlop, void *arg) { struct vfs_class *me; @@ -832,7 +832,7 @@ vfs_s_setctl (const vfs_path_t * vpath, int ctlop, void *arg) /* ----------------------------- Stamping support -------------------------- */ static vfsid -vfs_s_getid (const vfs_path_t * vpath) +vfs_s_getid (const vfs_path_t *vpath) { struct vfs_s_super *archive = NULL; const char *p; @@ -1115,7 +1115,7 @@ vfs_s_find_inode (struct vfs_class *me, const struct vfs_s_super *super, */ struct vfs_s_super * -vfs_get_super_by_vpath (const vfs_path_t * vpath) +vfs_get_super_by_vpath (const vfs_path_t *vpath) { GList *iter; void *cookie = NULL; @@ -1172,7 +1172,7 @@ vfs_get_super_by_vpath (const vfs_path_t * vpath) * @return path from last VFS-element */ const char * -vfs_s_get_path (const vfs_path_t * vpath, struct vfs_s_super **archive, int flags) +vfs_s_get_path (const vfs_path_t *vpath, struct vfs_s_super **archive, int flags) { const char *retval = ""; int result = -1; @@ -1281,7 +1281,7 @@ vfs_s_fullpath (struct vfs_class *me, struct vfs_s_inode *ino) /* --------------------------------------------------------------------------------------------- */ void -vfs_s_init_fh (vfs_file_handler_t * fh, struct vfs_s_inode *ino, gboolean changed) +vfs_s_init_fh (vfs_file_handler_t *fh, struct vfs_s_inode *ino, gboolean changed) { fh->ino = ino; fh->handle = -1; @@ -1293,7 +1293,7 @@ vfs_s_init_fh (vfs_file_handler_t * fh, struct vfs_s_inode *ino, gboolean change /* --------------------------- stat and friends ---------------------------- */ void * -vfs_s_open (const vfs_path_t * vpath, int flags, mode_t mode) +vfs_s_open (const vfs_path_t *vpath, int flags, mode_t mode) { gboolean was_changed = FALSE; vfs_file_handler_t *fh; @@ -1404,7 +1404,7 @@ vfs_s_open (const vfs_path_t * vpath, int flags, mode_t mode) /* --------------------------------------------------------------------------------------------- */ int -vfs_s_stat (const vfs_path_t * vpath, struct stat *buf) +vfs_s_stat (const vfs_path_t *vpath, struct stat *buf) { return vfs_s_internal_stat (vpath, buf, FL_FOLLOW); } @@ -1412,7 +1412,7 @@ vfs_s_stat (const vfs_path_t * vpath, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ int -vfs_s_lstat (const vfs_path_t * vpath, struct stat *buf) +vfs_s_lstat (const vfs_path_t *vpath, struct stat *buf) { return vfs_s_internal_stat (vpath, buf, FL_NONE); } @@ -1571,7 +1571,7 @@ vfs_init_subclass (struct vfs_s_subclass *sub, const char *name, vfs_flags_t fla /** Find VFS id for given directory name */ vfsid -vfs_getid (const vfs_path_t * vpath) +vfs_getid (const vfs_path_t *vpath) { const struct vfs_class *me; diff --git a/lib/vfs/gc.c b/lib/vfs/gc.c index 6c5deb05a8..c57f643845 100644 --- a/lib/vfs/gc.c +++ b/lib/vfs/gc.c @@ -183,7 +183,7 @@ vfs_rmstamp (struct vfs_class *v, vfsid id) /* --------------------------------------------------------------------------------------------- */ void -vfs_stamp_path (const vfs_path_t * vpath) +vfs_stamp_path (const vfs_path_t *vpath) { vfsid id; struct vfs_class *me; @@ -313,7 +313,7 @@ vfs_timeout_handler (void) /* --------------------------------------------------------------------------------------------- */ void -vfs_release_path (const vfs_path_t * vpath) +vfs_release_path (const vfs_path_t *vpath) { vfsid id; struct vfs_class *me; diff --git a/lib/vfs/interface.c b/lib/vfs/interface.c index 8469bdae67..63bbddec6b 100644 --- a/lib/vfs/interface.c +++ b/lib/vfs/interface.c @@ -80,7 +80,7 @@ extern struct vfs_dirent *mc_readdir_result; /* --------------------------------------------------------------------------------------------- */ static vfs_path_t * -mc_def_getlocalcopy (const vfs_path_t * filename_vpath) +mc_def_getlocalcopy (const vfs_path_t *filename_vpath) { vfs_path_t *tmp_vpath = NULL; int fdin, fdout = -1; @@ -130,8 +130,8 @@ mc_def_getlocalcopy (const vfs_path_t * filename_vpath) /* --------------------------------------------------------------------------------------------- */ static int -mc_def_ungetlocalcopy (const vfs_path_t * filename_vpath, - const vfs_path_t * local_vpath, gboolean has_changed) +mc_def_ungetlocalcopy (const vfs_path_t *filename_vpath, + const vfs_path_t *local_vpath, gboolean has_changed) { int fdin = -1, fdout = -1; const char *local; @@ -188,7 +188,7 @@ mc_def_ungetlocalcopy (const vfs_path_t * filename_vpath, /* --------------------------------------------------------------------------------------------- */ int -mc_open (const vfs_path_t * vpath, int flags, ...) +mc_open (const vfs_path_t *vpath, int flags, ...) { int result = -1; mode_t mode = 0; @@ -267,7 +267,7 @@ MC_NAMEOP (mknod, (const vfs_path_t *vpath, mode_t mode, dev_t dev), (vpath, mod /* --------------------------------------------------------------------------------------------- */ int -mc_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +mc_symlink (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { int result = -1; @@ -361,7 +361,7 @@ mc_ctl (int handle, int ctlop, void *arg) /* --------------------------------------------------------------------------------------------- */ int -mc_setctl (const vfs_path_t * vpath, int ctlop, void *arg) +mc_setctl (const vfs_path_t *vpath, int ctlop, void *arg) { int result = -1; struct vfs_class *me; @@ -408,7 +408,7 @@ mc_close (int handle) /* --------------------------------------------------------------------------------------------- */ DIR * -mc_opendir (const vfs_path_t * vpath) +mc_opendir (const vfs_path_t *vpath) { int handle, *handlep; void *info; @@ -450,7 +450,7 @@ mc_opendir (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ struct vfs_dirent * -mc_readdir (DIR * dirp) +mc_readdir (DIR *dirp) { int handle; struct vfs_class *vfs; @@ -481,7 +481,7 @@ mc_readdir (DIR * dirp) #ifdef HAVE_CHARSET str_vfs_convert_from (vfs_path_element->dir.converter, entry->d_name, vfs_str_buffer); #else - g_string_assign (vfs_str_buffer, entry->d_name); + g_string_append_len (vfs_str_buffer, entry->d_name, entry->d_len); #endif vfs_dirent_assign (mc_readdir_result, vfs_str_buffer->str, entry->d_ino); vfs_dirent_free (entry); @@ -494,7 +494,7 @@ mc_readdir (DIR * dirp) /* --------------------------------------------------------------------------------------------- */ int -mc_closedir (DIR * dirp) +mc_closedir (DIR *dirp) { int handle; struct vfs_class *vfs; diff --git a/lib/vfs/parse_ls_vga.c b/lib/vfs/parse_ls_vga.c index dcb82be7cc..4e457afa35 100644 --- a/lib/vfs/parse_ls_vga.c +++ b/lib/vfs/parse_ls_vga.c @@ -205,7 +205,7 @@ is_year (char *str, struct tm *tim) /* --------------------------------------------------------------------------------------------- */ gboolean -vfs_parse_filetype (const char *s, size_t * ret_skipped, mode_t * ret_type) +vfs_parse_filetype (const char *s, size_t *ret_skipped, mode_t *ret_type) { mode_t type; @@ -272,7 +272,7 @@ vfs_parse_filetype (const char *s, size_t * ret_skipped, mode_t * ret_type) /* --------------------------------------------------------------------------------------------- */ gboolean -vfs_parse_fileperms (const char *s, size_t * ret_skipped, mode_t * ret_perms) +vfs_parse_fileperms (const char *s, size_t *ret_skipped, mode_t *ret_perms) { const char *p = s; mode_t perms = 0; @@ -411,7 +411,7 @@ vfs_parse_fileperms (const char *s, size_t * ret_skipped, mode_t * ret_perms) /* --------------------------------------------------------------------------------------------- */ gboolean -vfs_parse_filemode (const char *s, size_t * ret_skipped, mode_t * ret_mode) +vfs_parse_filemode (const char *s, size_t *ret_skipped, mode_t *ret_mode) { const char *p = s; mode_t type, perms; @@ -434,7 +434,7 @@ vfs_parse_filemode (const char *s, size_t * ret_skipped, mode_t * ret_mode) /* --------------------------------------------------------------------------------------------- */ gboolean -vfs_parse_raw_filemode (const char *s, size_t * ret_skipped, mode_t * ret_mode) +vfs_parse_raw_filemode (const char *s, size_t *ret_skipped, mode_t *ret_mode) { const char *p = s; mode_t remote_type = 0, local_type, perms = 0; @@ -495,7 +495,7 @@ vfs_parse_raw_filemode (const char *s, size_t * ret_skipped, mode_t * ret_mode) /* --------------------------------------------------------------------------------------------- */ gboolean -vfs_parse_month (const char *str, struct tm * tim) +vfs_parse_month (const char *str, struct tm *tim) { static const char *month = "JanFebMarAprMayJunJulAugSepOctNovDec"; const char *pos; @@ -517,7 +517,7 @@ vfs_parse_month (const char *str, struct tm * tim) /** This function parses from idx in the columns[] array */ int -vfs_parse_filedate (int idx, time_t * t) +vfs_parse_filedate (int idx, time_t *t) { char *p; struct tm tim; @@ -679,8 +679,8 @@ vfs_parse_ls_lga_get_final_spaces (void) /* --------------------------------------------------------------------------------------------- */ gboolean -vfs_parse_ls_lga (const char *p, struct stat * s, char **filename, char **linkname, - size_t * num_spaces) +vfs_parse_ls_lga (const char *p, struct stat *s, char **filename, char **linkname, + size_t *num_spaces) { int idx, idx2, num_cols; int i; diff --git a/lib/vfs/path.c b/lib/vfs/path.c index 85faa9abd2..c7ecc63c08 100644 --- a/lib/vfs/path.c +++ b/lib/vfs/path.c @@ -151,6 +151,7 @@ vfs_canon (const char *path) char *local; +#ifdef HAVE_CHARSET if (g_str_has_prefix (path, VFS_ENCODING_PREFIX)) { /* @@ -160,6 +161,7 @@ vfs_canon (const char *path) local = mc_build_filename (PATH_SEP_STR, path, (char *) NULL); } else +#endif { const char *curr_dir; @@ -238,7 +240,7 @@ vfs_get_encoding (const char *path, ssize_t len) */ static void -vfs_path_url_split (vfs_path_element_t * path_element, const char *path) +vfs_path_url_split (vfs_path_element_t *path_element, const char *path) { char *pcopy; char *colon, *at, *rest; @@ -439,11 +441,20 @@ vfs_path_from_str_deprecated_parser (char *path) static vfs_path_t * vfs_path_from_str_uri_parser (char *path) { + gboolean path_is_absolute; vfs_path_t *vpath; vfs_path_element_t *element; char *url_delimiter; - vpath = vfs_path_new (path != NULL && !IS_PATH_SEP (*path)); + if (path == NULL) + return vfs_path_new (FALSE); + + path_is_absolute = IS_PATH_SEP (*path); +#ifdef HAVE_CHARSET + path_is_absolute = path_is_absolute || g_str_has_prefix (path, VFS_ENCODING_PREFIX); +#endif + + vpath = vfs_path_new (!path_is_absolute); while ((url_delimiter = g_strrstr (path, VFS_PATH_URL_DELIMITER)) != NULL) { @@ -455,7 +466,7 @@ vfs_path_from_str_uri_parser (char *path) vfs_prefix_start = real_vfs_prefix_start; if (IS_PATH_SEP (*vfs_prefix_start)) - vfs_prefix_start += 1; + vfs_prefix_start++; *url_delimiter = '\0'; @@ -471,9 +482,7 @@ vfs_path_from_str_uri_parser (char *path) slash_pointer = strchr (url_delimiter, PATH_SEP); if (slash_pointer == NULL) - { element->path = g_strdup (""); - } else { element->path = vfs_translate_path_n (slash_pointer + 1); @@ -531,8 +540,8 @@ vfs_path_from_str_uri_parser (char *path) */ static void -vfs_path_tokens_add_class_info (const vfs_path_element_t * element, GString * ret_tokens, - GString * element_tokens) +vfs_path_tokens_add_class_info (const vfs_path_element_t *element, GString *ret_tokens, + GString *element_tokens) { if (((element->class->flags & VFSF_LOCAL) == 0 || ret_tokens->len > 0) && element_tokens->len > 0) @@ -626,7 +635,7 @@ vfs_path_strip_home (const char *dir) */ char * -vfs_path_to_str_flags (const vfs_path_t * vpath, int elements_count, vfs_path_flag_t flags) +vfs_path_to_str_flags (const vfs_path_t *vpath, int elements_count, vfs_path_flag_t flags) { int element_index; GString *buffer; @@ -661,7 +670,7 @@ vfs_path_to_str_flags (const vfs_path_t * vpath, int elements_count, vfs_path_fl g_string_append (buffer, element->vfs_prefix); g_string_append (buffer, VFS_PATH_URL_DELIMITER); - url_str = vfs_path_build_url_params_str (element, !(flags & VPF_STRIP_PASSWORD)); + url_str = vfs_path_build_url_params_str (element, (flags & VPF_STRIP_PASSWORD) == 0); if (url_str != NULL) { g_string_append_len (buffer, url_str->str, url_str->len); @@ -718,7 +727,7 @@ vfs_path_to_str_flags (const vfs_path_t * vpath, int elements_count, vfs_path_fl */ char * -vfs_path_to_str_elements_count (const vfs_path_t * vpath, int elements_count) +vfs_path_to_str_elements_count (const vfs_path_t *vpath, int elements_count) { return vfs_path_to_str_flags (vpath, elements_count, VPF_NONE); } @@ -805,7 +814,7 @@ vfs_path_new (gboolean relative) */ int -vfs_path_elements_count (const vfs_path_t * vpath) +vfs_path_elements_count (const vfs_path_t *vpath) { return (vpath != NULL && vpath->path != NULL) ? vpath->path->len : 0; } @@ -818,7 +827,7 @@ vfs_path_elements_count (const vfs_path_t * vpath) */ void -vfs_path_add_element (vfs_path_t * vpath, const vfs_path_element_t * path_element) +vfs_path_add_element (vfs_path_t *vpath, const vfs_path_element_t *path_element) { g_array_append_val (vpath->path, path_element); g_free (vpath->str); @@ -839,7 +848,7 @@ vfs_path_add_element (vfs_path_t * vpath, const vfs_path_element_t * path_elemen */ const vfs_path_element_t * -vfs_path_get_by_index (const vfs_path_t * vpath, int element_index) +vfs_path_get_by_index (const vfs_path_t *vpath, int element_index) { int n; @@ -873,7 +882,7 @@ vfs_path_get_by_index (const vfs_path_t * vpath, int element_index) */ vfs_path_element_t * -vfs_path_element_clone (const vfs_path_element_t * element) +vfs_path_element_clone (const vfs_path_element_t *element) { vfs_path_element_t *new_element = g_new (vfs_path_element_t, 1); @@ -906,7 +915,7 @@ vfs_path_element_clone (const vfs_path_element_t * element) */ void -vfs_path_element_free (vfs_path_element_t * element) +vfs_path_element_free (vfs_path_element_t *element) { if (element == NULL) return; @@ -937,7 +946,7 @@ vfs_path_element_free (vfs_path_element_t * element) */ vfs_path_t * -vfs_path_clone (const vfs_path_t * vpath) +vfs_path_clone (const vfs_path_t *vpath) { vfs_path_t *new_vpath; int vpath_element_index; @@ -971,7 +980,7 @@ vfs_path_clone (const vfs_path_t * vpath) */ char * -vfs_path_free (vfs_path_t * vpath, gboolean free_str) +vfs_path_free (vfs_path_t *vpath, gboolean free_str) { int vpath_element_index; char *ret; @@ -1013,7 +1022,7 @@ vfs_path_free (vfs_path_t * vpath, gboolean free_str) */ void -vfs_path_remove_element_by_index (vfs_path_t * vpath, int element_index) +vfs_path_remove_element_by_index (vfs_path_t *vpath, int element_index) { vfs_path_element_t *element; @@ -1071,7 +1080,7 @@ vfs_prefix_to_class (const char *prefix) */ gboolean -vfs_path_element_need_cleanup_converter (const vfs_path_element_t * element) +vfs_path_element_need_cleanup_converter (const vfs_path_element_t *element) { return (element->dir.converter != str_cnv_from_term && element->dir.converter != INVALID_CONV); } @@ -1086,7 +1095,7 @@ vfs_path_element_need_cleanup_converter (const vfs_path_element_t * element) * @return pointer to path structure (for use function in another functions) */ vfs_path_t * -vfs_path_change_encoding (vfs_path_t * vpath, const char *encoding) +vfs_path_change_encoding (vfs_path_t *vpath, const char *encoding) { vfs_path_element_t *path_element; @@ -1122,7 +1131,7 @@ vfs_path_change_encoding (vfs_path_t * vpath, const char *encoding) */ char * -vfs_path_serialize (const vfs_path_t * vpath, GError ** mcerror) +vfs_path_serialize (const vfs_path_t *vpath, GError **mcerror) { mc_config_t *cpath; ssize_t element_index; @@ -1177,7 +1186,7 @@ vfs_path_serialize (const vfs_path_t * vpath, GError ** mcerror) */ vfs_path_t * -vfs_path_deserialize (const char *data, GError ** mcerror) +vfs_path_deserialize (const char *data, GError **mcerror) { mc_config_t *cpath; size_t element_index; @@ -1286,7 +1295,7 @@ vfs_path_build_filename (const char *first_element, ...) */ vfs_path_t * -vfs_path_append_new (const vfs_path_t * vpath, const char *first_element, ...) +vfs_path_append_new (const vfs_path_t *vpath, const char *first_element, ...) { va_list args; char *str_path; @@ -1320,7 +1329,7 @@ vfs_path_append_new (const vfs_path_t * vpath, const char *first_element, ...) */ vfs_path_t * -vfs_path_append_vpath_new (const vfs_path_t * first_vpath, ...) +vfs_path_append_vpath_new (const vfs_path_t *first_vpath, ...) { va_list args; vfs_path_t *ret_vpath; @@ -1364,7 +1373,7 @@ vfs_path_append_vpath_new (const vfs_path_t * first_vpath, ...) */ size_t -vfs_path_tokens_count (const vfs_path_t * vpath) +vfs_path_tokens_count (const vfs_path_t *vpath) { size_t count_tokens = 0; int element_index; @@ -1408,7 +1417,7 @@ vfs_path_tokens_count (const vfs_path_t * vpath) */ char * -vfs_path_tokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t length) +vfs_path_tokens_get (const vfs_path_t *vpath, ssize_t start_position, ssize_t length) { GString *ret_tokens, *element_tokens; int element_index; @@ -1490,7 +1499,7 @@ vfs_path_tokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t l */ vfs_path_t * -vfs_path_vtokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t length) +vfs_path_vtokens_get (const vfs_path_t *vpath, ssize_t start_position, ssize_t length) { char *str_tokens; vfs_path_t *ret_vpath = NULL; @@ -1516,7 +1525,7 @@ vfs_path_vtokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t */ GString * -vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep_password) +vfs_path_build_url_params_str (const vfs_path_element_t *element, gboolean keep_password) { GString *buffer; @@ -1543,12 +1552,9 @@ vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep g_string_append (buffer, element->host); if (element->ipv6) g_string_append_c (buffer, ']'); - } - if ((element->port) != 0 && (element->host != NULL)) - { - g_string_append_c (buffer, ':'); - g_string_append_printf (buffer, "%d", element->port); + if (element->port != 0) + g_string_append_printf (buffer, ":%d", element->port); } if (buffer->len != 0) @@ -1568,7 +1574,7 @@ vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep */ GString * -vfs_path_element_build_pretty_path_str (const vfs_path_element_t * element) +vfs_path_element_build_pretty_path_str (const vfs_path_element_t *element) { GString *url_params, *pretty_path; @@ -1599,7 +1605,7 @@ vfs_path_element_build_pretty_path_str (const vfs_path_element_t * element) */ gboolean -vfs_path_equal (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +vfs_path_equal (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { const char *path1, *path2; gboolean ret_val; @@ -1627,7 +1633,7 @@ vfs_path_equal (const vfs_path_t * vpath1, const vfs_path_t * vpath2) */ gboolean -vfs_path_equal_len (const vfs_path_t * vpath1, const vfs_path_t * vpath2, size_t len) +vfs_path_equal_len (const vfs_path_t *vpath1, const vfs_path_t *vpath2, size_t len) { const char *path1, *path2; gboolean ret_val; @@ -1653,7 +1659,7 @@ vfs_path_equal_len (const vfs_path_t * vpath1, const vfs_path_t * vpath2, size_t */ size_t -vfs_path_len (const vfs_path_t * vpath) +vfs_path_len (const vfs_path_t *vpath) { if (vpath == NULL) return 0; @@ -1671,7 +1677,7 @@ vfs_path_len (const vfs_path_t * vpath) */ vfs_path_t * -vfs_path_to_absolute (const vfs_path_t * vpath) +vfs_path_to_absolute (const vfs_path_t *vpath) { vfs_path_t *absolute_vpath; const char *path_str; diff --git a/lib/vfs/path.h b/lib/vfs/path.h index 0887111656..8ec4409851 100644 --- a/lib/vfs/path.h +++ b/lib/vfs/path.h @@ -100,7 +100,7 @@ vfs_path_t *vfs_path_to_absolute (const vfs_path_t * vpath); /*** inline functions ****************************************************************************/ static inline gboolean -vfs_path_element_valid (const vfs_path_element_t * element) +vfs_path_element_valid (const vfs_path_element_t *element) { return (element != NULL && element->class != NULL); } @@ -108,7 +108,7 @@ vfs_path_element_valid (const vfs_path_element_t * element) /* --------------------------------------------------------------------------------------------- */ static inline const char * -vfs_path_get_last_path_str (const vfs_path_t * vpath) +vfs_path_get_last_path_str (const vfs_path_t *vpath) { const vfs_path_element_t *element; if (vpath == NULL) @@ -120,7 +120,7 @@ vfs_path_get_last_path_str (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static inline const struct vfs_class * -vfs_path_get_last_path_vfs (const vfs_path_t * vpath) +vfs_path_get_last_path_vfs (const vfs_path_t *vpath) { const vfs_path_element_t *element; if (vpath == NULL) @@ -139,7 +139,7 @@ vfs_path_get_last_path_vfs (const vfs_path_t * vpath) */ static inline const char * -vfs_path_as_str (const vfs_path_t * vpath) +vfs_path_as_str (const vfs_path_t *vpath) { return (vpath == NULL ? NULL : vpath->str); } diff --git a/lib/vfs/utilvfs.c b/lib/vfs/utilvfs.c index 0356832345..5a9fa453b6 100644 --- a/lib/vfs/utilvfs.c +++ b/lib/vfs/utilvfs.c @@ -179,7 +179,7 @@ vfs_findgid (const char *gname) */ int -vfs_mkstemps (vfs_path_t ** pname_vpath, const char *prefix, const char *param_basename) +vfs_mkstemps (vfs_path_t **pname_vpath, const char *prefix, const char *param_basename) { const char *p; GString *suffix; @@ -356,7 +356,7 @@ vfs_url_split (const char *path, int default_port, vfs_url_flags_t flags) /* --------------------------------------------------------------------------------------------- */ -void __attribute__ ((noreturn)) vfs_die (const char *m) +void __attribute__((noreturn)) vfs_die (const char *m) { message (D_ERROR, _("Internal error:"), "%s", m); exit (EXIT_FAILURE); diff --git a/lib/vfs/utilvfs.h b/lib/vfs/utilvfs.h index d50d4b6161..362bd55d13 100644 --- a/lib/vfs/utilvfs.h +++ b/lib/vfs/utilvfs.h @@ -48,14 +48,14 @@ char *vfs_get_password (const char *msg); char *vfs_get_local_username (void); -gboolean vfs_parse_filetype (const char *s, size_t * ret_skipped, mode_t * ret_type); -gboolean vfs_parse_fileperms (const char *s, size_t * ret_skipped, mode_t * ret_perms); -gboolean vfs_parse_filemode (const char *s, size_t * ret_skipped, mode_t * ret_mode); -gboolean vfs_parse_raw_filemode (const char *s, size_t * ret_skipped, mode_t * ret_mode); +gboolean vfs_parse_filetype (const char *s, size_t *ret_skipped, mode_t * ret_type); +gboolean vfs_parse_fileperms (const char *s, size_t *ret_skipped, mode_t * ret_perms); +gboolean vfs_parse_filemode (const char *s, size_t *ret_skipped, mode_t * ret_mode); +gboolean vfs_parse_raw_filemode (const char *s, size_t *ret_skipped, mode_t * ret_mode); void vfs_parse_ls_lga_init (void); gboolean vfs_parse_ls_lga (const char *p, struct stat *s, char **filename, char **linkname, - size_t * filename_pos); + size_t *filename_pos); size_t vfs_parse_ls_lga_get_final_spaces (void); gboolean vfs_parse_month (const char *str, struct tm *tim); int vfs_parse_filedate (int idx, time_t * t); diff --git a/lib/vfs/vfs.c b/lib/vfs/vfs.c index 18d15ed358..f4dad4649a 100644 --- a/lib/vfs/vfs.c +++ b/lib/vfs/vfs.c @@ -118,7 +118,7 @@ static long vfs_free_handle_list = -1; */ static estr_t -_vfs_translate_path (const char *path, int size, GIConv defcnv, GString * buffer) +_vfs_translate_path (const char *path, int size, GIConv defcnv, GString *buffer) { estr_t state = ESTR_SUCCESS; #ifdef HAVE_CHARSET @@ -212,7 +212,7 @@ vfs_get_openfile (int handle) /* --------------------------------------------------------------------------------------------- */ static gboolean -vfs_test_current_dir (const vfs_path_t * vpath) +vfs_test_current_dir (const vfs_path_t *vpath) { struct stat my_stat, my_stat2; @@ -308,7 +308,7 @@ vfs_ferrno (struct vfs_class *vfs) /* --------------------------------------------------------------------------------------------- */ gboolean -vfs_register_class (struct vfs_class * vfs) +vfs_register_class (struct vfs_class *vfs) { if (vfs->init != NULL) /* vfs has own initialization function */ if (!vfs->init (vfs)) /* but it failed */ @@ -430,7 +430,7 @@ vfs_get_raw_current_dir (void) * @param vpath new path */ void -vfs_set_raw_current_dir (const vfs_path_t * vpath) +vfs_set_raw_current_dir (const vfs_path_t *vpath) { vfs_path_free (current_path, TRUE); current_path = (vfs_path_t *) vpath; @@ -449,7 +449,7 @@ vfs_current_is_local (void) /* Return flags of the VFS class of the given filename */ vfs_flags_t -vfs_file_class_flags (const vfs_path_t * vpath) +vfs_file_class_flags (const vfs_path_t *vpath) { const vfs_path_element_t *path_element; @@ -565,6 +565,7 @@ vfs_dirent_assign (struct vfs_dirent *d, const char *fname, ino_t ino) { g_string_assign (d->d_name_str, fname); d->d_name = d->d_name_str->str; + d->d_len = d->d_name_str->len; d->d_ino = ino; } @@ -606,7 +607,7 @@ vfs_fill_names (fill_names_f func) /* --------------------------------------------------------------------------------------------- */ gboolean -vfs_file_is_local (const vfs_path_t * vpath) +vfs_file_is_local (const vfs_path_t *vpath) { return (vfs_file_class_flags (vpath) & VFSF_LOCAL) != 0; } diff --git a/lib/vfs/vfs.h b/lib/vfs/vfs.h index 260e8f337b..0a55c98bb7 100644 --- a/lib/vfs/vfs.h +++ b/lib/vfs/vfs.h @@ -214,6 +214,7 @@ struct vfs_dirent /* public */ ino_t d_ino; char *d_name; /* Alias of d_name_str->str */ + size_t d_len; /* Alias of d_name_str->len */ }; /*** global variables defined in .c file *********************************************************/ diff --git a/lib/widget/background.c b/lib/widget/background.c index afea82538a..a82e51eb54 100644 --- a/lib/widget/background.c +++ b/lib/widget/background.c @@ -51,7 +51,7 @@ /* --------------------------------------------------------------------------------------------- */ static const int * -background_get_colors (const Widget * w) +background_get_colors (const Widget *w) { return &(CONST_BACKGROUND (w)->color); } @@ -59,7 +59,7 @@ background_get_colors (const Widget * w) /* --------------------------------------------------------------------------------------------- */ static void -background_adjust (WBackground * b) +background_adjust (WBackground *b) { Widget *w = WIDGET (b); @@ -70,7 +70,7 @@ background_adjust (WBackground * b) /* --------------------------------------------------------------------------------------------- */ static void -background_draw (const WBackground * b) +background_draw (const WBackground *b) { const Widget *w = CONST_WIDGET (b); @@ -83,7 +83,7 @@ background_draw (const WBackground * b) /* --------------------------------------------------------------------------------------------- */ cb_ret_t -background_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +background_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WBackground *b = BACKGROUND (w); diff --git a/lib/widget/button.c b/lib/widget/button.c index 2cdaafc816..5ec45e75aa 100644 --- a/lib/widget/button.c +++ b/lib/widget/button.c @@ -59,7 +59,7 @@ /* --------------------------------------------------------------------------------------------- */ cb_ret_t -button_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +button_default_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WButton *b = BUTTON (w); WGroup *g = w->owner; @@ -181,7 +181,7 @@ button_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm /* --------------------------------------------------------------------------------------------- */ void -button_mouse_default_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +button_mouse_default_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { (void) event; @@ -228,7 +228,7 @@ button_new (int y, int x, int action, button_flags_t flags, const char *text, bc /* --------------------------------------------------------------------------------------------- */ char * -button_get_text (const WButton * b) +button_get_text (const WButton *b) { return hotkey_get_text (b->text); } @@ -236,7 +236,7 @@ button_get_text (const WButton * b) /* --------------------------------------------------------------------------------------------- */ void -button_set_text (WButton * b, const char *text) +button_set_text (WButton *b, const char *text) { Widget *w = WIDGET (b); hotkey_t hk; @@ -258,7 +258,7 @@ button_set_text (WButton * b, const char *text) /* --------------------------------------------------------------------------------------------- */ int -button_get_len (const WButton * b) +button_get_len (const WButton *b) { int ret = hotkey_width (b->text); diff --git a/lib/widget/buttonbar.c b/lib/widget/buttonbar.c index 24e4f75821..a4b1e2a12c 100644 --- a/lib/widget/buttonbar.c +++ b/lib/widget/buttonbar.c @@ -62,7 +62,7 @@ /* calculate positions of buttons; width is never less than 7 */ static void -buttonbar_init_button_positions (WButtonBar * bb) +buttonbar_init_button_positions (WButtonBar *bb) { int i; int pos = 0; @@ -111,7 +111,7 @@ buttonbar_init_button_positions (WButtonBar * bb) /* return width of one button */ static int -buttonbar_get_button_width (const WButtonBar * bb, int i) +buttonbar_get_button_width (const WButtonBar *bb, int i) { if (i == 0) return bb->labels[0].end_coord; @@ -121,7 +121,7 @@ buttonbar_get_button_width (const WButtonBar * bb, int i) /* --------------------------------------------------------------------------------------------- */ static int -buttonbar_get_button_by_x_coord (const WButtonBar * bb, int x) +buttonbar_get_button_by_x_coord (const WButtonBar *bb, int x) { int i; @@ -135,7 +135,7 @@ buttonbar_get_button_by_x_coord (const WButtonBar * bb, int x) /* --------------------------------------------------------------------------------------------- */ static void -set_label_text (WButtonBar * bb, int idx, const char *text) +set_label_text (WButtonBar *bb, int idx, const char *text) { g_free (bb->labels[idx - 1].text); bb->labels[idx - 1].text = g_strdup (text); @@ -145,7 +145,7 @@ set_label_text (WButtonBar * bb, int idx, const char *text) /* returns TRUE if a function has been called, FALSE otherwise. */ static gboolean -buttonbar_call (WButtonBar * bb, int i) +buttonbar_call (WButtonBar *bb, int i) { cb_ret_t ret = MSG_NOT_HANDLED; Widget *w = WIDGET (bb); @@ -162,7 +162,7 @@ buttonbar_call (WButtonBar * bb, int i) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -buttonbar_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +buttonbar_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WButtonBar *bb = BUTTONBAR (w); int i; @@ -216,7 +216,7 @@ buttonbar_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, voi /* --------------------------------------------------------------------------------------------- */ static void -buttonbar_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +buttonbar_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { switch (msg) { @@ -260,8 +260,8 @@ buttonbar_new (void) /* --------------------------------------------------------------------------------------------- */ void -buttonbar_set_label (WButtonBar * bb, int idx, const char *text, const global_keymap_t * keymap, - Widget * receiver) +buttonbar_set_label (WButtonBar *bb, int idx, const char *text, const global_keymap_t *keymap, + Widget *receiver) { if ((bb != NULL) && (idx >= 1) && (idx <= BUTTONBAR_LABELS_NUM)) { @@ -284,7 +284,7 @@ buttonbar_set_label (WButtonBar * bb, int idx, const char *text, const global_ke /* Find ButtonBar widget in the dialog */ WButtonBar * -buttonbar_find (const WDialog * h) +buttonbar_find (const WDialog *h) { return BUTTONBAR (widget_find_by_type (CONST_WIDGET (h), buttonbar_callback)); } diff --git a/lib/widget/check.c b/lib/widget/check.c index b77573ec54..280d4f4a3a 100644 --- a/lib/widget/check.c +++ b/lib/widget/check.c @@ -56,7 +56,7 @@ /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -check_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +check_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WCheck *c = CHECK (w); @@ -110,7 +110,7 @@ check_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d /* --------------------------------------------------------------------------------------------- */ static void -check_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +check_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { (void) event; @@ -156,7 +156,7 @@ check_new (int y, int x, gboolean state, const char *text) /* --------------------------------------------------------------------------------------------- */ void -check_set_text (WCheck * check, const char *text) +check_set_text (WCheck *check, const char *text) { Widget *w = WIDGET (check); hotkey_t hk; diff --git a/lib/widget/dialog-switch.c b/lib/widget/dialog-switch.c index 74aedff0ca..8fa9f5e90c 100644 --- a/lib/widget/dialog-switch.c +++ b/lib/widget/dialog-switch.c @@ -89,7 +89,7 @@ dialog_switch_suspend (void *data, void *user_data) /* --------------------------------------------------------------------------------------------- */ static void -dialog_switch_goto (GList * dlg) +dialog_switch_goto (GList *dlg) { if (mc_current != dlg) { @@ -125,7 +125,7 @@ dialog_switch_goto (GList * dlg) /* --------------------------------------------------------------------------------------------- */ static void -dialog_switch_resize (WDialog * d) +dialog_switch_resize (WDialog *d) { if (widget_get_state (WIDGET (d), WST_ACTIVE)) send_message (d, NULL, MSG_RESIZE, 0, NULL); @@ -138,7 +138,7 @@ dialog_switch_resize (WDialog * d) /* --------------------------------------------------------------------------------------------- */ void -dialog_switch_add (WDialog * h) +dialog_switch_add (WDialog *h) { GList *dlg; @@ -159,7 +159,7 @@ dialog_switch_add (WDialog * h) /* --------------------------------------------------------------------------------------------- */ void -dialog_switch_remove (WDialog * h) +dialog_switch_remove (WDialog *h) { GList *this; @@ -252,9 +252,8 @@ dialog_switch_list (void) else title = g_strdup (""); - listbox_add_item (listbox->list, LISTBOX_APPEND_BEFORE, get_hotkey (i++), title, h, FALSE); - - g_free (title); + listbox_add_item_take (listbox->list, LISTBOX_APPEND_BEFORE, get_hotkey (i++), title, h, + FALSE); } selected = listbox_run_with_data (listbox, mc_current); diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c index 2596857508..63932ed997 100644 --- a/lib/widget/dialog.c +++ b/lib/widget/dialog.c @@ -76,7 +76,7 @@ const global_keymap_t *dialog_map = NULL; /* --------------------------------------------------------------------------------------------- */ static const int * -dlg_default_get_colors (const Widget * w) +dlg_default_get_colors (const Widget *w) { return CONST_DIALOG (w)->colors; } @@ -86,7 +86,7 @@ dlg_default_get_colors (const Widget * w) * Read histories from the ${XDG_DATA_HOME}/mc/history file */ static void -dlg_read_history (WDialog * h) +dlg_read_history (WDialog *h) { char *profile; ev_history_load_save_t event_data; @@ -123,7 +123,7 @@ refresh_cmd (void) /* --------------------------------------------------------------------------------------------- */ static void -dlg_help (const WDialog * h) +dlg_help (const WDialog *h) { ev_help_t event_data = { NULL, h->help_ctx }; @@ -133,7 +133,7 @@ dlg_help (const WDialog * h) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -dlg_execute_cmd (WDialog * h, long command) +dlg_execute_cmd (WDialog *h, long command) { WGroup *g = GROUP (h); cb_ret_t ret = MSG_HANDLED; @@ -202,7 +202,7 @@ dlg_execute_cmd (WDialog * h, long command) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -dlg_handle_key (WDialog * h, int d_key) +dlg_handle_key (WDialog *h, int d_key) { long command; @@ -218,7 +218,7 @@ dlg_handle_key (WDialog * h, int d_key) /* --------------------------------------------------------------------------------------------- */ static void -dlg_key_event (WDialog * h, int d_key) +dlg_key_event (WDialog *h, int d_key) { Widget *w = WIDGET (h); WGroup *g = GROUP (h); @@ -261,7 +261,7 @@ dlg_key_event (WDialog * h, int d_key) /* --------------------------------------------------------------------------------------------- */ static int -dlg_handle_mouse_event (Widget * w, Gpm_Event * event) +dlg_handle_mouse_event (Widget *w, Gpm_Event *event) { if (w->mouse_callback != NULL) { @@ -278,7 +278,7 @@ dlg_handle_mouse_event (Widget * w, Gpm_Event * event) /* --------------------------------------------------------------------------------------------- */ static void -frontend_dlg_run (WDialog * h) +frontend_dlg_run (WDialog *h) { Widget *wh = WIDGET (h); Gpm_Event event; @@ -328,7 +328,7 @@ frontend_dlg_run (WDialog * h) /* --------------------------------------------------------------------------------------------- */ static void -dlg_default_destroy (Widget * w) +dlg_default_destroy (Widget *w) { WDialog *h = DIALOG (w); @@ -349,7 +349,7 @@ dlg_default_destroy (Widget * w) /** Default dialog callback */ cb_ret_t -dlg_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +dlg_default_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -374,7 +374,7 @@ dlg_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v /* --------------------------------------------------------------------------------------------- */ void -dlg_default_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +dlg_default_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { switch (msg) { @@ -474,7 +474,7 @@ dlg_set_default_colors (void) /* --------------------------------------------------------------------------------------------- */ void -dlg_close (WDialog * h) +dlg_close (WDialog *h) { widget_set_state (WIDGET (h), WST_CLOSED, TRUE); } @@ -483,7 +483,7 @@ dlg_close (WDialog * h) /** Init the process */ void -dlg_init (WDialog * h) +dlg_init (WDialog *h) { WGroup *g = GROUP (h); Widget *wh = WIDGET (h); @@ -518,7 +518,7 @@ dlg_init (WDialog * h) /* --------------------------------------------------------------------------------------------- */ void -dlg_process_event (WDialog * h, int key, Gpm_Event * event) +dlg_process_event (WDialog *h, int key, Gpm_Event *event) { switch (key) { @@ -545,7 +545,7 @@ dlg_process_event (WDialog * h, int key, Gpm_Event * event) /** Shutdown the dlg_run */ void -dlg_run_done (WDialog * h) +dlg_run_done (WDialog *h) { top_dlg = g_list_remove (top_dlg, h); @@ -567,7 +567,7 @@ dlg_run_done (WDialog * h) */ int -dlg_run (WDialog * h) +dlg_run (WDialog *h) { dlg_init (h); frontend_dlg_run (h); @@ -581,7 +581,7 @@ dlg_run (WDialog * h) * Write history to the ${XDG_DATA_HOME}/mc/history file */ void -dlg_save_history (WDialog * h) +dlg_save_history (WDialog *h) { char *profile; int i; @@ -615,7 +615,7 @@ dlg_save_history (WDialog * h) /* --------------------------------------------------------------------------------------------- */ char * -dlg_get_title (const WDialog * h, size_t len) +dlg_get_title (const WDialog *h, size_t len) { char *t; diff --git a/lib/widget/frame.c b/lib/widget/frame.c index 127649e452..68cf51e42f 100644 --- a/lib/widget/frame.c +++ b/lib/widget/frame.c @@ -54,7 +54,7 @@ /* --------------------------------------------------------------------------------------------- */ static void -frame_adjust (WFrame * f) +frame_adjust (WFrame *f) { Widget *w = WIDGET (f); @@ -65,7 +65,7 @@ frame_adjust (WFrame * f) /* --------------------------------------------------------------------------------------------- */ static void -frame_draw (const WFrame * f) +frame_draw (const WFrame *f) { const Widget *wf = CONST_WIDGET (f); const WRect *w = &wf->rect; @@ -117,7 +117,7 @@ frame_new (int y, int x, int lines, int cols, const char *title, gboolean single /* --------------------------------------------------------------------------------------------- */ cb_ret_t -frame_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +frame_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WFrame *f = FRAME (w); @@ -143,7 +143,7 @@ frame_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d /* --------------------------------------------------------------------------------------------- */ void -frame_set_title (WFrame * f, const char *title) +frame_set_title (WFrame *f, const char *title) { MC_PTR_FREE (f->title); diff --git a/lib/widget/gauge.c b/lib/widget/gauge.c index 14b5fa81f9..37dd02e3a7 100644 --- a/lib/widget/gauge.c +++ b/lib/widget/gauge.c @@ -59,7 +59,7 @@ /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -gauge_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +gauge_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WGauge *g = GAUGE (w); const int *colors; @@ -151,7 +151,7 @@ gauge_new (int y, int x, int cols, gboolean shown, int max, int current) /* --------------------------------------------------------------------------------------------- */ void -gauge_set_value (WGauge * g, int max, int current) +gauge_set_value (WGauge *g, int max, int current) { if (g->current == current && g->max == max) return; /* Do not flicker */ @@ -166,7 +166,7 @@ gauge_set_value (WGauge * g, int max, int current) /* --------------------------------------------------------------------------------------------- */ void -gauge_show (WGauge * g, gboolean shown) +gauge_show (WGauge *g, gboolean shown) { if (g->shown != shown) { diff --git a/lib/widget/group.c b/lib/widget/group.c index f1a170cda1..3f37c1023b 100644 --- a/lib/widget/group.c +++ b/lib/widget/group.c @@ -79,7 +79,7 @@ group_widget_init (void *data, void *user_data) /* --------------------------------------------------------------------------------------------- */ static GList * -group_get_next_or_prev_of (GList * list, gboolean next) +group_get_next_or_prev_of (GList *list, gboolean next) { GList *l = NULL; @@ -110,7 +110,7 @@ group_get_next_or_prev_of (GList * list, gboolean next) /* --------------------------------------------------------------------------------------------- */ static void -group_select_next_or_prev (WGroup * g, gboolean next) +group_select_next_or_prev (WGroup *g, gboolean next) { if (g->widgets != NULL && g->current != NULL) { @@ -148,7 +148,7 @@ group_widget_set_state (gpointer data, gpointer user_data) */ static void -group_send_broadcast_msg_custom (WGroup * g, widget_msg_t msg, gboolean reverse, +group_send_broadcast_msg_custom (WGroup *g, widget_msg_t msg, gboolean reverse, widget_options_t options) { GList *p, *first; @@ -186,7 +186,7 @@ group_send_broadcast_msg_custom (WGroup * g, widget_msg_t msg, gboolean reverse, */ static void -group_default_make_global (Widget * w, const WRect * delta) +group_default_make_global (Widget *w, const WRect *delta) { GList *iter; @@ -222,7 +222,7 @@ group_default_make_global (Widget * w, const WRect * delta) */ static void -group_default_make_local (Widget * w, const WRect * delta) +group_default_make_local (Widget *w, const WRect *delta) { GList *iter; @@ -260,7 +260,7 @@ group_default_make_local (Widget * w, const WRect * delta) */ static GList * -group_default_find (const Widget * w, const Widget * what) +group_default_find (const Widget *w, const Widget *what) { GList *w0; @@ -292,7 +292,7 @@ group_default_find (const Widget * w, const Widget * what) */ static Widget * -group_default_find_by_type (const Widget * w, widget_cb_fn cb) +group_default_find_by_type (const Widget *w, widget_cb_fn cb) { Widget *w0; @@ -324,7 +324,7 @@ group_default_find_by_type (const Widget * w, widget_cb_fn cb) */ static Widget * -group_default_find_by_id (const Widget * w, unsigned long id) +group_default_find_by_id (const Widget *w, unsigned long id) { Widget *w0; @@ -354,7 +354,7 @@ group_default_find_by_id (const Widget * w, unsigned long id) */ static cb_ret_t -group_update_cursor (WGroup * g) +group_update_cursor (WGroup *g) { GList *p = g->current; @@ -422,7 +422,7 @@ group_widget_set_position (gpointer data, gpointer user_data) /* --------------------------------------------------------------------------------------------- */ static void -group_set_position (WGroup * g, const WRect * r) +group_set_position (WGroup *g, const WRect *r) { WRect *w = &WIDGET (g)->rect; widget_shift_scale_t wss; @@ -451,7 +451,7 @@ group_set_position (WGroup * g, const WRect * r) /* --------------------------------------------------------------------------------------------- */ static void -group_default_resize (WGroup * g, WRect * r) +group_default_resize (WGroup *g, WRect *r) { /* This is default resizing mechanism. * The main idea of this code is to resize dialog according to flags @@ -470,7 +470,7 @@ group_default_resize (WGroup * g, WRect * r) /* --------------------------------------------------------------------------------------------- */ static void -group_draw (WGroup * g) +group_draw (WGroup *g) { Widget *wg = WIDGET (g); @@ -495,7 +495,7 @@ group_draw (WGroup * g) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -group_handle_key (WGroup * g, int key) +group_handle_key (WGroup *g, int key) { cb_ret_t handled; @@ -516,7 +516,7 @@ group_handle_key (WGroup * g, int key) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -group_handle_hotkey (WGroup * g, int key) +group_handle_hotkey (WGroup *g, int key) { GList *current; Widget *w; @@ -596,7 +596,7 @@ group_handle_hotkey (WGroup * g, int key) */ void -group_init (WGroup * g, const WRect * r, widget_cb_fn callback, widget_mouse_cb_fn mouse_callback) +group_init (WGroup *g, const WRect *r, widget_cb_fn callback, widget_mouse_cb_fn mouse_callback) { Widget *w = WIDGET (g); @@ -619,7 +619,7 @@ group_init (WGroup * g, const WRect * r, widget_cb_fn callback, widget_mouse_cb_ /* --------------------------------------------------------------------------------------------- */ cb_ret_t -group_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +group_default_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WGroup *g = GROUP (w); @@ -669,7 +669,7 @@ group_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, * @return MSG_HANDLED if set was handled successfully, MSG_NOT_HANDLED otherwise. */ cb_ret_t -group_default_set_state (Widget * w, widget_state_t state, gboolean enable) +group_default_set_state (Widget *w, widget_state_t state, gboolean enable) { gboolean ret = MSG_HANDLED; WGroup *g = GROUP (w); @@ -711,7 +711,7 @@ group_default_set_state (Widget * w, widget_state_t state, gboolean enable) * @return result of mouse event handling */ int -group_handle_mouse_event (Widget * w, Gpm_Event * event) +group_handle_mouse_event (Widget *w, Gpm_Event *event) { WGroup *g = GROUP (w); @@ -761,7 +761,7 @@ group_handle_mouse_event (Widget * w, Gpm_Event * event) */ unsigned long -group_add_widget_autopos (WGroup * g, void *w, widget_pos_flags_t pos_flags, const void *before) +group_add_widget_autopos (WGroup *g, void *w, widget_pos_flags_t pos_flags, const void *before) { Widget *wg = WIDGET (g); Widget *ww = WIDGET (w); @@ -861,7 +861,7 @@ group_remove_widget (void *w) */ void -group_set_current_widget_next (WGroup * g) +group_set_current_widget_next (WGroup *g) { g->current = group_get_next_or_prev_of (g->current, TRUE); } @@ -874,7 +874,7 @@ group_set_current_widget_next (WGroup * g) */ void -group_set_current_widget_prev (WGroup * g) +group_set_current_widget_prev (WGroup *g) { g->current = group_get_next_or_prev_of (g->current, FALSE); } @@ -889,7 +889,7 @@ group_set_current_widget_prev (WGroup * g) */ GList * -group_get_widget_next_of (GList * w) +group_get_widget_next_of (GList *w) { return group_get_next_or_prev_of (w, TRUE); } @@ -904,7 +904,7 @@ group_get_widget_next_of (GList * w) */ GList * -group_get_widget_prev_of (GList * w) +group_get_widget_prev_of (GList *w) { return group_get_next_or_prev_of (w, FALSE); } @@ -917,7 +917,7 @@ group_get_widget_prev_of (GList * w) */ void -group_select_next_widget (WGroup * g) +group_select_next_widget (WGroup *g) { group_select_next_or_prev (g, TRUE); } @@ -930,7 +930,7 @@ group_select_next_widget (WGroup * g) */ void -group_select_prev_widget (WGroup * g) +group_select_prev_widget (WGroup *g) { group_select_next_or_prev (g, FALSE); } @@ -944,7 +944,7 @@ group_select_prev_widget (WGroup * g) */ void -group_select_widget_by_id (const WGroup * g, unsigned long id) +group_select_widget_by_id (const WGroup *g, unsigned long id) { Widget *w; @@ -962,7 +962,7 @@ group_select_widget_by_id (const WGroup * g, unsigned long id) */ void -group_send_broadcast_msg (WGroup * g, widget_msg_t msg) +group_send_broadcast_msg (WGroup *g, widget_msg_t msg) { group_send_broadcast_msg_custom (g, msg, FALSE, WOP_DEFAULT); } diff --git a/lib/widget/group.h b/lib/widget/group.h index 3155d8f131..054fbd1ef7 100644 --- a/lib/widget/group.h +++ b/lib/widget/group.h @@ -77,7 +77,7 @@ void group_send_broadcast_msg (WGroup * g, widget_msg_t message); */ static inline unsigned long -group_add_widget (WGroup * g, void *w) +group_add_widget (WGroup *g, void *w) { return group_add_widget_autopos (g, w, WPOS_KEEP_DEFAULT, g->current != NULL ? g->current->data : NULL); @@ -95,7 +95,7 @@ group_add_widget (WGroup * g, void *w) */ static inline unsigned long -group_add_widget_before (WGroup * g, void *w, void *before) +group_add_widget_before (WGroup *g, void *w, void *before) { return group_add_widget_autopos (g, w, WPOS_KEEP_DEFAULT, before); } @@ -108,7 +108,7 @@ group_add_widget_before (WGroup * g, void *w, void *before) */ static inline void -group_select_current_widget (WGroup * g) +group_select_current_widget (WGroup *g) { if (g->current != NULL) widget_select (WIDGET (g->current->data)); @@ -117,7 +117,7 @@ group_select_current_widget (WGroup * g) /* --------------------------------------------------------------------------------------------- */ static inline unsigned long -group_get_current_widget_id (const WGroup * g) +group_get_current_widget_id (const WGroup *g) { return WIDGET (g->current->data)->id; } diff --git a/lib/widget/groupbox.c b/lib/widget/groupbox.c index 4f6a021450..ecfd54f482 100644 --- a/lib/widget/groupbox.c +++ b/lib/widget/groupbox.c @@ -57,7 +57,7 @@ /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -groupbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +groupbox_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WGroupbox *g = GROUPBOX (w); @@ -116,7 +116,7 @@ groupbox_new (int y, int x, int height, int width, const char *title) /* --------------------------------------------------------------------------------------------- */ void -groupbox_set_title (WGroupbox * g, const char *title) +groupbox_set_title (WGroupbox *g, const char *title) { MC_PTR_FREE (g->title); diff --git a/lib/widget/history.c b/lib/widget/history.c index 7076d13735..a8a30e4b05 100644 --- a/lib/widget/history.c +++ b/lib/widget/history.c @@ -70,7 +70,7 @@ typedef struct /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -history_dlg_reposition (WDialog * dlg_head) +history_dlg_reposition (WDialog *dlg_head) { history_dlg_data *data; int x = 0, y, he, wi; @@ -115,7 +115,7 @@ history_dlg_reposition (WDialog * dlg_head) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -history_dlg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +history_dlg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -154,7 +154,7 @@ history_dlg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v /* --------------------------------------------------------------------------------------------- */ static void -history_create_item (history_descriptor_t * hd, void *data) +history_create_item (history_descriptor_t *hd, void *data) { char *text = (char *) data; size_t width; @@ -168,7 +168,7 @@ history_create_item (history_descriptor_t * hd, void *data) /* --------------------------------------------------------------------------------------------- */ static void * -history_release_item (history_descriptor_t * hd, WLEntry * le) +history_release_item (history_descriptor_t *hd, WLEntry *le) { void *text; @@ -185,7 +185,7 @@ history_release_item (history_descriptor_t * hd, WLEntry * le) /* --------------------------------------------------------------------------------------------- */ void -history_descriptor_init (history_descriptor_t * hd, int y, int x, GList * history, int current) +history_descriptor_init (history_descriptor_t *hd, int y, int x, GList *history, int current) { hd->list = history; hd->y = y; @@ -204,7 +204,7 @@ history_descriptor_init (history_descriptor_t * hd, int y, int x, GList * histor /* --------------------------------------------------------------------------------------------- */ void -history_show (history_descriptor_t * hd) +history_show (history_descriptor_t *hd) { GList *z, *hi; size_t count; diff --git a/lib/widget/hline.c b/lib/widget/hline.c index 0f77a84fbf..14433ae95f 100644 --- a/lib/widget/hline.c +++ b/lib/widget/hline.c @@ -59,7 +59,7 @@ /* --------------------------------------------------------------------------------------------- */ static void -hline_adjust_cols (WHLine * l) +hline_adjust_cols (WHLine *l) { if (l->auto_adjust_cols) { @@ -84,7 +84,7 @@ hline_adjust_cols (WHLine * l) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -hline_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +hline_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WHLine *l = HLINE (w); @@ -164,7 +164,7 @@ hline_new (int y, int x, int width) /* --------------------------------------------------------------------------------------------- */ void -hline_set_text (WHLine * l, const char *text) +hline_set_text (WHLine *l, const char *text) { g_free (l->text); @@ -179,7 +179,7 @@ hline_set_text (WHLine * l, const char *text) /* --------------------------------------------------------------------------------------------- */ void -hline_set_textv (WHLine * l, const char *format, ...) +hline_set_textv (WHLine *l, const char *format, ...) { va_list args; char buf[BUF_1K]; /* FIXME: is it enough? */ diff --git a/lib/widget/input.c b/lib/widget/input.c index a7ad7f5a4b..0897413db1 100644 --- a/lib/widget/input.c +++ b/lib/widget/input.c @@ -88,7 +88,7 @@ static char *kill_buffer = NULL; /* --------------------------------------------------------------------------------------------- */ static size_t -get_history_length (GList * history) +get_history_length (GList *history) { size_t len = 0; @@ -101,7 +101,7 @@ get_history_length (GList * history) /* --------------------------------------------------------------------------------------------- */ static void -draw_history_button (WInput * in) +draw_history_button (WInput *in) { char c; gboolean disabled; @@ -128,7 +128,7 @@ draw_history_button (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -input_mark_cmd (WInput * in, gboolean mark) +input_mark_cmd (WInput *in, gboolean mark) { in->mark = mark ? in->point : -1; } @@ -136,7 +136,7 @@ input_mark_cmd (WInput * in, gboolean mark) /* --------------------------------------------------------------------------------------------- */ static gboolean -input_eval_marks (WInput * in, long *start_mark, long *end_mark) +input_eval_marks (WInput *in, long *start_mark, long *end_mark) { if (in->mark >= 0) { @@ -152,7 +152,7 @@ input_eval_marks (WInput * in, long *start_mark, long *end_mark) /* --------------------------------------------------------------------------------------------- */ static void -do_show_hist (WInput * in) +do_show_hist (WInput *in) { size_t len; history_descriptor_t hd; @@ -218,7 +218,7 @@ input_history_strip_password (char *url) /* --------------------------------------------------------------------------------------------- */ static void -input_push_history (WInput * in) +input_push_history (WInput *in) { char *t; gboolean empty; @@ -261,7 +261,7 @@ input_push_history (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -move_buffer_backward (WInput * in, int start, int end) +move_buffer_backward (WInput *in, int start, int end) { int str_len; @@ -277,7 +277,7 @@ move_buffer_backward (WInput * in, int start, int end) /* --------------------------------------------------------------------------------------------- */ static void -beginning_of_line (WInput * in) +beginning_of_line (WInput *in) { in->point = 0; in->charpoint = 0; @@ -286,7 +286,7 @@ beginning_of_line (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -end_of_line (WInput * in) +end_of_line (WInput *in) { in->point = str_length (in->buffer->str); in->charpoint = 0; @@ -295,7 +295,7 @@ end_of_line (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -backward_char (WInput * in) +backward_char (WInput *in) { if (in->point > 0) { @@ -311,7 +311,7 @@ backward_char (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -forward_char (WInput * in) +forward_char (WInput *in) { const char *act; @@ -324,7 +324,7 @@ forward_char (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -forward_word (WInput * in) +forward_word (WInput *in) { const char *p; @@ -340,7 +340,7 @@ forward_word (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -backward_word (WInput * in) +backward_word (WInput *in) { const char *p; @@ -370,7 +370,7 @@ backward_word (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -backward_delete (WInput * in) +backward_delete (WInput *in) { const char *act; int start; @@ -389,7 +389,7 @@ backward_delete (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -copy_region (WInput * in, int start, int end) +copy_region (WInput *in, int start, int end) { int first = MIN (start, end); int last = MAX (start, end); @@ -418,7 +418,7 @@ copy_region (WInput * in, int start, int end) /* --------------------------------------------------------------------------------------------- */ static void -delete_region (WInput * in, int start, int end) +delete_region (WInput *in, int start, int end) { int first = MIN (start, end); int last = MAX (start, end); @@ -433,7 +433,7 @@ delete_region (WInput * in, int start, int end) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -insert_char (WInput * in, int c_code) +insert_char (WInput *in, int c_code) { int res; long m1, m2; @@ -471,7 +471,7 @@ insert_char (WInput * in, int c_code) /* --------------------------------------------------------------------------------------------- */ static void -delete_char (WInput * in) +delete_char (WInput *in) { const char *act; int end; @@ -486,7 +486,7 @@ delete_char (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -kill_word (WInput * in) +kill_word (WInput *in) { int old_point = in->point; int new_point; @@ -503,7 +503,7 @@ kill_word (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -back_kill_word (WInput * in) +back_kill_word (WInput *in) { int old_point = in->point; int new_point; @@ -519,7 +519,7 @@ back_kill_word (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -yank (WInput * in) +yank (WInput *in) { if (kill_buffer != NULL) { @@ -535,7 +535,7 @@ yank (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -kill_line (WInput * in) +kill_line (WInput *in) { int chp; @@ -549,7 +549,7 @@ kill_line (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -clear_line (WInput * in) +clear_line (WInput *in) { in->need_push = TRUE; g_string_set_size (in->buffer, 0); @@ -561,7 +561,7 @@ clear_line (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -ins_from_clip (WInput * in) +ins_from_clip (WInput *in) { char *p = NULL; ev_clipboard_text_from_file_t event_data = { NULL, FALSE }; @@ -585,7 +585,7 @@ ins_from_clip (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -hist_prev (WInput * in) +hist_prev (WInput *in) { GList *prev; @@ -608,7 +608,7 @@ hist_prev (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -hist_next (WInput * in) +hist_next (WInput *in) { GList *next; @@ -640,7 +640,7 @@ hist_next (WInput * in) /* --------------------------------------------------------------------------------------------- */ static void -port_region_marked_for_delete (WInput * in) +port_region_marked_for_delete (WInput *in) { g_string_set_size (in->buffer, 0); in->point = 0; @@ -651,7 +651,7 @@ port_region_marked_for_delete (WInput * in) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -input_execute_cmd (WInput * in, long command) +input_execute_cmd (WInput *in, long command) { cb_ret_t res = MSG_HANDLED; @@ -804,7 +804,7 @@ input_execute_cmd (WInput * in, long command) /* "history_load" event handler */ static gboolean -input_load_history (const gchar * event_group_name, const gchar * event_name, +input_load_history (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { WInput *in = INPUT (init_data); @@ -833,7 +833,7 @@ input_load_history (const gchar * event_group_name, const gchar * event_name, /* "history_save" event handler */ static gboolean -input_save_history (const gchar * event_group_name, const gchar * event_name, +input_save_history (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { WInput *in = INPUT (init_data); @@ -857,7 +857,7 @@ input_save_history (const gchar * event_group_name, const gchar * event_name, /* --------------------------------------------------------------------------------------------- */ static void -input_destroy (WInput * in) +input_destroy (WInput *in) { input_complete_free (in); @@ -879,7 +879,7 @@ input_destroy (WInput * in) * Calculates the buffer index (aka "point") corresponding to some screen coordinate. */ static int -input_screen_to_point (const WInput * in, int x) +input_screen_to_point (const WInput *in, int x) { x += in->term_first_shown; @@ -895,7 +895,7 @@ input_screen_to_point (const WInput * in, int x) /* --------------------------------------------------------------------------------------------- */ static void -input_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +input_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { /* save point between MSG_MOUSE_DOWN and MSG_MOUSE_DRAG */ static int prev_point = 0; @@ -1001,7 +1001,7 @@ input_new (int y, int x, const int *colors, int width, const char *def_text, /* --------------------------------------------------------------------------------------------- */ cb_ret_t -input_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +input_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WInput *in = INPUT (w); WDialog *h = DIALOG (w->owner); @@ -1087,7 +1087,7 @@ input_set_default_colors (void) /* --------------------------------------------------------------------------------------------- */ cb_ret_t -input_handle_char (WInput * in, int key) +input_handle_char (WInput *in, int key) { cb_ret_t v; long command; @@ -1132,7 +1132,7 @@ input_handle_char (WInput * in, int key) /* --------------------------------------------------------------------------------------------- */ void -input_assign_text (WInput * in, const char *text) +input_assign_text (WInput *in, const char *text) { if (text == NULL) text = ""; @@ -1150,7 +1150,7 @@ input_assign_text (WInput * in, const char *text) /* Inserts text in input line */ void -input_insert (WInput * in, const char *text, gboolean insert_extra_space) +input_insert (WInput *in, const char *text, gboolean insert_extra_space) { input_disable_update (in); while (*text != '\0') @@ -1164,7 +1164,7 @@ input_insert (WInput * in, const char *text, gboolean insert_extra_space) /* --------------------------------------------------------------------------------------------- */ void -input_set_point (WInput * in, int pos) +input_set_point (WInput *in, int pos) { int max_pos; @@ -1180,7 +1180,7 @@ input_set_point (WInput * in, int pos) /* --------------------------------------------------------------------------------------------- */ void -input_update (WInput * in, gboolean clear_first) +input_update (WInput *in, gboolean clear_first) { Widget *wi = WIDGET (in); const WRect *w = &wi->rect; @@ -1286,7 +1286,7 @@ input_update (WInput * in, gboolean clear_first) /* --------------------------------------------------------------------------------------------- */ void -input_enable_update (WInput * in) +input_enable_update (WInput *in) { in->disable_update--; input_update (in, FALSE); @@ -1295,7 +1295,7 @@ input_enable_update (WInput * in) /* --------------------------------------------------------------------------------------------- */ void -input_disable_update (WInput * in) +input_disable_update (WInput *in) { in->disable_update++; } @@ -1308,7 +1308,7 @@ input_disable_update (WInput * in) * @param in the input line */ void -input_clean (WInput * in) +input_clean (WInput *in) { input_push_history (in); in->need_push = TRUE; diff --git a/lib/widget/input.h b/lib/widget/input.h index bd7aa26fed..0822a5be7d 100644 --- a/lib/widget/input.h +++ b/lib/widget/input.h @@ -58,7 +58,7 @@ typedef struct gboolean init_from_history; /* init text will be get from history */ gboolean need_push; /* need to push the current Input on hist? */ gboolean strip_password; /* need to strip password before placing string to history */ - char **completions; /* possible completions array */ + GPtrArray *completions; /* possible completions array */ input_complete_t completion_flags; char charbuf[MB_LEN_MAX]; /* buffer for multibytes characters */ size_t charpoint; /* point to end of mulibyte sequence in charbuf */ @@ -114,7 +114,7 @@ void input_complete_free (WInput * in); * @return newly allocated string that contains a copy of @in's text. */ static inline char * -input_get_text (const WInput * in) +input_get_text (const WInput *in) { return g_strndup (in->buffer->str, in->buffer->len); } @@ -129,7 +129,7 @@ input_get_text (const WInput * in) * @return pointer to @in->buffer->str. */ static inline const char * -input_get_ctext (const WInput * in) +input_get_ctext (const WInput *in) { return in->buffer->str; } @@ -144,7 +144,7 @@ input_get_ctext (const WInput * in) * @return TRUE if buffer of @in is empty, FALSE otherwise. */ static inline gboolean -input_is_empty (const WInput * in) +input_is_empty (const WInput *in) { return (in->buffer->len == 0); } diff --git a/lib/widget/input_complete.c b/lib/widget/input_complete.c index 29b2be380d..cd0ccbc879 100644 --- a/lib/widget/input_complete.c +++ b/lib/widget/input_complete.c @@ -88,7 +88,7 @@ typedef struct /*** forward declarations (file scope functions) *************************************************/ -char **try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags); +GPtrArray *try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags); void complete_engine_fill_completions (WInput * in); /*** file scope variables ************************************************************************/ @@ -212,9 +212,8 @@ filename_completion_function (const char *text, int state, input_complete_t flag { /* Otherwise, if these match up to the length of filename, then it may be a match. */ - if ((entry->d_name[0] != filename[0]) || - ((NLENGTH (entry)) < filename_len) || - strncmp (filename, entry->d_name, filename_len) != 0) + if (entry->d_name[0] != filename[0] || entry->d_len < filename_len + || strncmp (filename, entry->d_name, filename_len) != 0) continue; } @@ -283,7 +282,7 @@ filename_completion_function (const char *text, int state, input_complete_t flag temp = g_string_sized_new (16); - if (users_dirname != NULL && (users_dirname[0] != '.' || users_dirname[1] != '\0')) + if (users_dirname != NULL && !DIR_IS_DOT (users_dirname)) { g_string_append (temp, users_dirname); @@ -291,7 +290,7 @@ filename_completion_function (const char *text, int state, input_complete_t flag if (!IS_PATH_SEP (temp->str[temp->len - 1])) g_string_append_c (temp, PATH_SEP); } - g_string_append (temp, entry->d_name); + g_string_append_len (temp, entry->d_name, entry->d_len); if (isdir) g_string_append_c (temp, PATH_SEP); @@ -399,7 +398,7 @@ host_equal_func (gconstpointer a, gconstpointer b) /* --------------------------------------------------------------------------------------------- */ static void -fetch_hosts (const char *filename, GPtrArray * hosts) +fetch_hosts (const char *filename, GPtrArray *hosts) { FILE *file; char buffer[BUF_MEDIUM]; @@ -681,7 +680,7 @@ command_completion_function (const char *text, int state, input_complete_t flags /* --------------------------------------------------------------------------------------------- */ static int -match_compare (const void *a, const void *b) +match_compare (gconstpointer a, gconstpointer b) { return strcmp (*(char *const *) a, *(char *const *) b); } @@ -695,97 +694,76 @@ match_compare (const void *a, const void *b) as the second. In case no matches were found we return NULL. */ -static char ** +static GPtrArray * completion_matches (const char *text, CompletionFunction entry_function, input_complete_t flags) { - /* Number of slots in match_list. */ - size_t match_list_size = 30; - /* The list of matches. */ - char **match_list; - /* Number of matches actually found. */ - size_t matches = 0; - - /* Temporary string binder. */ + GPtrArray *match_list; char *string; - match_list = g_new (char *, match_list_size + 1); - match_list[1] = NULL; + match_list = g_ptr_array_new_with_free_func (g_free); - while ((string = (*entry_function) (text, matches, flags)) != NULL) - { - if (matches + 1 == match_list_size) - { - match_list_size += 30; - match_list = (char **) g_renew (char *, match_list, match_list_size + 1); - } - match_list[++matches] = string; - match_list[matches + 1] = NULL; - } + while ((string = entry_function (text, match_list->len, flags)) != NULL) + g_ptr_array_add (match_list, string); /* If there were any matches, then look through them finding out the lowest common denominator. That then becomes match_list[0]. */ - if (matches == 0) - MC_PTR_FREE (match_list); /* There were no matches. */ - else + if (match_list->len == 0) { - /* If only one match, just use that. */ - if (matches == 1) - { - match_list[0] = match_list[1]; - match_list[1] = NULL; - } - else - { - size_t i = 1; - int low = 4096; /* Count of max-matched characters. */ - size_t j; + /* There were no matches. */ + g_ptr_array_free (match_list, TRUE); + return NULL; + } - qsort (match_list + 1, matches, sizeof (char *), match_compare); + /* If only one match, just use that. */ - /* And compare each member of the list with - the next, finding out where they stop matching. - If we find two equal strings, we have to put one away... */ + if (match_list->len > 1) + { + size_t i, j; + size_t low = 4096; /* Count of max-matched characters. */ - j = i + 1; - while (j < matches + 1) + g_ptr_array_sort (match_list, match_compare); + + /* And compare each member of the list with + the next, finding out where they stop matching. + If we find two equal strings, we have to put one away... */ + for (i = 0, j = 1; j < match_list->len;) + { + char *si, *sj, *mi; + + si = g_ptr_array_index (match_list, i); + sj = g_ptr_array_index (match_list, j); + mi = si; + + while (si[0] != '\0' && sj[0] != '\0') { - char *si, *sj; char *ni, *nj; - for (si = match_list[i], sj = match_list[j]; si[0] != '\0' && sj[0] != '\0';) - { + ni = str_get_next_char (si); + nj = str_get_next_char (sj); - ni = str_get_next_char (si); - nj = str_get_next_char (sj); + if (ni - si != nj - sj || strncmp (si, sj, ni - si) != 0) + break; - if (ni - si != nj - sj) - break; - if (strncmp (si, sj, ni - si) != 0) - break; + si = ni; + sj = nj; + } - si = ni; - sj = nj; - } + if (si[0] == '\0' && sj[0] == '\0') + { + /* Two equal strings */ + g_ptr_array_remove_index (match_list, j); + } + else + { + low = MIN (low, (size_t) (si - mi)); - if (si[0] == '\0' && sj[0] == '\0') - { /* Two equal strings */ - g_free (match_list[j]); - j++; - if (j > matches) - break; - continue; /* Look for a run of equal strings */ - } - else if (low > si - match_list[i]) - low = si - match_list[i]; - if (i + 1 != j) /* So there's some gap */ - match_list[i + 1] = match_list[j]; i++; j++; } - matches = i; - match_list[matches + 1] = NULL; - match_list[0] = g_strndup (match_list[1], low); } + + string = g_ptr_array_index (match_list, 0); + g_ptr_array_insert (match_list, 0, g_strndup (string, low)); } return match_list; @@ -816,7 +794,7 @@ check_is_cd (const char *text, int lc_start, input_complete_t flags) /* --------------------------------------------------------------------------------------------- */ static void -try_complete_commands_prepare (try_complete_automation_state_t * state, char *text, int *lc_start) +try_complete_commands_prepare (try_complete_automation_state_t *state, char *text, int *lc_start) { const char *command_separator_chars = ";|&{(`"; char *ti; @@ -856,7 +834,7 @@ try_complete_commands_prepare (try_complete_automation_state_t * state, char *te /* --------------------------------------------------------------------------------------------- */ static void -try_complete_find_start_sign (try_complete_automation_state_t * state) +try_complete_find_start_sign (try_complete_automation_state_t *state) { if ((state->flags & INPUT_COMPLETE_COMMANDS) != 0) state->p = strrchr (state->word, '`'); @@ -886,10 +864,10 @@ try_complete_find_start_sign (try_complete_automation_state_t * state) /* --------------------------------------------------------------------------------------------- */ -static char ** -try_complete_all_possible (try_complete_automation_state_t * state, char *text, int *lc_start) +static GPtrArray * +try_complete_all_possible (try_complete_automation_state_t *state, char *text, int *lc_start) { - char **matches = NULL; + GPtrArray *matches = NULL; if (state->in_command_position != 0) { @@ -958,7 +936,7 @@ try_complete_all_possible (try_complete_automation_state_t * state, char *text, /* --------------------------------------------------------------------------------------------- */ static gboolean -insert_text (WInput * in, char *text, ssize_t size) +insert_text (WInput *in, const char *text, ssize_t size) { size_t text_len; int buff_len; @@ -1008,7 +986,7 @@ insert_text (WInput * in, char *text, ssize_t size) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -complete_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +complete_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { static int bl = 0; @@ -1188,7 +1166,7 @@ complete_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void /** Returns TRUE if the user would like to see us again */ static gboolean -complete_engine (WInput * in, int what_to_do) +complete_engine (WInput *in, int what_to_do) { if (in->completions != NULL && str_offset_to_pos (in->buffer->str, in->point) != end) input_complete_free (in); @@ -1201,32 +1179,37 @@ complete_engine (WInput * in, int what_to_do) else { if ((what_to_do & DO_INSERTION) != 0 - || ((what_to_do & DO_QUERY) != 0 && in->completions[1] == NULL)) + || ((what_to_do & DO_QUERY) != 0 && in->completions->len == 1)) { - char *lc_complete = in->completions[0]; + const char *lc_complete; - if (!insert_text (in, lc_complete, -1) || in->completions[1] != NULL) + lc_complete = g_ptr_array_index (in->completions, 0); + if (!insert_text (in, lc_complete, -1) || in->completions->len > 1) tty_beep (); else input_complete_free (in); } - if ((what_to_do & DO_QUERY) != 0 && in->completions != NULL && in->completions[1] != NULL) + if ((what_to_do & DO_QUERY) != 0 && in->completions != NULL && in->completions->len > 1) { - int maxlen = 0, count = 0, i; + int maxlen = 0; + int i; + size_t k; + int count; int x, y, w, h; int start_x, start_y; - char **p, *q; + char *q; WDialog *complete_dlg; WListbox *complete_list; - for (p = in->completions + 1; *p != NULL; count++, p++) + for (k = 1; k < in->completions->len; k++) { - i = str_term_width1 (*p); - if (i > maxlen) - maxlen = i; + q = g_ptr_array_index (in->completions, k); + i = str_term_width1 (q); + maxlen = MAX (maxlen, i); } + count = in->completions->len - 1; start_x = WIDGET (in)->rect.x; start_y = WIDGET (in)->rect.y; if (start_y - 2 >= count) @@ -1262,8 +1245,11 @@ complete_engine (WInput * in, int what_to_do) complete_list = listbox_new (1, 1, h - 2, w - 2, FALSE, NULL); group_add_widget (GROUP (complete_dlg), complete_list); - for (p = in->completions + 1; *p != NULL; p++) - listbox_add_item (complete_list, LISTBOX_APPEND_AT_END, 0, *p, NULL, FALSE); + for (k = 1; k < in->completions->len; k++) + { + q = g_ptr_array_index (in->completions, k); + listbox_add_item (complete_list, LISTBOX_APPEND_AT_END, 0, q, NULL, FALSE); + } i = dlg_run (complete_dlg); q = NULL; @@ -1290,11 +1276,11 @@ complete_engine (WInput * in, int what_to_do) /* --------------------------------------------------------------------------------------------- */ /** Returns an array of matches, or NULL if none. */ -char ** +GPtrArray * try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags) { try_complete_automation_state_t state; - char **matches = NULL; + GPtrArray *matches = NULL; memset (&state, 0, sizeof (state)); state.flags = flags; @@ -1371,16 +1357,16 @@ try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags) (flags & INPUT_COMPLETE_SHELL_ESC) == 0) { /* FIXME: HACK? INPUT_COMPLETE_SHELL_ESC is used only in command line. */ - char **m; + size_t i; - for (m = matches; *m != NULL; m++) + for (i = 0; i < matches->len; i++) { char *p; - p = *m; + p = g_ptr_array_index (matches, i); /* Escape only '?', '*', and '&' symbols as described in the manual page (see a11995e12b88285e044f644904c306ed6c342ad0). */ - *m = str_escape (*m, -1, "?*&", TRUE); + g_ptr_array_index (matches, i) = str_escape (p, -1, "?*&", TRUE); g_free (p); } } @@ -1391,7 +1377,7 @@ try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags) /* --------------------------------------------------------------------------------------------- */ void -complete_engine_fill_completions (WInput * in) +complete_engine_fill_completions (WInput *in) { char *s; const char *word_separators; @@ -1430,7 +1416,7 @@ complete_engine_fill_completions (WInput * in) /* declared in lib/widget/input.h */ void -input_complete (WInput * in) +input_complete (WInput *in) { int engine_flags; @@ -1454,10 +1440,13 @@ input_complete (WInput * in) /* --------------------------------------------------------------------------------------------- */ void -input_complete_free (WInput * in) +input_complete_free (WInput *in) { - g_strfreev (in->completions); - in->completions = NULL; + if (in->completions != NULL) + { + g_ptr_array_free (in->completions, TRUE); + in->completions = NULL; + } } /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/label.c b/lib/widget/label.c index 4cde190018..b9fb6b6116 100644 --- a/lib/widget/label.c +++ b/lib/widget/label.c @@ -61,7 +61,7 @@ /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -label_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +label_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WLabel *l = LABEL (w); @@ -154,7 +154,7 @@ label_new (int y, int x, const char *text) /* --------------------------------------------------------------------------------------------- */ void -label_set_text (WLabel * label, const char *text) +label_set_text (WLabel *label, const char *text) { Widget *w = WIDGET (label); int newcols = w->rect.cols; @@ -186,7 +186,7 @@ label_set_text (WLabel * label, const char *text) /* --------------------------------------------------------------------------------------------- */ void -label_set_textv (WLabel * label, const char *format, ...) +label_set_textv (WLabel *label, const char *format, ...) { va_list args; char buf[BUF_1K]; /* FIXME: is it enough? */ diff --git a/lib/widget/listbox-window.c b/lib/widget/listbox-window.c index 7cad8720cb..76241ca90a 100644 --- a/lib/widget/listbox-window.c +++ b/lib/widget/listbox-window.c @@ -126,7 +126,7 @@ listbox_window_new (int lines, int cols, const char *title, const char *help) /** Returns the number of the item selected */ int -listbox_run (Listbox * l) +listbox_run (Listbox *l) { int val = -1; @@ -147,7 +147,7 @@ listbox_run (Listbox * l) * @return the 'data' of the item selected, or NULL if none selected. */ void * -listbox_run_with_data (Listbox * l, const void *select) +listbox_run_with_data (Listbox *l, const void *select) { void *val = NULL; diff --git a/lib/widget/listbox.c b/lib/widget/listbox.c index 76f07ad680..9234812bb4 100644 --- a/lib/widget/listbox.c +++ b/lib/widget/listbox.c @@ -90,7 +90,7 @@ listbox_entry_free (void *data) /* --------------------------------------------------------------------------------------------- */ static void -listbox_drawscroll (const WListbox * l) +listbox_drawscroll (const WListbox *l) { const WRect *w = &CONST_WIDGET (l)->rect; int max_line = w->lines - 1; @@ -131,7 +131,7 @@ listbox_drawscroll (const WListbox * l) /* --------------------------------------------------------------------------------------------- */ static void -listbox_draw (WListbox * l, gboolean focused) +listbox_draw (WListbox *l, gboolean focused) { Widget *wl = WIDGET (l); const WRect *w = &CONST_WIDGET (l)->rect; @@ -198,7 +198,7 @@ listbox_draw (WListbox * l, gboolean focused) /* --------------------------------------------------------------------------------------------- */ static int -listbox_check_hotkey (WListbox * l, int key) +listbox_check_hotkey (WListbox *l, int key) { if (!listbox_is_empty (l)) { @@ -221,7 +221,7 @@ listbox_check_hotkey (WListbox * l, int key) /* Calculates the item displayed at screen row 'y' (y==0 being the widget's 1st row). */ static int -listbox_y_pos (WListbox * l, int y) +listbox_y_pos (WListbox *l, int y) { return MIN (l->top + y, LISTBOX_LAST (l)); } @@ -229,7 +229,7 @@ listbox_y_pos (WListbox * l, int y) /* --------------------------------------------------------------------------------------------- */ static void -listbox_fwd (WListbox * l, gboolean wrap) +listbox_fwd (WListbox *l, gboolean wrap) { if (!listbox_is_empty (l)) { @@ -243,7 +243,7 @@ listbox_fwd (WListbox * l, gboolean wrap) /* --------------------------------------------------------------------------------------------- */ static void -listbox_fwd_n (WListbox * l, int n) +listbox_fwd_n (WListbox *l, int n) { listbox_set_current (l, MIN (l->current + n, LISTBOX_LAST (l))); } @@ -251,7 +251,7 @@ listbox_fwd_n (WListbox * l, int n) /* --------------------------------------------------------------------------------------------- */ static void -listbox_back (WListbox * l, gboolean wrap) +listbox_back (WListbox *l, gboolean wrap) { if (!listbox_is_empty (l)) { @@ -265,7 +265,7 @@ listbox_back (WListbox * l, gboolean wrap) /* --------------------------------------------------------------------------------------------- */ static void -listbox_back_n (WListbox * l, int n) +listbox_back_n (WListbox *l, int n) { listbox_set_current (l, MAX (l->current - n, 0)); } @@ -273,7 +273,7 @@ listbox_back_n (WListbox * l, int n) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -listbox_execute_cmd (WListbox * l, long command) +listbox_execute_cmd (WListbox *l, long command) { cb_ret_t ret = MSG_HANDLED; const WRect *w = &CONST_WIDGET (l)->rect; @@ -341,7 +341,7 @@ listbox_execute_cmd (WListbox * l, long command) /* Return MSG_HANDLED if we want a redraw */ static cb_ret_t -listbox_key (WListbox * l, int key) +listbox_key (WListbox *l, int key) { long command; @@ -365,7 +365,7 @@ listbox_key (WListbox * l, int key) /* Listbox item adding function */ static inline void -listbox_add_entry (WListbox * l, WLEntry * e, listbox_append_t pos) +listbox_add_entry (WListbox *l, WLEntry *e, listbox_append_t pos) { if (l->list == NULL) { @@ -400,7 +400,7 @@ listbox_add_entry (WListbox * l, WLEntry * e, listbox_append_t pos) /* Call this whenever the user changes the selected item. */ static void -listbox_on_change (WListbox * l) +listbox_on_change (WListbox *l) { listbox_draw (l, TRUE); send_message (WIDGET (l)->owner, l, MSG_NOTIFY, 0, NULL); @@ -409,7 +409,7 @@ listbox_on_change (WListbox * l) /* --------------------------------------------------------------------------------------------- */ static void -listbox_do_action (WListbox * l) +listbox_do_action (WListbox *l) { int action; @@ -433,7 +433,7 @@ listbox_do_action (WListbox * l) /* --------------------------------------------------------------------------------------------- */ static void -listbox_run_hotkey (WListbox * l, int pos) +listbox_run_hotkey (WListbox *l, int pos) { listbox_set_current (l, pos); listbox_on_change (l); @@ -443,7 +443,7 @@ listbox_run_hotkey (WListbox * l, int pos) /* --------------------------------------------------------------------------------------------- */ static inline void -listbox_destroy (WListbox * l) +listbox_destroy (WListbox *l) { listbox_remove_list (l); } @@ -451,7 +451,7 @@ listbox_destroy (WListbox * l) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -listbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +listbox_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WListbox *l = LISTBOX (w); @@ -503,7 +503,7 @@ listbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void /* --------------------------------------------------------------------------------------------- */ static void -listbox_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +listbox_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { WListbox *l = LISTBOX (w); int old_current; @@ -579,7 +579,7 @@ listbox_new (int y, int x, int height, int width, gboolean deletable, lcback_fn * Finds item by its label. */ int -listbox_search_text (WListbox * l, const char *text) +listbox_search_text (WListbox *l, const char *text) { if (!listbox_is_empty (l)) { @@ -604,7 +604,7 @@ listbox_search_text (WListbox * l, const char *text) * Finds item by its 'data' slot. */ int -listbox_search_data (WListbox * l, const void *data) +listbox_search_data (WListbox *l, const void *data) { if (!listbox_is_empty (l)) { @@ -627,7 +627,7 @@ listbox_search_data (WListbox * l, const void *data) /* Select the first entry and scrolls the list to the top */ void -listbox_select_first (WListbox * l) +listbox_select_first (WListbox *l) { l->current = l->top = 0; } @@ -636,7 +636,7 @@ listbox_select_first (WListbox * l) /* Selects the last entry and scrolls the list to the bottom */ void -listbox_select_last (WListbox * l) +listbox_select_last (WListbox *l) { int lines = WIDGET (l)->rect.lines; int length; @@ -650,7 +650,7 @@ listbox_select_last (WListbox * l) /* --------------------------------------------------------------------------------------------- */ void -listbox_set_current (WListbox * l, int dest) +listbox_set_current (WListbox *l, int dest) { GList *le; int pos; @@ -688,7 +688,7 @@ listbox_set_current (WListbox * l, int dest) /* --------------------------------------------------------------------------------------------- */ int -listbox_get_length (const WListbox * l) +listbox_get_length (const WListbox *l) { return listbox_is_empty (l) ? 0 : (int) g_queue_get_length (l->list); } @@ -697,7 +697,7 @@ listbox_get_length (const WListbox * l) /* Returns the current string text as well as the associated extra data */ void -listbox_get_current (WListbox * l, char **string, void **extra) +listbox_get_current (WListbox *l, char **string, void **extra) { WLEntry *e = NULL; gboolean ok; @@ -717,7 +717,7 @@ listbox_get_current (WListbox * l, char **string, void **extra) /* --------------------------------------------------------------------------------------------- */ WLEntry * -listbox_get_nth_entry (const WListbox * l, int pos) +listbox_get_nth_entry (const WListbox *l, int pos) { if (!listbox_is_empty (l) && pos >= 0) { @@ -734,7 +734,7 @@ listbox_get_nth_entry (const WListbox * l, int pos) /* --------------------------------------------------------------------------------------------- */ GList * -listbox_get_first_link (const WListbox * l) +listbox_get_first_link (const WListbox *l) { return (l == NULL || l->list == NULL) ? NULL : g_queue_peek_head_link (l->list); } @@ -742,7 +742,7 @@ listbox_get_first_link (const WListbox * l) /* --------------------------------------------------------------------------------------------- */ void -listbox_remove_current (WListbox * l) +listbox_remove_current (WListbox *l) { if (!listbox_is_empty (l)) { @@ -765,7 +765,7 @@ listbox_remove_current (WListbox * l) /* --------------------------------------------------------------------------------------------- */ gboolean -listbox_is_empty (const WListbox * l) +listbox_is_empty (const WListbox *l) { return (l == NULL || l->list == NULL || g_queue_is_empty (l->list)); } @@ -779,7 +779,7 @@ listbox_is_empty (const WListbox * l) * @param list list of WLEntry objects */ void -listbox_set_list (WListbox * l, GQueue * list) +listbox_set_list (WListbox *l, GQueue *list) { listbox_remove_list (l); @@ -790,7 +790,7 @@ listbox_set_list (WListbox * l, GQueue * list) /* --------------------------------------------------------------------------------------------- */ void -listbox_remove_list (WListbox * l) +listbox_remove_list (WListbox *l) { if (l != NULL) { @@ -806,9 +806,44 @@ listbox_remove_list (WListbox * l) /* --------------------------------------------------------------------------------------------- */ +/** + * Add new intem to the listbox. + * + * @param l WListbox object + * @param pos position of the item + * @param hotkey position of the item + * @param text item text. @l takes the copy of @text. + * @param data item data + * @param free_data if TRUE free the @data when @l is destroyed, + * + * @returns pointer to copy of @text. + */ char * -listbox_add_item (WListbox * l, listbox_append_t pos, int hotkey, const char *text, void *data, +listbox_add_item (WListbox *l, listbox_append_t pos, int hotkey, const char *text, void *data, gboolean free_data) +{ + return listbox_add_item_take (l, pos, hotkey, g_strdup (text), data, free_data); +} + +/* --------------------------------------------------------------------------------------------- */ + +/** + * Add new intem to the listbox. + * + * @param l WListbox object + * @param pos position of the item + * @param hotkey position of the item + * @param text item text. Ownership of the text is transferred to the @l. + * @param data item data + * @param free_data if TRUE free the @data when @l is destroyed, + * + * After this call, @text belongs to the @l and may no longer be modified by the caller. + * + * @returns pointer to @text. + */ +char * +listbox_add_item_take (WListbox *l, listbox_append_t pos, int hotkey, char *text, void *data, + gboolean free_data) { WLEntry *entry; @@ -819,7 +854,7 @@ listbox_add_item (WListbox * l, listbox_append_t pos, int hotkey, const char *te return NULL; entry = g_new (WLEntry, 1); - entry->text = g_strdup (text); + entry->text = text; entry->data = data; entry->free_data = free_data; entry->hotkey = hotkey; diff --git a/lib/widget/listbox.h b/lib/widget/listbox.h index 0a62dfdd02..37ef748ef6 100644 --- a/lib/widget/listbox.h +++ b/lib/widget/listbox.h @@ -76,6 +76,8 @@ void listbox_set_list (WListbox * l, GQueue * list); void listbox_remove_list (WListbox * l); char *listbox_add_item (WListbox * l, listbox_append_t pos, int hotkey, const char *text, void *data, gboolean free_data); +char *listbox_add_item_take (WListbox * l, listbox_append_t pos, int hotkey, char *text, + void *data, gboolean free_data); /*** inline functions ****************************************************************************/ diff --git a/lib/widget/menu.c b/lib/widget/menu.c index b27c4c3adc..0f968fe15b 100644 --- a/lib/widget/menu.c +++ b/lib/widget/menu.c @@ -82,7 +82,7 @@ struct menu_t /* --------------------------------------------------------------------------------------------- */ static void -menu_arrange (menu_t * menu, dlg_shortcut_str get_shortcut) +menu_arrange (menu_t *menu, dlg_shortcut_str get_shortcut) { if (menu != NULL) { @@ -121,7 +121,7 @@ menu_arrange (menu_t * menu, dlg_shortcut_str get_shortcut) /* --------------------------------------------------------------------------------------------- */ static void -menubar_paint_idx (const WMenuBar * menubar, unsigned int idx, int color) +menubar_paint_idx (const WMenuBar *menubar, unsigned int idx, int color) { const WRect *w = &CONST_WIDGET (menubar)->rect; const menu_t *menu = MENU (g_list_nth_data (menubar->menu, menubar->current)); @@ -179,7 +179,7 @@ menubar_paint_idx (const WMenuBar * menubar, unsigned int idx, int color) /* --------------------------------------------------------------------------------------------- */ static void -menubar_draw_drop (const WMenuBar * menubar) +menubar_draw_drop (const WMenuBar *menubar) { const WRect *w = &CONST_WIDGET (menubar)->rect; const menu_t *menu = MENU (g_list_nth_data (menubar->menu, menubar->current)); @@ -204,7 +204,7 @@ menubar_draw_drop (const WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_set_color (const WMenuBar * menubar, gboolean current, gboolean hotkey) +menubar_set_color (const WMenuBar *menubar, gboolean current, gboolean hotkey) { if (!widget_get_state (CONST_WIDGET (menubar), WST_FOCUSED)) tty_setcolor (MENU_INACTIVE_COLOR); @@ -217,7 +217,7 @@ menubar_set_color (const WMenuBar * menubar, gboolean current, gboolean hotkey) /* --------------------------------------------------------------------------------------------- */ static void -menubar_draw (const WMenuBar * menubar) +menubar_draw (const WMenuBar *menubar) { const WRect *w = &CONST_WIDGET (menubar)->rect; GList *i; @@ -262,7 +262,7 @@ menubar_draw (const WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_remove (WMenuBar * menubar) +menubar_remove (WMenuBar *menubar) { Widget *g; @@ -287,7 +287,7 @@ menubar_remove (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_left (WMenuBar * menubar) +menubar_left (WMenuBar *menubar) { menubar_remove (menubar); if (menubar->current == 0) @@ -300,7 +300,7 @@ menubar_left (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_right (WMenuBar * menubar) +menubar_right (WMenuBar *menubar) { menubar_remove (menubar); menubar->current = (menubar->current + 1) % g_list_length (menubar->menu); @@ -310,7 +310,7 @@ menubar_right (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_finish (WMenuBar * menubar) +menubar_finish (WMenuBar *menubar) { Widget *w = WIDGET (menubar); @@ -339,7 +339,7 @@ menubar_finish (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_drop (WMenuBar * menubar, unsigned int selected) +menubar_drop (WMenuBar *menubar, unsigned int selected) { menubar->is_dropped = TRUE; menubar->current = selected; @@ -349,7 +349,7 @@ menubar_drop (WMenuBar * menubar, unsigned int selected) /* --------------------------------------------------------------------------------------------- */ static void -menubar_execute (WMenuBar * menubar) +menubar_execute (WMenuBar *menubar) { const menu_t *menu = MENU (g_list_nth_data (menubar->menu, menubar->current)); const menu_entry_t *entry = MENUENTRY (g_list_nth_data (menu->entries, menu->current)); @@ -368,7 +368,7 @@ menubar_execute (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_down (WMenuBar * menubar) +menubar_down (WMenuBar *menubar) { menu_t *menu = MENU (g_list_nth_data (menubar->menu, menubar->current)); const unsigned int len = g_list_length (menu->entries); @@ -389,7 +389,7 @@ menubar_down (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_up (WMenuBar * menubar) +menubar_up (WMenuBar *menubar) { menu_t *menu = MENU (g_list_nth_data (menubar->menu, menubar->current)); const unsigned int len = g_list_length (menu->entries); @@ -413,7 +413,7 @@ menubar_up (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_first (WMenuBar * menubar) +menubar_first (WMenuBar *menubar) { if (menubar->is_dropped) { @@ -450,7 +450,7 @@ menubar_first (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static void -menubar_last (WMenuBar * menubar) +menubar_last (WMenuBar *menubar) { if (menubar->is_dropped) { @@ -484,7 +484,7 @@ menubar_last (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -menubar_try_drop_menu (WMenuBar * menubar, int hotkey) +menubar_try_drop_menu (WMenuBar *menubar, int hotkey) { GList *i; @@ -505,7 +505,7 @@ menubar_try_drop_menu (WMenuBar * menubar, int hotkey) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -menubar_try_exec_menu (WMenuBar * menubar, int hotkey) +menubar_try_exec_menu (WMenuBar *menubar, int hotkey) { menu_t *menu; GList *i; @@ -531,7 +531,7 @@ menubar_try_exec_menu (WMenuBar * menubar, int hotkey) /* --------------------------------------------------------------------------------------------- */ static void -menubar_help (const WMenuBar * menubar) +menubar_help (const WMenuBar *menubar) { ev_help_t event_data; @@ -549,7 +549,7 @@ menubar_help (const WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -menubar_execute_cmd (WMenuBar * menubar, long command) +menubar_execute_cmd (WMenuBar *menubar, long command) { cb_ret_t ret = MSG_HANDLED; @@ -603,7 +603,7 @@ menubar_execute_cmd (WMenuBar * menubar, long command) /* --------------------------------------------------------------------------------------------- */ static int -menubar_handle_key (WMenuBar * menubar, int key) +menubar_handle_key (WMenuBar *menubar, int key) { long cmd; cb_ret_t ret = MSG_NOT_HANDLED; @@ -627,7 +627,7 @@ menubar_handle_key (WMenuBar * menubar, int key) /* --------------------------------------------------------------------------------------------- */ static gboolean -menubar_refresh (WMenuBar * menubar) +menubar_refresh (WMenuBar *menubar) { Widget *w = WIDGET (menubar); @@ -645,7 +645,7 @@ menubar_refresh (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static inline void -menubar_free_menu (WMenuBar * menubar) +menubar_free_menu (WMenuBar *menubar) { g_clear_list (&menubar->menu, (GDestroyNotify) menu_free); } @@ -653,7 +653,7 @@ menubar_free_menu (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -menubar_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +menubar_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WMenuBar *menubar = MENUBAR (w); @@ -708,7 +708,7 @@ menubar_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void /* --------------------------------------------------------------------------------------------- */ static unsigned int -menubar_get_menu_by_x_coord (const WMenuBar * menubar, int x) +menubar_get_menu_by_x_coord (const WMenuBar *menubar, int x) { unsigned int i; GList *menu; @@ -727,7 +727,7 @@ menubar_get_menu_by_x_coord (const WMenuBar * menubar, int x) /* --------------------------------------------------------------------------------------------- */ static gboolean -menubar_mouse_on_menu (const WMenuBar * menubar, int y, int x) +menubar_mouse_on_menu (const WMenuBar *menubar, int y, int x) { const WRect *w = &CONST_WIDGET (menubar)->rect; menu_t *menu; @@ -753,7 +753,7 @@ menubar_mouse_on_menu (const WMenuBar * menubar, int y, int x) /* --------------------------------------------------------------------------------------------- */ static void -menubar_change_selected_item (WMenuBar * menubar, int y) +menubar_change_selected_item (WMenuBar *menubar, int y) { menu_t *menu; menu_entry_t *entry; @@ -773,7 +773,7 @@ menubar_change_selected_item (WMenuBar * menubar, int y) /* --------------------------------------------------------------------------------------------- */ static void -menubar_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +menubar_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { static gboolean was_drag = FALSE; @@ -905,7 +905,7 @@ menu_entry_new (const char *name, long command) /* --------------------------------------------------------------------------------------------- */ void -menu_entry_free (menu_entry_t * entry) +menu_entry_free (menu_entry_t *entry) { if (entry != NULL) { @@ -918,7 +918,7 @@ menu_entry_free (menu_entry_t * entry) /* --------------------------------------------------------------------------------------------- */ menu_t * -menu_new (const char *name, GList * entries, const char *help_node) +menu_new (const char *name, GList *entries, const char *help_node) { menu_t *menu; @@ -937,7 +937,7 @@ menu_new (const char *name, GList * entries, const char *help_node) /* --------------------------------------------------------------------------------------------- */ void -menu_set_name (menu_t * menu, const char *name) +menu_set_name (menu_t *menu, const char *name) { hotkey_free (menu->text); menu->text = hotkey_new (name); @@ -946,7 +946,7 @@ menu_set_name (menu_t * menu, const char *name) /* --------------------------------------------------------------------------------------------- */ void -menu_free (menu_t * menu) +menu_free (menu_t *menu) { hotkey_free (menu->text); g_list_free_full (menu->entries, (GDestroyNotify) menu_entry_free); @@ -957,7 +957,7 @@ menu_free (menu_t * menu) /* --------------------------------------------------------------------------------------------- */ WMenuBar * -menubar_new (GList * menu) +menubar_new (GList *menu) { WRect r = { 0, 0, 1, COLS }; WMenuBar *menubar; @@ -977,7 +977,7 @@ menubar_new (GList * menu) /* --------------------------------------------------------------------------------------------- */ void -menubar_set_menu (WMenuBar * menubar, GList * menu) +menubar_set_menu (WMenuBar *menubar, GList *menu) { /* delete previous menu */ menubar_free_menu (menubar); @@ -992,7 +992,7 @@ menubar_set_menu (WMenuBar * menubar, GList * menu) /* --------------------------------------------------------------------------------------------- */ void -menubar_add_menu (WMenuBar * menubar, menu_t * menu) +menubar_add_menu (WMenuBar *menubar, menu_t *menu) { if (menu != NULL) { @@ -1010,7 +1010,7 @@ menubar_add_menu (WMenuBar * menubar, menu_t * menu) */ void -menubar_arrange (WMenuBar * menubar) +menubar_arrange (WMenuBar *menubar) { int start_x = 1; GList *i; @@ -1059,7 +1059,7 @@ menubar_arrange (WMenuBar * menubar) /** Find MenuBar widget in the dialog */ WMenuBar * -menubar_find (const WDialog * h) +menubar_find (const WDialog *h) { return MENUBAR (widget_find_by_type (CONST_WIDGET (h), menubar_callback)); } @@ -1074,7 +1074,7 @@ menubar_find (const WDialog * h) * @which number of active dropdown menu */ void -menubar_activate (WMenuBar * menubar, gboolean dropped, int which) +menubar_activate (WMenuBar *menubar, gboolean dropped, int which) { Widget *w = WIDGET (menubar); diff --git a/lib/widget/mouse.c b/lib/widget/mouse.c index 2183903c02..d3fc1affc8 100644 --- a/lib/widget/mouse.c +++ b/lib/widget/mouse.c @@ -59,8 +59,8 @@ * http://www.fifi.org/cgi-bin/info2www?(gpm)Event+Types */ static void -init_mouse_event (mouse_event_t * event, mouse_msg_t msg, const Gpm_Event * global_gpm, - const Widget * w) +init_mouse_event (mouse_event_t *event, mouse_msg_t msg, const Gpm_Event *global_gpm, + const Widget *w) { event->msg = msg; event->x = global_gpm->x - w->rect.x - 1; /* '-1' because Gpm_Event is 1-based. */ @@ -82,7 +82,7 @@ init_mouse_event (mouse_event_t * event, mouse_msg_t msg, const Gpm_Event * glob * @return high level mouse event */ static mouse_event_t -mouse_translate_event (Widget * w, Gpm_Event * event) +mouse_translate_event (Widget *w, Gpm_Event *event) { gboolean in_widget; mouse_msg_t msg = MSG_MOUSE_NONE; @@ -173,7 +173,7 @@ mouse_translate_event (Widget * w, Gpm_Event * event) * @return result of mouse event handling */ static int -mouse_process_event (Widget * w, mouse_event_t * event) +mouse_process_event (Widget *w, mouse_event_t *event) { int ret = MOU_UNHANDLED; @@ -215,7 +215,7 @@ mouse_process_event (Widget * w, mouse_event_t * event) * @return result of mouse event handling */ int -mouse_handle_event (Widget * w, Gpm_Event * event) +mouse_handle_event (Widget *w, Gpm_Event *event) { mouse_event_t me; diff --git a/lib/widget/quick.c b/lib/widget/quick.c index 3a6d165b85..1930c6109c 100644 --- a/lib/widget/quick.c +++ b/lib/widget/quick.c @@ -68,7 +68,7 @@ typedef struct /* --------------------------------------------------------------------------------------------- */ static WInput * -quick_create_input (int y, int x, const quick_widget_t * qw) +quick_create_input (int y, int x, const quick_widget_t *qw) { WInput *in; @@ -84,7 +84,7 @@ quick_create_input (int y, int x, const quick_widget_t * qw) /* --------------------------------------------------------------------------------------------- */ static void -quick_create_labeled_input (GArray * widgets, int *y, int x, quick_widget_t * quick_widget, +quick_create_labeled_input (GArray *widgets, int *y, int x, quick_widget_t *quick_widget, int *width) { quick_widget_item_t in, label; @@ -161,7 +161,7 @@ quick_create_labeled_input (GArray * widgets, int *y, int x, quick_widget_t * qu /* --------------------------------------------------------------------------------------------- */ int -quick_dialog_skip (quick_dialog_t * quick_dlg, int nskip) +quick_dialog_skip (quick_dialog_t *quick_dlg, int nskip) { int len; int blen = 0; diff --git a/lib/widget/quick.h b/lib/widget/quick.h index 8a722c11b4..4f8abccb5c 100644 --- a/lib/widget/quick.h +++ b/lib/widget/quick.h @@ -346,7 +346,7 @@ int quick_dialog_skip (quick_dialog_t * quick_dlg, int nskip); /*** inline functions ****************************************************************************/ static inline int -quick_dialog (quick_dialog_t * quick_dlg) +quick_dialog (quick_dialog_t *quick_dlg) { return quick_dialog_skip (quick_dlg, 1); } diff --git a/lib/widget/radio.c b/lib/widget/radio.c index 94463f6276..568660c9f6 100644 --- a/lib/widget/radio.c +++ b/lib/widget/radio.c @@ -58,7 +58,7 @@ const global_keymap_t *radio_map = NULL; /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -radio_execute_cmd (WRadio * r, long command) +radio_execute_cmd (WRadio *r, long command) { cb_ret_t ret = MSG_HANDLED; Widget *w = WIDGET (r); @@ -107,7 +107,7 @@ radio_execute_cmd (WRadio * r, long command) /* Return MSG_HANDLED if we want a redraw */ static cb_ret_t -radio_key (WRadio * r, int key) +radio_key (WRadio *r, int key) { long command; @@ -120,7 +120,7 @@ radio_key (WRadio * r, int key) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +radio_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WRadio *r = RADIO (w); int i; @@ -188,7 +188,7 @@ radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d /* --------------------------------------------------------------------------------------------- */ static void -radio_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +radio_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { switch (msg) { diff --git a/lib/widget/rect.c b/lib/widget/rect.c index 8c2d46418b..895723ae5d 100644 --- a/lib/widget/rect.c +++ b/lib/widget/rect.c @@ -83,7 +83,7 @@ rect_new (int y, int x, int lines, int cols) */ void -rect_init (WRect * r, int y, int x, int lines, int cols) +rect_init (WRect *r, int y, int x, int lines, int cols) { r->y = y; r->x = x; @@ -101,7 +101,7 @@ rect_init (WRect * r, int y, int x, int lines, int cols) */ void -rect_move (WRect * r, int dy, int dx) +rect_move (WRect *r, int dy, int dx) { r->y += dy; r->x += dx; @@ -117,7 +117,7 @@ rect_move (WRect * r, int dy, int dx) */ void -rect_resize (WRect * r, int dl, int dc) +rect_resize (WRect *r, int dl, int dc) { r->lines += dl; r->cols += dc; @@ -137,7 +137,7 @@ rect_resize (WRect * r, int dl, int dc) */ void -rect_grow (WRect * r, int dl, int dc) +rect_grow (WRect *r, int dl, int dc) { r->y -= dl; r->x -= dc; @@ -157,7 +157,7 @@ rect_grow (WRect * r, int dl, int dc) */ void -rect_intersect (WRect * r, const WRect * r1) +rect_intersect (WRect *r, const WRect *r1) { int y, x; int y1, x1; @@ -193,7 +193,7 @@ rect_intersect (WRect * r, const WRect * r1) */ void -rect_union (WRect * r, const WRect * r1) +rect_union (WRect *r, const WRect *r1) { int x, y; int x1, y1; @@ -228,7 +228,7 @@ rect_union (WRect * r, const WRect * r1) */ gboolean -rects_are_overlapped (const WRect * r1, const WRect * r2) +rects_are_overlapped (const WRect *r1, const WRect *r2) { return !((r2->x >= r1->x + r1->cols) || (r1->x >= r2->x + r2->cols) || (r2->y >= r1->y + r1->lines) || (r1->y >= r2->y + r2->lines)); @@ -245,7 +245,7 @@ rects_are_overlapped (const WRect * r1, const WRect * r2) */ gboolean -rects_are_equal (const WRect * r1, const WRect * r2) +rects_are_equal (const WRect *r1, const WRect *r2) { return (r1->y == r2->y && r1->x == r2->x && r1->lines == r2->lines && r1->cols == r2->cols); } diff --git a/lib/widget/widget-common.c b/lib/widget/widget-common.c index 459de104cf..6d0a8d9585 100644 --- a/lib/widget/widget-common.c +++ b/lib/widget/widget-common.c @@ -82,7 +82,7 @@ widget_set_id (void) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -widget_default_resize (Widget * w, const WRect * r) +widget_default_resize (Widget *w, const WRect *r) { if (r == NULL) return MSG_NOT_HANDLED; @@ -95,7 +95,7 @@ widget_default_resize (Widget * w, const WRect * r) /* --------------------------------------------------------------------------------------------- */ static void -widget_do_focus (Widget * w, gboolean enable) +widget_do_focus (Widget *w, gboolean enable) { if (w != NULL && widget_get_state (WIDGET (w->owner), WST_VISIBLE | WST_FOCUSED)) widget_set_state (w, WST_FOCUSED, enable); @@ -109,7 +109,7 @@ widget_do_focus (Widget * w, gboolean enable) */ static void -widget_focus (Widget * w) +widget_focus (Widget *w) { WGroup *g = w->owner; @@ -136,7 +136,7 @@ widget_focus (Widget * w) * Put widget on top or bottom of Z-order. */ static void -widget_reorder (GList * l, gboolean set_top) +widget_reorder (GList *l, gboolean set_top) { WGroup *g = WIDGET (l->data)->owner; @@ -169,7 +169,7 @@ hotkey_cmp (const char *s1, const char *s2) /* --------------------------------------------------------------------------------------------- */ static void -widget_default_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +widget_default_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { /* do nothing */ (void) w; @@ -180,7 +180,7 @@ widget_default_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * even /* --------------------------------------------------------------------------------------------- */ static const int * -widget_default_get_colors (const Widget * w) +widget_default_get_colors (const Widget *w) { const Widget *owner = CONST_WIDGET (w->owner); @@ -262,7 +262,7 @@ hotkey_equal (const hotkey_t hotkey1, const hotkey_t hotkey2) /* --------------------------------------------------------------------------------------------- */ void -hotkey_draw (const Widget * w, const hotkey_t hotkey, gboolean focused) +hotkey_draw (const Widget *w, const hotkey_t hotkey, gboolean focused) { if (hotkey.start[0] != '\0') { @@ -307,7 +307,7 @@ hotkey_get_text (const hotkey_t hotkey) /* --------------------------------------------------------------------------------------------- */ void -widget_init (Widget * w, const WRect * r, widget_cb_fn callback, widget_mouse_cb_fn mouse_callback) +widget_init (Widget *w, const WRect *r, widget_cb_fn callback, widget_mouse_cb_fn mouse_callback) { w->id = widget_set_id (); w->rect = *r; @@ -345,7 +345,7 @@ widget_init (Widget * w, const WRect * r, widget_cb_fn callback, widget_mouse_cb /* Default callback for widgets */ cb_ret_t -widget_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +widget_default_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { (void) sender; (void) parm; @@ -381,7 +381,7 @@ widget_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm * @param enable TRUE if specified options should be added, FALSE if options should be removed */ void -widget_set_options (Widget * w, widget_options_t options, gboolean enable) +widget_set_options (Widget *w, widget_options_t options, gboolean enable) { if (enable) w->options |= options; @@ -392,7 +392,7 @@ widget_set_options (Widget * w, widget_options_t options, gboolean enable) /* --------------------------------------------------------------------------------------------- */ void -widget_adjust_position (widget_pos_flags_t pos_flags, WRect * r) +widget_adjust_position (widget_pos_flags_t pos_flags, WRect *r) { if ((pos_flags & WPOS_FULLSCREEN) != 0) { @@ -431,7 +431,7 @@ widget_adjust_position (widget_pos_flags_t pos_flags, WRect * r) */ void -widget_set_size (Widget * w, int y, int x, int lines, int cols) +widget_set_size (Widget *w, int y, int x, int lines, int cols) { WRect r = { y, x, lines, cols }; @@ -448,7 +448,7 @@ widget_set_size (Widget * w, int y, int x, int lines, int cols) */ void -widget_set_size_rect (Widget * w, WRect * r) +widget_set_size_rect (Widget *w, WRect *r) { send_message (w, NULL, MSG_RESIZE, 0, r); widget_draw (w); @@ -457,7 +457,7 @@ widget_set_size_rect (Widget * w, WRect * r) /* --------------------------------------------------------------------------------------------- */ void -widget_selectcolor (const Widget * w, gboolean focused, gboolean hotkey) +widget_selectcolor (const Widget *w, gboolean focused, gboolean hotkey) { int color; const int *colors; @@ -477,7 +477,7 @@ widget_selectcolor (const Widget * w, gboolean focused, gboolean hotkey) /* --------------------------------------------------------------------------------------------- */ void -widget_erase (Widget * w) +widget_erase (Widget *w) { if (w != NULL) tty_fill_region (w->rect.y, w->rect.x, w->rect.lines, w->rect.cols, ' '); @@ -486,7 +486,7 @@ widget_erase (Widget * w) /* --------------------------------------------------------------------------------------------- */ void -widget_set_visibility (Widget * w, gboolean make_visible) +widget_set_visibility (Widget *w, gboolean make_visible) { if (widget_get_state (w, WST_VISIBLE) != make_visible) widget_set_state (w, WST_VISIBLE, make_visible); @@ -526,7 +526,7 @@ widget_is_active (const void *w) /* --------------------------------------------------------------------------------------------- */ cb_ret_t -widget_draw (Widget * w) +widget_draw (Widget *w) { cb_ret_t ret = MSG_NOT_HANDLED; @@ -550,7 +550,7 @@ widget_draw (Widget * w) */ void -widget_replace (Widget * old_w, Widget * new_w) +widget_replace (Widget *old_w, Widget *new_w) { WGroup *g = old_w->owner; gboolean should_focus = FALSE; @@ -605,7 +605,7 @@ widget_replace (Widget * old_w, Widget * new_w) /* --------------------------------------------------------------------------------------------- */ gboolean -widget_is_focusable (const Widget * w) +widget_is_focusable (const Widget *w) { return (widget_get_options (w, WOP_SELECTABLE) && widget_get_state (w, WST_VISIBLE) && !widget_get_state (w, WST_DISABLED)); @@ -622,7 +622,7 @@ widget_is_focusable (const Widget * w) */ void -widget_select (Widget * w) +widget_select (Widget *w) { WGroup *g; @@ -650,7 +650,7 @@ widget_select (Widget * w) */ void -widget_set_bottom (Widget * w) +widget_set_bottom (Widget *w) { widget_reorder (widget_find (WIDGET (w->owner), w), FALSE); } @@ -665,7 +665,7 @@ widget_set_bottom (Widget * w) */ long -widget_lookup_key (Widget * w, int key) +widget_lookup_key (Widget *w, int key) { if (w->ext_mode) { @@ -687,7 +687,7 @@ widget_lookup_key (Widget * w, int key) */ void -widget_default_make_global (Widget * w, const WRect * delta) +widget_default_make_global (Widget *w, const WRect *delta) { if (delta != NULL) rect_move (&w->rect, delta->y, delta->x); @@ -706,7 +706,7 @@ widget_default_make_global (Widget * w, const WRect * delta) */ void -widget_default_make_local (Widget * w, const WRect * delta) +widget_default_make_local (Widget *w, const WRect *delta) { if (delta != NULL) rect_move (&w->rect, -delta->y, -delta->x); @@ -725,7 +725,7 @@ widget_default_make_local (Widget * w, const WRect * delta) */ GList * -widget_default_find (const Widget * w, const Widget * what) +widget_default_find (const Widget *w, const Widget *what) { return (w != what || w->owner == NULL) ? NULL : g_list_find (CONST_GROUP (w->owner)->widgets, what); @@ -743,7 +743,7 @@ widget_default_find (const Widget * w, const Widget * what) */ Widget * -widget_default_find_by_type (const Widget * w, widget_cb_fn cb) +widget_default_find_by_type (const Widget *w, widget_cb_fn cb) { return (w->callback == cb ? WIDGET (w) : NULL); } @@ -759,7 +759,7 @@ widget_default_find_by_type (const Widget * w, widget_cb_fn cb) */ Widget * -widget_default_find_by_id (const Widget * w, unsigned long id) +widget_default_find_by_id (const Widget *w, unsigned long id) { return (w->id == id ? WIDGET (w) : NULL); } @@ -777,7 +777,7 @@ widget_default_find_by_id (const Widget * w, unsigned long id) */ cb_ret_t -widget_default_set_state (Widget * w, widget_state_t state, gboolean enable) +widget_default_set_state (Widget *w, widget_state_t state, gboolean enable) { gboolean ret = MSG_HANDLED; Widget *owner = WIDGET (GROUP (w->owner)); @@ -867,7 +867,7 @@ widget_default_set_state (Widget * w, widget_state_t state, gboolean enable) */ void -widget_default_destroy (Widget * w) +widget_default_destroy (Widget *w) { send_message (w, NULL, MSG_DESTROY, 0, NULL); g_free (w); @@ -877,7 +877,7 @@ widget_default_destroy (Widget * w) /* get mouse pointer location within widget */ Gpm_Event -mouse_get_local (const Gpm_Event * global, const Widget * w) +mouse_get_local (const Gpm_Event *global, const Widget *w) { Gpm_Event local; @@ -894,7 +894,7 @@ mouse_get_local (const Gpm_Event * global, const Widget * w) /* --------------------------------------------------------------------------------------------- */ gboolean -mouse_global_in_widget (const Gpm_Event * event, const Widget * w) +mouse_global_in_widget (const Gpm_Event *event, const Widget *w) { const WRect *r = &w->rect; diff --git a/lib/widget/widget-common.h b/lib/widget/widget-common.h index 19acec11dd..a1d4e0ccd9 100644 --- a/lib/widget/widget-common.h +++ b/lib/widget/widget-common.h @@ -267,7 +267,7 @@ send_message (void *w, void *sender, widget_msg_t msg, int parm, void *data) */ static inline gboolean -widget_get_options (const Widget * w, widget_options_t options) +widget_get_options (const Widget *w, widget_options_t options) { return ((w->options & options) == options); } @@ -283,7 +283,7 @@ widget_get_options (const Widget * w, widget_options_t options) */ static inline gboolean -widget_get_state (const Widget * w, widget_state_t state) +widget_get_state (const Widget *w, widget_state_t state) { return ((w->state & state) == state); } @@ -297,7 +297,7 @@ widget_get_state (const Widget * w, widget_state_t state) */ static inline void -widget_make_global (Widget * w) +widget_make_global (Widget *w) { w->make_global (w, NULL); } @@ -311,7 +311,7 @@ widget_make_global (Widget * w) */ static inline void -widget_make_local (Widget * w) +widget_make_local (Widget *w) { w->make_local (w, NULL); } @@ -328,7 +328,7 @@ widget_make_local (Widget * w) */ static inline GList * -widget_find (const Widget * w, const Widget * what) +widget_find (const Widget *w, const Widget *what) { return w->find (w, what); } @@ -345,7 +345,7 @@ widget_find (const Widget * w, const Widget * what) */ static inline Widget * -widget_find_by_type (const Widget * w, widget_cb_fn cb) +widget_find_by_type (const Widget *w, widget_cb_fn cb) { return w->find_by_type (w, cb); } @@ -361,7 +361,7 @@ widget_find_by_type (const Widget * w, widget_cb_fn cb) */ static inline Widget * -widget_find_by_id (const Widget * w, unsigned long id) +widget_find_by_id (const Widget *w, unsigned long id) { return w->find_by_id (w, id); } @@ -378,7 +378,7 @@ widget_find_by_id (const Widget * w, unsigned long id) */ static inline cb_ret_t -widget_set_state (Widget * w, widget_state_t state, gboolean enable) +widget_set_state (Widget *w, widget_state_t state, gboolean enable) { return w->set_state (w, state, enable); } @@ -391,7 +391,7 @@ widget_set_state (Widget * w, widget_state_t state, gboolean enable) */ static inline void -widget_destroy (Widget * w) +widget_destroy (Widget *w) { w->destroy (w); } @@ -405,7 +405,7 @@ widget_destroy (Widget * w) * @return color colors */ static inline const int * -widget_get_colors (const Widget * w) +widget_get_colors (const Widget *w) { return w->get_colors (w); } @@ -420,7 +420,7 @@ widget_get_colors (const Widget * w) */ static inline gboolean -widget_update_cursor (Widget * w) +widget_update_cursor (Widget *w) { return (send_message (w, NULL, MSG_CURSOR, 0, NULL) == MSG_HANDLED); } @@ -428,7 +428,7 @@ widget_update_cursor (Widget * w) /* --------------------------------------------------------------------------------------------- */ static inline void -widget_show (Widget * w) +widget_show (Widget *w) { widget_set_visibility (w, TRUE); } @@ -436,7 +436,7 @@ widget_show (Widget * w) /* --------------------------------------------------------------------------------------------- */ static inline void -widget_hide (Widget * w) +widget_hide (Widget *w) { widget_set_visibility (w, FALSE); } @@ -452,7 +452,7 @@ widget_hide (Widget * w) */ static inline gboolean -widget_overlapped (const Widget * a, const Widget * b) +widget_overlapped (const Widget *a, const Widget *b) { return rects_are_overlapped (&a->rect, &b->rect); } diff --git a/lib/widget/wtools.c b/lib/widget/wtools.c index d1df8dac18..e60085d63f 100644 --- a/lib/widget/wtools.c +++ b/lib/widget/wtools.c @@ -65,7 +65,7 @@ static int sel_pos = 0; /** default query callback, used to reposition query */ static cb_ret_t -query_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +query_default_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDialog *h = DIALOG (w); @@ -447,7 +447,7 @@ message (int flags, const char *title, const char *text, ...) /** Show error message box */ gboolean -mc_error_message (GError ** mcerror, int *code) +mc_error_message (GError **mcerror, int *code) { if (mcerror == NULL || *mcerror == NULL) return FALSE; @@ -568,7 +568,7 @@ status_msg_create (const char *title, double delay, status_msg_cb init_cb, */ void -status_msg_destroy (status_msg_t * sm) +status_msg_destroy (status_msg_t *sm) { status_msg_deinit (sm); g_free (sm); @@ -587,7 +587,7 @@ status_msg_destroy (status_msg_t * sm) */ void -status_msg_init (status_msg_t * sm, const char *title, double delay, status_msg_cb init_cb, +status_msg_init (status_msg_t *sm, const char *title, double delay, status_msg_cb init_cb, status_msg_update_cb update_cb, status_msg_cb deinit_cb) { gint64 start; @@ -625,7 +625,7 @@ status_msg_init (status_msg_t * sm, const char *title, double delay, status_msg_ */ void -status_msg_deinit (status_msg_t * sm) +status_msg_deinit (status_msg_t *sm) { if (sm == NULL) return; @@ -648,7 +648,7 @@ status_msg_deinit (status_msg_t * sm) */ int -status_msg_common_update (status_msg_t * sm) +status_msg_common_update (status_msg_t *sm) { int c; Gpm_Event event; @@ -694,7 +694,7 @@ status_msg_common_update (status_msg_t * sm) */ void -simple_status_msg_init_cb (status_msg_t * sm) +simple_status_msg_init_cb (status_msg_t *sm) { simple_status_msg_t *ssm = SIMPLE_STATUS_MSG (sm); Widget *wd = WIDGET (sm->dlg); diff --git a/m4.include/ax_check_compile_flag.m4 b/m4.include/ax_check_compile_flag.m4 index bd753b34d7..8323a22755 100644 --- a/m4.include/ax_check_compile_flag.m4 +++ b/m4.include/ax_check_compile_flag.m4 @@ -34,6 +34,11 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. +# Yury Zaytsev: +# Toggle Werror since at some point clang started treating unknown -W +# flags as warnings, succeeding with the build, yet issuing an annoying +# warning. + #serial 6 AC_DEFUN([AX_CHECK_COMPILE_FLAG], @@ -41,7 +46,7 @@ AC_DEFUN([AX_CHECK_COMPILE_FLAG], AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1 -Werror" AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) diff --git a/m4.include/ax_gcc_func_attribute.m4 b/m4.include/ax_gcc_func_attribute.m4 index 098c9aadff..fa4e089d68 100644 --- a/m4.include/ax_gcc_func_attribute.m4 +++ b/m4.include/ax_gcc_func_attribute.m4 @@ -42,6 +42,7 @@ # flatten # format # format_arg +# gnu_format # gnu_inline # hot # ifunc @@ -77,7 +78,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 9 +#serial 13 AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [ AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1]) @@ -132,7 +133,7 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [ int foo( void ) __attribute__(($1)); ], [fallthrough], [ - int foo( void ) {switch (0) { case 1: __attribute__(($1)); case 2: break ; }}; + void foo( int x ) {switch (x) { case 1: __attribute__(($1)); case 2: break ; }}; ], [flatten], [ int foo( void ) __attribute__(($1)); @@ -140,6 +141,9 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [ [format], [ int foo(const char *p, ...) __attribute__(($1(printf, 1, 2))); ], + [gnu_format], [ + int foo(const char *p, ...) __attribute__((format(gnu_printf, 1, 2))); + ], [format_arg], [ char *foo(const char *p) __attribute__(($1(1))); ], @@ -224,7 +228,7 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [ dnl GCC doesn't exit with an error if an unknown attribute is dnl provided but only outputs a warning, so accept the attribute dnl only if no warning were issued. - [AS_IF([test -s conftest.err], + [AS_IF([grep -- -Wattributes conftest.err], [AS_VAR_SET([ac_var], [no])], [AS_VAR_SET([ac_var], [yes])])], [AS_VAR_SET([ac_var], [no])]) diff --git a/m4.include/mc-cflags.m4 b/m4.include/mc-cflags.m4 index 264f5c1061..7d7d07b0fa 100644 --- a/m4.include/mc-cflags.m4 +++ b/m4.include/mc-cflags.m4 @@ -13,18 +13,6 @@ AC_DEFUN([mc_CHECK_CFLAGS],[ mc_configured_cflags="" -dnl AC_MSG_CHECKING([CC is $CC]) - - dnl https://stackoverflow.com/questions/52557417/how-to-check-support-compile-flag-in-autoconf-for-clang - case "$CC" in - clang*) - EXTRA_OPTION="-Werror" - ;; - *) - EXTRA_OPTION="" - ;; - esac - dnl Sorted -f options: case "$CC" in gcc*) diff --git a/po/af.po b/po/af.po index d671510a70..a0266ed082 100644 --- a/po/af.po +++ b/po/af.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Afrikaans (http://app.transifex.com/mc/mc/language/af/)\n" @@ -531,27 +531,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/ar.po b/po/ar.po index ecb740afde..d7d7c2ea50 100644 --- a/po/ar.po +++ b/po/ar.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Arabic (http://app.transifex.com/mc/mc/language/ar/)\n" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/az.po b/po/az.po index 0522b7f554..68b1e42229 100644 --- a/po/az.po +++ b/po/az.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Azerbaijani (http://app.transifex.com/mc/mc/language/az/)\n" @@ -534,27 +534,9 @@ msgid "Changes to file lost" msgstr "Dəyişiklikləri itirdim" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/be.po b/po/be.po index 6760644785..189e72f5f2 100644 --- a/po/be.po +++ b/po/be.po @@ -17,7 +17,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Viačasłaŭ Chalikin , 2023-2024\n" "Language-Team: Belarusian (http://app.transifex.com/mc/mc/language/be/)\n" @@ -574,30 +574,12 @@ msgstr "Атрыманне файла" msgid "Changes to file lost" msgstr "Змены ў файле былі страчаныя" -#, c-format -msgid "%s is not a directory\n" -msgstr "«%s» — не каталог\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Вы не валодаеце каталогам «%s»\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Немагчыма вызначыць правільныя дазволы каталога «%s»\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Немагчыма стварыць часовы каталог «%s»: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Часовыя файлы будуць стварацца ў «%s»\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Часовыя файлы не будуць стварацца\n" - msgid "Press any key to continue..." msgstr "Каб працягнуць, націсніце хоць-якую клавішу..." @@ -4767,3 +4749,23 @@ msgstr "Працягваць ад пачатку?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Немагчыма атрымаць лакальную копію /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "«%s» — не каталог\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Вы не валодаеце каталогам «%s»\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Немагчыма вызначыць правільныя дазволы каталога «%s»\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Часовыя файлы будуць стварацца ў «%s»\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Часовыя файлы не будуць стварацца\n" diff --git a/po/bg.po b/po/bg.po index d423c10be3..9049b8edc6 100644 --- a/po/bg.po +++ b/po/bg.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Alexander Shopov , 2022\n" "Language-Team: Bulgarian (http://app.transifex.com/mc/mc/language/bg/)\n" @@ -565,30 +565,12 @@ msgstr "Получавам файл" msgid "Changes to file lost" msgstr "Промените във файла изгубени" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s не е директория\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Директорията %s не се притежава от вас\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Не може да се зададат коректни права за директория %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Не може да се създаде временна директория %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Временни файлове ще бъдат създадени в %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Временни файлове няма да бъдат създадени\n" - msgid "Press any key to continue..." msgstr "Натиснете клавиш, за да продължите…" @@ -4731,3 +4713,23 @@ msgstr "Да се продължи ли от началото?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Не може да се изтегли локално копие на „/ftp://some.host/editme.txt“" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s не е директория\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Директорията %s не се притежава от вас\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Не може да се зададат коректни права за директория %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Временни файлове ще бъдат създадени в %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Временни файлове няма да бъдат създадени\n" diff --git a/po/br.po b/po/br.po index 47c737b7fb..1eb0d73dcd 100644 --- a/po/br.po +++ b/po/br.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Irriep Nala Novram , 2017-2018\n" "Language-Team: Breton (http://app.transifex.com/mc/mc/language/br/)\n" @@ -536,27 +536,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/ca.po b/po/ca.po index d922294f0a..9f15972b98 100644 --- a/po/ca.po +++ b/po/ca.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Antoni Bella Pérez , 2017-2024\n" "Language-Team: Catalan (http://app.transifex.com/mc/mc/language/ca/)\n" @@ -574,30 +574,12 @@ msgstr "S'està recuperant el fitxer" msgid "Changes to file lost" msgstr "Canvia al fitxer perdut" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s no és un directori\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "El directori %s no és de la vostra propietat\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "No s'han pogut establir els permisos correctes per al directori %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "No s'ha pogut crear el directori temporal %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Es crearan fitxers temporals a %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "No es crearan fitxers temporals\n" - msgid "Press any key to continue..." msgstr "Premeu qualsevol tecla per a continuar..." @@ -4801,3 +4783,24 @@ msgstr "Voleu continuar des del començament?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" "No s'ha pogut obtenir una còpia local de /ftp://algun.amfitrió/editam.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s no és un directori\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "El directori %s no és de la vostra propietat\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "" +#~ "No s'han pogut establir els permisos correctes per al directori %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Es crearan fitxers temporals a %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "No es crearan fitxers temporals\n" diff --git a/po/cs.po b/po/cs.po index 24baad1fae..7bcc153f94 100644 --- a/po/cs.po +++ b/po/cs.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Pavel Borecki , 2017-2023\n" "Language-Team: Czech (http://app.transifex.com/mc/mc/language/cs/)\n" @@ -569,30 +569,12 @@ msgstr "Získává se soubor" msgid "Changes to file lost" msgstr "Změny souboru byly ztraceny" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s není složka\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Nejste vlastníkem složky %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Nedaří se nastavit správná práva pro složku %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Nedaří se vytvořit dočasnou složku %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Dočasné soubory budou vytvářeny v %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Dočasné soubory nebudou vytvářeny\n" - msgid "Press any key to continue..." msgstr "Pokračujte stiskem libovolné klávesy…" @@ -4763,3 +4745,23 @@ msgstr "Pokračovat od začátku?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Nedaří získat místní kopii souboru /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s není složka\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Nejste vlastníkem složky %s\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Nedaří se nastavit správná práva pro složku %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Dočasné soubory budou vytvářeny v %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Dočasné soubory nebudou vytvářeny\n" diff --git a/po/da.po b/po/da.po index 667127d01d..2e3ed6e7df 100644 --- a/po/da.po +++ b/po/da.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Morten Bo Johansen , 2018,2023\n" "Language-Team: Danish (http://app.transifex.com/mc/mc/language/da/)\n" @@ -565,30 +565,12 @@ msgstr "Henter fil" msgid "Changes to file lost" msgstr "Ændringer til fil tabt" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s er ikke en mappe\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Mappen %s er ikke ejet af dig\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Kan ikke angive korrekte tilladelser for mappen %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Kan ikke oprette midlertidig mappe %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Midlertidige filer vil blive oprettet i %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Midlertidige filer vil ikke blive oprettet\n" - msgid "Press any key to continue..." msgstr "Tryk på en tast for at fortsætte..." @@ -4742,3 +4724,23 @@ msgstr "Fortsæt fra begyndelsen?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Kan ikke hente en lokal kopi af /ftp://en.vært/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s er ikke en mappe\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Mappen %s er ikke ejet af dig\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Kan ikke angive korrekte tilladelser for mappen %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Midlertidige filer vil blive oprettet i %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Midlertidige filer vil ikke blive oprettet\n" diff --git a/po/de.po b/po/de.po index 5527480345..366f25a132 100644 --- a/po/de.po +++ b/po/de.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Ettore Atalan , 2015-2024\n" "Language-Team: German (http://app.transifex.com/mc/mc/language/de/)\n" @@ -578,30 +578,12 @@ msgstr "Datei empfangen" msgid "Changes to file lost" msgstr "Änderungen an Datei verlorengegangen" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s ist kein Verzeichnis\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Das Verzeichnis \"%s\" gehört Ihnen nicht\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Kann Berechtigungen für das Verzeichnis \"%s\" nicht setzen\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Kann temporäres Verzeichnis \"%s\" nicht erstellen: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Temporäre Dateien werden in \"%s\" gespeichert\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Es werden keine temporären Dateien erzeugt\n" - msgid "Press any key to continue..." msgstr "Drücken Sie eine Taste zum Fortfahren..." @@ -4774,3 +4756,23 @@ msgstr "Am Anfang fortsetzen?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Kann lokale Kopie von /ftp://some.host/editme.txt nicht erstellen" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s ist kein Verzeichnis\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Das Verzeichnis \"%s\" gehört Ihnen nicht\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Kann Berechtigungen für das Verzeichnis \"%s\" nicht setzen\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Temporäre Dateien werden in \"%s\" gespeichert\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Es werden keine temporären Dateien erzeugt\n" diff --git a/po/de_CH.po b/po/de_CH.po index e7013d3924..f9087b3146 100644 --- a/po/de_CH.po +++ b/po/de_CH.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2015-02-26 09:48+0000\n" "Last-Translator: Piotr Drąg \n" "Language-Team: German (Switzerland) (http://www.transifex.com/projects/p/mc/" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/el.po b/po/el.po index fea77082a9..2240ee8a36 100644 --- a/po/el.po +++ b/po/el.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Efstathios Iosifidis , 2015\n" "Language-Team: Greek (http://app.transifex.com/mc/mc/language/el/)\n" @@ -542,30 +542,12 @@ msgstr "Γίνεται λήψη αρχείου" msgid "Changes to file lost" msgstr "Οι αλλαγές στο αρχείο χάθηκαν" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s δεν είναι κατάλογος\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Ο κατάλογος %s δε σας ανήκει\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Αδύνατη η δημιουργία προσωρινού καταλόγου %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Τα προσωρινά αρχεία θα δημιουργηθούν στο %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Δε θα δημιουργηθούν προσωρινά αρχεία\n" - msgid "Press any key to continue..." msgstr "Πατήστε οποιοδήποτε κουμπί για να συνεχίσετε..." @@ -4569,3 +4551,19 @@ msgstr "Συνέχεια από την αρχή;" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s δεν είναι κατάλογος\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Ο κατάλογος %s δε σας ανήκει\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Τα προσωρινά αρχεία θα δημιουργηθούν στο %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Δε θα δημιουργηθούν προσωρινά αρχεία\n" diff --git a/po/en_GB.po b/po/en_GB.po index 5eead099ff..8bd15dcff4 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Andi Chandler , 2016-2017,2020,2022-2023\n" "Language-Team: English (United Kingdom) (http://app.transifex.com/mc/mc/" @@ -561,30 +561,12 @@ msgstr "Getting file" msgid "Changes to file lost" msgstr "Changes to file lost" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s is not a directory\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Directory %s is not owned by you\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Cannot set correct permissions for directory %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Cannot create temporary directory %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Temporary files will be created in %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Temporary files will not be created\n" - msgid "Press any key to continue..." msgstr "Press any key to continue..." @@ -4508,3 +4490,23 @@ msgstr "" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s is not a directory\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Directory %s is not owned by you\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Cannot set correct permissions for directory %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Temporary files will be created in %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Temporary files will not be created\n" diff --git a/po/eo.po b/po/eo.po index 8353d8724e..9d2f667e90 100644 --- a/po/eo.po +++ b/po/eo.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Yury V. Zaytsev , 2022\n" "Language-Team: Esperanto (http://app.transifex.com/mc/mc/language/eo/)\n" @@ -562,30 +562,12 @@ msgstr "Ricevanta dosieron" msgid "Changes to file lost" msgstr "Ŝanĝoj de la dosiero perditaj" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s ne estas dosierujo\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Dosierujo %s ne estas estrata de vi\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Ne eblas elekti la ĝustajn permesojn por dosierujo %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Ne eblas krei provizoran dosierujon %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Provizoraj dosieroj kreiĝos en %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Provizoraj dosieroj ne kreiĝos\n" - msgid "Press any key to continue..." msgstr "Premu iun klavon por daŭri..." @@ -4746,3 +4728,23 @@ msgstr "Ĉu deiri de la komenco?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Ne eblas atingi lokan kopion de /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s ne estas dosierujo\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Dosierujo %s ne estas estrata de vi\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Ne eblas elekti la ĝustajn permesojn por dosierujo %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Provizoraj dosieroj kreiĝos en %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Provizoraj dosieroj ne kreiĝos\n" diff --git a/po/es.po b/po/es.po index 24123910b4..362072323d 100644 --- a/po/es.po +++ b/po/es.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Spanish (http://app.transifex.com/mc/mc/language/es/)\n" @@ -567,30 +567,12 @@ msgstr "Trayendo archivo" msgid "Changes to file lost" msgstr "Los cambios del archivo se han perdido" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s no es un directorio\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "El directorio %s es de propiedad ajena\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Imposible dar permisos adecuados al directorio %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Imposible crear directorio temporal %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Los archivos temporales se ubicarán en %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "No se crearán archivos temporales\n" - msgid "Press any key to continue..." msgstr "Presione cualquier tecla para continuar..." @@ -4777,3 +4759,23 @@ msgstr "¿Continuar desde el principio?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Imposible obtener una copia local de /ftp://ese.equipo/edítame.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s no es un directorio\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "El directorio %s es de propiedad ajena\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Imposible dar permisos adecuados al directorio %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Los archivos temporales se ubicarán en %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "No se crearán archivos temporales\n" diff --git a/po/et.po b/po/et.po index 155565194b..c870353c6d 100644 --- a/po/et.po +++ b/po/et.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Kristjan Räts , " "2013-2016,2018-2019,2024\n" @@ -569,30 +569,12 @@ msgstr "Hangitakse faili" msgid "Changes to file lost" msgstr "Faili muudatused unustati" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s ei ole kataloog\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Sa ei ole kataloogi %s omanik\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Kataloogi %s õiguste määramine nurjus\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Ajutise kataloogi %s loomine nurjus: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Ajutised failid luuakse kataloogis %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Ajutisi faile ei looda\n" - msgid "Press any key to continue..." msgstr "Jätkamiseks vajuta suvalist klahvi..." @@ -4771,3 +4753,23 @@ msgstr "Kas jätkata algusest?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Kohaliku koopia hankimine failist /ftp://some.host/editme.txt nurjus" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s ei ole kataloog\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Sa ei ole kataloogi %s omanik\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Kataloogi %s õiguste määramine nurjus\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Ajutised failid luuakse kataloogis %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Ajutisi faile ei looda\n" diff --git a/po/eu.po b/po/eu.po index 923ee9e62d..d69a780ce8 100644 --- a/po/eu.po +++ b/po/eu.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Iñigo Salvador Azurmendi , " "2011,2015-2019\n" @@ -557,30 +557,12 @@ msgstr "Fitxategia eskuratzen" msgid "Changes to file lost" msgstr "Fitxategiko aldaketak galdu egin dira" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s ez da direktorio bat\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "%s direktorioa ez da zure jabegoa\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "%s direktorioarentzako baimen zuzenak ezin ezarri\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "%s aldiuneko direktorioa ezin sortu: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Aldiuneko fitxategiak %s kokalekuan sortuko dira\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Aldiuneko fitxategiak ez dira sortuko\n" - msgid "Press any key to continue..." msgstr "Sakatu edozein tekla jarraitzeko..." @@ -4685,3 +4667,23 @@ msgstr "Hasieratik jarraitu?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" "Ezin eskuratu ondokoaren bertako kopia bat: /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s ez da direktorio bat\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "%s direktorioa ez da zure jabegoa\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "%s direktorioarentzako baimen zuzenak ezin ezarri\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Aldiuneko fitxategiak %s kokalekuan sortuko dira\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Aldiuneko fitxategiak ez dira sortuko\n" diff --git a/po/fa.po b/po/fa.po index 770382ddc3..6ab3b19b87 100644 --- a/po/fa.po +++ b/po/fa.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Arya Hadi , 2017\n" "Language-Team: Persian (http://app.transifex.com/mc/mc/language/fa/)\n" @@ -535,30 +535,12 @@ msgstr "در حال دریافت فایل" msgid "Changes to file lost" msgstr "تغییرات در فایل، از دست رفت" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s یک پوشه نیست\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "پوشه %s متعلق به شما نیست\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "امکان قرار دادن اجازه‌های درست برای پوشه %s وجود ندارد\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "امکان ساخت پوشه‌ی موقت %s وجود ندارد: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "فایل‌های موقتی ساخته نخواهند شد\n" - msgid "Press any key to continue..." msgstr "برای ادامه کلیدی را فشار دهید..." @@ -4444,3 +4426,19 @@ msgstr "" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s یک پوشه نیست\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "پوشه %s متعلق به شما نیست\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "امکان قرار دادن اجازه‌های درست برای پوشه %s وجود ندارد\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "فایل‌های موقتی ساخته نخواهند شد\n" diff --git a/po/fi.po b/po/fi.po index 6dfb533ea7..1484f6175c 100644 --- a/po/fi.po +++ b/po/fi.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Kimmo Kujansuu , 2021\n" "Language-Team: Finnish (http://app.transifex.com/mc/mc/language/fi/)\n" @@ -564,30 +564,12 @@ msgstr "Tuodaan tiedostoa" msgid "Changes to file lost" msgstr "Muutokset tiedostoon menetetty" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s ei ole hakemisto\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Et ole kansion %s omistaja\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Sinulla ei ole oikeuksia kansioon %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Väliaikaishakemiston luonti epäonnistui %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Väliaikaistiedostoja ei ole luotu kohteeseen %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Väliaikais tiedosta ei ole luotu\n" - msgid "Press any key to continue..." msgstr "Paina mitä tahansa näppäintä jatkaaksesi" @@ -4559,3 +4541,23 @@ msgstr "" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s ei ole hakemisto\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Et ole kansion %s omistaja\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Sinulla ei ole oikeuksia kansioon %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Väliaikaistiedostoja ei ole luotu kohteeseen %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Väliaikais tiedosta ei ole luotu\n" diff --git a/po/fr.po b/po/fr.po index 0855de40f0..445931e109 100644 --- a/po/fr.po +++ b/po/fr.po @@ -18,7 +18,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Wallon Wallon, 2022-2024\n" "Language-Team: French (http://app.transifex.com/mc/mc/language/fr/)\n" @@ -574,30 +574,12 @@ msgstr "Obtention du fichier" msgid "Changes to file lost" msgstr "Les modifications du fichier sont perdus" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s n’est pas un répertoire\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Vous n’êtes pas propriétaire du répertoire %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Impossible de régler des droits corrects sur le répertoire %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Ne peut créer le répertoire temporaire %s : %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Les fichiers temporaires seront crées dans %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Les fichiers temporaires ne seront pas créés\n" - msgid "Press any key to continue..." msgstr "Appuyez sur une touche pour continuer..." @@ -4801,3 +4783,23 @@ msgstr "Continuer à partir du début ?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" "Impossible de récupérer localement le fichier /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s n’est pas un répertoire\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Vous n’êtes pas propriétaire du répertoire %s\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Impossible de régler des droits corrects sur le répertoire %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Les fichiers temporaires seront crées dans %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Les fichiers temporaires ne seront pas créés\n" diff --git a/po/fr_CA.po b/po/fr_CA.po index 1a2d95a161..1926186114 100644 --- a/po/fr_CA.po +++ b/po/fr_CA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2015-02-26 09:48+0000\n" "Last-Translator: Piotr Drąg \n" "Language-Team: French (Canada) (http://www.transifex.com/projects/p/mc/" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/ga.po b/po/ga.po index 946efbda2b..be04ccc381 100644 --- a/po/ga.po +++ b/po/ga.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Irish (http://app.transifex.com/mc/mc/language/ga/)\n" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/gl.po b/po/gl.po index 17d0b03480..f5a4a355b5 100644 --- a/po/gl.po +++ b/po/gl.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Miguel Anxo Bouzada , " "2012,2014-2015,2019\n" @@ -564,30 +564,12 @@ msgstr "Obtendo ficheiro" msgid "Changes to file lost" msgstr "Perdéronse os cambios no ficheiro" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s non é un directorio\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Non é propietario do directorio %s \n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Non é posíbel dar permisos axeitados ao directorio %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Non é posíbel crear directorio temporal %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Os ficheiros temporais crearanse en %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Non se crearán ficheiros temporais\n" - msgid "Press any key to continue..." msgstr "Prema calquera tecla para continuar..." @@ -4686,3 +4668,23 @@ msgstr "Continuar desde o principio?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Non é posíbel obter unha copia local de /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s non é un directorio\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Non é propietario do directorio %s \n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Non é posíbel dar permisos axeitados ao directorio %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Os ficheiros temporais crearanse en %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Non se crearán ficheiros temporais\n" diff --git a/po/he.po b/po/he.po index cc7aba878a..f047e0f7d6 100644 --- a/po/he.po +++ b/po/he.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Hebrew (http://app.transifex.com/mc/mc/language/he/)\n" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/hr.po b/po/hr.po index 4e2a7e0b7f..a5c71deae7 100644 --- a/po/hr.po +++ b/po/hr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Croatian (http://app.transifex.com/mc/mc/language/hr/)\n" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/hu.po b/po/hu.po index f65e716c00..668a70842d 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: 6bdcf737f9bcb6037ecba892a70fb951_e9eeb40 " ", 2020\n" @@ -548,30 +548,12 @@ msgstr "Fájlletöltés" msgid "Changes to file lost" msgstr "A fájl módosításai elvesztek" -#, c-format -msgid "%s is not a directory\n" -msgstr "\"%s\" nem könyvtár\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "A(z) \"%s\" könyvtár nem az Öné\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Nem sikerült beállítani a jogokat a(z) \"%s\" könyvtárhoz.\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "A(z) \"%s\" ideiglenes könyvtár nem hozható létre: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Az ideiglenes fájlok a(z) \"%s\" könyvtárban jönnek létre\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Ideiglenes fájlok nem jönnek létre\n" - msgid "Press any key to continue..." msgstr "Nyomjon meg egy billentyűt..." @@ -4669,3 +4651,23 @@ msgstr "Folytatás az elejéről?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Nem sikerült behozni /ftp://some.host/editme.txt helyi másolatát" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "\"%s\" nem könyvtár\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "A(z) \"%s\" könyvtár nem az Öné\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Nem sikerült beállítani a jogokat a(z) \"%s\" könyvtárhoz.\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Az ideiglenes fájlok a(z) \"%s\" könyvtárban jönnek létre\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Ideiglenes fájlok nem jönnek létre\n" diff --git a/po/ia.po b/po/ia.po index cc912d4a25..a240983fdf 100644 --- a/po/ia.po +++ b/po/ia.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Martijn Dekker , 2012,2017\n" "Language-Team: Interlingua (http://app.transifex.com/mc/mc/language/ia/)\n" @@ -542,30 +542,12 @@ msgstr "Obtene file" msgid "Changes to file lost" msgstr "Cambiamentos in file perdite" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s non es un directorio.\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Le directorio %s non ha te como proprietario.\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Non pote definir le permissiones correcte pro le directorio %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Non pote crear le directorio temporari %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Le files temporari essera create in %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Files temporari non essera create\n" - msgid "Press any key to continue..." msgstr "Preme qualcunque clave pro continuar..." @@ -4492,3 +4474,23 @@ msgstr "Continuar ab initio?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s non es un directorio.\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Le directorio %s non ha te como proprietario.\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Non pote definir le permissiones correcte pro le directorio %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Le files temporari essera create in %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Files temporari non essera create\n" diff --git a/po/id.po b/po/id.po index edbdca6788..5df7c807e4 100644 --- a/po/id.po +++ b/po/id.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Ferriandy Chianiago , 2015\n" "Language-Team: Indonesian (http://app.transifex.com/mc/mc/language/id/)\n" @@ -549,30 +549,12 @@ msgstr "Mendapatkan file" msgid "Changes to file lost" msgstr "Perubahan file tidak tersimpan" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s bukan suatu direktori\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Direktori %s bukan dimiliki oleh Anda\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Tak bisa menata hak yang benar bagi direktori %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Tak bisa membuat direktori sementara %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Berkas sementara akan dibuat dalam %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Berkas sementara tak akan dibuat\n" - msgid "Press any key to continue..." msgstr "Tekan sebarang tombol untuk melanjutkan..." @@ -4481,3 +4463,23 @@ msgstr "" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s bukan suatu direktori\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Direktori %s bukan dimiliki oleh Anda\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Tak bisa menata hak yang benar bagi direktori %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Berkas sementara akan dibuat dalam %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Berkas sementara tak akan dibuat\n" diff --git a/po/ie.po b/po/ie.po index 9b99bf154f..622ffd9b24 100644 --- a/po/ie.po +++ b/po/ie.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Interlingue (http://app.transifex.com/mc/mc/language/ie/)\n" @@ -531,27 +531,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/it.po b/po/it.po index db46118c4b..96afd2ace6 100644 --- a/po/it.po +++ b/po/it.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Marco Ciampa , 2023\n" "Language-Team: Italian (http://app.transifex.com/mc/mc/language/it/)\n" @@ -567,30 +567,12 @@ msgstr "Ottenuto file " msgid "Changes to file lost" msgstr "Cambiamenti al file persi" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s non è una directory\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "La directory %s non è di Vostra proprietà\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Impossibile impostare correttamente i permessi per la directory %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Non posso creare la directory temporanea %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "I file temporanei verranno creati in %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "I file temporanei non verranno creati\n" - msgid "Press any key to continue..." msgstr "Premi un tasto per continuare..." @@ -4731,3 +4713,24 @@ msgstr "Continuare dall'inizio?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Impossibile ricevere copia locale di /ftp://un.host/modificami.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s non è una directory\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "La directory %s non è di Vostra proprietà\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "" +#~ "Impossibile impostare correttamente i permessi per la directory %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "I file temporanei verranno creati in %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "I file temporanei non verranno creati\n" diff --git a/po/ja.po b/po/ja.po index 04d65e32fd..19c420a506 100644 --- a/po/ja.po +++ b/po/ja.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Takuro Onoue , 2021\n" "Language-Team: Japanese (http://app.transifex.com/mc/mc/language/ja/)\n" @@ -545,30 +545,12 @@ msgstr "ファイル取得中" msgid "Changes to file lost" msgstr "紛失したファイルに変更します" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s はディレクトリではありません\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "ディレクトリ %s はあなた所有のものではありません\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "ディレクトリ %s のパーミッションを正しく設定できません\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "テンポラリディレクトリ %s を作成できません: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "テンポラリファイルが %s 上に作成されます\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "テンポラリファイルは作成されません\n" - msgid "Press any key to continue..." msgstr "なにかキーを押せば続行します..." @@ -4497,3 +4479,23 @@ msgstr "初めから続けますか?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s はディレクトリではありません\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "ディレクトリ %s はあなた所有のものではありません\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "ディレクトリ %s のパーミッションを正しく設定できません\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "テンポラリファイルが %s 上に作成されます\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "テンポラリファイルは作成されません\n" diff --git a/po/ka.po b/po/ka.po index 0c46c86e48..e56095f658 100644 --- a/po/ka.po +++ b/po/ka.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Temuri Doghonadze , 2022\n" "Language-Team: Georgian (http://app.transifex.com/mc/mc/language/ka/)\n" @@ -538,30 +538,12 @@ msgstr "ფაილის მიღება" msgid "Changes to file lost" msgstr "ფაილის ცვლილებები დაიკარგა" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s საქაღალდე არაა\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "%s-ის მფლობელი არ ბრძანდებით\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "დროებითი საქაღალდის (%s) შექმნა შეუძლებელია: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "დროებითი ფაილები %s-ში შეიქმნება\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "დროებითი ფალების შექმნის შეცდომა\n" - msgid "Press any key to continue..." msgstr "გასაგრძელებლად დააჭირეთ ნებისმიერ ღილაკს..." @@ -4460,3 +4442,19 @@ msgstr "თავიდან დავიწყო?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s საქაღალდე არაა\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "%s-ის მფლობელი არ ბრძანდებით\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "დროებითი ფაილები %s-ში შეიქმნება\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "დროებითი ფალების შექმნის შეცდომა\n" diff --git a/po/kk.po b/po/kk.po index 7fc2f426f7..7092bd22c9 100644 --- a/po/kk.po +++ b/po/kk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Aidos Kakimzhanov , 2016\n" "Language-Team: Kazakh (http://app.transifex.com/mc/mc/language/kk/)\n" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/ko.po b/po/ko.po index 25ca80f10d..c0aaeead06 100644 --- a/po/ko.po +++ b/po/ko.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Seong-ho Cho , 2023\n" "Language-Team: Korean (http://app.transifex.com/mc/mc/language/ko/)\n" @@ -565,30 +565,12 @@ msgstr "파일 받는중" msgid "Changes to file lost" msgstr "파일 변경 내용 손실" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s은(는) 디렉터리가 아님\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "%s 디렉터리가 사용자의 소유가 아님\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "%s 디렉터리에 대한 올바른 사용 권한을 설정할 수 없음\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "%s 임시 디렉터리를 생성할 수 없음: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "%s에 임시 파일이 생성됨\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "임시 파일이 생성되지 않음\n" - msgid "Press any key to continue..." msgstr "계속하려면 아무 키나 누르십시오..." @@ -4740,3 +4722,23 @@ msgstr "처음부터 계속하시겠습니까?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "/ftp://some.host/editme.txt의 로컬 복사본을 가져올 수 없음" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s은(는) 디렉터리가 아님\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "%s 디렉터리가 사용자의 소유가 아님\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "%s 디렉터리에 대한 올바른 사용 권한을 설정할 수 없음\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "%s에 임시 파일이 생성됨\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "임시 파일이 생성되지 않음\n" diff --git a/po/kw.po b/po/kw.po index 936320614d..30ca7e32cb 100644 --- a/po/kw.po +++ b/po/kw.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Cornish (http://app.transifex.com/mc/mc/language/kw/)\n" @@ -537,27 +537,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/lt.po b/po/lt.po index d3ce9cbedf..74b6891294 100644 --- a/po/lt.po +++ b/po/lt.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Mantas Kriaučiūnas Baltix , 2020\n" "Language-Team: Lithuanian (http://app.transifex.com/mc/mc/language/lt/)\n" @@ -560,30 +560,12 @@ msgstr "Parsiunčiamas failas" msgid "Changes to file lost" msgstr "Failo pakeitimai prarasti" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s nėra aplankas\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Aplankas %s jums nepriklauso\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr " Nepavyko nustatyti reikiamų teisių aplankui %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Nepavyko sukurti laikino aplanko %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Laikinieji failai bus talpinami aplanke %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Laikinieji failai nebus kuriami\n" - msgid "Press any key to continue..." msgstr "Paspauskite bet kurį klavišą..." @@ -4592,3 +4574,23 @@ msgstr "Tęsti nuo pradžios?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s nėra aplankas\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Aplankas %s jums nepriklauso\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr " Nepavyko nustatyti reikiamų teisių aplankui %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Laikinieji failai bus talpinami aplanke %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Laikinieji failai nebus kuriami\n" diff --git a/po/lv.po b/po/lv.po index aea0ff5e62..46fe13caf2 100644 --- a/po/lv.po +++ b/po/lv.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Latvian (http://app.transifex.com/mc/mc/language/lv/)\n" @@ -535,27 +535,9 @@ msgid "Changes to file lost" msgstr "Izmaiņas failā pazudušas" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/mc.pot b/po/mc.pot index 4197ab3a01..36d50208dd 100644 --- a/po/mc.pot +++ b/po/mc.pot @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: mc 4.8.31-63-g2a45e3bcb\n" +"Project-Id-Version: mc 4.8.31-124-gb3c6bea51\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -76,12 +76,12 @@ msgstr "" msgid "&Ignore lock" msgstr "" -#: lib/mcconfig/paths.c:110 +#: lib/mcconfig/paths.c:109 #, c-format msgid "Cannot create %s directory" msgstr "" -#: lib/mcconfig/paths.c:130 +#: lib/mcconfig/paths.c:129 msgid "FATAL: not a directory:" msgstr "" @@ -123,15 +123,15 @@ msgstr "" msgid "Invalid token number %d" msgstr "" -#: lib/search/regex.c:338 lib/search/regex.c:836 src/filemanager/ext.c:775 +#: lib/search/regex.c:337 lib/search/regex.c:834 src/filemanager/ext.c:775 msgid "Regular expression error" msgstr "" -#: lib/search/search.c:55 src/diffviewer/ydiff.c:2346 tmp/ydiff.c:2403 +#: lib/search/search.c:55 src/diffviewer/ydiff.c:2345 tmp/ydiff.c:2403 msgid "No&rmal" msgstr "" -#: lib/search/search.c:56 src/filemanager/find.c:597 +#: lib/search/search.c:56 src/filemanager/find.c:605 msgid "Re&gular expression" msgstr "" @@ -595,38 +595,38 @@ msgid "" "Cannot configure read end of SIGWINCH pipe: %s (%d)\n" msgstr "" -#: lib/tty/tty-slang.c:298 +#: lib/tty/tty-slang.c:297 #, c-format msgid "" "Screen size %dx%d is not supported.\n" "Check the TERM environment variable.\n" msgstr "" -#: lib/util.c:355 +#: lib/util.c:351 msgid "B" msgstr "" -#: lib/util.c:360 +#: lib/util.c:356 msgid "kB" msgstr "" -#: lib/util.c:360 +#: lib/util.c:356 msgid "KiB" msgstr "" -#: lib/util.c:365 +#: lib/util.c:361 msgid "MB" msgstr "" -#: lib/util.c:365 +#: lib/util.c:361 msgid "MiB" msgstr "" -#: lib/util.c:370 +#: lib/util.c:366 msgid "GB" msgstr "" -#: lib/util.c:370 +#: lib/util.c:366 msgid "GiB" msgstr "" @@ -683,37 +683,14 @@ msgstr "" msgid "Changes to file lost" msgstr "" -#: lib/vfs/interface.c:809 +#: lib/vfs/interface.c:798 #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#: lib/vfs/interface.c:811 -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#: lib/vfs/interface.c:813 -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#: lib/vfs/interface.c:818 -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#: lib/vfs/interface.c:852 -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#: lib/vfs/interface.c:858 -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" -#: lib/vfs/interface.c:863 src/execute.c:339 +#: lib/vfs/interface.c:802 src/execute.c:339 msgid "Press any key to continue..." msgstr "" @@ -750,13 +727,13 @@ msgstr "" msgid "Do you want clean this history?" msgstr "" -#: lib/widget/listbox.c:325 src/diffviewer/ydiff.c:3006 src/editor/edit.c:375 -#: src/editor/editcmd.c:180 src/editor/editcmd.c:203 src/editor/editcmd.c:1486 -#: src/editor/editcmd.c:1492 src/filemanager/cmd.c:145 +#: lib/widget/listbox.c:325 src/diffviewer/ydiff.c:3005 src/editor/edit.c:374 +#: src/editor/editcmd.c:180 src/editor/editcmd.c:203 src/editor/editcmd.c:1485 +#: src/editor/editcmd.c:1491 src/filemanager/cmd.c:145 #: src/filemanager/file.c:1005 src/filemanager/file.c:2013 -#: src/filemanager/filegui.c:481 src/filemanager/filemanager.c:1048 -#: src/filemanager/filemanager.c:1056 src/filemanager/hotlist.c:1164 -#: src/filemanager/hotlist.c:1181 src/filemanager/panel.c:2961 +#: src/filemanager/filegui.c:478 src/filemanager/filemanager.c:1048 +#: src/filemanager/filemanager.c:1056 src/filemanager/hotlist.c:1156 +#: src/filemanager/hotlist.c:1173 src/filemanager/panel.c:2963 #: src/filemanager/tree.c:826 src/subshell/common.c:1653 #: src/vfs/sftpfs/connection.c:562 src/vfs/sftpfs/connection.c:574 #: src/viewer/actions_cmd.c:634 src/viewer/actions_cmd.c:640 @@ -764,13 +741,13 @@ msgstr "" msgid "&Yes" msgstr "" -#: lib/widget/listbox.c:325 src/diffviewer/ydiff.c:3006 src/editor/edit.c:375 -#: src/editor/editcmd.c:180 src/editor/editcmd.c:1486 src/editor/editcmd.c:1492 +#: lib/widget/listbox.c:325 src/diffviewer/ydiff.c:3005 src/editor/edit.c:374 +#: src/editor/editcmd.c:180 src/editor/editcmd.c:1485 src/editor/editcmd.c:1491 #: src/filemanager/cmd.c:145 src/filemanager/file.c:1005 -#: src/filemanager/file.c:2013 src/filemanager/filegui.c:483 +#: src/filemanager/file.c:2013 src/filemanager/filegui.c:480 #: src/filemanager/filemanager.c:1048 src/filemanager/filemanager.c:1056 -#: src/filemanager/hotlist.c:1164 src/filemanager/hotlist.c:1181 -#: src/filemanager/panel.c:2961 src/filemanager/tree.c:826 +#: src/filemanager/hotlist.c:1156 src/filemanager/hotlist.c:1173 +#: src/filemanager/panel.c:2963 src/filemanager/tree.c:826 #: src/subshell/common.c:1653 src/vfs/sftpfs/connection.c:562 #: src/vfs/sftpfs/connection.c:574 src/viewer/actions_cmd.c:634 #: src/viewer/actions_cmd.c:640 src/viewer/search.c:453 tmp/ydiff.c:3068 @@ -779,25 +756,25 @@ msgstr "" #: lib/widget/quick.h:213 src/editor/editsearch.c:105 #: src/editor/editsearch.c:1014 src/editor/editwidget.c:156 -#: src/filemanager/boxes.c:1294 src/filemanager/filegui.c:1387 -#: src/filemanager/find.c:605 src/filemanager/layout.c:511 src/main.c:418 +#: src/filemanager/boxes.c:1292 src/filemanager/filegui.c:1380 +#: src/filemanager/find.c:613 src/filemanager/layout.c:509 src/main.c:425 msgid "&OK" msgstr "" #: lib/widget/quick.h:214 src/editor/editcmd.c:180 src/editor/editcmd.c:203 -#: src/editor/editcmd.c:377 src/editor/editcmd.c:519 src/editor/editcmd.c:955 -#: src/editor/editcmd.c:1032 src/editor/editcmd.c:1486 -#: src/editor/editcmd.c:1982 src/editor/editcmd.c:2010 +#: src/editor/editcmd.c:377 src/editor/editcmd.c:519 src/editor/editcmd.c:954 +#: src/editor/editcmd.c:1031 src/editor/editcmd.c:1485 +#: src/editor/editcmd.c:1981 src/editor/editcmd.c:2009 #: src/editor/editsearch.c:107 src/editor/editsearch.c:252 -#: src/editor/etags.c:375 src/editor/spell.c:750 src/filemanager/achown.c:89 -#: src/filemanager/achown.c:863 src/filemanager/achown.c:900 -#: src/filemanager/chattr.c:235 src/filemanager/chattr.c:1124 -#: src/filemanager/chmod.c:117 src/filemanager/chmod.c:442 -#: src/filemanager/chown.c:88 src/filemanager/chown.c:314 -#: src/filemanager/cmd.c:1033 src/filemanager/filegui.c:1391 -#: src/filemanager/find.c:605 src/filemanager/hotlist.c:185 -#: src/filemanager/hotlist.c:1018 src/filemanager/hotlist.c:1081 -#: src/filemanager/layout.c:512 src/filemanager/panelize.c:172 src/learn.c:260 +#: src/editor/etags.c:374 src/editor/spell.c:362 src/filemanager/achown.c:88 +#: src/filemanager/achown.c:862 src/filemanager/achown.c:899 +#: src/filemanager/chattr.c:233 src/filemanager/chattr.c:1122 +#: src/filemanager/chmod.c:115 src/filemanager/chmod.c:440 +#: src/filemanager/chown.c:87 src/filemanager/chown.c:312 +#: src/filemanager/cmd.c:1033 src/filemanager/filegui.c:1384 +#: src/filemanager/find.c:613 src/filemanager/hotlist.c:184 +#: src/filemanager/hotlist.c:1010 src/filemanager/hotlist.c:1073 +#: src/filemanager/layout.c:510 src/filemanager/panelize.c:171 src/learn.c:260 #: src/viewer/hex.c:430 msgid "&Cancel" msgstr "" @@ -806,11 +783,11 @@ msgstr "" msgid "Background process:" msgstr "" -#: lib/widget/wtools.c:295 lib/widget/wtools.c:424 src/editor/edit.c:210 -#: src/editor/edit.c:231 src/editor/edit.c:387 src/editor/edit.c:2022 -#: src/editor/edit.c:2032 src/editor/editcmd.c:267 src/editor/editcmd.c:277 -#: src/editor/editcmd.c:320 src/editor/editcmd.c:1590 src/editor/spell.c:325 -#: src/editor/spell.c:545 src/editor/spell.c:553 +#: lib/widget/wtools.c:295 lib/widget/wtools.c:424 src/editor/edit.c:209 +#: src/editor/edit.c:230 src/editor/edit.c:386 src/editor/edit.c:2021 +#: src/editor/edit.c:2031 src/editor/editcmd.c:267 src/editor/editcmd.c:277 +#: src/editor/editcmd.c:320 src/editor/editcmd.c:1589 src/editor/spell.c:428 +#: src/editor/spell.c:436 src/editor/spell.c:561 #: tests/src/execute__common.c:150 #: tests/src/execute__execute_with_vfs_arg.c:152 msgid "Error" @@ -823,8 +800,8 @@ msgstr "" #: lib/widget/wtools.c:704 src/filemanager/file.c:884 #: src/filemanager/file.c:958 src/filemanager/file.c:960 -#: src/filemanager/file.c:1006 src/filemanager/file.c:3308 -#: src/filemanager/filegui.c:256 src/filemanager/filegui.c:505 +#: src/filemanager/file.c:1006 src/filemanager/file.c:3310 +#: src/filemanager/filegui.c:254 src/filemanager/filegui.c:502 msgid "&Abort" msgstr "" @@ -1007,27 +984,27 @@ msgstr "" msgid "GNU Midnight Commander %s\n" msgstr "" -#: src/args.c:641 src/filemanager/boxes.c:694 +#: src/args.c:639 src/filemanager/boxes.c:693 msgid "Main options" msgstr "" -#: src/args.c:647 src/args.c:648 +#: src/args.c:645 src/args.c:646 msgid "Terminal options" msgstr "" -#: src/args.c:663 +#: src/args.c:661 msgid "Arguments parse error!" msgstr "" -#: src/args.c:771 +#: src/args.c:769 msgid "MC is built without builtin editor." msgstr "" -#: src/args.c:778 +#: src/args.c:776 msgid "No arguments given to the viewer." msgstr "" -#: src/args.c:790 +#: src/args.c:788 msgid "Two files are required to invoke the diffviewer." msgstr "" @@ -1069,8 +1046,8 @@ msgid "Enter search string:" msgstr "" #: src/diffviewer/search.c:95 src/editor/editsearch.c:96 -#: src/editor/editsearch.c:179 src/filemanager/boxes.c:687 -#: src/filemanager/boxes.c:894 src/filemanager/find.c:591 +#: src/editor/editsearch.c:179 src/filemanager/boxes.c:686 +#: src/filemanager/boxes.c:893 src/filemanager/find.c:599 #: src/viewer/dialogs.c:89 msgid "Cas&e sensitive" msgstr "" @@ -1081,13 +1058,13 @@ msgid "&Backwards" msgstr "" #: src/diffviewer/search.c:97 src/editor/editsearch.c:99 -#: src/editor/editsearch.c:182 src/filemanager/find.c:602 +#: src/editor/editsearch.c:182 src/filemanager/find.c:610 #: src/viewer/dialogs.c:91 msgid "&Whole words" msgstr "" #: src/diffviewer/search.c:99 src/editor/editsearch.c:101 -#: src/editor/editsearch.c:184 src/filemanager/find.c:589 +#: src/editor/editsearch.c:184 src/filemanager/find.c:597 #: src/viewer/dialogs.c:93 msgid "&All charsets" msgstr "" @@ -1113,7 +1090,7 @@ msgid "" "%s" msgstr "" -#: src/diffviewer/ydiff.c:2142 tmp/ydiff.c:2199 +#: src/diffviewer/ydiff.c:2141 tmp/ydiff.c:2199 #, c-format msgid "" "Cannot create backup file\n" @@ -1121,136 +1098,136 @@ msgid "" "%s" msgstr "" -#: src/diffviewer/ydiff.c:2151 tmp/ydiff.c:2208 +#: src/diffviewer/ydiff.c:2150 tmp/ydiff.c:2208 #, c-format msgid "" "Cannot create temporary merge file\n" "%s" msgstr "" -#: src/diffviewer/ydiff.c:2347 tmp/ydiff.c:2404 +#: src/diffviewer/ydiff.c:2346 tmp/ydiff.c:2404 msgid "&Fastest (Assume large files)" msgstr "" -#: src/diffviewer/ydiff.c:2348 tmp/ydiff.c:2405 +#: src/diffviewer/ydiff.c:2347 tmp/ydiff.c:2405 msgid "&Minimal (Find a smaller set of change)" msgstr "" -#: src/diffviewer/ydiff.c:2353 tmp/ydiff.c:2410 +#: src/diffviewer/ydiff.c:2352 tmp/ydiff.c:2410 msgid "Diff algorithm" msgstr "" -#: src/diffviewer/ydiff.c:2356 tmp/ydiff.c:2413 +#: src/diffviewer/ydiff.c:2355 tmp/ydiff.c:2413 msgid "Diff extra options" msgstr "" -#: src/diffviewer/ydiff.c:2357 tmp/ydiff.c:2414 +#: src/diffviewer/ydiff.c:2356 tmp/ydiff.c:2414 msgid "&Ignore case" msgstr "" -#: src/diffviewer/ydiff.c:2358 tmp/ydiff.c:2415 +#: src/diffviewer/ydiff.c:2357 tmp/ydiff.c:2415 msgid "Ignore tab &expansion" msgstr "" -#: src/diffviewer/ydiff.c:2359 tmp/ydiff.c:2416 +#: src/diffviewer/ydiff.c:2358 tmp/ydiff.c:2416 msgid "Ignore &space change" msgstr "" -#: src/diffviewer/ydiff.c:2360 tmp/ydiff.c:2417 +#: src/diffviewer/ydiff.c:2359 tmp/ydiff.c:2417 msgid "Ignore all &whitespace" msgstr "" -#: src/diffviewer/ydiff.c:2361 tmp/ydiff.c:2418 +#: src/diffviewer/ydiff.c:2360 tmp/ydiff.c:2418 msgid "Strip &trailing carriage return" msgstr "" -#: src/diffviewer/ydiff.c:2372 tmp/ydiff.c:2429 +#: src/diffviewer/ydiff.c:2371 tmp/ydiff.c:2429 msgid "Diff Options" msgstr "" -#: src/diffviewer/ydiff.c:2869 tmp/ydiff.c:2931 +#: src/diffviewer/ydiff.c:2868 tmp/ydiff.c:2931 msgid "Edit" msgstr "" -#: src/diffviewer/ydiff.c:2869 tmp/ydiff.c:2931 +#: src/diffviewer/ydiff.c:2868 tmp/ydiff.c:2931 msgid "Edit is disabled" msgstr "" -#: src/diffviewer/ydiff.c:2903 tmp/ydiff.c:2965 +#: src/diffviewer/ydiff.c:2902 tmp/ydiff.c:2965 msgid "Goto line (left)" msgstr "" -#: src/diffviewer/ydiff.c:2904 tmp/ydiff.c:2966 +#: src/diffviewer/ydiff.c:2903 tmp/ydiff.c:2966 msgid "Goto line (right)" msgstr "" -#: src/diffviewer/ydiff.c:2912 src/editor/editcmd.c:1673 tmp/ydiff.c:2974 +#: src/diffviewer/ydiff.c:2911 src/editor/editcmd.c:1672 tmp/ydiff.c:2974 msgid "Enter line:" msgstr "" -#: src/diffviewer/ydiff.c:2951 src/editor/editwidget.c:676 +#: src/diffviewer/ydiff.c:2950 src/editor/editwidget.c:676 #: src/filemanager/filemanager.c:1626 src/filemanager/tree.c:1176 #: src/help.c:1170 src/viewer/display.c:90 tmp/ydiff.c:3013 msgid "ButtonBar|Help" msgstr "" -#: src/diffviewer/ydiff.c:2952 src/editor/editwidget.c:677 +#: src/diffviewer/ydiff.c:2951 src/editor/editwidget.c:677 #: src/viewer/display.c:102 tmp/ydiff.c:3014 msgid "ButtonBar|Save" msgstr "" -#: src/diffviewer/ydiff.c:2953 src/filemanager/filemanager.c:1629 +#: src/diffviewer/ydiff.c:2952 src/filemanager/filemanager.c:1629 #: src/viewer/display.c:97 tmp/ydiff.c:3015 msgid "ButtonBar|Edit" msgstr "" -#: src/diffviewer/ydiff.c:2954 tmp/ydiff.c:3016 +#: src/diffviewer/ydiff.c:2953 tmp/ydiff.c:3016 msgid "ButtonBar|Merge" msgstr "" -#: src/diffviewer/ydiff.c:2955 src/editor/editwidget.c:682 +#: src/diffviewer/ydiff.c:2954 src/editor/editwidget.c:682 #: src/viewer/display.c:112 tmp/ydiff.c:3017 msgid "ButtonBar|Search" msgstr "" -#: src/diffviewer/ydiff.c:2956 tmp/ydiff.c:3018 +#: src/diffviewer/ydiff.c:2955 tmp/ydiff.c:3018 msgid "ButtonBar|Options" msgstr "" -#: src/diffviewer/ydiff.c:2957 src/editor/editwidget.c:685 +#: src/diffviewer/ydiff.c:2956 src/editor/editwidget.c:685 #: src/filemanager/filemanager.c:1635 src/help.c:1179 src/viewer/display.c:121 #: src/viewer/display.c:124 tmp/ydiff.c:3019 msgid "ButtonBar|Quit" msgstr "" -#: src/diffviewer/ydiff.c:3003 src/editor/editcmd.c:1492 +#: src/diffviewer/ydiff.c:3002 src/editor/editcmd.c:1491 #: src/viewer/actions_cmd.c:632 src/viewer/actions_cmd.c:638 tmp/ydiff.c:3065 msgid "Quit" msgstr "" -#: src/diffviewer/ydiff.c:3004 tmp/ydiff.c:3066 +#: src/diffviewer/ydiff.c:3003 tmp/ydiff.c:3066 msgid "File(s) was modified. Save with exit?" msgstr "" -#: src/diffviewer/ydiff.c:3005 tmp/ydiff.c:3067 +#: src/diffviewer/ydiff.c:3004 tmp/ydiff.c:3067 msgid "" "Midnight Commander is being shut down.\n" "Save modified file(s)?" msgstr "" -#: src/diffviewer/ydiff.c:3337 src/diffviewer/ydiff.c:3340 tmp/ydiff.c:3399 +#: src/diffviewer/ydiff.c:3336 src/diffviewer/ydiff.c:3339 tmp/ydiff.c:3399 #: tmp/ydiff.c:3402 msgid "Diff:" msgstr "" -#: src/diffviewer/ydiff.c:3468 src/diffviewer/ydiff.c:3478 -#: src/diffviewer/ydiff.c:3498 src/diffviewer/ydiff.c:3515 tmp/ydiff.c:3523 +#: src/diffviewer/ydiff.c:3467 src/diffviewer/ydiff.c:3477 +#: src/diffviewer/ydiff.c:3497 src/diffviewer/ydiff.c:3514 tmp/ydiff.c:3523 #: tmp/ydiff.c:3533 tmp/ydiff.c:3553 tmp/ydiff.c:3570 #, c-format msgid "\"%s\" is a directory" msgstr "" -#: src/diffviewer/ydiff.c:3504 src/diffviewer/ydiff.c:3521 +#: src/diffviewer/ydiff.c:3503 src/diffviewer/ydiff.c:3520 #: src/filemanager/file.c:1821 src/viewer/mcviewer.c:356 tmp/ydiff.c:3559 #: tmp/ydiff.c:3576 #, c-format @@ -1259,70 +1236,70 @@ msgid "" "%s" msgstr "" -#: src/diffviewer/ydiff.c:3530 tmp/ydiff.c:3585 +#: src/diffviewer/ydiff.c:3529 tmp/ydiff.c:3585 msgid "Diff viewer: invalid mode" msgstr "" -#: src/diffviewer/ydiff.c:3556 tmp/ydiff.c:3615 +#: src/diffviewer/ydiff.c:3555 tmp/ydiff.c:3615 msgid "Two files are needed to compare" msgstr "" -#: src/editor/edit.c:166 +#: src/editor/edit.c:165 #, c-format msgid "Loading: %3d%%" msgstr "" -#: src/editor/edit.c:169 +#: src/editor/edit.c:168 msgid "Loading..." msgstr "" -#: src/editor/edit.c:209 src/editor/edit.c:327 +#: src/editor/edit.c:208 src/editor/edit.c:326 #, c-format msgid "Cannot open %s for reading" msgstr "" -#: src/editor/edit.c:219 +#: src/editor/edit.c:218 msgid "Load file" msgstr "" -#: src/editor/edit.c:230 +#: src/editor/edit.c:229 #, c-format msgid "Error reading %s" msgstr "" -#: src/editor/edit.c:339 +#: src/editor/edit.c:338 #, c-format msgid "Cannot get size/permissions for %s" msgstr "" -#: src/editor/edit.c:348 +#: src/editor/edit.c:347 #, c-format msgid "\"%s\" is not a regular file" msgstr "" -#: src/editor/edit.c:373 +#: src/editor/edit.c:372 #, c-format msgid "" "File \"%s\" is too large.\n" "Open it anyway?" msgstr "" -#: src/editor/edit.c:375 src/editor/editcmd.c:178 src/editor/editcmd.c:201 -#: src/editor/editcmd.c:375 src/editor/editcmd.c:517 src/editor/editcmd.c:954 -#: src/editor/editcmd.c:1979 src/editor/editcmd.c:2007 src/editor/etags.c:373 -#: src/execute.c:137 src/filemanager/ext.c:792 src/filemanager/file.c:2526 -#: src/filemanager/panel.c:4708 src/help.c:365 src/main.c:415 +#: src/editor/edit.c:374 src/editor/editcmd.c:178 src/editor/editcmd.c:201 +#: src/editor/editcmd.c:375 src/editor/editcmd.c:517 src/editor/editcmd.c:953 +#: src/editor/editcmd.c:1978 src/editor/editcmd.c:2006 src/editor/etags.c:372 +#: src/execute.c:137 src/filemanager/ext.c:792 src/filemanager/file.c:2528 +#: src/filemanager/panel.c:4710 src/help.c:365 src/main.c:422 #: src/subshell/common.c:1651 src/vfs/sftpfs/connection.c:562 #: src/viewer/actions_cmd.c:434 msgid "Warning" msgstr "" -#: src/editor/edit.c:2021 +#: src/editor/edit.c:2020 #, c-format msgid "Error reading from pipe: %s" msgstr "" -#: src/editor/edit.c:2031 +#: src/editor/edit.c:2030 #, c-format msgid "Cannot open pipe for reading: %s" msgstr "" @@ -1354,8 +1331,8 @@ msgstr "" msgid "The file you are saving does not end with a newline." msgstr "" -#: src/editor/editcmd.c:377 src/editor/editcmd.c:519 src/editor/editcmd.c:1981 -#: src/editor/editcmd.c:2009 src/editor/etags.c:375 +#: src/editor/editcmd.c:377 src/editor/editcmd.c:519 src/editor/editcmd.c:1980 +#: src/editor/editcmd.c:2008 src/editor/etags.c:374 msgid "C&ontinue" msgstr "" @@ -1375,8 +1352,8 @@ msgstr "" msgid "&Macintosh format (CR)" msgstr "" -#: src/editor/editcmd.c:398 src/editor/editcmd.c:1054 src/editor/editcmd.c:1714 -#: src/editor/editcmd.c:1745 src/filemanager/cmd.c:739 +#: src/editor/editcmd.c:398 src/editor/editcmd.c:1053 src/editor/editcmd.c:1713 +#: src/editor/editcmd.c:1744 src/filemanager/cmd.c:739 msgid "Enter file name:" msgstr "" @@ -1388,228 +1365,228 @@ msgstr "" msgid "Save As" msgstr "" -#: src/editor/editcmd.c:853 +#: src/editor/editcmd.c:852 msgid "&Quick save" msgstr "" -#: src/editor/editcmd.c:854 +#: src/editor/editcmd.c:853 msgid "&Safe save" msgstr "" -#: src/editor/editcmd.c:855 +#: src/editor/editcmd.c:854 msgid "&Do backups with following extension:" msgstr "" -#: src/editor/editcmd.c:874 +#: src/editor/editcmd.c:873 msgid "Check &POSIX new line" msgstr "" -#: src/editor/editcmd.c:883 +#: src/editor/editcmd.c:882 msgid "Edit Save Mode" msgstr "" -#: src/editor/editcmd.c:937 src/editor/editcmd.c:996 +#: src/editor/editcmd.c:936 src/editor/editcmd.c:995 msgid "Save as" msgstr "" -#: src/editor/editcmd.c:939 +#: src/editor/editcmd.c:938 msgid "Cannot save: destination is not a regular file" msgstr "" -#: src/editor/editcmd.c:955 +#: src/editor/editcmd.c:954 msgid "A file already exists with this name" msgstr "" -#: src/editor/editcmd.c:955 +#: src/editor/editcmd.c:954 msgid "&Overwrite" msgstr "" -#: src/editor/editcmd.c:996 src/editor/editcmd.c:1724 +#: src/editor/editcmd.c:995 src/editor/editcmd.c:1723 msgid "Cannot save file" msgstr "" -#: src/editor/editcmd.c:1030 +#: src/editor/editcmd.c:1029 #, c-format msgid "Confirm save file: \"%s\"" msgstr "" -#: src/editor/editcmd.c:1032 src/viewer/hex.c:418 src/viewer/hex.c:430 +#: src/editor/editcmd.c:1031 src/viewer/hex.c:418 src/viewer/hex.c:430 msgid "Save file" msgstr "" -#: src/editor/editcmd.c:1032 src/editor/editmenu.c:78 src/learn.c:194 +#: src/editor/editcmd.c:1031 src/editor/editmenu.c:78 src/learn.c:194 #: src/learn.c:259 msgid "&Save" msgstr "" -#: src/editor/editcmd.c:1054 +#: src/editor/editcmd.c:1053 msgid "Load" msgstr "" -#: src/editor/editcmd.c:1142 +#: src/editor/editcmd.c:1141 msgid "Syntax file edit" msgstr "" -#: src/editor/editcmd.c:1143 +#: src/editor/editcmd.c:1142 msgid "Which syntax file you want to edit?" msgstr "" -#: src/editor/editcmd.c:1144 src/editor/editcmd.c:1195 +#: src/editor/editcmd.c:1143 src/editor/editcmd.c:1194 #: src/filemanager/cmd.c:838 src/filemanager/cmd.c:879 #: src/filemanager/cmd.c:937 msgid "&User" msgstr "" -#: src/editor/editcmd.c:1144 src/editor/editcmd.c:1195 +#: src/editor/editcmd.c:1143 src/editor/editcmd.c:1194 msgid "&System wide" msgstr "" -#: src/editor/editcmd.c:1193 src/filemanager/cmd.c:877 +#: src/editor/editcmd.c:1192 src/filemanager/cmd.c:877 msgid "Menu edit" msgstr "" -#: src/editor/editcmd.c:1194 src/filemanager/cmd.c:878 +#: src/editor/editcmd.c:1193 src/filemanager/cmd.c:878 msgid "Which menu file do you want to edit?" msgstr "" -#: src/editor/editcmd.c:1195 src/filemanager/cmd.c:879 +#: src/editor/editcmd.c:1194 src/filemanager/cmd.c:879 msgid "&Local" msgstr "" -#: src/editor/editcmd.c:1467 src/editor/editwidget.c:387 +#: src/editor/editcmd.c:1466 src/editor/editwidget.c:387 msgid "[NoName]" msgstr "" -#: src/editor/editcmd.c:1485 +#: src/editor/editcmd.c:1484 #, c-format msgid "" "File %s was modified.\n" "Save before close?" msgstr "" -#: src/editor/editcmd.c:1486 +#: src/editor/editcmd.c:1485 msgid "Close file" msgstr "" -#: src/editor/editcmd.c:1490 +#: src/editor/editcmd.c:1489 #, c-format msgid "" "Midnight Commander is being shut down.\n" "Save modified file %s?" msgstr "" -#: src/editor/editcmd.c:1590 +#: src/editor/editcmd.c:1589 msgid "This function is not implemented" msgstr "" -#: src/editor/editcmd.c:1605 +#: src/editor/editcmd.c:1604 msgid "Copy to clipboard" msgstr "" -#: src/editor/editcmd.c:1605 src/editor/editcmd.c:1629 +#: src/editor/editcmd.c:1604 src/editor/editcmd.c:1628 msgid "Unable to save to file" msgstr "" -#: src/editor/editcmd.c:1629 +#: src/editor/editcmd.c:1628 msgid "Cut to clipboard" msgstr "" -#: src/editor/editcmd.c:1673 +#: src/editor/editcmd.c:1672 msgid "Goto line" msgstr "" -#: src/editor/editcmd.c:1714 src/editor/editcmd.c:1724 +#: src/editor/editcmd.c:1713 src/editor/editcmd.c:1723 msgid "Save block" msgstr "" -#: src/editor/editcmd.c:1745 src/editor/editcmd.c:1760 +#: src/editor/editcmd.c:1744 src/editor/editcmd.c:1759 msgid "Insert file" msgstr "" -#: src/editor/editcmd.c:1760 +#: src/editor/editcmd.c:1759 msgid "Cannot insert file" msgstr "" -#: src/editor/editcmd.c:1781 +#: src/editor/editcmd.c:1780 msgid "Sort block" msgstr "" -#: src/editor/editcmd.c:1781 +#: src/editor/editcmd.c:1780 msgid "You must first highlight a block of text" msgstr "" -#: src/editor/editcmd.c:1789 +#: src/editor/editcmd.c:1788 msgid "Run sort" msgstr "" -#: src/editor/editcmd.c:1790 +#: src/editor/editcmd.c:1789 msgid "Enter sort options (see sort(1) manpage) separated by whitespace:" msgstr "" -#: src/editor/editcmd.c:1810 src/editor/editcmd.c:1817 +#: src/editor/editcmd.c:1809 src/editor/editcmd.c:1816 msgid "Sort" msgstr "" -#: src/editor/editcmd.c:1810 +#: src/editor/editcmd.c:1809 msgid "Cannot execute sort command" msgstr "" -#: src/editor/editcmd.c:1816 +#: src/editor/editcmd.c:1815 #, c-format msgid "Sort returned non-zero: %s" msgstr "" -#: src/editor/editcmd.c:1853 +#: src/editor/editcmd.c:1852 msgid "Paste output of external command" msgstr "" -#: src/editor/editcmd.c:1854 +#: src/editor/editcmd.c:1853 msgid "Enter shell command(s):" msgstr "" -#: src/editor/editcmd.c:1871 +#: src/editor/editcmd.c:1870 msgid "External command" msgstr "" -#: src/editor/editcmd.c:1871 +#: src/editor/editcmd.c:1870 msgid "Cannot execute command" msgstr "" -#: src/editor/editcmd.c:1916 +#: src/editor/editcmd.c:1915 msgid "mail -s -c " msgstr "" -#: src/editor/editcmd.c:1917 +#: src/editor/editcmd.c:1916 msgid "To" msgstr "" -#: src/editor/editcmd.c:1920 +#: src/editor/editcmd.c:1919 msgid "Subject" msgstr "" -#: src/editor/editcmd.c:1923 +#: src/editor/editcmd.c:1922 msgid "Copies to" msgstr "" -#: src/editor/editcmd.c:1934 +#: src/editor/editcmd.c:1933 msgid "Mail" msgstr "" -#: src/editor/editcmd.c:1968 +#: src/editor/editcmd.c:1967 msgid "Insert literal" msgstr "" -#: src/editor/editcmd.c:1969 +#: src/editor/editcmd.c:1968 msgid "Press any key:" msgstr "" -#: src/editor/editcmd.c:1980 src/editor/editcmd.c:2008 src/editor/etags.c:374 +#: src/editor/editcmd.c:1979 src/editor/editcmd.c:2007 src/editor/etags.c:373 msgid "" "Current text was modified without a file save.\n" "Continue discards these changes." msgstr "" -#: src/editor/editcmd.c:2060 +#: src/editor/editcmd.c:2059 msgid "Cancel" msgstr "" @@ -1685,7 +1662,7 @@ msgstr "" msgid "A&bout..." msgstr "" -#: src/editor/editmenu.c:88 src/filemanager/find.c:194 src/main.c:418 +#: src/editor/editmenu.c:88 src/filemanager/find.c:194 src/main.c:425 msgid "&Quit" msgstr "" @@ -1725,8 +1702,8 @@ msgstr "" msgid "Mo&ve" msgstr "" -#: src/editor/editmenu.c:112 src/filemanager/file.c:2776 -#: src/filemanager/file.c:2832 src/filemanager/filemanager.c:251 +#: src/editor/editmenu.c:112 src/filemanager/file.c:2778 +#: src/filemanager/file.c:2834 src/filemanager/filemanager.c:251 msgid "&Delete" msgstr "" @@ -1866,7 +1843,7 @@ msgstr "" msgid "&External formatter" msgstr "" -#: src/editor/editmenu.c:223 src/filemanager/hotlist.c:197 +#: src/editor/editmenu.c:223 src/filemanager/hotlist.c:196 msgid "&Move" msgstr "" @@ -1982,8 +1959,8 @@ msgstr "" msgid "Tab spacing:" msgstr "" -#: src/editor/editoptions.c:167 src/filemanager/boxes.c:571 -#: src/filemanager/layout.c:504 +#: src/editor/editoptions.c:167 src/filemanager/boxes.c:570 +#: src/filemanager/layout.c:502 msgid "Other options" msgstr "" @@ -2056,19 +2033,19 @@ msgstr "" msgid "Replace with:" msgstr "" -#: src/editor/editsearch.c:249 src/editor/spell.c:746 +#: src/editor/editsearch.c:249 src/editor/spell.c:358 msgid "&Replace" msgstr "" #: src/editor/editsearch.c:250 src/filemanager/file.c:1005 -#: src/filemanager/filegui.c:494 +#: src/filemanager/filegui.c:491 msgid "A&ll" msgstr "" -#: src/editor/editsearch.c:251 src/editor/spell.c:748 +#: src/editor/editsearch.c:251 src/editor/spell.c:360 #: src/filemanager/file.c:884 src/filemanager/file.c:957 -#: src/filemanager/file.c:960 src/filemanager/file.c:3309 -#: src/filemanager/filegui.c:253 +#: src/filemanager/file.c:960 src/filemanager/file.c:3311 +#: src/filemanager/filegui.c:251 msgid "&Skip" msgstr "" @@ -2081,7 +2058,7 @@ msgstr "" msgid "Searching %s: %3d%%" msgstr "" -#: src/editor/editsearch.c:753 src/filemanager/find.c:1358 +#: src/editor/editsearch.c:753 src/filemanager/find.c:1362 #: src/viewer/search.c:98 #, c-format msgid "Searching %s" @@ -2139,123 +2116,123 @@ msgstr "" msgid "ButtonBar|PullDn" msgstr "" -#: src/editor/spell.c:108 +#: src/editor/spell.c:110 msgid "Breton" msgstr "" -#: src/editor/spell.c:109 +#: src/editor/spell.c:111 msgid "Czech" msgstr "" -#: src/editor/spell.c:110 +#: src/editor/spell.c:112 msgid "Welsh" msgstr "" -#: src/editor/spell.c:111 +#: src/editor/spell.c:113 msgid "Danish" msgstr "" -#: src/editor/spell.c:112 +#: src/editor/spell.c:114 msgid "German" msgstr "" -#: src/editor/spell.c:113 +#: src/editor/spell.c:115 msgid "Greek" msgstr "" -#: src/editor/spell.c:114 +#: src/editor/spell.c:116 msgid "English" msgstr "" -#: src/editor/spell.c:115 +#: src/editor/spell.c:117 msgid "British English" msgstr "" -#: src/editor/spell.c:116 +#: src/editor/spell.c:118 msgid "Canadian English" msgstr "" -#: src/editor/spell.c:117 +#: src/editor/spell.c:119 msgid "American English" msgstr "" -#: src/editor/spell.c:118 +#: src/editor/spell.c:120 msgid "Esperanto" msgstr "" -#: src/editor/spell.c:119 +#: src/editor/spell.c:121 msgid "Spanish" msgstr "" -#: src/editor/spell.c:120 +#: src/editor/spell.c:122 msgid "Faroese" msgstr "" -#: src/editor/spell.c:121 +#: src/editor/spell.c:123 msgid "French" msgstr "" -#: src/editor/spell.c:122 +#: src/editor/spell.c:124 msgid "Italian" msgstr "" -#: src/editor/spell.c:123 +#: src/editor/spell.c:125 msgid "Dutch" msgstr "" -#: src/editor/spell.c:124 +#: src/editor/spell.c:126 msgid "Norwegian" msgstr "" -#: src/editor/spell.c:125 +#: src/editor/spell.c:127 msgid "Polish" msgstr "" -#: src/editor/spell.c:126 +#: src/editor/spell.c:128 msgid "Portuguese" msgstr "" -#: src/editor/spell.c:127 +#: src/editor/spell.c:129 msgid "Romanian" msgstr "" -#: src/editor/spell.c:128 +#: src/editor/spell.c:130 msgid "Russian" msgstr "" -#: src/editor/spell.c:129 +#: src/editor/spell.c:131 msgid "Slovak" msgstr "" -#: src/editor/spell.c:130 +#: src/editor/spell.c:132 msgid "Swedish" msgstr "" -#: src/editor/spell.c:131 +#: src/editor/spell.c:133 msgid "Ukrainian" msgstr "" -#: src/editor/spell.c:745 +#: src/editor/spell.c:357 msgid "&Add word" msgstr "" -#: src/editor/spell.c:756 +#: src/editor/spell.c:368 msgid "Language" msgstr "" -#: src/editor/spell.c:757 +#: src/editor/spell.c:369 msgid "Misspelled" msgstr "" -#: src/editor/spell.c:764 +#: src/editor/spell.c:376 msgid "Check word" msgstr "" -#: src/editor/spell.c:770 +#: src/editor/spell.c:382 msgid "Suggest" msgstr "" -#: src/editor/spell.c:822 +#: src/editor/spell.c:751 msgid "Select language" msgstr "" @@ -2315,76 +2292,76 @@ msgstr "" msgid "Type 'exit' to return to the Midnight Commander" msgstr "" -#: src/filemanager/achown.c:86 src/filemanager/chattr.c:230 -#: src/filemanager/chmod.c:112 src/filemanager/chown.c:84 +#: src/filemanager/achown.c:85 src/filemanager/chattr.c:228 +#: src/filemanager/chmod.c:110 src/filemanager/chown.c:83 msgid "Set &all" msgstr "" -#: src/filemanager/achown.c:87 +#: src/filemanager/achown.c:86 msgid "S&kip" msgstr "" -#: src/filemanager/achown.c:88 src/filemanager/chattr.c:234 -#: src/filemanager/chmod.c:116 src/filemanager/chown.c:87 +#: src/filemanager/achown.c:87 src/filemanager/chattr.c:232 +#: src/filemanager/chmod.c:114 src/filemanager/chown.c:86 msgid "&Set" msgstr "" -#: src/filemanager/achown.c:287 src/filemanager/achown.c:294 -#: src/filemanager/achown.c:546 +#: src/filemanager/achown.c:286 src/filemanager/achown.c:293 +#: src/filemanager/achown.c:545 msgid "owner" msgstr "" -#: src/filemanager/achown.c:289 src/filemanager/achown.c:296 -#: src/filemanager/achown.c:551 +#: src/filemanager/achown.c:288 src/filemanager/achown.c:295 +#: src/filemanager/achown.c:550 msgid "group" msgstr "" -#: src/filemanager/achown.c:291 +#: src/filemanager/achown.c:290 msgid "other" msgstr "" -#: src/filemanager/achown.c:299 +#: src/filemanager/achown.c:298 msgid "Flag" msgstr "" -#: src/filemanager/achown.c:309 +#: src/filemanager/achown.c:308 #, c-format msgid "Permissions (octal): %o" msgstr "" -#: src/filemanager/achown.c:752 +#: src/filemanager/achown.c:751 msgid "Chown advanced command" msgstr "" -#: src/filemanager/achown.c:860 src/filemanager/achown.c:1061 -#: src/filemanager/chmod.c:439 src/filemanager/chmod.c:585 +#: src/filemanager/achown.c:859 src/filemanager/achown.c:1060 +#: src/filemanager/chmod.c:437 src/filemanager/chmod.c:583 #, c-format msgid "" "Cannot chmod \"%s\"\n" "%s" msgstr "" -#: src/filemanager/achown.c:862 src/filemanager/achown.c:899 -#: src/filemanager/chattr.c:1123 src/filemanager/chmod.c:441 -#: src/filemanager/chown.c:313 src/vfs/sftpfs/connection.c:562 +#: src/filemanager/achown.c:861 src/filemanager/achown.c:898 +#: src/filemanager/chattr.c:1121 src/filemanager/chmod.c:439 +#: src/filemanager/chown.c:311 src/vfs/sftpfs/connection.c:562 #: src/vfs/sftpfs/connection.c:574 msgid "&Ignore" msgstr "" -#: src/filemanager/achown.c:862 src/filemanager/achown.c:899 -#: src/filemanager/chattr.c:1123 src/filemanager/chmod.c:441 -#: src/filemanager/chown.c:313 +#: src/filemanager/achown.c:861 src/filemanager/achown.c:898 +#: src/filemanager/chattr.c:1121 src/filemanager/chmod.c:439 +#: src/filemanager/chown.c:311 msgid "Ignore &all" msgstr "" -#: src/filemanager/achown.c:862 src/filemanager/achown.c:899 -#: src/filemanager/chattr.c:1123 src/filemanager/chmod.c:441 -#: src/filemanager/chown.c:313 src/filemanager/file.c:957 src/viewer/hex.c:430 +#: src/filemanager/achown.c:861 src/filemanager/achown.c:898 +#: src/filemanager/chattr.c:1121 src/filemanager/chmod.c:439 +#: src/filemanager/chown.c:311 src/filemanager/file.c:957 src/viewer/hex.c:430 msgid "&Retry" msgstr "" -#: src/filemanager/achown.c:897 src/filemanager/achown.c:1065 -#: src/filemanager/chown.c:311 src/filemanager/chown.c:478 +#: src/filemanager/achown.c:896 src/filemanager/achown.c:1064 +#: src/filemanager/chown.c:309 src/filemanager/chown.c:476 #, c-format msgid "" "Cannot chown \"%s\"\n" @@ -2399,7 +2376,7 @@ msgstr "" msgid "Skins" msgstr "" -#: src/filemanager/boxes.c:382 src/filemanager/boxes.c:1017 +#: src/filemanager/boxes.c:382 src/filemanager/boxes.c:1016 #: src/selcodepage.c:108 msgid "Other 8 bit" msgstr "" @@ -2408,220 +2385,220 @@ msgstr "" msgid "Running" msgstr "" -#: src/filemanager/boxes.c:469 src/filemanager/find.c:1630 +#: src/filemanager/boxes.c:469 src/filemanager/find.c:1633 msgid "Stopped" msgstr "" -#: src/filemanager/boxes.c:536 +#: src/filemanager/boxes.c:535 msgid "&Never" msgstr "" -#: src/filemanager/boxes.c:537 +#: src/filemanager/boxes.c:536 msgid "On dum&b terminals" msgstr "" -#: src/filemanager/boxes.c:538 +#: src/filemanager/boxes.c:537 msgid "Alwa&ys" msgstr "" -#: src/filemanager/boxes.c:552 +#: src/filemanager/boxes.c:551 msgid "File operations" msgstr "" -#: src/filemanager/boxes.c:553 +#: src/filemanager/boxes.c:552 msgid "&Verbose operation" msgstr "" -#: src/filemanager/boxes.c:554 +#: src/filemanager/boxes.c:553 msgid "Compute tota&ls" msgstr "" -#: src/filemanager/boxes.c:555 +#: src/filemanager/boxes.c:554 msgid "Classic pro&gressbar" msgstr "" -#: src/filemanager/boxes.c:556 +#: src/filemanager/boxes.c:555 msgid "Mkdi&r autoname" msgstr "" -#: src/filemanager/boxes.c:557 +#: src/filemanager/boxes.c:556 msgid "&Preallocate space" msgstr "" -#: src/filemanager/boxes.c:560 +#: src/filemanager/boxes.c:559 msgid "Esc key mode" msgstr "" -#: src/filemanager/boxes.c:561 +#: src/filemanager/boxes.c:560 msgid "S&ingle press" msgstr "" -#: src/filemanager/boxes.c:562 +#: src/filemanager/boxes.c:561 msgid "Timeout:" msgstr "" -#: src/filemanager/boxes.c:567 +#: src/filemanager/boxes.c:566 msgid "Pause after run" msgstr "" -#: src/filemanager/boxes.c:572 +#: src/filemanager/boxes.c:571 msgid "Use internal edi&t" msgstr "" -#: src/filemanager/boxes.c:573 +#: src/filemanager/boxes.c:572 msgid "Use internal vie&w" msgstr "" -#: src/filemanager/boxes.c:574 +#: src/filemanager/boxes.c:573 msgid "A&sk new file name" msgstr "" -#: src/filemanager/boxes.c:576 +#: src/filemanager/boxes.c:575 msgid "Auto m&enus" msgstr "" -#: src/filemanager/boxes.c:577 +#: src/filemanager/boxes.c:576 msgid "&Drop down menus" msgstr "" -#: src/filemanager/boxes.c:578 +#: src/filemanager/boxes.c:577 msgid "S&hell patterns" msgstr "" -#: src/filemanager/boxes.c:579 +#: src/filemanager/boxes.c:578 msgid "Co&mplete: show all" msgstr "" -#: src/filemanager/boxes.c:581 +#: src/filemanager/boxes.c:580 msgid "Rotating d&ash" msgstr "" -#: src/filemanager/boxes.c:582 +#: src/filemanager/boxes.c:581 msgid "Cd follows lin&ks" msgstr "" -#: src/filemanager/boxes.c:583 +#: src/filemanager/boxes.c:582 msgid "Sa&fe delete" msgstr "" -#: src/filemanager/boxes.c:584 +#: src/filemanager/boxes.c:583 msgid "Safe overwrite" msgstr "" -#: src/filemanager/boxes.c:585 +#: src/filemanager/boxes.c:584 msgid "A&uto save setup" msgstr "" -#: src/filemanager/boxes.c:598 +#: src/filemanager/boxes.c:597 msgid "Configure options" msgstr "" -#: src/filemanager/boxes.c:642 +#: src/filemanager/boxes.c:641 msgid "Skin:" msgstr "" -#: src/filemanager/boxes.c:648 +#: src/filemanager/boxes.c:647 msgid "&Shadows" msgstr "" -#: src/filemanager/boxes.c:657 +#: src/filemanager/boxes.c:656 msgid "Appearance" msgstr "" -#: src/filemanager/boxes.c:686 +#: src/filemanager/boxes.c:685 msgid "Case &insensitive" msgstr "" -#: src/filemanager/boxes.c:688 +#: src/filemanager/boxes.c:687 msgid "Use panel sort mo&de" msgstr "" -#: src/filemanager/boxes.c:695 +#: src/filemanager/boxes.c:694 msgid "Show mi&ni-status" msgstr "" -#: src/filemanager/boxes.c:696 +#: src/filemanager/boxes.c:695 msgid "Use SI si&ze units" msgstr "" -#: src/filemanager/boxes.c:697 +#: src/filemanager/boxes.c:696 msgid "Mi&x all files" msgstr "" -#: src/filemanager/boxes.c:698 +#: src/filemanager/boxes.c:697 msgid "Show &backup files" msgstr "" -#: src/filemanager/boxes.c:699 +#: src/filemanager/boxes.c:698 msgid "Show &hidden files" msgstr "" -#: src/filemanager/boxes.c:700 +#: src/filemanager/boxes.c:699 msgid "&Fast dir reload" msgstr "" -#: src/filemanager/boxes.c:701 +#: src/filemanager/boxes.c:700 msgid "Ma&rk moves down" msgstr "" -#: src/filemanager/boxes.c:702 +#: src/filemanager/boxes.c:701 msgid "Re&verse files only" msgstr "" -#: src/filemanager/boxes.c:704 +#: src/filemanager/boxes.c:703 msgid "Simple s&wap" msgstr "" -#: src/filemanager/boxes.c:705 +#: src/filemanager/boxes.c:704 msgid "A&uto save panels setup" msgstr "" -#: src/filemanager/boxes.c:712 +#: src/filemanager/boxes.c:711 msgid "Navigation" msgstr "" -#: src/filemanager/boxes.c:713 +#: src/filemanager/boxes.c:712 msgid "L&ynx-like motion" msgstr "" -#: src/filemanager/boxes.c:715 +#: src/filemanager/boxes.c:714 msgid "Pa&ge scrolling" msgstr "" -#: src/filemanager/boxes.c:716 +#: src/filemanager/boxes.c:715 msgid "Center &scrolling" msgstr "" -#: src/filemanager/boxes.c:717 +#: src/filemanager/boxes.c:716 msgid "&Mouse page scrolling" msgstr "" -#: src/filemanager/boxes.c:720 +#: src/filemanager/boxes.c:719 msgid "File highlight" msgstr "" -#: src/filemanager/boxes.c:721 +#: src/filemanager/boxes.c:720 msgid "File &types" msgstr "" -#: src/filemanager/boxes.c:722 +#: src/filemanager/boxes.c:721 msgid "&Permissions" msgstr "" -#: src/filemanager/boxes.c:724 +#: src/filemanager/boxes.c:723 msgid "Quick search" msgstr "" -#: src/filemanager/boxes.c:737 +#: src/filemanager/boxes.c:736 msgid "Panel options" msgstr "" -#: src/filemanager/boxes.c:749 src/filemanager/info.c:86 +#: src/filemanager/boxes.c:748 src/filemanager/info.c:86 #: src/vfs/sftpfs/connection.c:421 msgid "Information" msgstr "" -#: src/filemanager/boxes.c:750 +#: src/filemanager/boxes.c:749 msgid "" "Using the fast reload option may not reflect the exact\n" "directory contents. In this case you'll need to do a\n" @@ -2629,172 +2606,172 @@ msgid "" "the details." msgstr "" -#: src/filemanager/boxes.c:784 +#: src/filemanager/boxes.c:783 msgid "&Full file list" msgstr "" -#: src/filemanager/boxes.c:785 +#: src/filemanager/boxes.c:784 msgid "&Brief file list:" msgstr "" -#: src/filemanager/boxes.c:786 +#: src/filemanager/boxes.c:785 msgid "&Long file list" msgstr "" -#: src/filemanager/boxes.c:787 +#: src/filemanager/boxes.c:786 msgid "&User defined:" msgstr "" -#: src/filemanager/boxes.c:796 +#: src/filemanager/boxes.c:795 msgid "columns" msgstr "" -#: src/filemanager/boxes.c:803 +#: src/filemanager/boxes.c:802 msgid "User &mini status" msgstr "" -#: src/filemanager/boxes.c:814 +#: src/filemanager/boxes.c:813 msgid "Listing format" msgstr "" -#: src/filemanager/boxes.c:893 +#: src/filemanager/boxes.c:892 msgid "Executable &first" msgstr "" -#: src/filemanager/boxes.c:895 +#: src/filemanager/boxes.c:894 msgid "&Reverse" msgstr "" -#: src/filemanager/boxes.c:905 +#: src/filemanager/boxes.c:904 msgid "Sort order" msgstr "" #. TRANSLATORS: no need to translate 'Confirmation', it's just a context prefix -#: src/filemanager/boxes.c:929 +#: src/filemanager/boxes.c:928 msgid "Confirmation|&Delete" msgstr "" -#: src/filemanager/boxes.c:930 +#: src/filemanager/boxes.c:929 msgid "Confirmation|O&verwrite" msgstr "" -#: src/filemanager/boxes.c:931 +#: src/filemanager/boxes.c:930 msgid "Confirmation|&Execute" msgstr "" -#: src/filemanager/boxes.c:932 +#: src/filemanager/boxes.c:931 msgid "Confirmation|E&xit" msgstr "" -#: src/filemanager/boxes.c:933 +#: src/filemanager/boxes.c:932 msgid "Confirmation|Di&rectory hotlist delete" msgstr "" -#: src/filemanager/boxes.c:935 +#: src/filemanager/boxes.c:934 msgid "Confirmation|&History cleanup" msgstr "" -#: src/filemanager/boxes.c:945 src/filemanager/cmd.c:144 +#: src/filemanager/boxes.c:944 src/filemanager/cmd.c:144 msgid "Confirmation" msgstr "" -#: src/filemanager/boxes.c:962 +#: src/filemanager/boxes.c:961 msgid "&UTF-8 output" msgstr "" -#: src/filemanager/boxes.c:963 +#: src/filemanager/boxes.c:962 msgid "&Full 8 bits output" msgstr "" -#: src/filemanager/boxes.c:964 +#: src/filemanager/boxes.c:963 msgid "&ISO 8859-1" msgstr "" -#: src/filemanager/boxes.c:965 +#: src/filemanager/boxes.c:964 msgid "7 &bits" msgstr "" -#: src/filemanager/boxes.c:972 src/filemanager/boxes.c:1031 +#: src/filemanager/boxes.c:971 src/filemanager/boxes.c:1030 msgid "F&ull 8 bits input" msgstr "" -#: src/filemanager/boxes.c:981 src/filemanager/boxes.c:1040 +#: src/filemanager/boxes.c:980 src/filemanager/boxes.c:1039 msgid "Display bits" msgstr "" -#: src/filemanager/boxes.c:1026 +#: src/filemanager/boxes.c:1025 msgid "Input / display codepage:" msgstr "" -#: src/filemanager/boxes.c:1091 src/filemanager/tree.c:1131 +#: src/filemanager/boxes.c:1090 src/filemanager/tree.c:1131 msgid "Directory tree" msgstr "" -#: src/filemanager/boxes.c:1142 +#: src/filemanager/boxes.c:1141 msgid "Timeout for freeing VFSs (sec):" msgstr "" -#: src/filemanager/boxes.c:1147 +#: src/filemanager/boxes.c:1146 msgid "FTP anonymous password:" msgstr "" -#: src/filemanager/boxes.c:1150 +#: src/filemanager/boxes.c:1149 msgid "FTP directory cache timeout (sec):" msgstr "" -#: src/filemanager/boxes.c:1153 +#: src/filemanager/boxes.c:1152 msgid "&Always use ftp proxy:" msgstr "" -#: src/filemanager/boxes.c:1157 +#: src/filemanager/boxes.c:1156 msgid "&Use ~/.netrc" msgstr "" -#: src/filemanager/boxes.c:1158 +#: src/filemanager/boxes.c:1157 msgid "Use &passive mode" msgstr "" -#: src/filemanager/boxes.c:1159 +#: src/filemanager/boxes.c:1158 msgid "Use passive mode over pro&xy" msgstr "" -#: src/filemanager/boxes.c:1170 +#: src/filemanager/boxes.c:1169 msgid "Virtual File System Setting" msgstr "" -#: src/filemanager/boxes.c:1225 +#: src/filemanager/boxes.c:1224 msgid "cd" msgstr "" -#: src/filemanager/boxes.c:1233 +#: src/filemanager/boxes.c:1232 msgid "Quick cd" msgstr "" -#: src/filemanager/boxes.c:1248 +#: src/filemanager/boxes.c:1247 msgid "Existing filename (filename symlink will point to):" msgstr "" -#: src/filemanager/boxes.c:1252 +#: src/filemanager/boxes.c:1251 msgid "Symbolic link filename:" msgstr "" -#: src/filemanager/boxes.c:1263 +#: src/filemanager/boxes.c:1262 msgid "Symbolic link" msgstr "" -#: src/filemanager/boxes.c:1291 +#: src/filemanager/boxes.c:1289 msgid "&Stop" msgstr "" -#: src/filemanager/boxes.c:1292 +#: src/filemanager/boxes.c:1290 msgid "&Resume" msgstr "" -#: src/filemanager/boxes.c:1293 +#: src/filemanager/boxes.c:1291 msgid "&Kill" msgstr "" -#: src/filemanager/boxes.c:1323 +#: src/filemanager/boxes.c:1321 msgid "Background jobs" msgstr "" @@ -2806,250 +2783,250 @@ msgid "" "%s" msgstr "" -#: src/filemanager/chattr.c:143 +#: src/filemanager/chattr.c:142 msgid "Secure deletion" msgstr "" -#: src/filemanager/chattr.c:144 +#: src/filemanager/chattr.c:143 msgid "Undelete" msgstr "" -#: src/filemanager/chattr.c:145 +#: src/filemanager/chattr.c:144 msgid "Synchronous updates" msgstr "" -#: src/filemanager/chattr.c:146 +#: src/filemanager/chattr.c:145 msgid "Synchronous directory updates" msgstr "" -#: src/filemanager/chattr.c:147 +#: src/filemanager/chattr.c:146 msgid "Immutable" msgstr "" -#: src/filemanager/chattr.c:148 +#: src/filemanager/chattr.c:147 msgid "Append only" msgstr "" -#: src/filemanager/chattr.c:149 +#: src/filemanager/chattr.c:148 msgid "No dump" msgstr "" -#: src/filemanager/chattr.c:150 +#: src/filemanager/chattr.c:149 msgid "No update atime" msgstr "" -#: src/filemanager/chattr.c:151 +#: src/filemanager/chattr.c:150 msgid "Compress" msgstr "" -#: src/filemanager/chattr.c:155 +#: src/filemanager/chattr.c:154 msgid "Compressed clusters" msgstr "" -#: src/filemanager/chattr.c:160 +#: src/filemanager/chattr.c:159 msgid "Compressed dirty file" msgstr "" -#: src/filemanager/chattr.c:165 +#: src/filemanager/chattr.c:164 msgid "Compression raw access" msgstr "" -#: src/filemanager/chattr.c:168 +#: src/filemanager/chattr.c:167 msgid "Encrypted inode" msgstr "" -#: src/filemanager/chattr.c:170 +#: src/filemanager/chattr.c:169 msgid "Journaled data" msgstr "" -#: src/filemanager/chattr.c:171 +#: src/filemanager/chattr.c:170 msgid "Indexed directory" msgstr "" -#: src/filemanager/chattr.c:172 +#: src/filemanager/chattr.c:171 msgid "No tail merging" msgstr "" -#: src/filemanager/chattr.c:173 +#: src/filemanager/chattr.c:172 msgid "Top of directory hierarchies" msgstr "" -#: src/filemanager/chattr.c:174 +#: src/filemanager/chattr.c:173 msgid "Inode uses extents" msgstr "" -#: src/filemanager/chattr.c:178 +#: src/filemanager/chattr.c:177 msgid "Huge_file" msgstr "" -#: src/filemanager/chattr.c:180 +#: src/filemanager/chattr.c:179 msgid "No COW" msgstr "" -#: src/filemanager/chattr.c:184 +#: src/filemanager/chattr.c:183 msgid "Direct access for files" msgstr "" -#: src/filemanager/chattr.c:189 +#: src/filemanager/chattr.c:188 msgid "Casefolded file" msgstr "" -#: src/filemanager/chattr.c:192 +#: src/filemanager/chattr.c:191 msgid "Inode has inline data" msgstr "" -#: src/filemanager/chattr.c:198 +#: src/filemanager/chattr.c:197 msgid "Project hierarchy" msgstr "" -#: src/filemanager/chattr.c:205 +#: src/filemanager/chattr.c:204 msgid "Verity protected inode" msgstr "" -#: src/filemanager/chattr.c:231 src/filemanager/chmod.c:113 +#: src/filemanager/chattr.c:229 src/filemanager/chmod.c:111 msgid "&Marked all" msgstr "" -#: src/filemanager/chattr.c:232 src/filemanager/chmod.c:114 +#: src/filemanager/chattr.c:230 src/filemanager/chmod.c:112 msgid "S&et marked" msgstr "" -#: src/filemanager/chattr.c:233 src/filemanager/chmod.c:115 +#: src/filemanager/chattr.c:231 src/filemanager/chmod.c:113 msgid "C&lear marked" msgstr "" -#: src/filemanager/chattr.c:1003 +#: src/filemanager/chattr.c:1001 msgid "Chattr command" msgstr "" -#: src/filemanager/chattr.c:1121 src/filemanager/chattr.c:1268 +#: src/filemanager/chattr.c:1119 src/filemanager/chattr.c:1266 #, c-format msgid "" "Cannot chattr \"%s\"\n" "%s" msgstr "" -#: src/filemanager/chattr.c:1243 +#: src/filemanager/chattr.c:1241 #, c-format msgid "" "Cannot get flags of \"%s\"\n" "%s" msgstr "" -#: src/filemanager/chmod.c:76 +#: src/filemanager/chmod.c:75 msgid "set &user ID on execution" msgstr "" -#: src/filemanager/chmod.c:77 +#: src/filemanager/chmod.c:76 msgid "set &group ID on execution" msgstr "" -#: src/filemanager/chmod.c:78 +#: src/filemanager/chmod.c:77 msgid "stick&y bit" msgstr "" -#: src/filemanager/chmod.c:79 +#: src/filemanager/chmod.c:78 msgid "&read by owner" msgstr "" -#: src/filemanager/chmod.c:80 +#: src/filemanager/chmod.c:79 msgid "&write by owner" msgstr "" -#: src/filemanager/chmod.c:81 +#: src/filemanager/chmod.c:80 msgid "e&xecute/search by owner" msgstr "" -#: src/filemanager/chmod.c:82 +#: src/filemanager/chmod.c:81 msgid "rea&d by group" msgstr "" -#: src/filemanager/chmod.c:83 +#: src/filemanager/chmod.c:82 msgid "write by grou&p" msgstr "" -#: src/filemanager/chmod.c:84 +#: src/filemanager/chmod.c:83 msgid "execu&te/search by group" msgstr "" -#: src/filemanager/chmod.c:85 +#: src/filemanager/chmod.c:84 msgid "read &by others" msgstr "" -#: src/filemanager/chmod.c:86 +#: src/filemanager/chmod.c:85 msgid "wr&ite by others" msgstr "" -#: src/filemanager/chmod.c:87 +#: src/filemanager/chmod.c:86 msgid "execute/searc&h by others" msgstr "" -#: src/filemanager/chmod.c:94 +#: src/filemanager/chmod.c:93 msgid "Name:" msgstr "" -#: src/filemanager/chmod.c:95 +#: src/filemanager/chmod.c:94 msgid "Permissions (octal):" msgstr "" -#: src/filemanager/chmod.c:96 +#: src/filemanager/chmod.c:95 msgid "Owner name:" msgstr "" -#: src/filemanager/chmod.c:97 +#: src/filemanager/chmod.c:96 msgid "Group name:" msgstr "" -#: src/filemanager/chmod.c:337 +#: src/filemanager/chmod.c:335 msgid "Chmod command" msgstr "" -#: src/filemanager/chmod.c:343 src/filemanager/chown.c:167 -#: src/filemanager/panel.c:267 +#: src/filemanager/chmod.c:341 src/filemanager/chown.c:165 +#: src/filemanager/panel.c:269 msgid "Permission" msgstr "" -#: src/filemanager/chmod.c:352 src/filemanager/chown.c:234 +#: src/filemanager/chmod.c:350 src/filemanager/chown.c:232 msgid "File" msgstr "" -#: src/filemanager/chown.c:85 +#: src/filemanager/chown.c:84 msgid "Set &groups" msgstr "" -#: src/filemanager/chown.c:86 +#: src/filemanager/chown.c:85 msgid "Set &users" msgstr "" -#: src/filemanager/chown.c:159 +#: src/filemanager/chown.c:157 msgid "Name" msgstr "" -#: src/filemanager/chown.c:161 +#: src/filemanager/chown.c:159 msgid "Owner name" msgstr "" -#: src/filemanager/chown.c:163 src/filemanager/chown.c:223 +#: src/filemanager/chown.c:161 src/filemanager/chown.c:221 msgid "Group name" msgstr "" -#: src/filemanager/chown.c:165 +#: src/filemanager/chown.c:163 msgid "Size" msgstr "" -#: src/filemanager/chown.c:206 +#: src/filemanager/chown.c:204 msgid "Chown command" msgstr "" -#: src/filemanager/chown.c:212 +#: src/filemanager/chown.c:210 msgid "User name" msgstr "" -#: src/filemanager/chown.c:216 +#: src/filemanager/chown.c:214 msgid "" msgstr "" -#: src/filemanager/chown.c:227 +#: src/filemanager/chown.c:225 msgid "" msgstr "" @@ -3268,8 +3245,8 @@ msgid "" "or use that file as an example of how to write it." msgstr "" -#: src/filemanager/file.c:94 src/filemanager/file.c:2774 -#: src/filemanager/file.c:2831 src/filemanager/tree.c:719 +#: src/filemanager/file.c:94 src/filemanager/file.c:2776 +#: src/filemanager/file.c:2833 src/filemanager/tree.c:719 msgid "DialogTitle|Copy" msgstr "" @@ -3277,8 +3254,8 @@ msgstr "" msgid "DialogTitle|Move" msgstr "" -#: src/filemanager/file.c:96 src/filemanager/hotlist.c:1163 -#: src/filemanager/hotlist.c:1180 src/filemanager/tree.c:826 +#: src/filemanager/file.c:96 src/filemanager/hotlist.c:1155 +#: src/filemanager/hotlist.c:1172 src/filemanager/tree.c:826 msgid "DialogTitle|Delete" msgstr "" @@ -3402,7 +3379,7 @@ msgid "" "Delete it recursively?" msgstr "" -#: src/filemanager/file.c:1006 src/filemanager/filegui.c:498 +#: src/filemanager/file.c:1006 src/filemanager/filegui.c:495 msgid "Non&e" msgstr "" @@ -3478,153 +3455,153 @@ msgid "" "%s" msgstr "" -#: src/filemanager/file.c:2413 src/filemanager/file.c:2487 +#: src/filemanager/file.c:2415 src/filemanager/file.c:2489 #, c-format msgid "" "Cannot set attributes of target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2439 +#: src/filemanager/file.c:2441 #, c-format msgid "" "Cannot create special file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2451 src/filemanager/file.c:2847 +#: src/filemanager/file.c:2453 src/filemanager/file.c:2849 #, c-format msgid "" "Cannot chown target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2466 src/filemanager/file.c:2863 +#: src/filemanager/file.c:2468 src/filemanager/file.c:2865 #, c-format msgid "" "Cannot chmod target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2513 +#: src/filemanager/file.c:2515 #, c-format msgid "" "Cannot open source file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2526 +#: src/filemanager/file.c:2528 msgid "Reget failed, about to overwrite file" msgstr "" -#: src/filemanager/file.c:2537 +#: src/filemanager/file.c:2539 #, c-format msgid "" "Cannot fstat source file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2569 +#: src/filemanager/file.c:2571 #, c-format msgid "" "Cannot create target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2601 +#: src/filemanager/file.c:2603 #, c-format msgid "" "Cannot fstat target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2622 +#: src/filemanager/file.c:2624 #, c-format msgid "" "Cannot preallocate space for target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2681 +#: src/filemanager/file.c:2683 #, c-format msgid "" "Cannot read source file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2720 +#: src/filemanager/file.c:2722 #, c-format msgid "" "Cannot write target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2754 +#: src/filemanager/file.c:2756 msgid "(stalled)" msgstr "" -#: src/filemanager/file.c:2775 src/filemanager/file.c:2831 +#: src/filemanager/file.c:2777 src/filemanager/file.c:2833 msgid "Incomplete file was retrieved" msgstr "" -#: src/filemanager/file.c:2776 src/filemanager/file.c:2832 +#: src/filemanager/file.c:2778 src/filemanager/file.c:2834 msgid "&Keep" msgstr "" -#: src/filemanager/file.c:2776 +#: src/filemanager/file.c:2778 msgid "&Continue copy" msgstr "" -#: src/filemanager/file.c:2807 +#: src/filemanager/file.c:2809 #, c-format msgid "" "Cannot close source file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2819 +#: src/filemanager/file.c:2821 #, c-format msgid "" "Cannot close target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2901 +#: src/filemanager/file.c:2903 #, c-format msgid "" "Cannot set attributes for target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2962 +#: src/filemanager/file.c:2964 #, c-format msgid "" "Cannot stat source directory \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2987 +#: src/filemanager/file.c:2989 #, c-format msgid "" "Cannot get attributes of source directory \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:3034 +#: src/filemanager/file.c:3036 #, c-format msgid "" "Source \"%s\" is not a directory\n" "%s" msgstr "" -#: src/filemanager/file.c:3046 +#: src/filemanager/file.c:3048 #, c-format msgid "" "Cannot copy cyclic symbolic link\n" "\"%s\"" msgstr "" -#: src/filemanager/file.c:3085 src/filemanager/file.c:3581 +#: src/filemanager/file.c:3087 src/filemanager/file.c:3583 #: src/filemanager/tree.c:769 #, c-format msgid "" @@ -3632,192 +3609,192 @@ msgid "" "%s" msgstr "" -#: src/filemanager/file.c:3118 +#: src/filemanager/file.c:3120 #, c-format msgid "" "Cannot create target directory \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:3142 +#: src/filemanager/file.c:3144 #, c-format msgid "" "Cannot chown target directory \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:3353 +#: src/filemanager/file.c:3355 #, c-format msgid "Directories: %zu, total size: %s" msgstr "" -#: src/filemanager/file.c:3499 +#: src/filemanager/file.c:3501 msgid "Sorry, I could not put the job in background" msgstr "" -#: src/filemanager/filegui.c:254 src/filemanager/find.c:192 +#: src/filemanager/filegui.c:252 src/filemanager/find.c:192 msgid "S&uspend" msgstr "" -#: src/filemanager/filegui.c:255 src/filemanager/find.c:193 +#: src/filemanager/filegui.c:253 src/filemanager/find.c:193 msgid "Con&tinue" msgstr "" -#: src/filemanager/filegui.c:345 +#: src/filemanager/filegui.c:343 #, c-format msgid "%d:%02d:%02d" msgstr "" -#: src/filemanager/filegui.c:364 +#: src/filemanager/filegui.c:362 #, c-format msgid "ETA %s" msgstr "" -#: src/filemanager/filegui.c:373 +#: src/filemanager/filegui.c:371 #, c-format msgid "%.2f MB/s" msgstr "" -#: src/filemanager/filegui.c:375 +#: src/filemanager/filegui.c:373 #, c-format msgid "%.2f KB/s" msgstr "" -#: src/filemanager/filegui.c:377 +#: src/filemanager/filegui.c:375 #, c-format msgid "%ld B/s" msgstr "" -#: src/filemanager/filegui.c:462 +#: src/filemanager/filegui.c:459 msgid "New :" msgstr "" -#: src/filemanager/filegui.c:470 +#: src/filemanager/filegui.c:467 msgid "Existing:" msgstr "" -#: src/filemanager/filegui.c:479 +#: src/filemanager/filegui.c:476 msgid "Overwrite this file?" msgstr "" -#: src/filemanager/filegui.c:485 src/filemanager/hotlist.c:193 +#: src/filemanager/filegui.c:482 src/filemanager/hotlist.c:192 msgid "A&ppend" msgstr "" -#: src/filemanager/filegui.c:487 +#: src/filemanager/filegui.c:484 msgid "&Reget" msgstr "" -#: src/filemanager/filegui.c:490 +#: src/filemanager/filegui.c:487 msgid "Overwrite all files?" msgstr "" -#: src/filemanager/filegui.c:492 +#: src/filemanager/filegui.c:489 msgid "Don't overwrite with &zero length file" msgstr "" -#: src/filemanager/filegui.c:496 +#: src/filemanager/filegui.c:493 msgid "&Older" msgstr "" -#: src/filemanager/filegui.c:500 +#: src/filemanager/filegui.c:497 msgid "S&maller" msgstr "" -#: src/filemanager/filegui.c:502 +#: src/filemanager/filegui.c:499 msgid "&Size differs" msgstr "" -#: src/filemanager/filegui.c:528 +#: src/filemanager/filegui.c:525 msgid "File exists" msgstr "" -#: src/filemanager/filegui.c:530 +#: src/filemanager/filegui.c:527 msgid "Background process: File exists" msgstr "" -#: src/filemanager/filegui.c:1048 +#: src/filemanager/filegui.c:1045 #, c-format msgid "Files processed: %zu / %zu" msgstr "" -#: src/filemanager/filegui.c:1051 +#: src/filemanager/filegui.c:1048 #, c-format msgid "Files processed: %zu" msgstr "" -#: src/filemanager/filegui.c:1096 +#: src/filemanager/filegui.c:1093 #, c-format msgid "Time: %s %s" msgstr "" -#: src/filemanager/filegui.c:1100 +#: src/filemanager/filegui.c:1097 #, c-format msgid "Time: %s %s (%s)" msgstr "" -#: src/filemanager/filegui.c:1106 +#: src/filemanager/filegui.c:1103 #, c-format msgid "Time: %s" msgstr "" -#: src/filemanager/filegui.c:1110 +#: src/filemanager/filegui.c:1107 #, c-format msgid "Time: %s (%s)" msgstr "" -#: src/filemanager/filegui.c:1120 +#: src/filemanager/filegui.c:1117 #, c-format msgid " Total: %s " msgstr "" -#: src/filemanager/filegui.c:1124 +#: src/filemanager/filegui.c:1121 #, c-format msgid " Total: %s / %s " msgstr "" -#: src/filemanager/filegui.c:1148 +#: src/filemanager/filegui.c:1142 msgid "Source" msgstr "" -#: src/filemanager/filegui.c:1173 +#: src/filemanager/filegui.c:1166 msgid "Target" msgstr "" -#: src/filemanager/filegui.c:1206 +#: src/filemanager/filegui.c:1199 msgid "Deleting" msgstr "" -#: src/filemanager/filegui.c:1374 src/filemanager/find.c:587 -#: src/filemanager/panel.c:2617 +#: src/filemanager/filegui.c:1367 src/filemanager/find.c:595 +#: src/filemanager/panel.c:2619 msgid "&Using shell patterns" msgstr "" -#: src/filemanager/filegui.c:1376 +#: src/filemanager/filegui.c:1369 msgid "to:" msgstr "" -#: src/filemanager/filegui.c:1380 +#: src/filemanager/filegui.c:1373 msgid "Follow &links" msgstr "" -#: src/filemanager/filegui.c:1381 +#: src/filemanager/filegui.c:1374 msgid "Preserve &attributes" msgstr "" -#: src/filemanager/filegui.c:1383 +#: src/filemanager/filegui.c:1376 msgid "Di&ve into subdir if exists" msgstr "" -#: src/filemanager/filegui.c:1384 +#: src/filemanager/filegui.c:1377 msgid "&Stable symlinks" msgstr "" -#: src/filemanager/filegui.c:1389 +#: src/filemanager/filegui.c:1382 msgid "&Background" msgstr "" -#: src/filemanager/filegui.c:1443 +#: src/filemanager/filegui.c:1436 #, c-format msgid "Invalid source pattern '%s'" msgstr "" @@ -3834,7 +3811,7 @@ msgstr "" msgid "&Info" msgstr "" -#: src/filemanager/filemanager.c:200 src/filemanager/find.c:605 +#: src/filemanager/filemanager.c:200 src/filemanager/find.c:613 msgid "&Tree" msgstr "" @@ -4070,7 +4047,7 @@ msgstr[0] "" msgstr[1] "" #: src/filemanager/filemanager.c:1048 src/filemanager/filemanager.c:1054 -#: src/filemanager/panel.c:2960 +#: src/filemanager/panel.c:2962 msgid "The Midnight Commander" msgstr "" @@ -4118,7 +4095,7 @@ msgstr "" msgid "&Again" msgstr "" -#: src/filemanager/find.c:196 src/filemanager/panelize.c:169 +#: src/filemanager/find.c:196 src/filemanager/panelize.c:168 msgid "Pane&lize" msgstr "" @@ -4130,213 +4107,213 @@ msgstr "" msgid "&Edit - F4" msgstr "" -#: src/filemanager/find.c:377 +#: src/filemanager/find.c:385 #, c-format msgid "Found: %lu" msgstr "" -#: src/filemanager/find.c:510 src/filemanager/find.c:521 -#: src/filemanager/panel.c:2655 +#: src/filemanager/find.c:518 src/filemanager/find.c:529 +#: src/filemanager/panel.c:2657 msgid "Malformed regular expression" msgstr "" -#: src/filemanager/find.c:584 +#: src/filemanager/find.c:592 msgid "File name:" msgstr "" -#: src/filemanager/find.c:585 +#: src/filemanager/find.c:593 msgid "&Find recursively" msgstr "" -#: src/filemanager/find.c:586 +#: src/filemanager/find.c:594 msgid "Follow s&ymlinks" msgstr "" -#: src/filemanager/find.c:592 +#: src/filemanager/find.c:600 msgid "S&kip hidden" msgstr "" -#: src/filemanager/find.c:595 +#: src/filemanager/find.c:603 msgid "Content:" msgstr "" -#: src/filemanager/find.c:596 +#: src/filemanager/find.c:604 msgid "Sea&rch for content" msgstr "" -#: src/filemanager/find.c:598 +#: src/filemanager/find.c:606 msgid "Case sens&itive" msgstr "" -#: src/filemanager/find.c:600 +#: src/filemanager/find.c:608 msgid "A&ll charsets" msgstr "" -#: src/filemanager/find.c:603 +#: src/filemanager/find.c:611 msgid "Fir&st hit" msgstr "" -#: src/filemanager/find.c:681 +#: src/filemanager/find.c:689 msgid "Find File" msgstr "" -#: src/filemanager/find.c:689 +#: src/filemanager/find.c:697 msgid "Start at:" msgstr "" -#: src/filemanager/find.c:698 +#: src/filemanager/find.c:706 msgid "Ena&ble ignore directories:" msgstr "" -#: src/filemanager/find.c:1038 src/filemanager/find.c:1132 +#: src/filemanager/find.c:1041 src/filemanager/find.c:1136 #, c-format msgid "Grepping in %s" msgstr "" -#: src/filemanager/find.c:1316 +#: src/filemanager/find.c:1320 msgid "Finished" msgstr "" -#: src/filemanager/find.c:1322 +#: src/filemanager/find.c:1326 #, c-format msgid "Finished (ignored %zu directory)" msgid_plural "Finished (ignored %zu directories)" msgstr[0] "" msgstr[1] "" -#: src/filemanager/find.c:1529 +#: src/filemanager/find.c:1532 #, c-format msgid "Find File: \"%s\". Content: \"%s\"" msgstr "" -#: src/filemanager/find.c:1532 +#: src/filemanager/find.c:1535 #, c-format msgid "Find File: \"%s\"" msgstr "" -#: src/filemanager/find.c:1630 src/filemanager/find.c:1712 +#: src/filemanager/find.c:1633 src/filemanager/find.c:1715 msgid "Searching" msgstr "" -#: src/filemanager/hotlist.c:173 +#: src/filemanager/hotlist.c:172 msgid "Change &to" msgstr "" -#: src/filemanager/hotlist.c:176 +#: src/filemanager/hotlist.c:175 msgid "&Free VFSs now" msgstr "" -#: src/filemanager/hotlist.c:178 +#: src/filemanager/hotlist.c:177 msgid "&Refresh" msgstr "" -#: src/filemanager/hotlist.c:181 +#: src/filemanager/hotlist.c:180 msgid "&Add current" msgstr "" -#: src/filemanager/hotlist.c:183 +#: src/filemanager/hotlist.c:182 msgid "&Up" msgstr "" -#: src/filemanager/hotlist.c:187 +#: src/filemanager/hotlist.c:186 msgid "New &group" msgstr "" -#: src/filemanager/hotlist.c:189 +#: src/filemanager/hotlist.c:188 msgid "New &entry" msgstr "" -#: src/filemanager/hotlist.c:191 src/filemanager/hotlist.c:1017 -#: src/filemanager/hotlist.c:1080 +#: src/filemanager/hotlist.c:190 src/filemanager/hotlist.c:1009 +#: src/filemanager/hotlist.c:1072 msgid "&Insert" msgstr "" -#: src/filemanager/hotlist.c:195 src/filemanager/panelize.c:170 +#: src/filemanager/hotlist.c:194 src/filemanager/panelize.c:169 msgid "&Remove" msgstr "" -#: src/filemanager/hotlist.c:253 +#: src/filemanager/hotlist.c:252 msgid "Subgroup - press ENTER to see list" msgstr "" -#: src/filemanager/hotlist.c:773 +#: src/filemanager/hotlist.c:766 msgid "Active VFS directories" msgstr "" -#: src/filemanager/hotlist.c:780 +#: src/filemanager/hotlist.c:773 msgid "Directory hotlist" msgstr "" -#: src/filemanager/hotlist.c:790 src/filemanager/hotlist.c:1475 +#: src/filemanager/hotlist.c:783 src/filemanager/hotlist.c:1467 msgid "Top level group" msgstr "" -#: src/filemanager/hotlist.c:815 +#: src/filemanager/hotlist.c:808 msgid "Directory path" msgstr "" -#: src/filemanager/hotlist.c:852 +#: src/filemanager/hotlist.c:845 #, c-format msgid "Moving %s" msgstr "" -#: src/filemanager/hotlist.c:862 +#: src/filemanager/hotlist.c:855 msgid "Directory label" msgstr "" -#: src/filemanager/hotlist.c:1016 src/filemanager/hotlist.c:1079 +#: src/filemanager/hotlist.c:1008 src/filemanager/hotlist.c:1071 msgid "&Append" msgstr "" -#: src/filemanager/hotlist.c:1048 +#: src/filemanager/hotlist.c:1040 msgid "New hotlist entry" msgstr "" -#: src/filemanager/hotlist.c:1048 +#: src/filemanager/hotlist.c:1040 msgid "Directory label:" msgstr "" -#: src/filemanager/hotlist.c:1049 +#: src/filemanager/hotlist.c:1041 msgid "Directory path:" msgstr "" -#: src/filemanager/hotlist.c:1108 +#: src/filemanager/hotlist.c:1100 msgid "New hotlist group" msgstr "" -#: src/filemanager/hotlist.c:1108 +#: src/filemanager/hotlist.c:1100 msgid "Name of new group:" msgstr "" -#: src/filemanager/hotlist.c:1161 +#: src/filemanager/hotlist.c:1153 #, c-format msgid "Are you sure you want to remove entry \"%s\"?" msgstr "" -#: src/filemanager/hotlist.c:1178 +#: src/filemanager/hotlist.c:1170 #, c-format msgid "" "Group \"%s\" is not empty.\n" "Remove it?" msgstr "" -#: src/filemanager/hotlist.c:1498 +#: src/filemanager/hotlist.c:1490 msgid "Hotlist Load" msgstr "" -#: src/filemanager/hotlist.c:1500 +#: src/filemanager/hotlist.c:1492 #, c-format msgid "" "MC was unable to write %s file,\n" "your old hotlist entries were not deleted" msgstr "" -#: src/filemanager/hotlist.c:1606 +#: src/filemanager/hotlist.c:1598 #, c-format msgid "Label for \"%s\":" msgstr "" -#: src/filemanager/hotlist.c:1621 +#: src/filemanager/hotlist.c:1613 msgid "Add to hotlist" msgstr "" @@ -4449,55 +4426,55 @@ msgstr "" msgid "Location: %Xh:%Xh" msgstr "" -#: src/filemanager/layout.c:175 +#: src/filemanager/layout.c:173 msgid "&Equal split" msgstr "" -#: src/filemanager/layout.c:176 +#: src/filemanager/layout.c:174 msgid "&Menubar visible" msgstr "" -#: src/filemanager/layout.c:177 +#: src/filemanager/layout.c:175 msgid "Command &prompt" msgstr "" -#: src/filemanager/layout.c:178 +#: src/filemanager/layout.c:176 msgid "&Keybar visible" msgstr "" -#: src/filemanager/layout.c:179 +#: src/filemanager/layout.c:177 msgid "H&intbar visible" msgstr "" -#: src/filemanager/layout.c:180 +#: src/filemanager/layout.c:178 msgid "&XTerm window title" msgstr "" -#: src/filemanager/layout.c:181 +#: src/filemanager/layout.c:179 msgid "&Show free space" msgstr "" -#: src/filemanager/layout.c:502 +#: src/filemanager/layout.c:500 msgid "Panel split" msgstr "" -#: src/filemanager/layout.c:503 +#: src/filemanager/layout.c:501 msgid "Console output" msgstr "" -#: src/filemanager/layout.c:507 +#: src/filemanager/layout.c:505 msgid "&Vertical" msgstr "" -#: src/filemanager/layout.c:508 +#: src/filemanager/layout.c:506 msgid "&Horizontal" msgstr "" -#: src/filemanager/layout.c:514 +#: src/filemanager/layout.c:512 msgid "Output lines:" msgstr "" -#: src/filemanager/layout.c:563 +#: src/filemanager/layout.c:561 msgid "Layout" msgstr "" @@ -4507,223 +4484,223 @@ msgstr "" #. TRANSLATORS: one single character to represent 'unsorted' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix -#: src/filemanager/panel.c:172 +#: src/filemanager/panel.c:174 msgid "sort|u" msgstr "" -#: src/filemanager/panel.c:173 +#: src/filemanager/panel.c:175 msgid "&Unsorted" msgstr "" #. TRANSLATORS: one single character to represent 'name' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix -#: src/filemanager/panel.c:182 +#: src/filemanager/panel.c:184 msgid "sort|n" msgstr "" -#: src/filemanager/panel.c:183 +#: src/filemanager/panel.c:185 msgid "&Name" msgstr "" #. TRANSLATORS: one single character to represent 'version' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix -#: src/filemanager/panel.c:192 +#: src/filemanager/panel.c:194 msgid "sort|v" msgstr "" -#: src/filemanager/panel.c:193 +#: src/filemanager/panel.c:195 msgid "&Version" msgstr "" #. TRANSLATORS: one single character to represent 'extension' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix -#: src/filemanager/panel.c:202 +#: src/filemanager/panel.c:204 msgid "sort|e" msgstr "" -#: src/filemanager/panel.c:203 +#: src/filemanager/panel.c:205 msgid "E&xtension" msgstr "" #. TRANSLATORS: one single character to represent 'size' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix -#: src/filemanager/panel.c:212 +#: src/filemanager/panel.c:214 msgid "sort|s" msgstr "" -#: src/filemanager/panel.c:213 +#: src/filemanager/panel.c:215 msgid "&Size" msgstr "" -#: src/filemanager/panel.c:221 +#: src/filemanager/panel.c:223 msgid "Block Size" msgstr "" #. TRANSLATORS: one single character to represent 'Modify time' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix -#: src/filemanager/panel.c:238 +#: src/filemanager/panel.c:240 msgid "sort|m" msgstr "" -#: src/filemanager/panel.c:239 +#: src/filemanager/panel.c:241 msgid "&Modify time" msgstr "" #. TRANSLATORS: one single character to represent 'Access time' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix -#: src/filemanager/panel.c:248 +#: src/filemanager/panel.c:250 msgid "sort|a" msgstr "" -#: src/filemanager/panel.c:249 +#: src/filemanager/panel.c:251 msgid "&Access time" msgstr "" #. TRANSLATORS: one single character to represent 'Change time' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix -#: src/filemanager/panel.c:258 +#: src/filemanager/panel.c:260 msgid "sort|h" msgstr "" -#: src/filemanager/panel.c:259 +#: src/filemanager/panel.c:261 msgid "C&hange time" msgstr "" -#: src/filemanager/panel.c:275 +#: src/filemanager/panel.c:277 msgid "Perm" msgstr "" -#: src/filemanager/panel.c:283 +#: src/filemanager/panel.c:285 msgid "Nl" msgstr "" #. TRANSLATORS: one single character to represent 'inode' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix -#: src/filemanager/panel.c:291 +#: src/filemanager/panel.c:293 msgid "sort|i" msgstr "" -#: src/filemanager/panel.c:292 +#: src/filemanager/panel.c:294 msgid "&Inode" msgstr "" -#: src/filemanager/panel.c:300 +#: src/filemanager/panel.c:302 msgid "UID" msgstr "" -#: src/filemanager/panel.c:308 +#: src/filemanager/panel.c:310 msgid "GID" msgstr "" -#: src/filemanager/panel.c:316 +#: src/filemanager/panel.c:318 msgid "Owner" msgstr "" -#: src/filemanager/panel.c:324 +#: src/filemanager/panel.c:326 msgid "Group" msgstr "" -#: src/filemanager/panel.c:536 +#: src/filemanager/panel.c:538 msgid "[dev]" msgstr "" -#: src/filemanager/panel.c:549 src/filemanager/panel.c:1083 +#: src/filemanager/panel.c:551 src/filemanager/panel.c:1085 msgid "UP--DIR" msgstr "" -#: src/filemanager/panel.c:568 +#: src/filemanager/panel.c:570 msgid "SYMLINK" msgstr "" -#: src/filemanager/panel.c:571 +#: src/filemanager/panel.c:573 msgid "SUB-DIR" msgstr "" -#: src/filemanager/panel.c:1075 +#: src/filemanager/panel.c:1077 msgid "" msgstr "" -#: src/filemanager/panel.c:1147 +#: src/filemanager/panel.c:1149 #, c-format msgid "%s in %d file" msgid_plural "%s in %d files" msgstr[0] "" msgstr[1] "" -#: src/filemanager/panel.c:1347 +#: src/filemanager/panel.c:1349 msgid "Panelize" msgstr "" -#: src/filemanager/panel.c:1871 +#: src/filemanager/panel.c:1873 msgid "Unknown tag on display format:" msgstr "" -#: src/filemanager/panel.c:2616 +#: src/filemanager/panel.c:2618 msgid "&Files only" msgstr "" -#: src/filemanager/panel.c:2619 +#: src/filemanager/panel.c:2621 msgid "&Case sensitive" msgstr "" -#: src/filemanager/panel.c:2709 +#: src/filemanager/panel.c:2711 msgid "Select" msgstr "" -#: src/filemanager/panel.c:2718 +#: src/filemanager/panel.c:2720 msgid "Unselect" msgstr "" -#: src/filemanager/panel.c:2748 +#: src/filemanager/panel.c:2750 msgid "Filter" msgstr "" -#: src/filemanager/panel.c:2960 +#: src/filemanager/panel.c:2962 msgid "Do you really want to execute?" msgstr "" -#: src/filemanager/panel.c:3432 src/filemanager/panel.c:4607 -#: src/filemanager/panel.c:4655 src/viewer/actions_cmd.c:310 +#: src/filemanager/panel.c:3434 src/filemanager/panel.c:4609 +#: src/filemanager/panel.c:4657 src/viewer/actions_cmd.c:310 msgid "Cannot read directory contents" msgstr "" -#: src/filemanager/panel.c:4709 +#: src/filemanager/panel.c:4711 msgid "User supplied format looks invalid, reverting to default." msgstr "" -#: src/filemanager/panelize.c:171 +#: src/filemanager/panelize.c:170 msgid "&Add new" msgstr "" -#: src/filemanager/panelize.c:204 src/filemanager/panelize.c:312 +#: src/filemanager/panelize.c:203 src/filemanager/panelize.c:311 msgid "External panelize" msgstr "" -#: src/filemanager/panelize.c:213 src/filemanager/panelize.c:292 -#: src/filemanager/panelize.c:501 src/filemanager/panelize.c:558 +#: src/filemanager/panelize.c:212 src/filemanager/panelize.c:291 +#: src/filemanager/panelize.c:500 src/filemanager/panelize.c:557 msgid "Other command" msgstr "" -#: src/filemanager/panelize.c:217 +#: src/filemanager/panelize.c:216 msgid "Command" msgstr "" -#: src/filemanager/panelize.c:277 +#: src/filemanager/panelize.c:276 msgid "Add to external panelize" msgstr "" -#: src/filemanager/panelize.c:278 +#: src/filemanager/panelize.c:277 msgid "Enter command label:" msgstr "" -#: src/filemanager/panelize.c:338 src/filemanager/panelize.c:344 +#: src/filemanager/panelize.c:337 src/filemanager/panelize.c:343 #, c-format msgid "" "External panelize:\n" "%s" msgstr "" -#: src/filemanager/panelize.c:355 +#: src/filemanager/panelize.c:354 #, c-format msgid "" "External panelize:\n" @@ -4731,23 +4708,23 @@ msgid "" "%s" msgstr "" -#: src/filemanager/panelize.c:444 +#: src/filemanager/panelize.c:443 msgid "Cannot run external panelize in a non-local directory" msgstr "" -#: src/filemanager/panelize.c:505 +#: src/filemanager/panelize.c:504 msgid "Modified git files" msgstr "" -#: src/filemanager/panelize.c:506 +#: src/filemanager/panelize.c:505 msgid "Find rejects after patching" msgstr "" -#: src/filemanager/panelize.c:508 +#: src/filemanager/panelize.c:507 msgid "Find *.orig after patching" msgstr "" -#: src/filemanager/panelize.c:510 +#: src/filemanager/panelize.c:509 msgid "Find SUID and SGID programs" msgstr "" @@ -4890,25 +4867,25 @@ msgid "" "key, or click with the mouse to define it. Move around with Tab." msgstr "" -#: src/main.c:278 +#: src/main.c:280 #, c-format msgid "" "Failed to run:\n" "%s\n" msgstr "" -#: src/main.c:298 +#: src/main.c:300 msgid "Home directory path is not absolute" msgstr "" -#: src/main.c:416 +#: src/main.c:423 msgid "" "GNU Midnight Commander\n" "is already running on this terminal.\n" "Subshell support will be disabled." msgstr "" -#: src/main.c:552 +#: src/main.c:564 #, c-format msgid "" "\n" @@ -5404,12 +5381,12 @@ msgid "" "%s\n" msgstr "" -#: src/vfs/sftpfs/config_parser.c:234 +#: src/vfs/sftpfs/config_parser.c:252 #, c-format msgid "sftp: an error occurred while reading %s: %s" msgstr "" -#: src/vfs/sftpfs/config_parser.c:338 +#: src/vfs/sftpfs/config_parser.c:356 msgid "sftp: Unable to get current user name." msgstr "" diff --git a/po/mn.po b/po/mn.po index c651814a9c..e28c4d2438 100644 --- a/po/mn.po +++ b/po/mn.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Shuree Nyam-Oidov <99shuree@gmail.com>, 2020\n" "Language-Team: Mongolian (http://app.transifex.com/mc/mc/language/mn/)\n" @@ -534,30 +534,12 @@ msgstr "Файл хүлээн авч байна" msgid "Changes to file lost" msgstr "Файлын өөрчлөлт алга байна" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s нь лавлах биш байна\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr " %s лавлах нь таны эзэмшил биш байна\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr " %s лавлахын зөв зөвшөөрөлийг олгож чадсангүй\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr " %s: %s түр зуурын лавлахыг үүсгэж чадсангүй\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr " Түр зуурын файлууд нь %s д үүссэн\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Түр зуурын файлууд үүссэнгүй\n" - msgid "Press any key to continue..." msgstr "Дурын товчлуур дарж үргэлжлүүл..." @@ -4486,3 +4468,23 @@ msgstr "" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s нь лавлах биш байна\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr " %s лавлах нь таны эзэмшил биш байна\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr " %s лавлахын зөв зөвшөөрөлийг олгож чадсангүй\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr " Түр зуурын файлууд нь %s д үүссэн\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Түр зуурын файлууд үүссэнгүй\n" diff --git a/po/nb.po b/po/nb.po index 5cebdfff57..f5bd200fa8 100644 --- a/po/nb.po +++ b/po/nb.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: heskjestad , 2024\n" "Language-Team: Norwegian Bokmål (http://app.transifex.com/mc/mc/language/" @@ -564,30 +564,12 @@ msgstr "Henter fil" msgid "Changes to file lost" msgstr "Endringer i filen gikk tapt" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s er ikke en mappe\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Du eier ikke mappa %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Klarte ikke velge riktige rettigheter for mappa %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Klarte ikke ikke opprette midlertidig mappe %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Lagrer midlertidige filer i %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Oppretter ikke noen midlertidige filer\n" - msgid "Press any key to continue..." msgstr "Trykk en tast for å fortsette ..." @@ -4776,3 +4758,23 @@ msgstr "Fortsett fra begynnelsen?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Klarte ikke hente en lokal kopi av /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s er ikke en mappe\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Du eier ikke mappa %s\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Klarte ikke velge riktige rettigheter for mappa %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Lagrer midlertidige filer i %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Oppretter ikke noen midlertidige filer\n" diff --git a/po/nl.po b/po/nl.po index b2257d1d01..108d819d32 100644 --- a/po/nl.po +++ b/po/nl.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Jaap Kramer , 2023\n" "Language-Team: Dutch (http://app.transifex.com/mc/mc/language/nl/)\n" @@ -566,30 +566,12 @@ msgstr "Verkrijgen van bestand" msgid "Changes to file lost" msgstr "Wijzigingen zijn verloren" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s is geen map\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "U bent niet de eigenaar van de map %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Kan de rechten niet juist instellen voor de map %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Tijdelijke map \"%s\" kan niet gecreëerd worden: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Tijdelijke bestanden zullen in %s gemaakt worden\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Tijdelijke bestanden zullen niet aangemaakt worden\n" - msgid "Press any key to continue..." msgstr "Druk op een toets om verder te gaan..." @@ -4724,3 +4706,23 @@ msgstr "Doorgaan vanaf het begin?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Kan geen lokale versie van /ftp://some.host/editme.txt ophalen" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s is geen map\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "U bent niet de eigenaar van de map %s\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Kan de rechten niet juist instellen voor de map %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Tijdelijke bestanden zullen in %s gemaakt worden\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Tijdelijke bestanden zullen niet aangemaakt worden\n" diff --git a/po/nl_BE.po b/po/nl_BE.po index ef38909e70..f5d79218e6 100644 --- a/po/nl_BE.po +++ b/po/nl_BE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Dutch (Belgium) (http://app.transifex.com/mc/mc/language/" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/pl.po b/po/pl.po index 22cbd186d5..d3bd5c56f3 100644 --- a/po/pl.po +++ b/po/pl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Piotr Drąg , 2011-2024\n" "Language-Team: Polish (http://app.transifex.com/mc/mc/language/pl/)\n" @@ -568,30 +568,12 @@ msgstr "Pobieranie pliku" msgid "Changes to file lost" msgstr "Utracono zmiany w pliku" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s nie jest katalogiem\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Katalog %s nie należy do ciebie\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Nie można ustawić odpowiednich uprawnień dla katalogu %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Nie można utworzyć katalogu tymczasowego %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Pliki tymczasowe zostaną utworzone w %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Pliki tymczasowe nie zostaną utworzone\n" - msgid "Press any key to continue..." msgstr "Naciśnięcie dowolnego klawisza kontynuuje…" @@ -4790,3 +4772,23 @@ msgstr "Kontynuować od początku?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" "Nie można pobrać lokalnej kopii /ftp://jakiś.komputer/modyfikuj_mnie.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s nie jest katalogiem\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Katalog %s nie należy do ciebie\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Nie można ustawić odpowiednich uprawnień dla katalogu %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Pliki tymczasowe zostaną utworzone w %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Pliki tymczasowe nie zostaną utworzone\n" diff --git a/po/pt.po b/po/pt.po index aff56669c0..dee40aca74 100644 --- a/po/pt.po +++ b/po/pt.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Gilberto Jorge , 2013-2024\n" "Language-Team: Portuguese (http://app.transifex.com/mc/mc/language/pt/)\n" @@ -566,30 +566,12 @@ msgstr "A obter ficheiro" msgid "Changes to file lost" msgstr "Modificações ao ficheiro perdidas" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s não é um diretório\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Não tem permissões para o diretório %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Não é possível definir permissões corretas para o diretório %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Não é possível criar diretório temporário %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Ficheiros temporários serão criados em %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Ficheiros temporários não serão criados\n" - msgid "Press any key to continue..." msgstr "Prima qualquer tecla para continuar..." @@ -4781,3 +4763,23 @@ msgstr "Continuar do início?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Não é possível obter uma cópia local de /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s não é um diretório\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Não tem permissões para o diretório %s\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Não é possível definir permissões corretas para o diretório %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Ficheiros temporários serão criados em %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Ficheiros temporários não serão criados\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index fc8c454e7e..3d00b3d928 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: marcelo cripe , 2022-2024\n" "Language-Team: Portuguese (Brazil) (http://app.transifex.com/mc/mc/language/" @@ -579,30 +579,12 @@ msgstr "Obtendo o arquivo" msgid "Changes to file lost" msgstr "As alterações feitas no arquivo foram perdidas" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s não é um diretório\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "O diretório %s não pertence a você\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Não foi possível definir as permissões corretas para o diretório %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Não foi possível criar o diretório temporário %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Os arquivos temporários serão criados em %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Os arquivos temporários não serão criados\n" - msgid "Press any key to continue..." msgstr "Pressione qualquer tecla para continuar..." @@ -4857,3 +4839,24 @@ msgstr "Você quer continuar a partir do início?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Não foi possível obter uma cópia local do /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s não é um diretório\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "O diretório %s não pertence a você\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "" +#~ "Não foi possível definir as permissões corretas para o diretório %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Os arquivos temporários serão criados em %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Os arquivos temporários não serão criados\n" diff --git a/po/ro.po b/po/ro.po index 89af3ffedc..4564fc7af1 100644 --- a/po/ro.po +++ b/po/ro.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Simona Iacob , 2021-2023\n" "Language-Team: Romanian (http://app.transifex.com/mc/mc/language/ro/)\n" @@ -569,30 +569,12 @@ msgstr "Transfer fișierul" msgid "Changes to file lost" msgstr "S-au pierdut schimbările efectuate în fișier" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s nu este un dosar\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Nu dețineți dosarul %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Nu pot seta permisiunile corecte pentru dosarul %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Nu pot crea dosarul temporar %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Fișierele temporare vor fi create în %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Nu vor fi create fișiere temporare\n" - msgid "Press any key to continue..." msgstr "Apăsați o tastă pentru a continua..." @@ -4756,3 +4738,23 @@ msgstr "Continuă de la început?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Nu se poate aduce o copie locală a /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s nu este un dosar\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Nu dețineți dosarul %s\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Nu pot seta permisiunile corecte pentru dosarul %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Fișierele temporare vor fi create în %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Nu vor fi create fișiere temporare\n" diff --git a/po/ru.po b/po/ru.po index 14b5a9ef15..8edd8c4c16 100644 --- a/po/ru.po +++ b/po/ru.po @@ -30,7 +30,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Andrei Stepanov, 2023\n" "Language-Team: Russian (http://app.transifex.com/mc/mc/language/ru/)\n" @@ -587,30 +587,12 @@ msgstr "Получение файла" msgid "Changes to file lost" msgstr "Изменения файла потеряны" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s не является каталогом\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Вы не являетесь владельцем каталога %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Не удалось установить правильные права доступа к каталогу %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Не удалось создать временный каталог %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Временные файлы будут создаваться в каталоге %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Временные файлы не будут создаваться\n" - msgid "Press any key to continue..." msgstr "Для продолжения нажмите любую клавишу..." diff --git a/po/sk.po b/po/sk.po index 730430ae74..2f38549482 100644 --- a/po/sk.po +++ b/po/sk.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: hualahyja, 2019\n" "Language-Team: Slovak (http://app.transifex.com/mc/mc/language/sk/)\n" @@ -561,30 +561,12 @@ msgstr "Získava sa súbor" msgid "Changes to file lost" msgstr "Zmeny súboru stratené" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s nie je adresár\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Nevlastníte adresár %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Nepodarilo sa nastaviť správne prístupové práva pre adresár %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Nepodarilo sa vytvoriť dočasný adresár %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Dočasné súbory budú vytvorené v %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Dočasné súbory nebudú vytvorené\n" - msgid "Press any key to continue..." msgstr "Pokračujte stlačením ľubovoľného klávesu..." @@ -4689,3 +4671,23 @@ msgstr "Pokračovať od začiatku?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Nemožno stiahnuť lokálnu kópiu /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s nie je adresár\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Nevlastníte adresár %s\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Nepodarilo sa nastaviť správne prístupové práva pre adresár %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Dočasné súbory budú vytvorené v %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Dočasné súbory nebudú vytvorené\n" diff --git a/po/sl.po b/po/sl.po index ea377169bf..22acb75e56 100644 --- a/po/sl.po +++ b/po/sl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Matej Urbančič <>, 2012\n" "Language-Team: Slovenian (http://app.transifex.com/mc/mc/language/sl/)\n" @@ -543,30 +543,12 @@ msgstr "Dobivam datoteko" msgid "Changes to file lost" msgstr "Spremembe v datoteki izgubljene" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s ni imenik\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Niste lastnik imenika %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Ne morem nastaviti pravilnih dovoljenj za imenik %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr " Ne morem ustvariti začasnega imenika %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Začasne datoteke bodo ustvarjene v %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Začasne datoteke ne bodo ustvarjene\n" - msgid "Press any key to continue..." msgstr "Pritisnite katerokoli tipko za nadaljevanje..." @@ -4504,3 +4486,23 @@ msgstr "" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s ni imenik\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Niste lastnik imenika %s\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Ne morem nastaviti pravilnih dovoljenj za imenik %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Začasne datoteke bodo ustvarjene v %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Začasne datoteke ne bodo ustvarjene\n" diff --git a/po/sr.po b/po/sr.po index 25e746d1a6..2dae2bc9bf 100644 --- a/po/sr.po +++ b/po/sr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Serbian (http://app.transifex.com/mc/mc/language/sr/)\n" @@ -549,30 +549,12 @@ msgstr "Добављам датотеку" msgid "Changes to file lost" msgstr "Измене у датотеци су изгубљене" -#, c-format -msgid "%s is not a directory\n" -msgstr "„%s“ није директоријум\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Директоријум „%s“ није у вашем власништву\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Не могу да поставим исправне дозволе за директоријум %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Не могу да направим привремени директоријум %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Привремене датотеке ће бити направљене у %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Привремене датотеке неће бити направљене\n" - msgid "Press any key to continue..." msgstr "Притиснитенеки тастер да наставите..." @@ -4665,3 +4647,23 @@ msgstr "Да наставим са почетка?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Не могу да довучем месни примерак „/ftp://some.host/editme.txt“" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "„%s“ није директоријум\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Директоријум „%s“ није у вашем власништву\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Не могу да поставим исправне дозволе за директоријум %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Привремене датотеке ће бити направљене у %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Привремене датотеке неће бити направљене\n" diff --git a/po/sv.po b/po/sv.po index 9e7d636001..d855e41c03 100644 --- a/po/sv.po +++ b/po/sv.po @@ -18,7 +18,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Alexander Kilian , 2022\n" "Language-Team: Swedish (http://app.transifex.com/mc/mc/language/sv/)\n" @@ -564,30 +564,12 @@ msgstr "Hämtar fil" msgid "Changes to file lost" msgstr "Ändringar i filen gick förlorade" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s är inte en katalog\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Katalogen %s ägs inte av dig\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Kan inte ställa in rätt rättigheter för katalogen %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Kan inte skapa temporär katalog %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Temporära filer kommer att skapas i %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Temporära filer kommer inte att skapas\n" - msgid "Press any key to continue..." msgstr "Tryck valfri tangent för att fortsätta..." @@ -4692,3 +4674,23 @@ msgstr "Fortsätt från början?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Kan inte hämta en lokal kopia av /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s är inte en katalog\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Katalogen %s ägs inte av dig\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Kan inte ställa in rätt rättigheter för katalogen %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Temporära filer kommer att skapas i %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Temporära filer kommer inte att skapas\n" diff --git a/po/szl.po b/po/szl.po index fdec727e49..fce0ca7c2f 100644 --- a/po/szl.po +++ b/po/szl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Silesian (http://app.transifex.com/mc/mc/language/szl/)\n" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/ta.po b/po/ta.po index 83989f55e9..790167b293 100644 --- a/po/ta.po +++ b/po/ta.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Tamil (http://app.transifex.com/mc/mc/language/ta/)\n" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/te.po b/po/te.po index 264c331bad..d8182b2c92 100644 --- a/po/te.po +++ b/po/te.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Telugu (http://app.transifex.com/mc/mc/language/te/)\n" @@ -531,27 +531,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/tr.po b/po/tr.po index 259c9ac519..c0e2cf9eda 100644 --- a/po/tr.po +++ b/po/tr.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Mehmet Akif 9oglu, 2023\n" "Language-Team: Turkish (http://app.transifex.com/mc/mc/language/tr/)\n" @@ -568,30 +568,12 @@ msgstr "Dosya alınması" msgid "Changes to file lost" msgstr "Değişiklikler kayıp" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s bir dizin değil\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Dizin %s sahibi değilsiniz\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Dizin %s için doğru yetkiler ayarlanamıyor\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Geçici dizin %s oluşturulamıyor: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Geçici dosyalar %s içinde oluşturulacak\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Geçici dosyalar oluşturulmayacak\n" - msgid "Press any key to continue..." msgstr "Bir tuşa basınız..." @@ -4695,3 +4677,23 @@ msgstr "Başından devam edilsin mi?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr " /ftp://some.host/editme.txt 'in yerel kopyası alınamadı" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s bir dizin değil\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Dizin %s sahibi değilsiniz\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Dizin %s için doğru yetkiler ayarlanamıyor\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Geçici dosyalar %s içinde oluşturulacak\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Geçici dosyalar oluşturulmayacak\n" diff --git a/po/uk.po b/po/uk.po index 99236f3f4f..2a67c538eb 100644 --- a/po/uk.po +++ b/po/uk.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Rostyslav Haitkulov , 2023\n" "Language-Team: Ukrainian (http://app.transifex.com/mc/mc/language/uk/)\n" @@ -577,30 +577,12 @@ msgstr "Триває отримання файлу" msgid "Changes to file lost" msgstr "Зміни у файлі втрачено" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s не є каталогом\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Каталог %s вам не належить\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Не вдалося встановити правильні права для каталога %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Не вдалося створити тимчасовий каталог «%s»: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Тимчасові файли створюватимуться у %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Тимчасові файли не створюватимуться\n" - msgid "Press any key to continue..." msgstr "Щоб продовжити, натисніть будь-яку клавішу…" @@ -4749,3 +4731,23 @@ msgstr "Почати спочатку?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "Не вдалося отримати локальну копію /ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s не є каталогом\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Каталог %s вам не належить\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Не вдалося встановити правильні права для каталога %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Тимчасові файли створюватимуться у %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Тимчасові файли не створюватимуться\n" diff --git a/po/uz.po b/po/uz.po index 7476dc743f..cb940d4848 100644 --- a/po/uz.po +++ b/po/uz.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Uzbek (http://app.transifex.com/mc/mc/language/uz/)\n" @@ -531,27 +531,9 @@ msgid "Changes to file lost" msgstr "" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/vi.po b/po/vi.po index 533c22da1a..0fa5014371 100644 --- a/po/vi.po +++ b/po/vi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Vietnamese (http://app.transifex.com/mc/mc/language/vi/)\n" @@ -533,30 +533,12 @@ msgstr "Nhận tập tin" msgid "Changes to file lost" msgstr "Thay đổi tới tập tin bị mất" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s không phải là một thư mục\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "Bạn không sở hữu thư mục %s\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "Không đặt được quyền hạn đúng cho thư mục %s\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "Không tạo được thư mục tạm thời %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "Tập tin tạm thời sẽ được tạo trong thư mục %s\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "Tập tin tạm thời sẽ không được tạo ra\n" - msgid "Press any key to continue..." msgstr "Để tiếp tục nhấn phím bất kỳ..." @@ -4481,3 +4463,23 @@ msgstr "" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s không phải là một thư mục\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "Bạn không sở hữu thư mục %s\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "Không đặt được quyền hạn đúng cho thư mục %s\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "Tập tin tạm thời sẽ được tạo trong thư mục %s\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "Tập tin tạm thời sẽ không được tạo ra\n" diff --git a/po/wa.po b/po/wa.po index 8982dd3a14..5be13085cf 100644 --- a/po/wa.po +++ b/po/wa.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Walloon (http://app.transifex.com/mc/mc/language/wa/)\n" @@ -532,27 +532,9 @@ msgid "Changes to file lost" msgstr "Les candjmints do fitchî ont stî pierdous" #, c-format -msgid "%s is not a directory\n" -msgstr "" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "" - -#, c-format -msgid "Temporary files will not be created\n" +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "" msgid "Press any key to continue..." diff --git a/po/zh_CN.po b/po/zh_CN.po index bdb3e79cfb..d8cf529868 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -18,7 +18,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Gurbuzguven <6mehmet6@gmail.com>, 2021\n" "Language-Team: Chinese (China) (http://app.transifex.com/mc/mc/language/" @@ -563,30 +563,12 @@ msgstr "正在获取文件" msgid "Changes to file lost" msgstr "对文件的修改被丢失" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s 不是目录\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "目录 %s 的所有者不是您\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "无法正确设置目录 %s 的权限\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "无法创建临时目录 %s: %s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "在 %s 中创建临时文件\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "无法创建临时文件\n" - msgid "Press any key to continue..." msgstr "按任意键继续..." @@ -4676,3 +4658,23 @@ msgstr "从头继续搜索?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "无法获取 /ftp://some.host/editme.txt 的本地副本" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s 不是目录\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "目录 %s 的所有者不是您\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "无法正确设置目录 %s 的权限\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "在 %s 中创建临时文件\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "无法创建临时文件\n" diff --git a/po/zh_TW.po b/po/zh_TW.po index a8de716903..ceaa7229e9 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2024-04-07 16:41+0300\n" +"POT-Creation-Date: 2024-06-02 12:47+0300\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Meng Pang Wang, 2023\n" "Language-Team: Chinese (Taiwan) (http://app.transifex.com/mc/mc/language/" @@ -551,30 +551,12 @@ msgstr "取得檔案中" msgid "Changes to file lost" msgstr "欲切換到的檔案已遺失" -#, c-format -msgid "%s is not a directory\n" -msgstr "%s 不是一個目錄\n" - -#, c-format -msgid "Directory %s is not owned by you\n" -msgstr "您不是目錄 %s 的擁有者\n" - -#, c-format -msgid "Cannot set correct permissions for directory %s\n" -msgstr "無法為目錄 %s 設定適當的權限\n" - -#, c-format -msgid "Cannot create temporary directory %s: %s\n" +#, fuzzy, c-format +msgid "" +"Cannot create temporary directory %s: %s.\n" +"Temporary files will not be created\n" msgstr "無法建立暫存目錄 %s:%s\n" -#, c-format -msgid "Temporary files will be created in %s\n" -msgstr "將於 %s 建立暫存檔案\n" - -#, c-format -msgid "Temporary files will not be created\n" -msgstr "將不會建立暫存檔案\n" - msgid "Press any key to continue..." msgstr "按任意鍵繼續..." @@ -4551,3 +4533,23 @@ msgstr "從頭開始?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" msgstr "無法取得本地的副本在 ftp://some.host/editme.txt" + +#, c-format +#~ msgid "%s is not a directory\n" +#~ msgstr "%s 不是一個目錄\n" + +#, c-format +#~ msgid "Directory %s is not owned by you\n" +#~ msgstr "您不是目錄 %s 的擁有者\n" + +#, c-format +#~ msgid "Cannot set correct permissions for directory %s\n" +#~ msgstr "無法為目錄 %s 設定適當的權限\n" + +#, c-format +#~ msgid "Temporary files will be created in %s\n" +#~ msgstr "將於 %s 建立暫存檔案\n" + +#, c-format +#~ msgid "Temporary files will not be created\n" +#~ msgstr "將不會建立暫存檔案\n" diff --git a/src/Makefile.am b/src/Makefile.am index cca050cb8e..06bd0bacbb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,6 +26,13 @@ SUBDIRS += consaver AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\" endif +# required for textconf.c +if ENABLE_VFS +if ENABLE_VFS_SFTP +AM_CPPFLAGS += $(LIBSSH_CFLAGS) +endif +endif + AM_CPPFLAGS += -I$(top_srcdir) $(GLIB_CFLAGS) localedir = $(datadir)/locale diff --git a/src/args.c b/src/args.c index 00c4803127..81e9becca5 100644 --- a/src/args.c +++ b/src/args.c @@ -423,8 +423,8 @@ mc_args_add_extended_info_to_help (void) /* --------------------------------------------------------------------------------------------- */ static GString * -mc_args__convert_help_to_syscharset (const gchar * charset, const gchar * error_message_str, - const gchar * help_str) +mc_args__convert_help_to_syscharset (const gchar *charset, const gchar *error_message_str, + const gchar *help_str) { GString *buffer; GIConv conv; @@ -445,8 +445,7 @@ mc_args__convert_help_to_syscharset (const gchar * charset, const gchar * error_ /* --------------------------------------------------------------------------------------------- */ static gboolean -parse_mc_e_argument (const gchar * option_name, const gchar * value, gpointer data, - GError ** mcerror) +parse_mc_e_argument (const gchar *option_name, const gchar *value, gpointer data, GError **mcerror) { (void) option_name; (void) value; @@ -462,8 +461,7 @@ parse_mc_e_argument (const gchar * option_name, const gchar * value, gpointer da /* --------------------------------------------------------------------------------------------- */ static gboolean -parse_mc_v_argument (const gchar * option_name, const gchar * value, gpointer data, - GError ** mcerror) +parse_mc_v_argument (const gchar *option_name, const gchar *value, gpointer data, GError **mcerror) { (void) option_name; (void) value; @@ -618,7 +616,7 @@ mc_setup_run_mode (char **argv) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_args_parse (int *argc, char ***argv, const char *translation_domain, GError ** mcerror) +mc_args_parse (int *argc, char ***argv, const char *translation_domain, GError **mcerror) { const gchar *_system_codepage; gboolean ok = TRUE; @@ -734,7 +732,7 @@ mc_args_show_info (void) /* --------------------------------------------------------------------------------------------- */ gboolean -mc_setup_by_args (int argc, char **argv, GError ** mcerror) +mc_setup_by_args (int argc, char **argv, GError **mcerror) { char *tmp; diff --git a/src/background.c b/src/background.c index 74c449e365..ce727c4bd0 100644 --- a/src/background.c +++ b/src/background.c @@ -87,7 +87,7 @@ TaskList *task_list = NULL; /* --------------------------------------------------------------------------------------------- */ static void -register_task_running (file_op_context_t * ctx, pid_t pid, int fd, int to_child, char *info) +register_task_running (file_op_context_t *ctx, pid_t pid, int fd, int to_child, char *info) { TaskList *new; @@ -404,7 +404,7 @@ background_attention (int fd, void *closure) */ static void -parent_call_header (void *routine, int argc, enum ReturnType type, file_op_context_t * ctx) +parent_call_header (void *routine, int argc, enum ReturnType type, file_op_context_t *ctx) { int have_ctx; ssize_t ret; @@ -518,7 +518,7 @@ unregister_task_with_pid (pid_t pid) * -1 on failure */ int -do_background (file_op_context_t * ctx, char *info) +do_background (file_op_context_t *ctx, char *info) { int comm[2]; /* control connection stream */ int back_comm[2]; /* back connection */ @@ -594,7 +594,7 @@ do_background (file_op_context_t * ctx, char *info) /* --------------------------------------------------------------------------------------------- */ int -parent_call (void *routine, file_op_context_t * ctx, int argc, ...) +parent_call (void *routine, file_op_context_t *ctx, int argc, ...) { int ret; va_list ap; @@ -625,7 +625,7 @@ parent_call_string (void *routine, int argc, ...) /* event callback */ gboolean -background_parent_call (const gchar * event_group_name, const gchar * event_name, +background_parent_call (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { ev_background_parent_call_t *event_data = (ev_background_parent_call_t *) data; @@ -644,7 +644,7 @@ background_parent_call (const gchar * event_group_name, const gchar * event_name /* event callback */ gboolean -background_parent_call_string (const gchar * event_group_name, const gchar * event_name, +background_parent_call_string (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { ev_background_parent_call_t *event_data = (ev_background_parent_call_t *) data; diff --git a/src/clipboard.c b/src/clipboard.c index a9197929c3..51284b0e7a 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -69,7 +69,7 @@ static const mode_t clip_open_mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; /* event callback */ gboolean -clipboard_file_to_ext_clip (const gchar * event_group_name, const gchar * event_name, +clipboard_file_to_ext_clip (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { char *tmp, *cmd; @@ -97,7 +97,7 @@ clipboard_file_to_ext_clip (const gchar * event_group_name, const gchar * event_ /* event callback */ gboolean -clipboard_file_from_ext_clip (const gchar * event_group_name, const gchar * event_name, +clipboard_file_from_ext_clip (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { mc_pipe_t *p; @@ -171,7 +171,7 @@ clipboard_file_from_ext_clip (const gchar * event_group_name, const gchar * even /* event callback */ gboolean -clipboard_text_to_file (const gchar * event_group_name, const gchar * event_name, +clipboard_text_to_file (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { int file; @@ -208,7 +208,7 @@ clipboard_text_to_file (const gchar * event_group_name, const gchar * event_name /* event callback */ gboolean -clipboard_text_from_file (const gchar * event_group_name, const gchar * event_name, +clipboard_text_from_file (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { char buf[BUF_LARGE]; diff --git a/src/consaver/cons.saver.c b/src/consaver/cons.saver.c index dda9c413f3..5b04fdd28c 100644 --- a/src/consaver/cons.saver.c +++ b/src/consaver/cons.saver.c @@ -145,7 +145,7 @@ send_contents (char *buffer, unsigned int columns, unsigned int rows) /* --------------------------------------------------------------------------------------------- */ -static void __attribute__ ((noreturn)) die (void) +static void __attribute__((noreturn)) die (void) { unsigned char zero = 0; ssize_t ret; diff --git a/src/diffviewer/search.c b/src/diffviewer/search.c index e4cc306097..d022bf2218 100644 --- a/src/diffviewer/search.c +++ b/src/diffviewer/search.c @@ -72,7 +72,7 @@ static mcdiffview_search_options_t mcdiffview_search_options = { /* --------------------------------------------------------------------------------------------- */ static gboolean -mcdiffview_dialog_search (WDiff * dview) +mcdiffview_dialog_search (WDiff *dview) { char *exp = NULL; int qd_result; @@ -144,7 +144,7 @@ mcdiffview_dialog_search (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static gboolean -mcdiffview_do_search_backward (WDiff * dview) +mcdiffview_do_search_backward (WDiff *dview) { ssize_t ind; @@ -179,7 +179,7 @@ mcdiffview_do_search_backward (WDiff * dview) static gboolean -mcdiffview_do_search_forward (WDiff * dview) +mcdiffview_do_search_forward (WDiff *dview) { size_t ind; @@ -191,7 +191,7 @@ mcdiffview_do_search_forward (WDiff * dview) return FALSE; } - for (ind = (size_t)++ dview->search.last_accessed_num_line; ind < dview->a[dview->ord]->len; + for (ind = (size_t) ++dview->search.last_accessed_num_line; ind < dview->a[dview->ord]->len; ind++) { DIFFLN *p; @@ -213,7 +213,7 @@ mcdiffview_do_search_forward (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -mcdiffview_do_search (WDiff * dview) +mcdiffview_do_search (WDiff *dview) { gboolean present_result = FALSE; @@ -242,7 +242,7 @@ mcdiffview_do_search (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ void -dview_search_cmd (WDiff * dview) +dview_search_cmd (WDiff *dview) { if (dview->dsrc != DATA_SRC_MEM) { @@ -276,7 +276,7 @@ dview_search_cmd (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ void -dview_continue_search_cmd (WDiff * dview) +dview_continue_search_cmd (WDiff *dview) { if (dview->dsrc != DATA_SRC_MEM) error_dialog (_("Search"), _("Search is disabled")); diff --git a/src/diffviewer/ydiff.c b/src/diffviewer/ydiff.c index f35a8fd831..2c6326b04f 100644 --- a/src/diffviewer/ydiff.c +++ b/src/diffviewer/ydiff.c @@ -135,7 +135,7 @@ fill_by_space (char *buf, size_t n, gboolean zero_terminate) /* --------------------------------------------------------------------------------------------- */ static gboolean -rewrite_backup_content (const vfs_path_t * from_file_name_vpath, const char *to_file_name) +rewrite_backup_content (const vfs_path_t *from_file_name_vpath, const char *to_file_name) { FILE *backup_fd; char *contents; @@ -235,7 +235,7 @@ dview_fdopen (int fd) */ static int -dview_ffree (FBUF * fs) +dview_ffree (FBUF *fs) { int rv = 0; @@ -326,7 +326,7 @@ dview_fopen (const char *filename, int flags) */ static size_t -dview_fgets (char *buf, size_t size, FBUF * fs) +dview_fgets (char *buf, size_t size, FBUF *fs) { size_t j = 0; @@ -368,7 +368,7 @@ dview_fgets (char *buf, size_t size, FBUF * fs) */ static off_t -dview_fseek (FBUF * fs, off_t off, int whence) +dview_fseek (FBUF *fs, off_t off, int whence) { off_t rv; @@ -407,7 +407,7 @@ dview_fseek (FBUF * fs, off_t off, int whence) */ static off_t -dview_freset (FBUF * fs) +dview_freset (FBUF *fs) { off_t rv; @@ -431,7 +431,7 @@ dview_freset (FBUF * fs) */ static ssize_t -dview_fwrite (FBUF * fs, const char *buf, size_t size) +dview_fwrite (FBUF *fs, const char *buf, size_t size) { ssize_t rv; @@ -453,7 +453,7 @@ dview_fwrite (FBUF * fs, const char *buf, size_t size) */ static off_t -dview_ftrunc (FBUF * fs) +dview_ftrunc (FBUF *fs) { off_t off; @@ -482,7 +482,7 @@ dview_ftrunc (FBUF * fs) */ static int -dview_fclose (FBUF * fs) +dview_fclose (FBUF *fs) { int rv = -1; @@ -547,7 +547,7 @@ dview_popen (const char *cmd, int flags) */ static int -dview_pclose (FBUF * fs) +dview_pclose (FBUF *fs) { int rv = -1; @@ -690,7 +690,7 @@ scan_deci (const char **str, int *n) */ static int -scan_line (const char *p, GArray * ops) +scan_line (const char *p, GArray *ops) { DIFFCMD op; @@ -765,7 +765,7 @@ scan_line (const char *p, GArray * ops) */ static int -scan_diff (FBUF * f, GArray * ops) +scan_diff (FBUF *f, GArray *ops) { int sz; char buf[BUFSIZ]; @@ -804,8 +804,7 @@ scan_diff (FBUF * f, GArray * ops) */ static int -dff_execute (const char *args, const char *extra, const char *file1, const char *file2, - GArray * ops) +dff_execute (const char *args, const char *extra, const char *file1, const char *file2, GArray *ops) { static const char *opt = " --old-group-format='%df%(f=l?:,%dl)d%dE\n'" @@ -847,7 +846,7 @@ dff_execute (const char *args, const char *extra, const char *file1, const char /* --------------------------------------------------------------------------------------------- */ static gboolean -printer_for (char ch, DFUNC printer, void *ctx, FBUF * f, int *line, off_t * off) +printer_for (char ch, DFUNC printer, void *ctx, FBUF *f, int *line, off_t *off) { size_t sz; char buf[BUFSIZ]; @@ -891,7 +890,7 @@ printer_for (char ch, DFUNC printer, void *ctx, FBUF * f, int *line, off_t * off */ static int -dff_reparse (diff_place_t ord, const char *filename, const GArray * ops, DFUNC printer, void *ctx) +dff_reparse (diff_place_t ord, const char *filename, const GArray *ops, DFUNC printer, void *ctx) { size_t i; FBUF *f; @@ -1000,7 +999,7 @@ dff_reparse (diff_place_t ord, const char *filename, const GArray * ops, DFUNC p */ static int -lcsubstr (const char *s, int m, const char *t, int n, GArray * ret, int min) +lcsubstr (const char *s, int m, const char *t, int n, GArray *ret, int min) { int i, j; int *Lprev, *Lcurr; @@ -1097,7 +1096,7 @@ lcsubstr (const char *s, int m, const char *t, int n, GArray * ret, int min) */ static gboolean -hdiff_multi (const char *s, const char *t, const BRACKET bracket, int min, GArray * hdiff, +hdiff_multi (const char *s, const char *t, const BRACKET bracket, int min, GArray *hdiff, unsigned int depth) { BRACKET p; @@ -1175,7 +1174,7 @@ hdiff_multi (const char *s, const char *t, const BRACKET bracket, int min, GArra */ static gboolean -hdiff_scan (const char *s, int m, const char *t, int n, int min, GArray * hdiff, unsigned int depth) +hdiff_scan (const char *s, int m, const char *t, int n, int min, GArray *hdiff, unsigned int depth) { int i; BRACKET b; @@ -1210,7 +1209,7 @@ hdiff_scan (const char *s, int m, const char *t, int n, int min, GArray * hdiff, */ static gboolean -is_inside (int k, GArray * hdiff, diff_place_t ord) +is_inside (int k, GArray *hdiff, diff_place_t ord) { size_t i; BRACKET *b; @@ -1422,7 +1421,7 @@ cvt_mget (const char *src, size_t srcsize, char *dst, int dstsize, int skip, int static int cvt_mgeta (const char *src, size_t srcsize, char *dst, int dstsize, int skip, int ts, - gboolean show_cr, GArray * hdiff, diff_place_t ord, char *att) + gboolean show_cr, GArray *hdiff, diff_place_t ord, char *att) { int sz = 0; @@ -1519,7 +1518,7 @@ cvt_mgeta (const char *src, size_t srcsize, char *dst, int dstsize, int skip, in */ static int -cvt_fget (FBUF * f, off_t off, char *dst, size_t dstsize, int skip, int ts, gboolean show_cr) +cvt_fget (FBUF *f, off_t off, char *dst, size_t dstsize, int skip, int ts, gboolean show_cr) { int base = 0; int old_base = base; @@ -1682,7 +1681,7 @@ printer (void *ctx, int ch, int line, off_t off, size_t sz, const char *str) /* --------------------------------------------------------------------------------------------- */ static int -redo_diff (WDiff * dview) +redo_diff (WDiff *dview) { FBUF *const *f = dview->f; PRINTER_CTX ctx; @@ -1781,7 +1780,7 @@ redo_diff (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -destroy_hdiff (WDiff * dview) +destroy_hdiff (WDiff *dview) { if (dview->hdiff != NULL) { @@ -1823,7 +1822,7 @@ get_digits (unsigned int n) /* --------------------------------------------------------------------------------------------- */ static int -get_line_numbers (const GArray * a, size_t pos, int *linenum, int *lineofs) +get_line_numbers (const GArray *a, size_t pos, int *linenum, int *lineofs) { const DIFFLN *p; @@ -1858,7 +1857,7 @@ get_line_numbers (const GArray * a, size_t pos, int *linenum, int *lineofs) /* --------------------------------------------------------------------------------------------- */ static int -calc_nwidth (const GArray * const *a) +calc_nwidth (const GArray *const *a) { int l1, o1; int l2, o2; @@ -1873,7 +1872,7 @@ calc_nwidth (const GArray * const *a) /* --------------------------------------------------------------------------------------------- */ static int -find_prev_hunk (const GArray * a, int pos) +find_prev_hunk (const GArray *a, int pos) { #if 1 for (; pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch != EQU_CH; pos--) @@ -1897,7 +1896,7 @@ find_prev_hunk (const GArray * a, int pos) /* --------------------------------------------------------------------------------------------- */ static size_t -find_next_hunk (const GArray * a, size_t pos) +find_next_hunk (const GArray *a, size_t pos) { for (; pos < a->len && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch != EQU_CH; pos++) ; @@ -1919,7 +1918,7 @@ find_next_hunk (const GArray * a, size_t pos) */ static int -get_current_hunk (WDiff * dview, int *start_line1, int *end_line1, int *start_line2, int *end_line2) +get_current_hunk (WDiff *dview, int *start_line1, int *end_line1, int *start_line2, int *end_line2) { const GArray *a0 = dview->a[DIFF_LEFT]; const GArray *a1 = dview->a[DIFF_RIGHT]; @@ -1987,7 +1986,7 @@ get_current_hunk (WDiff * dview, int *start_line1, int *end_line1, int *start_li */ static void -dview_remove_hunk (WDiff * dview, FILE * merge_file, int from1, int to1, +dview_remove_hunk (WDiff *dview, FILE *merge_file, int from1, int to1, action_direction_t merge_direction) { int line; @@ -2024,7 +2023,7 @@ dview_remove_hunk (WDiff * dview, FILE * merge_file, int from1, int to1, */ static void -dview_add_hunk (WDiff * dview, FILE * merge_file, int from1, int from2, int to2, +dview_add_hunk (WDiff *dview, FILE *merge_file, int from1, int from2, int to2, action_direction_t merge_direction) { int line; @@ -2071,7 +2070,7 @@ dview_add_hunk (WDiff * dview, FILE * merge_file, int from1, int from2, int to2, */ static void -dview_replace_hunk (WDiff * dview, FILE * merge_file, int from1, int to1, int from2, int to2, +dview_replace_hunk (WDiff *dview, FILE *merge_file, int from1, int to1, int from2, int to2, action_direction_t merge_direction) { int line1, line2; @@ -2116,7 +2115,7 @@ dview_replace_hunk (WDiff * dview, FILE * merge_file, int from1, int to1, int fr */ static void -do_merge_hunk (WDiff * dview, action_direction_t merge_direction) +do_merge_hunk (WDiff *dview, action_direction_t merge_direction) { int from1, to1, from2, to2; int hunk; @@ -2192,7 +2191,7 @@ do_merge_hunk (WDiff * dview, action_direction_t merge_direction) /* view routines and callbacks ********************************************** */ static void -dview_compute_split (WDiff * dview, int i) +dview_compute_split (WDiff *dview, int i) { dview->bias += i; if (dview->bias < 2 - dview->half1) @@ -2204,7 +2203,7 @@ dview_compute_split (WDiff * dview, int i) /* --------------------------------------------------------------------------------------------- */ static void -dview_compute_areas (WDiff * dview) +dview_compute_areas (WDiff *dview) { Widget *w = WIDGET (dview); @@ -2218,7 +2217,7 @@ dview_compute_areas (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -dview_reread (WDiff * dview) +dview_reread (WDiff *dview) { int ndiff; @@ -2242,7 +2241,7 @@ dview_reread (WDiff * dview) #ifdef HAVE_CHARSET static void -dview_set_codeset (WDiff * dview) +dview_set_codeset (WDiff *dview) { const char *encoding_id = NULL; @@ -2268,7 +2267,7 @@ dview_set_codeset (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -dview_select_encoding (WDiff * dview) +dview_select_encoding (WDiff *dview) { if (do_select_codepage ()) dview_set_codeset (dview); @@ -2281,7 +2280,7 @@ dview_select_encoding (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -dview_load_options (WDiff * dview) +dview_load_options (WDiff *dview) { gboolean show_numbers; int tab_size; @@ -2316,7 +2315,7 @@ dview_load_options (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -dview_save_options (WDiff * dview) +dview_save_options (WDiff *dview) { mc_config_set_bool (mc_global.main_config, "DiffView", "show_symbols", dview->display_symbols); mc_config_set_bool (mc_global.main_config, "DiffView", "show_numbers", @@ -2340,7 +2339,7 @@ dview_save_options (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -dview_diff_options (WDiff * dview) +dview_diff_options (WDiff *dview) { const char *quality_str[] = { N_("No&rmal"), @@ -2380,7 +2379,7 @@ dview_diff_options (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static int -dview_init (WDiff * dview, const char *args, const char *file1, const char *file2, +dview_init (WDiff *dview, const char *args, const char *file1, const char *file2, const char *label1, const char *label2, DSRC dsrc) { FBUF *f[DIFF_COUNT]; @@ -2461,7 +2460,7 @@ dview_init (WDiff * dview, const char *args, const char *file1, const char *file /* --------------------------------------------------------------------------------------------- */ static void -dview_fini (WDiff * dview) +dview_fini (WDiff *dview) { if (dview->dsrc != DATA_SRC_MEM) { @@ -2493,7 +2492,7 @@ dview_fini (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static int -dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int height, int width) +dview_display_file (const WDiff *dview, diff_place_t ord, int r, int c, int height, int width) { size_t i, k; int j; @@ -2725,7 +2724,7 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei /* --------------------------------------------------------------------------------------------- */ static void -dview_status (const WDiff * dview, diff_place_t ord, int width, int c) +dview_status (const WDiff *dview, diff_place_t ord, int width, int c) { const char *buf; int filename_width; @@ -2758,7 +2757,7 @@ dview_status (const WDiff * dview, diff_place_t ord, int width, int c) /* --------------------------------------------------------------------------------------------- */ static void -dview_redo (WDiff * dview) +dview_redo (WDiff *dview) { if (dview->display_numbers != 0) { @@ -2774,7 +2773,7 @@ dview_redo (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -dview_update (WDiff * dview) +dview_update (WDiff *dview) { int height = dview->height; int width1, width2; @@ -2858,7 +2857,7 @@ dview_update (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -dview_edit (WDiff * dview, diff_place_t ord) +dview_edit (WDiff *dview, diff_place_t ord) { Widget *h; gboolean h_modal; @@ -2894,7 +2893,7 @@ dview_edit (WDiff * dview, diff_place_t ord) /* --------------------------------------------------------------------------------------------- */ static void -dview_goto_cmd (WDiff * dview, diff_place_t ord) +dview_goto_cmd (WDiff *dview, diff_place_t ord) { static gboolean first_run = TRUE; @@ -2941,7 +2940,7 @@ dview_goto_cmd (WDiff * dview, diff_place_t ord) /* --------------------------------------------------------------------------------------------- */ static void -dview_labels (WDiff * dview) +dview_labels (WDiff *dview) { Widget *d = WIDGET (dview); WButtonBar *b; @@ -2960,7 +2959,7 @@ dview_labels (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static gboolean -dview_save (WDiff * dview) +dview_save (WDiff *dview) { gboolean res = TRUE; @@ -2980,7 +2979,7 @@ dview_save (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static void -dview_do_save (WDiff * dview) +dview_do_save (WDiff *dview) { (void) dview_save (dview); } @@ -2992,7 +2991,7 @@ dview_do_save (WDiff * dview) * ask user. */ static gboolean -dview_ok_to_exit (WDiff * dview) +dview_ok_to_exit (WDiff *dview) { gboolean res = TRUE; int act; @@ -3034,7 +3033,7 @@ dview_ok_to_exit (WDiff * dview) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -dview_execute_cmd (WDiff * dview, long command) +dview_execute_cmd (WDiff *dview, long command) { cb_ret_t res = MSG_HANDLED; @@ -3198,7 +3197,7 @@ dview_execute_cmd (WDiff * dview, long command) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -dview_handle_key (WDiff * dview, int key) +dview_handle_key (WDiff *dview, int key) { long command; @@ -3216,7 +3215,7 @@ dview_handle_key (WDiff * dview, int key) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -dview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +dview_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDiff *dview = (WDiff *) w; WDialog *h = DIALOG (w->owner); @@ -3268,7 +3267,7 @@ dview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d /* --------------------------------------------------------------------------------------------- */ static void -dview_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +dview_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { WDiff *dview = (WDiff *) w; @@ -3295,7 +3294,7 @@ dview_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -dview_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +dview_dialog_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDiff *dview; WDialog *h = DIALOG (w); @@ -3325,7 +3324,7 @@ dview_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, /* --------------------------------------------------------------------------------------------- */ static char * -dview_get_title (const WDialog * h, size_t len) +dview_get_title (const WDialog *h, size_t len) { const WDiff *dview; const char *modified = " (*) "; diff --git a/src/editor/.gitignore b/src/editor/.gitignore deleted file mode 100644 index e995588475..0000000000 --- a/src/editor/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.deps -Makefile -Makefile.in diff --git a/src/editor/bookmark.c b/src/editor/bookmark.c index 040a01ba73..8d7782ea4e 100644 --- a/src/editor/bookmark.c +++ b/src/editor/bookmark.c @@ -65,7 +65,7 @@ by book_mark_found() i.e. last in is the one seen */ static edit_book_mark_t * -double_marks (WEdit * edit, edit_book_mark_t * p) +double_marks (WEdit *edit, edit_book_mark_t *p) { (void) edit; @@ -79,7 +79,7 @@ double_marks (WEdit * edit, edit_book_mark_t * p) /** returns the first bookmark on or before this line */ edit_book_mark_t * -book_mark_find (WEdit * edit, long line) +book_mark_find (WEdit *edit, long line) { edit_book_mark_t *p; @@ -151,7 +151,7 @@ book_mark_find (WEdit * edit, long line) */ gboolean -book_mark_query_color (WEdit * edit, long line, int c) +book_mark_query_color (WEdit *edit, long line, int c) { if (edit->book_mark != NULL) { @@ -173,7 +173,7 @@ book_mark_query_color (WEdit * edit, long line, int c) /** insert a bookmark at this line */ void -book_mark_insert (WEdit * edit, long line, int c) +book_mark_insert (WEdit *edit, long line, int c) { edit_book_mark_t *p, *q; @@ -215,7 +215,7 @@ book_mark_insert (WEdit * edit, long line, int c) */ gboolean -book_mark_clear (WEdit * edit, long line, int c) +book_mark_clear (WEdit *edit, long line, int c) { edit_book_mark_t *p, *q; gboolean r = FALSE; @@ -249,7 +249,7 @@ book_mark_clear (WEdit * edit, long line, int c) /** clear all bookmarks matching this color, if c is -1 clears all */ void -book_mark_flush (WEdit * edit, int c) +book_mark_flush (WEdit *edit, int c) { edit_book_mark_t *p, *q; @@ -280,7 +280,7 @@ book_mark_flush (WEdit * edit, int c) /** shift down bookmarks after this line */ void -book_mark_inc (WEdit * edit, long line) +book_mark_inc (WEdit *edit, long line) { if (edit->book_mark != NULL) { @@ -296,7 +296,7 @@ book_mark_inc (WEdit * edit, long line) /** shift up bookmarks after this line */ void -book_mark_dec (WEdit * edit, long line) +book_mark_dec (WEdit *edit, long line) { if (edit->book_mark != NULL) { @@ -312,7 +312,7 @@ book_mark_dec (WEdit * edit, long line) /** prepare line positions of bookmarks to be saved to file */ void -book_mark_serialize (WEdit * edit, int color) +book_mark_serialize (WEdit *edit, int color) { if (edit->serialized_bookmarks != NULL) g_array_set_size (edit->serialized_bookmarks, 0); @@ -335,7 +335,7 @@ book_mark_serialize (WEdit * edit, int color) /** restore bookmarks from saved line positions */ void -book_mark_restore (WEdit * edit, int color) +book_mark_restore (WEdit *edit, int color) { if (edit->serialized_bookmarks != NULL) { diff --git a/src/editor/edit-impl.h b/src/editor/edit-impl.h index f398eb7050..a9f938cca1 100644 --- a/src/editor/edit-impl.h +++ b/src/editor/edit-impl.h @@ -264,7 +264,7 @@ int editcmd_dialog_raw_key_query (const char *heading, const char *query, gboole * @return TRUE on success, FALSE on failure. */ static inline gboolean -edit_reload (WEdit * edit, const vfs_path_t * filename_vpath) +edit_reload (WEdit *edit, const vfs_path_t *filename_vpath) { edit_arg_t arg; diff --git a/src/editor/edit.c b/src/editor/edit.c index 1da706220a..aaf79bf8c7 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -134,8 +134,7 @@ const char VERTICAL_MAGIC[] = { '\1', '\1', '\1', '\1', '\n' }; static const struct edit_filters { const char *read, *write, *extension; -} all_filters[] = -{ +} all_filters[] = { /* *INDENT-OFF* */ { "xz -cd %s 2>&1", "xz > %s", ".xz"}, { "zstd -cd %s 2>&1", "zstd > %s", ".zst"}, @@ -156,7 +155,7 @@ static const off_t filesize_default_threshold = 64 * 1024 * 1024; /* 64 MB /* --------------------------------------------------------------------------------------------- */ static int -edit_load_status_update_cb (status_msg_t * sm) +edit_load_status_update_cb (status_msg_t *sm) { simple_status_msg_t *ssm = SIMPLE_STATUS_MSG (sm); edit_buffer_read_file_status_msg_t *rsm = (edit_buffer_read_file_status_msg_t *) sm; @@ -193,7 +192,7 @@ edit_load_status_update_cb (status_msg_t * sm) */ static gboolean -edit_load_file_fast (edit_buffer_t * buf, const vfs_path_t * filename_vpath) +edit_load_file_fast (edit_buffer_t *buf, const vfs_path_t *filename_vpath) { int file; gboolean ret; @@ -240,7 +239,7 @@ edit_load_file_fast (edit_buffer_t * buf, const vfs_path_t * filename_vpath) /** Return index of the filter or -1 is there is no appropriate filter */ static int -edit_find_filter (const vfs_path_t * filename_vpath) +edit_find_filter (const vfs_path_t *filename_vpath) { if (filename_vpath != NULL) { @@ -260,7 +259,7 @@ edit_find_filter (const vfs_path_t * filename_vpath) /* --------------------------------------------------------------------------------------------- */ static char * -edit_get_filter (const vfs_path_t * filename_vpath) +edit_get_filter (const vfs_path_t *filename_vpath) { int i; char *quoted_name; @@ -283,7 +282,7 @@ edit_get_filter (const vfs_path_t * filename_vpath) /* --------------------------------------------------------------------------------------------- */ static off_t -edit_insert_stream (WEdit * edit, FILE * f) +edit_insert_stream (WEdit *edit, FILE *f) { int c; off_t i; @@ -305,7 +304,7 @@ edit_insert_stream (WEdit * edit, FILE * f) */ static gboolean -check_file_access (WEdit * edit, const vfs_path_t * filename_vpath, struct stat *st) +check_file_access (WEdit *edit, const vfs_path_t *filename_vpath, struct stat *st) { static uintmax_t threshold = UINTMAX_MAX; int file; @@ -407,7 +406,7 @@ check_file_access (WEdit * edit, const vfs_path_t * filename_vpath, struct stat * @return TRUE if file was successfully opened and loaded to buffers, FALSE otherwise */ static gboolean -edit_load_file (WEdit * edit) +edit_load_file (WEdit *edit) { gboolean fast_load = TRUE; @@ -481,7 +480,7 @@ edit_load_file (WEdit * edit) */ static void -edit_load_position (WEdit * edit, gboolean load_position) +edit_load_position (WEdit *edit, gboolean load_position) { long line, column; off_t offset; @@ -519,7 +518,7 @@ edit_load_position (WEdit * edit, gboolean load_position) /** Save cursor position in the file */ static void -edit_save_position (WEdit * edit) +edit_save_position (WEdit *edit) { if (edit->filename_vpath == NULL || *(vfs_path_get_by_index (edit->filename_vpath, 0)->path) == '\0') @@ -535,7 +534,7 @@ edit_save_position (WEdit * edit) /** Clean the WEdit stricture except the widget part */ static void -edit_purge_widget (WEdit * edit) +edit_purge_widget (WEdit *edit) { size_t len = sizeof (WEdit) - sizeof (Widget); char *start = (char *) edit + sizeof (Widget); @@ -550,7 +549,7 @@ edit_purge_widget (WEdit * edit) */ static long -edit_pop_undo_action (WEdit * edit) +edit_pop_undo_action (WEdit *edit) { long c; unsigned long sp = edit->undo_stack_pointer; @@ -585,7 +584,7 @@ edit_pop_undo_action (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static long -edit_pop_redo_action (WEdit * edit) +edit_pop_redo_action (WEdit *edit) { long c; unsigned long sp = edit->redo_stack_pointer; @@ -616,7 +615,7 @@ edit_pop_redo_action (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static long -get_prev_undo_action (WEdit * edit) +get_prev_undo_action (WEdit *edit) { long c; unsigned long sp = edit->undo_stack_pointer; @@ -640,7 +639,7 @@ get_prev_undo_action (WEdit * edit) /** is called whenever a modification is made by one of the four routines below */ static void -edit_modification (WEdit * edit) +edit_modification (WEdit *edit) { edit->caches_valid = FALSE; @@ -661,7 +660,7 @@ edit_modification (WEdit * edit) */ static gboolean -is_in_indent (const edit_buffer_t * buf) +is_in_indent (const edit_buffer_t *buf) { off_t p; @@ -682,7 +681,7 @@ is_in_indent (const edit_buffer_t * buf) */ static gboolean -is_blank (const edit_buffer_t * buf, off_t offset) +is_blank (const edit_buffer_t *buf, off_t offset) { off_t s, f; @@ -703,7 +702,7 @@ is_blank (const edit_buffer_t * buf, off_t offset) /** returns the offset of line i */ static off_t -edit_find_line (WEdit * edit, long line) +edit_find_line (WEdit *edit, long line) { long i; long j = 0; @@ -759,7 +758,7 @@ edit_find_line (WEdit * edit, long line) before a non-blank line is reached */ static void -edit_move_up_paragraph (WEdit * edit, gboolean do_scroll) +edit_move_up_paragraph (WEdit *edit, gboolean do_scroll) { long i = 0; @@ -796,7 +795,7 @@ edit_move_up_paragraph (WEdit * edit, gboolean do_scroll) before a non-blank line is reached */ static void -edit_move_down_paragraph (WEdit * edit, gboolean do_scroll) +edit_move_down_paragraph (WEdit *edit, gboolean do_scroll) { long i; @@ -829,7 +828,7 @@ edit_move_down_paragraph (WEdit * edit, gboolean do_scroll) /* --------------------------------------------------------------------------------------------- */ static void -edit_begin_page (WEdit * edit) +edit_begin_page (WEdit *edit) { edit_update_curs_row (edit); edit_move_up (edit, edit->curs_row, FALSE); @@ -838,7 +837,7 @@ edit_begin_page (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_end_page (WEdit * edit) +edit_end_page (WEdit *edit) { edit_update_curs_row (edit); edit_move_down (edit, WIDGET (edit)->rect.lines - edit->curs_row - 1, FALSE); @@ -849,7 +848,7 @@ edit_end_page (WEdit * edit) /** goto beginning of text */ static void -edit_move_to_top (WEdit * edit) +edit_move_to_top (WEdit *edit) { if (edit->buffer.curs_line != 0) { @@ -865,7 +864,7 @@ edit_move_to_top (WEdit * edit) /** goto end of text */ static void -edit_move_to_bottom (WEdit * edit) +edit_move_to_bottom (WEdit *edit) { if (edit->buffer.curs_line < edit->buffer.lines) { @@ -881,7 +880,7 @@ edit_move_to_bottom (WEdit * edit) /** goto beginning of line */ static void -edit_cursor_to_bol (WEdit * edit) +edit_cursor_to_bol (WEdit *edit) { off_t b; @@ -896,7 +895,7 @@ edit_cursor_to_bol (WEdit * edit) /** goto end of line */ static void -edit_cursor_to_eol (WEdit * edit) +edit_cursor_to_eol (WEdit *edit) { off_t b; @@ -954,7 +953,7 @@ my_type_of (int c) /* --------------------------------------------------------------------------------------------- */ static void -edit_left_word_move (WEdit * edit, int s) +edit_left_word_move (WEdit *edit, int s) { while (TRUE) { @@ -986,7 +985,7 @@ edit_left_word_move (WEdit * edit, int s) /* --------------------------------------------------------------------------------------------- */ static void -edit_left_word_move_cmd (WEdit * edit) +edit_left_word_move_cmd (WEdit *edit) { edit_left_word_move (edit, 0); edit->force |= REDRAW_PAGE; @@ -995,7 +994,7 @@ edit_left_word_move_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_right_word_move (WEdit * edit, int s) +edit_right_word_move (WEdit *edit, int s) { while (TRUE) { @@ -1027,7 +1026,7 @@ edit_right_word_move (WEdit * edit, int s) /* --------------------------------------------------------------------------------------------- */ static void -edit_right_word_move_cmd (WEdit * edit) +edit_right_word_move_cmd (WEdit *edit) { edit_right_word_move (edit, 0); edit->force |= REDRAW_PAGE; @@ -1036,7 +1035,7 @@ edit_right_word_move_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_right_char_move_cmd (WEdit * edit) +edit_right_char_move_cmd (WEdit *edit) { int char_length = 1; int c; @@ -1061,7 +1060,7 @@ edit_right_char_move_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_left_char_move_cmd (WEdit * edit) +edit_left_char_move_cmd (WEdit *edit) { int char_length = 1; @@ -1092,7 +1091,7 @@ edit_left_char_move_cmd (WEdit * edit) */ static void -edit_move_updown (WEdit * edit, long lines, gboolean do_scroll, gboolean direction) +edit_move_updown (WEdit *edit, long lines, gboolean do_scroll, gboolean direction) { long p; long l = direction ? edit->buffer.curs_line : edit->buffer.lines - edit->buffer.curs_line; @@ -1135,7 +1134,7 @@ edit_move_updown (WEdit * edit, long lines, gboolean do_scroll, gboolean directi /* --------------------------------------------------------------------------------------------- */ static void -edit_right_delete_word (WEdit * edit) +edit_right_delete_word (WEdit *edit) { while (edit->buffer.curs1 < edit->buffer.size) { @@ -1157,7 +1156,7 @@ edit_right_delete_word (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_left_delete_word (WEdit * edit) +edit_left_delete_word (WEdit *edit) { while (edit->buffer.curs1 > 0) { @@ -1183,7 +1182,7 @@ edit_left_delete_word (WEdit * edit) */ static void -edit_do_undo (WEdit * edit) +edit_do_undo (WEdit *edit) { long ac; long count = 0; @@ -1269,7 +1268,7 @@ edit_do_undo (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_do_redo (WEdit * edit) +edit_do_redo (WEdit *edit) { long ac; long count = 0; @@ -1352,7 +1351,7 @@ edit_do_redo (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_group_undo (WEdit * edit) +edit_group_undo (WEdit *edit) { long ac = KEY_PRESS; long cur_ac = KEY_PRESS; @@ -1373,7 +1372,7 @@ edit_group_undo (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_delete_to_line_end (WEdit * edit) +edit_delete_to_line_end (WEdit *edit) { while (edit_buffer_get_current_byte (&edit->buffer) != '\n' && edit->buffer.curs2 != 0) edit_delete (edit, TRUE); @@ -1382,7 +1381,7 @@ edit_delete_to_line_end (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_delete_to_line_begin (WEdit * edit) +edit_delete_to_line_begin (WEdit *edit) { while (edit_buffer_get_previous_byte (&edit->buffer) != '\n' && edit->buffer.curs1 != 0) edit_backspace (edit, TRUE); @@ -1391,7 +1390,7 @@ edit_delete_to_line_begin (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static gboolean -is_aligned_on_a_tab (WEdit * edit) +is_aligned_on_a_tab (WEdit *edit) { long curs_col; @@ -1403,7 +1402,7 @@ is_aligned_on_a_tab (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static gboolean -right_of_four_spaces (WEdit * edit) +right_of_four_spaces (WEdit *edit) { int i; int ch = 0; @@ -1417,7 +1416,7 @@ right_of_four_spaces (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static gboolean -left_of_four_spaces (WEdit * edit) +left_of_four_spaces (WEdit *edit) { int i, ch = 0; @@ -1430,7 +1429,7 @@ left_of_four_spaces (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_auto_indent (WEdit * edit) +edit_auto_indent (WEdit *edit) { off_t p; @@ -1452,7 +1451,7 @@ edit_auto_indent (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static inline void -edit_double_newline (WEdit * edit) +edit_double_newline (WEdit *edit) { edit_insert (edit, '\n'); if (edit_buffer_get_current_byte (&edit->buffer) == '\n' @@ -1465,7 +1464,7 @@ edit_double_newline (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -insert_spaces_tab (WEdit * edit, gboolean half) +insert_spaces_tab (WEdit *edit, gboolean half) { long i; @@ -1481,7 +1480,7 @@ insert_spaces_tab (WEdit * edit, gboolean half) /* --------------------------------------------------------------------------------------------- */ static inline void -edit_tab_cmd (WEdit * edit) +edit_tab_cmd (WEdit *edit) { if (edit_options.fake_half_tabs && is_in_indent (&edit->buffer)) { @@ -1508,7 +1507,7 @@ edit_tab_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -check_and_wrap_line (WEdit * edit) +check_and_wrap_line (WEdit *edit) { off_t curs; @@ -1551,7 +1550,7 @@ check_and_wrap_line (WEdit * edit) */ static off_t -edit_get_bracket (WEdit * edit, gboolean in_screen, unsigned long furthest_bracket_search) +edit_get_bracket (WEdit *edit, gboolean in_screen, unsigned long furthest_bracket_search) { const char *const b = "{}{[][()(", *p; int i = 1, inc = -1, c, d, n = 0; @@ -1606,7 +1605,7 @@ edit_get_bracket (WEdit * edit, gboolean in_screen, unsigned long furthest_brack /* --------------------------------------------------------------------------------------------- */ static inline void -edit_goto_matching_bracket (WEdit * edit) +edit_goto_matching_bracket (WEdit *edit) { off_t q; @@ -1622,7 +1621,7 @@ edit_goto_matching_bracket (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_move_block_to_right (WEdit * edit) +edit_move_block_to_right (WEdit *edit) { off_t start_mark, end_mark; long cur_bol, start_bol; @@ -1662,7 +1661,7 @@ edit_move_block_to_right (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_move_block_to_left (WEdit * edit) +edit_move_block_to_left (WEdit *edit) { off_t start_mark, end_mark; off_t cur_bol, start_bol; @@ -1714,7 +1713,7 @@ edit_move_block_to_left (WEdit * edit) */ static size_t -edit_print_string (WEdit * e, const char *s) +edit_print_string (WEdit *e, const char *s) { size_t i; @@ -1728,7 +1727,7 @@ edit_print_string (WEdit * e, const char *s) /* --------------------------------------------------------------------------------------------- */ static off_t -edit_insert_column_from_file (WEdit * edit, int file, off_t * start_pos, off_t * end_pos, +edit_insert_column_from_file (WEdit *edit, int file, off_t *start_pos, off_t *end_pos, long *col1, long *col2) { off_t cursor; @@ -1801,7 +1800,7 @@ edit_insert_column_from_file (WEdit * edit, int file, off_t * start_pos, off_t * /** User edit menu, like user menu (F2) but only in editor. */ void -edit_user_menu (WEdit * edit, const char *menu_file, int selected_entry) +edit_user_menu (WEdit *edit, const char *menu_file, int selected_entry) { char *block_file; gboolean mark; @@ -1852,7 +1851,7 @@ edit_user_menu (WEdit * edit, const char *menu_file, int selected_entry) /* --------------------------------------------------------------------------------------------- */ char * -edit_get_write_filter (const vfs_path_t * write_name_vpath, const vfs_path_t * filename_vpath) +edit_get_write_filter (const vfs_path_t *write_name_vpath, const vfs_path_t *filename_vpath) { int i; const char *write_name; @@ -1881,7 +1880,7 @@ edit_get_write_filter (const vfs_path_t * write_name_vpath, const vfs_path_t * f */ off_t -edit_write_stream (WEdit * edit, FILE * f) +edit_write_stream (WEdit *edit, FILE *f) { long i; @@ -1990,7 +1989,7 @@ is_break_char (char c) /** inserts a file at the cursor, returns count of inserted bytes on success */ off_t -edit_insert_file (WEdit * edit, const vfs_path_t * filename_vpath) +edit_insert_file (WEdit *edit, const vfs_path_t *filename_vpath) { char *p; off_t current; @@ -2119,7 +2118,7 @@ edit_insert_file (WEdit * edit, const vfs_path_t * filename_vpath) */ WEdit * -edit_init (WEdit * edit, const WRect * r, const edit_arg_t * arg) +edit_init (WEdit *edit, const WRect *r, const edit_arg_t *arg) { gboolean to_free = FALSE; long line; @@ -2233,7 +2232,7 @@ edit_init (WEdit * edit, const WRect * r, const edit_arg_t * arg) /** Clear the edit struct, freeing everything in it. Return TRUE on success */ gboolean -edit_clean (WEdit * edit) +edit_clean (WEdit *edit) { if (edit == NULL) return FALSE; @@ -2283,7 +2282,7 @@ edit_clean (WEdit * edit) * @return TRUE on success, FALSE on failure. */ gboolean -edit_reload_line (WEdit * edit, const edit_arg_t * arg) +edit_reload_line (WEdit *edit, const edit_arg_t *arg) { Widget *w = WIDGET (edit); WEdit *e; @@ -2311,7 +2310,7 @@ edit_reload_line (WEdit * edit, const edit_arg_t * arg) #ifdef HAVE_CHARSET void -edit_set_codeset (WEdit * edit) +edit_set_codeset (WEdit *edit) { const char *cp_id; @@ -2383,7 +2382,7 @@ edit_set_codeset (WEdit * edit) */ void -edit_push_undo_action (WEdit * edit, long c) +edit_push_undo_action (WEdit *edit, long c) { unsigned long sp = edit->undo_stack_pointer; unsigned long spm1; @@ -2474,7 +2473,7 @@ edit_push_undo_action (WEdit * edit, long c) /* --------------------------------------------------------------------------------------------- */ void -edit_push_redo_action (WEdit * edit, long c) +edit_push_redo_action (WEdit *edit, long c) { unsigned long sp = edit->redo_stack_pointer; unsigned long spm1; @@ -2561,7 +2560,7 @@ edit_push_redo_action (WEdit * edit, long c) */ void -edit_insert (WEdit * edit, int c) +edit_insert (WEdit *edit, int c) { /* first we must update the position of the display window */ if (edit->buffer.curs1 < edit->start_display) @@ -2602,7 +2601,7 @@ edit_insert (WEdit * edit, int c) /** same as edit_insert and move left */ void -edit_insert_ahead (WEdit * edit, int c) +edit_insert_ahead (WEdit *edit, int c) { if (edit->buffer.curs1 < edit->start_display) { @@ -2633,7 +2632,7 @@ edit_insert_ahead (WEdit * edit, int c) /* --------------------------------------------------------------------------------------------- */ void -edit_insert_over (WEdit * edit) +edit_insert_over (WEdit *edit) { long i; @@ -2646,7 +2645,7 @@ edit_insert_over (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ int -edit_delete (WEdit * edit, gboolean byte_delete) +edit_delete (WEdit *edit, gboolean byte_delete) { int p = 0; int char_length = 1; @@ -2707,7 +2706,7 @@ edit_delete (WEdit * edit, gboolean byte_delete) /* --------------------------------------------------------------------------------------------- */ int -edit_backspace (WEdit * edit, gboolean byte_delete) +edit_backspace (WEdit *edit, gboolean byte_delete) { int p = 0; int char_length = 1; @@ -2769,7 +2768,7 @@ edit_backspace (WEdit * edit, gboolean byte_delete) /** moves the cursor right or left: increment positive or negative respectively */ void -edit_cursor_move (WEdit * edit, off_t increment) +edit_cursor_move (WEdit *edit, off_t increment) { if (increment < 0) { @@ -2814,7 +2813,7 @@ edit_cursor_move (WEdit * edit, off_t increment) /* If upto is zero returns index of cols across from current. */ off_t -edit_move_forward3 (const WEdit * edit, off_t current, long cols, off_t upto) +edit_move_forward3 (const WEdit *edit, off_t current, long cols, off_t upto) { off_t p, q; long col; @@ -2884,7 +2883,7 @@ edit_move_forward3 (const WEdit * edit, off_t current, long cols, off_t upto) /** returns the current offset of the cursor from the beginning of a file */ off_t -edit_get_cursor_offset (const WEdit * edit) +edit_get_cursor_offset (const WEdit *edit) { return edit->buffer.curs1; } @@ -2893,7 +2892,7 @@ edit_get_cursor_offset (const WEdit * edit) /** returns the current column position of the cursor */ long -edit_get_col (const WEdit * edit) +edit_get_col (const WEdit *edit) { off_t b; @@ -2906,7 +2905,7 @@ edit_get_col (const WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_update_curs_row (WEdit * edit) +edit_update_curs_row (WEdit *edit) { edit->curs_row = edit->buffer.curs_line - edit->start_line; } @@ -2914,7 +2913,7 @@ edit_update_curs_row (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_update_curs_col (WEdit * edit) +edit_update_curs_col (WEdit *edit) { off_t b; @@ -2925,7 +2924,7 @@ edit_update_curs_col (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ long -edit_get_curs_col (const WEdit * edit) +edit_get_curs_col (const WEdit *edit) { return edit->curs_col; } @@ -2934,7 +2933,7 @@ edit_get_curs_col (const WEdit * edit) /** moves the display start position up by i lines */ void -edit_scroll_upward (WEdit * edit, long i) +edit_scroll_upward (WEdit *edit, long i) { long lines_above = edit->start_line; @@ -2954,7 +2953,7 @@ edit_scroll_upward (WEdit * edit, long i) /* --------------------------------------------------------------------------------------------- */ void -edit_scroll_downward (WEdit * edit, long i) +edit_scroll_downward (WEdit *edit, long i) { long lines_below; @@ -2975,7 +2974,7 @@ edit_scroll_downward (WEdit * edit, long i) /* --------------------------------------------------------------------------------------------- */ void -edit_scroll_right (WEdit * edit, long i) +edit_scroll_right (WEdit *edit, long i) { edit->force |= REDRAW_PAGE; edit->force &= (0xfff - REDRAW_CHAR_ONLY); @@ -2985,7 +2984,7 @@ edit_scroll_right (WEdit * edit, long i) /* --------------------------------------------------------------------------------------------- */ void -edit_scroll_left (WEdit * edit, long i) +edit_scroll_left (WEdit *edit, long i) { if (edit->start_col) { @@ -3002,7 +3001,7 @@ edit_scroll_left (WEdit * edit, long i) /* --------------------------------------------------------------------------------------------- */ void -edit_move_to_prev_col (WEdit * edit, off_t p) +edit_move_to_prev_col (WEdit *edit, off_t p) { long prev = edit->prev_col; long over = edit->over_col; @@ -3071,7 +3070,7 @@ edit_move_to_prev_col (WEdit * edit, off_t p) */ gboolean -edit_line_is_blank (WEdit * edit, long line) +edit_line_is_blank (WEdit *edit, long line) { return is_blank (&edit->buffer, edit_find_line (edit, line)); } @@ -3080,7 +3079,7 @@ edit_line_is_blank (WEdit * edit, long line) /** move cursor to line 'line' */ void -edit_move_to_line (WEdit * e, long line) +edit_move_to_line (WEdit *e, long line) { if (line < e->buffer.curs_line) edit_move_up (e, e->buffer.curs_line - line, FALSE); @@ -3093,7 +3092,7 @@ edit_move_to_line (WEdit * e, long line) /** scroll window so that first visible line is 'line' */ void -edit_move_display (WEdit * e, long line) +edit_move_display (WEdit *e, long line) { if (line < e->start_line) edit_scroll_upward (e, e->start_line - line); @@ -3105,7 +3104,7 @@ edit_move_display (WEdit * e, long line) /** save markers onto undo stack */ void -edit_push_markers (WEdit * edit) +edit_push_markers (WEdit *edit) { edit_push_undo_action (edit, MARK_1 + edit->mark1); edit_push_undo_action (edit, MARK_2 + edit->mark2); @@ -3115,7 +3114,7 @@ edit_push_markers (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_set_markers (WEdit * edit, off_t m1, off_t m2, long c1, long c2) +edit_set_markers (WEdit *edit, off_t m1, off_t m2, long c1, long c2) { edit->mark1 = m1; edit->mark2 = m2; @@ -3131,7 +3130,7 @@ edit_set_markers (WEdit * edit, off_t m1, off_t m2, long c1, long c2) */ gboolean -eval_marks (WEdit * edit, off_t * start_mark, off_t * end_mark) +eval_marks (WEdit *edit, off_t *start_mark, off_t *end_mark) { long end_mark_curs; @@ -3193,7 +3192,7 @@ eval_marks (WEdit * edit, off_t * start_mark, off_t * end_mark) /** highlight marker toggle */ void -edit_mark_cmd (WEdit * edit, gboolean unmark) +edit_mark_cmd (WEdit *edit, gboolean unmark) { edit_push_markers (edit); if (unmark) @@ -3220,7 +3219,7 @@ edit_mark_cmd (WEdit * edit, gboolean unmark) /** highlight the word under cursor */ void -edit_mark_current_word_cmd (WEdit * edit) +edit_mark_current_word_cmd (WEdit *edit) { long pos; @@ -3256,7 +3255,7 @@ edit_mark_current_word_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_mark_current_line_cmd (WEdit * edit) +edit_mark_current_line_cmd (WEdit *edit) { edit->mark1 = edit_buffer_get_current_bol (&edit->buffer); edit->mark2 = edit_buffer_get_current_eol (&edit->buffer); @@ -3267,7 +3266,7 @@ edit_mark_current_line_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_delete_line (WEdit * edit) +edit_delete_line (WEdit *edit) { /* * Delete right part of the line. @@ -3295,7 +3294,7 @@ edit_delete_line (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_push_key_press (WEdit * edit) +edit_push_key_press (WEdit *edit) { edit_push_undo_action (edit, KEY_PRESS + edit->start_display); if (edit->mark2 == -1) @@ -3308,7 +3307,7 @@ edit_push_key_press (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_find_bracket (WEdit * edit) +edit_find_bracket (WEdit *edit) { edit->bracket = edit_get_bracket (edit, 1, 10000); if (edit->last_bracket != edit->bracket) @@ -3328,7 +3327,7 @@ edit_find_bracket (WEdit * edit) */ void -edit_execute_key_command (WEdit * edit, long command, int char_for_insertion) +edit_execute_key_command (WEdit *edit, long command, int char_for_insertion) { if (command == CK_MacroStartRecord || command == CK_RepeatStartRecord || (macro_index < 0 @@ -3377,7 +3376,7 @@ edit_execute_key_command (WEdit * edit, long command, int char_for_insertion) all of them. It also does not check for the Undo command. */ void -edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) +edit_execute_cmd (WEdit *edit, long command, int char_for_insertion) { WRect *w = &WIDGET (edit)->rect; @@ -4163,7 +4162,7 @@ edit_stack_free (void) /** move i lines */ void -edit_move_up (WEdit * edit, long i, gboolean do_scroll) +edit_move_up (WEdit *edit, long i, gboolean do_scroll) { edit_move_updown (edit, i, do_scroll, TRUE); } @@ -4172,7 +4171,7 @@ edit_move_up (WEdit * edit, long i, gboolean do_scroll) /** move i lines */ void -edit_move_down (WEdit * edit, long i, gboolean do_scroll) +edit_move_down (WEdit *edit, long i, gboolean do_scroll) { edit_move_updown (edit, i, do_scroll, FALSE); } @@ -4187,7 +4186,7 @@ edit_move_down (WEdit * edit, long i, gboolean do_scroll) */ edit_arg_t * -edit_arg_vpath_new (vfs_path_t * file_vpath, long line_number) +edit_arg_vpath_new (vfs_path_t *file_vpath, long line_number) { edit_arg_t *arg; @@ -4223,7 +4222,7 @@ edit_arg_new (const char *file_name, long line_number) */ void -edit_arg_init (edit_arg_t * arg, vfs_path_t * vpath, long line) +edit_arg_init (edit_arg_t *arg, vfs_path_t *vpath, long line) { arg->file_vpath = (vfs_path_t *) vpath; arg->line_number = line; @@ -4239,7 +4238,7 @@ edit_arg_init (edit_arg_t * arg, vfs_path_t * vpath, long line) */ void -edit_arg_assign (edit_arg_t * arg, vfs_path_t * vpath, long line) +edit_arg_assign (edit_arg_t *arg, vfs_path_t *vpath, long line) { vfs_path_free (arg->file_vpath, TRUE); edit_arg_init (arg, vpath, line); @@ -4253,7 +4252,7 @@ edit_arg_assign (edit_arg_t * arg, vfs_path_t * vpath, long line) */ void -edit_arg_free (edit_arg_t * arg) +edit_arg_free (edit_arg_t *arg) { vfs_path_free (arg->file_vpath, TRUE); g_free (arg); @@ -4262,7 +4261,7 @@ edit_arg_free (edit_arg_t * arg) /* --------------------------------------------------------------------------------------------- */ const char * -edit_get_file_name (const WEdit * edit) +edit_get_file_name (const WEdit *edit) { return vfs_path_as_str (edit->filename_vpath); } diff --git a/src/editor/editbuffer.c b/src/editor/editbuffer.c index acc776aed5..cc6ae6eff7 100644 --- a/src/editor/editbuffer.c +++ b/src/editor/editbuffer.c @@ -114,7 +114,7 @@ * @return NULL if byte_index is negative or larger than file size; pointer to byte otherwise. */ static char * -edit_buffer_get_byte_ptr (const edit_buffer_t * buf, off_t byte_index) +edit_buffer_get_byte_ptr (const edit_buffer_t *buf, off_t byte_index) { void *b; @@ -144,7 +144,7 @@ edit_buffer_get_byte_ptr (const edit_buffer_t * buf, off_t byte_index) */ void -edit_buffer_init (edit_buffer_t * buf, off_t size) +edit_buffer_init (edit_buffer_t *buf, off_t size) { buf->b1 = g_ptr_array_new_full (32, g_free); buf->b2 = g_ptr_array_new_full (32, g_free); @@ -164,7 +164,7 @@ edit_buffer_init (edit_buffer_t * buf, off_t size) */ void -edit_buffer_clean (edit_buffer_t * buf) +edit_buffer_clean (edit_buffer_t *buf) { if (buf->b1 != NULL) g_ptr_array_free (buf->b1, TRUE); @@ -184,7 +184,7 @@ edit_buffer_clean (edit_buffer_t * buf) */ int -edit_buffer_get_byte (const edit_buffer_t * buf, off_t byte_index) +edit_buffer_get_byte (const edit_buffer_t *buf, off_t byte_index) { char *p; @@ -209,7 +209,7 @@ edit_buffer_get_byte (const edit_buffer_t * buf, off_t byte_index) */ int -edit_buffer_get_utf (const edit_buffer_t * buf, off_t byte_index, int *char_length) +edit_buffer_get_utf (const edit_buffer_t *buf, off_t byte_index, int *char_length) { gchar *str = NULL; gunichar res; @@ -272,7 +272,7 @@ edit_buffer_get_utf (const edit_buffer_t * buf, off_t byte_index, int *char_leng */ int -edit_buffer_get_prev_utf (const edit_buffer_t * buf, off_t byte_index, int *char_length) +edit_buffer_get_prev_utf (const edit_buffer_t *buf, off_t byte_index, int *char_length) { size_t i; gchar utf8_buf[3 * UTF8_CHAR_LEN + 1]; @@ -323,7 +323,7 @@ edit_buffer_get_prev_utf (const edit_buffer_t * buf, off_t byte_index, int *char */ long -edit_buffer_count_lines (const edit_buffer_t * buf, off_t first, off_t last) +edit_buffer_count_lines (const edit_buffer_t *buf, off_t first, off_t last) { long lines = 0; @@ -348,7 +348,7 @@ edit_buffer_count_lines (const edit_buffer_t * buf, off_t first, off_t last) */ off_t -edit_buffer_get_bol (const edit_buffer_t * buf, off_t current) +edit_buffer_get_bol (const edit_buffer_t *buf, off_t current) { if (current <= 0) return 0; @@ -370,7 +370,7 @@ edit_buffer_get_bol (const edit_buffer_t * buf, off_t current) */ off_t -edit_buffer_get_eol (const edit_buffer_t * buf, off_t current) +edit_buffer_get_eol (const edit_buffer_t *buf, off_t current) { if (current >= buf->size) return buf->size; @@ -394,8 +394,7 @@ edit_buffer_get_eol (const edit_buffer_t * buf, off_t current) */ GString * -edit_buffer_get_word_from_pos (const edit_buffer_t * buf, off_t start_pos, off_t * start, - gsize * cut) +edit_buffer_get_word_from_pos (const edit_buffer_t *buf, off_t start_pos, off_t *start, gsize *cut) { off_t word_start; gsize cut_len = 0; @@ -440,7 +439,7 @@ edit_buffer_get_word_from_pos (const edit_buffer_t * buf, off_t start_pos, off_t */ gboolean -edit_buffer_find_word_start (const edit_buffer_t * buf, off_t * word_start, gsize * word_len) +edit_buffer_find_word_start (const edit_buffer_t *buf, off_t *word_start, gsize *word_len) { int c; off_t i; @@ -489,7 +488,7 @@ edit_buffer_find_word_start (const edit_buffer_t * buf, off_t * word_start, gsiz */ void -edit_buffer_insert (edit_buffer_t * buf, int c) +edit_buffer_insert (edit_buffer_t *buf, int c) { void *b; off_t i; @@ -521,7 +520,7 @@ edit_buffer_insert (edit_buffer_t * buf, int c) */ void -edit_buffer_insert_ahead (edit_buffer_t * buf, int c) +edit_buffer_insert_ahead (edit_buffer_t *buf, int c) { void *b; off_t i; @@ -553,7 +552,7 @@ edit_buffer_insert_ahead (edit_buffer_t * buf, int c) */ int -edit_buffer_delete (edit_buffer_t * buf) +edit_buffer_delete (edit_buffer_t *buf) { void *b; unsigned char c; @@ -593,7 +592,7 @@ edit_buffer_delete (edit_buffer_t * buf) */ int -edit_buffer_backspace (edit_buffer_t * buf) +edit_buffer_backspace (edit_buffer_t *buf) { void *b; unsigned char c; @@ -638,7 +637,7 @@ edit_buffer_backspace (edit_buffer_t * buf) */ off_t -edit_buffer_get_forward_offset (const edit_buffer_t * buf, off_t current, long lines, off_t upto) +edit_buffer_get_forward_offset (const edit_buffer_t *buf, off_t current, long lines, off_t upto) { if (upto != 0) return (off_t) edit_buffer_count_lines (buf, current, upto); @@ -670,7 +669,7 @@ edit_buffer_get_forward_offset (const edit_buffer_t * buf, off_t current, long l */ off_t -edit_buffer_get_backward_offset (const edit_buffer_t * buf, off_t current, long lines) +edit_buffer_get_backward_offset (const edit_buffer_t *buf, off_t current, long lines) { lines = MAX (lines, 0); current = edit_buffer_get_bol (buf, current); @@ -693,8 +692,8 @@ edit_buffer_get_backward_offset (const edit_buffer_t * buf, off_t current, long */ off_t -edit_buffer_read_file (edit_buffer_t * buf, int fd, off_t size, - edit_buffer_read_file_status_msg_t * sm, gboolean * aborted) +edit_buffer_read_file (edit_buffer_t *buf, int fd, off_t size, + edit_buffer_read_file_status_msg_t *sm, gboolean *aborted) { off_t ret = 0; off_t i, j; @@ -807,7 +806,7 @@ edit_buffer_read_file (edit_buffer_t * buf, int fd, off_t size, */ off_t -edit_buffer_write_file (edit_buffer_t * buf, int fd) +edit_buffer_write_file (edit_buffer_t *buf, int fd) { off_t ret = 0; off_t i; @@ -881,7 +880,7 @@ edit_buffer_write_file (edit_buffer_t * buf, int fd) */ int -edit_buffer_calc_percent (const edit_buffer_t * buf, off_t offset) +edit_buffer_calc_percent (const edit_buffer_t *buf, off_t offset) { int percent; diff --git a/src/editor/editbuffer.h b/src/editor/editbuffer.h index def17eec58..fc77d6ccfc 100644 --- a/src/editor/editbuffer.h +++ b/src/editor/editbuffer.h @@ -69,7 +69,7 @@ int edit_buffer_calc_percent (const edit_buffer_t * buf, off_t offset); /*** inline functions ****************************************************************************/ static inline int -edit_buffer_get_current_byte (const edit_buffer_t * buf) +edit_buffer_get_current_byte (const edit_buffer_t *buf) { return edit_buffer_get_byte (buf, buf->curs1); } @@ -77,7 +77,7 @@ edit_buffer_get_current_byte (const edit_buffer_t * buf) /* --------------------------------------------------------------------------------------------- */ static inline int -edit_buffer_get_previous_byte (const edit_buffer_t * buf) +edit_buffer_get_previous_byte (const edit_buffer_t *buf) { return edit_buffer_get_byte (buf, buf->curs1 - 1); } @@ -92,7 +92,7 @@ edit_buffer_get_previous_byte (const edit_buffer_t * buf) */ static inline off_t -edit_buffer_get_current_bol (const edit_buffer_t * buf) +edit_buffer_get_current_bol (const edit_buffer_t *buf) { return edit_buffer_get_bol (buf, buf->curs1); } @@ -107,7 +107,7 @@ edit_buffer_get_current_bol (const edit_buffer_t * buf) */ static inline off_t -edit_buffer_get_current_eol (const edit_buffer_t * buf) +edit_buffer_get_current_eol (const edit_buffer_t *buf) { return edit_buffer_get_eol (buf, buf->curs1); } diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index 38a9b76d7e..762834314c 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -94,7 +94,7 @@ static unsigned long edit_save_mode_radio_id, edit_save_mode_input_id; /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -edit_save_mode_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +edit_save_mode_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -127,7 +127,7 @@ edit_save_mode_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm /* returns 0 on error, -1 on abort */ static int -edit_save_file (WEdit * edit, const vfs_path_t * filename_vpath) +edit_save_file (WEdit *edit, const vfs_path_t *filename_vpath) { char *p; gchar *tmp; @@ -368,7 +368,7 @@ edit_save_file (WEdit * edit, const vfs_path_t * filename_vpath) /* --------------------------------------------------------------------------------------------- */ static gboolean -edit_check_newline (const edit_buffer_t * buf) +edit_check_newline (const edit_buffer_t *buf) { return !(edit_options.check_nl_at_eof && buf->size > 0 && edit_buffer_get_byte (buf, buf->size - 1) != '\n' @@ -380,7 +380,7 @@ edit_check_newline (const edit_buffer_t * buf) /* --------------------------------------------------------------------------------------------- */ static vfs_path_t * -edit_get_save_file_as (WEdit * edit) +edit_get_save_file_as (WEdit *edit) { static LineBreaks cur_lb = LB_ASIS; char *filename_res; @@ -432,7 +432,7 @@ edit_get_save_file_as (WEdit * edit) /** returns TRUE on success */ static gboolean -edit_save_cmd (WEdit * edit) +edit_save_cmd (WEdit *edit) { int res, save_lock = 0; @@ -462,7 +462,7 @@ edit_save_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_delete_column_of_text (WEdit * edit, off_t m1, off_t m2) +edit_delete_column_of_text (WEdit *edit, off_t m1, off_t m2) { off_t n; off_t r; @@ -504,7 +504,7 @@ edit_delete_column_of_text (WEdit * edit, off_t m1, off_t m2) /** if success return TRUE */ static gboolean -edit_block_delete (WEdit * edit, off_t start_mark, off_t end_mark) +edit_block_delete (WEdit *edit, off_t start_mark, off_t end_mark) { off_t curs_pos; long curs_line, c1, c2; @@ -572,7 +572,7 @@ edit_block_delete (WEdit * edit, off_t start_mark, off_t end_mark) /** Return a null terminated length of text. Result must be g_free'd */ static unsigned char * -edit_get_block (WEdit * edit, off_t start, off_t finish, off_t * l) +edit_get_block (WEdit *edit, off_t start, off_t finish, off_t *l) { unsigned char *s, *r; @@ -616,7 +616,7 @@ edit_get_block (WEdit * edit, off_t start, off_t finish, off_t * l) /** copies a block to clipboard file */ static gboolean -edit_save_block_to_clip_file (WEdit * edit, off_t start, off_t finish) +edit_save_block_to_clip_file (WEdit *edit, off_t start, off_t finish) { gboolean ret; gchar *tmp; @@ -631,7 +631,7 @@ edit_save_block_to_clip_file (WEdit * edit, off_t start, off_t finish) /* --------------------------------------------------------------------------------------------- */ static void -pipe_mail (const edit_buffer_t * buf, char *to, char *subject, char *cc) +pipe_mail (const edit_buffer_t *buf, char *to, char *subject, char *cc) { FILE *p = 0; char *s = NULL; @@ -677,8 +677,8 @@ pipe_mail (const edit_buffer_t * buf, char *to, char *subject, char *cc) /* --------------------------------------------------------------------------------------------- */ static void -edit_insert_column_of_text (WEdit * edit, unsigned char *data, off_t size, long width, - off_t * start_pos, off_t * end_pos, long *col1, long *col2) +edit_insert_column_of_text (WEdit *edit, unsigned char *data, off_t size, long width, + off_t *start_pos, off_t *end_pos, long *col1, long *col2) { off_t i, cursor; long col; @@ -756,8 +756,7 @@ edit_syntax_onoff_cb (void *data, void *user_data) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -editcmd_dialog_raw_key_query_cb (Widget * w, Widget * sender, widget_msg_t msg, int parm, - void *data) +editcmd_dialog_raw_key_query_cb (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDialog *h = DIALOG (w); @@ -792,7 +791,7 @@ edit_refresh_cmd (void) */ void -edit_syntax_onoff_cmd (WDialog * h) +edit_syntax_onoff_cmd (WDialog *h) { edit_options.syntax_highlighting = !edit_options.syntax_highlighting; g_list_foreach (GROUP (h)->widgets, edit_syntax_onoff_cb, NULL); @@ -807,7 +806,7 @@ edit_syntax_onoff_cmd (WDialog * h) */ void -edit_show_tabs_tws_cmd (WDialog * h) +edit_show_tabs_tws_cmd (WDialog *h) { enable_show_tabs_tws = !enable_show_tabs_tws; widget_draw (WIDGET (h)); @@ -821,7 +820,7 @@ edit_show_tabs_tws_cmd (WDialog * h) */ void -edit_show_margin_cmd (WDialog * h) +edit_show_margin_cmd (WDialog *h) { edit_options.show_right_margin = !edit_options.show_right_margin; widget_draw (WIDGET (h)); @@ -835,7 +834,7 @@ edit_show_margin_cmd (WDialog * h) */ void -edit_show_numbers_cmd (WDialog * h) +edit_show_numbers_cmd (WDialog *h) { edit_options.line_state = !edit_options.line_state; edit_options.line_state_width = edit_options.line_state ? LINE_STATE_WIDTH : 0; @@ -895,7 +894,7 @@ edit_save_mode_cmd (void) /* --------------------------------------------------------------------------------------------- */ void -edit_set_filename (WEdit * edit, const vfs_path_t * name_vpath) +edit_set_filename (WEdit *edit, const vfs_path_t *name_vpath) { vfs_path_free (edit->filename_vpath, TRUE); edit->filename_vpath = vfs_path_clone (name_vpath); @@ -909,7 +908,7 @@ edit_set_filename (WEdit * edit, const vfs_path_t * name_vpath) but only if they have made a change to the filename */ /* returns TRUE on success */ gboolean -edit_save_as_cmd (WEdit * edit) +edit_save_as_cmd (WEdit *edit) { /* This heads the 'Save As' dialog box */ vfs_path_t *exp_vpath; @@ -1014,7 +1013,7 @@ edit_save_as_cmd (WEdit * edit) /** returns TRUE on success */ gboolean -edit_save_confirm_cmd (WEdit * edit) +edit_save_confirm_cmd (WEdit *edit) { if (edit->filename_vpath == NULL) return edit_save_as_cmd (edit); @@ -1046,7 +1045,7 @@ edit_save_confirm_cmd (WEdit * edit) */ gboolean -edit_load_cmd (WDialog * h) +edit_load_cmd (WDialog *h) { char *exp; gboolean ret = TRUE; /* possible cancel */ @@ -1083,7 +1082,7 @@ edit_load_cmd (WDialog * h) */ gboolean -edit_load_file_from_filename (WDialog * h, const edit_arg_t * arg) +edit_load_file_from_filename (WDialog *h, const edit_arg_t *arg) { WRect r = WIDGET (h)->rect; @@ -1100,7 +1099,7 @@ edit_load_file_from_filename (WDialog * h, const edit_arg_t * arg) */ gboolean -edit_load_file_from_history (WDialog * h) +edit_load_file_from_history (WDialog *h) { char *exp; int action; @@ -1131,7 +1130,7 @@ edit_load_file_from_history (WDialog * h) */ gboolean -edit_load_syntax_file (WDialog * h) +edit_load_syntax_file (WDialog *h) { vfs_path_t *extdir_vpath; int dir = 0; @@ -1181,7 +1180,7 @@ edit_load_syntax_file (WDialog * h) */ gboolean -edit_load_menu_file (WDialog * h) +edit_load_menu_file (WDialog *h) { vfs_path_t *buffer_vpath; vfs_path_t *menufile_vpath; @@ -1249,7 +1248,7 @@ edit_load_menu_file (WDialog * h) */ gboolean -edit_close_cmd (WEdit * edit) +edit_close_cmd (WEdit *edit) { gboolean ret; @@ -1285,7 +1284,7 @@ edit_close_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_block_copy_cmd (WEdit * edit) +edit_block_copy_cmd (WEdit *edit) { off_t start_mark, end_mark, current = edit->buffer.curs1; off_t mark1 = 0, mark2 = 0; @@ -1337,7 +1336,7 @@ edit_block_copy_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_block_move_cmd (WEdit * edit) +edit_block_move_cmd (WEdit *edit) { off_t current; unsigned char *copy_buf = NULL; @@ -1442,7 +1441,7 @@ edit_block_move_cmd (WEdit * edit) /** returns FALSE if canceelled by user */ gboolean -edit_block_delete_cmd (WEdit * edit) +edit_block_delete_cmd (WEdit *edit) { off_t start_mark, end_mark; @@ -1462,7 +1461,7 @@ edit_block_delete_cmd (WEdit * edit) */ gboolean -edit_ok_to_exit (WEdit * edit) +edit_ok_to_exit (WEdit *edit) { const char *fname = N_("[NoName]"); char *msg; @@ -1523,7 +1522,7 @@ edit_ok_to_exit (WEdit * edit) /** save block, returns TRUE on success */ gboolean -edit_save_block (WEdit * edit, const char *filename, off_t start, off_t finish) +edit_save_block (WEdit *edit, const char *filename, off_t start, off_t finish) { int file; off_t len = 1; @@ -1584,7 +1583,7 @@ edit_save_block (WEdit * edit, const char *filename, off_t start, off_t finish) /* --------------------------------------------------------------------------------------------- */ void -edit_paste_from_history (WEdit * edit) +edit_paste_from_history (WEdit *edit) { (void) edit; edit_error_dialog (_("Error"), _("This function is not implemented")); @@ -1593,7 +1592,7 @@ edit_paste_from_history (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ gboolean -edit_copy_to_X_buf_cmd (WEdit * edit) +edit_copy_to_X_buf_cmd (WEdit *edit) { off_t start_mark, end_mark; @@ -1617,7 +1616,7 @@ edit_copy_to_X_buf_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ gboolean -edit_cut_to_X_buf_cmd (WEdit * edit) +edit_cut_to_X_buf_cmd (WEdit *edit) { off_t start_mark, end_mark; @@ -1641,7 +1640,7 @@ edit_cut_to_X_buf_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ gboolean -edit_paste_from_X_buf_cmd (WEdit * edit) +edit_paste_from_X_buf_cmd (WEdit *edit) { vfs_path_t *tmp; gboolean ret; @@ -1662,7 +1661,7 @@ edit_paste_from_X_buf_cmd (WEdit * edit) */ void -edit_goto_cmd (WEdit * edit) +edit_goto_cmd (WEdit *edit) { static gboolean first_run = TRUE; @@ -1700,7 +1699,7 @@ edit_goto_cmd (WEdit * edit) /** Return TRUE on success */ gboolean -edit_save_block_cmd (WEdit * edit) +edit_save_block_cmd (WEdit *edit) { off_t start_mark, end_mark; char *exp, *tmp; @@ -1735,7 +1734,7 @@ edit_save_block_cmd (WEdit * edit) /** returns TRUE on success */ gboolean -edit_insert_file_cmd (WEdit * edit) +edit_insert_file_cmd (WEdit *edit) { char *tmp; char *exp; @@ -1770,7 +1769,7 @@ edit_insert_file_cmd (WEdit * edit) /** sorts a block, returns -1 on system fail, 1 on cancel and 0 on success */ int -edit_sort_cmd (WEdit * edit) +edit_sort_cmd (WEdit *edit) { char *exp, *tmp, *tmp_edit_block_name, *tmp_edit_temp_name; off_t start_mark, end_mark; @@ -1844,7 +1843,7 @@ edit_sort_cmd (WEdit * edit) */ int -edit_ext_cmd (WEdit * edit) +edit_ext_cmd (WEdit *edit) { char *exp, *tmp, *tmp_edit_temp_file; int e; @@ -1891,7 +1890,7 @@ edit_ext_cmd (WEdit * edit) command, that just produces some output which is to be inserted */ void -edit_block_process_cmd (WEdit * edit, int macro_number) +edit_block_process_cmd (WEdit *edit, int macro_number) { char *fname; char *macros_fname = NULL; @@ -1907,7 +1906,7 @@ edit_block_process_cmd (WEdit * edit, int macro_number) /* --------------------------------------------------------------------------------------------- */ void -edit_mail_dialog (WEdit * edit) +edit_mail_dialog (WEdit *edit) { char *mail_to, *mail_subject, *mail_cc; @@ -1948,7 +1947,7 @@ edit_mail_dialog (WEdit * edit) #ifdef HAVE_CHARSET void -edit_select_codepage_cmd (WEdit * edit) +edit_select_codepage_cmd (WEdit *edit) { if (do_select_codepage ()) edit_set_codeset (edit); @@ -1961,7 +1960,7 @@ edit_select_codepage_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_insert_literal_cmd (WEdit * edit) +edit_insert_literal_cmd (WEdit *edit) { int char_for_insertion; @@ -1973,7 +1972,7 @@ edit_insert_literal_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ gboolean -edit_load_forward_cmd (WEdit * edit) +edit_load_forward_cmd (WEdit *edit) { if (edit->modified && edit_query_dialog2 (_("Warning"), @@ -2001,7 +2000,7 @@ edit_load_forward_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ gboolean -edit_load_back_cmd (WEdit * edit) +edit_load_back_cmd (WEdit *edit) { if (edit->modified && edit_query_dialog2 (_("Warning"), diff --git a/src/editor/editcomplete.c b/src/editor/editcomplete.c index f3ea0e7888..22a364ca91 100644 --- a/src/editor/editcomplete.c +++ b/src/editor/editcomplete.c @@ -70,7 +70,7 @@ */ static GString * -edit_collect_completions_get_current_word (edit_search_status_msg_t * esm, mc_search_t * srch, +edit_collect_completions_get_current_word (edit_search_status_msg_t *esm, mc_search_t *srch, off_t word_start) { WEdit *edit = esm->edit; @@ -105,10 +105,10 @@ edit_collect_completions_get_current_word (edit_search_status_msg_t * esm, mc_se */ static void -edit_collect_completion_from_one_buffer (gboolean active_buffer, GQueue ** compl, - mc_search_t * srch, edit_search_status_msg_t * esm, +edit_collect_completion_from_one_buffer (gboolean active_buffer, GQueue **compl, + mc_search_t *srch, edit_search_status_msg_t *esm, off_t word_start, gsize word_len, off_t last_byte, - GString * current_word, int *max_width) + GString *current_word, int *max_width) { GString *temp = NULL; gsize len = 0; @@ -218,7 +218,7 @@ edit_collect_completion_from_one_buffer (gboolean active_buffer, GQueue ** compl */ static GQueue * -edit_collect_completions (WEdit * edit, off_t word_start, gsize word_len, +edit_collect_completions (WEdit *edit, off_t word_start, gsize word_len, const char *match_expr, int *max_width) { GQueue *compl = NULL; @@ -321,7 +321,7 @@ edit_collect_completions (WEdit * edit, off_t word_start, gsize word_len, */ static void -edit_complete_word_insert_recoded_completion (WEdit * edit, char *completion, gsize word_len) +edit_complete_word_insert_recoded_completion (WEdit *edit, char *completion, gsize word_len) { #ifdef HAVE_CHARSET GString *temp; @@ -354,7 +354,7 @@ edit_completion_string_free (gpointer data) /* Public function for unit tests */ char * -edit_completion_dialog_show (const WEdit * edit, GQueue * compl, int max_width) +edit_completion_dialog_show (const WEdit *edit, GQueue *compl, int max_width) { const WRect *we = &CONST_WIDGET (edit)->rect; int start_x, start_y, offset; @@ -424,7 +424,7 @@ edit_completion_dialog_show (const WEdit * edit, GQueue * compl, int max_width) */ void -edit_complete_word_cmd (WEdit * edit) +edit_complete_word_cmd (WEdit *edit) { off_t word_start = 0; gsize word_len = 0; diff --git a/src/editor/editdraw.c b/src/editor/editdraw.c index 49be5714c0..bdaea74935 100644 --- a/src/editor/editdraw.c +++ b/src/editor/editdraw.c @@ -98,7 +98,7 @@ printwstr (const char *s, int len) /* --------------------------------------------------------------------------------------------- */ static inline void -status_string (WEdit * edit, char *s, int w) +status_string (WEdit *edit, char *s, int w) { char byte_str[16]; @@ -179,7 +179,7 @@ status_string (WEdit * edit, char *s, int w) */ static inline void -edit_status_fullscreen (WEdit * edit, int color) +edit_status_fullscreen (WEdit *edit, int color) { Widget *h = WIDGET (WIDGET (edit)->owner); const int w = h->rect.cols; @@ -243,7 +243,7 @@ edit_status_fullscreen (WEdit * edit, int color) */ static inline void -edit_status_window (WEdit * edit) +edit_status_window (WEdit *edit) { Widget *w = WIDGET (edit); int y, x; @@ -334,7 +334,7 @@ edit_status_window (WEdit * edit) */ static inline void -edit_draw_frame (const WEdit * edit, int color, gboolean active) +edit_draw_frame (const WEdit *edit, int color, gboolean active) { const Widget *w = CONST_WIDGET (edit); @@ -360,7 +360,7 @@ edit_draw_frame (const WEdit * edit, int color, gboolean active) */ static inline void -edit_draw_window_icons (const WEdit * edit, int color) +edit_draw_window_icons (const WEdit *edit, int color) { const Widget *w = CONST_WIDGET (edit); char tmp[17]; @@ -377,7 +377,7 @@ edit_draw_window_icons (const WEdit * edit, int color) /* --------------------------------------------------------------------------------------------- */ static inline void -print_to_widget (WEdit * edit, long row, int start_col, int start_col_real, +print_to_widget (WEdit *edit, long row, int start_col, int start_col_real, long end_col, line_s line[], char *status, int bookmarked) { Widget *w = WIDGET (edit); @@ -492,7 +492,7 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real, /** b is a pointer to the beginning of the line */ static void -edit_draw_this_line (WEdit * edit, off_t b, long row, long start_col, long end_col) +edit_draw_this_line (WEdit *edit, off_t b, long row, long start_col, long end_col) { Widget *w = WIDGET (edit); line_s line[MAX_LINE_LEN]; @@ -820,7 +820,7 @@ edit_draw_this_line (WEdit * edit, off_t b, long row, long start_col, long end_c /* --------------------------------------------------------------------------------------------- */ static inline void -edit_draw_this_char (WEdit * edit, off_t curs, long row, long start_column, long end_column) +edit_draw_this_char (WEdit *edit, off_t curs, long row, long start_column, long end_column) { off_t b; @@ -832,7 +832,7 @@ edit_draw_this_char (WEdit * edit, off_t curs, long row, long start_column, long /** cursor must be in screen for other than REDRAW_PAGE passed in force */ static inline void -render_edit_text (WEdit * edit, long start_row, long start_column, long end_row, long end_column) +render_edit_text (WEdit *edit, long start_row, long start_column, long end_row, long end_column) { static long prev_curs_row = 0; static off_t prev_curs = 0; @@ -995,7 +995,7 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row, /* --------------------------------------------------------------------------------------------- */ static inline void -edit_render (WEdit * edit, int page, int row_start, int col_start, int row_end, int col_end) +edit_render (WEdit *edit, int page, int row_start, int col_start, int row_end, int col_end) { if (page != 0) /* if it was an expose event, 'page' would be set */ edit->force |= REDRAW_PAGE | REDRAW_IN_BOUNDS; @@ -1016,7 +1016,7 @@ edit_render (WEdit * edit, int page, int row_start, int col_start, int row_end, /* --------------------------------------------------------------------------------------------- */ void -edit_status (WEdit * edit, gboolean active) +edit_status (WEdit *edit, gboolean active) { int color; @@ -1040,7 +1040,7 @@ edit_status (WEdit * edit, gboolean active) /** this scrolls the text so that cursor is on the screen */ void -edit_scroll_screen_over_cursor (WEdit * edit) +edit_scroll_screen_over_cursor (WEdit *edit) { WRect *w = &WIDGET (edit)->rect; @@ -1112,7 +1112,7 @@ edit_scroll_screen_over_cursor (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_render_keypress (WEdit * edit) +edit_render_keypress (WEdit *edit) { edit_render (edit, 0, 0, 0, 0, 0); } diff --git a/src/editor/editmacros.c b/src/editor/editmacros.c index 6c07139908..cd8b7a7908 100644 --- a/src/editor/editmacros.c +++ b/src/editor/editmacros.c @@ -52,7 +52,7 @@ /* --------------------------------------------------------------------------------------------- */ static int -edit_macro_comparator (gconstpointer * macro1, gconstpointer * macro2) +edit_macro_comparator (gconstpointer *macro1, gconstpointer *macro2) { const macros_t *m1 = (const macros_t *) macro1; const macros_t *m2 = (const macros_t *) macro2; @@ -72,7 +72,7 @@ edit_macro_sort_by_hotkey (void) /* --------------------------------------------------------------------------------------------- */ static int -edit_get_macro (WEdit * edit, int hotkey) +edit_get_macro (WEdit *edit, int hotkey) { macros_t *array_start; macros_t *result; @@ -97,7 +97,7 @@ edit_get_macro (WEdit * edit, int hotkey) /** returns FALSE on error */ static gboolean -edit_delete_macro (WEdit * edit, int hotkey) +edit_delete_macro (WEdit *edit, int hotkey) { mc_config_t *macros_config = NULL; const char *section_name = "editor"; @@ -137,7 +137,7 @@ edit_delete_macro (WEdit * edit, int hotkey) /** returns FALSE on error */ gboolean -edit_store_macro_cmd (WEdit * edit) +edit_store_macro_cmd (WEdit *edit) { int i; int hotkey; @@ -223,7 +223,7 @@ edit_store_macro_cmd (WEdit * edit) /** return FALSE on error */ gboolean -edit_load_macro_cmd (WEdit * edit) +edit_load_macro_cmd (WEdit *edit) { mc_config_t *macros_config = NULL; gchar **profile_keys, **keys; @@ -316,7 +316,7 @@ edit_load_macro_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_delete_macro_cmd (WEdit * edit) +edit_delete_macro_cmd (WEdit *edit) { int hotkey; @@ -329,7 +329,7 @@ edit_delete_macro_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ gboolean -edit_repeat_macro_cmd (WEdit * edit) +edit_repeat_macro_cmd (WEdit *edit) { gboolean ok; char *f; @@ -371,7 +371,7 @@ edit_repeat_macro_cmd (WEdit * edit) /** returns FALSE on error */ gboolean -edit_execute_macro (WEdit * edit, int hotkey) +edit_execute_macro (WEdit *edit, int hotkey) { gboolean res = FALSE; @@ -409,7 +409,7 @@ edit_execute_macro (WEdit * edit, int hotkey) /* --------------------------------------------------------------------------------------------- */ void -edit_begin_end_macro_cmd (WEdit * edit) +edit_begin_end_macro_cmd (WEdit *edit) { /* edit is a pointer to the widget */ if (edit != NULL) @@ -423,7 +423,7 @@ edit_begin_end_macro_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_begin_end_repeat_cmd (WEdit * edit) +edit_begin_end_repeat_cmd (WEdit *edit) { /* edit is a pointer to the widget */ if (edit != NULL) diff --git a/src/editor/editmenu.c b/src/editor/editmenu.c index 1de8884c0b..fe4256cbed 100644 --- a/src/editor/editmenu.c +++ b/src/editor/editmenu.c @@ -256,7 +256,7 @@ create_options_menu (void) /* --------------------------------------------------------------------------------------------- */ static void -edit_drop_menu_cmd (WDialog * h, int which) +edit_drop_menu_cmd (WDialog *h, int which) { WMenuBar *menubar; @@ -269,7 +269,7 @@ edit_drop_menu_cmd (WDialog * h, int which) /* --------------------------------------------------------------------------------------------- */ void -edit_init_menu (WMenuBar * menubar) +edit_init_menu (WMenuBar *menubar) { menubar_add_menu (menubar, menu_new (_("&File"), create_file_menu (), "[Internal File Editor]")); @@ -291,7 +291,7 @@ edit_init_menu (WMenuBar * menubar) /* --------------------------------------------------------------------------------------------- */ void -edit_menu_cmd (WDialog * h) +edit_menu_cmd (WDialog *h) { edit_drop_menu_cmd (h, -1); } @@ -299,7 +299,7 @@ edit_menu_cmd (WDialog * h) /* --------------------------------------------------------------------------------------------- */ gboolean -edit_drop_hotkey_menu (WDialog * h, int key) +edit_drop_hotkey_menu (WDialog *h, int key) { int m = 0; switch (key) diff --git a/src/editor/editoptions.c b/src/editor/editoptions.c index c81d9b8039..e9181f4cb9 100644 --- a/src/editor/editoptions.c +++ b/src/editor/editoptions.c @@ -118,7 +118,7 @@ edit_reload_syntax (void *data, void *user_data) /* --------------------------------------------------------------------------------------------- */ void -edit_options_dialog (WDialog * h) +edit_options_dialog (WDialog *h) { char wrap_length[16], tab_spacing[16]; char *p, *q; diff --git a/src/editor/editsearch.c b/src/editor/editsearch.c index 86a5e08e16..02a42dad0c 100644 --- a/src/editor/editsearch.c +++ b/src/editor/editsearch.c @@ -73,7 +73,7 @@ edit_search_options_t edit_search_options = { /* --------------------------------------------------------------------------------------------- */ static gboolean -edit_dialog_search_show (WEdit * edit) +edit_dialog_search_show (WEdit *edit) { char *search_text; size_t num_of_types = 0; @@ -152,7 +152,7 @@ edit_dialog_search_show (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_dialog_replace_show (WEdit * edit, const char *search_default, const char *replace_default, +edit_dialog_replace_show (WEdit *edit, const char *search_default, const char *replace_default, /*@out@ */ char **search_text, /*@out@ */ char **replace_text) { size_t num_of_types = 0; @@ -211,7 +211,7 @@ edit_dialog_replace_show (WEdit * edit, const char *search_default, const char * /* --------------------------------------------------------------------------------------------- */ static int -edit_dialog_replace_prompt_show (WEdit * edit, char *from_text, char *to_text, int xpos, int ypos) +edit_dialog_replace_prompt_show (WEdit *edit, char *from_text, char *to_text, int xpos, int ypos) { Widget *w = WIDGET (edit); @@ -280,7 +280,7 @@ edit_dialog_replace_prompt_show (WEdit * edit, char *from_text, char *to_text, i */ static inline char -edit_search_get_current_end_line_char (const WEdit * edit) +edit_search_get_current_end_line_char (const WEdit *edit) { switch (edit->lb) { @@ -300,7 +300,7 @@ edit_search_get_current_end_line_char (const WEdit * edit) */ static edit_search_line_t -edit_get_search_line_type (const mc_search_t * search) +edit_get_search_line_type (const mc_search_t *search) { edit_search_line_t search_line_type = 0; @@ -328,7 +328,7 @@ edit_get_search_line_type (const mc_search_t * search) */ static off_t -edit_calculate_start_of_next_line (const edit_buffer_t * buf, off_t current_pos, off_t max_pos, +edit_calculate_start_of_next_line (const edit_buffer_t *buf, off_t current_pos, off_t max_pos, char end_string_symbol) { off_t i; @@ -354,7 +354,7 @@ edit_calculate_start_of_next_line (const edit_buffer_t * buf, off_t current_pos, */ static off_t -edit_calculate_end_of_previous_line (const edit_buffer_t * buf, off_t current_pos, +edit_calculate_end_of_previous_line (const edit_buffer_t *buf, off_t current_pos, char end_string_symbol) { off_t i; @@ -377,7 +377,7 @@ edit_calculate_end_of_previous_line (const edit_buffer_t * buf, off_t current_po */ static inline off_t -edit_calculate_start_of_previous_line (const edit_buffer_t * buf, off_t current_pos, +edit_calculate_start_of_previous_line (const edit_buffer_t *buf, off_t current_pos, char end_string_symbol) { current_pos = edit_calculate_end_of_previous_line (buf, current_pos, end_string_symbol); @@ -397,7 +397,7 @@ edit_calculate_start_of_previous_line (const edit_buffer_t * buf, off_t current_ */ static inline off_t -edit_calculate_start_of_current_line (const edit_buffer_t * buf, off_t current_pos, +edit_calculate_start_of_current_line (const edit_buffer_t *buf, off_t current_pos, char end_string_symbol) { current_pos = edit_calculate_end_of_previous_line (buf, current_pos, end_string_symbol); @@ -413,7 +413,7 @@ edit_calculate_start_of_current_line (const edit_buffer_t * buf, off_t current_p */ static void -edit_search_fix_search_start_if_selection (WEdit * edit) +edit_search_fix_search_start_if_selection (WEdit *edit) { off_t start_mark = 0; off_t end_mark = 0; @@ -439,7 +439,7 @@ edit_search_fix_search_start_if_selection (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static gboolean -edit_find (edit_search_status_msg_t * esm, gsize * len) +edit_find (edit_search_status_msg_t *esm, gsize *len) { WEdit *edit = esm->edit; off_t search_start = edit->search_start; @@ -573,7 +573,7 @@ edit_replace_cmd__conv_to_input (char *str) /* --------------------------------------------------------------------------------------------- */ static void -edit_show_search_error (const WEdit * edit, const char *title) +edit_show_search_error (const WEdit *edit, const char *title) { if (edit->search->error == MC_SEARCH_E_NOTFOUND) edit_query_dialog (title, _(STR_E_NOTFOUND)); @@ -584,7 +584,7 @@ edit_show_search_error (const WEdit * edit, const char *title) /* --------------------------------------------------------------------------------------------- */ static void -edit_do_search (WEdit * edit) +edit_do_search (WEdit *edit) { edit_search_status_msg_t esm; gsize len = 0; @@ -666,7 +666,7 @@ edit_do_search (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_search (WEdit * edit) +edit_search (WEdit *edit) { if (edit_dialog_search_show (edit)) edit_do_search (edit); @@ -677,7 +677,7 @@ edit_search (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ gboolean -edit_search_init (WEdit * edit, const char *str) +edit_search_init (WEdit *edit, const char *str) { #ifdef HAVE_CHARSET edit->search = mc_search_new (str, cp_source); @@ -707,7 +707,7 @@ edit_search_init (WEdit * edit, const char *str) /* --------------------------------------------------------------------------------------------- */ void -edit_search_deinit (WEdit * edit) +edit_search_deinit (WEdit *edit) { mc_search_free (edit->search); g_free (edit->last_search_string); @@ -740,7 +740,7 @@ edit_search_update_callback (const void *user_data, gsize char_offset) /* --------------------------------------------------------------------------------------------- */ int -edit_search_status_update_cb (status_msg_t * sm) +edit_search_status_update_cb (status_msg_t *sm) { simple_status_msg_t *ssm = SIMPLE_STATUS_MSG (sm); edit_search_status_msg_t *esm = (edit_search_status_msg_t *) sm; @@ -772,7 +772,7 @@ edit_search_status_update_cb (status_msg_t * sm) /* --------------------------------------------------------------------------------------------- */ void -edit_search_cmd (WEdit * edit, gboolean again) +edit_search_cmd (WEdit *edit, gboolean again) { if (!again) edit_search (edit); @@ -807,7 +807,7 @@ edit_search_cmd (WEdit * edit, gboolean again) /** call with edit = 0 before shutdown to close memory leaks */ void -edit_replace_cmd (WEdit * edit, gboolean again) +edit_replace_cmd (WEdit *edit, gboolean again) { /* 1 = search string, 2 = replace with */ static char *saved1 = NULL; /* saved default[123] */ diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index 14c59dc160..56d381df2f 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -181,7 +181,7 @@ edit_about (void) */ static void -edit_help (const WDialog * h) +edit_help (const WDialog *h) { ev_help_t event_data = { NULL, h->help_ctx }; @@ -196,7 +196,7 @@ edit_help (const WDialog * h) */ static void -edit_restore_size (WEdit * edit) +edit_restore_size (WEdit *edit) { Widget *w = WIDGET (edit); @@ -215,7 +215,7 @@ edit_restore_size (WEdit * edit) */ static void -edit_window_move (WEdit * edit, long command) +edit_window_move (WEdit *edit, long command) { Widget *we = WIDGET (edit); Widget *wo = WIDGET (we->owner); @@ -257,7 +257,7 @@ edit_window_move (WEdit * edit, long command) */ static void -edit_window_resize (WEdit * edit, long command) +edit_window_resize (WEdit *edit, long command) { Widget *we = WIDGET (edit); Widget *wo = WIDGET (we->owner); @@ -307,7 +307,7 @@ get_hotkey (int n) /* --------------------------------------------------------------------------------------------- */ static void -edit_window_list (const WDialog * h) +edit_window_list (const WDialog *h) { const WGroup *g = CONST_GROUP (h); const size_t offset = 2; /* skip menu and buttonbar */ @@ -371,7 +371,7 @@ edit_get_shortcut (long command) /* --------------------------------------------------------------------------------------------- */ static char * -edit_get_title (const WDialog * h, size_t len) +edit_get_title (const WDialog *h, size_t len) { const WEdit *edit; const char *modified; @@ -397,7 +397,7 @@ edit_get_title (const WDialog * h, size_t len) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -edit_dialog_command_execute (WDialog * h, long command) +edit_dialog_command_execute (WDialog *h, long command) { WGroup *g = GROUP (h); cb_ret_t ret = MSG_HANDLED; @@ -505,7 +505,7 @@ edit_dialog_command_execute (WDialog * h, long command) */ static gboolean -edit_translate_key (WEdit * edit, long x_key, int *cmd, int *ch) +edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch) { Widget *w = WIDGET (edit); long command = CK_InsertChar; @@ -620,7 +620,7 @@ edit_translate_key (WEdit * edit, long x_key, int *cmd, int *ch) /* --------------------------------------------------------------------------------------------- */ static inline void -edit_quit (WDialog * h) +edit_quit (WDialog *h) { GList *l; WEdit *e = NULL; @@ -669,7 +669,7 @@ edit_quit (WDialog * h) /* --------------------------------------------------------------------------------------------- */ static inline void -edit_set_buttonbar (WEdit * edit, WButtonBar * bb) +edit_set_buttonbar (WEdit *edit, WButtonBar *bb) { Widget *w = WIDGET (edit); @@ -688,7 +688,7 @@ edit_set_buttonbar (WEdit * edit, WButtonBar * bb) /* --------------------------------------------------------------------------------------------- */ static void -edit_total_update (WEdit * edit) +edit_total_update (WEdit *edit) { edit_find_bracket (edit); edit->force |= REDRAW_COMPLETELY; @@ -699,7 +699,7 @@ edit_total_update (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static gboolean -edit_update_cursor (WEdit * edit, const mouse_event_t * event) +edit_update_cursor (WEdit *edit, const mouse_event_t *event) { int x, y; gboolean done; @@ -759,7 +759,7 @@ edit_update_cursor (WEdit * edit, const mouse_event_t * event) /** Callback for the edit dialog */ static cb_ret_t -edit_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +edit_dialog_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WGroup *g = GROUP (w); WDialog *h = DIALOG (w); @@ -861,7 +861,7 @@ edit_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v * @param event mouse event data */ static void -edit_dialog_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +edit_dialog_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { gboolean unhandled = TRUE; @@ -920,7 +920,7 @@ edit_dialog_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -edit_dialog_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +edit_dialog_bg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -938,7 +938,7 @@ edit_dialog_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -edit_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +edit_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WEdit *e = EDIT (w); @@ -1011,7 +1011,7 @@ edit_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da * Handle move/resize mouse events. */ static void -edit_mouse_handle_move_resize (Widget * w, mouse_msg_t msg, mouse_event_t * event) +edit_mouse_handle_move_resize (Widget *w, mouse_msg_t msg, mouse_event_t *event) { WEdit *edit = EDIT (w); WRect *r = &w->rect; @@ -1071,7 +1071,7 @@ edit_mouse_handle_move_resize (Widget * w, mouse_msg_t msg, mouse_event_t * even * @param event mouse event data */ static void -edit_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +edit_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { WEdit *edit = EDIT (w); /* buttons' distance from right edge */ @@ -1196,7 +1196,7 @@ edit_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) */ gboolean -edit_file (const edit_arg_t * arg) +edit_file (const edit_arg_t *arg) { GList *files; gboolean ok; @@ -1211,7 +1211,7 @@ edit_file (const edit_arg_t * arg) /* --------------------------------------------------------------------------------------------- */ gboolean -edit_files (const GList * files) +edit_files (const GList *files) { static gboolean made_directory = FALSE; WDialog *edit_dlg; @@ -1287,7 +1287,7 @@ edit_files (const GList * files) /* --------------------------------------------------------------------------------------------- */ WEdit * -edit_find_editor (const WDialog * h) +edit_find_editor (const WDialog *h) { const WGroup *g = CONST_GROUP (h); @@ -1305,7 +1305,7 @@ edit_find_editor (const WDialog * h) */ gboolean -edit_widget_is_editor (const Widget * w) +edit_widget_is_editor (const Widget *w) { return (w != NULL && w->callback == edit_callback); } @@ -1313,7 +1313,7 @@ edit_widget_is_editor (const Widget * w) /* --------------------------------------------------------------------------------------------- */ void -edit_update_screen (WEdit * e) +edit_update_screen (WEdit *e) { edit_scroll_screen_over_cursor (e); edit_update_curs_col (e); @@ -1340,7 +1340,7 @@ edit_update_screen (WEdit * e) */ void -edit_save_size (WEdit * edit) +edit_save_size (WEdit *edit) { edit->loc_prev = WIDGET (edit)->rect; } @@ -1361,7 +1361,7 @@ edit_save_size (WEdit * edit) */ gboolean -edit_add_window (WDialog * h, const WRect * r, const edit_arg_t * arg) +edit_add_window (WDialog *h, const WRect *r, const edit_arg_t *arg) { WEdit *edit; Widget *w; @@ -1391,7 +1391,7 @@ edit_add_window (WDialog * h, const WRect * r, const edit_arg_t * arg) */ gboolean -edit_handle_move_resize (WEdit * edit, long command) +edit_handle_move_resize (WEdit *edit, long command) { Widget *w = WIDGET (edit); gboolean ret = FALSE; @@ -1508,7 +1508,7 @@ edit_handle_move_resize (WEdit * edit, long command) */ void -edit_toggle_fullscreen (WEdit * edit) +edit_toggle_fullscreen (WEdit *edit) { Widget *w = WIDGET (edit); diff --git a/src/editor/etags.c b/src/editor/etags.c index 40ea023b2f..f5163bdae8 100644 --- a/src/editor/etags.c +++ b/src/editor/etags.c @@ -303,9 +303,8 @@ editcmd_dialog_select_definition_add (gpointer data, gpointer user_data) label_def = g_strdup_printf ("%s -> %s:%ld", def_hash->short_define, def_hash->filename, def_hash->line); - listbox_add_item (def_list, LISTBOX_APPEND_AT_END, 0, label_def, def_hash, FALSE); + listbox_add_item_take (def_list, LISTBOX_APPEND_AT_END, 0, label_def, def_hash, FALSE); def_width = str_term_width1 (label_def); - g_free (label_def); def_max_width = MAX (def_max_width, def_width); } @@ -313,7 +312,7 @@ editcmd_dialog_select_definition_add (gpointer data, gpointer user_data) /* let the user select where function definition */ static void -editcmd_dialog_select_definition_show (WEdit * edit, char *match_expr, GPtrArray * def_hash) +editcmd_dialog_select_definition_show (WEdit *edit, char *match_expr, GPtrArray *def_hash) { const WRect *w = &CONST_WIDGET (edit)->rect; int start_x, start_y, offset; @@ -407,7 +406,7 @@ editcmd_dialog_select_definition_show (WEdit * edit, char *match_expr, GPtrArray /* --------------------------------------------------------------------------------------------- */ void -edit_get_match_keyword_cmd (WEdit * edit) +edit_get_match_keyword_cmd (WEdit *edit) { gsize word_len = 0; gsize i; diff --git a/src/editor/format.c b/src/editor/format.c index 9dc5d72def..baccd84604 100644 --- a/src/editor/format.c +++ b/src/editor/format.c @@ -69,7 +69,7 @@ /* --------------------------------------------------------------------------------------------- */ static off_t -line_start (const edit_buffer_t * buf, long line) +line_start (const edit_buffer_t *buf, long line) { off_t p; long l; @@ -91,7 +91,7 @@ line_start (const edit_buffer_t * buf, long line) /* --------------------------------------------------------------------------------------------- */ static gboolean -bad_line_start (const edit_buffer_t * buf, off_t p) +bad_line_start (const edit_buffer_t *buf, off_t p) { int c; @@ -120,7 +120,7 @@ bad_line_start (const edit_buffer_t * buf, off_t p) */ static off_t -begin_paragraph (WEdit * edit, gboolean force, long *lines) +begin_paragraph (WEdit *edit, gboolean force, long *lines) { long i; @@ -145,7 +145,7 @@ begin_paragraph (WEdit * edit, gboolean force, long *lines) */ static off_t -end_paragraph (WEdit * edit, gboolean force) +end_paragraph (WEdit *edit, gboolean force) { long i; @@ -167,7 +167,7 @@ end_paragraph (WEdit * edit, gboolean force) /* --------------------------------------------------------------------------------------------- */ static GString * -get_paragraph (const edit_buffer_t * buf, off_t p, off_t q, gboolean indent) +get_paragraph (const edit_buffer_t *buf, off_t p, off_t q, gboolean indent) { GString *t; @@ -358,7 +358,7 @@ format_this (unsigned char *t, off_t size, long indent, gboolean utf8) /* --------------------------------------------------------------------------------------------- */ static inline void -replace_at (WEdit * edit, off_t q, int c) +replace_at (WEdit *edit, off_t q, int c) { edit_cursor_move (edit, q - edit->buffer.curs1); edit_delete (edit, TRUE); @@ -368,7 +368,7 @@ replace_at (WEdit * edit, off_t q, int c) /* --------------------------------------------------------------------------------------------- */ static long -edit_indent_width (const WEdit * edit, off_t p) +edit_indent_width (const WEdit *edit, off_t p) { off_t q = p; @@ -383,7 +383,7 @@ edit_indent_width (const WEdit * edit, off_t p) /* --------------------------------------------------------------------------------------------- */ static void -edit_insert_indent (WEdit * edit, long indent) +edit_insert_indent (WEdit *edit, long indent) { if (!edit_options.fill_tabs_with_spaces) while (indent >= TAB_SIZE) @@ -400,7 +400,7 @@ edit_insert_indent (WEdit * edit, long indent) /** replaces a block of text */ static inline void -put_paragraph (WEdit * edit, unsigned char *t, off_t p, long indent, off_t size) +put_paragraph (WEdit *edit, unsigned char *t, off_t p, long indent, off_t size) { off_t cursor; off_t i; @@ -453,7 +453,7 @@ put_paragraph (WEdit * edit, unsigned char *t, off_t p, long indent, off_t size) /* --------------------------------------------------------------------------------------------- */ static inline long -test_indent (const WEdit * edit, off_t p, off_t q) +test_indent (const WEdit *edit, off_t p, off_t q) { long indent; @@ -473,7 +473,7 @@ test_indent (const WEdit * edit, off_t p, off_t q) /* --------------------------------------------------------------------------------------------- */ void -format_paragraph (WEdit * edit, gboolean force) +format_paragraph (WEdit *edit, gboolean force) { off_t p, q; long lines; diff --git a/src/editor/spell.c b/src/editor/spell.c index 9d26345a2c..f316d0fa6a 100644 --- a/src/editor/spell.c +++ b/src/editor/spell.c @@ -6,7 +6,7 @@ Written by: Ilia Maslakov , 2012 - Andrew Borodin , 2013, 2021 + Andrew Borodin , 2013-2024 This file is part of the Midnight Commander. @@ -52,6 +52,9 @@ #define B_SKIP_WORD (B_USER+3) #define B_ADD_WORD (B_USER+4) +#define ASPELL_FUNCTION_AVAILABLE(f) \ + g_module_symbol (spell_module, #f, (void *) &mc_##f) + /*** file scope type declarations ****************************************************************/ typedef struct aspell_struct @@ -102,8 +105,7 @@ static struct { const char *code; const char *name; -} spell_codes_map[] = -{ +} spell_codes_map[] = { /* *INDENT-OFF* */ {"br", N_("Breton")}, {"cs", N_("Czech")}, @@ -133,6 +135,7 @@ static struct /* *INDENT-ON* */ }; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ /** @@ -167,188 +170,61 @@ static gboolean spell_available (void) { gchar *spell_module_fname; - gboolean ret = FALSE; if (spell_module != NULL) return TRUE; spell_module_fname = g_module_build_path (NULL, "libaspell"); spell_module = g_module_open (spell_module_fname, G_MODULE_BIND_LAZY); - g_free (spell_module_fname); - if (spell_module == NULL) - return FALSE; - - if (!g_module_symbol (spell_module, "new_aspell_config", (void *) &mc_new_aspell_config)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_dict_info_list_elements", - (void *) &mc_aspell_dict_info_list_elements)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_dict_info_enumeration_next", - (void *) &mc_aspell_dict_info_enumeration_next)) - goto error_ret; - - if (!g_module_symbol (spell_module, "new_aspell_speller", (void *) &mc_new_aspell_speller)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_error_number", (void *) &mc_aspell_error_number)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_speller_error_message", - (void *) &mc_aspell_speller_error_message)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_speller_error", (void *) &mc_aspell_speller_error)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_error", (void *) &mc_aspell_error)) - goto error_ret; - - if (!g_module_symbol (spell_module, "to_aspell_speller", (void *) &mc_to_aspell_speller)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_speller_check", (void *) &mc_aspell_speller_check)) - goto error_ret; - - if (!g_module_symbol - (spell_module, "aspell_speller_suggest", (void *) &mc_aspell_speller_suggest)) - goto error_ret; - - if (!g_module_symbol - (spell_module, "aspell_word_list_elements", (void *) &mc_aspell_word_list_elements)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_string_enumeration_next", - (void *) &mc_aspell_string_enumeration_next)) - goto error_ret; - - if (!g_module_symbol - (spell_module, "aspell_config_replace", (void *) &mc_aspell_config_replace)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_error_message", (void *) &mc_aspell_error_message)) - goto error_ret; - - if (!g_module_symbol - (spell_module, "delete_aspell_speller", (void *) &mc_delete_aspell_speller)) - goto error_ret; - - if (!g_module_symbol (spell_module, "delete_aspell_config", (void *) &mc_delete_aspell_config)) - goto error_ret; - - if (!g_module_symbol (spell_module, "delete_aspell_string_enumeration", - (void *) &mc_delete_aspell_string_enumeration)) - goto error_ret; - - if (!g_module_symbol (spell_module, "get_aspell_dict_info_list", - (void *) &mc_get_aspell_dict_info_list)) - goto error_ret; - - if (!g_module_symbol (spell_module, "delete_aspell_can_have_error", - (void *) &mc_delete_aspell_can_have_error)) - goto error_ret; - - if (!g_module_symbol (spell_module, "delete_aspell_dict_info_enumeration", - (void *) &mc_delete_aspell_dict_info_enumeration)) - goto error_ret; - - if (!g_module_symbol - (spell_module, "aspell_config_retrieve", (void *) &mc_aspell_config_retrieve)) - goto error_ret; - - if (!g_module_symbol - (spell_module, "aspell_word_list_size", (void *) &mc_aspell_word_list_size)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_speller_add_to_personal", - (void *) &mc_aspell_speller_add_to_personal)) - goto error_ret; - - if (!g_module_symbol (spell_module, "aspell_speller_save_all_word_lists", - (void *) &mc_aspell_speller_save_all_word_lists)) - goto error_ret; - - ret = TRUE; - - error_ret: - if (!ret) - { - g_module_close (spell_module); - spell_module = NULL; - } - return ret; -} - -/* --------------------------------------------------------------------------------------------- */ -/*** public functions ****************************************************************************/ -/* --------------------------------------------------------------------------------------------- */ -/** - * Initialization of Aspell support. - */ - -void -aspell_init (void) -{ - AspellCanHaveError *error = NULL; - - if (strcmp (spell_language, "NONE") == 0) - return; - - if (global_speller != NULL) - return; - - global_speller = g_try_malloc (sizeof (spell_t)); - if (global_speller == NULL) - return; - - if (!spell_available ()) - { - MC_PTR_FREE (global_speller); - return; - } - - global_speller->config = mc_new_aspell_config (); - global_speller->speller = NULL; - - if (spell_language != NULL) - mc_aspell_config_replace (global_speller->config, "lang", spell_language); - - error = mc_new_aspell_speller (global_speller->config); + if (spell_module != NULL + && ASPELL_FUNCTION_AVAILABLE (new_aspell_config) + && ASPELL_FUNCTION_AVAILABLE (aspell_dict_info_list_elements) + && ASPELL_FUNCTION_AVAILABLE (aspell_dict_info_enumeration_next) + && ASPELL_FUNCTION_AVAILABLE (new_aspell_speller) + && ASPELL_FUNCTION_AVAILABLE (aspell_error_number) + && ASPELL_FUNCTION_AVAILABLE (aspell_speller_error_message) + && ASPELL_FUNCTION_AVAILABLE (aspell_speller_error) + && ASPELL_FUNCTION_AVAILABLE (aspell_error) + && ASPELL_FUNCTION_AVAILABLE (to_aspell_speller) + && ASPELL_FUNCTION_AVAILABLE (aspell_speller_check) + && ASPELL_FUNCTION_AVAILABLE (aspell_speller_suggest) + && ASPELL_FUNCTION_AVAILABLE (aspell_word_list_elements) + && ASPELL_FUNCTION_AVAILABLE (aspell_string_enumeration_next) + && ASPELL_FUNCTION_AVAILABLE (aspell_config_replace) + && ASPELL_FUNCTION_AVAILABLE (aspell_error_message) + && ASPELL_FUNCTION_AVAILABLE (delete_aspell_speller) + && ASPELL_FUNCTION_AVAILABLE (delete_aspell_config) + && ASPELL_FUNCTION_AVAILABLE (delete_aspell_string_enumeration) + && ASPELL_FUNCTION_AVAILABLE (get_aspell_dict_info_list) + && ASPELL_FUNCTION_AVAILABLE (delete_aspell_can_have_error) + && ASPELL_FUNCTION_AVAILABLE (delete_aspell_dict_info_enumeration) + && ASPELL_FUNCTION_AVAILABLE (aspell_config_retrieve) + && ASPELL_FUNCTION_AVAILABLE (aspell_word_list_size) + && ASPELL_FUNCTION_AVAILABLE (aspell_speller_add_to_personal) + && ASPELL_FUNCTION_AVAILABLE (aspell_speller_save_all_word_lists)) + return TRUE; - if (mc_aspell_error_number (error) == 0) - global_speller->speller = mc_to_aspell_speller (error); - else - { - edit_error_dialog (_("Error"), mc_aspell_error_message (error)); - mc_delete_aspell_can_have_error (error); - aspell_clean (); - } + g_module_close (spell_module); + spell_module = NULL; + return FALSE; } /* --------------------------------------------------------------------------------------------- */ /** - * Deinitialization of Aspell support. + * Get the current language name. + * + * @return language name */ -void -aspell_clean (void) +static const char * +aspell_get_lang (void) { - if (global_speller == NULL) - return; - - if (global_speller->speller != NULL) - mc_delete_aspell_speller (global_speller->speller); - - if (global_speller->config != NULL) - mc_delete_aspell_config (global_speller->config); - - MC_PTR_FREE (global_speller); + const char *code; - g_module_close (spell_module); - spell_module = NULL; + code = mc_aspell_config_retrieve (global_speller->config, "lang"); + return spell_decode_lang (code); } /* --------------------------------------------------------------------------------------------- */ @@ -359,8 +235,8 @@ aspell_clean (void) * @return language list length */ -unsigned int -aspell_get_lang_list (GPtrArray * lang_list) +static unsigned int +aspell_get_lang_list (GPtrArray *lang_list) { AspellDictInfoList *dlist; AspellDictInfoEnumeration *elem; @@ -386,36 +262,6 @@ aspell_get_lang_list (GPtrArray * lang_list) return i; } -/* --------------------------------------------------------------------------------------------- */ -/** - * Clear the array of languages. - * - * @param array Array of languages - */ - -void -aspell_array_clean (GPtrArray * array) -{ - if (array != NULL) - g_ptr_array_free (array, TRUE); -} - -/* --------------------------------------------------------------------------------------------- */ -/** - * Get the current language name. - * - * @return language name - */ - -const char * -aspell_get_lang (void) -{ - const char *code; - - code = mc_aspell_config_retrieve (global_speller->config, "lang"); - return spell_decode_lang (code); -} - /* --------------------------------------------------------------------------------------------- */ /** * Set the language. @@ -424,7 +270,7 @@ aspell_get_lang (void) * @return FALSE or error */ -gboolean +static gboolean aspell_set_lang (const char *lang) { if (lang != NULL) @@ -465,22 +311,133 @@ aspell_set_lang (const char *lang) /* --------------------------------------------------------------------------------------------- */ /** - * Check word. + * Show suggests for the current word. * + * @param edit Editor object * @param word Word for spell check - * @param word_size Word size (in bytes) - * @return FALSE if word is not in the dictionary + * @param new_word Word to replace the incorrect word + * @param suggest Array of suggests for current word + * @return code of pressed button */ -gboolean -aspell_check (const char *word, const int word_size) +static int +spell_dialog_spell_suggest_show (WEdit *edit, const char *word, char **new_word, + const GPtrArray *suggest) { - int res = 0; - if (word != NULL && global_speller != NULL && global_speller->speller != NULL) - res = mc_aspell_speller_check (global_speller->speller, word, word_size); + int sug_dlg_h = 14; /* dialog height */ + int sug_dlg_w = 29; /* dialog width */ + int xpos, ypos; + char *lang_label; + char *word_label; + unsigned int i; + int res; + char *curr = NULL; + WDialog *sug_dlg; + WGroup *g; + WListbox *sug_list; + int max_btn_len = 0; + int replace_len; + int skip_len; + int cancel_len; + WButton *add_btn; + WButton *replace_btn; + WButton *skip_btn; + WButton *cancel_button; + int word_label_len; - return (res == 1); + /* calculate the dialog metrics */ + xpos = (COLS - sug_dlg_w) / 2; + ypos = (LINES - sug_dlg_h) * 2 / 3; + + /* Sometimes menu can hide replaced text. I don't like it */ + if ((edit->curs_row >= ypos - 1) && (edit->curs_row <= ypos + sug_dlg_h - 1)) + ypos -= sug_dlg_h; + + add_btn = button_new (5, 28, B_ADD_WORD, NORMAL_BUTTON, _("&Add word"), 0); + replace_btn = button_new (7, 28, B_ENTER, NORMAL_BUTTON, _("&Replace"), 0); + replace_len = button_get_len (replace_btn); + skip_btn = button_new (9, 28, B_SKIP_WORD, NORMAL_BUTTON, _("&Skip"), 0); + skip_len = button_get_len (skip_btn); + cancel_button = button_new (11, 28, B_CANCEL, NORMAL_BUTTON, _("&Cancel"), 0); + cancel_len = button_get_len (cancel_button); + + max_btn_len = MAX (replace_len, skip_len); + max_btn_len = MAX (max_btn_len, cancel_len); + + lang_label = g_strdup_printf ("%s: %s", _("Language"), aspell_get_lang ()); + word_label = g_strdup_printf ("%s: %s", _("Misspelled"), word); + word_label_len = str_term_width1 (word_label) + 5; + + sug_dlg_w += max_btn_len; + sug_dlg_w = MAX (sug_dlg_w, word_label_len) + 1; + + sug_dlg = dlg_create (TRUE, ypos, xpos, sug_dlg_h, sug_dlg_w, WPOS_KEEP_DEFAULT, TRUE, + dialog_colors, NULL, NULL, "[ASpell]", _("Check word")); + g = GROUP (sug_dlg); + + group_add_widget (g, label_new (1, 2, lang_label)); + group_add_widget (g, label_new (3, 2, word_label)); + + group_add_widget (g, groupbox_new (4, 2, sug_dlg_h - 5, 25, _("Suggest"))); + + sug_list = listbox_new (5, 2, sug_dlg_h - 7, 24, FALSE, NULL); + for (i = 0; i < suggest->len; i++) + listbox_add_item (sug_list, LISTBOX_APPEND_AT_END, 0, g_ptr_array_index (suggest, i), NULL, + FALSE); + group_add_widget (g, sug_list); + + group_add_widget (g, add_btn); + group_add_widget (g, replace_btn); + group_add_widget (g, skip_btn); + group_add_widget (g, cancel_button); + + res = dlg_run (sug_dlg); + if (res == B_ENTER) + { + char *tmp = NULL; + listbox_get_current (sug_list, &curr, NULL); + + if (curr != NULL) + tmp = g_strdup (curr); + *new_word = tmp; + } + + widget_destroy (WIDGET (sug_dlg)); + g_free (lang_label); + g_free (word_label); + + return res; +} + +/* --------------------------------------------------------------------------------------------- */ +/* + * Add word to personal dictionary. + * + * @param word Word for spell check + * @param word_size Word size (in bytes) + * @return FALSE or error + */ +static gboolean +aspell_add_to_dict (const char *word, int word_size) +{ + mc_aspell_speller_add_to_personal (global_speller->speller, word, word_size); + + if (mc_aspell_speller_error (global_speller->speller) != 0) + { + edit_error_dialog (_("Error"), mc_aspell_speller_error_message (global_speller->speller)); + return FALSE; + } + + mc_aspell_speller_save_all_word_lists (global_speller->speller); + + if (mc_aspell_speller_error (global_speller->speller) != 0) + { + edit_error_dialog (_("Error"), mc_aspell_speller_error_message (global_speller->speller)); + return FALSE; + } + + return TRUE; } /* --------------------------------------------------------------------------------------------- */ @@ -493,8 +450,8 @@ aspell_check (const char *word, const int word_size) * @return count of suggests for the word */ -unsigned int -aspell_suggest (GPtrArray * suggest, const char *word, const int word_size) +static unsigned int +aspell_suggest (GPtrArray *suggest, const char *word, const int word_size) { unsigned int size = 0; @@ -528,39 +485,112 @@ aspell_suggest (GPtrArray * suggest, const char *word, const int word_size) } /* --------------------------------------------------------------------------------------------- */ -/* - * Add word to personal dictionary. +/** + * Check word. * * @param word Word for spell check - * @param word_size Word size (in bytes) - * @return FALSE or error + * @param word_size Word size (in bytes) + * @return FALSE if word is not in the dictionary */ -gboolean -aspell_add_to_dict (const char *word, int word_size) + +static gboolean +aspell_check (const char *word, const int word_size) { - mc_aspell_speller_add_to_personal (global_speller->speller, word, word_size); + int res = 0; - if (mc_aspell_speller_error (global_speller->speller) != 0) + if (word != NULL && global_speller != NULL && global_speller->speller != NULL) + res = mc_aspell_speller_check (global_speller->speller, word, word_size); + + return (res == 1); +} + +/* --------------------------------------------------------------------------------------------- */ +/** + * Clear the array of languages. + * + * @param array Array of languages + */ + +static void +aspell_array_clean (GPtrArray *array) +{ + if (array != NULL) + g_ptr_array_free (array, TRUE); +} + +/* --------------------------------------------------------------------------------------------- */ +/*** public functions ****************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ +/** + * Initialization of Aspell support. + */ + +void +aspell_init (void) +{ + AspellCanHaveError *error = NULL; + + if (strcmp (spell_language, "NONE") == 0) + return; + + if (global_speller != NULL) + return; + + global_speller = g_try_malloc (sizeof (spell_t)); + if (global_speller == NULL) + return; + + if (!spell_available ()) { - edit_error_dialog (_("Error"), mc_aspell_speller_error_message (global_speller->speller)); - return FALSE; + MC_PTR_FREE (global_speller); + return; } - mc_aspell_speller_save_all_word_lists (global_speller->speller); + global_speller->config = mc_new_aspell_config (); + global_speller->speller = NULL; - if (mc_aspell_speller_error (global_speller->speller) != 0) + if (spell_language != NULL) + mc_aspell_config_replace (global_speller->config, "lang", spell_language); + + error = mc_new_aspell_speller (global_speller->config); + + if (mc_aspell_error_number (error) == 0) + global_speller->speller = mc_to_aspell_speller (error); + else { - edit_error_dialog (_("Error"), mc_aspell_speller_error_message (global_speller->speller)); - return FALSE; + edit_error_dialog (_("Error"), mc_aspell_error_message (error)); + mc_delete_aspell_can_have_error (error); + aspell_clean (); } +} - return TRUE; +/* --------------------------------------------------------------------------------------------- */ +/** + * Deinitialization of Aspell support. + */ + +void +aspell_clean (void) +{ + if (global_speller == NULL) + return; + + if (global_speller->speller != NULL) + mc_delete_aspell_speller (global_speller->speller); + + if (global_speller->config != NULL) + mc_delete_aspell_config (global_speller->config); + + MC_PTR_FREE (global_speller); + + g_module_close (spell_module); + spell_module = NULL; } /* --------------------------------------------------------------------------------------------- */ int -edit_suggest_current_word (WEdit * edit) +edit_suggest_current_word (WEdit *edit) { gsize cut_len = 0; gsize word_len = 0; @@ -649,7 +679,7 @@ edit_suggest_current_word (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_spellcheck_file (WEdit * edit) +edit_spellcheck_file (WEdit *edit) { if (edit->buffer.curs_line > 0) { @@ -697,107 +727,6 @@ edit_set_spell_lang (void) aspell_array_clean (lang_list); } -/* --------------------------------------------------------------------------------------------- */ -/** - * Show suggests for the current word. - * - * @param edit Editor object - * @param word Word for spell check - * @param new_word Word to replace the incorrect word - * @param suggest Array of suggests for current word - * @return code of pressed button - */ - -int -spell_dialog_spell_suggest_show (WEdit * edit, const char *word, char **new_word, - const GPtrArray * suggest) -{ - - int sug_dlg_h = 14; /* dialog height */ - int sug_dlg_w = 29; /* dialog width */ - int xpos, ypos; - char *lang_label; - char *word_label; - unsigned int i; - int res; - char *curr = NULL; - WDialog *sug_dlg; - WGroup *g; - WListbox *sug_list; - int max_btn_len = 0; - int replace_len; - int skip_len; - int cancel_len; - WButton *add_btn; - WButton *replace_btn; - WButton *skip_btn; - WButton *cancel_button; - int word_label_len; - - /* calculate the dialog metrics */ - xpos = (COLS - sug_dlg_w) / 2; - ypos = (LINES - sug_dlg_h) * 2 / 3; - - /* Sometimes menu can hide replaced text. I don't like it */ - if ((edit->curs_row >= ypos - 1) && (edit->curs_row <= ypos + sug_dlg_h - 1)) - ypos -= sug_dlg_h; - - add_btn = button_new (5, 28, B_ADD_WORD, NORMAL_BUTTON, _("&Add word"), 0); - replace_btn = button_new (7, 28, B_ENTER, NORMAL_BUTTON, _("&Replace"), 0); - replace_len = button_get_len (replace_btn); - skip_btn = button_new (9, 28, B_SKIP_WORD, NORMAL_BUTTON, _("&Skip"), 0); - skip_len = button_get_len (skip_btn); - cancel_button = button_new (11, 28, B_CANCEL, NORMAL_BUTTON, _("&Cancel"), 0); - cancel_len = button_get_len (cancel_button); - - max_btn_len = MAX (replace_len, skip_len); - max_btn_len = MAX (max_btn_len, cancel_len); - - lang_label = g_strdup_printf ("%s: %s", _("Language"), aspell_get_lang ()); - word_label = g_strdup_printf ("%s: %s", _("Misspelled"), word); - word_label_len = str_term_width1 (word_label) + 5; - - sug_dlg_w += max_btn_len; - sug_dlg_w = MAX (sug_dlg_w, word_label_len) + 1; - - sug_dlg = dlg_create (TRUE, ypos, xpos, sug_dlg_h, sug_dlg_w, WPOS_KEEP_DEFAULT, TRUE, - dialog_colors, NULL, NULL, "[ASpell]", _("Check word")); - g = GROUP (sug_dlg); - - group_add_widget (g, label_new (1, 2, lang_label)); - group_add_widget (g, label_new (3, 2, word_label)); - - group_add_widget (g, groupbox_new (4, 2, sug_dlg_h - 5, 25, _("Suggest"))); - - sug_list = listbox_new (5, 2, sug_dlg_h - 7, 24, FALSE, NULL); - for (i = 0; i < suggest->len; i++) - listbox_add_item (sug_list, LISTBOX_APPEND_AT_END, 0, g_ptr_array_index (suggest, i), NULL, - FALSE); - group_add_widget (g, sug_list); - - group_add_widget (g, add_btn); - group_add_widget (g, replace_btn); - group_add_widget (g, skip_btn); - group_add_widget (g, cancel_button); - - res = dlg_run (sug_dlg); - if (res == B_ENTER) - { - char *tmp = NULL; - listbox_get_current (sug_list, &curr, NULL); - - if (curr != NULL) - tmp = g_strdup (curr); - *new_word = tmp; - } - - widget_destroy (WIDGET (sug_dlg)); - g_free (lang_label); - g_free (word_label); - - return res; -} - /* --------------------------------------------------------------------------------------------- */ /** * Show dialog to select language for spell check. @@ -807,7 +736,7 @@ spell_dialog_spell_suggest_show (WEdit * edit, const char *word, char **new_word */ const char * -spell_dialog_lang_list_show (const GPtrArray * languages) +spell_dialog_lang_list_show (const GPtrArray *languages) { int lang_dlg_h = 12; /* dialog height */ diff --git a/src/editor/spell.h b/src/editor/spell.h index 005a2f5311..04e779de15 100644 --- a/src/editor/spell.h +++ b/src/editor/spell.h @@ -15,20 +15,11 @@ void aspell_init (void); void aspell_clean (void); -gboolean aspell_check (const char *word, const int word_size); -unsigned int aspell_suggest (GPtrArray * suggest, const char *word, const int word_size); -void aspell_array_clean (GPtrArray * array); -unsigned int aspell_get_lang_list (GPtrArray * lang_list); -const char *aspell_get_lang (void); -gboolean aspell_set_lang (const char *lang); -gboolean aspell_add_to_dict (const char *word, const int word_size); int edit_suggest_current_word (WEdit * edit); void edit_spellcheck_file (WEdit * edit); void edit_set_spell_lang (void); -int spell_dialog_spell_suggest_show (WEdit * edit, const char *word, char **new_word, - const GPtrArray * suggest); const char *spell_dialog_lang_list_show (const GPtrArray * languages); /*** inline functions ****************************************************************************/ diff --git a/src/editor/syntax.c b/src/editor/syntax.c index 4b8116ffd8..a5b4b9bcd4 100644 --- a/src/editor/syntax.c +++ b/src/editor/syntax.c @@ -186,7 +186,7 @@ mc_defines_destroy (gpointer key, gpointer value, gpointer data) /** Completely destroys the defines tree */ static void -destroy_defines (GTree ** defines) +destroy_defines (GTree **defines) { g_tree_foreach (*defines, mc_defines_destroy, NULL); g_tree_destroy (*defines); @@ -197,7 +197,7 @@ destroy_defines (GTree ** defines) /** Wrapper for case insensitive mode */ inline static int -xx_tolower (const WEdit * edit, int c) +xx_tolower (const WEdit *edit, int c) { return edit->is_case_insensitive ? tolower (c) : c; } @@ -205,7 +205,7 @@ xx_tolower (const WEdit * edit, int c) /* --------------------------------------------------------------------------------------------- */ static void -subst_defines (GTree * defines, char **argv, char **argv_end) +subst_defines (GTree *defines, char **argv, char **argv_end) { for (; *argv != NULL && argv < argv_end; argv++) { @@ -242,7 +242,7 @@ subst_defines (GTree * defines, char **argv, char **argv_end) /* --------------------------------------------------------------------------------------------- */ static off_t -compare_word_to_right (const WEdit * edit, off_t i, const GString * text, +compare_word_to_right (const WEdit *edit, off_t i, const GString *text, const char *whole_left, const char *whole_right, gboolean line_start) { const unsigned char *p, *q; @@ -359,7 +359,7 @@ compare_word_to_right (const WEdit * edit, off_t i, const GString * text, /* --------------------------------------------------------------------------------------------- */ static const char * -xx_strchr (const WEdit * edit, const unsigned char *s, int char_byte) +xx_strchr (const WEdit *edit, const unsigned char *s, int char_byte) { while (*s >= '\005' && xx_tolower (edit, *s) != char_byte) s++; @@ -370,7 +370,7 @@ xx_strchr (const WEdit * edit, const unsigned char *s, int char_byte) /* --------------------------------------------------------------------------------------------- */ static void -apply_rules_going_right (WEdit * edit, off_t i) +apply_rules_going_right (WEdit *edit, off_t i) { context_rule_t *r; int c; @@ -586,7 +586,7 @@ apply_rules_going_right (WEdit * edit, off_t i) /* --------------------------------------------------------------------------------------------- */ static void -edit_get_rule (WEdit * edit, off_t byte_index) +edit_get_rule (WEdit *edit, off_t byte_index) { off_t i; @@ -646,7 +646,7 @@ edit_get_rule (WEdit * edit, off_t byte_index) /* --------------------------------------------------------------------------------------------- */ static int -translate_rule_to_color (const WEdit * edit, const edit_syntax_rule_t * rule) +translate_rule_to_color (const WEdit *edit, const edit_syntax_rule_t *rule) { syntax_keyword_t *k; context_rule_t *r; @@ -665,7 +665,7 @@ translate_rule_to_color (const WEdit * edit, const edit_syntax_rule_t * rule) */ static size_t -read_one_line (char **line, FILE * f) +read_one_line (char **line, FILE *f) { GString *p; size_t r = 0; @@ -812,7 +812,7 @@ get_args (char *l, char **args, int args_size) /* --------------------------------------------------------------------------------------------- */ static int -this_try_alloc_color_pair (tty_color_pair_t * color) +this_try_alloc_color_pair (tty_color_pair_t *color) { char f[80], b[80], a[80], *p; @@ -917,7 +917,7 @@ open_include_file (const char *filename) /* --------------------------------------------------------------------------------------------- */ inline static void -xx_lowerize_line (WEdit * edit, char *line, size_t len) +xx_lowerize_line (WEdit *edit, char *line, size_t len) { if (edit->is_case_insensitive) { @@ -932,7 +932,7 @@ xx_lowerize_line (WEdit * edit, char *line, size_t len) /** returns line number on error */ static int -edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size) +edit_read_syntax_rules (WEdit *edit, FILE *f, char **args, int args_size) { FILE *g = NULL; tty_color_pair_t color; @@ -1265,7 +1265,7 @@ edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size) /* returns -1 on file error, line number on error in file syntax */ static int -edit_read_syntax_file (WEdit * edit, GPtrArray * pnames, const char *syntax_file, +edit_read_syntax_file (WEdit *edit, GPtrArray *pnames, const char *syntax_file, const char *editor_file, const char *first_line, const char *type) { FILE *f, *g = NULL; @@ -1394,7 +1394,7 @@ edit_read_syntax_file (WEdit * edit, GPtrArray * pnames, const char *syntax_file /* --------------------------------------------------------------------------------------------- */ static const char * -get_first_editor_line (WEdit * edit) +get_first_editor_line (WEdit *edit) { static char s[256]; @@ -1431,7 +1431,7 @@ pstrcmp (const void *p1, const void *p2) /* --------------------------------------------------------------------------------------------- */ static int -exec_edit_syntax_dialog (const GPtrArray * names, const char *current_syntax) +exec_edit_syntax_dialog (const GPtrArray *names, const char *current_syntax) { size_t i; Listbox *syntaxlist; @@ -1459,7 +1459,7 @@ exec_edit_syntax_dialog (const GPtrArray * names, const char *current_syntax) /* --------------------------------------------------------------------------------------------- */ int -edit_get_syntax_color (WEdit * edit, off_t byte_index) +edit_get_syntax_color (WEdit *edit, off_t byte_index) { if (!tty_use_colors ()) return 0; @@ -1476,7 +1476,7 @@ edit_get_syntax_color (WEdit * edit, off_t byte_index) /* --------------------------------------------------------------------------------------------- */ void -edit_free_syntax_rules (WEdit * edit) +edit_free_syntax_rules (WEdit *edit) { if (edit == NULL) return; @@ -1504,7 +1504,7 @@ edit_free_syntax_rules (WEdit * edit) * type must be edit->syntax_type or NULL */ void -edit_load_syntax (WEdit * edit, GPtrArray * pnames, const char *type) +edit_load_syntax (WEdit *edit, GPtrArray *pnames, const char *type) { int r; char *f = NULL; @@ -1558,7 +1558,7 @@ edit_load_syntax (WEdit * edit, GPtrArray * pnames, const char *type) /* --------------------------------------------------------------------------------------------- */ const char * -edit_get_syntax_type (const WEdit * edit) +edit_get_syntax_type (const WEdit *edit) { return edit->syntax_type; } @@ -1566,7 +1566,7 @@ edit_get_syntax_type (const WEdit * edit) /* --------------------------------------------------------------------------------------------- */ void -edit_syntax_dialog (WEdit * edit) +edit_syntax_dialog (WEdit *edit) { GPtrArray *names; int syntax; diff --git a/src/events_init.c b/src/events_init.c index b29678c5db..8fa89439f2 100644 --- a/src/events_init.c +++ b/src/events_init.c @@ -55,7 +55,7 @@ /* --------------------------------------------------------------------------------------------- */ gboolean -events_init (GError ** mcerror) +events_init (GError **mcerror) { /* *INDENT-OFF* */ static const event_init_t standard_events[] = diff --git a/src/execute.c b/src/execute.c index f9beed1402..4c2a1d3d18 100644 --- a/src/execute.c +++ b/src/execute.c @@ -131,7 +131,7 @@ edition_pre_exec (void) #ifdef ENABLE_SUBSHELL static void -do_possible_cd (const vfs_path_t * new_dir_vpath) +do_possible_cd (const vfs_path_t *new_dir_vpath) { if (!panel_cd (current_panel, new_dir_vpath, cd_exact)) message (D_ERROR, _("Warning"), "%s", @@ -178,8 +178,8 @@ do_suspend_cmd (void) /* --------------------------------------------------------------------------------------------- */ static gboolean -execute_prepare_with_vfs_arg (const vfs_path_t * filename_vpath, vfs_path_t ** localcopy_vpath, - time_t * mtime) +execute_prepare_with_vfs_arg (const vfs_path_t *filename_vpath, vfs_path_t **localcopy_vpath, + time_t *mtime) { struct stat st; @@ -208,8 +208,8 @@ execute_prepare_with_vfs_arg (const vfs_path_t * filename_vpath, vfs_path_t ** l /* --------------------------------------------------------------------------------------------- */ static void -execute_cleanup_with_vfs_arg (const vfs_path_t * filename_vpath, vfs_path_t ** localcopy_vpath, - time_t * mtime) +execute_cleanup_with_vfs_arg (const vfs_path_t *filename_vpath, vfs_path_t **localcopy_vpath, + time_t *mtime) { if (*localcopy_vpath != NULL) { @@ -260,7 +260,7 @@ execute_get_opts_from_cfg (const char *command, const char *default_str) /* --------------------------------------------------------------------------------------------- */ char * -execute_get_external_cmd_opts_from_config (const char *command, const vfs_path_t * filename_vpath, +execute_get_external_cmd_opts_from_config (const char *command, const vfs_path_t *filename_vpath, long start_line) { char *str_from_config, *return_str; @@ -582,7 +582,7 @@ toggle_subshell (void) /* event callback */ gboolean -execute_suspend (const gchar * event_group_name, const gchar * event_name, +execute_suspend (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { (void) event_group_name; @@ -608,7 +608,7 @@ execute_suspend (const gchar * event_group_name, const gchar * event_name, */ void -execute_with_vfs_arg (const char *command, const vfs_path_t * filename_vpath) +execute_with_vfs_arg (const char *command, const vfs_path_t *filename_vpath) { vfs_path_t *localcopy_vpath = NULL; const vfs_path_t *do_execute_vpath; @@ -635,7 +635,7 @@ execute_with_vfs_arg (const char *command, const vfs_path_t * filename_vpath) */ void -execute_external_editor_or_viewer (const char *command, const vfs_path_t * filename_vpath, +execute_external_editor_or_viewer (const char *command, const vfs_path_t *filename_vpath, long start_line) { vfs_path_t *localcopy_vpath = NULL; diff --git a/src/file_history.c b/src/file_history.c index f4989e79c9..f54501778b 100644 --- a/src/file_history.c +++ b/src/file_history.c @@ -99,7 +99,7 @@ file_history_list_read (void) /* --------------------------------------------------------------------------------------------- */ static void -file_history_list_write (const GList * file_list) +file_history_list_write (const GList *file_list) { char *fn; FILE *f; @@ -149,7 +149,7 @@ file_history_list_write (const GList * file_list) /* --------------------------------------------------------------------------------------------- */ static void -file_history_create_item (history_descriptor_t * hd, void *data) +file_history_create_item (history_descriptor_t *hd, void *data) { file_history_data_t *fhd = (file_history_data_t *) data; size_t width; @@ -165,7 +165,7 @@ file_history_create_item (history_descriptor_t * hd, void *data) /* --------------------------------------------------------------------------------------------- */ static void * -file_history_release_item (history_descriptor_t * hd, WLEntry * le) +file_history_release_item (history_descriptor_t *hd, WLEntry *le) { file_history_data_t *fhd; @@ -205,7 +205,7 @@ file_history_free_item (void *data) * @return name of selected file, A newly allocated string. */ char * -show_file_history (const Widget * w, int *action) +show_file_history (const Widget *w, int *action) { GList *file_list; size_t len; diff --git a/src/filemanager/achown.c b/src/filemanager/achown.c index 717a64562c..a4ef1f5bbd 100644 --- a/src/filemanager/achown.c +++ b/src/filemanager/achown.c @@ -74,8 +74,7 @@ static struct int x; int len; const char *text; -} advanced_chown_but[BUTTONS] = -{ +} advanced_chown_but[BUTTONS] = { /* *INDENT-OFF* */ { 0, B_ENTER, NARROW_BUTTON, 3, 0, " " }, { 0, B_ENTER, NARROW_BUTTON, 11, 0, " " }, @@ -238,7 +237,7 @@ update_ownership (void) /* --------------------------------------------------------------------------------------------- */ static void -print_flags (const WDialog * h) +print_flags (const WDialog *h) { int i; @@ -279,7 +278,7 @@ print_flags (const WDialog * h) /* --------------------------------------------------------------------------------------------- */ static void -advanced_chown_refresh (const WDialog * h) +advanced_chown_refresh (const WDialog *h) { tty_setcolor (COLOR_NORMAL); @@ -315,7 +314,7 @@ advanced_chown_info_update (void) /* --------------------------------------------------------------------------------------------- */ static void -update_mode (WGroup * g) +update_mode (WGroup *g) { print_flags (DIALOG (g)); advanced_chown_info_update (); @@ -325,7 +324,7 @@ update_mode (WGroup * g) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -perm_button_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +perm_button_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WButton *b = BUTTON (w); WGroup *g = w->owner; @@ -439,7 +438,7 @@ perm_button_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v /* --------------------------------------------------------------------------------------------- */ static void -perm_button_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +perm_button_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { switch (msg) { @@ -479,7 +478,7 @@ perm_button_new (int y, int x, int action, button_flags_t flags, const char *tex /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chl_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +chl_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -508,7 +507,7 @@ chl_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *dat /* --------------------------------------------------------------------------------------------- */ static int -user_group_button_cb (WButton * button, int action) +user_group_button_cb (WButton *button, int action) { Widget *w = WIDGET (button); int f_pos; @@ -654,7 +653,7 @@ user_group_button_cb (WButton * button, int action) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -advanced_chown_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +advanced_chown_bg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -672,7 +671,7 @@ advanced_chown_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int p /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -advanced_chown_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +advanced_chown_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WGroup *g = GROUP (w); int i = 0; @@ -729,7 +728,7 @@ advanced_chown_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm /* --------------------------------------------------------------------------------------------- */ static WDialog * -advanced_chown_dlg_create (WPanel * panel) +advanced_chown_dlg_create (WPanel *panel) { gboolean single_set; WDialog *ch_dlg; @@ -833,7 +832,7 @@ advanced_chown_done (gboolean need_update) /* --------------------------------------------------------------------------------------------- */ static const GString * -next_file (const WPanel * panel) +next_file (const WPanel *panel) { while (panel->dir.list[current_file].f.marked == 0) current_file++; @@ -844,7 +843,7 @@ next_file (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static gboolean -try_advanced_chown (const vfs_path_t * p, mode_t m, uid_t u, gid_t g) +try_advanced_chown (const vfs_path_t *p, mode_t m, uid_t u, gid_t g) { int chmod_result; const char *fname = NULL; @@ -929,7 +928,7 @@ try_advanced_chown (const vfs_path_t * p, mode_t m, uid_t u, gid_t g) /* --------------------------------------------------------------------------------------------- */ static gboolean -do_advanced_chown (WPanel * panel, const vfs_path_t * p, mode_t m, uid_t u, gid_t g) +do_advanced_chown (WPanel *panel, const vfs_path_t *p, mode_t m, uid_t u, gid_t g) { gboolean ret; @@ -943,7 +942,7 @@ do_advanced_chown (WPanel * panel, const vfs_path_t * p, mode_t m, uid_t u, gid_ /* --------------------------------------------------------------------------------------------- */ static void -apply_advanced_chowns (WPanel * panel, vfs_path_t * vpath, struct stat *sf) +apply_advanced_chowns (WPanel *panel, vfs_path_t *vpath, struct stat *sf) { gid_t a_gid = sf->st_gid; uid_t a_uid = sf->st_uid; @@ -990,7 +989,7 @@ apply_advanced_chowns (WPanel * panel, vfs_path_t * vpath, struct stat *sf) /* --------------------------------------------------------------------------------------------- */ void -advanced_chown_cmd (WPanel * panel) +advanced_chown_cmd (WPanel *panel) { gboolean need_update; gboolean end_chown; diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c index 6291ec5f01..2799266906 100644 --- a/src/filemanager/boxes.c +++ b/src/filemanager/boxes.c @@ -125,7 +125,7 @@ static unsigned long shadows_id; /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -configure_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +configure_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -152,7 +152,7 @@ configure_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, voi /* --------------------------------------------------------------------------------------------- */ static void -skin_apply (const gchar * skin_override) +skin_apply (const gchar *skin_override) { GError *mcerror = NULL; @@ -174,7 +174,7 @@ skin_apply (const gchar * skin_override) /* --------------------------------------------------------------------------------------------- */ static const gchar * -skin_name_to_label (const gchar * name) +skin_name_to_label (const gchar *name) { if (strcmp (name, "default") == 0) return _("< Default >"); @@ -184,7 +184,7 @@ skin_name_to_label (const gchar * name) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -skin_dlg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +skin_dlg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -208,7 +208,7 @@ skin_dlg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void /* --------------------------------------------------------------------------------------------- */ static int -sel_skin_button (WButton * button, int action) +sel_skin_button (WButton *button, int action) { int result; WListbox *skin_list; @@ -272,7 +272,7 @@ sel_skin_button (WButton * button, int action) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -appearance_box_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +appearance_box_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -306,7 +306,7 @@ appearance_box_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -panel_listing_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +panel_listing_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -365,7 +365,7 @@ panel_listing_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, #ifdef HAVE_CHARSET static int -sel_charset_button (WButton * button, int action) +sel_charset_button (WButton *button, int action) { int new_dcp; @@ -397,7 +397,7 @@ sel_charset_button (WButton * button, int action) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -tree_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +tree_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDialog *h = DIALOG (w); @@ -430,7 +430,7 @@ tree_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da #if defined(ENABLE_VFS) && defined (ENABLE_VFS_FTP) static cb_ret_t -confvfs_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +confvfs_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -458,7 +458,7 @@ confvfs_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void #ifdef ENABLE_BACKGROUND static void -jobs_fill_listbox (WListbox * list) +jobs_fill_listbox (WListbox *list) { static const char *state_str[2] = { "", "" }; TaskList *tl; @@ -474,15 +474,14 @@ jobs_fill_listbox (WListbox * list) char *s; s = g_strconcat (state_str[tl->state], " ", tl->info, (char *) NULL); - listbox_add_item (list, LISTBOX_APPEND_AT_END, 0, s, (void *) tl, FALSE); - g_free (s); + listbox_add_item_take (list, LISTBOX_APPEND_AT_END, 0, s, (void *) tl, FALSE); } } /* --------------------------------------------------------------------------------------------- */ static int -task_cb (WButton * button, int action) +task_cb (WButton *button, int action) { TaskList *tl; int sig = 0; @@ -760,7 +759,7 @@ panel_options_box (void) /* return list type */ int -panel_listing_box (WPanel * panel, int num, char **userp, char **minip, gboolean * use_msformat, +panel_listing_box (WPanel *panel, int num, char **userp, char **minip, gboolean *use_msformat, int *brief_cols) { int result = -1; @@ -867,7 +866,7 @@ panel_listing_box (WPanel * panel, int num, char **userp, char **minip, gboolean /* --------------------------------------------------------------------------------------------- */ const panel_field_t * -sort_box (dir_sort_options_t * op, const panel_field_t * sort_field) +sort_box (dir_sort_options_t *op, const panel_field_t *sort_field) { char **sort_orders_names; gsize i; @@ -1216,7 +1215,7 @@ configure_vfs_box (void) /* --------------------------------------------------------------------------------------------- */ char * -cd_box (const WPanel * panel) +cd_box (const WPanel *panel) { const Widget *w = CONST_WIDGET (panel); char *my_str; @@ -1240,7 +1239,7 @@ cd_box (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ void -symlink_box (const vfs_path_t * existing_vpath, const vfs_path_t * new_vpath, +symlink_box (const vfs_path_t *existing_vpath, const vfs_path_t *new_vpath, char **ret_existing, char **ret_new) { quick_widget_t quick_widgets[] = { @@ -1285,8 +1284,7 @@ jobs_box (void) int len; bcback_fn callback; } - job_but[] = - { + job_but[] = { /* *INDENT-OFF* */ { N_("&Stop"), NORMAL_BUTTON, B_STOP, 0, task_cb }, { N_("&Resume"), NORMAL_BUTTON, B_RESUME, 0, task_cb }, diff --git a/src/filemanager/chattr.c b/src/filemanager/chattr.c index b5de12ade6..a05551869b 100644 --- a/src/filemanager/chattr.c +++ b/src/filemanager/chattr.c @@ -137,8 +137,7 @@ static struct const char *text; gboolean selected; gboolean state; /* state of checkboxes */ -} check_attr[] = -{ +} check_attr[] = { /* *INDENT-OFF* */ { EXT2_SECRM_FL, 's', N_("Secure deletion"), FALSE, FALSE }, { EXT2_UNRM_FL, 'u', N_("Undelete"), FALSE, FALSE }, @@ -224,8 +223,7 @@ static struct int width; const char *text; Widget *button; -} chattr_but[BUTTONS] = -{ +} chattr_but[BUTTONS] = { /* *INDENT-OFF* */ /* 0 */ { B_SETALL, NORMAL_BUTTON, 0, N_("Set &all"), NULL }, /* 1 */ { B_MARKED, NORMAL_BUTTON, 0, N_("&Marked all"), NULL }, @@ -273,7 +271,7 @@ chattr_fill_str (unsigned long attr, char *str) /* --------------------------------------------------------------------------------------------- */ static void -fileattrtext_fill (WFileAttrText * fat, unsigned long attr) +fileattrtext_fill (WFileAttrText *fat, unsigned long attr) { chattr_fill_str (attr, fat->attrs); widget_draw (WIDGET (fat)); @@ -282,7 +280,7 @@ fileattrtext_fill (WFileAttrText * fat, unsigned long attr) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -fileattrtext_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +fileattrtext_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WFileAttrText *fat = (WFileAttrText *) w; @@ -382,7 +380,7 @@ fileattrtext_new (int y, int x, const char *filename, unsigned long attr) /* --------------------------------------------------------------------------------------------- */ static void -chattr_draw_select (const Widget * w, gboolean selected) +chattr_draw_select (const Widget *w, gboolean selected) { widget_gotoyx (w, 0, -1); tty_print_char (selected ? '*' : ' '); @@ -392,7 +390,7 @@ chattr_draw_select (const Widget * w, gboolean selected) /* --------------------------------------------------------------------------------------------- */ static void -chattr_toggle_select (const WChattrBoxes * cb, int Id) +chattr_toggle_select (const WChattrBoxes *cb, int Id) { Widget *w; @@ -408,7 +406,7 @@ chattr_toggle_select (const WChattrBoxes * cb, int Id) /* --------------------------------------------------------------------------------------------- */ static inline void -chattrboxes_draw_scrollbar (const WChattrBoxes * cb) +chattrboxes_draw_scrollbar (const WChattrBoxes *cb) { const Widget *w = CONST_WIDGET (cb); int max_line; @@ -447,7 +445,7 @@ chattrboxes_draw_scrollbar (const WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static void -chattrboxes_draw (WChattrBoxes * cb) +chattrboxes_draw (WChattrBoxes *cb) { Widget *w = WIDGET (cb); int i; @@ -474,7 +472,7 @@ chattrboxes_draw (WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static void -chattrboxes_rename (WChattrBoxes * cb) +chattrboxes_rename (WChattrBoxes *cb) { Widget *w = WIDGET (cb); gboolean active; @@ -509,7 +507,7 @@ chattrboxes_rename (WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static void -checkboxes_save_state (const WChattrBoxes * cb) +checkboxes_save_state (const WChattrBoxes *cb) { int i; GList *l; @@ -526,7 +524,7 @@ checkboxes_save_state (const WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chattrboxes_down (WChattrBoxes * cb) +chattrboxes_down (WChattrBoxes *cb) { if (cb->pos == cb->top + WIDGET (cb)->rect.lines - 1) { @@ -559,7 +557,7 @@ chattrboxes_down (WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chattrboxes_page_down (WChattrBoxes * cb) +chattrboxes_page_down (WChattrBoxes *cb) { WGroup *g = GROUP (cb); GList *l; @@ -605,7 +603,7 @@ chattrboxes_page_down (WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chattrboxes_end (WChattrBoxes * cb) +chattrboxes_end (WChattrBoxes *cb) { GList *l; @@ -622,7 +620,7 @@ chattrboxes_end (WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chattrboxes_up (WChattrBoxes * cb) +chattrboxes_up (WChattrBoxes *cb) { if (cb->pos == cb->top) { @@ -655,7 +653,7 @@ chattrboxes_up (WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chattrboxes_page_up (WChattrBoxes * cb) +chattrboxes_page_up (WChattrBoxes *cb) { WGroup *g = GROUP (cb); GList *l; @@ -699,7 +697,7 @@ chattrboxes_page_up (WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chattrboxes_home (WChattrBoxes * cb) +chattrboxes_home (WChattrBoxes *cb) { GList *l; @@ -716,7 +714,7 @@ chattrboxes_home (WChattrBoxes * cb) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chattrboxes_execute_cmd (WChattrBoxes * cb, long command) +chattrboxes_execute_cmd (WChattrBoxes *cb, long command) { switch (command) { @@ -756,7 +754,7 @@ chattrboxes_execute_cmd (WChattrBoxes * cb, long command) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chattrboxes_key (WChattrBoxes * cb, int key) +chattrboxes_key (WChattrBoxes *cb, int key) { long command; @@ -769,7 +767,7 @@ chattrboxes_key (WChattrBoxes * cb, int key) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chattrboxes_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +chattrboxes_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WChattrBoxes *cb = CHATTRBOXES (w); WGroup *g = GROUP (w); @@ -839,7 +837,7 @@ chattrboxes_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v /* --------------------------------------------------------------------------------------------- */ static int -chattrboxes_handle_mouse_event (Widget * w, Gpm_Event * event) +chattrboxes_handle_mouse_event (Widget *w, Gpm_Event *event) { int mou; @@ -853,7 +851,7 @@ chattrboxes_handle_mouse_event (Widget * w, Gpm_Event * event) /* --------------------------------------------------------------------------------------------- */ static void -chattrboxes_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +chattrboxes_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { WChattrBoxes *cb = CHATTRBOXES (w); @@ -879,7 +877,7 @@ chattrboxes_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) /* --------------------------------------------------------------------------------------------- */ static WChattrBoxes * -chattrboxes_new (const WRect * r) +chattrboxes_new (const WRect *r) { WChattrBoxes *cb; Widget *w; @@ -962,7 +960,7 @@ chattr_init (void) /* --------------------------------------------------------------------------------------------- */ static WDialog * -chattr_dlg_create (WPanel * panel, const char *fname, unsigned long attr) +chattr_dlg_create (WPanel *panel, const char *fname, unsigned long attr) { Widget *mw = WIDGET (WIDGET (panel)->owner); gboolean single_set; @@ -1095,7 +1093,7 @@ chattr_done (gboolean need_update) /* --------------------------------------------------------------------------------------------- */ static const GString * -next_file (const WPanel * panel) +next_file (const WPanel *panel) { while (panel->dir.list[current_file].f.marked == 0) current_file++; @@ -1106,7 +1104,7 @@ next_file (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static gboolean -try_chattr (const vfs_path_t * p, unsigned long m) +try_chattr (const vfs_path_t *p, unsigned long m) { const char *fname = NULL; @@ -1152,7 +1150,7 @@ try_chattr (const vfs_path_t * p, unsigned long m) /* --------------------------------------------------------------------------------------------- */ static gboolean -do_chattr (WPanel * panel, const vfs_path_t * p, unsigned long m) +do_chattr (WPanel *panel, const vfs_path_t *p, unsigned long m) { gboolean ret; @@ -1169,7 +1167,7 @@ do_chattr (WPanel * panel, const vfs_path_t * p, unsigned long m) /* --------------------------------------------------------------------------------------------- */ static void -chattr_apply_mask (WPanel * panel, vfs_path_t * vpath, unsigned long m) +chattr_apply_mask (WPanel *panel, vfs_path_t *vpath, unsigned long m) { gboolean ok; @@ -1208,7 +1206,7 @@ chattr_apply_mask (WPanel * panel, vfs_path_t * vpath, unsigned long m) /* --------------------------------------------------------------------------------------------- */ void -chattr_cmd (WPanel * panel) +chattr_cmd (WPanel *panel) { gboolean need_update = FALSE; gboolean end_chattr = FALSE; diff --git a/src/filemanager/chmod.c b/src/filemanager/chmod.c index bac3d993e8..7467b40435 100644 --- a/src/filemanager/chmod.c +++ b/src/filemanager/chmod.c @@ -70,8 +70,7 @@ static struct const char *text; gboolean selected; WCheck *check; -} check_perm[BUTTONS_PERM] = -{ +} check_perm[BUTTONS_PERM] = { /* *INDENT-OFF* */ { S_ISUID, N_("set &user ID on execution"), FALSE, NULL }, { S_ISGID, N_("set &group ID on execution"), FALSE, NULL }, @@ -106,8 +105,7 @@ static struct int y; /* vertical position relatively to dialog bottom boundary */ int len; const char *text; -} chmod_but[BUTTONS] = -{ +} chmod_but[BUTTONS] = { /* *INDENT-OFF* */ { B_SETALL, NORMAL_BUTTON, 6, 0, N_("Set &all") }, { B_MARKED, NORMAL_BUTTON, 6, 0, N_("&Marked all") }, @@ -181,7 +179,7 @@ chmod_init (void) /* --------------------------------------------------------------------------------------------- */ static void -chmod_draw_select (const WDialog * h, int Id) +chmod_draw_select (const WDialog *h, int Id) { widget_gotoyx (h, PY + Id + 1, PX + 1); tty_print_char (check_perm[Id].selected ? '*' : ' '); @@ -191,7 +189,7 @@ chmod_draw_select (const WDialog * h, int Id) /* --------------------------------------------------------------------------------------------- */ static void -chmod_toggle_select (const WDialog * h, int Id) +chmod_toggle_select (const WDialog *h, int Id) { check_perm[Id].selected = !check_perm[Id].selected; tty_setcolor (COLOR_NORMAL); @@ -201,7 +199,7 @@ chmod_toggle_select (const WDialog * h, int Id) /* --------------------------------------------------------------------------------------------- */ static void -chmod_refresh (const WDialog * h) +chmod_refresh (const WDialog *h) { int i; int y, x; @@ -227,7 +225,7 @@ chmod_refresh (const WDialog * h) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chmod_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +chmod_bg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -244,7 +242,7 @@ chmod_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chmod_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +chmod_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WGroup *g = GROUP (w); WDialog *h = DIALOG (w); @@ -302,7 +300,7 @@ chmod_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d /* --------------------------------------------------------------------------------------------- */ static WDialog * -chmod_dlg_create (WPanel * panel, const char *fname, const struct stat *sf_stat) +chmod_dlg_create (WPanel *panel, const char *fname, const struct stat *sf_stat) { gboolean single_set; WDialog *ch_dlg; @@ -413,7 +411,7 @@ chmod_done (gboolean need_update) /* --------------------------------------------------------------------------------------------- */ static const GString * -next_file (const WPanel * panel) +next_file (const WPanel *panel) { while (panel->dir.list[current_file].f.marked == 0) current_file++; @@ -424,7 +422,7 @@ next_file (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static gboolean -try_chmod (const vfs_path_t * p, mode_t m) +try_chmod (const vfs_path_t *p, mode_t m) { const char *fname = NULL; @@ -470,7 +468,7 @@ try_chmod (const vfs_path_t * p, mode_t m) /* --------------------------------------------------------------------------------------------- */ static gboolean -do_chmod (WPanel * panel, const vfs_path_t * p, struct stat *sf) +do_chmod (WPanel *panel, const vfs_path_t *p, struct stat *sf) { gboolean ret; @@ -487,7 +485,7 @@ do_chmod (WPanel * panel, const vfs_path_t * p, struct stat *sf) /* --------------------------------------------------------------------------------------------- */ static void -apply_mask (WPanel * panel, vfs_path_t * vpath, struct stat *sf) +apply_mask (WPanel *panel, vfs_path_t *vpath, struct stat *sf) { gboolean ok; @@ -528,7 +526,7 @@ apply_mask (WPanel * panel, vfs_path_t * vpath, struct stat *sf) /* --------------------------------------------------------------------------------------------- */ void -chmod_cmd (WPanel * panel) +chmod_cmd (WPanel *panel) { gboolean need_update; gboolean end_chmod; diff --git a/src/filemanager/chown.c b/src/filemanager/chown.c index ff84a4fe2c..174b930492 100644 --- a/src/filemanager/chown.c +++ b/src/filemanager/chown.c @@ -78,8 +78,7 @@ static struct int y; int len; const char *text; -} chown_but[BUTTONS] = -{ +} chown_but[BUTTONS] = { /* *INDENT-OFF* */ { B_SETALL, NORMAL_BUTTON, 5, 0, N_("Set &all") }, { B_SETGRP, NORMAL_BUTTON, 5, 0, N_("Set &groups") }, @@ -96,8 +95,7 @@ static struct { int y; WLabel *l; -} chown_label[LABELS] = -{ +} chown_label[LABELS] = { /* *INDENT-OFF* */ { 4, NULL }, { 6, NULL }, @@ -148,7 +146,7 @@ chown_init (void) /* --------------------------------------------------------------------------------------------- */ static void -chown_refresh (const Widget * h) +chown_refresh (const Widget *h) { int y = 3; int x = 7 + GW * 2; @@ -170,7 +168,7 @@ chown_refresh (const Widget * h) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -chown_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +chown_bg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -187,7 +185,7 @@ chown_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void /* --------------------------------------------------------------------------------------------- */ static WDialog * -chown_dlg_create (WPanel * panel) +chown_dlg_create (WPanel *panel) { int single_set; WDialog *ch_dlg; @@ -285,7 +283,7 @@ chown_done (gboolean need_update) /* --------------------------------------------------------------------------------------------- */ static const GString * -next_file (const WPanel * panel) +next_file (const WPanel *panel) { while (panel->dir.list[current_file].f.marked == 0) current_file++; @@ -296,7 +294,7 @@ next_file (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static gboolean -try_chown (const vfs_path_t * p, uid_t u, gid_t g) +try_chown (const vfs_path_t *p, uid_t u, gid_t g) { const char *fname = NULL; @@ -342,7 +340,7 @@ try_chown (const vfs_path_t * p, uid_t u, gid_t g) /* --------------------------------------------------------------------------------------------- */ static gboolean -do_chown (WPanel * panel, const vfs_path_t * p, uid_t u, gid_t g) +do_chown (WPanel *panel, const vfs_path_t *p, uid_t u, gid_t g) { gboolean ret; @@ -356,7 +354,7 @@ do_chown (WPanel * panel, const vfs_path_t * p, uid_t u, gid_t g) /* --------------------------------------------------------------------------------------------- */ static void -apply_chowns (WPanel * panel, vfs_path_t * vpath, uid_t u, gid_t g) +apply_chowns (WPanel *panel, vfs_path_t *vpath, uid_t u, gid_t g) { gboolean ok; @@ -394,7 +392,7 @@ apply_chowns (WPanel * panel, vfs_path_t * vpath, uid_t u, gid_t g) /* --------------------------------------------------------------------------------------------- */ void -chown_cmd (WPanel * panel) +chown_cmd (WPanel *panel) { gboolean need_update; gboolean end_chown; diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c index 1ddc3f311e..70602db04f 100644 --- a/src/filemanager/cmd.c +++ b/src/filemanager/cmd.c @@ -129,7 +129,7 @@ static const char *machine_str = N_("Enter machine name (F1 for details):"); * If @plain_view is TRUE, force internal viewer and raw mode (used for F13). */ static void -do_view_cmd (WPanel * panel, gboolean plain_view) +do_view_cmd (WPanel *panel, gboolean plain_view) { const file_entry_t *fe; @@ -165,7 +165,7 @@ do_view_cmd (WPanel * panel, gboolean plain_view) /* --------------------------------------------------------------------------------------------- */ static inline void -do_edit (const vfs_path_t * what_vpath) +do_edit (const vfs_path_t *what_vpath) { edit_file_at_line (what_vpath, use_internal_edit, 0); } @@ -173,7 +173,7 @@ do_edit (const vfs_path_t * what_vpath) /* --------------------------------------------------------------------------------------------- */ static int -compare_files (const vfs_path_t * vpath1, const vfs_path_t * vpath2, off_t size) +compare_files (const vfs_path_t *vpath1, const vfs_path_t *vpath2, off_t size) { int file1; int result = -1; /* Different by default */ @@ -235,7 +235,7 @@ compare_files (const vfs_path_t * vpath1, const vfs_path_t * vpath2, off_t size) /* --------------------------------------------------------------------------------------------- */ static void -compare_dir (WPanel * panel, const WPanel * other, enum CompareMode mode) +compare_dir (WPanel *panel, const WPanel *other, enum CompareMode mode) { int i, j; @@ -464,7 +464,7 @@ nice_cd (const char *text, const char *xtext, const char *help, /* --------------------------------------------------------------------------------------------- */ static void -configure_panel_listing (WPanel * p, int list_format, int brief_cols, gboolean use_msformat, +configure_panel_listing (WPanel *p, int list_format, int brief_cols, gboolean use_msformat, char **user, char **status) { p->user_mini_status = use_msformat; @@ -504,7 +504,7 @@ switch_to_listing (int panel_index) /* --------------------------------------------------------------------------------------------- */ gboolean -view_file_at_line (const vfs_path_t * filename_vpath, gboolean plain_view, gboolean internal, +view_file_at_line (const vfs_path_t *filename_vpath, gboolean plain_view, gboolean internal, long start_line, off_t search_start, off_t search_end) { gboolean ret = TRUE; @@ -584,7 +584,7 @@ view_file_at_line (const vfs_path_t * filename_vpath, gboolean plain_view, gbool */ gboolean -view_file (const vfs_path_t * filename_vpath, gboolean plain_view, gboolean internal) +view_file (const vfs_path_t *filename_vpath, gboolean plain_view, gboolean internal) { return view_file_at_line (filename_vpath, plain_view, internal, 0, 0, 0); } @@ -594,7 +594,7 @@ view_file (const vfs_path_t * filename_vpath, gboolean plain_view, gboolean inte /** Run user's preferred viewer on the current file */ void -view_cmd (WPanel * panel) +view_cmd (WPanel *panel) { do_view_cmd (panel, FALSE); } @@ -603,7 +603,7 @@ view_cmd (WPanel * panel) /** Ask for file and run user's preferred viewer on it */ void -view_file_cmd (const WPanel * panel) +view_file_cmd (const WPanel *panel) { char *filename; vfs_path_t *vpath; @@ -624,7 +624,7 @@ view_file_cmd (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ /** Run plain internal viewer on the current file */ void -view_raw_cmd (WPanel * panel) +view_raw_cmd (WPanel *panel) { do_view_cmd (panel, TRUE); } @@ -632,7 +632,7 @@ view_raw_cmd (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ void -view_filtered_cmd (const WPanel * panel) +view_filtered_cmd (const WPanel *panel) { char *command; const char *initial_command; @@ -659,7 +659,7 @@ view_filtered_cmd (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ void -edit_file_at_line (const vfs_path_t * what_vpath, gboolean internal, long start_line) +edit_file_at_line (const vfs_path_t *what_vpath, gboolean internal, long start_line) { #ifdef USE_INTERNAL_EDIT @@ -700,7 +700,7 @@ edit_file_at_line (const vfs_path_t * what_vpath, gboolean internal, long start_ /* --------------------------------------------------------------------------------------------- */ void -edit_cmd (const WPanel * panel) +edit_cmd (const WPanel *panel) { vfs_path_t *fname; @@ -714,7 +714,7 @@ edit_cmd (const WPanel * panel) #ifdef USE_INTERNAL_EDIT void -edit_cmd_force_internal (const WPanel * panel) +edit_cmd_force_internal (const WPanel *panel) { vfs_path_t *fname; @@ -758,7 +758,7 @@ edit_cmd_new (void) /* --------------------------------------------------------------------------------------------- */ void -mkdir_cmd (WPanel * panel) +mkdir_cmd (WPanel *panel) { const file_entry_t *fe; char *dir; @@ -968,7 +968,7 @@ edit_fhl_cmd (void) /* --------------------------------------------------------------------------------------------- */ void -hotlist_cmd (WPanel * panel) +hotlist_cmd (WPanel *panel) { char *target; @@ -1002,7 +1002,7 @@ hotlist_cmd (WPanel * panel) #ifdef ENABLE_VFS void -vfs_list (WPanel * panel) +vfs_list (WPanel *panel) { char *target; vfs_path_t *target_vpath; @@ -1228,7 +1228,7 @@ undelete_cmd (void) /* --------------------------------------------------------------------------------------------- */ void -quick_cd_cmd (WPanel * panel) +quick_cd_cmd (WPanel *panel) { char *p; @@ -1250,7 +1250,7 @@ quick_cd_cmd (WPanel * panel) */ void -smart_dirsize_cmd (WPanel * panel) +smart_dirsize_cmd (WPanel *panel) { const file_entry_t *entry; @@ -1264,7 +1264,7 @@ smart_dirsize_cmd (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ void -single_dirsize_cmd (WPanel * panel) +single_dirsize_cmd (WPanel *panel) { file_entry_t *entry; @@ -1309,7 +1309,7 @@ single_dirsize_cmd (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ void -dirsizes_cmd (WPanel * panel) +dirsizes_cmd (WPanel *panel) { int i; dirsize_status_msg_t dsm; diff --git a/src/filemanager/cmd.h b/src/filemanager/cmd.h index 30b309c2f5..82e1678cd1 100644 --- a/src/filemanager/cmd.h +++ b/src/filemanager/cmd.h @@ -107,7 +107,7 @@ void find_cmd (WPanel * panel); */ static inline void -copy_cmd (WPanel * panel) +copy_cmd (WPanel *panel) { panel_operate (panel, OP_COPY, FALSE); } @@ -118,7 +118,7 @@ copy_cmd (WPanel * panel) */ static inline void -copy_cmd_local (WPanel * panel) +copy_cmd_local (WPanel *panel) { panel_operate (panel, OP_COPY, TRUE); } @@ -129,7 +129,7 @@ copy_cmd_local (WPanel * panel) */ static inline void -rename_cmd (WPanel * panel) +rename_cmd (WPanel *panel) { panel_operate (panel, OP_MOVE, FALSE); } @@ -140,7 +140,7 @@ rename_cmd (WPanel * panel) */ static inline void -rename_cmd_local (WPanel * panel) +rename_cmd_local (WPanel *panel) { panel_operate (panel, OP_MOVE, TRUE); } @@ -151,7 +151,7 @@ rename_cmd_local (WPanel * panel) */ static inline void -delete_cmd (WPanel * panel) +delete_cmd (WPanel *panel) { panel_operate (panel, OP_DELETE, FALSE); } @@ -162,7 +162,7 @@ delete_cmd (WPanel * panel) */ static inline void -delete_cmd_local (WPanel * panel) +delete_cmd_local (WPanel *panel) { panel_operate (panel, OP_DELETE, TRUE); } diff --git a/src/filemanager/command.c b/src/filemanager/command.c index 360f104104..9a3d74f447 100644 --- a/src/filemanager/command.c +++ b/src/filemanager/command.c @@ -81,7 +81,7 @@ static input_colors_t command_colors; */ static cb_ret_t -enter (WInput * lc_cmdline) +enter (WInput *lc_cmdline) { const char *cmd; @@ -183,7 +183,7 @@ enter (WInput * lc_cmdline) */ static cb_ret_t -command_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +command_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -246,7 +246,7 @@ command_set_default_colors (void) */ void -command_insert (WInput * in, const char *text, gboolean insert_extra_space) +command_insert (WInput *in, const char *text, gboolean insert_extra_space) { char *quoted_text; diff --git a/src/filemanager/dir.c b/src/filemanager/dir.c index b405131b14..ce6cbb05d2 100644 --- a/src/filemanager/dir.c +++ b/src/filemanager/dir.c @@ -109,7 +109,7 @@ key_collate (const char *t1, const char *t2) /* --------------------------------------------------------------------------------------------- */ static inline int -compare_by_names (file_entry_t * a, file_entry_t * b) +compare_by_names (file_entry_t *a, file_entry_t *b) { /* create key if does not exist, key will be freed after sorting */ if (a->name_sort_key == NULL) @@ -126,7 +126,7 @@ compare_by_names (file_entry_t * a, file_entry_t * b) */ static void -clean_sort_keys (dir_list * list, int start, int count) +clean_sort_keys (dir_list *list, int start, int count) { int i; @@ -149,8 +149,8 @@ clean_sort_keys (dir_list * list, int start, int count) */ static gboolean -handle_dirent (struct vfs_dirent *dp, const file_filter_t * filter, struct stat *buf1, - gboolean * link_to_dir, gboolean * stale_link) +handle_dirent (struct vfs_dirent *dp, const file_filter_t *filter, struct stat *buf1, + gboolean *link_to_dir, gboolean *stale_link) { vfs_path_t *vpath; gboolean ok = TRUE; @@ -159,7 +159,7 @@ handle_dirent (struct vfs_dirent *dp, const file_filter_t * filter, struct stat return FALSE; if (!panels_options.show_dot_files && (dp->d_name[0] == '.')) return FALSE; - if (!panels_options.show_backups && dp->d_name[strlen (dp->d_name) - 1] == '~') + if (!panels_options.show_backups && dp->d_name[dp->d_len - 1] == '~') return FALSE; vpath = vfs_path_from_str (dp->d_name); @@ -186,7 +186,7 @@ handle_dirent (struct vfs_dirent *dp, const file_filter_t * filter, struct stat gboolean files_only = (filter->flags & SELECT_FILES_ONLY) != 0; ok = ((S_ISDIR (buf1->st_mode) || *link_to_dir) && files_only) - || mc_search_run (filter->handler, dp->d_name, 0, strlen (dp->d_name), NULL); + || mc_search_run (filter->handler, dp->d_name, 0, dp->d_len, NULL); } return ok; @@ -196,7 +196,7 @@ handle_dirent (struct vfs_dirent *dp, const file_filter_t * filter, struct stat /** get info about ".." */ static gboolean -dir_get_dotdot_stat (const vfs_path_t * vpath, struct stat *st) +dir_get_dotdot_stat (const vfs_path_t *vpath, struct stat *st) { gboolean ret = FALSE; @@ -247,7 +247,7 @@ alloc_dir_copy (int size) */ gboolean -dir_list_grow (dir_list * list, int delta) +dir_list_grow (dir_list *list, int delta) { int size; gboolean clear_flag = FALSE; @@ -296,7 +296,7 @@ dir_list_grow (dir_list * list, int delta) */ gboolean -dir_list_append (dir_list * list, const char *fname, const struct stat * st, +dir_list_append (dir_list *list, const char *fname, const struct stat *st, gboolean link_to_dir, gboolean stale_link) { file_entry_t *fentry; @@ -323,7 +323,7 @@ dir_list_append (dir_list * list, const char *fname, const struct stat * st, /* --------------------------------------------------------------------------------------------- */ int -unsorted (file_entry_t * a, file_entry_t * b) +unsorted (file_entry_t *a, file_entry_t *b) { (void) a; (void) b; @@ -334,7 +334,7 @@ unsorted (file_entry_t * a, file_entry_t * b) /* --------------------------------------------------------------------------------------------- */ int -sort_name (file_entry_t * a, file_entry_t * b) +sort_name (file_entry_t *a, file_entry_t *b) { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); @@ -348,7 +348,7 @@ sort_name (file_entry_t * a, file_entry_t * b) /* --------------------------------------------------------------------------------------------- */ int -sort_vers (file_entry_t * a, file_entry_t * b) +sort_vers (file_entry_t *a, file_entry_t *b) { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); @@ -370,7 +370,7 @@ sort_vers (file_entry_t * a, file_entry_t * b) /* --------------------------------------------------------------------------------------------- */ int -sort_ext (file_entry_t * a, file_entry_t * b) +sort_ext (file_entry_t *a, file_entry_t *b) { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); @@ -397,7 +397,7 @@ sort_ext (file_entry_t * a, file_entry_t * b) /* --------------------------------------------------------------------------------------------- */ int -sort_time (file_entry_t * a, file_entry_t * b) +sort_time (file_entry_t *a, file_entry_t *b) { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); @@ -418,7 +418,7 @@ sort_time (file_entry_t * a, file_entry_t * b) /* --------------------------------------------------------------------------------------------- */ int -sort_ctime (file_entry_t * a, file_entry_t * b) +sort_ctime (file_entry_t *a, file_entry_t *b) { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); @@ -439,7 +439,7 @@ sort_ctime (file_entry_t * a, file_entry_t * b) /* --------------------------------------------------------------------------------------------- */ int -sort_atime (file_entry_t * a, file_entry_t * b) +sort_atime (file_entry_t *a, file_entry_t *b) { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); @@ -460,7 +460,7 @@ sort_atime (file_entry_t * a, file_entry_t * b) /* --------------------------------------------------------------------------------------------- */ int -sort_inode (file_entry_t * a, file_entry_t * b) +sort_inode (file_entry_t *a, file_entry_t *b) { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); @@ -474,7 +474,7 @@ sort_inode (file_entry_t * a, file_entry_t * b) /* --------------------------------------------------------------------------------------------- */ int -sort_size (file_entry_t * a, file_entry_t * b) +sort_size (file_entry_t *a, file_entry_t *b) { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); @@ -495,7 +495,7 @@ sort_size (file_entry_t * a, file_entry_t * b) /* --------------------------------------------------------------------------------------------- */ void -dir_list_sort (dir_list * list, GCompareFunc sort, const dir_sort_options_t * sort_op) +dir_list_sort (dir_list *list, GCompareFunc sort, const dir_sort_options_t *sort_op) { if (list->len > 1 && sort != (GCompareFunc) unsorted) { @@ -518,7 +518,7 @@ dir_list_sort (dir_list * list, GCompareFunc sort, const dir_sort_options_t * so /* --------------------------------------------------------------------------------------------- */ void -dir_list_clean (dir_list * list) +dir_list_clean (dir_list *list) { int i; @@ -539,7 +539,7 @@ dir_list_clean (dir_list * list) /* --------------------------------------------------------------------------------------------- */ void -dir_list_free_list (dir_list * list) +dir_list_free_list (dir_list *list) { int i; @@ -560,7 +560,7 @@ dir_list_free_list (dir_list * list) /** Used to set up a directory list when there is no access to a directory */ gboolean -dir_list_init (dir_list * list) +dir_list_init (dir_list *list) { file_entry_t *fentry; @@ -593,7 +593,7 @@ dir_list_init (dir_list * list) /* Return values: FALSE = don't add, TRUE = add to the list */ gboolean -handle_path (const char *path, struct stat * buf1, gboolean * link_to_dir, gboolean * stale_link) +handle_path (const char *path, struct stat *buf1, gboolean *link_to_dir, gboolean *stale_link) { vfs_path_t *vpath; @@ -631,8 +631,8 @@ handle_path (const char *path, struct stat * buf1, gboolean * link_to_dir, gbool /* --------------------------------------------------------------------------------------------- */ gboolean -dir_list_load (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort, - const dir_sort_options_t * sort_op, const file_filter_t * filter) +dir_list_load (dir_list *list, const vfs_path_t *vpath, GCompareFunc sort, + const dir_sort_options_t *sort_op, const file_filter_t *filter) { DIR *dirp; struct vfs_dirent *dp; @@ -690,7 +690,7 @@ dir_list_load (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort, /* --------------------------------------------------------------------------------------------- */ gboolean -if_link_is_exe (const vfs_path_t * full_name_vpath, const file_entry_t * file) +if_link_is_exe (const vfs_path_t *full_name_vpath, const file_entry_t *file) { struct stat b; @@ -704,8 +704,8 @@ if_link_is_exe (const vfs_path_t * full_name_vpath, const file_entry_t * file) /** If filter is null, then it is a match */ gboolean -dir_list_reload (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort, - const dir_sort_options_t * sort_op, const file_filter_t * filter) +dir_list_reload (dir_list *list, const vfs_path_t *vpath, GCompareFunc sort, + const dir_sort_options_t *sort_op, const file_filter_t *filter) { DIR *dirp; struct vfs_dirent *dp; @@ -828,7 +828,7 @@ dir_list_reload (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort, /* --------------------------------------------------------------------------------------------- */ void -file_filter_clear (file_filter_t * filter) +file_filter_clear (file_filter_t *filter) { MC_PTR_FREE (filter->value); mc_search_free (filter->handler); diff --git a/src/filemanager/dir.h b/src/filemanager/dir.h index 80a19df645..03db98c5fe 100644 --- a/src/filemanager/dir.h +++ b/src/filemanager/dir.h @@ -107,7 +107,7 @@ void file_filter_clear (file_filter_t * filter); /*** inline functions ****************************************************************************/ static inline gboolean -link_isdir (const file_entry_t * file) +link_isdir (const file_entry_t *file) { return (file->f.link_to_dir != 0); } diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c index ccf519260b..3be115ad16 100644 --- a/src/filemanager/ext.c +++ b/src/filemanager/ext.c @@ -114,7 +114,7 @@ static const char *default_group = "Default"; /* --------------------------------------------------------------------------------------------- */ static void -exec_cleanup_script (vfs_path_t * script_vpath) +exec_cleanup_script (vfs_path_t *script_vpath) { if (script_vpath != NULL) { @@ -126,7 +126,7 @@ exec_cleanup_script (vfs_path_t * script_vpath) /* --------------------------------------------------------------------------------------------- */ static void -exec_cleanup_file_name (const vfs_path_t * filename_vpath, gboolean has_changed) +exec_cleanup_file_name (const vfs_path_t *filename_vpath, gboolean has_changed) { if (localfilecopy_vpath == NULL) return; @@ -146,7 +146,7 @@ exec_cleanup_file_name (const vfs_path_t * filename_vpath, gboolean has_changed) /* --------------------------------------------------------------------------------------------- */ static char * -exec_get_file_name (const vfs_path_t * filename_vpath) +exec_get_file_name (const vfs_path_t *filename_vpath) { if (!do_local_copy) return quote_func (vfs_path_get_last_path_str (filename_vpath), FALSE); @@ -187,7 +187,7 @@ exec_expand_format (char symbol, gboolean is_result_quoted) /* --------------------------------------------------------------------------------------------- */ static GString * -exec_get_export_variables (const vfs_path_t * filename_vpath) +exec_get_export_variables (const vfs_path_t *filename_vpath) { char *text; GString *export_vars_string; @@ -235,7 +235,7 @@ exec_get_export_variables (const vfs_path_t * filename_vpath) /* --------------------------------------------------------------------------------------------- */ static GString * -exec_make_shell_string (const char *lc_data, const vfs_path_t * filename_vpath) +exec_make_shell_string (const char *lc_data, const vfs_path_t *filename_vpath) { GString *shell_string; char lc_prompt[80] = "\0"; @@ -369,7 +369,7 @@ exec_make_shell_string (const char *lc_data, const vfs_path_t * filename_vpath) /* --------------------------------------------------------------------------------------------- */ static void -exec_extension_view (void *target, char *cmd, const vfs_path_t * filename_vpath, int start_line) +exec_extension_view (void *target, char *cmd, const vfs_path_t *filename_vpath, int start_line) { mcview_mode_flags_t def_flags = { /* *INDENT-OFF* */ @@ -406,7 +406,7 @@ exec_extension_view (void *target, char *cmd, const vfs_path_t * filename_vpath, /* --------------------------------------------------------------------------------------------- */ static void -exec_extension_cd (WPanel * panel) +exec_extension_cd (WPanel *panel) { char *q; vfs_path_t *p_vpath; @@ -429,7 +429,7 @@ exec_extension_cd (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static vfs_path_t * -exec_extension (WPanel * panel, void *target, const vfs_path_t * filename_vpath, +exec_extension (WPanel *panel, void *target, const vfs_path_t *filename_vpath, const char *lc_data, int start_line) { GString *shell_string, *export_variables; @@ -595,7 +595,7 @@ get_popen_information (const char *cmd_file, const char *args, char *buf, int bu */ static int -get_file_type_local (const vfs_path_t * filename_vpath, char *buf, int buflen) +get_file_type_local (const vfs_path_t *filename_vpath, char *buf, int buflen) { char *filename_quoted; int ret = 0; @@ -618,7 +618,7 @@ get_file_type_local (const vfs_path_t * filename_vpath, char *buf, int buflen) #ifdef HAVE_CHARSET static int -get_file_encoding_local (const vfs_path_t * filename_vpath, char *buf, int buflen) +get_file_encoding_local (const vfs_path_t *filename_vpath, char *buf, int buflen) { char *filename_quoted; int ret = 0; @@ -656,8 +656,8 @@ get_file_encoding_local (const vfs_path_t * filename_vpath, char *buf, int bufle */ static gboolean -regex_check_type (const vfs_path_t * filename_vpath, const char *ptr, gboolean case_insense, - gboolean * have_type, GError ** mcerror) +regex_check_type (const vfs_path_t *filename_vpath, const char *ptr, gboolean case_insense, + gboolean *have_type, GError **mcerror) { gboolean found = FALSE; @@ -895,8 +895,8 @@ flush_extension_file (void) */ int -regex_command_for (void *target, const vfs_path_t * filename_vpath, const char *action, - vfs_path_t ** script_vpath) +regex_command_for (void *target, const vfs_path_t *filename_vpath, const char *action, + vfs_path_t **script_vpath) { const char *filename; size_t filename_len; diff --git a/src/filemanager/ext.h b/src/filemanager/ext.h index 771ca18d2e..cf5826b01c 100644 --- a/src/filemanager/ext.h +++ b/src/filemanager/ext.h @@ -25,7 +25,7 @@ void flush_extension_file (void); /*** inline functions ****************************************************************************/ static inline int -regex_command (const vfs_path_t * filename_vpath, const char *action) +regex_command (const vfs_path_t *filename_vpath, const char *action) { return regex_command_for (NULL, filename_vpath, action, NULL); } diff --git a/src/filemanager/file.c b/src/filemanager/file.c index 41bd86cab0..8a572fc43a 100644 --- a/src/filemanager/file.c +++ b/src/filemanager/file.c @@ -197,7 +197,7 @@ static GSList *dest_dirs = NULL; /* --------------------------------------------------------------------------------------------- */ static void -dirsize_status_locate_buttons (dirsize_status_msg_t * dsm) +dirsize_status_locate_buttons (dirsize_status_msg_t *dsm) { status_msg_t *sm = STATUS_MSG (dsm); Widget *wd = WIDGET (sm->dlg); @@ -238,7 +238,7 @@ dirsize_status_locate_buttons (dirsize_status_msg_t * dsm) /* --------------------------------------------------------------------------------------------- */ static char * -build_dest (file_op_context_t * ctx, const char *src, const char *dest, FileProgressStatus * status) +build_dest (file_op_context_t *ctx, const char *src, const char *dest, FileProgressStatus *status) { char *s, *q; const char *fnsource; @@ -312,7 +312,7 @@ free_link (void *data) /* --------------------------------------------------------------------------------------------- */ static inline void * -free_erase_list (GQueue * lp) +free_erase_list (GQueue *lp) { if (lp != NULL) g_queue_free_full (lp, free_link); @@ -323,7 +323,7 @@ free_erase_list (GQueue * lp) /* --------------------------------------------------------------------------------------------- */ static inline void * -free_linklist (GSList * lp) +free_linklist (GSList *lp) { g_slist_free_full (lp, free_link); @@ -333,7 +333,7 @@ free_linklist (GSList * lp) /* --------------------------------------------------------------------------------------------- */ static const link_t * -is_in_linklist (const GSList * lp, const vfs_path_t * vpath, const struct stat *sb) +is_in_linklist (const GSList *lp, const vfs_path_t *vpath, const struct stat *sb) { const struct vfs_class *class; ino_t ino = sb->st_ino; @@ -361,8 +361,8 @@ is_in_linklist (const GSList * lp, const vfs_path_t * vpath, const struct stat * */ static hardlink_status_t -check_hardlinks (const vfs_path_t * src_vpath, const struct stat *src_stat, - const vfs_path_t * dst_vpath, gboolean * skip_all) +check_hardlinks (const vfs_path_t *src_vpath, const struct stat *src_stat, + const vfs_path_t *dst_vpath, gboolean *skip_all) { link_t *lnk; ino_t ino = src_stat->st_ino; @@ -500,7 +500,7 @@ check_hardlinks (const vfs_path_t * src_vpath, const struct stat *src_stat, */ static FileProgressStatus -make_symlink (file_op_context_t * ctx, const vfs_path_t * src_vpath, const vfs_path_t * dst_vpath) +make_symlink (file_op_context_t *ctx, const vfs_path_t *src_vpath, const vfs_path_t *dst_vpath) { const char *src_path; const char *dst_path; @@ -628,8 +628,8 @@ make_symlink (file_op_context_t * ctx, const vfs_path_t * src_vpath, const vfs_p */ static FileProgressStatus -do_compute_dir_size (const vfs_path_t * dirname_vpath, dirsize_status_msg_t * dsm, - size_t * dir_count, size_t * ret_marked, uintmax_t * ret_total, +do_compute_dir_size (const vfs_path_t *dirname_vpath, dirsize_status_msg_t *dsm, + size_t *dir_count, size_t *ret_marked, uintmax_t *ret_total, mc_stat_fn stat_func) { static gint64 timestamp = 0; @@ -700,8 +700,8 @@ do_compute_dir_size (const vfs_path_t * dirname_vpath, dirsize_status_msg_t * ds */ static FileProgressStatus -panel_compute_totals (const WPanel * panel, dirsize_status_msg_t * sm, size_t * ret_count, - uintmax_t * ret_total, gboolean follow_symlinks) +panel_compute_totals (const WPanel *panel, dirsize_status_msg_t *sm, size_t *ret_count, + uintmax_t *ret_total, gboolean follow_symlinks) { int i; size_t dir_count = 0; @@ -743,8 +743,8 @@ panel_compute_totals (const WPanel * panel, dirsize_status_msg_t * sm, size_t * /** Initialize variables for progress bars */ static FileProgressStatus -panel_operate_init_totals (const WPanel * panel, const vfs_path_t * source, - const struct stat *source_stat, file_op_context_t * ctx, +panel_operate_init_totals (const WPanel *panel, const vfs_path_t *source, + const struct stat *source_stat, file_op_context_t *ctx, gboolean compute_totals, filegui_dialog_type_t dialog_type) { FileProgressStatus status; @@ -813,7 +813,7 @@ panel_operate_init_totals (const WPanel * panel, const vfs_path_t * source, /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -progress_update_one (file_op_total_context_t * tctx, file_op_context_t * ctx, off_t add) +progress_update_one (file_op_total_context_t *tctx, file_op_context_t *ctx, off_t add) { gint64 tv_current; static gint64 tv_start = -1; @@ -914,7 +914,7 @@ warn_same_file (const char *fmt, const char *a, const char *b) static gboolean check_same_file (const char *a, const struct stat *ast, const char *b, const struct stat *bst, - FileProgressStatus * status) + FileProgressStatus *status) { if (ast->st_dev != bst->st_dev || ast->st_ino != bst->st_ino) return FALSE; @@ -930,7 +930,7 @@ check_same_file (const char *a, const struct stat *ast, const char *b, const str /* --------------------------------------------------------------------------------------------- */ static void -get_times (const struct stat *sb, mc_timesbuf_t * times) +get_times (const struct stat *sb, mc_timesbuf_t *times) { #ifdef HAVE_UTIMENSAT (*times)[0] = sb->st_atim; @@ -986,7 +986,7 @@ real_do_file_error (enum OperationMode mode, gboolean allow_retry, const char *e /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -real_query_recursive (file_op_context_t * ctx, enum OperationMode mode, const char *s) +real_query_recursive (file_op_context_t *ctx, enum OperationMode mode, const char *s) { if (ctx->recursive_result < RECURSIVE_ALWAYS) { @@ -1051,7 +1051,7 @@ do_file_error (gboolean allow_retry, const char *str) /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -query_recursive (file_op_context_t * ctx, const char *s) +query_recursive (file_op_context_t *ctx, const char *s) { /* *INDENT-OFF* */ union @@ -1072,7 +1072,7 @@ query_recursive (file_op_context_t * ctx, const char *s) /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -query_replace (file_op_context_t * ctx, const char *src, struct stat *src_stat, const char *dst, +query_replace (file_op_context_t *ctx, const char *src, struct stat *src_stat, const char *dst, struct stat *dst_stat) { /* *INDENT-OFF* */ @@ -1105,7 +1105,7 @@ do_file_error (gboolean allow_retry, const char *str) /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -query_recursive (file_op_context_t * ctx, const char *s) +query_recursive (file_op_context_t *ctx, const char *s) { return real_query_recursive (ctx, Foreground, s); } @@ -1113,7 +1113,7 @@ query_recursive (file_op_context_t * ctx, const char *s) /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -query_replace (file_op_context_t * ctx, const char *src, struct stat *src_stat, const char *dst, +query_replace (file_op_context_t *ctx, const char *src, struct stat *src_stat, const char *dst, struct stat *dst_stat) { return file_progress_real_query_replace (ctx, Foreground, src, src_stat, dst, dst_stat); @@ -1144,7 +1144,7 @@ files_error (const char *format, const char *file1, const char *file2) /* --------------------------------------------------------------------------------------------- */ static void -copy_file_file_display_progress (file_op_total_context_t * tctx, file_op_context_t * ctx, +copy_file_file_display_progress (file_op_total_context_t *tctx, file_op_context_t *ctx, gint64 tv_current, gint64 tv_transfer_start, off_t file_size, off_t file_part) { @@ -1193,7 +1193,7 @@ copy_file_file_display_progress (file_op_total_context_t * tctx, file_op_context /* --------------------------------------------------------------------------------------------- */ static gboolean -try_remove_file (file_op_context_t * ctx, const vfs_path_t * vpath, FileProgressStatus * status) +try_remove_file (file_op_context_t *ctx, const vfs_path_t *vpath, FileProgressStatus *status) { while (mc_unlink (vpath) != 0 && !ctx->skip_all) { @@ -1224,7 +1224,7 @@ try_remove_file (file_op_context_t * ctx, const vfs_path_t * vpath, FileProgress * @return operation result */ static FileProgressStatus -move_file_file (const WPanel * panel, file_op_total_context_t * tctx, file_op_context_t * ctx, +move_file_file (const WPanel *panel, file_op_total_context_t *tctx, file_op_context_t *ctx, const char *s, const char *d) { struct stat src_stat, dst_stat; @@ -1393,7 +1393,7 @@ move_file_file (const WPanel * panel, file_op_total_context_t * tctx, file_op_co /** Don't update progress status if progress_count==NULL */ static FileProgressStatus -erase_file (file_op_total_context_t * tctx, file_op_context_t * ctx, const vfs_path_t * vpath) +erase_file (file_op_total_context_t *tctx, file_op_context_t *ctx, const vfs_path_t *vpath) { struct stat buf; FileProgressStatus return_status; @@ -1426,7 +1426,7 @@ erase_file (file_op_total_context_t * tctx, file_op_context_t * ctx, const vfs_p /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -try_erase_dir (file_op_context_t * ctx, const char *dir) +try_erase_dir (file_op_context_t *ctx, const char *dir) { FileProgressStatus return_status = FILE_CONT; @@ -1451,7 +1451,7 @@ try_erase_dir (file_op_context_t * ctx, const char *dir) skipall->remove as much as possible */ static FileProgressStatus -recursive_erase (file_op_total_context_t * tctx, file_op_context_t * ctx, const vfs_path_t * vpath) +recursive_erase (file_op_total_context_t *tctx, file_op_context_t *ctx, const vfs_path_t *vpath) { struct vfs_dirent *next; DIR *reading; @@ -1515,7 +1515,7 @@ recursive_erase (file_op_total_context_t * tctx, file_op_context_t * ctx, const * in SHELL) don't return "." and ".." entries. */ static int -check_dir_is_empty (const vfs_path_t * vpath) +check_dir_is_empty (const vfs_path_t *vpath) { DIR *dir; struct vfs_dirent *d; @@ -1539,7 +1539,7 @@ check_dir_is_empty (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -erase_dir_iff_empty (file_op_context_t * ctx, const vfs_path_t * vpath, size_t count) +erase_dir_iff_empty (file_op_context_t *ctx, const vfs_path_t *vpath, size_t count) { const char *s; @@ -1563,8 +1563,8 @@ erase_dir_iff_empty (file_op_context_t * ctx, const vfs_path_t * vpath, size_t c /* --------------------------------------------------------------------------------------------- */ static void -erase_dir_after_copy (file_op_total_context_t * tctx, file_op_context_t * ctx, - const vfs_path_t * vpath, FileProgressStatus * status) +erase_dir_after_copy (file_op_total_context_t *tctx, file_op_context_t *ctx, + const vfs_path_t *vpath, FileProgressStatus *status) { if (ctx->erase_at_end && erase_list != NULL) { @@ -1608,7 +1608,7 @@ erase_dir_after_copy (file_op_total_context_t * tctx, file_op_context_t * ctx, * @return operation result */ static FileProgressStatus -do_move_dir_dir (const WPanel * panel, file_op_total_context_t * tctx, file_op_context_t * ctx, +do_move_dir_dir (const WPanel *panel, file_op_total_context_t *tctx, file_op_context_t *ctx, const char *s, const char *d) { struct stat src_stat, dst_stat; @@ -1767,7 +1767,7 @@ do_move_dir_dir (const WPanel * panel, file_op_total_context_t * tctx, file_op_c */ static const char * -panel_get_file (const WPanel * panel) +panel_get_file (const WPanel *panel) { if (get_current_type () == view_tree) { @@ -1794,7 +1794,7 @@ panel_get_file (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static const char * -check_single_entry (const WPanel * panel, gboolean force_single, struct stat *src_stat) +check_single_entry (const WPanel *panel, gboolean force_single, struct stat *src_stat) { const char *source; gboolean ok; @@ -1847,7 +1847,7 @@ check_single_entry (const WPanel * panel, gboolean force_single, struct stat *sr */ static char * -panel_operate_generate_prompt (const WPanel * panel, FileOperation operation, +panel_operate_generate_prompt (const WPanel *panel, FileOperation operation, const struct stat *src_stat) { char *sp; @@ -1928,8 +1928,8 @@ panel_operate_generate_prompt (const WPanel * panel, FileOperation operation, /* --------------------------------------------------------------------------------------------- */ static char * -do_confirm_copy_move (const WPanel * panel, gboolean force_single, const char *source, - struct stat *src_stat, file_op_context_t * ctx, gboolean * do_bg) +do_confirm_copy_move (const WPanel *panel, gboolean force_single, const char *source, + struct stat *src_stat, file_op_context_t *ctx, gboolean *do_bg) { const char *tmp_dest_dir; char *dest_dir; @@ -1983,7 +1983,7 @@ do_confirm_copy_move (const WPanel * panel, gboolean force_single, const char *s /* --------------------------------------------------------------------------------------------- */ static gboolean -do_confirm_erase (const WPanel * panel, const char *source, struct stat *src_stat) +do_confirm_erase (const WPanel *panel, const char *source, struct stat *src_stat) { int i; char *format; @@ -2018,7 +2018,7 @@ do_confirm_erase (const WPanel * panel, const char *source, struct stat *src_sta /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -operate_single_file (const WPanel * panel, file_op_total_context_t * tctx, file_op_context_t * ctx, +operate_single_file (const WPanel *panel, file_op_total_context_t *tctx, file_op_context_t *ctx, const char *src, struct stat *src_stat, const char *dest, filegui_dialog_type_t dialog_type) { @@ -2121,7 +2121,7 @@ operate_single_file (const WPanel * panel, file_op_total_context_t * tctx, file_ /* --------------------------------------------------------------------------------------------- */ static FileProgressStatus -operate_one_file (const WPanel * panel, file_op_total_context_t * tctx, file_op_context_t * ctx, +operate_one_file (const WPanel *panel, file_op_total_context_t *tctx, file_op_context_t *ctx, const char *src, struct stat *src_stat, const char *dest) { FileProgressStatus value = FILE_CONT; @@ -2192,7 +2192,7 @@ operate_one_file (const WPanel * panel, file_op_total_context_t * tctx, file_op_ #ifdef ENABLE_BACKGROUND static int -end_bg_process (file_op_context_t * ctx, enum OperationMode mode) +end_bg_process (file_op_context_t *ctx, enum OperationMode mode) { int pid = ctx->pid; @@ -2219,7 +2219,7 @@ end_bg_process (file_op_context_t * ctx, enum OperationMode mode) * @return TRUE if file symlink to directory, ELSE otherwise. */ gboolean -file_is_symlink_to_dir (const vfs_path_t * vpath, struct stat * st, gboolean * stale_link) +file_is_symlink_to_dir (const vfs_path_t *vpath, struct stat *st, gboolean *stale_link) { struct stat st2; gboolean stale = FALSE; @@ -2253,7 +2253,7 @@ file_is_symlink_to_dir (const vfs_path_t * vpath, struct stat * st, gboolean * s /* --------------------------------------------------------------------------------------------- */ FileProgressStatus -copy_file_file (file_op_total_context_t * tctx, file_op_context_t * ctx, +copy_file_file (file_op_total_context_t *tctx, file_op_context_t *ctx, const char *src_path, const char *dst_path) { uid_t src_uid = (uid_t) (-1); @@ -2263,7 +2263,7 @@ copy_file_file (file_op_total_context_t * tctx, file_op_context_t * ctx, mode_t src_mode = 0; /* The mode of the source file */ struct stat src_stat, dst_stat; mc_timesbuf_t times; - unsigned long attrs; + unsigned long attrs = 0; gboolean attrs_ok = ctx->preserve; gboolean dst_exists = FALSE, appending = FALSE; off_t file_size = -1; @@ -2344,6 +2344,8 @@ copy_file_file (file_op_total_context_t * tctx, file_op_context_t * ctx, file_error (TRUE, _("Cannot get attributes of source file \"%s\"\n%s"), src_path); if (return_status == FILE_SKIPALL) ctx->skip_all = TRUE; + if (return_status == FILE_ABORT) + goto ret_fast; } if (return_status != FILE_RETRY) @@ -2934,12 +2936,12 @@ copy_file_file (file_op_total_context_t * tctx, file_op_context_t * ctx, function calls */ FileProgressStatus -copy_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const char *s, const char *d, - gboolean toplevel, gboolean move_over, gboolean do_delete, GSList * parent_dirs) +copy_dir_dir (file_op_total_context_t *tctx, file_op_context_t *ctx, const char *s, const char *d, + gboolean toplevel, gboolean move_over, gboolean do_delete, GSList *parent_dirs) { struct vfs_dirent *next; struct stat dst_stat, src_stat; - unsigned long attrs; + unsigned long attrs = 0; gboolean attrs_ok = ctx->preserve; DIR *reading; FileProgressStatus return_status = FILE_CONT; @@ -3252,7 +3254,7 @@ copy_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const cha /* {{{ Move routines */ FileProgressStatus -move_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const char *s, const char *d) +move_dir_dir (file_op_total_context_t *tctx, file_op_context_t *ctx, const char *s, const char *d) { return do_move_dir_dir (NULL, tctx, ctx, s, d); } @@ -3263,7 +3265,7 @@ move_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const cha /* {{{ Erase routines */ FileProgressStatus -erase_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const vfs_path_t * vpath) +erase_dir (file_op_total_context_t *tctx, file_op_context_t *ctx, const vfs_path_t *vpath) { file_progress_show_deleting (ctx, vfs_path_as_str (vpath), NULL); file_progress_show_count (ctx, tctx->progress_count, ctx->progress_count); @@ -3298,7 +3300,7 @@ erase_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const vfs_pa /* {{{ Panel operate routines */ void -dirsize_status_init_cb (status_msg_t * sm) +dirsize_status_init_cb (status_msg_t *sm) { dirsize_status_msg_t *dsm = (dirsize_status_msg_t *) sm; WGroup *gd = GROUP (sm->dlg); @@ -3343,7 +3345,7 @@ dirsize_status_init_cb (status_msg_t * sm) /* --------------------------------------------------------------------------------------------- */ int -dirsize_status_update_cb (status_msg_t * sm) +dirsize_status_update_cb (status_msg_t *sm) { dirsize_status_msg_t *dsm = (dirsize_status_msg_t *) sm; Widget *wd = WIDGET (sm->dlg); @@ -3382,7 +3384,7 @@ dirsize_status_update_cb (status_msg_t * sm) /* --------------------------------------------------------------------------------------------- */ void -dirsize_status_deinit_cb (status_msg_t * sm) +dirsize_status_deinit_cb (status_msg_t *sm) { (void) sm; @@ -3399,8 +3401,8 @@ dirsize_status_deinit_cb (status_msg_t * sm) */ FileProgressStatus -compute_dir_size (const vfs_path_t * dirname_vpath, dirsize_status_msg_t * sm, - size_t * ret_dir_count, size_t * ret_marked_count, uintmax_t * ret_total, +compute_dir_size (const vfs_path_t *dirname_vpath, dirsize_status_msg_t *sm, + size_t *ret_dir_count, size_t *ret_marked_count, uintmax_t *ret_total, gboolean follow_symlinks) { return do_compute_dir_size (dirname_vpath, sm, ret_dir_count, ret_marked_count, ret_total, @@ -3651,10 +3653,9 @@ panel_operate (void *source_panel, FileOperation operation, gboolean force_singl /* Let our parent know we are saying bye bye */ if (mc_global.we_are_background) { - int cur_pid = getpid (); /* Send pid to parent with child context, it is fork and don't modify real parent ctx */ - ctx->pid = cur_pid; + ctx->pid = getpid (); parent_call ((void *) end_bg_process, ctx, 0); vfs_shut (); diff --git a/src/filemanager/file.h b/src/filemanager/file.h index ae12e1572e..bf3507ed1f 100644 --- a/src/filemanager/file.h +++ b/src/filemanager/file.h @@ -61,7 +61,7 @@ FileProgressStatus file_error (gboolean allow_retry, const char *format, const c /* return value is FILE_CONT or FILE_ABORT */ FileProgressStatus compute_dir_size (const vfs_path_t * dirname_vpath, dirsize_status_msg_t * sm, - size_t * ret_dir_count, size_t * ret_marked_count, + size_t *ret_dir_count, size_t *ret_marked_count, uintmax_t * ret_total, gboolean follow_symlinks); void dirsize_status_init_cb (status_msg_t * sm); diff --git a/src/filemanager/filegui.c b/src/filemanager/filegui.c index a74806e0f8..736af9ae79 100644 --- a/src/filemanager/filegui.c +++ b/src/filemanager/filegui.c @@ -246,8 +246,7 @@ static struct const char *text; button_flags_t flags; int len; -} progress_buttons[] = -{ +} progress_buttons[] = { /* *INDENT-OFF* */ { NULL, FILE_SKIP, N_("&Skip"), NORMAL_BUTTON, -1 }, { NULL, FILE_SUSPEND, N_("S&uspend"), NORMAL_BUTTON, -1 }, @@ -381,7 +380,7 @@ file_bps_prepare_for_show (char *buffer, long bps) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -file_ui_op_dlg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +file_ui_op_dlg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -421,7 +420,7 @@ file_ui_op_dlg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm */ static replace_action_t -overwrite_query_dialog (file_op_context_t * ctx, enum OperationMode mode) +overwrite_query_dialog (file_op_context_t *ctx, enum OperationMode mode) { #define W(i) dlg_widgets[i].widget #define WX(i) W(i)->rect.x @@ -454,8 +453,7 @@ overwrite_query_dialog (file_op_context_t * ctx, enum OperationMode mode) int x; widget_pos_flags_t pos_flags; int value; /* 0 for labels and checkbox */ - } dlg_widgets[] = - { + } dlg_widgets[] = { /* *INDENT-OFF* */ /* 0 - label */ { NULL, N_("New :"), 2, 3, WPOS_KEEP_DEFAULT, 0 }, @@ -734,7 +732,7 @@ is_wildcarded (const char *p) /* --------------------------------------------------------------------------------------------- */ static void -place_progress_buttons (WDialog * h, gboolean suspended) +place_progress_buttons (WDialog *h, gboolean suspended) { const size_t i = suspended ? 2 : 1; Widget *w = WIDGET (h); @@ -752,7 +750,7 @@ place_progress_buttons (WDialog * h, gboolean suspended) /* --------------------------------------------------------------------------------------------- */ static int -progress_button_callback (WButton * button, int action) +progress_button_callback (WButton *button, int action) { (void) button; (void) action; @@ -766,7 +764,7 @@ progress_button_callback (WButton * button, int action) /* --------------------------------------------------------------------------------------------- */ FileProgressStatus -check_progress_buttons (file_op_context_t * ctx) +check_progress_buttons (file_op_context_t *ctx) { int c; Gpm_Event event; @@ -818,7 +816,7 @@ check_progress_buttons (file_op_context_t * ctx) /* {{{ File progress display routines */ void -file_op_context_create_ui (file_op_context_t * ctx, gboolean with_eta, +file_op_context_create_ui (file_op_context_t *ctx, gboolean with_eta, filegui_dialog_type_t dialog_type) { file_op_context_ui_t *ui; @@ -968,7 +966,7 @@ file_op_context_create_ui (file_op_context_t * ctx, gboolean with_eta, /* --------------------------------------------------------------------------------------------- */ void -file_op_context_destroy_ui (file_op_context_t * ctx) +file_op_context_destroy_ui (file_op_context_t *ctx) { if (ctx != NULL && ctx->ui != NULL) { @@ -986,7 +984,7 @@ file_op_context_destroy_ui (file_op_context_t * ctx) */ void -file_progress_show (file_op_context_t * ctx, off_t done, off_t total, +file_progress_show (file_op_context_t *ctx, off_t done, off_t total, const char *stalled_msg, gboolean force_update) { file_op_context_ui_t *ui; @@ -1031,7 +1029,7 @@ file_progress_show (file_op_context_t * ctx, off_t done, off_t total, /* --------------------------------------------------------------------------------------------- */ void -file_progress_show_count (file_op_context_t * ctx, size_t done, size_t total) +file_progress_show_count (file_op_context_t *ctx, size_t done, size_t total) { file_op_context_ui_t *ui; @@ -1053,7 +1051,7 @@ file_progress_show_count (file_op_context_t * ctx, size_t done, size_t total) /* --------------------------------------------------------------------------------------------- */ void -file_progress_show_total (file_op_total_context_t * tctx, file_op_context_t * ctx, +file_progress_show_total (file_op_total_context_t *tctx, file_op_context_t *ctx, uintmax_t copied_bytes, gboolean show_summary) { char buffer2[BUF_TINY]; @@ -1130,7 +1128,7 @@ file_progress_show_total (file_op_total_context_t * tctx, file_op_context_t * ct /* --------------------------------------------------------------------------------------------- */ void -file_progress_show_source (file_op_context_t * ctx, const vfs_path_t * vpath) +file_progress_show_source (file_op_context_t *ctx, const vfs_path_t *vpath) { file_op_context_ui_t *ui; @@ -1154,7 +1152,7 @@ file_progress_show_source (file_op_context_t * ctx, const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ void -file_progress_show_target (file_op_context_t * ctx, const vfs_path_t * vpath) +file_progress_show_target (file_op_context_t *ctx, const vfs_path_t *vpath) { file_op_context_ui_t *ui; @@ -1178,7 +1176,7 @@ file_progress_show_target (file_op_context_t * ctx, const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ gboolean -file_progress_show_deleting (file_op_context_t * ctx, const char *s, size_t * count) +file_progress_show_deleting (file_op_context_t *ctx, const char *s, size_t *count) { static gint64 timestamp = 0; /* update with 25 FPS rate */ @@ -1212,9 +1210,9 @@ file_progress_show_deleting (file_op_context_t * ctx, const char *s, size_t * co /* --------------------------------------------------------------------------------------------- */ FileProgressStatus -file_progress_real_query_replace (file_op_context_t * ctx, enum OperationMode mode, - const char *src, struct stat * src_stat, - const char *dst, struct stat * dst_stat) +file_progress_real_query_replace (file_op_context_t *ctx, enum OperationMode mode, + const char *src, struct stat *src_stat, + const char *dst, struct stat *dst_stat) { file_op_context_ui_t *ui; FileProgressStatus replace_with_zero; @@ -1291,8 +1289,8 @@ file_progress_real_query_replace (file_op_context_t * ctx, enum OperationMode mo /* --------------------------------------------------------------------------------------------- */ char * -file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format, const void *text, - const char *def_text, gboolean * do_bg) +file_mask_dialog (file_op_context_t *ctx, gboolean only_one, const char *format, const void *text, + const char *def_text, gboolean *do_bg) { gboolean preserve; size_t fmd_xlen; @@ -1410,7 +1408,7 @@ file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format if (preserve) { ctx->preserve = TRUE; - ctx->umask_kill = 0777777; + ctx->umask_kill = (mode_t) (~0); ctx->preserve_uidgid = (geteuid () == 0); } else @@ -1420,7 +1418,7 @@ file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format ctx->preserve = ctx->preserve_uidgid = FALSE; i2 = umask (0); umask (i2); - ctx->umask_kill = i2 ^ 0777777; + ctx->umask_kill = i2 ^ ((mode_t) (~0)); } if (*dest_dir == '\0') diff --git a/src/filemanager/filegui.h b/src/filemanager/filegui.h index 6387faac25..47e17ab68e 100644 --- a/src/filemanager/filegui.h +++ b/src/filemanager/filegui.h @@ -34,7 +34,7 @@ void file_progress_show_total (file_op_total_context_t * tctx, file_op_context_t uintmax_t copied_bytes, gboolean show_summary); void file_progress_show_source (file_op_context_t * ctx, const vfs_path_t * vpath); void file_progress_show_target (file_op_context_t * ctx, const vfs_path_t * vpath); -gboolean file_progress_show_deleting (file_op_context_t * ctx, const char *path, size_t * count); +gboolean file_progress_show_deleting (file_op_context_t * ctx, const char *path, size_t *count); /*** inline functions ****************************************************************************/ #endif /* MC__FILEGUI_H */ diff --git a/src/filemanager/filemanager.c b/src/filemanager/filemanager.c index 2e8baca784..b3a380beef 100644 --- a/src/filemanager/filemanager.c +++ b/src/filemanager/filemanager.c @@ -426,7 +426,7 @@ midnight_get_shortcut (long command) /* --------------------------------------------------------------------------------------------- */ static char * -midnight_get_title (const WDialog * h, size_t len) +midnight_get_title (const WDialog *h, size_t len) { char *path; char *login; @@ -460,7 +460,7 @@ toggle_panels_split (void) #ifdef ENABLE_VFS /* event helper */ static gboolean -check_panel_timestamp (const WPanel * panel, panel_view_mode_t mode, const struct vfs_class *vclass, +check_panel_timestamp (const WPanel *panel, panel_view_mode_t mode, const struct vfs_class *vclass, const vfsid id) { return (mode != view_listing || (vfs_path_get_last_path_vfs (panel->cwd_vpath) == vclass @@ -471,7 +471,7 @@ check_panel_timestamp (const WPanel * panel, panel_view_mode_t mode, const struc /* event callback */ static gboolean -check_current_panel_timestamp (const gchar * event_group_name, const gchar * event_name, +check_current_panel_timestamp (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { ev_vfs_stamp_create_t *event_data = (ev_vfs_stamp_create_t *) data; @@ -490,7 +490,7 @@ check_current_panel_timestamp (const gchar * event_group_name, const gchar * eve /* event callback */ static gboolean -check_other_panel_timestamp (const gchar * event_group_name, const gchar * event_name, +check_other_panel_timestamp (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { ev_vfs_stamp_create_t *event_data = (ev_vfs_stamp_create_t *) data; @@ -509,7 +509,7 @@ check_other_panel_timestamp (const gchar * event_group_name, const gchar * event /* event callback */ static gboolean -print_vfs_message (const gchar * event_group_name, const gchar * event_name, +print_vfs_message (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { ev_vfs_print_message_t *event_data = (ev_vfs_print_message_t *) data; @@ -683,7 +683,7 @@ create_panels (void) /* --------------------------------------------------------------------------------------------- */ static void -midnight_put_panel_path (WPanel * panel) +midnight_put_panel_path (WPanel *panel) { vfs_path_t *cwd_vpath; const char *cwd_vpath_str; @@ -710,7 +710,7 @@ midnight_put_panel_path (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -put_link (WPanel * panel) +put_link (WPanel *panel) { const file_entry_t *fe; @@ -783,7 +783,7 @@ put_current_selected (void) /* --------------------------------------------------------------------------------------------- */ static void -put_tagged (WPanel * panel) +put_tagged (WPanel *panel) { if (!command_prompt) return; @@ -1112,7 +1112,7 @@ toggle_show_hidden (void) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -midnight_execute_cmd (Widget * sender, long command) +midnight_execute_cmd (Widget *sender, long command) { cb_ret_t res = MSG_HANDLED; @@ -1466,7 +1466,7 @@ handle_cmdline_enter (void) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -midnight_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +midnight_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { long command; @@ -1619,7 +1619,7 @@ update_menu (void) /* --------------------------------------------------------------------------------------------- */ void -midnight_set_buttonbar (WButtonBar * b) +midnight_set_buttonbar (WButtonBar *b) { Widget *w = WIDGET (filemanager); diff --git a/src/filemanager/filenot.c b/src/filemanager/filenot.c index 0ceed42f3d..959a7c78c8 100644 --- a/src/filemanager/filenot.c +++ b/src/filemanager/filenot.c @@ -61,7 +61,7 @@ /* --------------------------------------------------------------------------------------------- */ static vfs_path_t * -get_absolute_name (const vfs_path_t * vpath) +get_absolute_name (const vfs_path_t *vpath) { if (vpath == NULL) return NULL; @@ -75,7 +75,7 @@ get_absolute_name (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -my_mkdir_rec (const vfs_path_t * vpath, mode_t mode) +my_mkdir_rec (const vfs_path_t *vpath, mode_t mode) { vfs_path_t *q; int result; @@ -110,7 +110,7 @@ my_mkdir_rec (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ int -my_mkdir (const vfs_path_t * vpath, mode_t mode) +my_mkdir (const vfs_path_t *vpath, mode_t mode) { int result; diff --git a/src/filemanager/fileopctx.c b/src/filemanager/fileopctx.c index 72a51bafe7..62d76ae70c 100644 --- a/src/filemanager/fileopctx.c +++ b/src/filemanager/fileopctx.c @@ -78,7 +78,7 @@ file_op_context_new (FileOperation op) ctx->stat_func = mc_lstat; ctx->preserve = TRUE; ctx->preserve_uidgid = (geteuid () == 0); - ctx->umask_kill = 0777777; + ctx->umask_kill = (mode_t) (~0); ctx->erase_at_end = TRUE; ctx->skip_all = FALSE; @@ -95,7 +95,7 @@ file_op_context_new (FileOperation op) */ void -file_op_context_destroy (file_op_context_t * ctx) +file_op_context_destroy (file_op_context_t *ctx) { if (ctx != NULL) { @@ -119,7 +119,7 @@ file_op_total_context_new (void) /* --------------------------------------------------------------------------------------------- */ void -file_op_total_context_destroy (file_op_total_context_t * tctx) +file_op_total_context_destroy (file_op_total_context_t *tctx) { g_free (tctx); } diff --git a/src/filemanager/find.c b/src/filemanager/find.c index 7fb90e8d93..b5d148af36 100644 --- a/src/filemanager/find.c +++ b/src/filemanager/find.c @@ -355,6 +355,14 @@ add_to_list (const char *text, void *data) /* --------------------------------------------------------------------------------------------- */ +static inline char * +add_to_list_take (char *text, void *data) +{ + return listbox_add_item_take (find_list, LISTBOX_APPEND_AT_END, 0, text, data, TRUE); +} + +/* --------------------------------------------------------------------------------------------- */ + static inline void stop_idle (void *data) { @@ -380,7 +388,7 @@ found_num_update (void) /* --------------------------------------------------------------------------------------------- */ static void -get_list_info (char **file, char **dir, gsize * start, gsize * end) +get_list_info (char **file, char **dir, gsize *start, gsize *end) { find_match_location_t *location; @@ -465,7 +473,7 @@ find_toggle_enable_content (void) */ static cb_ret_t -find_parm_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +find_parm_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { /* FIXME: HACK: use first draw of dialog to resolve widget state dependencies. * Use this time moment to check input field content. We can't do that in MSG_INIT @@ -565,7 +573,7 @@ find_parm_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, voi */ static gboolean -find_parameters (WPanel * panel, char **start_dir, ssize_t * start_dir_len, +find_parameters (WPanel *panel, char **start_dir, ssize_t *start_dir_len, char **ignore_dirs, char **pattern, char **content) { WGroup *g; @@ -883,7 +891,7 @@ find_parameters (WPanel * panel, char **start_dir, ssize_t * start_dir_len, /* --------------------------------------------------------------------------------------------- */ static inline void -push_directory (vfs_path_t * dir) +push_directory (vfs_path_t *dir) { g_queue_push_head (&dir_queue, (void *) dir); } @@ -918,7 +926,7 @@ clear_stack (void) static void insert_file (const char *dir, const char *file, gsize start, gsize end) { - char *tmp_name = NULL; + char *tmp_name; static char *dirname = NULL; find_match_location_t *location; @@ -945,8 +953,7 @@ insert_file (const char *dir, const char *file, gsize start, gsize end) location->dir = dirname; location->start = start; location->end = end; - add_to_list (tmp_name, location); - g_free (tmp_name); + add_to_list_take (tmp_name, location); } /* --------------------------------------------------------------------------------------------- */ @@ -968,7 +975,7 @@ find_add_match (const char *dir, const char *file, gsize start, gsize end) /* --------------------------------------------------------------------------------------------- */ static FindProgressStatus -check_find_events (WDialog * h) +check_find_events (WDialog *h) { Gpm_Event event; int c; @@ -1006,11 +1013,11 @@ check_find_events (WDialog * h) */ static gboolean -search_content (WDialog * h, const char *directory, const char *filename) +search_content (WDialog *h, const char *directory, const char *filename) { struct stat s; char buffer[BUF_4K] = ""; /* raw input buffer */ - int file_fd; + int file_fd = -1; gboolean ret_val = FALSE; vfs_path_t *vpath; gint64 tv; @@ -1018,13 +1025,9 @@ search_content (WDialog * h, const char *directory, const char *filename) vpath = vfs_path_build_filename (directory, filename, (char *) NULL); - if (mc_stat (vpath, &s) != 0 || !S_ISREG (s.st_mode)) - { - vfs_path_free (vpath, TRUE); - return FALSE; - } + if (mc_stat (vpath, &s) == 0 && S_ISREG (s.st_mode)) + file_fd = mc_open (vpath, O_RDONLY); - file_fd = mc_open (vpath, O_RDONLY); vfs_path_free (vpath, TRUE); if (file_fd == -1) @@ -1051,9 +1054,6 @@ search_content (WDialog * h, const char *directory, const char *filename) int n_read = 0; off_t off = 0; /* file_fd's offset corresponding to strbuf[0] */ gboolean found = FALSE; - gsize found_len; - gsize found_start; - char result[BUF_MEDIUM]; char *strbuf = NULL; /* buffer for fetched string */ int strbuf_size = 0; int i = -1; /* compensate for a newline we'll add when we first enter the loop */ @@ -1071,6 +1071,7 @@ search_content (WDialog * h, const char *directory, const char *filename) while (!ret_val) { char ch = '\0'; + gsize found_len; off += i + 1; /* the previous line, plus a newline character */ i = 0; @@ -1125,6 +1126,9 @@ search_content (WDialog * h, const char *directory, const char *filename) if (!found /* Search in binary line once */ && mc_search_run (search_content_handle, (const void *) strbuf, 0, i, &found_len)) { + gsize found_start; + char result[BUF_MEDIUM]; + if (!status_updated) { /* if we add results for a file, we have to ensure that @@ -1192,11 +1196,11 @@ search_content (WDialog * h, const char *directory, const char *filename) If dir is relative, this means we're going to add dir to the directory stack. **/ static gboolean -find_ignore_dir_search (const char *dir) +find_ignore_dir_search (const char *dir, size_t len) { if (find_ignore_dirs != NULL) { - const size_t dlen = strlen (dir); + const size_t dlen = len == (size_t) (-1) ? strlen (dir) : len; const unsigned char dabs = g_path_is_absolute (dir) ? 1 : 0; char **ignore_dir; @@ -1249,7 +1253,7 @@ find_ignore_dir_search (const char *dir) /* --------------------------------------------------------------------------------------------- */ static void -find_rotate_dash (const WDialog * h, gboolean show) +find_rotate_dash (const WDialog *h, gboolean show) { static size_t pos = 0; static const char rotating_dash[4] = "|/-\\"; @@ -1267,7 +1271,7 @@ find_rotate_dash (const WDialog * h, gboolean show) /* --------------------------------------------------------------------------------------------- */ static int -do_search (WDialog * h) +do_search (WDialog *h) { static struct vfs_dirent *dp = NULL; static DIR *dirp = NULL; @@ -1341,7 +1345,7 @@ do_search (WDialog * h) pop_start_dir = FALSE; /* handle absolute ignore dirs here */ - if (!find_ignore_dir_search (vfs_path_as_str (tmp_vpath))) + if (!find_ignore_dir_search (vfs_path_as_str (tmp_vpath), -1)) break; vfs_path_free (tmp_vpath, TRUE); @@ -1384,7 +1388,7 @@ do_search (WDialog * h) if (options.find_recurs && (directory != NULL)) { /* Can directory be NULL ? */ /* handle relative ignore dirs here */ - if (options.ignore_dirs_enable && find_ignore_dir_search (dp->d_name)) + if (options.ignore_dirs_enable && find_ignore_dir_search (dp->d_name, dp->d_len)) ignore_count++; else { @@ -1405,8 +1409,7 @@ do_search (WDialog * h) } } - search_ok = mc_search_run (search_file_handle, dp->d_name, - 0, strlen (dp->d_name), &bytes_found); + search_ok = mc_search_run (search_file_handle, dp->d_name, 0, dp->d_len, &bytes_found); if (search_ok) { @@ -1494,7 +1497,7 @@ view_edit_currently_selected_file (gboolean unparsed_view, gboolean edit) /* --------------------------------------------------------------------------------------------- */ static void -find_calc_button_locations (const WDialog * h, gboolean all_buttons) +find_calc_button_locations (const WDialog *h, gboolean all_buttons) { const int cols = CONST_WIDGET (h)->rect.cols; @@ -1520,7 +1523,7 @@ find_calc_button_locations (const WDialog * h, gboolean all_buttons) /* --------------------------------------------------------------------------------------------- */ static void -find_adjust_header (WDialog * h) +find_adjust_header (WDialog *h) { char title[BUF_MEDIUM]; int title_len; @@ -1549,7 +1552,7 @@ find_adjust_header (WDialog * h) /* --------------------------------------------------------------------------------------------- */ static void -find_relocate_buttons (const WDialog * h, gboolean all_buttons) +find_relocate_buttons (const WDialog *h, gboolean all_buttons) { size_t i; @@ -1562,7 +1565,7 @@ find_relocate_buttons (const WDialog * h, gboolean all_buttons) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -find_resize (WDialog * h) +find_resize (WDialog *h) { Widget *w = WIDGET (h); WRect r = w->rect; @@ -1579,7 +1582,7 @@ find_resize (WDialog * h) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -find_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +find_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDialog *h = DIALOG (w); @@ -1617,7 +1620,7 @@ find_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da /** Handles the Stop/Start button in the find window */ static int -start_stop (WButton * button, int action) +start_stop (WButton *button, int action) { Widget *w = WIDGET (button); @@ -1640,7 +1643,7 @@ start_stop (WButton * button, int action) /** Handle view command, when invoked as a button */ static int -find_do_view_file (WButton * button, int action) +find_do_view_file (WButton *button, int action) { (void) button; (void) action; @@ -1653,7 +1656,7 @@ find_do_view_file (WButton * button, int action) /** Handle edit command, when invoked as a button */ static int -find_do_edit_file (WButton * button, int action) +find_do_edit_file (WButton *button, int action) { (void) button; (void) action; @@ -1787,10 +1790,10 @@ kill_gui (void) /* --------------------------------------------------------------------------------------------- */ static int -do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const char *ignore_dirs, +do_find (WPanel *panel, const char *start_dir, ssize_t start_dir_len, const char *ignore_dirs, char **dirname, char **filename) { - int return_value = 0; + int return_value; char *dir_tmp = NULL, *file_tmp = NULL; setup_gui (); @@ -1806,12 +1809,12 @@ do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const cha get_list_info (&file_tmp, &dir_tmp, NULL, NULL); - if (dir_tmp) + if (dir_tmp != NULL) *dirname = g_strdup (dir_tmp); - if (file_tmp) + if (file_tmp != NULL) *filename = g_strdup (file_tmp); - if (return_value == B_PANELIZE && *filename) + if (return_value == B_PANELIZE && *filename != NULL) { struct stat st; GList *entry; @@ -1825,7 +1828,7 @@ do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const cha for (entry = listbox_get_first_link (find_list); entry != NULL && ok; entry = g_list_next (entry)) { - const char *lc_filename = NULL; + const char *lc_filename; WLEntry *le = LENTRY (entry->data); find_match_location_t *location = le->data; char *p; @@ -1841,14 +1844,11 @@ do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const cha name = mc_build_filename (location->dir, lc_filename, (char *) NULL); /* skip initial start dir */ - if (start_dir_len < 0) - p = name; - else - { - p = name + (size_t) start_dir_len; - if (IS_PATH_SEP (*p)) - p++; - } + p = name; + if (start_dir_len > 0) + p += (size_t) start_dir_len; + if (IS_PATH_SEP (*p)) + p++; if (!handle_path (p, &st, &link_to_dir, &stale_link)) { @@ -1890,7 +1890,7 @@ do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const cha /* --------------------------------------------------------------------------------------------- */ void -find_cmd (WPanel * panel) +find_cmd (WPanel *panel) { char *start_dir = NULL, *ignore_dirs = NULL; ssize_t start_dir_len; diff --git a/src/filemanager/hotlist.c b/src/filemanager/hotlist.c index 68406e4b98..d55df3e764 100644 --- a/src/filemanager/hotlist.c +++ b/src/filemanager/hotlist.c @@ -167,8 +167,7 @@ static struct const char *text; int type; widget_pos_flags_t pos_flags; -} hotlist_but[] = -{ +} hotlist_but[] = { /* *INDENT-OFF* */ { B_ENTER, DEFPUSH_BUTTON, 0, 0, 0, N_("Change &to"), LIST_HOTLIST | LIST_VFSLIST | LIST_MOVELIST, WPOS_KEEP_LEFT | WPOS_KEEP_BOTTOM }, @@ -268,23 +267,19 @@ update_path_name (void) /* --------------------------------------------------------------------------------------------- */ static void -fill_listbox (WListbox * list) +fill_listbox (WListbox *list) { struct hotlist *current; - GString *buff; - - buff = g_string_new (""); for (current = current_group->head; current != NULL; current = current->next) switch (current->type) { case HL_TYPE_GROUP: { - /* buff clean up */ - g_string_truncate (buff, 0); - g_string_append (buff, "->"); - g_string_append (buff, current->label); - listbox_add_item (list, LISTBOX_APPEND_AT_END, 0, buff->str, current, FALSE); + char *lbl; + + lbl = g_strconcat ("->", current->label, (char *) NULL); + listbox_add_item_take (list, LISTBOX_APPEND_AT_END, 0, lbl, current, FALSE); } break; case HL_TYPE_DOTDOT: @@ -294,8 +289,6 @@ fill_listbox (WListbox * list) default: break; } - - g_string_free (buff, TRUE); } /* --------------------------------------------------------------------------------------------- */ @@ -482,7 +475,7 @@ hotlist_run_cmd (int action) /* --------------------------------------------------------------------------------------------- */ static int -hotlist_button_callback (WButton * button, int action) +hotlist_button_callback (WButton *button, int action) { int ret; @@ -495,7 +488,7 @@ hotlist_button_callback (WButton * button, int action) /* --------------------------------------------------------------------------------------------- */ static inline cb_ret_t -hotlist_handle_key (WDialog * h, int key) +hotlist_handle_key (WDialog *h, int key) { switch (key) { @@ -564,7 +557,7 @@ hotlist_handle_key (WDialog * h, int key) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -hotlist_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +hotlist_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDialog *h = DIALOG (w); @@ -627,7 +620,7 @@ hotlist_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void /* --------------------------------------------------------------------------------------------- */ static lcback_ret_t -hotlist_listbox_callback (WListbox * list) +hotlist_listbox_callback (WListbox *list) { WDialog *dlg = DIALOG (WIDGET (list)->owner); @@ -988,8 +981,7 @@ add2hotlist (char *label, char *directory, enum HotListType type, listbox_append char *lbl; lbl = g_strconcat ("->", new->label, (char *) NULL); - listbox_add_item (l_hotlist, pos, 0, lbl, new, FALSE); - g_free (lbl); + listbox_add_item_take (l_hotlist, pos, 0, lbl, new, FALSE); } else listbox_add_item (l_hotlist, pos, 0, new->label, new, FALSE); @@ -1037,7 +1029,7 @@ add_new_entry_input (const char *header, const char *text1, const char *text2, /* --------------------------------------------------------------------------------------------- */ static void -add_new_entry_cmd (WPanel * panel) +add_new_entry_cmd (WPanel *panel) { char *title, *url, *to_free; int ret; @@ -1600,7 +1592,7 @@ add_dotdot_to_list (void) /* --------------------------------------------------------------------------------------------- */ void -add2hotlist_cmd (WPanel * panel) +add2hotlist_cmd (WPanel *panel) { char *lc_prompt; const char *cp = N_("Label for \"%s\":"); @@ -1637,7 +1629,7 @@ add2hotlist_cmd (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ char * -hotlist_show (hotlist_t list_type, WPanel * panel) +hotlist_show (hotlist_t list_type, WPanel *panel) { char *target = NULL; int res; diff --git a/src/filemanager/info.c b/src/filemanager/info.c index b23032276e..419820e090 100644 --- a/src/filemanager/info.c +++ b/src/filemanager/info.c @@ -79,7 +79,7 @@ static struct my_statfs myfs_stats; /* --------------------------------------------------------------------------------------------- */ static void -info_box (WInfo * info) +info_box (WInfo *info) { Widget *w = WIDGET (info); @@ -104,7 +104,7 @@ info_box (WInfo * info) /* --------------------------------------------------------------------------------------------- */ static void -info_show_info (WInfo * info) +info_show_info (WInfo *info) { const WRect *w = &CONST_WIDGET (info)->rect; const file_entry_t *fe; @@ -330,7 +330,7 @@ info_hook (void *data) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -info_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +info_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WInfo *info = (WInfo *) w; @@ -361,7 +361,7 @@ info_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da /* --------------------------------------------------------------------------------------------- */ WInfo * -info_new (const WRect * r) +info_new (const WRect *r) { WInfo *info; Widget *w; diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c index a8dbcb793b..1f96c2dd14 100644 --- a/src/filemanager/layout.c +++ b/src/filemanager/layout.c @@ -145,8 +145,7 @@ static struct panel_view_mode_t type; Widget *widget; char *last_saved_dir; /* last view_list working directory */ -} panels[MAX_VIEWS] = -{ +} panels[MAX_VIEWS] = { /* *INDENT-OFF* */ /* init MAX_VIEWS items */ { view_listing, NULL, NULL}, @@ -169,8 +168,7 @@ static struct const char *text; gboolean *variable; WCheck *widget; -} check_options[] = -{ +} check_options[] = { /* *INDENT-OFF* */ { N_("&Equal split"), &equal_split, NULL }, { N_("&Menubar visible"), &menubar_visible, NULL }, @@ -203,7 +201,7 @@ max (int a, int b) /* --------------------------------------------------------------------------------------------- */ static void -check_split (panels_layout_t * layout) +check_split (panels_layout_t *layout) { if (layout->horizontal_split) { @@ -230,7 +228,7 @@ check_split (panels_layout_t * layout) /* --------------------------------------------------------------------------------------------- */ static void -update_split (const WDialog * h) +update_split (const WDialog *h) { /* Check split has to be done before testing if it changed, since it can change due to calling check_split() as well */ @@ -263,7 +261,7 @@ update_split (const WDialog * h) /* --------------------------------------------------------------------------------------------- */ static int -b_left_right_cback (WButton * button, int action) +b_left_right_cback (WButton *button, int action) { (void) action; @@ -291,7 +289,7 @@ b_left_right_cback (WButton * button, int action) /* --------------------------------------------------------------------------------------------- */ static int -bplus_cback (WButton * button, int action) +bplus_cback (WButton *button, int action) { (void) button; (void) action; @@ -304,7 +302,7 @@ bplus_cback (WButton * button, int action) /* --------------------------------------------------------------------------------------------- */ static int -bminus_cback (WButton * button, int action) +bminus_cback (WButton *button, int action) { (void) button; (void) action; @@ -317,7 +315,7 @@ bminus_cback (WButton * button, int action) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -layout_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +layout_bg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -347,7 +345,7 @@ layout_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, voi /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -layout_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +layout_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDialog *h = DIALOG (w); @@ -649,7 +647,7 @@ panel_do_cols (int idx) /** Save current list_view widget directory into panel */ static Widget * -restore_into_right_dir_panel (int idx, gboolean last_was_panel, const WRect * r) +restore_into_right_dir_panel (int idx, gboolean last_was_panel, const WRect *r) { WPanel *new_widget; const char *p_name; @@ -751,7 +749,7 @@ layout_box (void) /* --------------------------------------------------------------------------------------------- */ void -panel_update_cols (Widget * widget, panel_display_t frame_size) +panel_update_cols (Widget *widget, panel_display_t frame_size) { const Widget *mw = CONST_WIDGET (filemanager); int cols, x; @@ -1458,7 +1456,7 @@ save_panel_dir (int idx) but for other types - last_saved_dir */ char * -get_panel_dir_for (const WPanel * widget) +get_panel_dir_for (const WPanel *widget) { int i; diff --git a/src/filemanager/listmode.c b/src/filemanager/listmode.c index a8881d2634..f03105f4b2 100644 --- a/src/filemanager/listmode.c +++ b/src/filemanager/listmode.c @@ -274,7 +274,7 @@ init_listmode (char *oldlistformat) /* --------------------------------------------------------------------------------------------- */ static void -listmode_done (WDialog * h) +listmode_done (WDialog *h) { widget_destroy (WIDGET (h)); if (0) diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index e6ead3567a..4506cbff6e 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -98,6 +98,8 @@ typedef enum FATTR_STATUS } file_attr_t; +#define DEFAULT_USER_FORMAT "half type name | size | perm" + /* select/unselect dialog results */ #define SELECT_RESET ((mc_search_t *)(-1)) #define SELECT_ERROR ((mc_search_t *)(-2)) @@ -127,7 +129,7 @@ typedef struct format_item_t int field_len; align_crt_t just_mode; gboolean expand; - const char *(*string_fn) (file_entry_t *, int len); + const char *(*string_fn) (const file_entry_t * fe, int len); char *title; const char *id; } format_item_t; @@ -142,24 +144,24 @@ typedef enum /*** forward declarations (file scope functions) *************************************************/ -static const char *string_file_name (file_entry_t * fe, int len); -static const char *string_file_size (file_entry_t * fe, int len); -static const char *string_file_size_brief (file_entry_t * fe, int len); -static const char *string_file_type (file_entry_t * fe, int len); -static const char *string_file_mtime (file_entry_t * fe, int len); -static const char *string_file_atime (file_entry_t * fe, int len); -static const char *string_file_ctime (file_entry_t * fe, int len); -static const char *string_file_permission (file_entry_t * fe, int len); -static const char *string_file_perm_octal (file_entry_t * fe, int len); -static const char *string_file_nlinks (file_entry_t * fe, int len); -static const char *string_inode (file_entry_t * fe, int len); -static const char *string_file_nuid (file_entry_t * fe, int len); -static const char *string_file_ngid (file_entry_t * fe, int len); -static const char *string_file_owner (file_entry_t * fe, int len); -static const char *string_file_group (file_entry_t * fe, int len); -static const char *string_marked (file_entry_t * fe, int len); -static const char *string_space (file_entry_t * fe, int len); -static const char *string_dot (file_entry_t * fe, int len); +static const char *string_file_name (const file_entry_t * fe, int len); +static const char *string_file_size (const file_entry_t * fe, int len); +static const char *string_file_size_brief (const file_entry_t * fe, int len); +static const char *string_file_type (const file_entry_t * fe, int len); +static const char *string_file_mtime (const file_entry_t * fe, int len); +static const char *string_file_atime (const file_entry_t * fe, int len); +static const char *string_file_ctime (const file_entry_t * fe, int len); +static const char *string_file_permission (const file_entry_t * fe, int len); +static const char *string_file_perm_octal (const file_entry_t * fe, int len); +static const char *string_file_nlinks (const file_entry_t * fe, int len); +static const char *string_inode (const file_entry_t * fe, int len); +static const char *string_file_nuid (const file_entry_t * fe, int len); +static const char *string_file_ngid (const file_entry_t * fe, int len); +static const char *string_file_owner (const file_entry_t * fe, int len); +static const char *string_file_group (const file_entry_t * fe, int len); +static const char *string_marked (const file_entry_t * fe, int len); +static const char *string_space (const file_entry_t * fe, int len); +static const char *string_dot (const file_entry_t * fe, int len); /*** file scope variables ************************************************************************/ @@ -401,7 +403,7 @@ panelized_descr_new (void) /* --------------------------------------------------------------------------------------------- */ static void -panelized_descr_free (panelized_descr_t * p) +panelized_descr_free (panelized_descr_t *p) { if (p != NULL) { @@ -414,7 +416,7 @@ panelized_descr_free (panelized_descr_t * p) /* --------------------------------------------------------------------------------------------- */ static void -set_colors (const WPanel * panel) +set_colors (const WPanel *panel) { (void) panel; @@ -426,7 +428,7 @@ set_colors (const WPanel * panel) /** Delete format_item_t object */ static void -format_item_free (format_item_t * format) +format_item_free (format_item_t *format) { g_free (format->title); g_free (format); @@ -436,7 +438,7 @@ format_item_free (format_item_t * format) /** Extract the number of available lines in a panel */ static int -panel_lines (const WPanel * p) +panel_lines (const WPanel *p) { /* 3 lines are: top frame, column header, button frame */ return (CONST_WIDGET (p)->rect.lines - 3 - (panels_options.show_mini_info ? 2 : 0)); @@ -446,7 +448,7 @@ panel_lines (const WPanel * p) /** This code relies on the default justification!!! */ static void -add_permission_string (const char *dest, int width, file_entry_t * fe, file_attr_t attr, int color, +add_permission_string (const char *dest, int width, file_entry_t *fe, file_attr_t attr, int color, gboolean is_octal) { int i, r, l; @@ -488,7 +490,7 @@ add_permission_string (const char *dest, int width, file_entry_t * fe, file_attr /** String representations of various file attributes name */ static const char * -string_file_name (file_entry_t * fe, int len) +string_file_name (const file_entry_t *fe, int len) { (void) len; @@ -540,7 +542,7 @@ format_device_number (char *buf, size_t bufsize, dev_t dev) /** size */ static const char * -string_file_size (file_entry_t * fe, int len) +string_file_size (const file_entry_t *fe, int len) { static char buffer[BUF_TINY]; @@ -562,7 +564,7 @@ string_file_size (file_entry_t * fe, int len) /** bsize */ static const char * -string_file_size_brief (file_entry_t * fe, int len) +string_file_size_brief (const file_entry_t *fe, int len) { if (S_ISLNK (fe->st.st_mode) && !link_isdir (fe)) return _("SYMLINK"); @@ -577,7 +579,7 @@ string_file_size_brief (file_entry_t * fe, int len) /** This functions return a string representation of a file entry type */ static const char * -string_file_type (file_entry_t * fe, int len) +string_file_type (const file_entry_t *fe, int len) { static char buffer[2]; @@ -620,7 +622,7 @@ string_file_type (file_entry_t * fe, int len) /** mtime */ static const char * -string_file_mtime (file_entry_t * fe, int len) +string_file_mtime (const file_entry_t *fe, int len) { (void) len; @@ -631,7 +633,7 @@ string_file_mtime (file_entry_t * fe, int len) /** atime */ static const char * -string_file_atime (file_entry_t * fe, int len) +string_file_atime (const file_entry_t *fe, int len) { (void) len; @@ -642,7 +644,7 @@ string_file_atime (file_entry_t * fe, int len) /** ctime */ static const char * -string_file_ctime (file_entry_t * fe, int len) +string_file_ctime (const file_entry_t *fe, int len) { (void) len; @@ -653,7 +655,7 @@ string_file_ctime (file_entry_t * fe, int len) /** perm */ static const char * -string_file_permission (file_entry_t * fe, int len) +string_file_permission (const file_entry_t *fe, int len) { (void) len; @@ -664,7 +666,7 @@ string_file_permission (file_entry_t * fe, int len) /** mode */ static const char * -string_file_perm_octal (file_entry_t * fe, int len) +string_file_perm_octal (const file_entry_t *fe, int len) { static char buffer[10]; @@ -678,7 +680,7 @@ string_file_perm_octal (file_entry_t * fe, int len) /** nlink */ static const char * -string_file_nlinks (file_entry_t * fe, int len) +string_file_nlinks (const file_entry_t *fe, int len) { static char buffer[BUF_TINY]; @@ -692,7 +694,7 @@ string_file_nlinks (file_entry_t * fe, int len) /** inode */ static const char * -string_inode (file_entry_t * fe, int len) +string_inode (const file_entry_t *fe, int len) { static char buffer[10]; @@ -706,7 +708,7 @@ string_inode (file_entry_t * fe, int len) /** nuid */ static const char * -string_file_nuid (file_entry_t * fe, int len) +string_file_nuid (const file_entry_t *fe, int len) { static char buffer[10]; @@ -720,7 +722,7 @@ string_file_nuid (file_entry_t * fe, int len) /** ngid */ static const char * -string_file_ngid (file_entry_t * fe, int len) +string_file_ngid (const file_entry_t *fe, int len) { static char buffer[10]; @@ -734,7 +736,7 @@ string_file_ngid (file_entry_t * fe, int len) /** owner */ static const char * -string_file_owner (file_entry_t * fe, int len) +string_file_owner (const file_entry_t *fe, int len) { (void) len; @@ -745,7 +747,7 @@ string_file_owner (file_entry_t * fe, int len) /** group */ static const char * -string_file_group (file_entry_t * fe, int len) +string_file_group (const file_entry_t *fe, int len) { (void) len; @@ -756,7 +758,7 @@ string_file_group (file_entry_t * fe, int len) /** mark */ static const char * -string_marked (file_entry_t * fe, int len) +string_marked (const file_entry_t *fe, int len) { (void) len; @@ -767,7 +769,7 @@ string_marked (file_entry_t * fe, int len) /** space */ static const char * -string_space (file_entry_t * fe, int len) +string_space (const file_entry_t *fe, int len) { (void) fe; (void) len; @@ -779,7 +781,7 @@ string_space (file_entry_t * fe, int len) /** dot */ static const char * -string_dot (file_entry_t * fe, int len) +string_dot (const file_entry_t *fe, int len) { (void) fe; (void) len; @@ -790,7 +792,7 @@ string_dot (file_entry_t * fe, int len) /* --------------------------------------------------------------------------------------------- */ static int -file_compute_color (file_attr_t attr, file_entry_t * fe) +file_compute_color (const file_attr_t attr, file_entry_t *fe) { switch (attr) { @@ -815,7 +817,7 @@ file_compute_color (file_attr_t attr, file_entry_t * fe) /** Returns the number of items in the given panel */ static int -panel_items (const WPanel * p) +panel_items (const WPanel *p) { return panel_lines (p) * p->list_cols; } @@ -824,7 +826,7 @@ panel_items (const WPanel * p) /** Formats the file number file_index of panel in the buffer dest */ static filename_scroll_flag_t -format_file (WPanel * panel, int file_index, int width, file_attr_t attr, gboolean isstatus, +format_file (WPanel *panel, int file_index, int width, file_attr_t attr, gboolean isstatus, int *field_length) { int color = NORMAL_COLOR; @@ -937,7 +939,7 @@ format_file (WPanel * panel, int file_index, int width, file_attr_t attr, gboole /* --------------------------------------------------------------------------------------------- */ static void -repaint_file (WPanel * panel, int file_index, file_attr_t attr) +repaint_file (WPanel *panel, int file_index, file_attr_t attr) { Widget *w = WIDGET (panel); @@ -1016,7 +1018,7 @@ repaint_file (WPanel * panel, int file_index, file_attr_t attr) /* --------------------------------------------------------------------------------------------- */ static void -repaint_status (WPanel * panel) +repaint_status (WPanel *panel) { int width; @@ -1032,7 +1034,7 @@ repaint_status (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -display_mini_info (WPanel * panel) +display_mini_info (WPanel *panel) { Widget *w = WIDGET (panel); const file_entry_t *fe; @@ -1090,7 +1092,7 @@ display_mini_info (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -paint_dir (WPanel * panel) +paint_dir (WPanel *panel) { int i; int items; /* Number of items */ @@ -1125,7 +1127,7 @@ paint_dir (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -display_total_marked_size (const WPanel * panel, int y, int x, gboolean size_only) +display_total_marked_size (const WPanel *panel, int y, int x, gboolean size_only) { const Widget *w = CONST_WIDGET (panel); @@ -1166,7 +1168,7 @@ display_total_marked_size (const WPanel * panel, int y, int x, gboolean size_onl /* --------------------------------------------------------------------------------------------- */ static void -mini_info_separator (const WPanel * panel) +mini_info_separator (const WPanel *panel) { if (panels_options.show_mini_info) { @@ -1186,7 +1188,7 @@ mini_info_separator (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -show_free_space (const WPanel * panel) +show_free_space (const WPanel *panel) { /* Used to figure out how many free space we have */ static struct my_statfs myfs_stats; @@ -1240,7 +1242,7 @@ show_free_space (const WPanel * panel) */ static char * -panel_correct_path_to_show (const WPanel * panel) +panel_correct_path_to_show (const WPanel *panel) { vfs_path_t *last_vpath; const vfs_path_element_t *path_element; @@ -1293,7 +1295,7 @@ panel_correct_path_to_show (const WPanel * panel) #ifdef HAVE_CHARSET static char * -panel_get_encoding_info_str (const WPanel * panel) +panel_get_encoding_info_str (const WPanel *panel) { char *ret_str = NULL; const vfs_path_element_t *path_element; @@ -1309,7 +1311,7 @@ panel_get_encoding_info_str (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -show_dir (const WPanel * panel) +show_dir (const WPanel *panel) { const Widget *w = CONST_WIDGET (panel); gchar *tmp; @@ -1402,7 +1404,7 @@ show_dir (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -adjust_top_file (WPanel * panel) +adjust_top_file (WPanel *panel) { int items; @@ -1455,7 +1457,7 @@ adjust_top_file (WPanel * panel) */ static char * -panel_save_name (WPanel * panel) +panel_save_name (WPanel *panel) { /* If the program is shutting down */ if ((mc_global.midnight_shutdown && auto_save_setup) || saving_setup) @@ -1467,7 +1469,7 @@ panel_save_name (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -directory_history_add (WPanel * panel, const vfs_path_t * vpath) +directory_history_add (WPanel *panel, const vfs_path_t *vpath) { char *tmp; @@ -1480,7 +1482,7 @@ directory_history_add (WPanel * panel, const vfs_path_t * vpath) /* "history_load" event handler */ static gboolean -panel_load_history (const gchar * event_group_name, const gchar * event_name, +panel_load_history (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { WPanel *p = PANEL (init_data); @@ -1506,7 +1508,7 @@ panel_load_history (const gchar * event_group_name, const gchar * event_name, /* "history_save" event handler */ static gboolean -panel_save_history (const gchar * event_group_name, const gchar * event_name, +panel_save_history (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { WPanel *p = PANEL (init_data); @@ -1527,7 +1529,7 @@ panel_save_history (const gchar * event_group_name, const gchar * event_name, /* --------------------------------------------------------------------------------------------- */ static void -panel_destroy (WPanel * p) +panel_destroy (WPanel *p) { size_t i; @@ -1574,7 +1576,7 @@ panel_destroy (WPanel * p) /* --------------------------------------------------------------------------------------------- */ static void -panel_paint_sort_info (const WPanel * panel) +panel_paint_sort_info (const WPanel *panel) { if (*panel->sort_field->hotkey != '\0') { @@ -1615,7 +1617,7 @@ panel_get_title_without_hotkey (const char *title) /* --------------------------------------------------------------------------------------------- */ static void -panel_print_header (const WPanel * panel) +panel_print_header (const WPanel *panel) { const Widget *w = CONST_WIDGET (panel); @@ -1682,7 +1684,7 @@ panel_print_header (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static const char * -parse_panel_size (WPanel * panel, const char *format, gboolean isstatus) +parse_panel_size (WPanel *panel, const char *format, gboolean isstatus) { panel_display_t frame = frame_half; @@ -1746,7 +1748,7 @@ parse_panel_size (WPanel * panel, const char *format, gboolean isstatus) /* *INDENT-ON* */ static GSList * -parse_display_format (WPanel * panel, const char *format, char **error, gboolean isstatus, +parse_display_format (WPanel *panel, const char *format, char **error, gboolean isstatus, int *res_total_cols) { GSList *home = NULL; /* The formats we return */ @@ -1884,7 +1886,7 @@ parse_display_format (WPanel * panel, const char *format, char **error, gboolean /* --------------------------------------------------------------------------------------------- */ static GSList * -use_display_format (WPanel * panel, const char *format, char **error, gboolean isstatus) +use_display_format (WPanel *panel, const char *format, char **error, gboolean isstatus) { #define MAX_EXPAND 4 int expand_top = 0; /* Max used element in expand */ @@ -1977,7 +1979,7 @@ use_display_format (WPanel * panel, const char *format, char **error, gboolean i /** Given the panel->view_type returns the format string to be parsed */ static const char * -panel_format (WPanel * panel) +panel_format (WPanel *panel) { switch (panel->list_format) { @@ -2011,7 +2013,7 @@ panel_format (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static const char * -mini_status_format (WPanel * panel) +mini_status_format (WPanel *panel) { if (panel->user_mini_status) return panel->user_status_format[panel->list_format]; @@ -2040,7 +2042,7 @@ mini_status_format (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -cd_up_dir (WPanel * panel) +cd_up_dir (WPanel *panel) { vfs_path_t *up_dir; @@ -2053,7 +2055,7 @@ cd_up_dir (WPanel * panel) /** Used to emulate Lynx's entering leaving a directory with the arrow keys */ static cb_ret_t -maybe_cd (WPanel * panel, gboolean move_up_dir) +maybe_cd (WPanel *panel, gboolean move_up_dir) { if (panels_options.navigate_with_arrows && input_is_empty (cmdline)) { @@ -2085,7 +2087,7 @@ maybe_cd (WPanel * panel, gboolean move_up_dir) /* if command line is empty then do 'cd ..' */ static cb_ret_t -force_maybe_cd (WPanel * panel) +force_maybe_cd (WPanel *panel) { if (input_is_empty (cmdline)) { @@ -2099,7 +2101,7 @@ force_maybe_cd (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static inline void -unselect_item (WPanel * panel) +unselect_item (WPanel *panel) { repaint_file (panel, panel->current, panel_current_entry (panel)->f.marked != 0 ? FATTR_MARKED : FATTR_NORMAL); @@ -2109,7 +2111,7 @@ unselect_item (WPanel * panel) /** Select/unselect all the files like a current file by extension */ static void -panel_select_ext_cmd (WPanel * panel) +panel_select_ext_cmd (WPanel *panel) { const file_entry_t *fe; GString *filename; @@ -2158,7 +2160,7 @@ panel_select_ext_cmd (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static int -panel_current_at_half (const WPanel * panel) +panel_current_at_half (const WPanel *panel) { int lines, top; @@ -2175,7 +2177,7 @@ panel_current_at_half (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -move_down (WPanel * panel) +move_down (WPanel *panel) { int items; @@ -2208,7 +2210,7 @@ move_down (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -move_up (WPanel * panel) +move_up (WPanel *panel) { if (panel->current == 0) return; @@ -2238,7 +2240,7 @@ move_up (WPanel * panel) /** Changes the current by lines (may be negative) */ static void -panel_move_current (WPanel * panel, int lines) +panel_move_current (WPanel *panel, int lines) { int new_pos; gboolean adjust = FALSE; @@ -2279,7 +2281,7 @@ panel_move_current (WPanel * panel, int lines) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -move_left (WPanel * panel) +move_left (WPanel *panel) { if (panel->list_cols > 1) { @@ -2293,7 +2295,7 @@ move_left (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -move_right (WPanel * panel) +move_right (WPanel *panel) { if (panel->list_cols > 1) { @@ -2307,7 +2309,7 @@ move_right (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -prev_page (WPanel * panel) +prev_page (WPanel *panel) { int items; @@ -2331,7 +2333,7 @@ prev_page (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -goto_parent_dir (WPanel * panel) +goto_parent_dir (WPanel *panel) { if (!panel->is_panelized) cd_up_dir (panel); @@ -2377,7 +2379,7 @@ goto_parent_dir (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -next_page (WPanel * panel) +next_page (WPanel *panel) { int items; @@ -2403,7 +2405,7 @@ next_page (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -goto_child_dir (WPanel * panel) +goto_child_dir (WPanel *panel) { const file_entry_t *fe; @@ -2422,7 +2424,7 @@ goto_child_dir (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -goto_top_file (WPanel * panel) +goto_top_file (WPanel *panel) { unselect_item (panel); panel->current = panel->top; @@ -2432,7 +2434,7 @@ goto_top_file (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -goto_middle_file (WPanel * panel) +goto_middle_file (WPanel *panel) { unselect_item (panel); panel->current = panel->top + panel_items (panel) / 2; @@ -2442,7 +2444,7 @@ goto_middle_file (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -goto_bottom_file (WPanel * panel) +goto_bottom_file (WPanel *panel) { unselect_item (panel); panel->current = panel->top + panel_items (panel) - 1; @@ -2452,7 +2454,7 @@ goto_bottom_file (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -move_home (WPanel * panel) +move_home (WPanel *panel) { if (panel->current == 0) return; @@ -2487,7 +2489,7 @@ move_home (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -move_end (WPanel * panel) +move_end (WPanel *panel) { if (panel->current == panel->dir.len - 1) return; @@ -2521,7 +2523,7 @@ move_end (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -do_mark_file (WPanel * panel, mark_act_t do_move) +do_mark_file (WPanel *panel, mark_act_t do_move) { do_file_mark (panel, panel->current, panel_current_entry (panel)->f.marked ? 0 : 1); @@ -2534,7 +2536,7 @@ do_mark_file (WPanel * panel, mark_act_t do_move) /* --------------------------------------------------------------------------------------------- */ static inline void -mark_file (WPanel * panel) +mark_file (WPanel *panel) { do_mark_file (panel, MARK_DOWN); } @@ -2542,7 +2544,7 @@ mark_file (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static inline void -mark_file_up (WPanel * panel) +mark_file_up (WPanel *panel) { do_mark_file (panel, MARK_FORCE_UP); } @@ -2550,7 +2552,7 @@ mark_file_up (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static inline void -mark_file_down (WPanel * panel) +mark_file_down (WPanel *panel) { do_mark_file (panel, MARK_FORCE_DOWN); } @@ -2558,7 +2560,7 @@ mark_file_down (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -mark_file_right (WPanel * panel) +mark_file_right (WPanel *panel) { int lines; @@ -2578,7 +2580,7 @@ mark_file_right (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -mark_file_left (WPanel * panel) +mark_file_left (WPanel *panel) { int lines; @@ -2598,7 +2600,7 @@ mark_file_left (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static mc_search_t * -panel_select_unselect_files_dialog (select_flags_t * flags, const char *title, +panel_select_unselect_files_dialog (select_flags_t *flags, const char *title, const char *history_name, const char *help_section, char **str) { gboolean files_only = (*flags & SELECT_FILES_ONLY) != 0; @@ -2672,7 +2674,7 @@ panel_select_unselect_files_dialog (select_flags_t * flags, const char *title, /* --------------------------------------------------------------------------------------------- */ static void -panel_select_unselect_files (WPanel * panel, const char *title, const char *history_name, +panel_select_unselect_files (WPanel *panel, const char *title, const char *history_name, const char *help_section, gboolean do_select) { mc_search_t *search; @@ -2704,7 +2706,7 @@ panel_select_unselect_files (WPanel * panel, const char *title, const char *hist /* --------------------------------------------------------------------------------------------- */ static void -panel_select_files (WPanel * panel) +panel_select_files (WPanel *panel) { panel_select_unselect_files (panel, _("Select"), MC_HISTORY_FM_PANEL_SELECT, "[Select/Unselect Files]", TRUE); @@ -2713,7 +2715,7 @@ panel_select_files (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -panel_unselect_files (WPanel * panel) +panel_unselect_files (WPanel *panel) { panel_select_unselect_files (panel, _("Unselect"), MC_HISTORY_FM_PANEL_UNSELECT, "[Select/Unselect Files]", FALSE); @@ -2722,7 +2724,7 @@ panel_unselect_files (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -panel_select_invert_files (WPanel * panel) +panel_select_invert_files (WPanel *panel) { int i; @@ -2738,7 +2740,7 @@ panel_select_invert_files (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -panel_do_set_filter (WPanel * panel) +panel_do_set_filter (WPanel *panel) { /* *INDENT-OFF* */ file_filter_t ff = { .value = NULL, .handler = NULL, .flags = panel->filter.flags }; @@ -2764,7 +2766,7 @@ panel_do_set_filter (WPanel * panel) */ static void -do_search (WPanel * panel, int c_code) +do_search (WPanel *panel, int c_code) { int curr; int i; @@ -2871,7 +2873,7 @@ do_search (WPanel * panel, int c_code) */ static void -start_search (WPanel * panel) +start_search (WPanel *panel) { if (panel->quick_search.active) { @@ -2900,7 +2902,7 @@ start_search (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -stop_search (WPanel * panel) +stop_search (WPanel *panel) { if (!panel->quick_search.active) return; @@ -2919,7 +2921,7 @@ stop_search (WPanel * panel) /** Return TRUE if the Enter key has been processed, FALSE otherwise */ static gboolean -do_enter_on_file_entry (WPanel * panel, file_entry_t * fe) +do_enter_on_file_entry (WPanel *panel, file_entry_t *fe) { const char *fname = fe->fname->str; char *fname_quoted; @@ -2995,7 +2997,7 @@ do_enter_on_file_entry (WPanel * panel, file_entry_t * fe) /* --------------------------------------------------------------------------------------------- */ static inline gboolean -do_enter (WPanel * panel) +do_enter (WPanel *panel) { return do_enter_on_file_entry (panel, panel_current_entry (panel)); } @@ -3003,7 +3005,7 @@ do_enter (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -panel_cycle_listing_format (WPanel * panel) +panel_cycle_listing_format (WPanel *panel) { panel->list_format = (panel->list_format + 1) % LIST_FORMATS; @@ -3014,7 +3016,7 @@ panel_cycle_listing_format (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -chdir_other_panel (WPanel * panel) +chdir_other_panel (WPanel *panel) { const file_entry_t *entry; vfs_path_t *new_dir_vpath; @@ -3054,7 +3056,7 @@ chdir_other_panel (WPanel * panel) */ static void -panel_sync_other (const WPanel * panel) +panel_sync_other (const WPanel *panel) { if (get_other_type () != view_listing) create_panel (get_other_index (), view_listing); @@ -3069,7 +3071,7 @@ panel_sync_other (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -chdir_to_readlink (WPanel * panel) +chdir_to_readlink (WPanel *panel) { const file_entry_t *fe; vfs_path_t *new_dir_vpath; @@ -3133,7 +3135,7 @@ chdir_to_readlink (WPanel * panel) */ static gsize -panel_get_format_field_index_by_name (const WPanel * panel, const char *name) +panel_get_format_field_index_by_name (const WPanel *panel, const char *name) { GSList *format; gsize lc_index; @@ -3152,7 +3154,7 @@ panel_get_format_field_index_by_name (const WPanel * panel, const char *name) /* --------------------------------------------------------------------------------------------- */ static const panel_field_t * -panel_get_sortable_field_by_format (const WPanel * panel, gsize lc_index) +panel_get_sortable_field_by_format (const WPanel *panel, gsize lc_index) { const panel_field_t *pfield; const format_item_t *format; @@ -3172,7 +3174,7 @@ panel_get_sortable_field_by_format (const WPanel * panel, gsize lc_index) /* --------------------------------------------------------------------------------------------- */ static void -panel_toggle_sort_order_prev (WPanel * panel) +panel_toggle_sort_order_prev (WPanel *panel) { gsize lc_index, i; const char *title; @@ -3207,7 +3209,7 @@ panel_toggle_sort_order_prev (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -panel_toggle_sort_order_next (WPanel * panel) +panel_toggle_sort_order_next (WPanel *panel) { gsize lc_index, i; const panel_field_t *pfield = NULL; @@ -3246,7 +3248,7 @@ panel_toggle_sort_order_next (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -panel_select_sort_order (WPanel * panel) +panel_select_sort_order (WPanel *panel) { const panel_field_t *sort_order; @@ -3269,7 +3271,7 @@ panel_select_sort_order (WPanel * panel) */ static void -panel_content_scroll_left (WPanel * panel) +panel_content_scroll_left (WPanel *panel) { if (panel->content_shift > -1) { @@ -3292,7 +3294,7 @@ panel_content_scroll_left (WPanel * panel) */ static void -panel_content_scroll_right (WPanel * panel) +panel_content_scroll_right (WPanel *panel) { if (panel->content_shift < 0 || panel->content_shift < panel->max_shift) { @@ -3305,7 +3307,7 @@ panel_content_scroll_right (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -panel_set_sort_type_by_id (WPanel * panel, const char *name) +panel_set_sort_type_by_id (WPanel *panel, const char *name) { if (strcmp (panel->sort_field->id, name) == 0) panel->sort_info.reverse = !panel->sort_info.reverse; @@ -3332,7 +3334,7 @@ panel_set_sort_type_by_id (WPanel * panel, const char *name) */ static const char * -get_parent_dir_name (const vfs_path_t * cwd_vpath, const vfs_path_t * lwd_vpath) +get_parent_dir_name (const vfs_path_t *cwd_vpath, const vfs_path_t *lwd_vpath) { size_t llen, clen; const char *p, *lwd; @@ -3377,7 +3379,7 @@ get_parent_dir_name (const vfs_path_t * cwd_vpath, const vfs_path_t * lwd_vpath) /** Wrapper for do_subshell_chdir, check for availability of subshell */ static void -subshell_chdir (const vfs_path_t * vpath) +subshell_chdir (const vfs_path_t *vpath) { #ifdef ENABLE_SUBSHELL if (mc_global.tty.use_subshell && vfs_current_is_local ()) @@ -3394,7 +3396,7 @@ subshell_chdir (const vfs_path_t * vpath) */ static gboolean -panel_do_cd_int (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_type) +panel_do_cd_int (WPanel *panel, const vfs_path_t *new_dir_vpath, enum cd_enum cd_type) { vfs_path_t *olddir_vpath; @@ -3446,7 +3448,7 @@ panel_do_cd_int (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum /* --------------------------------------------------------------------------------------------- */ static void -directory_history_next (WPanel * panel) +directory_history_next (WPanel *panel) { gboolean ok; @@ -3473,7 +3475,7 @@ directory_history_next (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -directory_history_prev (WPanel * panel) +directory_history_prev (WPanel *panel) { gboolean ok; @@ -3500,7 +3502,7 @@ directory_history_prev (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -directory_history_list (WPanel * panel) +directory_history_list (WPanel *panel) { history_descriptor_t hd; gboolean ok = FALSE; @@ -3552,7 +3554,7 @@ directory_history_list (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -panel_execute_cmd (WPanel * panel, long command) +panel_execute_cmd (WPanel *panel, long command) { int res = MSG_HANDLED; @@ -3741,7 +3743,7 @@ panel_execute_cmd (WPanel * panel, long command) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -panel_key (WPanel * panel, int key) +panel_key (WPanel *panel, int key) { long command; @@ -3780,7 +3782,7 @@ panel_key (WPanel * panel, int key) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -panel_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +panel_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WPanel *panel = PANEL (w); WDialog *h = DIALOG (w->owner); @@ -3866,7 +3868,7 @@ panel_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d /* */ static void -mouse_toggle_mark (WPanel * panel) +mouse_toggle_mark (WPanel *panel) { do_mark_file (panel, MARK_DONT_MOVE); mouse_marking = (panel_current_entry (panel)->f.marked != 0); @@ -3876,7 +3878,7 @@ mouse_toggle_mark (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -mouse_set_mark (WPanel * panel) +mouse_set_mark (WPanel *panel) { if (mouse_mark_panel == panel) { @@ -3894,7 +3896,7 @@ mouse_set_mark (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -mark_if_marking (WPanel * panel, const mouse_event_t * event, int previous_current) +mark_if_marking (WPanel *panel, const mouse_event_t *event, int previous_current) { if ((event->buttons & GPM_B_RIGHT) == 0) return; @@ -3926,7 +3928,7 @@ mark_if_marking (WPanel * panel, const mouse_event_t * event, int previous_curre */ static void -mouse_sort_col (WPanel * panel, int x) +mouse_sort_col (WPanel *panel, int x) { int i = 0; GSList *format; @@ -3977,7 +3979,7 @@ mouse_sort_col (WPanel * panel, int x) /* --------------------------------------------------------------------------------------------- */ static int -panel_mouse_is_on_item (const WPanel * panel, int y, int x) +panel_mouse_is_on_item (const WPanel *panel, int y, int x) { int lines, col_width, col; @@ -4005,7 +4007,7 @@ panel_mouse_is_on_item (const WPanel * panel, int y, int x) /* --------------------------------------------------------------------------------------------- */ static void -panel_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +panel_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { WPanel *panel = PANEL (w); gboolean is_active; @@ -4132,7 +4134,7 @@ panel_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) /* --------------------------------------------------------------------------------------------- */ static void -reload_panelized (WPanel * panel) +reload_panelized (WPanel *panel) { int i, j; dir_list *list = &panel->dir; @@ -4169,7 +4171,7 @@ reload_panelized (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -update_one_panel_widget (WPanel * panel, panel_update_flags_t flags, const char *current_file) +update_one_panel_widget (WPanel *panel, panel_update_flags_t flags, const char *current_file) { gboolean free_pointer; char *my_current_file = NULL; @@ -4224,7 +4226,7 @@ update_one_panel (int which, panel_update_flags_t flags, const char *current_fil /* --------------------------------------------------------------------------------------------- */ static void -panel_set_current (WPanel * panel, int i) +panel_set_current (WPanel *panel, int i) { if (i != panel->current) { @@ -4240,7 +4242,7 @@ panel_set_current (WPanel * panel, int i) /* event callback */ static gboolean -event_update_panels (const gchar * event_group_name, const gchar * event_name, +event_update_panels (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { (void) event_group_name; @@ -4257,7 +4259,7 @@ event_update_panels (const gchar * event_group_name, const gchar * event_name, /* event callback */ static gboolean -panel_save_current_file_to_clip_file (const gchar * event_group_name, const gchar * event_name, +panel_save_current_file_to_clip_file (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { (void) event_group_name; @@ -4306,7 +4308,7 @@ panel_save_current_file_to_clip_file (const gchar * event_group_name, const gcha /* --------------------------------------------------------------------------------------------- */ static vfs_path_t * -panel_recursive_cd_to_parent (const vfs_path_t * vpath) +panel_recursive_cd_to_parent (const vfs_path_t *vpath) { vfs_path_t *cwd_vpath; @@ -4370,7 +4372,7 @@ panel_dir_list_callback (dir_list_cb_state_t state, void *data) /* --------------------------------------------------------------------------------------------- */ void -panel_set_current_by_name (WPanel * panel, const char *name) +panel_set_current_by_name (WPanel *panel, const char *name) { int i; char *subdir; @@ -4410,7 +4412,7 @@ panel_set_current_by_name (WPanel * panel, const char *name) /* --------------------------------------------------------------------------------------------- */ void -panel_clean_dir (WPanel * panel) +panel_clean_dir (WPanel *panel) { panel->top = 0; panel->current = 0; @@ -4435,7 +4437,7 @@ panel_clean_dir (WPanel * panel) */ void -panel_set_cwd (WPanel * panel, const vfs_path_t * vpath) +panel_set_cwd (WPanel *panel, const vfs_path_t *vpath) { if (vpath != panel->cwd_vpath) /* check if new vpath is not the panel->cwd_vpath object */ { @@ -4453,7 +4455,7 @@ panel_set_cwd (WPanel * panel, const vfs_path_t * vpath) */ void -panel_set_lwd (WPanel * panel, const vfs_path_t * vpath) +panel_set_lwd (WPanel *panel, const vfs_path_t *vpath) { if (vpath != panel->lwd_vpath) /* check if new vpath is not the panel->lwd_vpath object */ { @@ -4473,7 +4475,7 @@ panel_set_lwd (WPanel * panel, const vfs_path_t * vpath) */ WPanel * -panel_sized_empty_new (const char *panel_name, const WRect * r) +panel_sized_empty_new (const char *panel_name, const WRect *r) { WPanel *panel; Widget *w; @@ -4562,7 +4564,7 @@ panel_sized_empty_new (const char *panel_name, const WRect * r) */ WPanel * -panel_sized_with_dir_new (const char *panel_name, const WRect * r, const vfs_path_t * vpath) +panel_sized_with_dir_new (const char *panel_name, const WRect *r, const vfs_path_t *vpath) { WPanel *panel; char *curdir = NULL; @@ -4625,7 +4627,7 @@ panel_sized_with_dir_new (const char *panel_name, const WRect * r, const vfs_pat /* --------------------------------------------------------------------------------------------- */ void -panel_reload (WPanel * panel) +panel_reload (WPanel *panel) { struct stat current_stat; vfs_path_t *cwd_vpath; @@ -4667,7 +4669,7 @@ panel_reload (WPanel * panel) /* 1 - format error; 2 - status error; 3 - errors in both formats. */ int -set_panel_formats (WPanel * p) +set_panel_formats (WPanel *p) { GSList *form; char *err = NULL; @@ -4704,15 +4706,15 @@ set_panel_formats (WPanel * p) panel_update_cols (WIDGET (p), p->frame_size); - if (retcode) + if (retcode != 0) message (D_ERROR, _("Warning"), _("User supplied format looks invalid, reverting to default.")); - if (retcode & 0x01) + if ((retcode & 0x01) != 0) { g_free (p->user_format); p->user_format = g_strdup (DEFAULT_USER_FORMAT); } - if (retcode & 0x02) + if ((retcode & 0x02) != 0) { g_free (p->user_status_format[p->list_format]); p->user_status_format[p->list_format] = g_strdup (DEFAULT_USER_FORMAT); @@ -4724,7 +4726,7 @@ set_panel_formats (WPanel * p) /* --------------------------------------------------------------------------------------------- */ void -panel_set_filter (WPanel * panel, const file_filter_t * filter) +panel_set_filter (WPanel *panel, const file_filter_t *filter) { MC_PTR_FREE (panel->filter.value); mc_search_free (panel->filter.handler); @@ -4741,7 +4743,7 @@ panel_set_filter (WPanel * panel, const file_filter_t * filter) /* Select current item and readjust the panel */ void -select_item (WPanel * panel) +select_item (WPanel *panel) { adjust_top_file (panel); @@ -4753,7 +4755,7 @@ select_item (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ /** Clears all files in the panel, used only when one file was marked */ void -unmark_files (WPanel * panel) +unmark_files (WPanel *panel) { if (panel->marked != 0) { @@ -4773,7 +4775,7 @@ unmark_files (WPanel * panel) files might have been removed by an external command */ void -recalculate_panel_summary (WPanel * panel) +recalculate_panel_summary (WPanel *panel) { int i; @@ -4796,7 +4798,7 @@ recalculate_panel_summary (WPanel * panel) /** This routine marks a file or a directory */ void -do_file_mark (WPanel * panel, int idx, int mark) +do_file_mark (WPanel *panel, int idx, int mark) { if (panel->dir.list[idx].f.marked == mark) return; @@ -4842,7 +4844,7 @@ do_file_mark (WPanel * panel, int idx, int mark) * Record change in the directory history. */ gboolean -panel_do_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_type) +panel_do_cd (WPanel *panel, const vfs_path_t *new_dir_vpath, enum cd_enum cd_type) { gboolean r; @@ -4855,7 +4857,7 @@ panel_do_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_t /* --------------------------------------------------------------------------------------------- */ void -file_mark (WPanel * panel, int lc_index, int val) +file_mark (WPanel *panel, int lc_index, int val) { if (panel->dir.list[lc_index].f.marked != val) { @@ -4867,7 +4869,7 @@ file_mark (WPanel * panel, int lc_index, int val) /* --------------------------------------------------------------------------------------------- */ void -panel_re_sort (WPanel * panel) +panel_re_sort (WPanel *panel) { char *filename; const file_entry_t *fe; @@ -4898,7 +4900,7 @@ panel_re_sort (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ void -panel_set_sort_order (WPanel * panel, const panel_field_t * sort_order) +panel_set_sort_order (WPanel *panel, const panel_field_t *sort_order) { if (sort_order == NULL) return; @@ -4930,7 +4932,7 @@ panel_set_sort_order (WPanel * panel, const panel_field_t * sort_order) */ void -panel_change_encoding (WPanel * panel) +panel_change_encoding (WPanel *panel) { const char *encoding = NULL; char *errmsg; @@ -4981,7 +4983,7 @@ panel_change_encoding (WPanel * panel) * */ vfs_path_t * -remove_encoding_from_path (const vfs_path_t * vpath) +remove_encoding_from_path (const vfs_path_t *vpath) { vfs_path_t *ret_vpath; GString *tmp_conv; @@ -5081,7 +5083,7 @@ panel_get_num_of_sortable_fields (void) /* --------------------------------------------------------------------------------------------- */ char ** -panel_get_sortable_fields (gsize * array_size) +panel_get_sortable_fields (gsize *array_size) { char **ret; gsize lc_index, i; @@ -5169,7 +5171,7 @@ panel_get_num_of_user_possible_fields (void) /* --------------------------------------------------------------------------------------------- */ char ** -panel_get_user_possible_fields (gsize * array_size) +panel_get_user_possible_fields (gsize *array_size) { char **ret; gsize lc_index, i; @@ -5265,7 +5267,7 @@ panel_panelize_cd (void) * @param new_root new path */ void -panel_panelize_change_root (WPanel * panel, const vfs_path_t * new_root) +panel_panelize_change_root (WPanel *panel, const vfs_path_t *new_root) { if (panel->panelized_descr == NULL) panel->panelized_descr = panelized_descr_new (); @@ -5295,7 +5297,7 @@ panel_panelize_change_root (WPanel * panel, const vfs_path_t * new_root) * of a panelized panel. */ void -panel_panelize_absolutize_if_needed (WPanel * panel) +panel_panelize_absolutize_if_needed (WPanel *panel) { const dir_list *const list = &panel->dir; @@ -5316,7 +5318,7 @@ panel_panelize_absolutize_if_needed (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ void -panel_panelize_save (WPanel * panel) +panel_panelize_save (WPanel *panel) { int i; dir_list *list = &panel->dir; @@ -5392,7 +5394,7 @@ panel_deinit (void) /* --------------------------------------------------------------------------------------------- */ gboolean -panel_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum exact) +panel_cd (WPanel *panel, const vfs_path_t *new_dir_vpath, enum cd_enum exact) { gboolean res; const vfs_path_t *_new_dir_vpath = new_dir_vpath; diff --git a/src/filemanager/panel.h b/src/filemanager/panel.h index 0496f43966..ea20a96397 100644 --- a/src/filemanager/panel.h +++ b/src/filemanager/panel.h @@ -20,7 +20,6 @@ /*** typedefs(not structures) and defined constants **********************************************/ #define PANEL(x) ((WPanel *)(x)) -#define DEFAULT_USER_FORMAT "half type name | size | perm" #define LIST_FORMATS 4 @@ -68,7 +67,7 @@ typedef struct panel_field_struct const char *title_hotkey; gboolean is_user_choice; gboolean use_in_user_format; - const char *(*string_fn) (file_entry_t *, int); + const char *(*string_fn) (const file_entry_t * fe, int len); GCompareFunc sort_routine; /* used by mouse_sort_col() */ } panel_field_t; @@ -233,7 +232,7 @@ panel_empty_new (const char *panel_name) */ static inline WPanel * -panel_with_dir_new (const char *panel_name, const vfs_path_t * vpath) +panel_with_dir_new (const char *panel_name, const vfs_path_t *vpath) { /* Unknown sizes of the panel at startup */ WRect r = { 0, 0, 1, 1 }; @@ -268,7 +267,7 @@ panel_new (const char *panel_name) */ static inline WPanel * -panel_sized_new (const char *panel_name, const WRect * r) +panel_sized_new (const char *panel_name, const WRect *r) { return panel_sized_with_dir_new (panel_name, r, NULL); } @@ -276,7 +275,7 @@ panel_sized_new (const char *panel_name, const WRect * r) /* --------------------------------------------------------------------------------------------- */ static inline file_entry_t * -panel_current_entry (const WPanel * panel) +panel_current_entry (const WPanel *panel) { return &(panel->dir.list[panel->current]); } diff --git a/src/filemanager/panelize.c b/src/filemanager/panelize.c index b1c87ca216..574df84510 100644 --- a/src/filemanager/panelize.c +++ b/src/filemanager/panelize.c @@ -136,7 +136,7 @@ update_command (void) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -panelize_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +panelize_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -163,8 +163,7 @@ external_panelize_init (void) int ret_cmd; button_flags_t flags; const char *text; - } panelize_but[] = - { + } panelize_but[] = { /* *INDENT-OFF* */ { B_ENTER, DEFPUSH_BUTTON, N_("Pane&lize") }, { B_REMOVE, NORMAL_BUTTON, N_("&Remove") }, @@ -287,7 +286,7 @@ add2panelize_cmd (void) /* --------------------------------------------------------------------------------------------- */ static void -remove_from_panelize (panelize_entry_t * entry) +remove_from_panelize (panelize_entry_t *entry) { if (strcmp (entry->label, _("Other command")) != 0) { diff --git a/src/filemanager/tree.c b/src/filemanager/tree.c index 2bfcf5051b..9b4b4b3aa3 100644 --- a/src/filemanager/tree.c +++ b/src/filemanager/tree.c @@ -115,7 +115,7 @@ static gboolean tree_navigation_flag = FALSE; /* --------------------------------------------------------------------------------------------- */ static tree_entry * -back_ptr (tree_entry * ptr, int *count) +back_ptr (tree_entry *ptr, int *count) { int i; @@ -129,7 +129,7 @@ back_ptr (tree_entry * ptr, int *count) /* --------------------------------------------------------------------------------------------- */ static tree_entry * -forw_ptr (tree_entry * ptr, int *count) +forw_ptr (tree_entry *ptr, int *count) { int i; @@ -143,7 +143,7 @@ forw_ptr (tree_entry * ptr, int *count) /* --------------------------------------------------------------------------------------------- */ static void -remove_callback (tree_entry * entry, void *data) +remove_callback (tree_entry *entry, void *data) { WTree *tree = data; @@ -160,7 +160,7 @@ remove_callback (tree_entry * entry, void *data) /** Save the ${XDG_CACHE_HOME}/mc/Tree file */ static void -save_tree (WTree * tree) +save_tree (WTree *tree) { int error; @@ -181,7 +181,7 @@ save_tree (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_remove_entry (WTree * tree, const vfs_path_t * name_vpath) +tree_remove_entry (WTree *tree, const vfs_path_t *name_vpath) { (void) tree; tree_store_remove_entry (name_vpath); @@ -190,7 +190,7 @@ tree_remove_entry (WTree * tree, const vfs_path_t * name_vpath) /* --------------------------------------------------------------------------------------------- */ static void -tree_destroy (WTree * tree) +tree_destroy (WTree *tree) { tree_store_remove_entry_remove_hook (remove_callback); save_tree (tree); @@ -204,7 +204,7 @@ tree_destroy (WTree * tree) /** Loads the .mc.tree file */ static void -load_tree (WTree * tree) +load_tree (WTree *tree) { vfs_path_t *vpath; @@ -219,7 +219,7 @@ load_tree (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_show_mini_info (WTree * tree, int tree_lines, int tree_cols) +tree_show_mini_info (WTree *tree, int tree_lines, int tree_cols) { Widget *w = WIDGET (tree); int line; @@ -262,7 +262,7 @@ tree_show_mini_info (WTree * tree, int tree_lines, int tree_cols) /* --------------------------------------------------------------------------------------------- */ static void -show_tree (WTree * tree) +show_tree (WTree *tree) { Widget *w = WIDGET (tree); tree_entry *current; @@ -434,7 +434,7 @@ show_tree (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_check_focus (WTree * tree) +tree_check_focus (WTree *tree) { if (tree->topdiff < 3) tree->topdiff = 3; @@ -445,7 +445,7 @@ tree_check_focus (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_move_backward (WTree * tree, int i) +tree_move_backward (WTree *tree, int i) { if (!tree_navigation_flag) tree->selected_ptr = back_ptr (tree->selected_ptr, &i); @@ -475,7 +475,7 @@ tree_move_backward (WTree * tree, int i) /* --------------------------------------------------------------------------------------------- */ static void -tree_move_forward (WTree * tree, int i) +tree_move_forward (WTree *tree, int i) { if (!tree_navigation_flag) tree->selected_ptr = forw_ptr (tree->selected_ptr, &i); @@ -505,7 +505,7 @@ tree_move_forward (WTree * tree, int i) /* --------------------------------------------------------------------------------------------- */ static void -tree_move_to_child (WTree * tree) +tree_move_to_child (WTree *tree) { tree_entry *current; @@ -540,7 +540,7 @@ tree_move_to_child (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static gboolean -tree_move_to_parent (WTree * tree) +tree_move_to_parent (WTree *tree) { tree_entry *current; tree_entry *old; @@ -565,7 +565,7 @@ tree_move_to_parent (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_move_to_top (WTree * tree) +tree_move_to_top (WTree *tree) { tree->selected_ptr = tree->store->tree_first; tree->topdiff = 0; @@ -574,7 +574,7 @@ tree_move_to_top (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_move_to_bottom (WTree * tree) +tree_move_to_bottom (WTree *tree) { tree->selected_ptr = tree->store->tree_last; tree->topdiff = tlines (tree) - 3 - 1; @@ -583,7 +583,7 @@ tree_move_to_bottom (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_chdir_sel (WTree * tree) +tree_chdir_sel (WTree *tree) { if (tree->is_panel) { @@ -612,7 +612,7 @@ tree_chdir_sel (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -maybe_chdir (WTree * tree) +maybe_chdir (WTree *tree) { if (xtree_mode && tree->is_panel && is_idle ()) tree_chdir_sel (tree); @@ -622,7 +622,7 @@ maybe_chdir (WTree * tree) /** Search tree for text */ static gboolean -search_tree (WTree * tree, const GString * text) +search_tree (WTree *tree, const GString *text) { tree_entry *current = tree->selected_ptr; gboolean wrapped = FALSE; @@ -653,7 +653,7 @@ search_tree (WTree * tree, const GString * text) /* --------------------------------------------------------------------------------------------- */ static void -tree_do_search (WTree * tree, int key) +tree_do_search (WTree *tree, int key) { /* TODO: support multi-byte characters, see do_search() in panel.c */ @@ -706,7 +706,7 @@ tree_forget (void *data) /* --------------------------------------------------------------------------------------------- */ static void -tree_copy (WTree * tree, const char *default_dest) +tree_copy (WTree *tree, const char *default_dest) { char msg[BUF_MEDIUM]; char *dest; @@ -741,7 +741,7 @@ tree_copy (WTree * tree, const char *default_dest) /* --------------------------------------------------------------------------------------------- */ static void -tree_move (WTree * tree, const char *default_dest) +tree_move (WTree *tree, const char *default_dest) { char msg[BUF_MEDIUM]; char *dest; @@ -790,7 +790,7 @@ tree_move (WTree * tree, const char *default_dest) #if 0 static void -tree_mkdir (WTree * tree) +tree_mkdir (WTree *tree) { char old_dir[MC_MAXPATHLEN]; @@ -842,7 +842,7 @@ tree_rmdir (void *data) /* --------------------------------------------------------------------------------------------- */ static inline void -tree_move_up (WTree * tree) +tree_move_up (WTree *tree) { tree_move_backward (tree, 1); show_tree (tree); @@ -852,7 +852,7 @@ tree_move_up (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static inline void -tree_move_down (WTree * tree) +tree_move_down (WTree *tree) { tree_move_forward (tree, 1); show_tree (tree); @@ -862,7 +862,7 @@ tree_move_down (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static inline void -tree_move_home (WTree * tree) +tree_move_home (WTree *tree) { tree_move_to_top (tree); show_tree (tree); @@ -872,7 +872,7 @@ tree_move_home (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static inline void -tree_move_end (WTree * tree) +tree_move_end (WTree *tree) { tree_move_to_bottom (tree); show_tree (tree); @@ -882,7 +882,7 @@ tree_move_end (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_move_pgup (WTree * tree) +tree_move_pgup (WTree *tree) { tree_move_backward (tree, tlines (tree) - 1); show_tree (tree); @@ -892,7 +892,7 @@ tree_move_pgup (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_move_pgdn (WTree * tree) +tree_move_pgdn (WTree *tree) { tree_move_forward (tree, tlines (tree) - 1); show_tree (tree); @@ -902,7 +902,7 @@ tree_move_pgdn (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static gboolean -tree_move_left (WTree * tree) +tree_move_left (WTree *tree) { gboolean v = FALSE; @@ -919,7 +919,7 @@ tree_move_left (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static gboolean -tree_move_right (WTree * tree) +tree_move_right (WTree *tree) { gboolean v = FALSE; @@ -937,7 +937,7 @@ tree_move_right (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_start_search (WTree * tree) +tree_start_search (WTree *tree) { if (tree->searching) { @@ -969,7 +969,7 @@ tree_start_search (WTree * tree) /* --------------------------------------------------------------------------------------------- */ static void -tree_toggle_navig (WTree * tree) +tree_toggle_navig (WTree *tree) { Widget *w = WIDGET (tree); WButtonBar *b; @@ -996,7 +996,7 @@ tree_help (void) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -tree_execute_cmd (WTree * tree, long command) +tree_execute_cmd (WTree *tree, long command) { cb_ret_t res = MSG_HANDLED; @@ -1066,7 +1066,7 @@ tree_execute_cmd (WTree * tree, long command) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -tree_key (WTree * tree, int key) +tree_key (WTree *tree, int key) { long command; @@ -1118,7 +1118,7 @@ tree_key (WTree * tree, int key) /* --------------------------------------------------------------------------------------------- */ static void -tree_frame (WDialog * h, WTree * tree) +tree_frame (WDialog *h, WTree *tree) { Widget *w = WIDGET (tree); @@ -1153,7 +1153,7 @@ tree_frame (WDialog * h, WTree * tree) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -tree_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +tree_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WTree *tree = (WTree *) w; WDialog *h = DIALOG (w->owner); @@ -1216,7 +1216,7 @@ tree_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da * Mouse callback */ static void -tree_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +tree_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { WTree *tree = (WTree *) w; int y; @@ -1282,7 +1282,7 @@ tree_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) /* --------------------------------------------------------------------------------------------- */ WTree * -tree_new (const WRect * r, gboolean is_panel) +tree_new (const WRect *r, gboolean is_panel) { WTree *tree; Widget *w; @@ -1311,7 +1311,7 @@ tree_new (const WRect * r, gboolean is_panel) /* --------------------------------------------------------------------------------------------- */ void -tree_chdir (WTree * tree, const vfs_path_t * dir) +tree_chdir (WTree *tree, const vfs_path_t *dir) { tree_entry *current; @@ -1327,7 +1327,7 @@ tree_chdir (WTree * tree, const vfs_path_t * dir) /** Return name of the currently selected entry */ const vfs_path_t * -tree_selected_name (const WTree * tree) +tree_selected_name (const WTree *tree) { return tree->selected_ptr->name; } @@ -1335,7 +1335,7 @@ tree_selected_name (const WTree * tree) /* --------------------------------------------------------------------------------------------- */ void -sync_tree (const vfs_path_t * vpath) +sync_tree (const vfs_path_t *vpath) { tree_chdir (the_tree, vpath); } @@ -1343,7 +1343,7 @@ sync_tree (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ WTree * -find_tree (const WDialog * h) +find_tree (const WDialog *h) { return (WTree *) widget_find_by_type (CONST_WIDGET (h), tree_callback); } diff --git a/src/filemanager/treestore.c b/src/filemanager/treestore.c index 89420b6134..b89e6dcca6 100644 --- a/src/filemanager/treestore.c +++ b/src/filemanager/treestore.c @@ -97,7 +97,7 @@ tree_store_dirty (gboolean dirty) */ static size_t -str_common (const vfs_path_t * s1_vpath, const vfs_path_t * s2_vpath) +str_common (const vfs_path_t *s1_vpath, const vfs_path_t *s2_vpath) { size_t result = 0; const char *s1, *s2; @@ -135,7 +135,7 @@ str_common (const vfs_path_t * s1_vpath, const vfs_path_t * s2_vpath) */ static int -pathcmp (const vfs_path_t * p1_vpath, const vfs_path_t * p2_vpath) +pathcmp (const vfs_path_t *p1_vpath, const vfs_path_t *p2_vpath) { int ret_val; const char *p1, *p2; @@ -320,7 +320,7 @@ tree_store_load_from (const char *name) /* --------------------------------------------------------------------------------------------- */ static char * -encode (const vfs_path_t * vpath, size_t offset) +encode (const vfs_path_t *vpath, size_t offset) { return str_escape (vfs_path_as_str (vpath) + offset, -1, "\n\\", FALSE); } @@ -381,7 +381,7 @@ tree_store_save_to (char *name) /* --------------------------------------------------------------------------------------------- */ static tree_entry * -tree_store_add_entry (const vfs_path_t * name) +tree_store_add_entry (const vfs_path_t *name) { int flag = -1; tree_entry *current; @@ -474,7 +474,7 @@ tree_store_add_entry (const vfs_path_t * name) /* --------------------------------------------------------------------------------------------- */ static void -tree_store_notify_remove (tree_entry * entry) +tree_store_notify_remove (tree_entry *entry) { hook_t *p; @@ -489,7 +489,7 @@ tree_store_notify_remove (tree_entry * entry) /* --------------------------------------------------------------------------------------------- */ static tree_entry * -remove_entry (tree_entry * entry) +remove_entry (tree_entry *entry) { tree_entry *current = entry->prev; long submask = 0; @@ -529,7 +529,7 @@ remove_entry (tree_entry * entry) /* --------------------------------------------------------------------------------------------- */ static void -process_special_dirs (GList ** special_dirs, const char *file) +process_special_dirs (GList **special_dirs, const char *file) { gchar **start_buff; mc_config_t *cfg; @@ -557,7 +557,7 @@ process_special_dirs (GList ** special_dirs, const char *file) /* --------------------------------------------------------------------------------------------- */ static gboolean -should_skip_directory (const vfs_path_t * vpath) +should_skip_directory (const vfs_path_t *vpath) { static GList *special_dirs = NULL; GList *l; @@ -599,7 +599,7 @@ queue_vpath_free (gpointer data) /* Searches for specified directory */ tree_entry * -tree_store_whereis (const vfs_path_t * name) +tree_store_whereis (const vfs_path_t *name) { tree_entry *current; int flag = -1; @@ -684,7 +684,7 @@ tree_store_remove_entry_remove_hook (tree_store_remove_fn callback) /* --------------------------------------------------------------------------------------------- */ void -tree_store_remove_entry (const vfs_path_t * name_vpath) +tree_store_remove_entry (const vfs_path_t *name_vpath) { tree_entry *current, *base; size_t len; @@ -797,7 +797,7 @@ tree_store_mark_checked (const char *subname) /** Mark the subdirectories of the current directory for delete */ tree_entry * -tree_store_start_check (const vfs_path_t * vpath) +tree_store_start_check (const vfs_path_t *vpath) { tree_entry *current, *retval; size_t len; @@ -897,7 +897,7 @@ tree_store_end_check (void) /* --------------------------------------------------------------------------------------------- */ tree_entry * -tree_store_rescan (const vfs_path_t * vpath) +tree_store_rescan (const vfs_path_t *vpath) { DIR *dirp; struct stat buf; diff --git a/src/help.c b/src/help.c index f36704c98c..6f24205558 100644 --- a/src/help.c +++ b/src/help.c @@ -403,7 +403,7 @@ clear_link_areas (void) /* --------------------------------------------------------------------------------------------- */ static void -help_print_word (WDialog * h, GString * word, int *col, int *line, gboolean add_space) +help_print_word (WDialog *h, GString *word, int *col, int *line, gboolean add_space) { if (*line >= help_lines) g_string_set_size (word, 0); @@ -447,7 +447,7 @@ help_print_word (WDialog * h, GString * word, int *col, int *line, gboolean add_ /* --------------------------------------------------------------------------------------------- */ static void -help_show (WDialog * h, const char *paint_start) +help_show (WDialog *h, const char *paint_start) { gboolean painting = TRUE; gboolean repeat_paint; @@ -612,7 +612,7 @@ help_show (WDialog * h, const char *paint_start) /** show help */ static void -help_help (WDialog * h) +help_help (WDialog *h) { const char *p; @@ -632,7 +632,7 @@ help_help (WDialog * h) /* --------------------------------------------------------------------------------------------- */ static void -help_index (WDialog * h) +help_index (WDialog *h) { const char *new_item; @@ -655,7 +655,7 @@ help_index (WDialog * h) /* --------------------------------------------------------------------------------------------- */ static void -help_back (WDialog * h) +help_back (WDialog *h) { currentpoint = history[history_ptr].page; selected_item = history[history_ptr].link; @@ -854,7 +854,7 @@ help_execute_cmd (long command) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -help_handle_key (WDialog * h, int key) +help_handle_key (WDialog *h, int key) { Widget *w = WIDGET (h); long command; @@ -869,7 +869,7 @@ help_handle_key (WDialog * h, int key) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -help_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +help_bg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -886,7 +886,7 @@ help_bg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -help_resize (WDialog * h) +help_resize (WDialog *h) { Widget *w = WIDGET (h); WButtonBar *bb; @@ -905,7 +905,7 @@ help_resize (WDialog * h) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -help_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +help_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDialog *h = DIALOG (w); @@ -970,7 +970,7 @@ translate_file (char *filedata) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -md_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +md_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -987,7 +987,7 @@ md_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data /* --------------------------------------------------------------------------------------------- */ static void -help_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +help_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { int x, y; GSList *current_area; @@ -1055,7 +1055,7 @@ help_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) /* --------------------------------------------------------------------------------------------- */ static Widget * -mousedispatch_new (const WRect * r) +mousedispatch_new (const WRect *r) { Widget *w; @@ -1072,7 +1072,7 @@ mousedispatch_new (const WRect * r) /* event callback */ gboolean -help_interactive_display (const gchar * event_group_name, const gchar * event_name, +help_interactive_display (const gchar *event_group_name, const gchar *event_name, gpointer init_data, gpointer data) { const dlg_colors_t help_colors = { diff --git a/src/keymap.c b/src/keymap.c index e708fb2936..969be18708 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -625,8 +625,8 @@ static const global_keymap_ini_t default_diff_keymap[] = { /* --------------------------------------------------------------------------------------------- */ static void -create_default_keymap_section (mc_config_t * keymap, const char *section, - const global_keymap_ini_t * k) +create_default_keymap_section (mc_config_t *keymap, const char *section, + const global_keymap_ini_t *k) { size_t i; @@ -673,7 +673,7 @@ create_default_keymap (void) /* --------------------------------------------------------------------------------------------- */ static void -load_keymap_from_section (const char *section_name, GArray * keymap, mc_config_t * cfg) +load_keymap_from_section (const char *section_name, GArray *keymap, mc_config_t *cfg) { gchar **profile_keys, **keys; @@ -783,7 +783,7 @@ load_setup_get_full_config_name (const char *subdir, const char *config_file_nam */ static void -load_setup_init_config_from_file (mc_config_t ** config, const char *fname, gboolean read_only) +load_setup_init_config_from_file (mc_config_t **config, const char *fname, gboolean read_only) { /* TODO: IMHO, in future, this function shall be placed in mcconfig module. diff --git a/src/learn.c b/src/learn.c index 949cc9b594..60011224bb 100644 --- a/src/learn.c +++ b/src/learn.c @@ -81,7 +81,7 @@ static gboolean learnchanged = FALSE; /* --------------------------------------------------------------------------------------------- */ static int -learn_button (WButton * button, int action) +learn_button (WButton *button, int action) { WDialog *d; char *seq; @@ -232,7 +232,7 @@ learn_check_key (int c) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -learn_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +learn_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { diff --git a/src/selcodepage.c b/src/selcodepage.c index 4332b6266b..a9fa06d607 100644 --- a/src/selcodepage.c +++ b/src/selcodepage.c @@ -125,7 +125,8 @@ select_charset (int center_y, int center_x, int current_charset, gboolean seldis /* some charset has been selected */ if (seldisplay) /* charset list is finished with "Other 8 bit" item */ - return (listbox_result >= (int) codepages->len) ? SELECT_CHARSET_OTHER_8BIT : listbox_result; + return (listbox_result >= + (int) codepages->len) ? SELECT_CHARSET_OTHER_8BIT : listbox_result; /* charset list is began with "- < No translation >" item */ return (listbox_result - 1); diff --git a/src/setup.c b/src/setup.c index 9d6e15348a..eb729c603b 100644 --- a/src/setup.c +++ b/src/setup.c @@ -604,7 +604,7 @@ load_layout (void) /* --------------------------------------------------------------------------------------------- */ static void -load_keys_from_section (const char *terminal, mc_config_t * cfg) +load_keys_from_section (const char *terminal, mc_config_t *cfg) { char *section_name; gchar **profile_keys, **keys; @@ -1072,7 +1072,7 @@ done_setup (void) /* --------------------------------------------------------------------------------------------- */ void -setup_save_config_show_error (const char *filename, GError ** mcerror) +setup_save_config_show_error (const char *filename, GError **mcerror) { if (mcerror != NULL && *mcerror != NULL) { @@ -1127,10 +1127,10 @@ load_anon_passwd (void) /* --------------------------------------------------------------------------------------------- */ void -panel_load_setup (WPanel * panel, const char *section) +panel_load_setup (WPanel *panel, const char *section) { size_t i; - char *buffer, buffer2[BUF_TINY]; + char *buffer; panel->sort_info.reverse = mc_config_get_bool (mc_global.panels_config, section, "reverse", FALSE); @@ -1169,14 +1169,16 @@ panel_load_setup (WPanel * panel, const char *section) /* User formats */ g_free (panel->user_format); panel->user_format = - mc_config_get_string (mc_global.panels_config, section, "user_format", DEFAULT_USER_FORMAT); + mc_config_get_string (mc_global.panels_config, section, "user_format", NULL); for (i = 0; i < LIST_FORMATS; i++) { + char buffer2[BUF_TINY]; + g_free (panel->user_status_format[i]); g_snprintf (buffer2, sizeof (buffer2), "user_status%lld", (long long) i); panel->user_status_format[i] = - mc_config_get_string (mc_global.panels_config, section, buffer2, DEFAULT_USER_FORMAT); + mc_config_get_string (mc_global.panels_config, section, buffer2, NULL); } panel->user_mini_status = @@ -1192,7 +1194,7 @@ panel_load_setup (WPanel * panel, const char *section) /* --------------------------------------------------------------------------------------------- */ void -panel_save_setup (WPanel * panel, const char *section) +panel_save_setup (WPanel *panel, const char *section) { char buffer[BUF_TINY]; size_t i; diff --git a/src/subshell/common.c b/src/subshell/common.c index 4827da0446..99c5303730 100644 --- a/src/subshell/common.c +++ b/src/subshell/common.c @@ -1444,7 +1444,7 @@ init_subshell (void) /* --------------------------------------------------------------------------------------------- */ int -invoke_subshell (const char *command, int how, vfs_path_t ** new_dir_vpath) +invoke_subshell (const char *command, int how, vfs_path_t **new_dir_vpath) { /* Make the MC terminal transparent */ tcsetattr (STDOUT_FILENO, TCSANOW, &raw_mode); @@ -1683,7 +1683,7 @@ exit_subshell (void) /** If it actually changed the directory it returns true */ void -do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt) +do_subshell_chdir (const vfs_path_t *vpath, gboolean update_prompt) { char *pcwd; diff --git a/src/usermenu.c b/src/usermenu.c index accd9f224b..3bf56c74fa 100644 --- a/src/usermenu.c +++ b/src/usermenu.c @@ -171,7 +171,7 @@ extract_arg (char *p, char *arg, int size) specified in argument. */ static gboolean -test_type (WPanel * panel, char *arg) +test_type (WPanel *panel, char *arg) { int result = 0; /* False by default */ mode_t st_mode; @@ -226,7 +226,7 @@ test_type (WPanel * panel, char *arg) p. Returns the point after condition. */ static char * -test_condition (const Widget * edit_widget, char *p, gboolean * condition) +test_condition (const Widget *edit_widget, char *p, gboolean *condition) { char arg[256]; const mc_search_type_t search_type = easy_patterns ? MC_SEARCH_T_GLOB : MC_SEARCH_T_REGEX; @@ -370,7 +370,7 @@ debug_out (char *start, char *end, gboolean condition) the point just before the end of line. */ static char * -test_line (const Widget * edit_widget, char *p, gboolean * result) +test_line (const Widget *edit_widget, char *p, gboolean *result) { char operator; @@ -436,7 +436,7 @@ test_line (const Widget * edit_widget, char *p, gboolean * result) /** FIXME: recode this routine on version 3.0, it could be cleaner */ static void -execute_menu_command (const Widget * edit_widget, const char *commands, gboolean show_prompt) +execute_menu_command (const Widget *edit_widget, const char *commands, gboolean show_prompt) { FILE *cmd_file; int cmd_file_fd; @@ -758,7 +758,7 @@ check_format_var (const char *p, char **v) /* --------------------------------------------------------------------------------------------- */ char * -expand_format (const Widget * edit_widget, char c, gboolean do_quote) +expand_format (const Widget *edit_widget, char c, gboolean do_quote) { WPanel *panel = NULL; char *(*quote_func) (const char *, gboolean); @@ -971,7 +971,7 @@ expand_format (const Widget * edit_widget, char c, gboolean do_quote) */ gboolean -user_menu_cmd (const Widget * edit_widget, const char *menu_file, int selected_entry) +user_menu_cmd (const Widget *edit_widget, const char *menu_file, int selected_entry) { char *p; char *data, **entries; diff --git a/src/util.c b/src/util.c index bc590fb0a5..417e2e599e 100644 --- a/src/util.c +++ b/src/util.c @@ -50,7 +50,7 @@ /* --------------------------------------------------------------------------------------------- */ gboolean -check_for_default (const vfs_path_t * default_file_vpath, const vfs_path_t * file_vpath) +check_for_default (const vfs_path_t *default_file_vpath, const vfs_path_t *file_vpath) { if (!exist_file (vfs_path_as_str (file_vpath))) { diff --git a/src/vfs/cpio/cpio.c b/src/vfs/cpio/cpio.c index 1b904c5004..62914bb516 100644 --- a/src/vfs/cpio/cpio.c +++ b/src/vfs/cpio/cpio.c @@ -223,7 +223,7 @@ cpio_free_archive (struct vfs_class *me, struct vfs_s_super *super) /* --------------------------------------------------------------------------------------------- */ static int -cpio_open_cpio_file (struct vfs_class *me, struct vfs_s_super *super, const vfs_path_t * vpath) +cpio_open_cpio_file (struct vfs_class *me, struct vfs_s_super *super, const vfs_path_t *vpath) { int fd, type; cpio_super_t *arch; @@ -769,8 +769,8 @@ cpio_read_crc_head (struct vfs_class *me, struct vfs_s_super *super) /** Need to CPIO_SEEK_CUR to skip the file at the end of add entry!!!! */ static int -cpio_open_archive (struct vfs_s_super *super, const vfs_path_t * vpath, - const vfs_path_element_t * vpath_element) +cpio_open_archive (struct vfs_s_super *super, const vfs_path_t *vpath, + const vfs_path_element_t *vpath_element) { (void) vpath_element; @@ -810,7 +810,7 @@ cpio_open_archive (struct vfs_s_super *super, const vfs_path_t * vpath, /** Remaining functions are exactly same as for tarfs (and were in fact just copied) */ static void * -cpio_super_check (const vfs_path_t * vpath) +cpio_super_check (const vfs_path_t *vpath) { static struct stat sb; int stat_result; @@ -822,8 +822,8 @@ cpio_super_check (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -cpio_super_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *parc, - const vfs_path_t * vpath, void *cookie) +cpio_super_same (const vfs_path_element_t *vpath_element, struct vfs_s_super *parc, + const vfs_path_t *vpath, void *cookie) { struct stat *archive_stat = cookie; /* stat of main archive */ @@ -872,7 +872,7 @@ cpio_read (void *fh, char *buffer, size_t count) /* --------------------------------------------------------------------------------------------- */ static int -cpio_fh_open (struct vfs_class *me, vfs_file_handler_t * fh, int flags, mode_t mode) +cpio_fh_open (struct vfs_class *me, vfs_file_handler_t *fh, int flags, mode_t mode) { (void) fh; (void) mode; diff --git a/src/vfs/extfs/extfs.c b/src/vfs/extfs/extfs.c index 11a9ba58de..59a0c39d3e 100644 --- a/src/vfs/extfs/extfs.c +++ b/src/vfs/extfs/extfs.c @@ -116,7 +116,7 @@ static int my_errno = 0; /* --------------------------------------------------------------------------------------------- */ static struct extfs_super_t * -extfs_super_new (struct vfs_class *me, const char *name, const vfs_path_t * local_name_vpath, +extfs_super_new (struct vfs_class *me, const char *name, const vfs_path_t *local_name_vpath, int fstype) { struct extfs_super_t *super; @@ -224,7 +224,7 @@ extfs_generate_entry (struct extfs_super_t *archive, const char *name, struct vf /* --------------------------------------------------------------------------------------------- */ static struct vfs_s_entry * -extfs_find_entry_int (struct vfs_s_inode *dir, const char *name, GSList * list, int flags) +extfs_find_entry_int (struct vfs_s_inode *dir, const char *name, GSList *list, int flags) { struct vfs_s_entry *pent, *pdir; const char *p, *name_end; @@ -509,7 +509,7 @@ extfs_add_file (struct extfs_super_t *archive, const char *file_name) /* --------------------------------------------------------------------------------------------- */ static mc_pipe_t * -extfs_open_archive (int fstype, const char *name, struct extfs_super_t **pparc, GError ** error) +extfs_open_archive (int fstype, const char *name, struct extfs_super_t **pparc, GError **error) { const extfs_plugin_info_t *info; static dev_t archive_counter = 0; @@ -597,7 +597,7 @@ extfs_open_archive (int fstype, const char *name, struct extfs_super_t **pparc, */ static int -extfs_read_archive (mc_pipe_t * pip, struct extfs_super_t *archive, GError ** error) +extfs_read_archive (mc_pipe_t *pip, struct extfs_super_t *archive, GError **error) { int ret = 0; GString *buffer; @@ -765,7 +765,7 @@ extfs_open_and_read_archive (int fstype, const char *name, struct extfs_super_t * Dissect the path and create corresponding superblock. */ static const char * -extfs_get_path (const vfs_path_t * vpath, struct extfs_super_t **archive, int flags) +extfs_get_path (const vfs_path_t *vpath, struct extfs_super_t **archive, int flags) { char *archive_name; int result = -1; @@ -832,7 +832,7 @@ extfs_get_path_from_entry (const struct vfs_s_entry *entry) /* --------------------------------------------------------------------------------------------- */ static struct vfs_s_entry * -extfs_resolve_symlinks_int (struct vfs_s_entry *entry, GSList * list) +extfs_resolve_symlinks_int (struct vfs_s_entry *entry, GSList *list) { struct vfs_s_entry *pent = NULL; @@ -1001,7 +1001,7 @@ extfs_cmd (const char *str_extfs_cmd, const struct extfs_super_t *archive, /* --------------------------------------------------------------------------------------------- */ static void -extfs_run (const vfs_path_t * vpath) +extfs_run (const vfs_path_t *vpath) { struct extfs_super_t *archive = NULL; const char *p; @@ -1029,7 +1029,7 @@ extfs_run (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static void * -extfs_open (const vfs_path_t * vpath, int flags, mode_t mode) +extfs_open (const vfs_path_t *vpath, int flags, mode_t mode) { vfs_file_handler_t *extfs_info; struct extfs_super_t *archive = NULL; @@ -1164,7 +1164,7 @@ extfs_errno (struct vfs_class *me) /* --------------------------------------------------------------------------------------------- */ static void * -extfs_opendir (const vfs_path_t * vpath) +extfs_opendir (const vfs_path_t *vpath) { struct extfs_super_t *archive = NULL; const char *q; @@ -1236,7 +1236,7 @@ extfs_stat_move (struct stat *buf, const struct vfs_s_inode *inode) /* --------------------------------------------------------------------------------------------- */ static int -extfs_internal_stat (const vfs_path_t * vpath, struct stat *buf, gboolean resolve) +extfs_internal_stat (const vfs_path_t *vpath, struct stat *buf, gboolean resolve) { struct extfs_super_t *archive; const char *q; @@ -1264,7 +1264,7 @@ extfs_internal_stat (const vfs_path_t * vpath, struct stat *buf, gboolean resolv /* --------------------------------------------------------------------------------------------- */ static int -extfs_stat (const vfs_path_t * vpath, struct stat *buf) +extfs_stat (const vfs_path_t *vpath, struct stat *buf) { return extfs_internal_stat (vpath, buf, TRUE); } @@ -1272,7 +1272,7 @@ extfs_stat (const vfs_path_t * vpath, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -extfs_lstat (const vfs_path_t * vpath, struct stat *buf) +extfs_lstat (const vfs_path_t *vpath, struct stat *buf) { return extfs_internal_stat (vpath, buf, FALSE); } @@ -1291,7 +1291,7 @@ extfs_fstat (void *fh, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -extfs_readlink (const vfs_path_t * vpath, char *buf, size_t size) +extfs_readlink (const vfs_path_t *vpath, char *buf, size_t size) { struct extfs_super_t *archive; const char *q; @@ -1323,7 +1323,7 @@ extfs_readlink (const vfs_path_t * vpath, char *buf, size_t size) /* --------------------------------------------------------------------------------------------- */ static int -extfs_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) +extfs_chown (const vfs_path_t *vpath, uid_t owner, gid_t group) { (void) vpath; (void) owner; @@ -1334,7 +1334,7 @@ extfs_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) /* --------------------------------------------------------------------------------------------- */ static int -extfs_chmod (const vfs_path_t * vpath, mode_t mode) +extfs_chmod (const vfs_path_t *vpath, mode_t mode) { (void) vpath; (void) mode; @@ -1355,7 +1355,7 @@ extfs_write (void *fh, const char *buf, size_t nbyte) /* --------------------------------------------------------------------------------------------- */ static int -extfs_unlink (const vfs_path_t * vpath) +extfs_unlink (const vfs_path_t *vpath) { struct extfs_super_t *archive; const char *q; @@ -1390,7 +1390,7 @@ extfs_unlink (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -extfs_mkdir (const vfs_path_t * vpath, mode_t mode) +extfs_mkdir (const vfs_path_t *vpath, mode_t mode) { struct extfs_super_t *archive; const char *q; @@ -1436,7 +1436,7 @@ extfs_mkdir (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -extfs_rmdir (const vfs_path_t * vpath) +extfs_rmdir (const vfs_path_t *vpath) { struct extfs_super_t *archive; const char *q; @@ -1472,7 +1472,7 @@ extfs_rmdir (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -extfs_chdir (const vfs_path_t * vpath) +extfs_chdir (const vfs_path_t *vpath) { void *data; @@ -1498,7 +1498,7 @@ extfs_lseek (void *fh, off_t offset, int whence) /* --------------------------------------------------------------------------------------------- */ static vfsid -extfs_getid (const vfs_path_t * vpath) +extfs_getid (const vfs_path_t *vpath) { struct extfs_super_t *archive = NULL; const char *p; @@ -1510,7 +1510,7 @@ extfs_getid (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static vfs_path_t * -extfs_getlocalcopy (const vfs_path_t * vpath) +extfs_getlocalcopy (const vfs_path_t *vpath) { vfs_file_handler_t *fh; vfs_path_t *p; @@ -1532,7 +1532,7 @@ extfs_getlocalcopy (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -extfs_ungetlocalcopy (const vfs_path_t * vpath, const vfs_path_t * local, gboolean has_changed) +extfs_ungetlocalcopy (const vfs_path_t *vpath, const vfs_path_t *local, gboolean has_changed) { vfs_file_handler_t *fh; @@ -1695,7 +1695,7 @@ extfs_done (struct vfs_class *me) /* --------------------------------------------------------------------------------------------- */ static int -extfs_setctl (const vfs_path_t * vpath, int ctlop, void *arg) +extfs_setctl (const vfs_path_t *vpath, int ctlop, void *arg) { (void) arg; diff --git a/src/vfs/extfs/helpers/lslR.in b/src/vfs/extfs/helpers/lslR.in index f568c02a5f..52b0b6a18c 100644 --- a/src/vfs/extfs/helpers/lslR.in +++ b/src/vfs/extfs/helpers/lslR.in @@ -37,7 +37,7 @@ BEGIN { # Pattern to match 8 first fields. rx8 = "^" rx rx rx rx rx rx rx "[^ ]+[ ]"; } -/^total\ [0-9]*$/ { next } +/^total [0-9]*$/ { next } /^$/ { empty=1; next } empty==1 && /:$/ { empty=0 diff --git a/src/vfs/ftpfs/ftpfs.c b/src/vfs/ftpfs/ftpfs.c index 175bd0da16..6eb9c2aaf3 100644 --- a/src/vfs/ftpfs/ftpfs.c +++ b/src/vfs/ftpfs/ftpfs.c @@ -347,7 +347,7 @@ ftpfs_translate_path (struct vfs_class *me, struct vfs_s_super *super, const cha */ static vfs_path_element_t * -ftpfs_correct_url_parameters (const vfs_path_element_t * velement) +ftpfs_correct_url_parameters (const vfs_path_element_t *velement) { vfs_path_element_t *path_element = vfs_path_element_clone (velement); @@ -1018,7 +1018,7 @@ ftpfs_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) static int ftpfs_open_archive (struct vfs_s_super *super, - const vfs_path_t * vpath, const vfs_path_element_t * vpath_element) + const vfs_path_t *vpath, const vfs_path_element_t *vpath_element) { (void) vpath; @@ -1034,8 +1034,8 @@ ftpfs_open_archive (struct vfs_s_super *super, /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_archive_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *super, - const vfs_path_t * vpath, void *cookie) +ftpfs_archive_same (const vfs_path_element_t *vpath_element, struct vfs_s_super *super, + const vfs_path_t *vpath, void *cookie) { vfs_path_element_t *path_element; int result; @@ -1107,7 +1107,7 @@ ftpfs_get_current_directory (struct vfs_class *me, struct vfs_s_super *super) static gboolean ftpfs_setup_passive_pasv (struct vfs_class *me, struct vfs_s_super *super, - int my_socket, struct sockaddr_storage *sa, socklen_t * salen) + int my_socket, struct sockaddr_storage *sa, socklen_t *salen) { char *c; char n[6]; @@ -1145,7 +1145,7 @@ ftpfs_setup_passive_pasv (struct vfs_class *me, struct vfs_s_super *super, static gboolean ftpfs_setup_passive_epsv (struct vfs_class *me, struct vfs_s_super *super, - int my_socket, struct sockaddr_storage *sa, socklen_t * salen) + int my_socket, struct sockaddr_storage *sa, socklen_t *salen) { char *c; int port; @@ -1185,7 +1185,7 @@ ftpfs_setup_passive_epsv (struct vfs_class *me, struct vfs_s_super *super, static gboolean ftpfs_setup_passive (struct vfs_class *me, struct vfs_s_super *super, - int my_socket, struct sockaddr_storage *sa, socklen_t * salen) + int my_socket, struct sockaddr_storage *sa, socklen_t *salen) { /* It's IPV4, so try PASV first, some servers and ALGs get confused by EPSV */ if (sa->ss_family == AF_INET) @@ -1294,7 +1294,7 @@ ftpfs_setup_active (struct vfs_class *me, struct vfs_s_super *super, static int ftpfs_init_data_socket (struct vfs_class *me, struct vfs_s_super *super, - struct sockaddr_storage *data_addr, socklen_t * data_addrlen) + struct sockaddr_storage *data_addr, socklen_t *data_addrlen) { const unsigned int attempts = 10; unsigned int i; @@ -1515,7 +1515,7 @@ ftpfs_open_data_connection (struct vfs_class *me, struct vfs_s_super *super, con /* --------------------------------------------------------------------------------------------- */ static void -ftpfs_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh) +ftpfs_linear_abort (struct vfs_class *me, vfs_file_handler_t *fh) { struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); ftp_super_t *ftp_super = FTP_SUPER (super); @@ -1918,7 +1918,7 @@ ftpfs_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remot /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, char *localname) +ftpfs_file_store (struct vfs_class *me, vfs_file_handler_t *fh, char *name, char *localname) { struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); ftp_super_t *ftp_super = FTP_SUPER (super); @@ -2026,7 +2026,7 @@ ftpfs_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, cha /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_linear_start (struct vfs_class *me, vfs_file_handler_t * fh, off_t offset) +ftpfs_linear_start (struct vfs_class *me, vfs_file_handler_t *fh, off_t offset) { char *name; @@ -2049,7 +2049,7 @@ ftpfs_linear_start (struct vfs_class *me, vfs_file_handler_t * fh, off_t offset) /* --------------------------------------------------------------------------------------------- */ static ssize_t -ftpfs_linear_read (struct vfs_class *me, vfs_file_handler_t * fh, void *buf, size_t len) +ftpfs_linear_read (struct vfs_class *me, vfs_file_handler_t *fh, void *buf, size_t len) { ssize_t n; struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); @@ -2079,7 +2079,7 @@ ftpfs_linear_read (struct vfs_class *me, vfs_file_handler_t * fh, void *buf, siz /* --------------------------------------------------------------------------------------------- */ static void -ftpfs_linear_close (struct vfs_class *me, vfs_file_handler_t * fh) +ftpfs_linear_close (struct vfs_class *me, vfs_file_handler_t *fh) { if (FH_SOCK != -1) ftpfs_linear_abort (me, fh); @@ -2115,7 +2115,7 @@ ftpfs_ctl (void *fh, int ctlop, void *arg) /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_send_command (const vfs_path_t * vpath, const char *cmd, int flags) +ftpfs_send_command (const vfs_path_t *vpath, const char *cmd, int flags) { const char *rpath; char *p; @@ -2149,7 +2149,7 @@ ftpfs_send_command (const vfs_path_t * vpath, const char *cmd, int flags) /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_stat (const vfs_path_t * vpath, struct stat *buf) +ftpfs_stat (const vfs_path_t *vpath, struct stat *buf) { int ret; @@ -2161,7 +2161,7 @@ ftpfs_stat (const vfs_path_t * vpath, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_lstat (const vfs_path_t * vpath, struct stat *buf) +ftpfs_lstat (const vfs_path_t *vpath, struct stat *buf) { int ret; @@ -2185,7 +2185,7 @@ ftpfs_fstat (void *vfs_info, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_chmod (const vfs_path_t * vpath, mode_t mode) +ftpfs_chmod (const vfs_path_t *vpath, mode_t mode) { char buf[BUF_SMALL]; int ret; @@ -2198,7 +2198,7 @@ ftpfs_chmod (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) +ftpfs_chown (const vfs_path_t *vpath, uid_t owner, gid_t group) { #if 0 (void) vpath; @@ -2220,7 +2220,7 @@ ftpfs_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_unlink (const vfs_path_t * vpath) +ftpfs_unlink (const vfs_path_t *vpath) { return ftpfs_send_command (vpath, "DELE /%s", OPT_FLUSH); } @@ -2267,7 +2267,7 @@ ftpfs_chdir_internal (struct vfs_class *me, struct vfs_s_super *super, const cha /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +ftpfs_rename (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { ftpfs_send_command (vpath1, "RNFR /%s", OPT_FLUSH); return ftpfs_send_command (vpath2, "RNTO /%s", OPT_FLUSH); @@ -2276,7 +2276,7 @@ ftpfs_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_mkdir (const vfs_path_t * vpath, mode_t mode) +ftpfs_mkdir (const vfs_path_t *vpath, mode_t mode) { (void) mode; /* FIXME: should be used */ @@ -2286,7 +2286,7 @@ ftpfs_mkdir (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_rmdir (const vfs_path_t * vpath) +ftpfs_rmdir (const vfs_path_t *vpath) { return ftpfs_send_command (vpath, "RMD /%s", OPT_FLUSH); } @@ -2308,7 +2308,7 @@ ftpfs_fh_new (struct vfs_s_inode *ino, gboolean changed) /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_fh_open (struct vfs_class *me, vfs_file_handler_t * fh, int flags, mode_t mode) +ftpfs_fh_open (struct vfs_class *me, vfs_file_handler_t *fh, int flags, mode_t mode) { ftp_file_handler_t *ftp = FTP_FILE_HANDLER (fh); @@ -2383,7 +2383,7 @@ ftpfs_fh_open (struct vfs_class *me, vfs_file_handler_t * fh, int flags, mode_t /* --------------------------------------------------------------------------------------------- */ static int -ftpfs_fh_close (struct vfs_class *me, vfs_file_handler_t * fh) +ftpfs_fh_close (struct vfs_class *me, vfs_file_handler_t *fh) { if (fh->handle != -1 && fh->ino->localname == NULL) { diff --git a/src/vfs/ftpfs/ftpfs_parse_ls.c b/src/vfs/ftpfs/ftpfs_parse_ls.c index a9ee58c10c..2befd20edd 100644 --- a/src/vfs/ftpfs/ftpfs_parse_ls.c +++ b/src/vfs/ftpfs/ftpfs_parse_ls.c @@ -1105,7 +1105,7 @@ ftpfs_parse_long_list_MacWebStar (char *line, struct stat *s, char **filename, /* --------------------------------------------------------------------------------------------- */ GSList * -ftpfs_parse_long_list (struct vfs_class * me, struct vfs_s_inode * dir, GSList * buf, int *err_ret) +ftpfs_parse_long_list (struct vfs_class *me, struct vfs_s_inode *dir, GSList *buf, int *err_ret) { int err[number_of_parsers]; GSList *set[number_of_parsers]; /* arrays of struct vfs_s_entry */ diff --git a/src/vfs/local/local.c b/src/vfs/local/local.c index 193fb6b4a7..88450a568b 100644 --- a/src/vfs/local/local.c +++ b/src/vfs/local/local.c @@ -60,7 +60,7 @@ static struct vfs_class *vfs_local_ops = VFS_CLASS (&local_subclass); /* --------------------------------------------------------------------------------------------- */ static void * -local_open (const vfs_path_t * vpath, int flags, mode_t mode) +local_open (const vfs_path_t *vpath, int flags, mode_t mode) { int *local_info; int fd; @@ -80,7 +80,7 @@ local_open (const vfs_path_t * vpath, int flags, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static void * -local_opendir (const vfs_path_t * vpath) +local_opendir (const vfs_path_t *vpath) { DIR **local_info; DIR *dir = NULL; @@ -141,7 +141,7 @@ local_closedir (void *data) /* --------------------------------------------------------------------------------------------- */ static int -local_stat (const vfs_path_t * vpath, struct stat *buf) +local_stat (const vfs_path_t *vpath, struct stat *buf) { const char *path; @@ -152,7 +152,7 @@ local_stat (const vfs_path_t * vpath, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -local_lstat (const vfs_path_t * vpath, struct stat *buf) +local_lstat (const vfs_path_t *vpath, struct stat *buf) { const char *path; @@ -167,7 +167,7 @@ local_lstat (const vfs_path_t * vpath, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -local_chmod (const vfs_path_t * vpath, mode_t mode) +local_chmod (const vfs_path_t *vpath, mode_t mode) { const char *path; @@ -178,7 +178,7 @@ local_chmod (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -local_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) +local_chown (const vfs_path_t *vpath, uid_t owner, gid_t group) { const char *path; @@ -191,7 +191,7 @@ local_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) #ifdef ENABLE_EXT2FS_ATTR static int -local_fgetflags (const vfs_path_t * vpath, unsigned long *flags) +local_fgetflags (const vfs_path_t *vpath, unsigned long *flags) { const char *path; @@ -202,7 +202,7 @@ local_fgetflags (const vfs_path_t * vpath, unsigned long *flags) /* --------------------------------------------------------------------------------------------- */ static int -local_fsetflags (const vfs_path_t * vpath, unsigned long flags) +local_fsetflags (const vfs_path_t *vpath, unsigned long flags) { const char *path; @@ -215,7 +215,7 @@ local_fsetflags (const vfs_path_t * vpath, unsigned long flags) /* --------------------------------------------------------------------------------------------- */ static int -local_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) +local_utime (const vfs_path_t *vpath, mc_timesbuf_t *times) { int ret; const char *path; @@ -232,7 +232,7 @@ local_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) /* --------------------------------------------------------------------------------------------- */ static int -local_readlink (const vfs_path_t * vpath, char *buf, size_t size) +local_readlink (const vfs_path_t *vpath, char *buf, size_t size) { const char *path; @@ -243,7 +243,7 @@ local_readlink (const vfs_path_t * vpath, char *buf, size_t size) /* --------------------------------------------------------------------------------------------- */ static int -local_unlink (const vfs_path_t * vpath) +local_unlink (const vfs_path_t *vpath) { const char *path; @@ -254,7 +254,7 @@ local_unlink (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -local_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +local_symlink (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { const char *path1, *path2; @@ -295,7 +295,7 @@ local_write (void *data, const char *buf, size_t nbyte) /* --------------------------------------------------------------------------------------------- */ static int -local_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +local_rename (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { const char *path1, *path2; @@ -307,7 +307,7 @@ local_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) /* --------------------------------------------------------------------------------------------- */ static int -local_chdir (const vfs_path_t * vpath) +local_chdir (const vfs_path_t *vpath) { const char *path; @@ -318,7 +318,7 @@ local_chdir (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -local_mknod (const vfs_path_t * vpath, mode_t mode, dev_t dev) +local_mknod (const vfs_path_t *vpath, mode_t mode, dev_t dev) { const char *path; @@ -329,7 +329,7 @@ local_mknod (const vfs_path_t * vpath, mode_t mode, dev_t dev) /* --------------------------------------------------------------------------------------------- */ static int -local_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +local_link (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { const char *path1, *path2; @@ -341,7 +341,7 @@ local_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) /* --------------------------------------------------------------------------------------------- */ static int -local_mkdir (const vfs_path_t * vpath, mode_t mode) +local_mkdir (const vfs_path_t *vpath, mode_t mode) { const char *path; @@ -352,7 +352,7 @@ local_mkdir (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -local_rmdir (const vfs_path_t * vpath) +local_rmdir (const vfs_path_t *vpath) { const char *path; @@ -363,7 +363,7 @@ local_rmdir (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static vfs_path_t * -local_getlocalcopy (const vfs_path_t * vpath) +local_getlocalcopy (const vfs_path_t *vpath) { return vfs_path_clone (vpath); } @@ -371,7 +371,7 @@ local_getlocalcopy (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -local_ungetlocalcopy (const vfs_path_t * vpath, const vfs_path_t * local, gboolean has_changed) +local_ungetlocalcopy (const vfs_path_t *vpath, const vfs_path_t *local, gboolean has_changed) { (void) vpath; (void) local; diff --git a/src/vfs/sfs/sfs.c b/src/vfs/sfs/sfs.c index 7ebd2de19b..c7107f5d52 100644 --- a/src/vfs/sfs/sfs.c +++ b/src/vfs/sfs/sfs.c @@ -132,7 +132,7 @@ cachedfile_compare (const void *a, const void *b) /* --------------------------------------------------------------------------------------------- */ static int -sfs_vfmake (const vfs_path_t * vpath, vfs_path_t * cache_vpath) +sfs_vfmake (const vfs_path_t *vpath, vfs_path_t *cache_vpath) { int w; char pad[10240]; @@ -250,7 +250,7 @@ sfs_vfmake (const vfs_path_t * vpath, vfs_path_t * cache_vpath) /* --------------------------------------------------------------------------------------------- */ static const char * -sfs_redirect (const vfs_path_t * vpath) +sfs_redirect (const vfs_path_t *vpath) { GSList *cur; cachedfile *cf; @@ -292,7 +292,7 @@ sfs_redirect (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static void * -sfs_open (const vfs_path_t * vpath /*struct vfs_class *me, const char *path */ , int flags, +sfs_open (const vfs_path_t *vpath /*struct vfs_class *me, const char *path */ , int flags, mode_t mode) { int *info; @@ -311,7 +311,7 @@ sfs_open (const vfs_path_t * vpath /*struct vfs_class *me, const char *path */ , /* --------------------------------------------------------------------------------------------- */ static int -sfs_stat (const vfs_path_t * vpath, struct stat *buf) +sfs_stat (const vfs_path_t *vpath, struct stat *buf) { return stat (sfs_redirect (vpath), buf); } @@ -319,7 +319,7 @@ sfs_stat (const vfs_path_t * vpath, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -sfs_lstat (const vfs_path_t * vpath, struct stat *buf) +sfs_lstat (const vfs_path_t *vpath, struct stat *buf) { #ifndef HAVE_STATLSTAT return lstat (sfs_redirect (vpath), buf); @@ -331,7 +331,7 @@ sfs_lstat (const vfs_path_t * vpath, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -sfs_chmod (const vfs_path_t * vpath, mode_t mode) +sfs_chmod (const vfs_path_t *vpath, mode_t mode) { return chmod (sfs_redirect (vpath), mode); } @@ -339,7 +339,7 @@ sfs_chmod (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -sfs_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) +sfs_chown (const vfs_path_t *vpath, uid_t owner, gid_t group) { return chown (sfs_redirect (vpath), owner, group); } @@ -347,7 +347,7 @@ sfs_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) /* --------------------------------------------------------------------------------------------- */ static int -sfs_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) +sfs_utime (const vfs_path_t *vpath, mc_timesbuf_t *times) { #ifdef HAVE_UTIMENSAT return utimensat (AT_FDCWD, sfs_redirect (vpath), *times, 0); @@ -359,7 +359,7 @@ sfs_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) /* --------------------------------------------------------------------------------------------- */ static int -sfs_readlink (const vfs_path_t * vpath, char *buf, size_t size) +sfs_readlink (const vfs_path_t *vpath, char *buf, size_t size) { return readlink (sfs_redirect (vpath), buf, size); } @@ -367,7 +367,7 @@ sfs_readlink (const vfs_path_t * vpath, char *buf, size_t size) /* --------------------------------------------------------------------------------------------- */ static vfsid -sfs_getid (const vfs_path_t * vpath) +sfs_getid (const vfs_path_t *vpath) { GSList *cur; @@ -425,7 +425,7 @@ sfs_nothingisopen (vfsid id) /* --------------------------------------------------------------------------------------------- */ static vfs_path_t * -sfs_getlocalcopy (const vfs_path_t * vpath) +sfs_getlocalcopy (const vfs_path_t *vpath) { return vfs_path_from_str (sfs_redirect (vpath)); } @@ -433,7 +433,7 @@ sfs_getlocalcopy (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -sfs_ungetlocalcopy (const vfs_path_t * vpath, const vfs_path_t * local, gboolean has_changed) +sfs_ungetlocalcopy (const vfs_path_t *vpath, const vfs_path_t *local, gboolean has_changed) { (void) vpath; (void) local; diff --git a/src/vfs/sftpfs/config_parser.c b/src/vfs/sftpfs/config_parser.c index d899e374ad..622ac32663 100644 --- a/src/vfs/sftpfs/config_parser.c +++ b/src/vfs/sftpfs/config_parser.c @@ -102,7 +102,7 @@ static struct */ static void -sftpfs_ssh_config_entity_free (sftpfs_ssh_config_entity_t * config_entity) +sftpfs_ssh_config_entity_free (sftpfs_ssh_config_entity_t *config_entity) { g_free (config_entity->real_host); g_free (config_entity->user); @@ -130,6 +130,24 @@ sftpfs_correct_file_name (const char *filename) return vfs_path_free (vpath, FALSE); } +/* --------------------------------------------------------------------------------------------- */ +/** + * Try to expand remote hostname (%h) token. + * + * @param host hostname string provided by user + * @param real_host real hostname string retrieved from the corresponding HostName directive + * @return newly allocated string with possibly expanded hostname + */ + +static char * +sftpsfs_expand_hostname (const char *host, const char *real_host) +{ + if (g_str_has_prefix (real_host, "%h")) + return g_strconcat (host, real_host + 2, (char *) NULL); + + return g_strdup (real_host); +} + /* --------------------------------------------------------------------------------------------- */ #define POINTER_TO_STRUCTURE_MEMBER(type) \ @@ -143,7 +161,7 @@ sftpfs_correct_file_name (const char *filename) */ static void -sftpfs_fill_config_entity_from_string (sftpfs_ssh_config_entity_t * config_entity, char *buffer) +sftpfs_fill_config_entity_from_string (sftpfs_ssh_config_entity_t *config_entity, char *buffer) { int i; @@ -202,9 +220,9 @@ sftpfs_fill_config_entity_from_string (sftpfs_ssh_config_entity_t * config_entit */ static gboolean -sftpfs_fill_config_entity_from_config (FILE * ssh_config_handler, - sftpfs_ssh_config_entity_t * config_entity, - const vfs_path_element_t * vpath_element, GError ** mcerror) +sftpfs_fill_config_entity_from_config (FILE *ssh_config_handler, + sftpfs_ssh_config_entity_t *config_entity, + const vfs_path_element_t *vpath_element, GError **mcerror) { char buffer[BUF_MEDIUM]; gboolean host_block_hit = FALSE; @@ -295,7 +313,7 @@ sftpfs_fill_config_entity_from_config (FILE * ssh_config_handler, */ static sftpfs_ssh_config_entity_t * -sftpfs_get_config_entity (const vfs_path_element_t * vpath_element, GError ** mcerror) +sftpfs_get_config_entity (const vfs_path_element_t *vpath_element, GError **mcerror) { sftpfs_ssh_config_entity_t *config_entity; FILE *ssh_config_handler; @@ -352,7 +370,7 @@ sftpfs_get_config_entity (const vfs_path_element_t * vpath_element, GError ** mc */ void -sftpfs_fill_connection_data_from_config (struct vfs_s_super *super, GError ** mcerror) +sftpfs_fill_connection_data_from_config (struct vfs_s_super *super, GError **mcerror) { sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); sftpfs_ssh_config_entity_t *config_entity; @@ -376,7 +394,8 @@ sftpfs_fill_connection_data_from_config (struct vfs_s_super *super, GError ** mc if (config_entity->real_host != NULL) { g_free (super->path_element->host); - super->path_element->host = g_strdup (config_entity->real_host); + super->path_element->host = + sftpsfs_expand_hostname (super->path_element->host, config_entity->real_host); } if (config_entity->identity_file != NULL) diff --git a/src/vfs/sftpfs/connection.c b/src/vfs/sftpfs/connection.c index 6132675297..1d5690cecb 100644 --- a/src/vfs/sftpfs/connection.c +++ b/src/vfs/sftpfs/connection.c @@ -130,7 +130,7 @@ static const struct vfs_s_super *kbi_super = NULL; */ static int -sftpfs_open_socket (struct vfs_s_super *super, GError ** mcerror) +sftpfs_open_socket (struct vfs_s_super *super, GError **mcerror) { sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); struct addrinfo hints, *res = NULL, *curr_res; @@ -261,7 +261,7 @@ sftpfs_open_socket (struct vfs_s_super *super, GError ** mcerror) * Thanks the Curl project for the code used in this function. */ static gboolean -sftpfs_read_known_hosts (struct vfs_s_super *super, GError ** mcerror) +sftpfs_read_known_hosts (struct vfs_s_super *super, GError **mcerror) { sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); struct libssh2_knownhost *store = NULL; @@ -433,7 +433,7 @@ sftpfs_update_known_hosts (struct vfs_s_super *super, const char *remote_key, si * @return pointer to static buffer on success, NULL otherwise */ static const char * -sftpfs_compute_fingerprint_hash (LIBSSH2_SESSION * session) +sftpfs_compute_fingerprint_hash (LIBSSH2_SESSION *session) { static char result[SHA1_DIGEST_LENGTH * 3 + 1]; /* "XX:" for each byte, and EOL */ const char *fingerprint; @@ -465,7 +465,7 @@ sftpfs_compute_fingerprint_hash (LIBSSH2_SESSION * session) * Thanks the Curl project for the code used in this function. */ static gboolean -sftpfs_process_known_host (struct vfs_s_super *super, GError ** mcerror) +sftpfs_process_known_host (struct vfs_s_super *super, GError **mcerror) { sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); const char *remote_key; @@ -657,7 +657,7 @@ sftpfs_recognize_auth_types (struct vfs_s_super *super) */ static gboolean -sftpfs_open_connection_ssh_agent (struct vfs_s_super *super, GError ** mcerror) +sftpfs_open_connection_ssh_agent (struct vfs_s_super *super, GError **mcerror) { sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); struct libssh2_agent_publickey *identity, *prev_identity = NULL; @@ -709,7 +709,7 @@ sftpfs_open_connection_ssh_agent (struct vfs_s_super *super, GError ** mcerror) */ static gboolean -sftpfs_open_connection_ssh_key (struct vfs_s_super *super, GError ** mcerror) +sftpfs_open_connection_ssh_key (struct vfs_s_super *super, GError **mcerror) { sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); char *p, *passwd; @@ -784,7 +784,7 @@ LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC (sftpfs_keyboard_interactive_helper) len = strlen (kbi_passwd); for (i = 0; i < num_prompts; ++i) - if (strncmp (prompts[i].text, "Password: ", prompts[i].length) == 0) + if (memcmp (prompts[i].text, "Password: ", prompts[i].length) == 0) { responses[i].text = strdup (kbi_passwd); responses[i].length = len; @@ -801,7 +801,7 @@ LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC (sftpfs_keyboard_interactive_helper) */ static gboolean -sftpfs_open_connection_ssh_password (struct vfs_s_super *super, GError ** mcerror) +sftpfs_open_connection_ssh_password (struct vfs_s_super *super, GError **mcerror) { sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); char *p, *passwd; @@ -891,7 +891,7 @@ sftpfs_open_connection_ssh_password (struct vfs_s_super *super, GError ** mcerro */ int -sftpfs_open_connection (struct vfs_s_super *super, GError ** mcerror) +sftpfs_open_connection (struct vfs_s_super *super, GError **mcerror) { int rc; sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); @@ -966,7 +966,7 @@ sftpfs_open_connection (struct vfs_s_super *super, GError ** mcerror) */ void -sftpfs_close_connection (struct vfs_s_super *super, const char *shutdown_message, GError ** mcerror) +sftpfs_close_connection (struct vfs_s_super *super, const char *shutdown_message, GError **mcerror) { sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); diff --git a/src/vfs/sftpfs/dir.c b/src/vfs/sftpfs/dir.c index 53cb5532e4..34461e28d4 100644 --- a/src/vfs/sftpfs/dir.c +++ b/src/vfs/sftpfs/dir.c @@ -63,7 +63,7 @@ typedef struct */ void * -sftpfs_opendir (const vfs_path_t * vpath, GError ** mcerror) +sftpfs_opendir (const vfs_path_t *vpath, GError **mcerror) { sftpfs_dir_data_t *sftpfs_dir; sftpfs_super_t *sftpfs_super; @@ -108,7 +108,7 @@ sftpfs_opendir (const vfs_path_t * vpath, GError ** mcerror) */ struct vfs_dirent * -sftpfs_readdir (void *data, GError ** mcerror) +sftpfs_readdir (void *data, GError **mcerror) { char mem[BUF_MEDIUM]; LIBSSH2_SFTP_ATTRIBUTES attrs; @@ -141,7 +141,7 @@ sftpfs_readdir (void *data, GError ** mcerror) */ int -sftpfs_closedir (void *data, GError ** mcerror) +sftpfs_closedir (void *data, GError **mcerror) { int rc; sftpfs_dir_data_t *sftpfs_dir = (sftpfs_dir_data_t *) data; @@ -164,7 +164,7 @@ sftpfs_closedir (void *data, GError ** mcerror) */ int -sftpfs_mkdir (const vfs_path_t * vpath, mode_t mode, GError ** mcerror) +sftpfs_mkdir (const vfs_path_t *vpath, mode_t mode, GError **mcerror) { int res; sftpfs_super_t *sftpfs_super; @@ -201,7 +201,7 @@ sftpfs_mkdir (const vfs_path_t * vpath, mode_t mode, GError ** mcerror) */ int -sftpfs_rmdir (const vfs_path_t * vpath, GError ** mcerror) +sftpfs_rmdir (const vfs_path_t *vpath, GError **mcerror) { int res; sftpfs_super_t *sftpfs_super; diff --git a/src/vfs/sftpfs/file.c b/src/vfs/sftpfs/file.c index ab91b705f9..59db42777c 100644 --- a/src/vfs/sftpfs/file.c +++ b/src/vfs/sftpfs/file.c @@ -67,7 +67,7 @@ typedef struct * @param mcerror pointer to the error handler */ static void -sftpfs_reopen (vfs_file_handler_t * fh, GError ** mcerror) +sftpfs_reopen (vfs_file_handler_t *fh, GError **mcerror) { sftpfs_file_handler_t *file = SFTP_FILE_HANDLER (fh); int flags; @@ -85,7 +85,7 @@ sftpfs_reopen (vfs_file_handler_t * fh, GError ** mcerror) /* --------------------------------------------------------------------------------------------- */ static int -sftpfs_file__handle_error (sftpfs_super_t * super, int sftp_res, GError ** mcerror) +sftpfs_file__handle_error (sftpfs_super_t *super, int sftp_res, GError **mcerror) { if (sftpfs_is_sftp_error (super->sftp_session, sftp_res, LIBSSH2_FX_PERMISSION_DENIED)) return -EACCES; @@ -104,7 +104,7 @@ sftpfs_file__handle_error (sftpfs_super_t * super, int sftp_res, GError ** mcerr /* --------------------------------------------------------------------------------------------- */ vfs_file_handler_t * -sftpfs_fh_new (struct vfs_s_inode * ino, gboolean changed) +sftpfs_fh_new (struct vfs_s_inode *ino, gboolean changed) { sftpfs_file_handler_t *fh; @@ -126,7 +126,7 @@ sftpfs_fh_new (struct vfs_s_inode * ino, gboolean changed) */ gboolean -sftpfs_open_file (vfs_file_handler_t * fh, int flags, mode_t mode, GError ** mcerror) +sftpfs_open_file (vfs_file_handler_t *fh, int flags, mode_t mode, GError **mcerror) { unsigned long sftp_open_flags = 0; int sftp_open_mode = 0; @@ -220,7 +220,7 @@ sftpfs_open_file (vfs_file_handler_t * fh, int flags, mode_t mode, GError ** mce */ int -sftpfs_fstat (void *data, struct stat *buf, GError ** mcerror) +sftpfs_fstat (void *data, struct stat *buf, GError **mcerror) { int res; LIBSSH2_SFTP_ATTRIBUTES attrs; @@ -266,7 +266,7 @@ sftpfs_fstat (void *data, struct stat *buf, GError ** mcerror) */ ssize_t -sftpfs_read_file (vfs_file_handler_t * fh, char *buffer, size_t count, GError ** mcerror) +sftpfs_read_file (vfs_file_handler_t *fh, char *buffer, size_t count, GError **mcerror) { ssize_t rc; sftpfs_file_handler_t *file = SFTP_FILE_HANDLER (fh); @@ -316,7 +316,7 @@ sftpfs_read_file (vfs_file_handler_t * fh, char *buffer, size_t count, GError ** */ ssize_t -sftpfs_write_file (vfs_file_handler_t * fh, const char *buffer, size_t count, GError ** mcerror) +sftpfs_write_file (vfs_file_handler_t *fh, const char *buffer, size_t count, GError **mcerror) { ssize_t rc; sftpfs_file_handler_t *file = SFTP_FILE_HANDLER (fh); @@ -355,7 +355,7 @@ sftpfs_write_file (vfs_file_handler_t * fh, const char *buffer, size_t count, GE */ int -sftpfs_close_file (vfs_file_handler_t * fh, GError ** mcerror) +sftpfs_close_file (vfs_file_handler_t *fh, GError **mcerror) { int ret; @@ -380,7 +380,7 @@ sftpfs_close_file (vfs_file_handler_t * fh, GError ** mcerror) */ off_t -sftpfs_lseek (vfs_file_handler_t * fh, off_t offset, int whence, GError ** mcerror) +sftpfs_lseek (vfs_file_handler_t *fh, off_t offset, int whence, GError **mcerror) { sftpfs_file_handler_t *file = SFTP_FILE_HANDLER (fh); diff --git a/src/vfs/sftpfs/internal.c b/src/vfs/sftpfs/internal.c index dbf15cce05..a229de4037 100644 --- a/src/vfs/sftpfs/internal.c +++ b/src/vfs/sftpfs/internal.c @@ -77,7 +77,7 @@ sftpfs_blksize (struct stat *s) */ static int -sftpfs_internal_waitsocket (sftpfs_super_t * super, GError ** mcerror) +sftpfs_internal_waitsocket (sftpfs_super_t *super, GError **mcerror) { struct timeval timeout = { 10, 0 }; fd_set fd; @@ -114,9 +114,9 @@ sftpfs_internal_waitsocket (sftpfs_super_t * super, GError ** mcerror) /* --------------------------------------------------------------------------------------------- */ static int -sftpfs_stat_init (sftpfs_super_t ** super, const vfs_path_element_t ** path_element, - const vfs_path_t * vpath, GError ** mcerror, int stat_type, - LIBSSH2_SFTP_ATTRIBUTES * attrs) +sftpfs_stat_init (sftpfs_super_t **super, const vfs_path_element_t **path_element, + const vfs_path_t *vpath, GError **mcerror, int stat_type, + LIBSSH2_SFTP_ATTRIBUTES *attrs) { const GString *fixfname; int res; @@ -152,7 +152,7 @@ sftpfs_stat_init (sftpfs_super_t ** super, const vfs_path_element_t ** path_elem /* --------------------------------------------------------------------------------------------- */ gboolean -sftpfs_waitsocket (sftpfs_super_t * super, int sftp_res, GError ** mcerror) +sftpfs_waitsocket (sftpfs_super_t *super, int sftp_res, GError **mcerror) { if (sftp_res != LIBSSH2_ERROR_EAGAIN) { @@ -168,7 +168,7 @@ sftpfs_waitsocket (sftpfs_super_t * super, int sftp_res, GError ** mcerror) /* --------------------------------------------------------------------------------------------- */ gboolean -sftpfs_is_sftp_error (LIBSSH2_SFTP * sftp_session, int sftp_res, int sftp_error) +sftpfs_is_sftp_error (LIBSSH2_SFTP *sftp_session, int sftp_res, int sftp_error) { return (sftp_res == LIBSSH2_ERROR_SFTP_PROTOCOL && libssh2_sftp_last_error (sftp_session) == (unsigned long) sftp_error); @@ -184,7 +184,7 @@ sftpfs_is_sftp_error (LIBSSH2_SFTP * sftp_session, int sftp_res, int sftp_error) */ void -sftpfs_ssherror_to_gliberror (sftpfs_super_t * super, int libssh_errno, GError ** mcerror) +sftpfs_ssherror_to_gliberror (sftpfs_super_t *super, int libssh_errno, GError **mcerror) { char *err = NULL; int err_len; @@ -220,8 +220,8 @@ sftpfs_fix_filename (const char *file_name) /* --------------------------------------------------------------------------------------------- */ gboolean -sftpfs_op_init (sftpfs_super_t ** super, const vfs_path_element_t ** path_element, - const vfs_path_t * vpath, GError ** mcerror) +sftpfs_op_init (sftpfs_super_t **super, const vfs_path_element_t **path_element, + const vfs_path_t *vpath, GError **mcerror) { struct vfs_s_super *lc_super = NULL; @@ -245,7 +245,7 @@ sftpfs_op_init (sftpfs_super_t ** super, const vfs_path_element_t ** path_elemen /* --------------------------------------------------------------------------------------------- */ void -sftpfs_attr_to_stat (const LIBSSH2_SFTP_ATTRIBUTES * attrs, struct stat *s) +sftpfs_attr_to_stat (const LIBSSH2_SFTP_ATTRIBUTES *attrs, struct stat *s) { if ((attrs->flags & LIBSSH2_SFTP_ATTR_UIDGID) != 0) { @@ -284,7 +284,7 @@ sftpfs_attr_to_stat (const LIBSSH2_SFTP_ATTRIBUTES * attrs, struct stat *s) */ int -sftpfs_lstat (const vfs_path_t * vpath, struct stat *buf, GError ** mcerror) +sftpfs_lstat (const vfs_path_t *vpath, struct stat *buf, GError **mcerror) { sftpfs_super_t *super = NULL; const vfs_path_element_t *path_element = NULL; @@ -312,7 +312,7 @@ sftpfs_lstat (const vfs_path_t * vpath, struct stat *buf, GError ** mcerror) */ int -sftpfs_stat (const vfs_path_t * vpath, struct stat *buf, GError ** mcerror) +sftpfs_stat (const vfs_path_t *vpath, struct stat *buf, GError **mcerror) { sftpfs_super_t *super = NULL; const vfs_path_element_t *path_element = NULL; @@ -342,7 +342,7 @@ sftpfs_stat (const vfs_path_t * vpath, struct stat *buf, GError ** mcerror) */ int -sftpfs_readlink (const vfs_path_t * vpath, char *buf, size_t size, GError ** mcerror) +sftpfs_readlink (const vfs_path_t *vpath, char *buf, size_t size, GError **mcerror) { sftpfs_super_t *super = NULL; const vfs_path_element_t *path_element = NULL; @@ -381,7 +381,7 @@ sftpfs_readlink (const vfs_path_t * vpath, char *buf, size_t size, GError ** mce */ int -sftpfs_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2, GError ** mcerror) +sftpfs_symlink (const vfs_path_t *vpath1, const vfs_path_t *vpath2, GError **mcerror) { sftpfs_super_t *super = NULL; const vfs_path_element_t *path_element2 = NULL; @@ -434,7 +434,7 @@ sftpfs_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2, GError ** */ int -sftpfs_utime (const vfs_path_t * vpath, time_t atime, time_t mtime, GError ** mcerror) +sftpfs_utime (const vfs_path_t *vpath, time_t atime, time_t mtime, GError **mcerror) { sftpfs_super_t *super = NULL; const vfs_path_element_t *path_element = NULL; @@ -488,7 +488,7 @@ sftpfs_utime (const vfs_path_t * vpath, time_t atime, time_t mtime, GError ** mc */ int -sftpfs_chmod (const vfs_path_t * vpath, mode_t mode, GError ** mcerror) +sftpfs_chmod (const vfs_path_t *vpath, mode_t mode, GError **mcerror) { sftpfs_super_t *super = NULL; const vfs_path_element_t *path_element = NULL; @@ -540,7 +540,7 @@ sftpfs_chmod (const vfs_path_t * vpath, mode_t mode, GError ** mcerror) */ int -sftpfs_unlink (const vfs_path_t * vpath, GError ** mcerror) +sftpfs_unlink (const vfs_path_t *vpath, GError **mcerror) { sftpfs_super_t *super = NULL; const vfs_path_element_t *path_element = NULL; @@ -577,7 +577,7 @@ sftpfs_unlink (const vfs_path_t * vpath, GError ** mcerror) */ int -sftpfs_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2, GError ** mcerror) +sftpfs_rename (const vfs_path_t *vpath1, const vfs_path_t *vpath2, GError **mcerror) { sftpfs_super_t *super = NULL; const char *path1; diff --git a/src/vfs/sftpfs/sftpfs.c b/src/vfs/sftpfs/sftpfs.c index ba7d1697a9..fcc93470e7 100644 --- a/src/vfs/sftpfs/sftpfs.c +++ b/src/vfs/sftpfs/sftpfs.c @@ -104,7 +104,7 @@ sftpfs_cb_done (struct vfs_class *me) */ static void * -sftpfs_cb_open (const vfs_path_t * vpath, int flags, mode_t mode) +sftpfs_cb_open (const vfs_path_t *vpath, int flags, mode_t mode) { vfs_file_handler_t *fh; struct vfs_class *me; @@ -177,7 +177,7 @@ sftpfs_cb_open (const vfs_path_t * vpath, int flags, mode_t mode) */ static void * -sftpfs_cb_opendir (const vfs_path_t * vpath) +sftpfs_cb_opendir (const vfs_path_t *vpath) { GError *mcerror = NULL; void *ret_value; @@ -251,7 +251,7 @@ sftpfs_cb_closedir (void *data) */ static int -sftpfs_cb_lstat (const vfs_path_t * vpath, struct stat *buf) +sftpfs_cb_lstat (const vfs_path_t *vpath, struct stat *buf) { int rc; GError *mcerror = NULL; @@ -271,7 +271,7 @@ sftpfs_cb_lstat (const vfs_path_t * vpath, struct stat *buf) */ static int -sftpfs_cb_stat (const vfs_path_t * vpath, struct stat *buf) +sftpfs_cb_stat (const vfs_path_t *vpath, struct stat *buf) { int rc; GError *mcerror = NULL; @@ -312,7 +312,7 @@ sftpfs_cb_fstat (void *data, struct stat *buf) */ static int -sftpfs_cb_readlink (const vfs_path_t * vpath, char *buf, size_t size) +sftpfs_cb_readlink (const vfs_path_t *vpath, char *buf, size_t size) { int rc; GError *mcerror = NULL; @@ -332,7 +332,7 @@ sftpfs_cb_readlink (const vfs_path_t * vpath, char *buf, size_t size) */ static int -sftpfs_cb_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) +sftpfs_cb_utime (const vfs_path_t *vpath, mc_timesbuf_t *times) { int rc; GError *mcerror = NULL; @@ -360,7 +360,7 @@ sftpfs_cb_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) */ static int -sftpfs_cb_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +sftpfs_cb_symlink (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { int rc; GError *mcerror = NULL; @@ -381,7 +381,7 @@ sftpfs_cb_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) */ static int -sftpfs_cb_mknod (const vfs_path_t * vpath, mode_t mode, dev_t dev) +sftpfs_cb_mknod (const vfs_path_t *vpath, mode_t mode, dev_t dev) { (void) vpath; (void) mode; @@ -400,7 +400,7 @@ sftpfs_cb_mknod (const vfs_path_t * vpath, mode_t mode, dev_t dev) */ static int -sftpfs_cb_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +sftpfs_cb_link (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { (void) vpath1; (void) vpath2; @@ -419,7 +419,7 @@ sftpfs_cb_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) */ static int -sftpfs_cb_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) +sftpfs_cb_chown (const vfs_path_t *vpath, uid_t owner, gid_t group) { (void) vpath; (void) owner; @@ -519,7 +519,7 @@ sftpfs_cb_close (void *data) */ static int -sftpfs_cb_chmod (const vfs_path_t * vpath, mode_t mode) +sftpfs_cb_chmod (const vfs_path_t *vpath, mode_t mode) { int rc; GError *mcerror = NULL; @@ -539,7 +539,7 @@ sftpfs_cb_chmod (const vfs_path_t * vpath, mode_t mode) */ static int -sftpfs_cb_mkdir (const vfs_path_t * vpath, mode_t mode) +sftpfs_cb_mkdir (const vfs_path_t *vpath, mode_t mode) { int rc; GError *mcerror = NULL; @@ -558,7 +558,7 @@ sftpfs_cb_mkdir (const vfs_path_t * vpath, mode_t mode) */ static int -sftpfs_cb_rmdir (const vfs_path_t * vpath) +sftpfs_cb_rmdir (const vfs_path_t *vpath) { int rc; GError *mcerror = NULL; @@ -599,7 +599,7 @@ sftpfs_cb_lseek (void *data, off_t offset, int whence) */ static int -sftpfs_cb_unlink (const vfs_path_t * vpath) +sftpfs_cb_unlink (const vfs_path_t *vpath) { int rc; GError *mcerror = NULL; @@ -619,7 +619,7 @@ sftpfs_cb_unlink (const vfs_path_t * vpath) */ static int -sftpfs_cb_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +sftpfs_cb_rename (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { int rc; GError *mcerror = NULL; @@ -685,8 +685,8 @@ sftpfs_cb_fill_names (struct vfs_class *me, fill_names_f func) */ static gboolean -sftpfs_archive_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *super, - const vfs_path_t * vpath, void *cookie) +sftpfs_archive_same (const vfs_path_element_t *vpath_element, struct vfs_s_super *super, + const vfs_path_t *vpath, void *cookie) { int result; vfs_path_element_t *orig_connect_info; @@ -731,8 +731,8 @@ sftpfs_new_archive (struct vfs_class *me) */ static int -sftpfs_open_archive (struct vfs_s_super *super, const vfs_path_t * vpath, - const vfs_path_element_t * vpath_element) +sftpfs_open_archive (struct vfs_s_super *super, const vfs_path_t *vpath, + const vfs_path_element_t *vpath_element) { GError *mcerror = NULL; sftpfs_super_t *sftpfs_super = SFTP_SUPER (super); diff --git a/src/vfs/shell/shell.c b/src/vfs/shell/shell.c index 925f8161e7..96fe4fcf59 100644 --- a/src/vfs/shell/shell.c +++ b/src/vfs/shell/shell.c @@ -661,7 +661,7 @@ shell_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) static int shell_open_archive (struct vfs_s_super *super, - const vfs_path_t * vpath, const vfs_path_element_t * vpath_element) + const vfs_path_t *vpath, const vfs_path_element_t *vpath_element) { shell_super_t *shell_super = SHELL_SUPER (super); @@ -724,8 +724,8 @@ shell_open_archive (struct vfs_s_super *super, /* --------------------------------------------------------------------------------------------- */ static int -shell_archive_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *super, - const vfs_path_t * vpath, void *cookie) +shell_archive_same (const vfs_path_element_t *vpath_element, struct vfs_s_super *super, + const vfs_path_t *vpath, void *cookie) { vfs_path_element_t *path_element; int result; @@ -983,7 +983,7 @@ shell_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remot /* --------------------------------------------------------------------------------------------- */ static int -shell_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, char *localname) +shell_file_store (struct vfs_class *me, vfs_file_handler_t *fh, char *name, char *localname) { shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); @@ -1095,7 +1095,7 @@ shell_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, cha /* --------------------------------------------------------------------------------------------- */ static int -shell_linear_start (struct vfs_class *me, vfs_file_handler_t * fh, off_t offset) +shell_linear_start (struct vfs_class *me, vfs_file_handler_t *fh, off_t offset) { shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); @@ -1140,7 +1140,7 @@ shell_linear_start (struct vfs_class *me, vfs_file_handler_t * fh, off_t offset) /* --------------------------------------------------------------------------------------------- */ static void -shell_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh) +shell_linear_abort (struct vfs_class *me, vfs_file_handler_t *fh) { shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); @@ -1171,7 +1171,7 @@ shell_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh) /* --------------------------------------------------------------------------------------------- */ static ssize_t -shell_linear_read (struct vfs_class *me, vfs_file_handler_t * fh, void *buf, size_t len) +shell_linear_read (struct vfs_class *me, vfs_file_handler_t *fh, void *buf, size_t len) { shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); @@ -1199,7 +1199,7 @@ shell_linear_read (struct vfs_class *me, vfs_file_handler_t * fh, void *buf, siz /* --------------------------------------------------------------------------------------------- */ static void -shell_linear_close (struct vfs_class *me, vfs_file_handler_t * fh) +shell_linear_close (struct vfs_class *me, vfs_file_handler_t *fh) { shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); @@ -1244,7 +1244,7 @@ shell_ctl (void *fh, int ctlop, void *arg) /* --------------------------------------------------------------------------------------------- */ static int -shell_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +shell_rename (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { const char *crpath1, *crpath2; char *rpath1, *rpath2; @@ -1278,7 +1278,7 @@ shell_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) /* --------------------------------------------------------------------------------------------- */ static int -shell_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +shell_link (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { const char *crpath1, *crpath2; char *rpath1, *rpath2; @@ -1312,7 +1312,7 @@ shell_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) /* --------------------------------------------------------------------------------------------- */ static int -shell_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +shell_symlink (const vfs_path_t *vpath1, const vfs_path_t *vpath2) { char *qsetto; const char *crpath; @@ -1343,7 +1343,7 @@ shell_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) /* --------------------------------------------------------------------------------------------- */ static int -shell_stat (const vfs_path_t * vpath, struct stat *buf) +shell_stat (const vfs_path_t *vpath, struct stat *buf) { int ret; @@ -1355,7 +1355,7 @@ shell_stat (const vfs_path_t * vpath, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -shell_lstat (const vfs_path_t * vpath, struct stat *buf) +shell_lstat (const vfs_path_t *vpath, struct stat *buf) { int ret; @@ -1379,7 +1379,7 @@ shell_fstat (void *vfs_info, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -shell_chmod (const vfs_path_t * vpath, mode_t mode) +shell_chmod (const vfs_path_t *vpath, mode_t mode) { const char *crpath; char *rpath; @@ -1408,7 +1408,7 @@ shell_chmod (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -shell_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) +shell_chown (const vfs_path_t *vpath, uid_t owner, gid_t group) { char *sowner, *sgroup; struct passwd *pw; @@ -1452,7 +1452,7 @@ shell_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) /* --------------------------------------------------------------------------------------------- */ static void -shell_get_atime (mc_timesbuf_t * times, time_t * sec, long *nsec) +shell_get_atime (mc_timesbuf_t *times, time_t *sec, long *nsec) { #ifdef HAVE_UTIMENSAT *sec = (*times)[0].tv_sec; @@ -1466,7 +1466,7 @@ shell_get_atime (mc_timesbuf_t * times, time_t * sec, long *nsec) /* --------------------------------------------------------------------------------------------- */ static void -shell_get_mtime (mc_timesbuf_t * times, time_t * sec, long *nsec) +shell_get_mtime (mc_timesbuf_t *times, time_t *sec, long *nsec) { #ifdef HAVE_UTIMENSAT *sec = (*times)[1].tv_sec; @@ -1480,7 +1480,7 @@ shell_get_mtime (mc_timesbuf_t * times, time_t * sec, long *nsec) /* --------------------------------------------------------------------------------------------- */ static int -shell_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) +shell_utime (const vfs_path_t *vpath, mc_timesbuf_t *times) { char utcatime[16], utcmtime[16]; char utcatime_w_nsec[30], utcmtime_w_nsec[30]; @@ -1533,7 +1533,7 @@ shell_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) /* --------------------------------------------------------------------------------------------- */ static int -shell_unlink (const vfs_path_t * vpath) +shell_unlink (const vfs_path_t *vpath) { const char *crpath; char *rpath; @@ -1561,7 +1561,7 @@ shell_unlink (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -shell_exists (const vfs_path_t * vpath) +shell_exists (const vfs_path_t *vpath) { const char *crpath; char *rpath; @@ -1589,7 +1589,7 @@ shell_exists (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -shell_mkdir (const vfs_path_t * vpath, mode_t mode) +shell_mkdir (const vfs_path_t *vpath, mode_t mode) { const char *crpath; char *rpath; @@ -1626,7 +1626,7 @@ shell_mkdir (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -shell_rmdir (const vfs_path_t * vpath) +shell_rmdir (const vfs_path_t *vpath) { const char *crpath; char *rpath; @@ -1667,7 +1667,7 @@ shell_fh_new (struct vfs_s_inode *ino, gboolean changed) /* --------------------------------------------------------------------------------------------- */ static int -shell_fh_open (struct vfs_class *me, vfs_file_handler_t * fh, int flags, mode_t mode) +shell_fh_open (struct vfs_class *me, vfs_file_handler_t *fh, int flags, mode_t mode) { shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); @@ -1747,7 +1747,7 @@ shell_fill_names (struct vfs_class *me, fill_names_f func) /* --------------------------------------------------------------------------------------------- */ static void * -shell_open (const vfs_path_t * vpath, int flags, mode_t mode) +shell_open (const vfs_path_t *vpath, int flags, mode_t mode) { /* sorry, i've places hack here diff --git a/src/vfs/tar/tar-internal.c b/src/vfs/tar/tar-internal.c index 263f645635..eb5be930c3 100644 --- a/src/vfs/tar/tar-internal.c +++ b/src/vfs/tar/tar-internal.c @@ -74,7 +74,7 @@ static char base64_map[1 + (unsigned char) (-1)]; /* --------------------------------------------------------------------------------------------- */ static gboolean -tar_short_read (size_t status, tar_super_t * archive) +tar_short_read (size_t status, tar_super_t *archive) { size_t left; /* bytes left */ char *more; /* pointer to next byte to read */ @@ -110,7 +110,7 @@ tar_short_read (size_t status, tar_super_t * archive) /* --------------------------------------------------------------------------------------------- */ static gboolean -tar_flush_read (tar_super_t * archive) +tar_flush_read (tar_super_t *archive) { size_t status; @@ -126,7 +126,7 @@ tar_flush_read (tar_super_t * archive) /** Flush the current buffer from the archive. */ static gboolean -tar_flush_archive (tar_super_t * archive) +tar_flush_archive (tar_super_t *archive) { record_start_block += record_end - archive->record_start; current_block = archive->record_start; @@ -138,7 +138,7 @@ tar_flush_archive (tar_super_t * archive) /* --------------------------------------------------------------------------------------------- */ static off_t -tar_seek_archive (tar_super_t * archive, off_t size) +tar_seek_archive (tar_super_t *archive, off_t size) { off_t start, offset; off_t nrec, nblk; @@ -410,7 +410,7 @@ off_from_header (const char *p, size_t s) * Return NULL for EOF. */ union block * -tar_find_next_block (tar_super_t * archive) +tar_find_next_block (tar_super_t *archive) { if (current_block == record_end) { @@ -439,7 +439,7 @@ tar_find_next_block (tar_super_t * archive) * Indicate that we have used all blocks up thru @block. */ gboolean -tar_set_next_block_after (union block * block) +tar_set_next_block_after (union block *block) { while (block >= current_block) current_block++; @@ -457,7 +457,7 @@ tar_set_next_block_after (union block * block) * Compute and return the block ordinal at current_block. */ off_t -tar_current_block_ordinal (const tar_super_t * archive) +tar_current_block_ordinal (const tar_super_t *archive) { return record_start_block + (current_block - archive->record_start); } @@ -468,7 +468,7 @@ tar_current_block_ordinal (const tar_super_t * archive) * Skip over @size bytes of data in blocks in the archive. */ gboolean -tar_skip_file (tar_super_t * archive, off_t size) +tar_skip_file (tar_super_t *archive, off_t size) { union block *x; off_t nblk; diff --git a/src/vfs/tar/tar-sparse.c b/src/vfs/tar/tar-sparse.c index 9795d1586e..dcc7a20037 100644 --- a/src/vfs/tar/tar-sparse.c +++ b/src/vfs/tar/tar-sparse.c @@ -365,7 +365,7 @@ static struct tar_sparse_optab const pax_optab = { /* --------------------------------------------------------------------------------------------- */ static gboolean -decode_num (uintmax_t * num, const char *arg, uintmax_t maxval) +decode_num (uintmax_t *num, const char *arg, uintmax_t maxval) { uintmax_t u; char *arg_lim; @@ -386,7 +386,7 @@ decode_num (uintmax_t * num, const char *arg, uintmax_t maxval) /* --------------------------------------------------------------------------------------------- */ static gboolean -sparse_select_optab (const tar_super_t * archive, struct tar_sparse_file *file) +sparse_select_optab (const tar_super_t *archive, struct tar_sparse_file *file) { switch (archive->type) { @@ -417,7 +417,7 @@ sparse_select_optab (const tar_super_t * archive, struct tar_sparse_file *file) /* --------------------------------------------------------------------------------------------- */ static gboolean -sparse_init (tar_super_t * archive, struct tar_sparse_file *file) +sparse_init (tar_super_t *archive, struct tar_sparse_file *file) { memset (file, 0, sizeof (*file)); @@ -466,7 +466,7 @@ sparse_fixup_header (struct tar_sparse_file *file) /* --------------------------------------------------------------------------------------------- */ static gboolean -sparse_decode_header (tar_super_t * archive, struct tar_sparse_file *file) +sparse_decode_header (tar_super_t *archive, struct tar_sparse_file *file) { if (file->optab->decode_header != NULL) return file->optab->decode_header (archive, file); @@ -543,7 +543,7 @@ oldgnu_fixup_header (struct tar_sparse_file *file) * Convert old GNU format sparse data to internal representation. */ static gboolean -oldgnu_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file) +oldgnu_get_sparse_info (tar_super_t *archive, struct tar_sparse_file *file) { size_t i; union block *h = current_header; @@ -608,7 +608,7 @@ star_fixup_header (struct tar_sparse_file *file) * Convert STAR format sparse data to internal representation */ static gboolean -star_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file) +star_get_sparse_info (tar_super_t *archive, struct tar_sparse_file *file) { size_t i; union block *h = current_header; @@ -660,7 +660,7 @@ pax_sparse_member_p (struct tar_sparse_file *file) /* --------------------------------------------------------------------------------------------- */ static gboolean -pax_decode_header (tar_super_t * archive, struct tar_sparse_file *file) +pax_decode_header (tar_super_t *archive, struct tar_sparse_file *file) { if (file->stat_info->sparse_major > 0) { @@ -730,7 +730,7 @@ pax_decode_header (tar_super_t * archive, struct tar_sparse_file *file) /* --------------------------------------------------------------------------------------------- */ gboolean -tar_sparse_member_p (tar_super_t * archive, struct tar_stat_info * st) +tar_sparse_member_p (tar_super_t *archive, struct tar_stat_info *st) { struct tar_sparse_file file; @@ -744,7 +744,7 @@ tar_sparse_member_p (tar_super_t * archive, struct tar_stat_info * st) /* --------------------------------------------------------------------------------------------- */ gboolean -tar_sparse_fixup_header (tar_super_t * archive, struct tar_stat_info * st) +tar_sparse_fixup_header (tar_super_t *archive, struct tar_stat_info *st) { struct tar_sparse_file file; @@ -758,7 +758,7 @@ tar_sparse_fixup_header (tar_super_t * archive, struct tar_stat_info * st) /* --------------------------------------------------------------------------------------------- */ enum dump_status -tar_sparse_skip_file (tar_super_t * archive, struct tar_stat_info *st) +tar_sparse_skip_file (tar_super_t *archive, struct tar_stat_info *st) { gboolean rc = TRUE; struct tar_sparse_file file; diff --git a/src/vfs/tar/tar-xheader.c b/src/vfs/tar/tar-xheader.c index c4c79de2a6..d559031ed2 100644 --- a/src/vfs/tar/tar-xheader.c +++ b/src/vfs/tar/tar-xheader.c @@ -278,7 +278,7 @@ keyword_item_free (gpointer data) /* --------------------------------------------------------------------------------------------- */ static void -xheader_list_append (GSList ** root, const char *kw, const char *value) +xheader_list_append (GSList **root, const char *kw, const char *value) { struct keyword_item *kp; @@ -291,7 +291,7 @@ xheader_list_append (GSList ** root, const char *kw, const char *value) /* --------------------------------------------------------------------------------------------- */ static inline void -xheader_list_destroy (GSList ** root) +xheader_list_destroy (GSList **root) { g_slist_free_full (*root, keyword_item_free); *root = NULL; @@ -300,7 +300,7 @@ xheader_list_destroy (GSList ** root) /* --------------------------------------------------------------------------------------------- */ static inline void -run_override_list (GSList * kp, struct tar_stat_info *st) +run_override_list (GSList *kp, struct tar_stat_info *st) { g_slist_foreach (kp, (GFunc) keyword_item_run, st); } @@ -424,7 +424,7 @@ decode_time (struct timespec *ts, const char *arg, const char *keyword) /* --------------------------------------------------------------------------------------------- */ static gboolean -decode_signed_num (intmax_t * num, const char *arg, intmax_t minval, uintmax_t maxval, +decode_signed_num (intmax_t *num, const char *arg, intmax_t minval, uintmax_t maxval, const char *keyword) { char *arg_lim; @@ -450,7 +450,7 @@ decode_signed_num (intmax_t * num, const char *arg, intmax_t minval, uintmax_t m /* --------------------------------------------------------------------------------------------- */ static gboolean -decode_num (uintmax_t * num, const char *arg, uintmax_t maxval, const char *keyword) +decode_num (uintmax_t *num, const char *arg, uintmax_t maxval, const char *keyword) { intmax_t i; @@ -958,7 +958,7 @@ sparse_map_decoder (struct tar_stat_info *st, const char *keyword, const char *a * @return TRUE on success, FALSE otherwize */ gboolean -tar_xheader_decode (struct tar_stat_info * st) +tar_xheader_decode (struct tar_stat_info *st) { char *p; enum decode_record_status status; @@ -989,7 +989,7 @@ tar_xheader_decode (struct tar_stat_info * st) /* --------------------------------------------------------------------------------------------- */ gboolean -tar_xheader_read (tar_super_t * archive, struct xheader * xhdr, union block * p, off_t size) +tar_xheader_read (tar_super_t *archive, struct xheader *xhdr, union block *p, off_t size) { size_t j = 0; @@ -1024,7 +1024,7 @@ tar_xheader_read (tar_super_t * archive, struct xheader * xhdr, union block * p, /* --------------------------------------------------------------------------------------------- */ gboolean -tar_xheader_decode_global (struct xheader * xhdr) +tar_xheader_decode_global (struct xheader *xhdr) { char *p; gboolean ret; diff --git a/src/vfs/tar/tar.c b/src/vfs/tar/tar.c index 4ce6494e0e..ab00c5c123 100644 --- a/src/vfs/tar/tar.c +++ b/src/vfs/tar/tar.c @@ -201,7 +201,7 @@ minor_from_header (const char *p, size_t s) * Set *hbits if there are any unrecognized bits. * */ static inline mode_t -mode_from_header (const char *p, size_t s, gboolean * hbits) +mode_from_header (const char *p, size_t s, gboolean *hbits) { unsigned int u; mode_t mode; @@ -268,7 +268,7 @@ tar_calc_sparse_offsets (struct vfs_s_inode *inode) /* --------------------------------------------------------------------------------------------- */ static gboolean -tar_skip_member (tar_super_t * archive, struct vfs_s_inode *inode) +tar_skip_member (tar_super_t *archive, struct vfs_s_inode *inode) { char save_typeflag; @@ -370,7 +370,7 @@ tar_checksum (const union block *header) /* --------------------------------------------------------------------------------------------- */ static void -tar_decode_header (union block *header, tar_super_t * arch) +tar_decode_header (union block *header, tar_super_t *arch) { gboolean hbits = FALSE; @@ -897,7 +897,7 @@ tar_free_archive (struct vfs_class *me, struct vfs_s_super *archive) /* Returns status of the tar archive open */ static gboolean -tar_open_archive_int (struct vfs_class *me, const vfs_path_t * vpath, struct vfs_s_super *archive) +tar_open_archive_int (struct vfs_class *me, const vfs_path_t *vpath, struct vfs_s_super *archive) { tar_super_t *arch = TAR_SUPER (archive); int result, type; @@ -965,8 +965,8 @@ tar_open_archive_int (struct vfs_class *me, const vfs_path_t * vpath, struct vfs * Returns 0 on success, -1 on error. */ static int -tar_open_archive (struct vfs_s_super *archive, const vfs_path_t * vpath, - const vfs_path_element_t * vpath_element) +tar_open_archive (struct vfs_s_super *archive, const vfs_path_t *vpath, + const vfs_path_element_t *vpath_element) { tar_super_t *arch = TAR_SUPER (archive); /* Initial status at start of archive */ @@ -1046,7 +1046,7 @@ tar_open_archive (struct vfs_s_super *archive, const vfs_path_t * vpath, /* --------------------------------------------------------------------------------------------- */ static void * -tar_super_check (const vfs_path_t * vpath) +tar_super_check (const vfs_path_t *vpath) { static struct stat stat_buf; int stat_result; @@ -1059,8 +1059,8 @@ tar_super_check (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -tar_super_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *parc, - const vfs_path_t * vpath, void *cookie) +tar_super_same (const vfs_path_element_t *vpath_element, struct vfs_s_super *parc, + const vfs_path_t *vpath, void *cookie) { struct stat *archive_stat = cookie; /* stat of main archive */ @@ -1100,7 +1100,7 @@ tar_super_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *pa */ static ssize_t -tar_get_sparse_chunk_idx (const GArray * sparse_map, off_t offset) +tar_get_sparse_chunk_idx (const GArray *sparse_map, off_t offset) { size_t k; @@ -1126,7 +1126,7 @@ tar_get_sparse_chunk_idx (const GArray * sparse_map, off_t offset) /* --------------------------------------------------------------------------------------------- */ static ssize_t -tar_read_sparse (vfs_file_handler_t * fh, char *buffer, size_t count) +tar_read_sparse (vfs_file_handler_t *fh, char *buffer, size_t count) { int fd = TAR_SUPER (fh->ino->super)->fd; const GArray *sm = (const GArray *) fh->ino->user_data; @@ -1169,7 +1169,7 @@ tar_read_sparse (vfs_file_handler_t * fh, char *buffer, size_t count) /* --------------------------------------------------------------------------------------------- */ static off_t -tar_lseek_sparse (vfs_file_handler_t * fh, off_t offset) +tar_lseek_sparse (vfs_file_handler_t *fh, off_t offset) { off_t saved_offset = offset; int fd = TAR_SUPER (fh->ino->super)->fd; @@ -1260,7 +1260,7 @@ tar_read (void *fh, char *buffer, size_t count) /* --------------------------------------------------------------------------------------------- */ static int -tar_fh_open (struct vfs_class *me, vfs_file_handler_t * fh, int flags, mode_t mode) +tar_fh_open (struct vfs_class *me, vfs_file_handler_t *fh, int flags, mode_t mode) { (void) fh; (void) mode; diff --git a/src/vfs/undelfs/undelfs.c b/src/vfs/undelfs/undelfs.c index e480040f96..6292612738 100644 --- a/src/vfs/undelfs/undelfs.c +++ b/src/vfs/undelfs/undelfs.c @@ -146,7 +146,7 @@ undelfs_shutdown (void) /* --------------------------------------------------------------------------------------------- */ static void -undelfs_get_path (const vfs_path_t * vpath, char **fsname, char **file) +undelfs_get_path (const vfs_path_t *vpath, char **fsname, char **file) { const char *p, *dirname; @@ -198,7 +198,7 @@ undelfs_get_path (const vfs_path_t * vpath, char **fsname, char **file) /* --------------------------------------------------------------------------------------------- */ static int -undelfs_lsdel_proc (ext2_filsys _fs, blk_t * block_nr, int blockcnt, void *private) +undelfs_lsdel_proc (ext2_filsys _fs, blk_t *block_nr, int blockcnt, void *private) { struct lsdel_struct *_lsd = (struct lsdel_struct *) private; (void) blockcnt; @@ -330,7 +330,7 @@ undelfs_loaddel (void) /* --------------------------------------------------------------------------------------------- */ static void * -undelfs_opendir (const vfs_path_t * vpath) +undelfs_opendir (const vfs_path_t *vpath) { char *file, *f = NULL; const char *class_name; @@ -430,7 +430,7 @@ undelfs_closedir (void *vfs_info) /* We do not support lseek */ static void * -undelfs_open (const vfs_path_t * vpath, int flags, mode_t mode) +undelfs_open (const vfs_path_t *vpath, int flags, mode_t mode) { char *file, *f = NULL; ext2_ino_t inode, i; @@ -505,7 +505,7 @@ undelfs_close (void *vfs_info) /* --------------------------------------------------------------------------------------------- */ static int -undelfs_dump_read (ext2_filsys param_fs, blk_t * blocknr, int blockcnt, void *private) +undelfs_dump_read (ext2_filsys param_fs, blk_t *blocknr, int blockcnt, void *private) { int copy_count; undelfs_file *p = (undelfs_file *) private; @@ -643,7 +643,7 @@ undelfs_stat_int (int inode_index, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -undelfs_lstat (const vfs_path_t * vpath, struct stat *buf) +undelfs_lstat (const vfs_path_t *vpath, struct stat *buf) { int inode_index; char *file, *f = NULL; @@ -698,7 +698,7 @@ undelfs_fstat (void *vfs_info, struct stat *buf) /* --------------------------------------------------------------------------------------------- */ static int -undelfs_chdir (const vfs_path_t * vpath) +undelfs_chdir (const vfs_path_t *vpath) { char *file, *f = NULL; int fd; @@ -743,7 +743,7 @@ undelfs_lseek (void *vfs_info, off_t offset, int whence) /* --------------------------------------------------------------------------------------------- */ static vfsid -undelfs_getid (const vfs_path_t * vpath) +undelfs_getid (const vfs_path_t *vpath) { char *fname = NULL, *fsname; gboolean ok; diff --git a/src/viewer/actions_cmd.c b/src/viewer/actions_cmd.c index 453eb78f55..b098086044 100644 --- a/src/viewer/actions_cmd.c +++ b/src/viewer/actions_cmd.c @@ -85,7 +85,7 @@ /* --------------------------------------------------------------------------------------------- */ static void -mcview_remove_ext_script (WView * view) +mcview_remove_ext_script (WView *view) { if (view->ext_script != NULL) { @@ -99,7 +99,7 @@ mcview_remove_ext_script (WView * view) /* Both views */ static void -mcview_search (WView * view, gboolean start_search) +mcview_search (WView *view, gboolean start_search) { off_t want_search_start = view->search_start; @@ -132,7 +132,7 @@ mcview_search (WView * view, gboolean start_search) /* --------------------------------------------------------------------------------------------- */ static void -mcview_continue_search_cmd (WView * view) +mcview_continue_search_cmd (WView *view) { if (view->last_search_string != NULL) mcview_search (view, FALSE); @@ -196,7 +196,7 @@ mcview_hook (void *v) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -mcview_handle_editkey (WView * view, int key) +mcview_handle_editkey (WView *view, int key) { struct hexedit_change_node *node; int byte_val = -1; @@ -263,7 +263,7 @@ mcview_handle_editkey (WView * view, int key) /* --------------------------------------------------------------------------------------------- */ static void -mcview_load_next_prev_init (WView * view) +mcview_load_next_prev_init (WView *view) { if (mc_global.mc_run_mode != MC_RUN_VIEWER) { @@ -317,7 +317,7 @@ mcview_load_next_prev_init (WView * view) /* --------------------------------------------------------------------------------------------- */ static void -mcview_scan_for_file (WView * view, int direction) +mcview_scan_for_file (WView *view, int direction) { int i; @@ -337,7 +337,7 @@ mcview_scan_for_file (WView * view, int direction) /* --------------------------------------------------------------------------------------------- */ static void -mcview_load_next_prev (WView * view, int direction) +mcview_load_next_prev (WView *view, int direction) { dir_list *dir; int *dir_idx; @@ -371,7 +371,7 @@ mcview_load_next_prev (WView * view, int direction) /* --------------------------------------------------------------------------------------------- */ static void -mcview_load_file_from_history (WView * view) +mcview_load_file_from_history (WView *view) { char *filename; int action; @@ -395,7 +395,7 @@ mcview_load_file_from_history (WView * view) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -mcview_execute_cmd (WView * view, long command) +mcview_execute_cmd (WView *view, long command) { int res = MSG_HANDLED; @@ -564,7 +564,7 @@ mcview_execute_cmd (WView * view, long command) /* --------------------------------------------------------------------------------------------- */ static long -mcview_lookup_key (WView * view, int key) +mcview_lookup_key (WView *view, int key) { if (view->mode_flags.hex) return keybind_lookup_keymap_command (view->hex_keymap, key); @@ -575,7 +575,7 @@ mcview_lookup_key (WView * view, int key) /* --------------------------------------------------------------------------------------------- */ /** Both views */ static cb_ret_t -mcview_handle_key (WView * view, int key) +mcview_handle_key (WView *view, int key) { long command; @@ -609,7 +609,7 @@ mcview_handle_key (WView * view, int key) /* --------------------------------------------------------------------------------------------- */ static inline void -mcview_resize (WView * view) +mcview_resize (WView *view) { view->dpy_wrap_dirty = TRUE; mcview_compute_areas (view); @@ -619,7 +619,7 @@ mcview_resize (WView * view) /* --------------------------------------------------------------------------------------------- */ static gboolean -mcview_ok_to_quit (WView * view) +mcview_ok_to_quit (WView *view) { int r; @@ -660,7 +660,7 @@ mcview_ok_to_quit (WView * view) /* --------------------------------------------------------------------------------------------- */ cb_ret_t -mcview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +mcview_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WView *view = (WView *) w; cb_ret_t i; @@ -748,7 +748,7 @@ mcview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void * /* --------------------------------------------------------------------------------------------- */ cb_ret_t -mcview_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +mcview_dialog_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { WDialog *h = DIALOG (w); WView *view; diff --git a/src/viewer/ascii.c b/src/viewer/ascii.c index c406feb5c1..ffe7d6db1f 100644 --- a/src/viewer/ascii.c +++ b/src/viewer/ascii.c @@ -200,7 +200,7 @@ /* TODO: These methods shouldn't be necessary, see ticket 3257 */ static int -mcview_wcwidth (const WView * view, int c) +mcview_wcwidth (const WView *view, int c) { #ifdef HAVE_CHARSET if (view->utf8) @@ -220,7 +220,7 @@ mcview_wcwidth (const WView * view, int c) /* --------------------------------------------------------------------------------------------- */ static gboolean -mcview_ismark (const WView * view, int c) +mcview_ismark (const WView *view, int c) { #ifdef HAVE_CHARSET if (view->utf8) @@ -236,7 +236,7 @@ mcview_ismark (const WView * view, int c) /* actually is_non_spacing_mark_or_enclosing_mark */ static gboolean -mcview_is_non_spacing_mark (const WView * view, int c) +mcview_is_non_spacing_mark (const WView *view, int c) { #ifdef HAVE_CHARSET if (view->utf8) @@ -258,7 +258,7 @@ mcview_is_non_spacing_mark (const WView * view, int c) #if 0 static gboolean -mcview_is_spacing_mark (const WView * view, int c) +mcview_is_spacing_mark (const WView *view, int c) { #ifdef HAVE_CHARSET if (view->utf8) @@ -274,7 +274,7 @@ mcview_is_spacing_mark (const WView * view, int c) /* --------------------------------------------------------------------------------------------- */ static gboolean -mcview_isprint (const WView * view, int c) +mcview_isprint (const WView *view, int c) { #ifdef HAVE_CHARSET if (!view->utf8) @@ -290,7 +290,7 @@ mcview_isprint (const WView * view, int c) /* --------------------------------------------------------------------------------------------- */ static int -mcview_char_display (const WView * view, int c, char *s) +mcview_char_display (const WView *view, int c, char *s) { #ifdef HAVE_CHARSET if (mc_global.utf8_display) @@ -343,7 +343,7 @@ mcview_char_display (const WView * view, int c, char *s) * TODO: move it to lower layers (datasource.c)? */ static gboolean -mcview_get_next_char (WView * view, mcview_state_machine_t * state, int *c) +mcview_get_next_char (WView *view, mcview_state_machine_t *state, int *c) { /* Pretend EOF if we reached force_max */ if (view->force_max >= 0 && state->offset >= view->force_max) @@ -390,7 +390,7 @@ mcview_get_next_char (WView * view, mcview_state_machine_t * state, int *c) * color can be null if the caller doesn't care. */ static gboolean -mcview_get_next_maybe_nroff_char (WView * view, mcview_state_machine_t * state, int *c, int *color) +mcview_get_next_maybe_nroff_char (WView *view, mcview_state_machine_t *state, int *c, int *color) { mcview_state_machine_t state_after_nroff; int c2, c3; @@ -473,7 +473,7 @@ mcview_get_next_maybe_nroff_char (WView * view, mcview_state_machine_t * state, * @return the number of entries placed in cs, or 0 on EOF */ static int -mcview_next_combining_char_sequence (WView * view, mcview_state_machine_t * state, int *cs, +mcview_next_combining_char_sequence (WView *view, mcview_state_machine_t *state, int *cs, int clen, int *color) { int i = 1; @@ -572,8 +572,8 @@ mcview_next_combining_char_sequence (WView * view, mcview_state_machine_t * stat * @return the number of rows, that is, 0 if we were already at EOF, otherwise 1 */ static int -mcview_display_line (WView * view, mcview_state_machine_t * state, int row, - gboolean * paragraph_ended, off_t * linewidth) +mcview_display_line (WView *view, mcview_state_machine_t *state, int row, + gboolean *paragraph_ended, off_t *linewidth) { const WRect *r = &view->data_area; off_t dpy_text_column = view->mode_flags.wrap ? 0 : view->dpy_text_column; @@ -764,7 +764,7 @@ mcview_display_line (WView * view, mcview_state_machine_t * state, int row, * viewport, it's not counted how many more lines the paragraph would occupy */ static int -mcview_display_paragraph (WView * view, mcview_state_machine_t * state, int row) +mcview_display_paragraph (WView *view, mcview_state_machine_t *state, int row) { int lines = 0; @@ -800,7 +800,7 @@ mcview_display_paragraph (WView * view, mcview_state_machine_t * state, int row) * vertical position, in that case move to its last row. */ static void -mcview_wrap_fixup (WView * view) +mcview_wrap_fixup (WView *view) { int lines = view->dpy_paragraph_skip_lines; @@ -844,7 +844,7 @@ mcview_wrap_fixup (WView * view) * case dpy_state_top is invalid and we need to recompute first. */ void -mcview_display_text (WView * view) +mcview_display_text (WView *view) { const WRect *r = &view->data_area; int row; @@ -916,7 +916,7 @@ mcview_display_text (WView * view) * the bottom of mcview_ascii_move_up()) which invalidate this value. */ void -mcview_ascii_move_down (WView * view, off_t lines) +mcview_ascii_move_down (WView *view, off_t lines) { while (lines-- != 0) { @@ -965,7 +965,7 @@ mcview_ascii_move_down (WView * view, off_t lines) * changes, we don't want to endlessly consume a file of maybe full of zeros upon moving upwards. */ void -mcview_ascii_move_up (WView * view, off_t lines) +mcview_ascii_move_up (WView *view, off_t lines) { if (!view->mode_flags.wrap) { @@ -1015,7 +1015,7 @@ mcview_ascii_move_up (WView * view, off_t lines) /* --------------------------------------------------------------------------------------------- */ void -mcview_ascii_moveto_bol (WView * view) +mcview_ascii_moveto_bol (WView *view) { if (!view->mode_flags.wrap) view->dpy_text_column = 0; @@ -1024,7 +1024,7 @@ mcview_ascii_moveto_bol (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_ascii_moveto_eol (WView * view) +mcview_ascii_moveto_eol (WView *view) { if (!view->mode_flags.wrap) { @@ -1041,7 +1041,7 @@ mcview_ascii_moveto_eol (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_state_machine_init (mcview_state_machine_t * state, off_t offset) +mcview_state_machine_init (mcview_state_machine_t *state, off_t offset) { memset (state, 0, sizeof (*state)); state->offset = offset; diff --git a/src/viewer/coord_cache.c b/src/viewer/coord_cache.c index 2ea23c2253..2882ca3a49 100644 --- a/src/viewer/coord_cache.c +++ b/src/viewer/coord_cache.c @@ -81,7 +81,7 @@ typedef gboolean (*cmp_func_t) (const coord_cache_entry_t * a, const coord_cache /* insert new cache entry into the cache */ static inline void -mcview_ccache_add_entry (GPtrArray * cache, const coord_cache_entry_t * entry) +mcview_ccache_add_entry (GPtrArray *cache, const coord_cache_entry_t *entry) { #if GLIB_CHECK_VERSION (2, 68, 0) g_ptr_array_add (cache, g_memdup2 (entry, sizeof (*entry))); @@ -93,7 +93,7 @@ mcview_ccache_add_entry (GPtrArray * cache, const coord_cache_entry_t * entry) /* --------------------------------------------------------------------------------------------- */ static gboolean -mcview_coord_cache_entry_less_offset (const coord_cache_entry_t * a, const coord_cache_entry_t * b) +mcview_coord_cache_entry_less_offset (const coord_cache_entry_t *a, const coord_cache_entry_t *b) { return (a->cc_offset < b->cc_offset); } @@ -101,7 +101,7 @@ mcview_coord_cache_entry_less_offset (const coord_cache_entry_t * a, const coord /* --------------------------------------------------------------------------------------------- */ static gboolean -mcview_coord_cache_entry_less_plain (const coord_cache_entry_t * a, const coord_cache_entry_t * b) +mcview_coord_cache_entry_less_plain (const coord_cache_entry_t *a, const coord_cache_entry_t *b) { if (a->cc_line < b->cc_line) return TRUE; @@ -115,7 +115,7 @@ mcview_coord_cache_entry_less_plain (const coord_cache_entry_t * a, const coord_ /* --------------------------------------------------------------------------------------------- */ static gboolean -mcview_coord_cache_entry_less_nroff (const coord_cache_entry_t * a, const coord_cache_entry_t * b) +mcview_coord_cache_entry_less_nroff (const coord_cache_entry_t *a, const coord_cache_entry_t *b) { if (a->cc_line < b->cc_line) return TRUE; @@ -131,7 +131,7 @@ mcview_coord_cache_entry_less_nroff (const coord_cache_entry_t * a, const coord_ * smaller than ''coord'', according to the criterion ''sort_by''. */ static inline size_t -mcview_ccache_find (WView * view, const coord_cache_entry_t * coord, cmp_func_t cmp_func) +mcview_ccache_find (WView *view, const coord_cache_entry_t *coord, cmp_func_t cmp_func) { size_t base = 0; size_t limit = view->coord_cache->len; @@ -167,7 +167,7 @@ mcview_ccache_find (WView * view, const coord_cache_entry_t * coord, cmp_func_t #ifdef MC_ENABLE_DEBUGGING_CODE void -mcview_ccache_dump (WView * view) +mcview_ccache_dump (WView *view) { FILE *f; off_t offset, line, column, nextline_offset, filesize; @@ -241,7 +241,7 @@ mcview_ccache_dump (WView * view) */ void -mcview_ccache_lookup (WView * view, coord_cache_entry_t * coord, enum ccache_type lookup_what) +mcview_ccache_lookup (WView *view, coord_cache_entry_t *coord, enum ccache_type lookup_what) { size_t i; GPtrArray *cache; diff --git a/src/viewer/datasource.c b/src/viewer/datasource.c index 94c8099c28..b59e1bd4bd 100644 --- a/src/viewer/datasource.c +++ b/src/viewer/datasource.c @@ -76,7 +76,7 @@ /* --------------------------------------------------------------------------------------------- */ static void -mcview_set_datasource_stdio_pipe (WView * view, mc_pipe_t * p) +mcview_set_datasource_stdio_pipe (WView *view, mc_pipe_t *p) { p->out.len = MC_PIPE_BUFSIZE; p->out.null_term = FALSE; @@ -94,7 +94,7 @@ mcview_set_datasource_stdio_pipe (WView * view, mc_pipe_t * p) /* --------------------------------------------------------------------------------------------- */ void -mcview_set_datasource_none (WView * view) +mcview_set_datasource_none (WView *view) { view->datasource = DS_NONE; } @@ -102,7 +102,7 @@ mcview_set_datasource_none (WView * view) /* --------------------------------------------------------------------------------------------- */ off_t -mcview_get_filesize (WView * view) +mcview_get_filesize (WView *view) { switch (view->datasource) { @@ -121,7 +121,7 @@ mcview_get_filesize (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_update_filesize (WView * view) +mcview_update_filesize (WView *view) { if (view->datasource == DS_FILE) { @@ -134,7 +134,7 @@ mcview_update_filesize (WView * view) /* --------------------------------------------------------------------------------------------- */ char * -mcview_get_ptr_file (WView * view, off_t byte_index) +mcview_get_ptr_file (WView *view, off_t byte_index) { g_assert (view->datasource == DS_FILE); @@ -149,7 +149,7 @@ mcview_get_ptr_file (WView * view, off_t byte_index) /* Invalid UTF-8 is reported as negative integers (one for each byte), * see ticket 3783. */ gboolean -mcview_get_utf (WView * view, off_t byte_index, int *ch, int *ch_len) +mcview_get_utf (WView *view, off_t byte_index, int *ch, int *ch_len) { gchar *str = NULL; int res; @@ -221,7 +221,7 @@ mcview_get_utf (WView * view, off_t byte_index, int *ch, int *ch_len) /* --------------------------------------------------------------------------------------------- */ char * -mcview_get_ptr_string (WView * view, off_t byte_index) +mcview_get_ptr_string (WView *view, off_t byte_index) { g_assert (view->datasource == DS_STRING); @@ -233,7 +233,7 @@ mcview_get_ptr_string (WView * view, off_t byte_index) /* --------------------------------------------------------------------------------------------- */ gboolean -mcview_get_byte_string (WView * view, off_t byte_index, int *retval) +mcview_get_byte_string (WView *view, off_t byte_index, int *retval) { char *p; @@ -252,7 +252,7 @@ mcview_get_byte_string (WView * view, off_t byte_index, int *retval) /* --------------------------------------------------------------------------------------------- */ gboolean -mcview_get_byte_none (WView * view, off_t byte_index, int *retval) +mcview_get_byte_none (WView *view, off_t byte_index, int *retval) { (void) &view; (void) byte_index; @@ -267,7 +267,7 @@ mcview_get_byte_none (WView * view, off_t byte_index, int *retval) /* --------------------------------------------------------------------------------------------- */ void -mcview_set_byte (WView * view, off_t offset, byte b) +mcview_set_byte (WView *view, off_t offset, byte b) { (void) &b; @@ -281,7 +281,7 @@ mcview_set_byte (WView * view, off_t offset, byte b) /*static */ void -mcview_file_load_data (WView * view, off_t byte_index) +mcview_file_load_data (WView *view, off_t byte_index) { off_t blockoffset; ssize_t res; @@ -330,7 +330,7 @@ mcview_file_load_data (WView * view, off_t byte_index) /* --------------------------------------------------------------------------------------------- */ void -mcview_close_datasource (WView * view) +mcview_close_datasource (WView *view) { switch (view->datasource) { @@ -366,7 +366,7 @@ mcview_close_datasource (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_set_datasource_file (WView * view, int fd, const struct stat *st) +mcview_set_datasource_file (WView *view, int fd, const struct stat *st) { view->datasource = DS_FILE; view->ds_file_fd = fd; @@ -380,7 +380,7 @@ mcview_set_datasource_file (WView * view, int fd, const struct stat *st) /* --------------------------------------------------------------------------------------------- */ gboolean -mcview_load_command_output (WView * view, const char *command) +mcview_load_command_output (WView *view, const char *command) { mc_pipe_t *p; GError *error = NULL; @@ -411,7 +411,7 @@ mcview_load_command_output (WView * view, const char *command) /* --------------------------------------------------------------------------------------------- */ void -mcview_set_datasource_vfs_pipe (WView * view, int fd) +mcview_set_datasource_vfs_pipe (WView *view, int fd) { g_assert (fd != -1); @@ -424,7 +424,7 @@ mcview_set_datasource_vfs_pipe (WView * view, int fd) /* --------------------------------------------------------------------------------------------- */ void -mcview_set_datasource_string (WView * view, const char *s) +mcview_set_datasource_string (WView *view, const char *s) { view->datasource = DS_STRING; view->ds_string_len = strlen (s); diff --git a/src/viewer/dialogs.c b/src/viewer/dialogs.c index 4a2fe396b5..4ea958d5cc 100644 --- a/src/viewer/dialogs.c +++ b/src/viewer/dialogs.c @@ -66,7 +66,7 @@ /* --------------------------------------------------------------------------------------------- */ gboolean -mcview_dialog_search (WView * view) +mcview_dialog_search (WView *view) { char *exp = NULL; int qd_result; @@ -138,7 +138,7 @@ mcview_dialog_search (WView * view) /* --------------------------------------------------------------------------------------------- */ gboolean -mcview_dialog_goto (WView * view, off_t * offset) +mcview_dialog_goto (WView *view, off_t *offset) { typedef enum { diff --git a/src/viewer/display.c b/src/viewer/display.c index 08fdb64239..916db80c05 100644 --- a/src/viewer/display.c +++ b/src/viewer/display.c @@ -79,7 +79,7 @@ static enum ruler_type /** Define labels and handlers for functional keys */ static void -mcview_set_buttonbar (WView * view) +mcview_set_buttonbar (WView *view) { Widget *w = WIDGET (view); WDialog *h = DIALOG (w->owner); @@ -128,7 +128,7 @@ mcview_set_buttonbar (WView * view) /* --------------------------------------------------------------------------------------------- */ static void -mcview_display_percent (WView * view, off_t p) +mcview_display_percent (WView *view, off_t p) { int percent; @@ -149,7 +149,7 @@ mcview_display_percent (WView * view, off_t p) /* --------------------------------------------------------------------------------------------- */ static void -mcview_display_status (WView * view) +mcview_display_status (WView *view) { const WRect *r = &view->status_area; const char *file_label; @@ -199,7 +199,7 @@ mcview_display_status (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_update (WView * view) +mcview_update (WView *view) { static int dirt_limit = 1; @@ -245,7 +245,7 @@ mcview_update (WView * view) /** Displays as much data from view->dpy_start as fits on the screen */ void -mcview_display (WView * view) +mcview_display (WView *view) { if (view->mode_flags.hex) mcview_display_hex (view); @@ -257,7 +257,7 @@ mcview_display (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_compute_areas (WView * view) +mcview_compute_areas (WView *view) { WRect view_area; int height, rest, y; @@ -313,7 +313,7 @@ mcview_compute_areas (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_update_bytes_per_line (WView * view) +mcview_update_bytes_per_line (WView *view) { int cols = view->data_area.cols; int bytes; @@ -332,10 +332,9 @@ mcview_update_bytes_per_line (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_display_toggle_ruler (WView * view) +mcview_display_toggle_ruler (WView *view) { - static const enum ruler_type next[3] = - { + static const enum ruler_type next[3] = { RULER_TOP, RULER_BOTTOM, RULER_NONE @@ -351,7 +350,7 @@ mcview_display_toggle_ruler (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_display_clean (WView * view) +mcview_display_clean (WView *view) { Widget *w = WIDGET (view); @@ -364,7 +363,7 @@ mcview_display_clean (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_display_ruler (WView * view) +mcview_display_ruler (WView *view) { static const char ruler_chars[] = "|----*----"; const WRect *r = &view->ruler_area; diff --git a/src/viewer/growbuf.c b/src/viewer/growbuf.c index f1fbb9b5eb..38a7beafd0 100644 --- a/src/viewer/growbuf.c +++ b/src/viewer/growbuf.c @@ -62,7 +62,7 @@ /* --------------------------------------------------------------------------------------------- */ void -mcview_growbuf_init (WView * view) +mcview_growbuf_init (WView *view) { view->growbuf_in_use = TRUE; view->growbuf_blockptr = g_ptr_array_new_with_free_func (g_free); @@ -73,7 +73,7 @@ mcview_growbuf_init (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_growbuf_done (WView * view) +mcview_growbuf_done (WView *view) { view->growbuf_finished = TRUE; @@ -92,7 +92,7 @@ mcview_growbuf_done (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_growbuf_free (WView * view) +mcview_growbuf_free (WView *view) { g_assert (view->growbuf_in_use); @@ -104,7 +104,7 @@ mcview_growbuf_free (WView * view) /* --------------------------------------------------------------------------------------------- */ off_t -mcview_growbuf_filesize (WView * view) +mcview_growbuf_filesize (WView *view) { g_assert (view->growbuf_in_use); @@ -121,7 +121,7 @@ mcview_growbuf_filesize (WView * view) */ void -mcview_growbuf_read_until (WView * view, off_t ofs) +mcview_growbuf_read_until (WView *view, off_t ofs) { gboolean short_read = FALSE; @@ -246,7 +246,7 @@ mcview_growbuf_read_until (WView * view, off_t ofs) /* --------------------------------------------------------------------------------------------- */ gboolean -mcview_get_byte_growing_buffer (WView * view, off_t byte_index, int *retval) +mcview_get_byte_growing_buffer (WView *view, off_t byte_index, int *retval) { char *p; @@ -271,7 +271,7 @@ mcview_get_byte_growing_buffer (WView * view, off_t byte_index, int *retval) /* --------------------------------------------------------------------------------------------- */ char * -mcview_get_ptr_growing_buffer (WView * view, off_t byte_index) +mcview_get_ptr_growing_buffer (WView *view, off_t byte_index) { off_t pageno, pageindex; diff --git a/src/viewer/hex.c b/src/viewer/hex.c index de037cdfd7..8a27a15be4 100644 --- a/src/viewer/hex.c +++ b/src/viewer/hex.c @@ -82,7 +82,7 @@ static const char hex_char[] = "0123456789ABCDEF"; */ static mark_t -mcview_hex_calculate_boldflag (WView * view, off_t from, struct hexedit_change_node *curr, +mcview_hex_calculate_boldflag (WView *view, off_t from, struct hexedit_change_node *curr, gboolean force_changed) { return (from == view->hex_cursor) ? MARK_CURSOR @@ -95,7 +95,7 @@ mcview_hex_calculate_boldflag (WView * view, off_t from, struct hexedit_change_n /* --------------------------------------------------------------------------------------------- */ void -mcview_display_hex (WView * view) +mcview_display_hex (WView *view) { const WRect *r = &view->data_area; int ngroups = view->bytes_per_line / 4; @@ -376,7 +376,7 @@ mcview_display_hex (WView * view) /* --------------------------------------------------------------------------------------------- */ gboolean -mcview_hexedit_save_changes (WView * view) +mcview_hexedit_save_changes (WView *view) { int answer = 0; @@ -437,7 +437,7 @@ mcview_hexedit_save_changes (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_toggle_hexedit_mode (WView * view) +mcview_toggle_hexedit_mode (WView *view) { view->hexedit_mode = !view->hexedit_mode; view->dpy_bbar_dirty = TRUE; @@ -447,7 +447,7 @@ mcview_toggle_hexedit_mode (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_hexedit_free_change_list (WView * view) +mcview_hexedit_free_change_list (WView *view) { struct hexedit_change_node *curr, *next; diff --git a/src/viewer/internal.h b/src/viewer/internal.h index 566b07cfb8..dbbf984272 100644 --- a/src/viewer/internal.h +++ b/src/viewer/internal.h @@ -345,7 +345,7 @@ mcview_offset_rounddown (off_t a, off_t b) /* {{{ Simple Primitive Functions for WView }}} */ static inline gboolean -mcview_is_in_panel (WView * view) +mcview_is_in_panel (WView *view) { return (view->dpy_frame_size != 0); } @@ -353,7 +353,7 @@ mcview_is_in_panel (WView * view) /* --------------------------------------------------------------------------------------------- */ static inline gboolean -mcview_may_still_grow (WView * view) +mcview_may_still_grow (WView *view) { return (view->growbuf_in_use && !view->growbuf_finished); } @@ -372,7 +372,7 @@ mcview_already_loaded (off_t offset, off_t idx, size_t size) /* --------------------------------------------------------------------------------------------- */ static inline gboolean -mcview_get_byte_file (WView * view, off_t byte_index, int *retval) +mcview_get_byte_file (WView *view, off_t byte_index, int *retval) { g_assert (view->datasource == DS_FILE); @@ -391,7 +391,7 @@ mcview_get_byte_file (WView * view, off_t byte_index, int *retval) /* --------------------------------------------------------------------------------------------- */ static inline gboolean -mcview_get_byte (WView * view, off_t offset, int *retval) +mcview_get_byte (WView *view, off_t offset, int *retval) { switch (view->datasource) { @@ -412,7 +412,7 @@ mcview_get_byte (WView * view, off_t offset, int *retval) /* --------------------------------------------------------------------------------------------- */ static inline gboolean -mcview_get_byte_indexed (WView * view, off_t base, off_t ofs, int *retval) +mcview_get_byte_indexed (WView *view, off_t base, off_t ofs, int *retval) { if (base <= OFFSETTYPE_MAX - ofs) return mcview_get_byte (view, base + ofs, retval); @@ -426,7 +426,7 @@ mcview_get_byte_indexed (WView * view, off_t base, off_t ofs, int *retval) /* --------------------------------------------------------------------------------------------- */ static inline int -mcview_count_backspaces (WView * view, off_t offset) +mcview_count_backspaces (WView *view, off_t offset) { int backspaces = 0; int c; @@ -441,7 +441,7 @@ mcview_count_backspaces (WView * view, off_t offset) /* --------------------------------------------------------------------------------------------- */ static inline gboolean -mcview_is_nroff_sequence (WView * view, off_t offset) +mcview_is_nroff_sequence (WView *view, off_t offset) { int c0, c1, c2; @@ -462,7 +462,7 @@ mcview_is_nroff_sequence (WView * view, off_t offset) /* --------------------------------------------------------------------------------------------- */ static inline void -mcview_growbuf_read_all_data (WView * view) +mcview_growbuf_read_all_data (WView *view) { mcview_growbuf_read_until (view, OFFSETTYPE_MAX); } diff --git a/src/viewer/lib.c b/src/viewer/lib.c index b427987ef6..a8764b5b3e 100644 --- a/src/viewer/lib.c +++ b/src/viewer/lib.c @@ -69,7 +69,7 @@ /* --------------------------------------------------------------------------------------------- */ void -mcview_toggle_magic_mode (WView * view) +mcview_toggle_magic_mode (WView *view) { char *filename, *command; dir_list *dir; @@ -100,7 +100,7 @@ mcview_toggle_magic_mode (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_toggle_wrap_mode (WView * view) +mcview_toggle_wrap_mode (WView *view) { view->mode_flags.wrap = !view->mode_flags.wrap; view->dpy_wrap_dirty = TRUE; @@ -111,7 +111,7 @@ mcview_toggle_wrap_mode (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_toggle_nroff_mode (WView * view) +mcview_toggle_nroff_mode (WView *view) { view->mode_flags.nroff = !view->mode_flags.nroff; mcview_altered_flags.nroff = TRUE; @@ -123,7 +123,7 @@ mcview_toggle_nroff_mode (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_toggle_hex_mode (WView * view) +mcview_toggle_hex_mode (WView *view) { view->mode_flags.hex = !view->mode_flags.hex; @@ -149,7 +149,7 @@ mcview_toggle_hex_mode (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_init (WView * view) +mcview_init (WView *view) { size_t i; @@ -201,7 +201,7 @@ mcview_init (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_done (WView * view) +mcview_done (WView *view) { /* Save current file position */ if (mcview_remember_file_position && view->filename_vpath != NULL) @@ -261,7 +261,7 @@ mcview_done (WView * view) #ifdef HAVE_CHARSET void -mcview_set_codeset (WView * view) +mcview_set_codeset (WView *view) { const char *cp_id = NULL; @@ -287,7 +287,7 @@ mcview_set_codeset (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_select_encoding (WView * view) +mcview_select_encoding (WView *view) { if (do_select_codepage ()) mcview_set_codeset (view); @@ -297,7 +297,7 @@ mcview_select_encoding (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_show_error (WView * view, const char *msg) +mcview_show_error (WView *view, const char *msg) { if (mcview_is_in_panel (view)) mcview_set_datasource_string (view, msg); @@ -311,7 +311,7 @@ mcview_show_error (WView * view, const char *msg) */ off_t -mcview_bol (WView * view, off_t current, off_t limit) +mcview_bol (WView *view, off_t current, off_t limit) { int c; off_t filesize; @@ -346,7 +346,7 @@ mcview_bol (WView * view, off_t current, off_t limit) */ off_t -mcview_eol (WView * view, off_t current) +mcview_eol (WView *view, off_t current) { int c, prev_ch = 0; @@ -375,7 +375,7 @@ mcview_eol (WView * view, off_t current) /* --------------------------------------------------------------------------------------------- */ char * -mcview_get_title (const WDialog * h, size_t len) +mcview_get_title (const WDialog *h, size_t len) { const WView *view; const char *modified; @@ -399,7 +399,7 @@ mcview_get_title (const WDialog * h, size_t len) /* --------------------------------------------------------------------------------------------- */ int -mcview_calc_percent (WView * view, off_t p) +mcview_calc_percent (WView *view, off_t p) { off_t filesize; int percent; @@ -429,7 +429,7 @@ mcview_calc_percent (WView * view, off_t p) /* --------------------------------------------------------------------------------------------- */ void -mcview_clear_mode_flags (mcview_mode_flags_t * flags) +mcview_clear_mode_flags (mcview_mode_flags_t *flags) { memset (flags, 0, sizeof (*flags)); } diff --git a/src/viewer/mcviewer.c b/src/viewer/mcviewer.c index ca567b027f..121b0f5aff 100644 --- a/src/viewer/mcviewer.c +++ b/src/viewer/mcviewer.c @@ -88,7 +88,7 @@ char *mcview_show_eof = NULL; /* --------------------------------------------------------------------------------------------- */ static void -mcview_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) +mcview_mouse_callback (Widget *w, mouse_msg_t msg, mouse_event_t *event) { WView *view = (WView *) w; const WRect *r = &view->data_area; @@ -195,7 +195,7 @@ mcview_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) /* --------------------------------------------------------------------------------------------- */ WView * -mcview_new (const WRect * r, gboolean is_panel) +mcview_new (const WRect *r, gboolean is_panel) { WView *view; Widget *w; @@ -234,7 +234,7 @@ mcview_new (const WRect * r, gboolean is_panel) /** Real view only */ gboolean -mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_line, +mcview_viewer (const char *command, const vfs_path_t *file_vpath, int start_line, off_t search_start, off_t search_end) { gboolean succeeded; @@ -282,7 +282,7 @@ mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_lin /* --------------------------------------------------------------------------------------------- */ gboolean -mcview_load (WView * view, const char *command, const char *file, int start_line, +mcview_load (WView *view, const char *command, const char *file, int start_line, off_t search_start, off_t search_end) { gboolean retval = FALSE; diff --git a/src/viewer/move.c b/src/viewer/move.c index 0bdf38fde0..6c77df3f29 100644 --- a/src/viewer/move.c +++ b/src/viewer/move.c @@ -70,7 +70,7 @@ /* --------------------------------------------------------------------------------------------- */ static void -mcview_scroll_to_cursor (WView * view) +mcview_scroll_to_cursor (WView *view) { if (view->mode_flags.hex) { @@ -93,7 +93,7 @@ mcview_scroll_to_cursor (WView * view) /* --------------------------------------------------------------------------------------------- */ static void -mcview_movement_fixups (WView * view, gboolean reset_search) +mcview_movement_fixups (WView *view, gboolean reset_search) { mcview_scroll_to_cursor (view); @@ -111,7 +111,7 @@ mcview_movement_fixups (WView * view, gboolean reset_search) /* --------------------------------------------------------------------------------------------- */ void -mcview_move_up (WView * view, off_t lines) +mcview_move_up (WView *view, off_t lines) { if (!view->mode_flags.hex) mcview_ascii_move_up (view, lines); @@ -141,7 +141,7 @@ mcview_move_up (WView * view, off_t lines) /* --------------------------------------------------------------------------------------------- */ void -mcview_move_down (WView * view, off_t lines) +mcview_move_down (WView *view, off_t lines) { off_t last_byte; @@ -174,7 +174,7 @@ mcview_move_down (WView * view, off_t lines) /* --------------------------------------------------------------------------------------------- */ void -mcview_move_left (WView * view, off_t columns) +mcview_move_left (WView *view, off_t columns) { if (view->mode_flags.hex) { @@ -199,7 +199,7 @@ mcview_move_left (WView * view, off_t columns) /* --------------------------------------------------------------------------------------------- */ void -mcview_move_right (WView * view, off_t columns) +mcview_move_right (WView *view, off_t columns) { if (view->mode_flags.hex) { @@ -228,7 +228,7 @@ mcview_move_right (WView * view, off_t columns) /* --------------------------------------------------------------------------------------------- */ void -mcview_moveto_top (WView * view) +mcview_moveto_top (WView *view) { view->dpy_start = 0; view->dpy_paragraph_skip_lines = 0; @@ -241,7 +241,7 @@ mcview_moveto_top (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_moveto_bottom (WView * view) +mcview_moveto_bottom (WView *view) { off_t filesize; @@ -269,7 +269,7 @@ mcview_moveto_bottom (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_moveto_bol (WView * view) +mcview_moveto_bol (WView *view) { if (!view->mode_flags.hex) mcview_ascii_moveto_bol (view); @@ -285,7 +285,7 @@ mcview_moveto_bol (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_moveto_eol (WView * view) +mcview_moveto_eol (WView *view) { off_t bol; @@ -312,7 +312,7 @@ mcview_moveto_eol (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_moveto_offset (WView * view, off_t offset) +mcview_moveto_offset (WView *view, off_t offset) { if (view->mode_flags.hex) { @@ -334,7 +334,7 @@ mcview_moveto_offset (WView * view, off_t offset) /* --------------------------------------------------------------------------------------------- */ void -mcview_moveto (WView * view, off_t line, off_t col) +mcview_moveto (WView *view, off_t line, off_t col) { off_t offset; @@ -345,7 +345,7 @@ mcview_moveto (WView * view, off_t line, off_t col) /* --------------------------------------------------------------------------------------------- */ void -mcview_coord_to_offset (WView * view, off_t * ret_offset, off_t line, off_t column) +mcview_coord_to_offset (WView *view, off_t *ret_offset, off_t line, off_t column) { coord_cache_entry_t coord; @@ -359,7 +359,7 @@ mcview_coord_to_offset (WView * view, off_t * ret_offset, off_t line, off_t colu /* --------------------------------------------------------------------------------------------- */ void -mcview_offset_to_coord (WView * view, off_t * ret_line, off_t * ret_column, off_t offset) +mcview_offset_to_coord (WView *view, off_t *ret_line, off_t *ret_column, off_t offset) { coord_cache_entry_t coord; @@ -373,7 +373,7 @@ mcview_offset_to_coord (WView * view, off_t * ret_line, off_t * ret_column, off_ /* --------------------------------------------------------------------------------------------- */ void -mcview_place_cursor (WView * view) +mcview_place_cursor (WView *view) { const WRect *r = &view->data_area; int col = view->cursor_col; @@ -390,7 +390,7 @@ mcview_place_cursor (WView * view) * try to display maximum of match */ void -mcview_moveto_match (WView * view) +mcview_moveto_match (WView *view) { if (view->mode_flags.hex) { diff --git a/src/viewer/nroff.c b/src/viewer/nroff.c index a7c7fe2da1..f37e0ba59d 100644 --- a/src/viewer/nroff.c +++ b/src/viewer/nroff.c @@ -59,7 +59,7 @@ /* --------------------------------------------------------------------------------------------- */ static gboolean -mcview_nroff_get_char (mcview_nroff_t * nroff, int *ret_val, off_t nroff_index) +mcview_nroff_get_char (mcview_nroff_t *nroff, int *ret_val, off_t nroff_index) { int c = 0; @@ -92,7 +92,7 @@ mcview_nroff_get_char (mcview_nroff_t * nroff, int *ret_val, off_t nroff_index) /* --------------------------------------------------------------------------------------------- */ int -mcview__get_nroff_real_len (WView * view, off_t start, off_t length) +mcview__get_nroff_real_len (WView *view, off_t start, off_t length) { mcview_nroff_t *nroff; int ret = 0; @@ -128,7 +128,7 @@ mcview__get_nroff_real_len (WView * view, off_t start, off_t length) /* --------------------------------------------------------------------------------------------- */ mcview_nroff_t * -mcview_nroff_seq_new_num (WView * view, off_t lc_index) +mcview_nroff_seq_new_num (WView *view, off_t lc_index) { mcview_nroff_t *nroff; @@ -145,7 +145,7 @@ mcview_nroff_seq_new_num (WView * view, off_t lc_index) /* --------------------------------------------------------------------------------------------- */ mcview_nroff_t * -mcview_nroff_seq_new (WView * view) +mcview_nroff_seq_new (WView *view) { return mcview_nroff_seq_new_num (view, (off_t) 0); @@ -154,7 +154,7 @@ mcview_nroff_seq_new (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_nroff_seq_free (mcview_nroff_t ** nroff) +mcview_nroff_seq_free (mcview_nroff_t **nroff) { if (nroff == NULL || *nroff == NULL) return; @@ -164,7 +164,7 @@ mcview_nroff_seq_free (mcview_nroff_t ** nroff) /* --------------------------------------------------------------------------------------------- */ nroff_type_t -mcview_nroff_seq_info (mcview_nroff_t * nroff) +mcview_nroff_seq_info (mcview_nroff_t *nroff) { int next, next2; @@ -206,7 +206,7 @@ mcview_nroff_seq_info (mcview_nroff_t * nroff) /* --------------------------------------------------------------------------------------------- */ int -mcview_nroff_seq_next (mcview_nroff_t * nroff) +mcview_nroff_seq_next (mcview_nroff_t *nroff) { if (nroff == NULL) return -1; @@ -234,7 +234,7 @@ mcview_nroff_seq_next (mcview_nroff_t * nroff) /* --------------------------------------------------------------------------------------------- */ int -mcview_nroff_seq_prev (mcview_nroff_t * nroff) +mcview_nroff_seq_prev (mcview_nroff_t *nroff) { int prev; off_t prev_index, prev_index2; diff --git a/src/viewer/search.c b/src/viewer/search.c index 9fce3989d3..1887c2561d 100644 --- a/src/viewer/search.c +++ b/src/viewer/search.c @@ -81,7 +81,7 @@ static char search_cb_char_buffer[6]; /* --------------------------------------------------------------------------------------------- */ static int -mcview_search_status_update_cb (status_msg_t * sm) +mcview_search_status_update_cb (status_msg_t *sm) { simple_status_msg_t *ssm = SIMPLE_STATUS_MSG (sm); mcview_search_status_msg_t *vsm = (mcview_search_status_msg_t *) sm; @@ -117,7 +117,7 @@ mcview_search_status_update_cb (status_msg_t * sm) /* --------------------------------------------------------------------------------------------- */ static void -mcview_search_update_steps (WView * view) +mcview_search_update_steps (WView *view) { off_t filesize; @@ -140,7 +140,7 @@ mcview_search_update_steps (WView * view) /* --------------------------------------------------------------------------------------------- */ static gboolean -mcview_find (mcview_search_status_msg_t * ssm, off_t search_start, off_t search_end, gsize * len) +mcview_find (mcview_search_status_msg_t *ssm, off_t search_start, off_t search_end, gsize *len) { WView *view = ssm->view; @@ -189,7 +189,7 @@ mcview_find (mcview_search_status_msg_t * ssm, off_t search_start, off_t search_ /* --------------------------------------------------------------------------------------------- */ static void -mcview_search_show_result (WView * view, size_t match_len) +mcview_search_show_result (WView *view, size_t match_len) { int nroff_len; @@ -215,7 +215,7 @@ mcview_search_show_result (WView * view, size_t match_len) /* --------------------------------------------------------------------------------------------- */ gboolean -mcview_search_init (WView * view) +mcview_search_init (WView *view) { #ifdef HAVE_CHARSET view->search = mc_search_new (view->last_search_string, cp_source); @@ -243,7 +243,7 @@ mcview_search_init (WView * view) /* --------------------------------------------------------------------------------------------- */ void -mcview_search_deinit (WView * view) +mcview_search_deinit (WView *view) { mc_search_free (view->search); g_free (view->last_search_string); @@ -348,7 +348,7 @@ mcview_search_update_cmd_callback (const void *user_data, gsize char_offset) /* --------------------------------------------------------------------------------------------- */ void -mcview_do_search (WView * view, off_t want_search_start) +mcview_do_search (WView *view, off_t want_search_start) { mcview_search_status_msg_t vsm; diff --git a/tests/lib/mc_realpath.c b/tests/lib/mc_realpath.c index a552cdf4fb..cd3ff106cb 100644 --- a/tests/lib/mc_realpath.c +++ b/tests/lib/mc_realpath.c @@ -69,14 +69,24 @@ static const struct data_source { /* absolute paths */ { "/", "/"}, - { "/" VFS_ENCODING_PREFIX "UTF-8/", "/" }, { "/usr/bin", "/usr/bin" }, +#ifdef HAVE_CHARSET + { "/" VFS_ENCODING_PREFIX "UTF-8/", "/" }, { "/" VFS_ENCODING_PREFIX "UTF-8/usr/bin", "/usr/bin" }, +#else + { "/" VFS_ENCODING_PREFIX "UTF-8/", "/" VFS_ENCODING_PREFIX "UTF-8/" }, + { "/" VFS_ENCODING_PREFIX "UTF-8/usr/bin", "/" VFS_ENCODING_PREFIX "UTF-8/usr/bin" }, +#endif /* relative paths are relative to / */ - { VFS_ENCODING_PREFIX "UTF-8/", "/" }, { "usr/bin", "/usr/bin" }, +#ifdef HAVE_CHARSET + { VFS_ENCODING_PREFIX "UTF-8/", "/" }, { VFS_ENCODING_PREFIX "UTF-8/usr/bin", "/usr/bin" } +#else + { VFS_ENCODING_PREFIX "UTF-8/", VFS_ENCODING_PREFIX "UTF-8/" }, + { VFS_ENCODING_PREFIX "UTF-8/usr/bin", VFS_ENCODING_PREFIX "UTF-8/usr/bin" } +#endif }; /* *INDENT-ON* */ diff --git a/tests/lib/utilunix__mc_pstream_get_string.c b/tests/lib/utilunix__mc_pstream_get_string.c index 5ba2285b10..24dc6d1b6a 100644 --- a/tests/lib/utilunix__mc_pstream_get_string.c +++ b/tests/lib/utilunix__mc_pstream_get_string.c @@ -253,7 +253,7 @@ test_mc_popen (void) } static void -test_mc_pread (mc_pipe_t * p) +test_mc_pread (mc_pipe_t *p) { size_t len; diff --git a/tests/lib/utilunix__my_system-common.c b/tests/lib/utilunix__my_system-common.c index db462996c4..06d64efaa3 100644 --- a/tests/lib/utilunix__my_system-common.c +++ b/tests/lib/utilunix__my_system-common.c @@ -42,7 +42,7 @@ static int sigemptyset__return_value = 0; /* @Mock */ int -sigemptyset (sigset_t * set) +sigemptyset (sigset_t *set) { sigemptyset_set__captured = set; return sigemptyset__return_value; diff --git a/tests/lib/vfs/current_dir.c b/tests/lib/vfs/current_dir.c index 80784bfa90..1cdd83593b 100644 --- a/tests/lib/vfs/current_dir.c +++ b/tests/lib/vfs/current_dir.c @@ -42,7 +42,7 @@ static struct vfs_class *vfs_test_ops = VFS_CLASS (&vfs_test_subclass); /* @Mock */ static int -test_chdir (const vfs_path_t * vpath) +test_chdir (const vfs_path_t *vpath) { (void) vpath; diff --git a/tests/lib/vfs/relative_cd.c b/tests/lib/vfs/relative_cd.c index 29f422126d..1ba688590a 100644 --- a/tests/lib/vfs/relative_cd.c +++ b/tests/lib/vfs/relative_cd.c @@ -49,7 +49,7 @@ static int test_chdir__return_value; /* @Mock */ static int -test_chdir (const vfs_path_t * vpath) +test_chdir (const vfs_path_t *vpath) { test_chdir__vpath__captured = vfs_path_clone (vpath); return test_chdir__return_value; diff --git a/tests/lib/vfs/vfs_s_get_path.c b/tests/lib/vfs/vfs_s_get_path.c index 51812e6eda..cf0aa6a8cb 100644 --- a/tests/lib/vfs/vfs_s_get_path.c +++ b/tests/lib/vfs/vfs_s_get_path.c @@ -45,8 +45,8 @@ static struct vfs_class *vfs_test_ops3 = VFS_CLASS (&test_subclass3); /* --------------------------------------------------------------------------------------------- */ static int -test1_mock_open_archive (struct vfs_s_super *super, const vfs_path_t * vpath, - const vfs_path_element_t * vpath_element) +test1_mock_open_archive (struct vfs_s_super *super, const vfs_path_t *vpath, + const vfs_path_element_t *vpath_element) { struct vfs_s_inode *root; @@ -61,8 +61,8 @@ test1_mock_open_archive (struct vfs_s_super *super, const vfs_path_t * vpath, /* --------------------------------------------------------------------------------------------- */ static int -test1_mock_archive_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *super, - const vfs_path_t * vpath, void *cookie) +test1_mock_archive_same (const vfs_path_element_t *vpath_element, struct vfs_s_super *super, + const vfs_path_t *vpath, void *cookie) { const char *path; diff --git a/tests/lib/vfs/vfs_setup_cwd.c b/tests/lib/vfs/vfs_setup_cwd.c index 2722d814bd..e623150081 100644 --- a/tests/lib/vfs/vfs_setup_cwd.c +++ b/tests/lib/vfs/vfs_setup_cwd.c @@ -49,7 +49,7 @@ static gboolean mc_stat__call_count = 0; /* @Mock */ int -mc_stat (const vfs_path_t * vpath, struct stat *my_stat) +mc_stat (const vfs_path_t *vpath, struct stat *my_stat) { (void) vpath; diff --git a/tests/lib/widget/complete_engine.c b/tests/lib/widget/complete_engine.c index d723b34a54..ff74d95a43 100644 --- a/tests/lib/widget/complete_engine.c +++ b/tests/lib/widget/complete_engine.c @@ -33,7 +33,7 @@ /* --------------------------------------------------------------------------------------------- */ void complete_engine_fill_completions (WInput * in); -char **try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags); +GPtrArray *try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags); /* --------------------------------------------------------------------------------------------- */ @@ -47,10 +47,10 @@ static int try_complete__lc_end__captured; static input_complete_t try_complete__flags__captured; /* @ThenReturnValue */ -static char **try_complete__return_value; +static GPtrArray *try_complete__return_value; /* @Mock */ -char ** +GPtrArray * try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags) { try_complete__text__captured = g_strdup (text); diff --git a/tests/lib/widget/group_init_destroy.c b/tests/lib/widget/group_init_destroy.c index 32d0184e62..f0f672b857 100644 --- a/tests/lib/widget/group_init_destroy.c +++ b/tests/lib/widget/group_init_destroy.c @@ -40,7 +40,7 @@ static int ref = 0; /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -widget_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +widget_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { @@ -60,7 +60,7 @@ widget_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void * /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -group_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +group_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data) { switch (msg) { diff --git a/tests/mctest.h b/tests/mctest.h index ae14ae34fc..3e9a745e61 100644 --- a/tests/mctest.h +++ b/tests/mctest.h @@ -84,7 +84,7 @@ /*** inline functions ****************************************************************************/ static inline int -mctest_run_all (TCase * tc_core) +mctest_run_all (TCase *tc_core) { Suite *s; SRunner *sr; diff --git a/tests/src/editor/edit_complete_word_cmd.c b/tests/src/editor/edit_complete_word_cmd.c index 77f75a2622..2415b17972 100644 --- a/tests/src/editor/edit_complete_word_cmd.c +++ b/tests/src/editor/edit_complete_word_cmd.c @@ -56,7 +56,7 @@ mc_refresh (void) /* --------------------------------------------------------------------------------------------- */ /* @Mock */ void -edit_load_syntax (WEdit * _edit, GPtrArray * _pnames, const char *_type) +edit_load_syntax (WEdit *_edit, GPtrArray *_pnames, const char *_type) { (void) _edit; (void) _pnames; @@ -67,7 +67,7 @@ edit_load_syntax (WEdit * _edit, GPtrArray * _pnames, const char *_type) /* @Mock */ int -edit_get_syntax_color (WEdit * _edit, off_t _byte_index) +edit_get_syntax_color (WEdit *_edit, off_t _byte_index) { (void) _edit; (void) _byte_index; @@ -79,7 +79,7 @@ edit_get_syntax_color (WEdit * _edit, off_t _byte_index) /* @Mock */ gboolean -edit_load_macro_cmd (WEdit * _edit) +edit_load_macro_cmd (WEdit *_edit) { (void) _edit; @@ -100,7 +100,7 @@ static char *edit_completion_dialog_show__return_value; /* @Mock */ char * -edit_completion_dialog_show (const WEdit * edit, GQueue * compl, int max_width) +edit_completion_dialog_show (const WEdit *edit, GQueue *compl, int max_width) { edit_completion_dialog_show__edit = edit; diff --git a/tests/src/execute__common.c b/tests/src/execute__common.c index 0ca5dc0154..ed7f8efb91 100644 --- a/tests/src/execute__common.c +++ b/tests/src/execute__common.c @@ -41,7 +41,7 @@ static gboolean vfs_file_is_local__return_value; /* @Mock */ gboolean -vfs_file_is_local (const vfs_path_t * vpath) +vfs_file_is_local (const vfs_path_t *vpath) { g_ptr_array_add (vfs_file_is_local__vpath__captured, vfs_path_clone (vpath)); return vfs_file_is_local__return_value; @@ -108,7 +108,7 @@ static vfs_path_t *mc_getlocalcopy__return_value; /* @Mock */ vfs_path_t * -mc_getlocalcopy (const vfs_path_t * pathname_vpath) +mc_getlocalcopy (const vfs_path_t *pathname_vpath) { mc_getlocalcopy__pathname_vpath__captured = vfs_path_clone (pathname_vpath); return mc_getlocalcopy__return_value; @@ -179,7 +179,7 @@ static int mc_stat__return_value = 0; /* @Mock */ int -mc_stat (const vfs_path_t * vpath, struct stat *stat_ignored) +mc_stat (const vfs_path_t *vpath, struct stat *stat_ignored) { (void) stat_ignored; if (mc_stat__vpath__captured != NULL) @@ -212,7 +212,7 @@ static int mc_ungetlocalcopy__return_value = 0; /* @Mock */ int -mc_ungetlocalcopy (const vfs_path_t * pathname_vpath, const vfs_path_t * local_vpath, +mc_ungetlocalcopy (const vfs_path_t *pathname_vpath, const vfs_path_t *local_vpath, gboolean has_changed_ignored) { (void) has_changed_ignored; diff --git a/tests/src/execute__execute_external_editor_or_viewer.c b/tests/src/execute__execute_external_editor_or_viewer.c index 7fb8d96934..79f8b4fa66 100644 --- a/tests/src/execute__execute_external_editor_or_viewer.c +++ b/tests/src/execute__execute_external_editor_or_viewer.c @@ -47,7 +47,7 @@ static char *execute_external_cmd_opts__return_value; /* @Mock */ char * -execute_get_external_cmd_opts_from_config (const char *command, const vfs_path_t * filename_vpath, +execute_get_external_cmd_opts_from_config (const char *command, const vfs_path_t *filename_vpath, long start_line) { execute_external_cmd_opts__command__captured = g_strdup (command); diff --git a/tests/src/execute__execute_get_external_cmd_opts_from_config.c b/tests/src/execute__execute_get_external_cmd_opts_from_config.c index 87643cfeb1..b954152419 100644 --- a/tests/src/execute__execute_get_external_cmd_opts_from_config.c +++ b/tests/src/execute__execute_get_external_cmd_opts_from_config.c @@ -49,8 +49,8 @@ static GPtrArray *mc_config_get_string__return_value; /* @Mock */ gchar * -mc_config_get_string_raw (mc_config_t * config_ignored, const gchar * group, - const gchar * param, const gchar * default_value) +mc_config_get_string_raw (mc_config_t *config_ignored, const gchar *group, + const gchar *param, const gchar *default_value) { char *return_value; (void) config_ignored; diff --git a/tests/src/filemanager/cd_to.c b/tests/src/filemanager/cd_to.c index 96a04e643c..57b0c32d04 100644 --- a/tests/src/filemanager/cd_to.c +++ b/tests/src/filemanager/cd_to.c @@ -56,7 +56,7 @@ static gboolean do_cd__return_value; /* @Mock */ gboolean -panel_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_type) +panel_cd (WPanel *panel, const vfs_path_t *new_dir_vpath, enum cd_enum cd_type) { (void) panel; diff --git a/tests/src/filemanager/examine_cd.c b/tests/src/filemanager/examine_cd.c index 7298c268f6..d3ee84e92c 100644 --- a/tests/src/filemanager/examine_cd.c +++ b/tests/src/filemanager/examine_cd.c @@ -43,7 +43,7 @@ get_current_type (void) } gboolean -panel_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_type) +panel_cd (WPanel *panel, const vfs_path_t *new_dir_vpath, enum cd_enum cd_type) { (void) panel; (void) new_dir_vpath; @@ -53,7 +53,7 @@ panel_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_type } void -sync_tree (const vfs_path_t * vpath) +sync_tree (const vfs_path_t *vpath) { (void) vpath; } diff --git a/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c b/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c index 8c1889e3a7..db242f2c37 100644 --- a/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c +++ b/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c @@ -96,8 +96,8 @@ static GOptionEntry entries[] = { /* --------------------------------------------------------------------------------------------- */ static gboolean -parse_format_name_argument (const gchar * option_name, const gchar * value, gpointer data, - GError ** error) +parse_format_name_argument (const gchar *option_name, const gchar *value, gpointer data, + GError **error) { (void) option_name; (void) data; @@ -364,7 +364,7 @@ process_ls_line (const char *line) /* ------------------------------------------------------------------------------ */ static void -process_input (FILE * input) +process_input (FILE *input) { char line[BUF_4K];