diff --git a/lib/charsets.c b/lib/charsets.c index ddd113cfe..0df5ecb21 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 1c782f806..0da1d0ae2 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 4657af586..22ae1f8a8 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 8806b02fc..ecad4b7c6 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 71994aa85..bff518fd8 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 41224083c..503a097b1 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 249c143b9..9dacafee6 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/glibcompat.c b/lib/glibcompat.c index 8a5e2e91a..a5387d41d 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; @@ -310,7 +310,7 @@ 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) +mc_g_string_append_c_len (GString *s, gchar c, guint len) { g_return_val_if_fail (s != NULL, NULL); diff --git a/lib/hook.c b/lib/hook.c index 94ae5a9bb..68b224531 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 2fed74ec1..c0b882091 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 204b17b03..71691ee41 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 4891a39f3..e821e94bf 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 4793b6191..00cc0e10d 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 57249c4c3..7724d4f7d 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 fbb71c3f6..94ac1b431 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 ce6d887ba..ded0bb856 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 07372c259..71a77ac26 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 64e406ead..8e514e10a 100644 --- a/lib/search/glob.c +++ b/lib/search/glob.c @@ -47,7 +47,7 @@ /* --------------------------------------------------------------------------------------------- */ static GString * -mc_search__glob_translate_to_regex (const GString * astr) +mc_search__glob_translate_to_regex (const GString *astr) { GString *buff; gsize loop; @@ -166,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; @@ -187,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); } @@ -196,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 4860805c4..61478c11d 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 1158e833a..f4a85a868 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 485c2a18a..9e788e63a 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; @@ -83,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); @@ -93,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 a0f255f67..465c3d344 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 ddbdc2b5f..0c7343fdf 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 6021af5a8..7b0360111 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 2a10b90fc..b93486b0e 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 3430cd641..2c8512726 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 688866ead..fa571f607 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 e94977c2b..986b7216c 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 1a13decfa..26a20ed73 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 24d7c25f4..813c98f88 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 436f55577..2f75dd4cd 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 4c321dd25..aa8fd4cd6 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 c0a28ddd3..c906573cf 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 7f0290b0a..bc7f6ae4a 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; @@ -281,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); } @@ -289,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); } @@ -297,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); } @@ -305,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; @@ -320,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); } @@ -328,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); @@ -340,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); } @@ -749,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); } @@ -757,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); } @@ -987,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 468e6ea99..7ecd988c8 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 eb0a74268..47db11aa4 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 9142f3d1d..8358b13f5 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/xstrtol.c b/lib/strutil/xstrtol.c index 5695c1958..9f7664cfc 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 055a3afbb..867473ed8 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 33344b593..d27e15a40 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 78d50b73d..881e708c6 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 8e7770bdf..c64c0e762 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 752825b6e..e012feb30 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 dfd645471..cdb60f13f 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 d6fd3850f..6bbcb5b06 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; @@ -452,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; @@ -593,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; @@ -1025,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; @@ -1096,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; @@ -1136,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; @@ -1227,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; @@ -1271,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; @@ -1474,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) { @@ -1500,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) { @@ -1529,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 a59e2c698..c03ff6db9 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 1a43cee28..97f8349d9 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 5f9a8efbf..294df5f1b 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 6c5deb05a..c57f64384 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 971de94bb..63bbddec6 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; @@ -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 dcb82be7c..4e457afa3 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 f0a80024b..c7ecc63c0 100644 --- a/lib/vfs/path.c +++ b/lib/vfs/path.c @@ -240,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; @@ -540,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) @@ -635,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; @@ -727,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); } @@ -814,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; } @@ -827,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); @@ -848,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; @@ -882,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); @@ -915,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; @@ -946,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; @@ -980,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; @@ -1022,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; @@ -1080,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); } @@ -1095,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; @@ -1131,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; @@ -1186,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; @@ -1295,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; @@ -1329,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; @@ -1373,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; @@ -1417,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; @@ -1499,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; @@ -1525,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; @@ -1574,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; @@ -1605,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; @@ -1633,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; @@ -1659,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; @@ -1677,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 088711165..8ec440985 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 035683234..5a9fa453b 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 d50d4b616..362bd55d1 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 c6ffd9448..f4dad4649 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; @@ -607,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/widget/background.c b/lib/widget/background.c index afea82538..a82e51eb5 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 2cdaafc81..5ec45e75a 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 24e4f7582..a4b1e2a12 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 b77573ec5..280d4f4a3 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 8666522dd..8fa9f5e90 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; diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c index 259685750..63932ed99 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 127649e45..68cf51e42 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 14b5fa81f..37dd02e3a 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 f1a170cda..3f37c1023 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 3155d8f13..054fbd1ef 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 4f6a02145..ecfd54f48 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 7076d1373..a8a30e4b0 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 0f77a84fb..14433ae95 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 a7ad7f5a4..0897413db 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 fd209fdcc..0822a5be7 100644 --- a/lib/widget/input.h +++ b/lib/widget/input.h @@ -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 34847de23..cd0ccbc87 100644 --- a/lib/widget/input_complete.c +++ b/lib/widget/input_complete.c @@ -398,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]; @@ -794,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; @@ -834,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, '`'); @@ -865,7 +865,7 @@ try_complete_find_start_sign (try_complete_automation_state_t * state) /* --------------------------------------------------------------------------------------------- */ static GPtrArray * -try_complete_all_possible (try_complete_automation_state_t * state, char *text, int *lc_start) +try_complete_all_possible (try_complete_automation_state_t *state, char *text, int *lc_start) { GPtrArray *matches = NULL; @@ -936,7 +936,7 @@ try_complete_all_possible (try_complete_automation_state_t * state, char *text, /* --------------------------------------------------------------------------------------------- */ static gboolean -insert_text (WInput * in, const char *text, ssize_t size) +insert_text (WInput *in, const char *text, ssize_t size) { size_t text_len; int buff_len; @@ -986,7 +986,7 @@ insert_text (WInput * in, const 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; @@ -1166,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); @@ -1377,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; @@ -1416,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; @@ -1440,7 +1440,7 @@ input_complete (WInput * in) /* --------------------------------------------------------------------------------------------- */ void -input_complete_free (WInput * in) +input_complete_free (WInput *in) { if (in->completions != NULL) { diff --git a/lib/widget/label.c b/lib/widget/label.c index 4cde19001..b9fb6b611 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 7cad8720c..76241ca90 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 c20bd1865..9234812bb 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) { @@ -819,7 +819,7 @@ listbox_remove_list (WListbox * l) * @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); @@ -842,7 +842,7 @@ listbox_add_item (WListbox * l, listbox_append_t pos, int hotkey, const char *te * @returns pointer to @text. */ char * -listbox_add_item_take (WListbox * l, listbox_append_t pos, int hotkey, char *text, void *data, +listbox_add_item_take (WListbox *l, listbox_append_t pos, int hotkey, char *text, void *data, gboolean free_data) { WLEntry *entry; diff --git a/lib/widget/menu.c b/lib/widget/menu.c index b27c4c3ad..0f968fe15 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 2183903c0..d3fc1affc 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 3a6d165b8..1930c6109 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 8a722c11b..4f8abccb5 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 94463f627..568660c9f 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 8c2d46418..895723ae5 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 459de104c..6d0a8d958 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 19acec11d..a1d4e0ccd 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 d1df8dac1..e60085d63 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/src/args.c b/src/args.c index 00c480312..81e9becca 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 74c449e36..ce727c4bd 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 a9197929c..51284b0e7 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 dda9c413f..5b04fdd28 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 e4cc30609..d022bf221 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 f35a8fd83..2c6326b04 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/bookmark.c b/src/editor/bookmark.c index 040a01ba7..8d7782ea4 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 f398eb705..a9f938cca 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 1da706220..aaf79bf8c 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 acc776aed..cc6ae6eff 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 def17eec5..fc77d6ccf 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 38a9b76d7..762834314 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 f3ea0e788..22a364ca9 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 49be5714c..bdaea7493 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 6c0713990..cd8b7a790 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 1de8884c0..fe4256cbe 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 c81d9b803..e9181f4cb 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 86a5e08e1..02a42dad0 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 14c59dc16..56d381df2 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 cfefd1fc2..f5163bdae 100644 --- a/src/editor/etags.c +++ b/src/editor/etags.c @@ -312,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; @@ -406,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 9dc5d72de..baccd8460 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 deaa64cc5..f316d0fa6 100644 --- a/src/editor/spell.c +++ b/src/editor/spell.c @@ -105,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")}, @@ -237,7 +236,7 @@ aspell_get_lang (void) */ static unsigned int -aspell_get_lang_list (GPtrArray * lang_list) +aspell_get_lang_list (GPtrArray *lang_list) { AspellDictInfoList *dlist; AspellDictInfoEnumeration *elem; @@ -322,8 +321,8 @@ aspell_set_lang (const char *lang) */ static int -spell_dialog_spell_suggest_show (WEdit * edit, const char *word, char **new_word, - const GPtrArray * suggest) +spell_dialog_spell_suggest_show (WEdit *edit, const char *word, char **new_word, + const GPtrArray *suggest) { int sug_dlg_h = 14; /* dialog height */ @@ -452,7 +451,7 @@ aspell_add_to_dict (const char *word, int word_size) */ static unsigned int -aspell_suggest (GPtrArray * suggest, const char *word, const int word_size) +aspell_suggest (GPtrArray *suggest, const char *word, const int word_size) { unsigned int size = 0; @@ -513,7 +512,7 @@ aspell_check (const char *word, const int word_size) */ static void -aspell_array_clean (GPtrArray * array) +aspell_array_clean (GPtrArray *array) { if (array != NULL) g_ptr_array_free (array, TRUE); @@ -591,7 +590,7 @@ aspell_clean (void) /* --------------------------------------------------------------------------------------------- */ int -edit_suggest_current_word (WEdit * edit) +edit_suggest_current_word (WEdit *edit) { gsize cut_len = 0; gsize word_len = 0; @@ -680,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) { @@ -737,7 +736,7 @@ edit_set_spell_lang (void) */ 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/syntax.c b/src/editor/syntax.c index 4b8116ffd..a5b4b9bcd 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 b29678c5d..8fa89439f 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 f9beed140..4c2a1d3d1 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 f4989e79c..f54501778 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 717a64562..a4ef1f5bb 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 8d11e5d1a..279926690 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; @@ -481,7 +481,7 @@ jobs_fill_listbox (WListbox * list) /* --------------------------------------------------------------------------------------------- */ static int -task_cb (WButton * button, int action) +task_cb (WButton *button, int action) { TaskList *tl; int sig = 0; @@ -759,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; @@ -866,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; @@ -1215,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; @@ -1239,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[] = { @@ -1284,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 b5de12ade..a05551869 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 bac3d993e..7467b4043 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 ff84a4fe2..174b93049 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 1ddc3f311..70602db04 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 30b309c2f..82e1678cd 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 360f10410..9a3d74f44 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 d3be210d5..ce6cbb05d 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; @@ -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 80a19df64..03db98c5f 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 ccf519260..3be115ad1 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 771ca18d2..cf5826b01 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 e3ccecee0..8a572fc43 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); @@ -2936,8 +2936,8 @@ 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; @@ -3254,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); } @@ -3265,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); @@ -3300,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); @@ -3345,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); @@ -3384,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; @@ -3401,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, diff --git a/src/filemanager/file.h b/src/filemanager/file.h index ae12e1572..bf3507ed1 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 44883bf8b..736af9ae7 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; diff --git a/src/filemanager/filegui.h b/src/filemanager/filegui.h index 6387faac2..47e17ab68 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 2e8baca78..b3a380bee 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 0ceed42f3..959a7c78c 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 7515108d1..62d76ae70 100644 --- a/src/filemanager/fileopctx.c +++ b/src/filemanager/fileopctx.c @@ -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 5daf24b05..b5d148af3 100644 --- a/src/filemanager/find.c +++ b/src/filemanager/find.c @@ -388,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; @@ -473,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 @@ -573,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; @@ -891,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); } @@ -975,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; @@ -1013,7 +1013,7 @@ 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 */ @@ -1253,7 +1253,7 @@ find_ignore_dir_search (const char *dir, size_t len) /* --------------------------------------------------------------------------------------------- */ 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] = "|/-\\"; @@ -1271,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; @@ -1409,8 +1409,7 @@ do_search (WDialog * h) } } - search_ok = - mc_search_run (search_file_handle, dp->d_name, 0, dp->d_len, &bytes_found); + search_ok = mc_search_run (search_file_handle, dp->d_name, 0, dp->d_len, &bytes_found); if (search_ok) { @@ -1498,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; @@ -1524,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; @@ -1553,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; @@ -1566,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; @@ -1583,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); @@ -1621,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); @@ -1644,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; @@ -1657,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; @@ -1791,7 +1790,7 @@ 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; @@ -1891,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 312db4624..d55df3e76 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,7 +267,7 @@ update_path_name (void) /* --------------------------------------------------------------------------------------------- */ static void -fill_listbox (WListbox * list) +fill_listbox (WListbox *list) { struct hotlist *current; @@ -476,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; @@ -489,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) { @@ -558,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); @@ -621,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); @@ -1030,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; @@ -1593,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\":"); @@ -1630,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 b23032276..419820e09 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 a8dbcb793..1f96c2dd1 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 a8881d263..f03105f4b 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 a54cec834..4506cbff6 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -403,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) { @@ -416,7 +416,7 @@ panelized_descr_free (panelized_descr_t * p) /* --------------------------------------------------------------------------------------------- */ static void -set_colors (const WPanel * panel) +set_colors (const WPanel *panel) { (void) panel; @@ -428,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); @@ -438,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)); @@ -448,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; @@ -490,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 (const file_entry_t * fe, int len) +string_file_name (const file_entry_t *fe, int len) { (void) len; @@ -542,7 +542,7 @@ format_device_number (char *buf, size_t bufsize, dev_t dev) /** size */ static const char * -string_file_size (const file_entry_t * fe, int len) +string_file_size (const file_entry_t *fe, int len) { static char buffer[BUF_TINY]; @@ -564,7 +564,7 @@ string_file_size (const file_entry_t * fe, int len) /** bsize */ static const char * -string_file_size_brief (const 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"); @@ -579,7 +579,7 @@ string_file_size_brief (const file_entry_t * fe, int len) /** This functions return a string representation of a file entry type */ static const char * -string_file_type (const file_entry_t * fe, int len) +string_file_type (const file_entry_t *fe, int len) { static char buffer[2]; @@ -622,7 +622,7 @@ string_file_type (const file_entry_t * fe, int len) /** mtime */ static const char * -string_file_mtime (const file_entry_t * fe, int len) +string_file_mtime (const file_entry_t *fe, int len) { (void) len; @@ -633,7 +633,7 @@ string_file_mtime (const file_entry_t * fe, int len) /** atime */ static const char * -string_file_atime (const file_entry_t * fe, int len) +string_file_atime (const file_entry_t *fe, int len) { (void) len; @@ -644,7 +644,7 @@ string_file_atime (const file_entry_t * fe, int len) /** ctime */ static const char * -string_file_ctime (const file_entry_t * fe, int len) +string_file_ctime (const file_entry_t *fe, int len) { (void) len; @@ -655,7 +655,7 @@ string_file_ctime (const file_entry_t * fe, int len) /** perm */ static const char * -string_file_permission (const file_entry_t * fe, int len) +string_file_permission (const file_entry_t *fe, int len) { (void) len; @@ -666,7 +666,7 @@ string_file_permission (const file_entry_t * fe, int len) /** mode */ static const char * -string_file_perm_octal (const file_entry_t * fe, int len) +string_file_perm_octal (const file_entry_t *fe, int len) { static char buffer[10]; @@ -680,7 +680,7 @@ string_file_perm_octal (const file_entry_t * fe, int len) /** nlink */ static const char * -string_file_nlinks (const file_entry_t * fe, int len) +string_file_nlinks (const file_entry_t *fe, int len) { static char buffer[BUF_TINY]; @@ -694,7 +694,7 @@ string_file_nlinks (const file_entry_t * fe, int len) /** inode */ static const char * -string_inode (const file_entry_t * fe, int len) +string_inode (const file_entry_t *fe, int len) { static char buffer[10]; @@ -708,7 +708,7 @@ string_inode (const file_entry_t * fe, int len) /** nuid */ static const char * -string_file_nuid (const file_entry_t * fe, int len) +string_file_nuid (const file_entry_t *fe, int len) { static char buffer[10]; @@ -722,7 +722,7 @@ string_file_nuid (const file_entry_t * fe, int len) /** ngid */ static const char * -string_file_ngid (const file_entry_t * fe, int len) +string_file_ngid (const file_entry_t *fe, int len) { static char buffer[10]; @@ -736,7 +736,7 @@ string_file_ngid (const file_entry_t * fe, int len) /** owner */ static const char * -string_file_owner (const file_entry_t * fe, int len) +string_file_owner (const file_entry_t *fe, int len) { (void) len; @@ -747,7 +747,7 @@ string_file_owner (const file_entry_t * fe, int len) /** group */ static const char * -string_file_group (const file_entry_t * fe, int len) +string_file_group (const file_entry_t *fe, int len) { (void) len; @@ -758,7 +758,7 @@ string_file_group (const file_entry_t * fe, int len) /** mark */ static const char * -string_marked (const file_entry_t * fe, int len) +string_marked (const file_entry_t *fe, int len) { (void) len; @@ -769,7 +769,7 @@ string_marked (const file_entry_t * fe, int len) /** space */ static const char * -string_space (const file_entry_t * fe, int len) +string_space (const file_entry_t *fe, int len) { (void) fe; (void) len; @@ -781,7 +781,7 @@ string_space (const file_entry_t * fe, int len) /** dot */ static const char * -string_dot (const file_entry_t * fe, int len) +string_dot (const file_entry_t *fe, int len) { (void) fe; (void) len; @@ -792,7 +792,7 @@ string_dot (const file_entry_t * fe, int len) /* --------------------------------------------------------------------------------------------- */ static int -file_compute_color (const file_attr_t attr, file_entry_t * fe) +file_compute_color (const file_attr_t attr, file_entry_t *fe) { switch (attr) { @@ -817,7 +817,7 @@ file_compute_color (const 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; } @@ -826,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; @@ -939,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); @@ -1018,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; @@ -1034,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; @@ -1092,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 */ @@ -1127,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); @@ -1168,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) { @@ -1188,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; @@ -1242,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; @@ -1295,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; @@ -1311,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; @@ -1404,7 +1404,7 @@ show_dir (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -adjust_top_file (WPanel * panel) +adjust_top_file (WPanel *panel) { int items; @@ -1457,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) @@ -1469,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; @@ -1482,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); @@ -1508,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); @@ -1529,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; @@ -1576,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') { @@ -1617,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); @@ -1684,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; @@ -1748,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 */ @@ -1886,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 */ @@ -1979,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) { @@ -2013,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]; @@ -2042,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; @@ -2055,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)) { @@ -2087,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)) { @@ -2101,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); @@ -2111,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; @@ -2160,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; @@ -2177,7 +2177,7 @@ panel_current_at_half (const WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -move_down (WPanel * panel) +move_down (WPanel *panel) { int items; @@ -2210,7 +2210,7 @@ move_down (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -move_up (WPanel * panel) +move_up (WPanel *panel) { if (panel->current == 0) return; @@ -2240,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; @@ -2281,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) { @@ -2295,7 +2295,7 @@ move_left (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -move_right (WPanel * panel) +move_right (WPanel *panel) { if (panel->list_cols > 1) { @@ -2309,7 +2309,7 @@ move_right (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -prev_page (WPanel * panel) +prev_page (WPanel *panel) { int items; @@ -2333,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); @@ -2379,7 +2379,7 @@ goto_parent_dir (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -next_page (WPanel * panel) +next_page (WPanel *panel) { int items; @@ -2405,7 +2405,7 @@ next_page (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -goto_child_dir (WPanel * panel) +goto_child_dir (WPanel *panel) { const file_entry_t *fe; @@ -2424,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; @@ -2434,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; @@ -2444,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; @@ -2454,7 +2454,7 @@ goto_bottom_file (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -move_home (WPanel * panel) +move_home (WPanel *panel) { if (panel->current == 0) return; @@ -2489,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; @@ -2523,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); @@ -2536,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); } @@ -2544,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); } @@ -2552,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); } @@ -2560,7 +2560,7 @@ mark_file_down (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -mark_file_right (WPanel * panel) +mark_file_right (WPanel *panel) { int lines; @@ -2580,7 +2580,7 @@ mark_file_right (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -mark_file_left (WPanel * panel) +mark_file_left (WPanel *panel) { int lines; @@ -2600,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; @@ -2674,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; @@ -2706,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); @@ -2715,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); @@ -2724,7 +2724,7 @@ panel_unselect_files (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -panel_select_invert_files (WPanel * panel) +panel_select_invert_files (WPanel *panel) { int i; @@ -2740,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 }; @@ -2766,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; @@ -2873,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) { @@ -2902,7 +2902,7 @@ start_search (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -stop_search (WPanel * panel) +stop_search (WPanel *panel) { if (!panel->quick_search.active) return; @@ -2921,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; @@ -2997,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)); } @@ -3005,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; @@ -3016,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; @@ -3056,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); @@ -3071,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; @@ -3135,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; @@ -3154,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; @@ -3174,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; @@ -3209,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; @@ -3248,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; @@ -3271,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) { @@ -3294,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) { @@ -3307,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; @@ -3334,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; @@ -3379,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 ()) @@ -3396,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; @@ -3448,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; @@ -3475,7 +3475,7 @@ directory_history_next (WPanel * panel) /* --------------------------------------------------------------------------------------------- */ static void -directory_history_prev (WPanel * panel) +directory_history_prev (WPanel *panel) { gboolean ok; @@ -3502,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; @@ -3554,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; @@ -3743,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; @@ -3782,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); @@ -3868,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); @@ -3878,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) { @@ -3896,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; @@ -3928,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; @@ -3979,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; @@ -4007,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; @@ -4134,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; @@ -4171,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; @@ -4226,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) { @@ -4242,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; @@ -4259,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; @@ -4308,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; @@ -4372,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; @@ -4412,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; @@ -4437,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 */ { @@ -4455,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 */ { @@ -4475,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; @@ -4564,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; @@ -4627,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; @@ -4669,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; @@ -4726,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); @@ -4743,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); @@ -4755,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) { @@ -4775,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; @@ -4798,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; @@ -4844,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; @@ -4857,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) { @@ -4869,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; @@ -4900,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; @@ -4932,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; @@ -4983,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; @@ -5083,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; @@ -5171,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; @@ -5267,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 (); @@ -5297,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; @@ -5318,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; @@ -5394,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 9e74ee2b8..ea20a9639 100644 --- a/src/filemanager/panel.h +++ b/src/filemanager/panel.h @@ -232,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 }; @@ -267,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); } @@ -275,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 b1c87ca21..574df8451 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 2bfcf5051..9b4b4b3aa 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 89420b613..b89e6dcca 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 f36704c98..6f2420555 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 e708fb293..969be1870 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 949cc9b59..60011224b 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 4332b6266..a9fa06d60 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 e71f1027a..eb729c603 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,7 +1127,7 @@ 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; @@ -1194,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 4827da044..99c530373 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 accd9f224..3bf56c74f 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 bc590fb0a..417e2e599 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 1b904c500..62914bb51 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 11a9ba58d..59a0c39d3 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/ftpfs/ftpfs.c b/src/vfs/ftpfs/ftpfs.c index 175bd0da1..6eb9c2aaf 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 a9ee58c10..2befd20ed 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 193fb6b4a..88450a568 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 7ebd2de19..c7107f5d5 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 cfcea154f..622ac3266 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); @@ -161,7 +161,7 @@ sftpsfs_expand_hostname (const char *host, const char *real_host) */ 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; @@ -220,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; @@ -313,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; @@ -370,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; diff --git a/src/vfs/sftpfs/connection.c b/src/vfs/sftpfs/connection.c index bb29a0f29..1d5690cec 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; @@ -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 53cb5532e..34461e28d 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 ab91b705f..59db42777 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 dbf15cce0..a229de403 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 ba7d1697a..fcc93470e 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 925f8161e..96fe4fcf5 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 263f64563..eb5be930c 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 9795d1586..dcc7a2003 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 c4c79de2a..d559031ed 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 4ce6494e0..ab00c5c12 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 e480040f9..629261273 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 453eb78f5..b09808604 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 c406feb5c..ffe7d6db1 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 2ea23c225..2882ca3a4 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 94c8099c2..b59e1bd4b 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 4a2fe396b..4ea958d5c 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 08fdb6423..916db80c0 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 f1fbb9b5e..38a7beafd 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 de037cdfd..8a27a15be 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 566b07cfb..dbbf98427 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 b427987ef..a8764b5b3 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 ca567b027..121b0f5af 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 0bdf38fde..6c77df3f2 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 a7c7fe2da..f37e0ba59 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 9fce3989d..1887c2561 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/utilunix__mc_pstream_get_string.c b/tests/lib/utilunix__mc_pstream_get_string.c index 5ba2285b1..24dc6d1b6 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 db462996c..06d64efaa 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 80784bfa9..1cdd83593 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 29f422126..1ba688590 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 51812e6ed..cf0aa6a8c 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 2722d814b..e62315008 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/group_init_destroy.c b/tests/lib/widget/group_init_destroy.c index 32d0184e6..f0f672b85 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 ae14ae34f..3e9a745e6 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 77f75a262..2415b1797 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 0ca5dc015..ed7f8efb9 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 7fb8d9693..79f8b4fa6 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 87643cfeb..b95415241 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 96a04e643..57b0c32d0 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 7298c268f..d3ee84e92 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 8c1889e3a..db242f2c3 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];