Update template for .c files.

Add section for forward declarations of local functions. This section is
located before file scope variables because functions can be used in
strucutres (see find.c for example):

/*** 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 ************************************************************************/

static struct
{
    ...
    bcback_fn callback;
} fbuts[] =
{
    ...
    { B_STOP, NORMAL_BUTTON, N_("S&uspend"), 0, 0, NULL, start_stop },
    ...
    { B_VIEW, NORMAL_BUTTON, N_("&View - F3"), 0, 0, NULL, find_do_view_file },
    { B_VIEW, NORMAL_BUTTON, N_("&Edit - F4"), 0, 0, NULL, find_do_edit_file }
};

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2023-02-24 09:27:11 +03:00
parent e1ff8d94e4
commit 7257f794d2
155 changed files with 499 additions and 132 deletions

View File

@ -58,8 +58,11 @@ const char *cp_source = NULL;
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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;

View File

@ -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 ****************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -43,6 +43,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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)

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -39,6 +39,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -42,6 +42,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
static gboolean xdg_vars_initialized = FALSE;

View File

@ -33,6 +33,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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)

View File

@ -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,

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -38,6 +38,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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,

View File

@ -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)

View File

@ -46,8 +46,11 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/**

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -40,10 +40,12 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
static void

View File

@ -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)

View File

@ -30,6 +30,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -35,6 +35,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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)

View File

@ -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 */

View File

@ -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 = '?';

View File

@ -41,6 +41,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
static const char replch = '?';

View File

@ -57,6 +57,8 @@ struct term_form
gboolean compose;
};
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
static const char replch[] = "\xEF\xBF\xBD";

View File

@ -39,6 +39,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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

View File

@ -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[] = {

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -48,8 +48,11 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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[] = {

View File

@ -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

View File

@ -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 */

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -72,6 +72,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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];

View File

@ -98,6 +98,8 @@ struct dirhandle
/*** file scope variables ************************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -100,6 +100,8 @@ struct vfs_stamping
gint64 time;
};
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
static GSList *stamps = NULL;

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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 */

View File

@ -54,8 +54,11 @@ extern GPtrArray *vfs__classes_list;
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -95,6 +95,8 @@ struct vfs_openfile
void *fsinfo;
};
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/** They keep track of the current directory */

View File

@ -42,6 +42,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -52,8 +52,11 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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)

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -75,6 +75,8 @@ const global_keymap_t *dialog_map = NULL;
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -45,6 +45,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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)

View File

@ -60,6 +60,8 @@ typedef struct
gboolean enable;
} widget_state_info_t;
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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)

View File

@ -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)

View File

@ -50,6 +50,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -73,8 +73,11 @@ struct menu_t
char *help_node;
};
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -40,6 +40,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -59,6 +59,8 @@ typedef struct
quick_widget_t *quick_widget;
} quick_widget_item_t;
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -49,6 +49,8 @@ const global_keymap_t *radio_map = NULL;
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -51,6 +51,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* maximum value of used widget ID */

View File

@ -50,6 +50,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
static WDialog *last_query_dlg;

View File

@ -45,8 +45,11 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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;

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -80,8 +80,11 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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 = {

View File

@ -112,8 +112,11 @@ typedef enum
FROM_RIGHT_TO_LEFT
} action_direction_t;
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -53,8 +53,11 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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)
{

View File

@ -98,6 +98,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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;

View File

@ -51,6 +51,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -91,6 +91,8 @@ typedef struct
unsigned int style;
} line_s;
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/*** file scope functions ************************************************************************/

View File

@ -43,6 +43,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -60,8 +60,11 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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.

View File

@ -64,6 +64,8 @@ edit_search_options_t edit_search_options = {
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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

View File

@ -53,6 +53,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
static int def_max_width;

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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 ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

View File

@ -62,6 +62,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
static struct

View File

@ -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;

View File

@ -50,6 +50,8 @@
/*** file scope type declarations ****************************************************************/
/*** forward declarations (file scope functions) *************************************************/
/*** file scope variables ************************************************************************/
/* --------------------------------------------------------------------------------------------- */

Some files were not shown because too many files have changed in this diff Show More