diff --git a/lib/charsets.c b/lib/charsets.c index 65dd494e5..eb507ac15 100644 --- a/lib/charsets.c +++ b/lib/charsets.c @@ -58,8 +58,11 @@ const char *cp_source = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/event/manage.c b/lib/event/manage.c index 7ede03c1d..b8f973386 100644 --- a/lib/event/manage.c +++ b/lib/event/manage.c @@ -38,6 +38,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ @@ -58,7 +60,6 @@ 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) { - GTree *event_group; GPtrArray *callbacks; mc_event_callback_t *cb; diff --git a/lib/filehighlight/get-color.c b/lib/filehighlight/get-color.c index e97bec825..5fb17f68a 100644 --- a/lib/filehighlight/get-color.c +++ b/lib/filehighlight/get-color.c @@ -39,10 +39,12 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ - /* --------------------------------------------------------------------------------------------- */ /*inline functions */ @@ -55,12 +57,16 @@ mc_fhl_is_file (const file_entry_t * fe) return S_ISREG (fe->st.st_mode); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_file_exec (const file_entry_t * fe) { return is_exe (fe->st.st_mode); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_dir (const file_entry_t * fe) { @@ -70,6 +76,8 @@ mc_fhl_is_dir (const file_entry_t * fe) return S_ISDIR (fe->st.st_mode); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_link (const file_entry_t * fe) { @@ -79,24 +87,32 @@ mc_fhl_is_link (const file_entry_t * fe) return S_ISLNK (fe->st.st_mode); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_hlink (const file_entry_t * fe) { return (fe->st.st_nlink > 1); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_link_to_dir (const file_entry_t * fe) { return mc_fhl_is_link (fe) && fe->f.link_to_dir; } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_stale_link (const file_entry_t * fe) { return mc_fhl_is_link (fe) ? fe->f.stale_link : !mc_fhl_is_file (fe); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_device_char (const file_entry_t * fe) { @@ -106,6 +122,8 @@ mc_fhl_is_device_char (const file_entry_t * fe) return S_ISCHR (fe->st.st_mode); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_device_block (const file_entry_t * fe) { @@ -115,6 +133,8 @@ mc_fhl_is_device_block (const file_entry_t * fe) return S_ISBLK (fe->st.st_mode); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_special_socket (const file_entry_t * fe) { @@ -124,6 +144,8 @@ mc_fhl_is_special_socket (const file_entry_t * fe) return S_ISSOCK (fe->st.st_mode); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_special_fifo (const file_entry_t * fe) { @@ -133,6 +155,8 @@ mc_fhl_is_special_fifo (const file_entry_t * fe) return S_ISFIFO (fe->st.st_mode); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_special_door (const file_entry_t * fe) { @@ -142,6 +166,8 @@ mc_fhl_is_special_door (const file_entry_t * fe) return S_ISDOOR (fe->st.st_mode); } +/* --------------------------------------------------------------------------------------------- */ + inline static gboolean mc_fhl_is_special (const file_entry_t * fe) { @@ -246,8 +272,6 @@ mc_fhl_get_color_regexp (const mc_fhl_filter_t * mc_filter, const mc_fhl_t * fhl return -1; } -/* --------------------------------------------------------------------------------------------- */ - /* --------------------------------------------------------------------------------------------- */ /*** public functions ****************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/filehighlight/ini-file-read.c b/lib/filehighlight/ini-file-read.c index 885a9ca13..bf12b9b73 100644 --- a/lib/filehighlight/ini-file-read.c +++ b/lib/filehighlight/ini-file-read.c @@ -43,6 +43,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/keybind.c b/lib/keybind.c index 1ec978738..96168ba66 100644 --- a/lib/keybind.c +++ b/lib/keybind.c @@ -51,6 +51,8 @@ typedef struct name_keymap_t long val; } name_keymap_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static name_keymap_t command_names[] = { @@ -382,6 +384,7 @@ static name_keymap_t command_names[] = { static const size_t num_command_names = G_N_ELEMENTS (command_names) - 1; /* *INDENT-ON* */ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/lock.c b/lib/lock.c index a0e4246e6..0db7b1786 100644 --- a/lib/lock.c +++ b/lib/lock.c @@ -75,8 +75,11 @@ typedef struct pid_t pid; } lock_s; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ /** \fn static char * lock_build_name (void) diff --git a/lib/logging.c b/lib/logging.c index 0fe801769..6dd0731d9 100644 --- a/lib/logging.c +++ b/lib/logging.c @@ -49,11 +49,14 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static gboolean logging_initialized = FALSE; static gboolean logging_enabled = FALSE; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/mcconfig/common.c b/lib/mcconfig/common.c index 59b95727f..75979be12 100644 --- a/lib/mcconfig/common.c +++ b/lib/mcconfig/common.c @@ -39,6 +39,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/mcconfig/paths.c b/lib/mcconfig/paths.c index 76dc2f94d..10568cde1 100644 --- a/lib/mcconfig/paths.c +++ b/lib/mcconfig/paths.c @@ -42,6 +42,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static gboolean xdg_vars_initialized = FALSE; diff --git a/lib/mcconfig/set.c b/lib/mcconfig/set.c index 7f4608e36..961435fa6 100644 --- a/lib/mcconfig/set.c +++ b/lib/mcconfig/set.c @@ -33,6 +33,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/search/glob.c b/lib/search/glob.c index f938a5fcf..5874abaf0 100644 --- a/lib/search/glob.c +++ b/lib/search/glob.c @@ -39,9 +39,13 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static GString * mc_search__glob_translate_to_regex (const GString * astr) diff --git a/lib/search/hex.c b/lib/search/hex.c index 6ce550483..50af6fb60 100644 --- a/lib/search/hex.c +++ b/lib/search/hex.c @@ -49,9 +49,13 @@ typedef enum /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static GString * mc_search__hex_translate_to_regex (const GString * astr, mc_search_hex_parse_error_t * error_ptr, @@ -127,7 +131,9 @@ mc_search__hex_translate_to_regex (const GString * astr, mc_search_hex_parse_err return buff; } +/* --------------------------------------------------------------------------------------------- */ /*** public functions ****************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ void mc_search__cond_struct_new_init_hex (const char *charset, mc_search_t * lc_mc_search, diff --git a/lib/search/lib.c b/lib/search/lib.c index 64e604299..2c22504f3 100644 --- a/lib/search/lib.c +++ b/lib/search/lib.c @@ -41,11 +41,13 @@ /*** global variables ****************************************************************************/ +/* *INDENT-OFF* */ const char *STR_E_NOTFOUND = N_("Search string not found"); const char *STR_E_UNKNOWN_TYPE = N_("Not implemented yet"); const char *STR_E_RPL_NOT_EQ_TO_FOUND = -N_("Num of replace tokens not equal to num of found tokens"); + N_("Num of replace tokens not equal to num of found tokens"); const char *STR_E_RPL_INVALID_TOKEN = N_("Invalid token number %d"); +/* *INDENT-ON* */ /*** file scope macro definitions ****************************************************************/ @@ -53,6 +55,8 @@ const char *STR_E_RPL_INVALID_TOKEN = N_("Invalid token number %d"); typedef gboolean (*case_conv_fn) (const char *ch, char **out, size_t * remain); +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/search/normal.c b/lib/search/normal.c index 9de868a3e..9042bfcee 100644 --- a/lib/search/normal.c +++ b/lib/search/normal.c @@ -38,6 +38,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/search/regex.c b/lib/search/regex.c index 683d53b05..035f19b75 100644 --- a/lib/search/regex.c +++ b/lib/search/regex.c @@ -57,10 +57,13 @@ typedef enum REPLACE_T_LOW_TRANSFORM = 8 } replace_transform_type_t; +/*** forward declarations (file scope functions) *************************************************/ /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static gboolean mc_search__regex_str_append_if_special (GString * copy_to, const GString * regex_str, diff --git a/lib/search/search.c b/lib/search/search.c index d2de07914..1393038c9 100644 --- a/lib/search/search.c +++ b/lib/search/search.c @@ -47,6 +47,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static const mc_search_type_str_t mc_search__list_types[] = { @@ -57,7 +59,9 @@ static const mc_search_type_str_t mc_search__list_types[] = { {NULL, MC_SEARCH_T_INVALID} }; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static mc_search_cond_t * mc_search__cond_struct_new (mc_search_t * lc_mc_search, const GString * str, const char *charset) diff --git a/lib/serialize.c b/lib/serialize.c index 9108fee22..1db0a9ce6 100644 --- a/lib/serialize.c +++ b/lib/serialize.c @@ -46,8 +46,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/shell.c b/lib/shell.c index 99a7ff8d5..064617158 100644 --- a/lib/shell.c +++ b/lib/shell.c @@ -37,17 +37,19 @@ #include "global.h" #include "util.h" - /*** global variables ****************************************************************************/ /*** file scope macro definitions ****************************************************************/ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static char rp_shell[PATH_MAX]; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ /** diff --git a/lib/skin/colors-old.c b/lib/skin/colors-old.c index 2b4858e76..628b2aa78 100644 --- a/lib/skin/colors-old.c +++ b/lib/skin/colors-old.c @@ -39,6 +39,8 @@ /*** file scope macro definitions ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope type declarations ****************************************************************/ typedef struct mc_skin_colors_old_struct @@ -104,7 +106,9 @@ static const mc_skin_colors_old_t old_colors[] = { static const size_t num_old_colors = G_N_ELEMENTS (old_colors); +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static int old_color_comparator (const void *p1, const void *p2) diff --git a/lib/skin/colors.c b/lib/skin/colors.c index dea3f8732..87e9442d2 100644 --- a/lib/skin/colors.c +++ b/lib/skin/colors.c @@ -41,9 +41,13 @@ int mc_skin_color__cache[MC_SKIN_COLOR_CACHE_COUNT]; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static mc_skin_color_t * mc_skin_color_get_from_hash (mc_skin_t * mc_skin, const gchar * group, const gchar * key) diff --git a/lib/skin/common.c b/lib/skin/common.c index 51c075382..85790f280 100644 --- a/lib/skin/common.c +++ b/lib/skin/common.c @@ -41,6 +41,8 @@ mc_skin_t mc_skin__default; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static gboolean mc_skin_is_init = FALSE; diff --git a/lib/skin/ini-file.c b/lib/skin/ini-file.c index d63ebda20..6d924357a 100644 --- a/lib/skin/ini-file.c +++ b/lib/skin/ini-file.c @@ -40,10 +40,12 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ - /* --------------------------------------------------------------------------------------------- */ static void diff --git a/lib/skin/lines.c b/lib/skin/lines.c index 51001249d..90cc02805 100644 --- a/lib/skin/lines.c +++ b/lib/skin/lines.c @@ -36,9 +36,13 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static int mc_skin_lines_load_frm (mc_skin_t * mc_skin, const char *name) diff --git a/lib/strutil/filevercmp.c b/lib/strutil/filevercmp.c index a0e55fc9a..c0a28ddd3 100644 --- a/lib/strutil/filevercmp.c +++ b/lib/strutil/filevercmp.c @@ -30,6 +30,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/strutil/replace.c b/lib/strutil/replace.c index d89dca478..1246a0103 100644 --- a/lib/strutil/replace.c +++ b/lib/strutil/replace.c @@ -35,6 +35,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/strutil/strescape.c b/lib/strutil/strescape.c index f7c02b03e..a605ad87b 100644 --- a/lib/strutil/strescape.c +++ b/lib/strutil/strescape.c @@ -35,15 +35,21 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static const char ESCAPE_SHELL_CHARS[] = " !#$%()&{}[]`?|<>;*\\\"'"; static const char ESCAPE_REGEX_CHARS[] = "^!#$%()&{}[]`?|<>;*+.\\"; static const char ESCAPE_GLOB_CHARS[] = "$*\\?"; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ +/* --------------------------------------------------------------------------------------------- */ /*** public functions ****************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ char * strutils_escape (const char *src, gsize src_len, const char *escaped_chars, @@ -95,6 +101,7 @@ strutils_escape (const char *src, gsize src_len, const char *escaped_chars, } /* --------------------------------------------------------------------------------------------- */ + char * strutils_unescape (const char *src, gsize src_len, const char *unescaped_chars, gboolean unescape_non_printable) diff --git a/lib/strutil/strutil.c b/lib/strutil/strutil.c index d1d1d0a83..d6a8911ff 100644 --- a/lib/strutil/strutil.c +++ b/lib/strutil/strutil.c @@ -44,6 +44,8 @@ GIConv str_cnv_not_convert = INVALID_CONV; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* names, that are used for utf-8 */ diff --git a/lib/strutil/strutil8bit.c b/lib/strutil/strutil8bit.c index 70f4ca030..2002e5e1d 100644 --- a/lib/strutil/strutil8bit.c +++ b/lib/strutil/strutil8bit.c @@ -56,6 +56,8 @@ static inline int char_##func_name(char c) \ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static const char replch = '?'; diff --git a/lib/strutil/strutilascii.c b/lib/strutil/strutilascii.c index fa5af0d9f..421bfdb35 100644 --- a/lib/strutil/strutilascii.c +++ b/lib/strutil/strutilascii.c @@ -41,6 +41,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static const char replch = '?'; diff --git a/lib/strutil/strutilutf8.c b/lib/strutil/strutilutf8.c index c9c146195..e143abe79 100644 --- a/lib/strutil/strutilutf8.c +++ b/lib/strutil/strutilutf8.c @@ -57,6 +57,8 @@ struct term_form gboolean compose; }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static const char replch[] = "\xEF\xBF\xBD"; diff --git a/lib/strutil/xstrtol.c b/lib/strutil/xstrtol.c index 9dc538a17..a0f93ce67 100644 --- a/lib/strutil/xstrtol.c +++ b/lib/strutil/xstrtol.c @@ -39,6 +39,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/timefmt.c b/lib/timefmt.c index d1444ee35..43bd4293b 100644 --- a/lib/timefmt.c +++ b/lib/timefmt.c @@ -53,6 +53,8 @@ char *user_old_timeformat = NULL; /* time format string for older dates */ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* @@ -62,10 +64,12 @@ char *user_old_timeformat = NULL; /* time format string for older dates */ */ static size_t i18n_timelength_cache = MAX_I18NTIMELENGTH + 1; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ +/* --------------------------------------------------------------------------------------------- */ /*** public functions ****************************************************************************/ - /* --------------------------------------------------------------------------------------------- */ /** * Check strftime() results. Some systems (i.e. Solaris) have different diff --git a/lib/tty/color-internal.c b/lib/tty/color-internal.c index 38af97135..8db2b6cd0 100644 --- a/lib/tty/color-internal.c +++ b/lib/tty/color-internal.c @@ -52,6 +52,8 @@ typedef struct mc_tty_color_table_struct int value; } mc_tty_color_table_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static mc_tty_color_table_t const color_table[] = { diff --git a/lib/tty/color-ncurses.c b/lib/tty/color-ncurses.c index fb9ea49e0..f01d697b1 100644 --- a/lib/tty/color-ncurses.c +++ b/lib/tty/color-ncurses.c @@ -48,10 +48,13 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static GHashTable *mc_tty_color_color_pair_attrs = NULL; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/tty/color-slang.c b/lib/tty/color-slang.c index 5069c73c0..5dd26637f 100644 --- a/lib/tty/color-slang.c +++ b/lib/tty/color-slang.c @@ -48,8 +48,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/tty/color.c b/lib/tty/color.c index 0cb1433e2..a9c1ab0dd 100644 --- a/lib/tty/color.c +++ b/lib/tty/color.c @@ -57,10 +57,13 @@ gboolean use_colors = FALSE; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static GHashTable *mc_tty_color__hashtable = NULL; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/tty/key.c b/lib/tty/key.c index 7742d97e3..77ed2c65c 100644 --- a/lib/tty/key.c +++ b/lib/tty/key.c @@ -275,6 +275,8 @@ typedef int (*ph_ov_f) (void *); typedef int (*ph_pqc_f) (unsigned short, PhCursorInfo_t *); #endif +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static key_define_t mc_default_keys[] = { diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c index ac5ca2b48..08f663dfa 100644 --- a/lib/tty/tty-ncurses.c +++ b/lib/tty/tty-ncurses.c @@ -78,15 +78,16 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* ncurses supports cursor positions only within window */ /* We use our own cursor coordinates to support partially visible widgets */ static int mc_curs_row, mc_curs_col; -/*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ - +/*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ static void diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c index da6ba82ac..3aa74de2f 100644 --- a/lib/tty/tty-slang.c +++ b/lib/tty/tty-slang.c @@ -74,6 +74,8 @@ int reset_hp_softkeys = 0; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* Various saved termios settings that we control here */ diff --git a/lib/tty/tty.c b/lib/tty/tty.c index 6ae4cbaaa..cae0a05ec 100644 --- a/lib/tty/tty.c +++ b/lib/tty/tty.c @@ -68,10 +68,13 @@ int mc_tty_frm[MC_TTY_FRM_MAX]; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static SIG_ATOMIC_VOLATILE_T got_interrupt = 0; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/tty/win.c b/lib/tty/win.c index e125d3e31..45451a482 100644 --- a/lib/tty/win.c +++ b/lib/tty/win.c @@ -55,10 +55,13 @@ char *rmcup = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static gboolean rxvt_extensions = FALSE; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/tty/x11conn.c b/lib/tty/x11conn.c index b7be0c3cc..20e201bc7 100644 --- a/lib/tty/x11conn.c +++ b/lib/tty/x11conn.c @@ -57,6 +57,8 @@ typedef int (*mc_XErrorHandler_callback) (Display *, XErrorEvent *); typedef int (*mc_XIOErrorHandler_callback) (Display *); +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ #ifdef HAVE_GMODULE @@ -66,6 +68,7 @@ static mc_XErrorHandler_callback (*func_XSetErrorHandler) (mc_XErrorHandler_call static mc_XIOErrorHandler_callback (*func_XSetIOErrorHandler) (mc_XIOErrorHandler_callback); static Bool (*func_XQueryPointer) (Display *, Window, Window *, Window *, int *, int *, int *, int *, unsigned int *); + static GModule *x11_module; #endif @@ -79,6 +82,7 @@ static gboolean lost_connection = FALSE; static jmp_buf x11_exception; /* FIXME: get a better name */ static gboolean longjmp_allowed = FALSE; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/util.c b/lib/util.c index 1052c749f..744bd9e76 100644 --- a/lib/util.c +++ b/lib/util.c @@ -72,6 +72,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/utilunix.c b/lib/utilunix.c index 767f8b0bf..42e0f6d5d 100644 --- a/lib/utilunix.c +++ b/lib/utilunix.c @@ -103,6 +103,8 @@ typedef struct struct sigaction stop; } my_system_sigactions_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static int_cache uid_cache[UID_CACHE_SIZE]; diff --git a/lib/vfs/direntry.c b/lib/vfs/direntry.c index d45e51a59..5bd81989e 100644 --- a/lib/vfs/direntry.c +++ b/lib/vfs/direntry.c @@ -98,6 +98,8 @@ struct dirhandle /*** file scope variables ************************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/vfs/gc.c b/lib/vfs/gc.c index a77cd1b18..dd64ecd1a 100644 --- a/lib/vfs/gc.c +++ b/lib/vfs/gc.c @@ -100,6 +100,8 @@ struct vfs_stamping gint64 time; }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static GSList *stamps = NULL; diff --git a/lib/vfs/interface.c b/lib/vfs/interface.c index 06a75ac08..cc541ed16 100644 --- a/lib/vfs/interface.c +++ b/lib/vfs/interface.c @@ -71,8 +71,11 @@ extern struct vfs_dirent *mc_readdir_result; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/vfs/netutil.c b/lib/vfs/netutil.c index 1ce690dd9..1306879be 100644 --- a/lib/vfs/netutil.c +++ b/lib/vfs/netutil.c @@ -43,8 +43,11 @@ SIG_ATOMIC_VOLATILE_T got_sigpipe = 0; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/vfs/parse_ls_vga.c b/lib/vfs/parse_ls_vga.c index 88b288250..779792f57 100644 --- a/lib/vfs/parse_ls_vga.c +++ b/lib/vfs/parse_ls_vga.c @@ -54,6 +54,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static char *columns[MAXCOLS]; /* Points to the string in column n */ diff --git a/lib/vfs/path.c b/lib/vfs/path.c index 51c9cef71..eda7690c8 100644 --- a/lib/vfs/path.c +++ b/lib/vfs/path.c @@ -54,8 +54,11 @@ extern GPtrArray *vfs__classes_list; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/vfs/vfs.c b/lib/vfs/vfs.c index 02bb0b4ad..52494e533 100644 --- a/lib/vfs/vfs.c +++ b/lib/vfs/vfs.c @@ -95,6 +95,8 @@ struct vfs_openfile void *fsinfo; }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /** They keep track of the current directory */ diff --git a/lib/widget/background.c b/lib/widget/background.c index 456afd911..1965dee61 100644 --- a/lib/widget/background.c +++ b/lib/widget/background.c @@ -42,6 +42,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/buttonbar.c b/lib/widget/buttonbar.c index bf911a015..2ed563579 100644 --- a/lib/widget/buttonbar.c +++ b/lib/widget/buttonbar.c @@ -52,8 +52,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/check.c b/lib/widget/check.c index f42bbda1c..63c55e384 100644 --- a/lib/widget/check.c +++ b/lib/widget/check.c @@ -47,9 +47,13 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static cb_ret_t check_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) diff --git a/lib/widget/dialog-switch.c b/lib/widget/dialog-switch.c index 1e43debe4..4cfacb1b2 100644 --- a/lib/widget/dialog-switch.c +++ b/lib/widget/dialog-switch.c @@ -46,6 +46,8 @@ WDialog *filemanager = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* List of dialogs: filemanagers, editors, viewers */ @@ -55,6 +57,7 @@ static GList *mc_current = NULL; /* Is there any dialogs that we have to run after returning to the manager from another dialog */ static gboolean dialog_switch_pending = FALSE; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c index 24e9cce7a..8ecfceb73 100644 --- a/lib/widget/dialog.c +++ b/lib/widget/dialog.c @@ -75,6 +75,8 @@ const global_keymap_t *dialog_map = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/frame.c b/lib/widget/frame.c index 3996cddd7..31127ab0c 100644 --- a/lib/widget/frame.c +++ b/lib/widget/frame.c @@ -45,6 +45,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/gauge.c b/lib/widget/gauge.c index b9f0ac3ab..5eebb11c8 100644 --- a/lib/widget/gauge.c +++ b/lib/widget/gauge.c @@ -50,9 +50,13 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static cb_ret_t gauge_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) diff --git a/lib/widget/group.c b/lib/widget/group.c index 02360e9ba..eb6ba1e89 100644 --- a/lib/widget/group.c +++ b/lib/widget/group.c @@ -60,6 +60,8 @@ typedef struct gboolean enable; } widget_state_info_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/groupbox.c b/lib/widget/groupbox.c index e1f867e0b..49cf7b010 100644 --- a/lib/widget/groupbox.c +++ b/lib/widget/groupbox.c @@ -48,9 +48,13 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static cb_ret_t groupbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) diff --git a/lib/widget/history.c b/lib/widget/history.c index 27e86a1f4..7013017d0 100644 --- a/lib/widget/history.c +++ b/lib/widget/history.c @@ -61,9 +61,13 @@ typedef struct size_t max_width; } history_dlg_data; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static cb_ret_t history_dlg_reposition (WDialog * dlg_head) diff --git a/lib/widget/hline.c b/lib/widget/hline.c index 0076f9fc1..73e261a29 100644 --- a/lib/widget/hline.c +++ b/lib/widget/hline.c @@ -50,6 +50,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/input.c b/lib/widget/input.c index bc8808afe..3a67b4979 100644 --- a/lib/widget/input.c +++ b/lib/widget/input.c @@ -75,12 +75,15 @@ input_colors_t input_colors; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* Input widgets have a global kill ring */ /* Pointer to killed data */ static char *kill_buffer = NULL; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/input_complete.c b/lib/widget/input_complete.c index 5d487c14a..734837277 100644 --- a/lib/widget/input_complete.c +++ b/lib/widget/input_complete.c @@ -87,6 +87,11 @@ typedef struct input_complete_t flags; } try_complete_automation_state_t; +/*** forward declarations (file scope functions) *************************************************/ + +char **try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags); +void complete_engine_fill_completions (WInput * in); + /*** file scope variables ************************************************************************/ static char **hosts = NULL; @@ -99,12 +104,10 @@ static int min_end; static int start = 0; static int end = 0; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -char **try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags); -void complete_engine_fill_completions (WInput * in); - #ifdef DO_COMPLETION_DEBUG /** * Useful to print/debug completion flags diff --git a/lib/widget/label.c b/lib/widget/label.c index d7d06eb4f..5a04a0f0e 100644 --- a/lib/widget/label.c +++ b/lib/widget/label.c @@ -52,9 +52,13 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static cb_ret_t label_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) diff --git a/lib/widget/listbox.c b/lib/widget/listbox.c index efc7a384f..c1b01497b 100644 --- a/lib/widget/listbox.c +++ b/lib/widget/listbox.c @@ -55,9 +55,13 @@ const global_keymap_t *listbox_map = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static int listbox_entry_cmp (const void *a, const void *b, void *user_data) diff --git a/lib/widget/menu.c b/lib/widget/menu.c index 85b6de1a4..dd60c5666 100644 --- a/lib/widget/menu.c +++ b/lib/widget/menu.c @@ -73,8 +73,11 @@ struct menu_t char *help_node; }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/mouse.c b/lib/widget/mouse.c index 6d594117e..15ad5f5a5 100644 --- a/lib/widget/mouse.c +++ b/lib/widget/mouse.c @@ -40,6 +40,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/quick.c b/lib/widget/quick.c index 712fecc8e..35f5d6808 100644 --- a/lib/widget/quick.c +++ b/lib/widget/quick.c @@ -59,6 +59,8 @@ typedef struct quick_widget_t *quick_widget; } quick_widget_item_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/radio.c b/lib/widget/radio.c index ac0b72d8b..8fb52d8b1 100644 --- a/lib/widget/radio.c +++ b/lib/widget/radio.c @@ -49,6 +49,8 @@ const global_keymap_t *radio_map = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/widget/widget-common.c b/lib/widget/widget-common.c index d67426b3f..5e59d68d4 100644 --- a/lib/widget/widget-common.c +++ b/lib/widget/widget-common.c @@ -51,6 +51,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* maximum value of used widget ID */ diff --git a/lib/widget/wtools.c b/lib/widget/wtools.c index d8c274b74..a4af4b5b9 100644 --- a/lib/widget/wtools.c +++ b/lib/widget/wtools.c @@ -50,6 +50,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static WDialog *last_query_dlg; diff --git a/maint/templates/template.c b/maint/templates/template.c index dbd0c4dd3..7ed519af0 100644 --- a/maint/templates/template.c +++ b/maint/templates/template.c @@ -45,8 +45,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/args.c b/src/args.c index 062915353..1d7cdb9a0 100644 --- a/src/args.c +++ b/src/args.c @@ -68,17 +68,18 @@ char *mc_run_param1 = NULL; /*** file scope type declarations ****************************************************************/ -/*** file scope variables ************************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ -/* If true, show version info and exit */ -static gboolean mc_args__show_version = FALSE; - -/* forward declarations */ static gboolean parse_mc_e_argument (const gchar * option_name, const gchar * value, gpointer data, GError ** mcerror); static gboolean parse_mc_v_argument (const gchar * option_name, const gchar * value, gpointer data, GError ** mcerror); +/*** file scope variables ************************************************************************/ + +/* If true, show version info and exit */ +static gboolean mc_args__show_version = FALSE; + static GOptionContext *context; #ifdef ENABLE_SUBSHELL diff --git a/src/background.c b/src/background.c index 495917fe8..41a7f40d4 100644 --- a/src/background.c +++ b/src/background.c @@ -68,6 +68,10 @@ enum ReturnType Return_Integer }; +/*** forward declarations (file scope functions) *************************************************/ + +static int background_attention (int fd, void *closure); + /*** file scope variables ************************************************************************/ /* File descriptor for talking to our parent */ @@ -78,8 +82,7 @@ static int from_parent_fd; TaskList *task_list = NULL; -static int background_attention (int fd, void *closure); - +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/clipboard.c b/src/clipboard.c index 10cb26beb..3c31cb051 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -52,6 +52,8 @@ char *clipboard_paste_path = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static const int clip_open_flags = O_CREAT | O_WRONLY | O_TRUNC | O_BINARY; diff --git a/src/cons.handler.c b/src/cons.handler.c index 6c5424d67..d747ff31c 100644 --- a/src/cons.handler.c +++ b/src/cons.handler.c @@ -68,6 +68,8 @@ do \ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ #ifdef __linux__ @@ -80,6 +82,7 @@ static struct scrshot screen_shot; static struct vid_info screen_info; #endif /* __linux__ */ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/consaver/cons.saver.c b/src/consaver/cons.saver.c index 168deefd9..4867ab6aa 100644 --- a/src/consaver/cons.saver.c +++ b/src/consaver/cons.saver.c @@ -80,8 +80,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/diffviewer/search.c b/src/diffviewer/search.c index afb459e5c..80480ccc1 100644 --- a/src/diffviewer/search.c +++ b/src/diffviewer/search.c @@ -55,6 +55,8 @@ typedef struct mcdiffview_search_options_struct gboolean all_codepages; } mcdiffview_search_options_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static mcdiffview_search_options_t mcdiffview_search_options = { diff --git a/src/diffviewer/ydiff.c b/src/diffviewer/ydiff.c index 74fff3bf8..2012172e3 100644 --- a/src/diffviewer/ydiff.c +++ b/src/diffviewer/ydiff.c @@ -112,8 +112,11 @@ typedef enum FROM_RIGHT_TO_LEFT } action_direction_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/editor/bookmark.c b/src/editor/bookmark.c index 2af110b63..de94bb6fc 100644 --- a/src/editor/bookmark.c +++ b/src/editor/bookmark.c @@ -53,8 +53,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/editor/edit.c b/src/editor/edit.c index f5353b320..293181291 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -116,6 +116,8 @@ const char VERTICAL_MAGIC[] = { '\1', '\1', '\1', '\1', '\n' }; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* detecting an error on save is easy: just check if every byte has been written. */ @@ -565,6 +567,8 @@ edit_pop_undo_action (WEdit * edit) return c; } +/* --------------------------------------------------------------------------------------------- */ + static long edit_pop_redo_action (WEdit * edit) { @@ -594,6 +598,8 @@ edit_pop_redo_action (WEdit * edit) return c; } +/* --------------------------------------------------------------------------------------------- */ + static long get_prev_undo_action (WEdit * edit) { diff --git a/src/editor/editbuffer.c b/src/editor/editbuffer.c index 4910aee9d..24bc7eeab 100644 --- a/src/editor/editbuffer.c +++ b/src/editor/editbuffer.c @@ -98,6 +98,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index cf551c8e2..8d0cd27c5 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -91,6 +91,8 @@ gboolean option_drop_selection_on_copy = TRUE; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static unsigned long edit_save_mode_radio_id, edit_save_mode_input_id; diff --git a/src/editor/editcomplete.c b/src/editor/editcomplete.c index d0c31b9e8..99ac715e6 100644 --- a/src/editor/editcomplete.c +++ b/src/editor/editcomplete.c @@ -51,6 +51,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/editor/editdraw.c b/src/editor/editdraw.c index f528f73ea..1dbf0a871 100644 --- a/src/editor/editdraw.c +++ b/src/editor/editdraw.c @@ -91,6 +91,8 @@ typedef struct unsigned int style; } line_s; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /*** file scope functions ************************************************************************/ diff --git a/src/editor/editmacros.c b/src/editor/editmacros.c index 28df30cea..82fe82b8f 100644 --- a/src/editor/editmacros.c +++ b/src/editor/editmacros.c @@ -43,6 +43,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/editor/editmenu.c b/src/editor/editmenu.c index 4127ee280..a0c4a828c 100644 --- a/src/editor/editmenu.c +++ b/src/editor/editmenu.c @@ -60,8 +60,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/editor/editoptions.c b/src/editor/editoptions.c index e41d45af7..655b8da4e 100644 --- a/src/editor/editoptions.c +++ b/src/editor/editoptions.c @@ -47,6 +47,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static const char *wrap_str[] = { @@ -56,6 +58,7 @@ static const char *wrap_str[] = { NULL }; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ @@ -70,6 +73,7 @@ i18n_translate_array (const char *array[]) } } #endif /* ENABLE_NLS */ + /* --------------------------------------------------------------------------------------------- */ /** * Callback for the iteration of objects in the 'editors' array. diff --git a/src/editor/editsearch.c b/src/editor/editsearch.c index c8490c4c6..7fbe6a4cb 100644 --- a/src/editor/editsearch.c +++ b/src/editor/editsearch.c @@ -64,6 +64,8 @@ edit_search_options_t edit_search_options = { /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index bf847d670..ce5960c20 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -81,14 +81,14 @@ char *edit_window_close_char = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ + static unsigned int edit_dlg_init_refcounter = 0; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ - -static cb_ret_t edit_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, - void *data); - /* --------------------------------------------------------------------------------------------- */ /** * Init the 'edit' subsystem diff --git a/src/editor/etags.c b/src/editor/etags.c index 6cbd3df3d..829031eca 100644 --- a/src/editor/etags.c +++ b/src/editor/etags.c @@ -53,6 +53,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static int def_max_width; diff --git a/src/editor/format.c b/src/editor/format.c index 76f2c4c5f..63ab48aaa 100644 --- a/src/editor/format.c +++ b/src/editor/format.c @@ -67,8 +67,11 @@ char *option_stop_format_chars = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/editor/spell.c b/src/editor/spell.c index e4ddf9c04..4b743275f 100644 --- a/src/editor/spell.c +++ b/src/editor/spell.c @@ -59,6 +59,8 @@ typedef struct aspell_struct AspellSpeller *speller; } spell_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static GModule *spell_module = NULL; diff --git a/src/editor/syntax.c b/src/editor/syntax.c index 029ce0ab9..ed3e16bb5 100644 --- a/src/editor/syntax.c +++ b/src/editor/syntax.c @@ -130,6 +130,8 @@ typedef struct edit_syntax_rule_t rule; } syntax_marker_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static char *error_file_name = NULL; diff --git a/src/execute.c b/src/execute.c index afb268847..c22077475 100644 --- a/src/execute.c +++ b/src/execute.c @@ -63,9 +63,7 @@ int pause_after_run = pause_on_dumb_terminals; /*** file scope type declarations ****************************************************************/ -/*** file scope variables ************************************************************************/ - -/*** file scope functions ************************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ void do_execute (const char *shell, const char *command, int flags); void do_executev (const char *shell, int flags, char *const argv[]); @@ -73,6 +71,10 @@ char *execute_get_external_cmd_opts_from_config (const char *command, const vfs_path_t * filename_vpath, long start_line); +/*** file scope variables ************************************************************************/ + +/* --------------------------------------------------------------------------------------------- */ +/*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ static void diff --git a/src/file_history.c b/src/file_history.c index 9092502c3..e46985e5c 100644 --- a/src/file_history.c +++ b/src/file_history.c @@ -50,6 +50,8 @@ typedef struct file_history_data_t char *file_pos; } file_history_data_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/filemanager/achown.c b/src/filemanager/achown.c index e58fc4b53..1f0fefe8c 100644 --- a/src/filemanager/achown.c +++ b/src/filemanager/achown.c @@ -62,6 +62,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static struct diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c index f6612128b..b74dc3d31 100644 --- a/src/filemanager/boxes.c +++ b/src/filemanager/boxes.c @@ -88,6 +88,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static unsigned long configure_old_esc_mode_id, configure_time_out_id; diff --git a/src/filemanager/cd.c b/src/filemanager/cd.c index 2a9c35297..c2f025b0f 100644 --- a/src/filemanager/cd.c +++ b/src/filemanager/cd.c @@ -50,6 +50,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/filemanager/chattr.c b/src/filemanager/chattr.c index 5dfeb1096..adf9e07be 100644 --- a/src/filemanager/chattr.c +++ b/src/filemanager/chattr.c @@ -87,6 +87,8 @@ struct WChattrBoxes int top; /* The first flag displayed */ }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* see /usr/include/ext2fs/ext2_fs.h diff --git a/src/filemanager/chmod.c b/src/filemanager/chmod.c index 68540f89d..8eb41fb96 100644 --- a/src/filemanager/chmod.c +++ b/src/filemanager/chmod.c @@ -60,6 +60,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static struct diff --git a/src/filemanager/chown.c b/src/filemanager/chown.c index c5cde02b8..3b000d068 100644 --- a/src/filemanager/chown.c +++ b/src/filemanager/chown.c @@ -67,8 +67,9 @@ /*** file scope type declarations ****************************************************************/ -/*** file scope variables ************************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ +/*** file scope variables ************************************************************************/ static struct { diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c index 6874a8261..dbd10ad22 100644 --- a/src/filemanager/cmd.c +++ b/src/filemanager/cmd.c @@ -113,6 +113,8 @@ enum CompareMode compare_thourough }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ #ifdef ENABLE_VFS_NET diff --git a/src/filemanager/command.c b/src/filemanager/command.c index 70eed1901..47d2d750f 100644 --- a/src/filemanager/command.c +++ b/src/filemanager/command.c @@ -63,6 +63,8 @@ WInput *cmdline; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* Color styles command line */ diff --git a/src/filemanager/dir.c b/src/filemanager/dir.c index 117505b3c..ef45071e4 100644 --- a/src/filemanager/dir.c +++ b/src/filemanager/dir.c @@ -60,6 +60,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* Reverse flag */ @@ -73,22 +75,10 @@ static gboolean exec_first = TRUE; static dir_list dir_copy = { NULL, 0, 0, NULL }; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -/* - sort_orders_t sort_orders [SORT_TYPES_TOTAL] = { - { N_("&Unsorted"), unsorted }, - { N_("&Name"), sort_name }, - { N_("&Extension"), sort_ext }, - { N_("&Modify time"), sort_time }, - { N_("&Access time"), sort_atime }, - { N_("C&Hange time"), sort_ctime }, - { N_("&Size"), sort_size }, - { N_("&Inode"), sort_inode }, - }; - */ - static inline int key_collate (const char *t1, const char *t2) { diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c index 50b253b89..b21c4d066 100644 --- a/src/filemanager/ext.c +++ b/src/filemanager/ext.c @@ -85,6 +85,8 @@ typedef char *(*quote_func_t) (const char *name, gboolean quote_percent); +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* This variable points to a copy of the mc.ext file in memory diff --git a/src/filemanager/file.c b/src/filemanager/file.c index e7dc7c748..5a6fd9563 100644 --- a/src/filemanager/file.c +++ b/src/filemanager/file.c @@ -178,6 +178,8 @@ static const char *prompt_parts[] = { N_(" with source mask:") }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* the hard link cache */ diff --git a/src/filemanager/filegui.c b/src/filemanager/filegui.c index c4afab72b..abca59888 100644 --- a/src/filemanager/filegui.c +++ b/src/filemanager/filegui.c @@ -237,6 +237,8 @@ typedef struct struct stat *src_stat, *dst_stat; } file_op_context_ui_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static struct diff --git a/src/filemanager/filemanager.c b/src/filemanager/filemanager.c index eeae5287d..85e0f140d 100644 --- a/src/filemanager/filemanager.c +++ b/src/filemanager/filemanager.c @@ -124,11 +124,15 @@ const char *mc_prompt = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static menu_t *left_menu, *right_menu; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /** Stop MC main dialog and the current dialog if it exists. * Needed to provide fast exit from MC viewer or editor on shell exit */ diff --git a/src/filemanager/filenot.c b/src/filemanager/filenot.c index a6b658014..2bfc76ad8 100644 --- a/src/filemanager/filenot.c +++ b/src/filemanager/filenot.c @@ -52,8 +52,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/filemanager/find.c b/src/filemanager/find.c index 607121c56..9c4d870c5 100644 --- a/src/filemanager/find.c +++ b/src/filemanager/find.c @@ -114,13 +114,15 @@ typedef struct gsize end; } find_match_location_t; -/*** file scope variables ************************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ /* button callbacks */ static int start_stop (WButton * button, int action); static int find_do_view_file (WButton * button, int action); static int find_do_edit_file (WButton * button, int action); +/*** file scope variables ************************************************************************/ + /* Parsed ignore dirs */ static char **find_ignore_dirs = NULL; diff --git a/src/filemanager/hotlist.c b/src/filemanager/hotlist.c index 4a2be10a3..3e24f4c1a 100644 --- a/src/filemanager/hotlist.c +++ b/src/filemanager/hotlist.c @@ -148,6 +148,8 @@ struct hotlist struct hotlist *next; }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static WPanel *our_panel; diff --git a/src/filemanager/info.c b/src/filemanager/info.c index 8b2011707..874e70435 100644 --- a/src/filemanager/info.c +++ b/src/filemanager/info.c @@ -71,10 +71,13 @@ struct WInfo gboolean ready; }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static struct my_statfs myfs_stats; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c index fb686d0c1..fc17b21dc 100644 --- a/src/filemanager/layout.c +++ b/src/filemanager/layout.c @@ -136,6 +136,8 @@ typedef struct int output_lines; } layout_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static struct @@ -185,6 +187,7 @@ static int output_lines_label_len; static WButton *bleft_widget, *bright_widget; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/filemanager/listmode.c b/src/filemanager/listmode.c index d7064f2e1..79e52d291 100644 --- a/src/filemanager/listmode.c +++ b/src/filemanager/listmode.c @@ -83,6 +83,8 @@ struct listmode_label char *text; }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static WListbox *l_listmode; @@ -104,6 +106,7 @@ static char *s_itemwidth[3] = { "Free width", "Fixed width", "Growable width" }; static WRadio *radio_itemwidth; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/filemanager/mountlist.c b/src/filemanager/mountlist.c index 99d5a8309..d7fd73478 100644 --- a/src/filemanager/mountlist.c +++ b/src/filemanager/mountlist.c @@ -341,12 +341,15 @@ struct fs_usage uintmax_t fsu_ffree; /* Free file nodes. */ }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ #ifdef HAVE_INFOMOUNT_LIST static GSList *mc_mount_list = NULL; #endif /* HAVE_INFOMOUNT_LIST */ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index 7b3bbb2d2..97cef9875 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -85,25 +85,6 @@ /* The hook list for the select file function */ hook_t *select_file_hook = NULL; -static const char *string_file_name (file_entry_t *, int); -static const char *string_file_size (file_entry_t *, int); -static const char *string_file_size_brief (file_entry_t *, int); -static const char *string_file_type (file_entry_t *, int); -static const char *string_file_mtime (file_entry_t *, int); -static const char *string_file_atime (file_entry_t *, int); -static const char *string_file_ctime (file_entry_t *, int); -static const char *string_file_permission (file_entry_t *, int); -static const char *string_file_perm_octal (file_entry_t *, int); -static const char *string_file_nlinks (file_entry_t *, int); -static const char *string_inode (file_entry_t *, int); -static const char *string_file_nuid (file_entry_t *, int); -static const char *string_file_ngid (file_entry_t *, int); -static const char *string_file_owner (file_entry_t *, int); -static const char *string_file_group (file_entry_t *, int); -static const char *string_marked (file_entry_t *, int); -static const char *string_space (file_entry_t *, int); -static const char *string_dot (file_entry_t *, int); - mc_fhl_t *mc_filehighlight = NULL; /*** file scope macro definitions ****************************************************************/ @@ -156,6 +137,27 @@ typedef enum FILENAME_SCROLL_RIGHT = 4 } filename_scroll_flag_t; +/*** forward declarations (file scope functions) *************************************************/ + +static const char *string_file_name (file_entry_t *fe, int len); +static const char *string_file_size (file_entry_t *fe, int len); +static const char *string_file_size_brief (file_entry_t *fe, int len); +static const char *string_file_type (file_entry_t *fe, int len); +static const char *string_file_mtime (file_entry_t *fe, int len); +static const char *string_file_atime (file_entry_t *fe, int len); +static const char *string_file_ctime (file_entry_t *fe, int len); +static const char *string_file_permission (file_entry_t *fe, int len); +static const char *string_file_perm_octal (file_entry_t *fe, int len); +static const char *string_file_nlinks (file_entry_t *fe, int len); +static const char *string_inode (file_entry_t *fe, int len); +static const char *string_file_nuid (file_entry_t *fe, int len); +static const char *string_file_ngid (file_entry_t *fe, int len); +static const char *string_file_owner (file_entry_t *fe, int len); +static const char *string_file_group (file_entry_t *fe, int len); +static const char *string_marked (file_entry_t *fe, int len); +static const char *string_space (file_entry_t *fe, int len); +static const char *string_dot (file_entry_t *fe, int len); + /*** file scope variables ************************************************************************/ /* *INDENT-OFF* */ diff --git a/src/filemanager/panelize.c b/src/filemanager/panelize.c index 21324888d..88ce29acb 100644 --- a/src/filemanager/panelize.c +++ b/src/filemanager/panelize.c @@ -67,6 +67,8 @@ typedef struct char *label; } panelize_entry_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static WListbox *l_panelize; diff --git a/src/filemanager/tree.c b/src/filemanager/tree.c index 945fd4864..69458b329 100644 --- a/src/filemanager/tree.c +++ b/src/filemanager/tree.c @@ -100,6 +100,10 @@ struct WTree shown and the selected */ }; +/*** forward declarations (file scope functions) *************************************************/ + +static void tree_rescan (void *data); + /*** file scope variables ************************************************************************/ /* Specifies the display mode: 1d or 2d */ @@ -109,10 +113,6 @@ static gboolean tree_navigation_flag = FALSE; /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -static void tree_rescan (void *data); - -/* --------------------------------------------------------------------------------------------- */ - static tree_entry * back_ptr (tree_entry * ptr, int *count) { diff --git a/src/filemanager/treestore.c b/src/filemanager/treestore.c index ece13f81b..2d23c9375 100644 --- a/src/filemanager/treestore.c +++ b/src/filemanager/treestore.c @@ -70,6 +70,10 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + +static tree_entry *tree_store_add_entry (const vfs_path_t * name); + /*** file scope variables ************************************************************************/ static struct TreeStore ts; @@ -80,10 +84,6 @@ static hook_t *remove_entry_hooks; /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -static tree_entry *tree_store_add_entry (const vfs_path_t * name); - -/* --------------------------------------------------------------------------------------------- */ - static inline void tree_store_dirty (gboolean dirty) { diff --git a/src/help.c b/src/help.c index c5733512e..ff5928c75 100644 --- a/src/help.c +++ b/src/help.c @@ -90,6 +90,8 @@ typedef struct Link_Area const char *link_name; } Link_Area; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static char *fdata = NULL; /* Pointer to the loaded data file */ @@ -113,8 +115,7 @@ static struct static GSList *link_area = NULL; static gboolean inside_link_area = FALSE; -static cb_ret_t help_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data); - +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/keymap.c b/src/keymap.c index bcfa9148e..3f6cce420 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -93,6 +93,8 @@ typedef struct global_keymap_ini_t const char *value; } global_keymap_ini_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* midnight */ @@ -618,12 +620,6 @@ static const global_keymap_ini_t default_diff_keymap[] = { }; #endif -/*** file scope macro definitions ****************************************************************/ - -/*** file scope type declarations ****************************************************************/ - -/*** file scope variables ************************************************************************/ - /* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/learn.c b/src/learn.c index fcdef1372..5fed64314 100644 --- a/src/learn.c +++ b/src/learn.c @@ -65,6 +65,8 @@ typedef struct char *sequence; } learnkey_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static WDialog *learn_dlg; @@ -75,6 +77,7 @@ static int learn_total; static int learnok; static gboolean learnchanged = FALSE; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/main.c b/src/main.c index 3b0a5588c..c18e069c6 100644 --- a/src/main.c +++ b/src/main.c @@ -86,8 +86,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/selcodepage.c b/src/selcodepage.c index 4d74333d2..598b57bc5 100644 --- a/src/selcodepage.c +++ b/src/selcodepage.c @@ -50,12 +50,14 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ - static unsigned char get_hotkey (int n) { @@ -133,8 +135,8 @@ select_charset (int center_y, int center_x, int current_charset, gboolean seldis } } - /* --------------------------------------------------------------------------------------------- */ + /** Set codepage */ gboolean do_set_codepage (int codepage) @@ -158,8 +160,8 @@ do_set_codepage (int codepage) } /* --------------------------------------------------------------------------------------------- */ -/** Show menu selecting codepage */ +/** Show menu selecting codepage */ gboolean do_select_codepage (void) { diff --git a/src/setup.c b/src/setup.c index 746da8514..f5d136645 100644 --- a/src/setup.c +++ b/src/setup.c @@ -222,6 +222,8 @@ GArray *macros_list; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static char *profile_name = NULL; /* ${XDG_CONFIG_HOME}/mc/ini */ diff --git a/src/subshell/common.c b/src/subshell/common.c index d30457fef..3ea4b5ff7 100644 --- a/src/subshell/common.c +++ b/src/subshell/common.c @@ -168,6 +168,8 @@ enum * the cursor. */ #define SHELL_CURSOR_KEYBINDING "+" +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* tcsh closes all non-standard file descriptors, so we have to use a pipe */ diff --git a/src/textconf.c b/src/textconf.c index ed6be478c..e8accd9e8 100644 --- a/src/textconf.c +++ b/src/textconf.c @@ -48,6 +48,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ #ifdef ENABLE_VFS diff --git a/src/usermenu.c b/src/usermenu.c index 22c19bf7b..04c6b6aad 100644 --- a/src/usermenu.c +++ b/src/usermenu.c @@ -69,12 +69,15 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static gboolean debug_flag = FALSE; static gboolean debug_error = FALSE; static char *menu = NULL; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/vfs/cpio/cpio.c b/src/vfs/cpio/cpio.c index 0d511b68c..447d1f644 100644 --- a/src/vfs/cpio/cpio.c +++ b/src/vfs/cpio/cpio.c @@ -139,6 +139,13 @@ typedef struct GSList *deferred; /* List of inodes for which another entries may appear */ } cpio_super_t; +/*** forward declarations (file scope functions) *************************************************/ + +static ssize_t cpio_find_head (struct vfs_class *me, struct vfs_s_super *super); +static ssize_t cpio_read_bin_head (struct vfs_class *me, struct vfs_s_super *super); +static ssize_t cpio_read_oldc_head (struct vfs_class *me, struct vfs_s_super *super); +static ssize_t cpio_read_crc_head (struct vfs_class *me, struct vfs_s_super *super); + /*** file scope variables ************************************************************************/ static struct vfs_s_subclass cpio_subclass; @@ -150,14 +157,6 @@ static off_t cpio_position; /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -static ssize_t cpio_find_head (struct vfs_class *me, struct vfs_s_super *super); -static ssize_t cpio_read_bin_head (struct vfs_class *me, struct vfs_s_super *super); -static ssize_t cpio_read_oldc_head (struct vfs_class *me, struct vfs_s_super *super); -static ssize_t cpio_read_crc_head (struct vfs_class *me, struct vfs_s_super *super); -static ssize_t cpio_read (void *fh, char *buffer, size_t count); - -/* --------------------------------------------------------------------------------------------- */ - static int cpio_defer_find (const void *a, const void *b) { diff --git a/src/vfs/extfs/extfs.c b/src/vfs/extfs/extfs.c index df611f0a3..f6450c717 100644 --- a/src/vfs/extfs/extfs.c +++ b/src/vfs/extfs/extfs.c @@ -95,6 +95,10 @@ typedef struct gboolean need_archive; } extfs_plugin_info_t; +/*** forward declarations (file scope functions) *************************************************/ + +static struct vfs_s_entry *extfs_resolve_symlinks_int (struct vfs_s_entry *entry, GSList * list); + /*** file scope variables ************************************************************************/ static GArray *extfs_plugins = NULL; @@ -111,10 +115,6 @@ static int my_errno = 0; /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -static struct vfs_s_entry *extfs_resolve_symlinks_int (struct vfs_s_entry *entry, GSList * list); - -/* --------------------------------------------------------------------------------------------- */ - static struct extfs_super_t * extfs_super_new (struct vfs_class *me, const char *name, const vfs_path_t * local_name_vpath, int fstype) diff --git a/src/vfs/fish/fish.c b/src/vfs/fish/fish.c index 2fc970af8..51a7e379e 100644 --- a/src/vfs/fish/fish.c +++ b/src/vfs/fish/fish.c @@ -155,6 +155,8 @@ typedef struct gboolean append; } fish_file_handler_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static char reply_str[80]; diff --git a/src/vfs/ftpfs/ftpfs.c b/src/vfs/ftpfs/ftpfs.c index c9dcb6968..36e5f5800 100644 --- a/src/vfs/ftpfs/ftpfs.c +++ b/src/vfs/ftpfs/ftpfs.c @@ -232,6 +232,16 @@ typedef struct gboolean append; } ftp_file_handler_t; +/*** forward declarations (file scope functions) *************************************************/ + +static char *ftpfs_get_current_directory (struct vfs_class *me, struct vfs_s_super *super); +static int ftpfs_chdir_internal (struct vfs_class *me, struct vfs_s_super *super, + const char *remote_path); +static int ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super); +static gboolean ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, + const char *netrcpass); +static gboolean ftpfs_netrc_lookup (const char *host, char **login, char **pass); + /*** file scope variables ************************************************************************/ static int code; @@ -251,29 +261,6 @@ static const char *netrcp; /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -/* char *ftpfs_translate_path (struct ftpfs_connection *bucket, char *remote_path) - Translate a Unix path, i.e. MC's internal path representation (e.g. - /somedir/somefile) to a path valid for the remote server. Every path - transferred to the remote server has to be mangled by this function - right prior to sending it. - Currently only Amiga ftp servers are handled in a special manner. - - When the remote server is an amiga: - a) strip leading slash if necessary - b) replace first occurrence of ":/" with ":" - c) strip trailing "/." - */ - -static char *ftpfs_get_current_directory (struct vfs_class *me, struct vfs_s_super *super); -static int ftpfs_chdir_internal (struct vfs_class *me, struct vfs_s_super *super, - const char *remote_path); -static int ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super); -static gboolean ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, - const char *netrcpass); -static gboolean ftpfs_netrc_lookup (const char *host, char **login, char **pass); - -/* --------------------------------------------------------------------------------------------- */ - static void ftpfs_set_blksize (struct stat *s) { @@ -299,6 +286,17 @@ ftpfs_default_stat (struct vfs_class *me) /* --------------------------------------------------------------------------------------------- */ +/* Translate a Unix path, i.e. MC's internal path representation (e.g. + /somedir/somefile) to a path valid for the remote server. Every path + transferred to the remote server has to be mangled by this function + right prior to sending it. + Currently only Amiga ftp servers are handled in a special manner. + + When the remote server is an amiga: + a) strip leading slash if necessary + b) replace first occurrence of ":/" with ":" + c) strip trailing "/." + */ static char * ftpfs_translate_path (struct vfs_class *me, struct vfs_s_super *super, const char *remote_path) { diff --git a/src/vfs/ftpfs/ftpfs_parse_ls.c b/src/vfs/ftpfs/ftpfs_parse_ls.c index 37f01ef7d..f17dd8e58 100644 --- a/src/vfs/ftpfs/ftpfs_parse_ls.c +++ b/src/vfs/ftpfs/ftpfs_parse_ls.c @@ -79,7 +79,8 @@ typedef enum typedef gboolean (*ftpfs_line_parser) (char *line, struct stat * s, char **filename, char **linkname, int *err); -/* formard declarations */ +/*** forward declarations (file scope functions) *************************************************/ + static gboolean ftpfs_parse_long_list_UNIX (char *line, struct stat *s, char **filename, char **linkname, int *err); static gboolean ftpfs_parse_long_list_NT (char *line, struct stat *s, char **filename, diff --git a/src/vfs/local/local.c b/src/vfs/local/local.c index 1906fc865..5b98b24b2 100644 --- a/src/vfs/local/local.c +++ b/src/vfs/local/local.c @@ -45,6 +45,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static struct vfs_s_subclass local_subclass; @@ -54,15 +56,6 @@ static struct vfs_class *vfs_local_ops = VFS_CLASS (&local_subclass); /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -/** - * Note: Some of this functions are not static. This has rather good - * reason: exactly same functions would have to appear in sfs.c. This - * saves both computer's memory and my work. - */ - - -/* --------------------------------------------------------------------------------------------- */ - static void * local_open (const vfs_path_t * vpath, int flags, mode_t mode) { diff --git a/src/vfs/sfs/sfs.c b/src/vfs/sfs/sfs.c index d65349980..83b1e37fb 100644 --- a/src/vfs/sfs/sfs.c +++ b/src/vfs/sfs/sfs.c @@ -102,6 +102,8 @@ typedef struct cachedfile char *cache; } cachedfile; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static GSList *head = NULL; @@ -117,7 +119,9 @@ static struct sfs_flags_t flags; } sfs_info[MAXFS]; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ static int cachedfile_compare (const void *a, const void *b) diff --git a/src/vfs/sftpfs/config_parser.c b/src/vfs/sftpfs/config_parser.c index 9336f058d..d3e2287e8 100644 --- a/src/vfs/sftpfs/config_parser.c +++ b/src/vfs/sftpfs/config_parser.c @@ -68,6 +68,8 @@ enum config_var_type FILENAME }; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* *INDENT-OFF* */ diff --git a/src/vfs/sftpfs/connection.c b/src/vfs/sftpfs/connection.c index 5d3f22f81..d2466dedb 100644 --- a/src/vfs/sftpfs/connection.c +++ b/src/vfs/sftpfs/connection.c @@ -55,6 +55,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ #ifdef LIBSSH2_KNOWNHOST_KEY_ED25519 diff --git a/src/vfs/sftpfs/file.c b/src/vfs/sftpfs/file.c index a92f6e667..daeb26468 100644 --- a/src/vfs/sftpfs/file.c +++ b/src/vfs/sftpfs/file.c @@ -52,6 +52,8 @@ typedef struct mode_t mode; } sftpfs_file_handler_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/vfs/sftpfs/internal.c b/src/vfs/sftpfs/internal.c index cc3923eb3..f7edbbbf1 100644 --- a/src/vfs/sftpfs/internal.c +++ b/src/vfs/sftpfs/internal.c @@ -48,6 +48,8 @@ GString *sftpfs_filename_buffer = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/vfs/sftpfs/sftpfs.c b/src/vfs/sftpfs/sftpfs.c index 74243485d..551928d7b 100644 --- a/src/vfs/sftpfs/sftpfs.c +++ b/src/vfs/sftpfs/sftpfs.c @@ -50,6 +50,8 @@ struct vfs_class *vfs_sftpfs_ops = VFS_CLASS (&sftpfs_subclass); /* used /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/vfs/tar/tar.c b/src/vfs/tar/tar.c index ee0d8e5b2..077857d7f 100644 --- a/src/vfs/tar/tar.c +++ b/src/vfs/tar/tar.c @@ -243,6 +243,8 @@ typedef struct enum archive_format type; /* Type of the archive */ } tar_super_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static struct vfs_s_subclass tarfs_subclass; diff --git a/src/vfs/undelfs/undelfs.c b/src/vfs/undelfs/undelfs.c index 67465ab7e..df3d1fd45 100644 --- a/src/vfs/undelfs/undelfs.c +++ b/src/vfs/undelfs/undelfs.c @@ -111,6 +111,8 @@ typedef struct size_t count; /* bytes to read */ } undelfs_file; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* We only allow one opened ext2fs */ diff --git a/src/viewer/actions_cmd.c b/src/viewer/actions_cmd.c index 836184f00..750987a04 100644 --- a/src/viewer/actions_cmd.c +++ b/src/viewer/actions_cmd.c @@ -77,6 +77,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/viewer/ascii.c b/src/viewer/ascii.c index 6d06e951a..f786dcc27 100644 --- a/src/viewer/ascii.c +++ b/src/viewer/ascii.c @@ -189,6 +189,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/viewer/coord_cache.c b/src/viewer/coord_cache.c index a27eae7aa..190dbd528 100644 --- a/src/viewer/coord_cache.c +++ b/src/viewer/coord_cache.c @@ -71,6 +71,8 @@ typedef gboolean (*cmp_func_t) (const coord_cache_entry_t * a, const coord_cache_entry_t * b); +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/viewer/datasource.c b/src/viewer/datasource.c index ac2fd96c5..ea4199cbe 100644 --- a/src/viewer/datasource.c +++ b/src/viewer/datasource.c @@ -67,6 +67,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/viewer/display.c b/src/viewer/display.c index c8e4dc35d..63a3b9629 100644 --- a/src/viewer/display.c +++ b/src/viewer/display.c @@ -60,6 +60,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* If set, show a ruler */ @@ -70,6 +72,7 @@ static enum ruler_type RULER_BOTTOM } ruler = RULER_NONE; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/viewer/hex.c b/src/viewer/hex.c index 74cde23ac..c0cf7d0f5 100644 --- a/src/viewer/hex.c +++ b/src/viewer/hex.c @@ -65,13 +65,14 @@ typedef enum MARK_CHANGED } mark_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static const char hex_char[] = "0123456789ABCDEF"; -/*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ - +/*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ /** Determine the state of the current byte. * diff --git a/src/viewer/mcviewer.c b/src/viewer/mcviewer.c index 153378e32..2430c0fe8 100644 --- a/src/viewer/mcviewer.c +++ b/src/viewer/mcviewer.c @@ -79,6 +79,8 @@ char *mcview_show_eof = NULL; /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/viewer/move.c b/src/viewer/move.c index 543eae929..4f15b7cfb 100644 --- a/src/viewer/move.c +++ b/src/viewer/move.c @@ -61,6 +61,8 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/viewer/nroff.c b/src/viewer/nroff.c index ec95355ca..f864bae40 100644 --- a/src/viewer/nroff.c +++ b/src/viewer/nroff.c @@ -52,8 +52,11 @@ /*** file scope type declarations ****************************************************************/ +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ diff --git a/src/viewer/search.c b/src/viewer/search.c index acd473987..f470a361b 100644 --- a/src/viewer/search.c +++ b/src/viewer/search.c @@ -69,6 +69,8 @@ typedef struct off_t offset; } mcview_search_status_msg_t; +/*** forward declarations (file scope functions) *************************************************/ + /*** file scope variables ************************************************************************/ static int search_cb_char_curr_index = -1; 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 acfe94702..7c6ef18e6 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 @@ -57,6 +57,12 @@ typedef enum FORMAT_LS } output_format_t; +/*** forward declarations (file scope functions) *************************************************/ + +static gboolean +parse_format_name_argument (const gchar * option_name, const gchar * value, gpointer data, + GError ** error); + /*** file scope variables ************************************************************************/ /* Command-line options. */ @@ -68,11 +74,6 @@ static output_format_t opt_output_format = FORMAT_LS; /* Misc. */ static int error_count = 0; -/* forward declarations */ -static gboolean -parse_format_name_argument (const gchar * option_name, const gchar * value, gpointer data, - GError ** error); - static GOptionEntry entries[] = { {"drop-mtime", 0, 0, G_OPTION_ARG_NONE, &opt_drop_mtime, "Don't include mtime in the output.", NULL}, @@ -86,6 +87,7 @@ static GOptionEntry entries[] = { G_OPTION_ENTRY_NULL }; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ /**