mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Warning fixes.
Miguel.
This commit is contained in:
parent
befc99bf8d
commit
bf682eb9d1
@ -1,4 +1,7 @@
|
||||
1998-12-01 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
1998-12-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* Added prototypes, made private functions static, clean up
|
||||
various silly warnings.
|
||||
|
||||
* main.c (main): Removed crufty init_sigfatal code.
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "file.h"
|
||||
#include "chmod.h"
|
||||
#include "main.h"
|
||||
#include "achown.h"
|
||||
#include "../vfs/vfs.h"
|
||||
|
||||
#define BX 5
|
||||
@ -593,7 +594,8 @@ static void init_chown_advanced (void)
|
||||
add_widget (ch_dlg, b_att[0]);
|
||||
}
|
||||
|
||||
void chown_advanced_done (void)
|
||||
static void
|
||||
chown_advanced_done (void)
|
||||
{
|
||||
free (sf_stat);
|
||||
if (need_update)
|
||||
@ -653,7 +655,8 @@ static void apply_advanced_chowns (struct stat *sf)
|
||||
} while (cpanel->marked);
|
||||
}
|
||||
|
||||
void chown_advanced_cmd (void)
|
||||
void
|
||||
chown_advanced_cmd (void)
|
||||
{
|
||||
|
||||
files_on_begin = cpanel->marked;
|
||||
|
@ -175,7 +175,7 @@ do_background (char *info)
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
static char *
|
||||
background_title (char *str)
|
||||
{
|
||||
char *result = copy_strings (_("Background process:"), str, NULL);
|
||||
@ -184,7 +184,7 @@ background_title (char *str)
|
||||
}
|
||||
|
||||
/* {{{ Routines that do the real job */
|
||||
void
|
||||
static void
|
||||
real_message_1s (enum OperationMode mode, int *flags, char *title, char *str1)
|
||||
{
|
||||
char *full_title;
|
||||
@ -200,7 +200,7 @@ real_message_1s (enum OperationMode mode, int *flags, char *title, char *str1)
|
||||
free (full_title);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
real_message_2s (enum OperationMode mode, int *flags, char *title, char *str1, char *str2)
|
||||
{
|
||||
char *full_title;
|
||||
@ -216,7 +216,7 @@ real_message_2s (enum OperationMode mode, int *flags, char *title, char *str1, c
|
||||
free (full_title);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
real_message_3s (enum OperationMode mode, int *flags, char *title, char *str1, char *str2, const char *str3)
|
||||
{
|
||||
char *full_title;
|
||||
@ -396,7 +396,7 @@ background_attention (int fd, void *xpid)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ client RPC routines */
|
||||
void
|
||||
static void
|
||||
parent_call_header (void *routine, int argc, enum ReturnType type)
|
||||
{
|
||||
write (parent_fd, &routine, sizeof (routine));
|
||||
@ -430,7 +430,7 @@ parent_call (void *routine, int argc, ...)
|
||||
return i;
|
||||
}
|
||||
|
||||
char *
|
||||
static char *
|
||||
parent_call_string (void *routine, int argc, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
38
src/boxes.c
38
src/boxes.c
@ -77,7 +77,8 @@ static char *displays [LIST_TYPES] = {
|
||||
|
||||
static int user_hotkey = 'u';
|
||||
|
||||
static int display_callback (struct Dlg_head *h, int id, int Msg)
|
||||
static int
|
||||
display_callback (struct Dlg_head *h, int id, int Msg)
|
||||
{
|
||||
#ifndef HAVE_X
|
||||
switch (Msg){
|
||||
@ -132,8 +133,9 @@ static int display_callback (struct Dlg_head *h, int id, int Msg)
|
||||
return MSG_NOT_HANDLED;
|
||||
}
|
||||
|
||||
static void display_init (int radio_sel, char *init_text,
|
||||
int _check_status, char ** _status)
|
||||
static void
|
||||
display_init (int radio_sel, char *init_text,
|
||||
int _check_status, char ** _status)
|
||||
{
|
||||
char* user_mini_status = _("user &Mini status");
|
||||
char* ok_button = _("&Ok");
|
||||
@ -215,8 +217,8 @@ static void display_init (int radio_sel, char *init_text,
|
||||
add_widgetl (dd, my_radio, XV_WLAY_BELOWCLOSE);
|
||||
}
|
||||
|
||||
int display_box (WPanel *panel, char **userp, char **minip, int *use_msformat,
|
||||
int num)
|
||||
int
|
||||
display_box (WPanel *panel, char **userp, char **minip, int *use_msformat, int num)
|
||||
{
|
||||
int result, i;
|
||||
char *section = NULL;
|
||||
@ -269,7 +271,8 @@ int SORT_X = 40, SORT_Y = 14;
|
||||
|
||||
char *sort_orders_names [SORT_TYPES];
|
||||
|
||||
sortfn *sort_box (sortfn *sort_fn, int *reverse, int *case_sensitive)
|
||||
sortfn *
|
||||
sort_box (sortfn *sort_fn, int *reverse, int *case_sensitive)
|
||||
{
|
||||
int i, r, l;
|
||||
sortfn *result;
|
||||
@ -393,7 +396,8 @@ static QuickDialog confirmation =
|
||||
{ CONFX, CONFY, -1, -1, N_(" Confirmation "), "[Confirmation]", "quick_confirm",
|
||||
conf_widgets, 0 };
|
||||
|
||||
void confirm_box ()
|
||||
void
|
||||
confirm_box ()
|
||||
{
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
@ -475,7 +479,8 @@ static QuickDialog display_bits =
|
||||
{ DISPX, DISPY, -1, -1, N_(" Display bits "), "[Display bits]",
|
||||
"dbits", display_widgets, 0 };
|
||||
|
||||
void display_bits_box ()
|
||||
void
|
||||
display_bits_box ()
|
||||
{
|
||||
int current_mode;
|
||||
|
||||
@ -545,7 +550,8 @@ void display_bits_box ()
|
||||
|
||||
static int tree_colors [4];
|
||||
|
||||
static int tree_callback (struct Dlg_head *h, int id, int msg)
|
||||
static int
|
||||
tree_callback (struct Dlg_head *h, int id, int msg)
|
||||
{
|
||||
switch (msg){
|
||||
|
||||
@ -565,7 +571,8 @@ static int tree_callback (struct Dlg_head *h, int id, int msg)
|
||||
}
|
||||
|
||||
#ifndef HAVE_GNOME
|
||||
char *tree (char *current_dir)
|
||||
char *
|
||||
tree (char *current_dir)
|
||||
{
|
||||
WTree *mytree;
|
||||
Dlg_head *dlg;
|
||||
@ -687,7 +694,8 @@ static QuickDialog confvfs_dlg =
|
||||
#define VFS_WIDGETBASE 0
|
||||
#endif
|
||||
|
||||
void configure_vfs ()
|
||||
void
|
||||
configure_vfs (void)
|
||||
{
|
||||
char buffer1 [15], buffer2 [15];
|
||||
#if defined(USE_NETCODE)
|
||||
@ -758,7 +766,8 @@ void configure_vfs ()
|
||||
|
||||
#endif
|
||||
|
||||
char *cd_dialog (void)
|
||||
char *
|
||||
cd_dialog (void)
|
||||
{
|
||||
QuickDialog Quick_input;
|
||||
QuickWidget quick_widgets [] = {
|
||||
@ -809,8 +818,9 @@ char *cd_dialog (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void symlink_dialog (char *existing, char *new, char **ret_existing,
|
||||
char **ret_new)
|
||||
void
|
||||
symlink_dialog (char *existing, char *new, char **ret_existing,
|
||||
char **ret_new)
|
||||
{
|
||||
QuickDialog Quick_input;
|
||||
QuickWidget quick_widgets [] = {
|
||||
|
22
src/boxes.h
22
src/boxes.h
@ -3,14 +3,16 @@
|
||||
|
||||
extern char *user_format [];
|
||||
|
||||
int display_box (WPanel *p, char **user, char **mini, int *use_msformat, int num);
|
||||
sortfn *sort_box (sortfn *sort_fn, int *reverse, int *case_sensitive);
|
||||
void confirm_box (void);
|
||||
void display_bits_box ();
|
||||
#ifdef USE_VFS
|
||||
void configure_vfs ();
|
||||
#endif
|
||||
void jobs_cmd ();
|
||||
char *cd_dialog (void);
|
||||
void symlink_dialog (char *existing, char *new, char **ret_existing, char **ret_new);
|
||||
int display_box (WPanel *p, char **user, char **mini,
|
||||
int *use_msformat, int num);
|
||||
sortfn *sort_box (sortfn *sort_fn, int *reverse,
|
||||
int *case_sensitive);
|
||||
void confirm_box (void);
|
||||
void display_bits_box (void);
|
||||
void configure_vfs (void);
|
||||
void jobs_cmd (void);
|
||||
char *cd_dialog (void);
|
||||
void symlink_dialog (char *existing, char *new,
|
||||
char **ret_existing, char **ret_new);
|
||||
|
||||
#endif
|
||||
|
27
src/chown.c
27
src/chown.c
@ -98,7 +98,8 @@ static struct {
|
||||
};
|
||||
|
||||
#ifndef HAVE_X
|
||||
static void chown_refresh (void)
|
||||
static void
|
||||
chown_refresh (void)
|
||||
{
|
||||
attrset (COLOR_NORMAL);
|
||||
dlg_erase (ch_dlg);
|
||||
@ -132,7 +133,8 @@ static void chown_refresh (void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static char *next_file (void)
|
||||
static char *
|
||||
next_file (void)
|
||||
{
|
||||
while (!cpanel->dir.list[current_file].f.marked)
|
||||
current_file++;
|
||||
@ -140,7 +142,8 @@ static char *next_file (void)
|
||||
return cpanel->dir.list[current_file].fname;
|
||||
}
|
||||
|
||||
static int chown_callback (Dlg_head * h, int Par, int Msg)
|
||||
static int
|
||||
chown_callback (Dlg_head * h, int Par, int Msg)
|
||||
{
|
||||
switch (Msg) {
|
||||
#ifndef HAVE_X
|
||||
@ -152,12 +155,14 @@ static int chown_callback (Dlg_head * h, int Par, int Msg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_call (void *data)
|
||||
static int
|
||||
l_call (void *data)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void init_chown (void)
|
||||
static void
|
||||
init_chown (void)
|
||||
{
|
||||
int i;
|
||||
struct passwd *l_pass;
|
||||
@ -210,14 +215,16 @@ static void init_chown (void)
|
||||
tk_end_frame ();
|
||||
}
|
||||
|
||||
void chown_done (void)
|
||||
static void
|
||||
chown_done (void)
|
||||
{
|
||||
if (need_update)
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
static inline void do_chown (uid_t u, gid_t g)
|
||||
static inline void
|
||||
do_chown (uid_t u, gid_t g)
|
||||
{
|
||||
if (mc_chown (cpanel->dir.list [current_file].fname, u, g) == -1)
|
||||
message (1, MSG_ERROR, _(" Couldn't chown \"%s\" \n %s "),
|
||||
@ -226,7 +233,8 @@ static inline void do_chown (uid_t u, gid_t g)
|
||||
do_file_mark (cpanel, current_file, 0);
|
||||
}
|
||||
|
||||
static void apply_chowns (uid_t u, gid_t g)
|
||||
static void
|
||||
apply_chowns (uid_t u, gid_t g)
|
||||
{
|
||||
char *fname;
|
||||
|
||||
@ -242,7 +250,8 @@ static void apply_chowns (uid_t u, gid_t g)
|
||||
|
||||
#define chown_label(n,txt) label_set_text (chown_label [n].l, txt)
|
||||
|
||||
void chown_cmd (void)
|
||||
void
|
||||
chown_cmd (void)
|
||||
{
|
||||
char *fname;
|
||||
struct stat sf_stat;
|
||||
|
@ -119,7 +119,8 @@ int is_right;
|
||||
/* defined in this file may receive a 0 parameter if they are invoked */
|
||||
/* The drop down menu */
|
||||
|
||||
WPanel *get_a_panel (WPanel *panel)
|
||||
static WPanel *
|
||||
get_a_panel (WPanel *panel)
|
||||
{
|
||||
if (panel)
|
||||
return panel;
|
||||
|
@ -80,7 +80,8 @@ int ignore_filenames = 0;
|
||||
/* to hint the filename_completion_function */
|
||||
int look_for_executables = 0;
|
||||
|
||||
char *filename_completion_function (char *text, int state)
|
||||
static char *
|
||||
filename_completion_function (char *text, int state)
|
||||
{
|
||||
static DIR *directory;
|
||||
static char *filename = NULL;
|
||||
@ -246,7 +247,8 @@ char *username_completion_function (char *text, int state)
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
char *username_completion_function (char *text, int state)
|
||||
static char *
|
||||
username_completion_function (char *text, int state)
|
||||
{
|
||||
static struct passwd *entry;
|
||||
static int userlen;
|
||||
@ -282,7 +284,8 @@ extern char **environ;
|
||||
|
||||
/* We assume text [0] == '$' and want to have a look at text [1], if it is
|
||||
equal to '{', so that we should append '}' at the end */
|
||||
char *variable_completion_function (char *text, int state)
|
||||
static char *
|
||||
variable_completion_function (char *text, int state)
|
||||
{
|
||||
static char **env_p;
|
||||
static int varlen, isbrace;
|
||||
@ -396,7 +399,8 @@ static void fetch_hosts (char *filename)
|
||||
fclose (file);
|
||||
}
|
||||
|
||||
char *hostname_completion_function (char *text, int state)
|
||||
static char *
|
||||
hostname_completion_function (char *text, int state)
|
||||
{
|
||||
static char **host_p;
|
||||
static int textstart, textlen;
|
||||
@ -443,11 +447,14 @@ char *hostname_completion_function (char *text, int state)
|
||||
}
|
||||
}
|
||||
|
||||
/* This is the function to call when the word to complete is in a position
|
||||
where a command word can be found. It looks around $PATH, looking for
|
||||
commands that match. It also scans aliases, function names, and the
|
||||
table of shell built-ins. */
|
||||
char *command_completion_function (char *text, int state)
|
||||
/*
|
||||
* This is the function to call when the word to complete is in a position
|
||||
* where a command word can be found. It looks around $PATH, looking for
|
||||
* commands that match. It also scans aliases, function names, and the
|
||||
* table of shell built-ins.
|
||||
*/
|
||||
static char *
|
||||
command_completion_function (char *text, int state)
|
||||
{
|
||||
static int isabsolute;
|
||||
static int phase;
|
||||
@ -571,7 +578,8 @@ char *command_completion_function (char *text, int state)
|
||||
|
||||
}
|
||||
|
||||
int match_compare (const void *a, const void *b)
|
||||
static int
|
||||
match_compare (const void *a, const void *b)
|
||||
{
|
||||
return strcmp (*(char **)a, *(char **)b);
|
||||
}
|
||||
@ -583,7 +591,8 @@ int match_compare (const void *a, const void *b)
|
||||
want to complete as the first argument and an count of previous matches
|
||||
as the second.
|
||||
In case no matches were found we return NULL. */
|
||||
char **completion_matches (char *text, CompletionFunction entry_function)
|
||||
static char **
|
||||
completion_matches (char *text, CompletionFunction entry_function)
|
||||
{
|
||||
/* Number of slots in match_list. */
|
||||
int match_list_size;
|
||||
@ -658,7 +667,8 @@ char **completion_matches (char *text, CompletionFunction entry_function)
|
||||
return match_list;
|
||||
}
|
||||
|
||||
int check_is_cd (char *text, int start, int flags)
|
||||
static int
|
||||
check_is_cd (char *text, int start, int flags)
|
||||
{
|
||||
char *p, *q = text + start;
|
||||
|
||||
@ -672,7 +682,8 @@ int check_is_cd (char *text, int start, int flags)
|
||||
}
|
||||
|
||||
/* Returns an array of matches, or NULL if none. */
|
||||
char **try_complete (char *text, int *start, int *end, int flags)
|
||||
static char **
|
||||
try_complete (char *text, int *start, int *end, int flags)
|
||||
{
|
||||
int in_command_position = 0, i;
|
||||
char *word, c;
|
||||
@ -963,7 +974,8 @@ static int querylist_callback (void *data)
|
||||
#define DO_INSERTION 1
|
||||
#define DO_QUERY 2
|
||||
/* Returns 1 if the user would like to see us again */
|
||||
int complete_engine (WInput *in, int what_to_do)
|
||||
static int
|
||||
complete_engine (WInput *in, int what_to_do)
|
||||
{
|
||||
if (in->completions && in->point != end)
|
||||
free_completions (in);
|
||||
|
@ -30,6 +30,7 @@
|
||||
#define DIR_H_INCLUDE_HANDLE_DIRENT
|
||||
#include "dir.h"
|
||||
#include "util.h"
|
||||
#include "dialog.h"
|
||||
#include "tree.h"
|
||||
#include "../vfs/vfs.h"
|
||||
|
||||
|
@ -294,7 +294,7 @@ void xv_Layout (void *first_widget, ...);
|
||||
void tk_layout (void *first_widget, ...);
|
||||
void tk_new_frame (Dlg_head *, char *);
|
||||
void tk_frame (Dlg_head *, char *);
|
||||
void tk_end_frame ();
|
||||
void tk_end_frame (void);
|
||||
void x_set_dialog_title (Dlg_head *h, char *title);
|
||||
|
||||
/* The inner workings of run_dlg, exported for the Tk and XView toolkits */
|
||||
|
16
src/file.c
16
src/file.c
@ -224,7 +224,7 @@ static int erase_file (char *s);
|
||||
|
||||
enum CaseConvs { NO_CONV=0, UP_CHAR=1, LOW_CHAR=2, UP_SECT=4, LOW_SECT=8 };
|
||||
|
||||
int
|
||||
static int
|
||||
convert_case (int c, enum CaseConvs *conversion)
|
||||
{
|
||||
if (*conversion & UP_CHAR){
|
||||
@ -331,7 +331,7 @@ transform_source (char *source)
|
||||
return q;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
free_linklist (struct link **linklist)
|
||||
{
|
||||
struct link *lp, *lp2;
|
||||
@ -343,7 +343,7 @@ free_linklist (struct link **linklist)
|
||||
*linklist = NULL;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
is_in_linklist (struct link *lp, char *path, struct stat *sb)
|
||||
{
|
||||
ino_t ino = sb->st_ino;
|
||||
@ -363,9 +363,11 @@ is_in_linklist (struct link *lp, char *path, struct stat *sb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Returns 0 if the inode wasn't found in the cache and 1 if it was found
|
||||
and a hardlink was succesfully made */
|
||||
int
|
||||
/*
|
||||
* Returns 0 if the inode wasn't found in the cache and 1 if it was found
|
||||
* and a hardlink was succesfully made
|
||||
*/
|
||||
static int
|
||||
check_hardlinks (char *src_name, char *dst_name, struct stat *pstat)
|
||||
{
|
||||
struct link *lp;
|
||||
@ -1850,7 +1852,7 @@ files_error (char *format, char *file1, char *file2)
|
||||
return do_file_error (cmd_buf);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
real_query_recursive (enum OperationMode mode, char *s)
|
||||
{
|
||||
char *confirm, *text;
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "color.h"
|
||||
#include "global.h"
|
||||
#include "setup.h"
|
||||
#include "find.h"
|
||||
|
||||
/* Dialog manager and widgets */
|
||||
#include "dlg.h"
|
||||
@ -390,7 +391,7 @@ locate_egrep (void)
|
||||
* Search with egrep the global (FIXME) content_pattern string in the
|
||||
* DIRECTORY/FILE. It will add the found entries to the find listbox.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
search_content (Dlg_head *h, char *directory, char *filename)
|
||||
{
|
||||
struct stat s;
|
||||
|
23
src/find.h
23
src/find.h
@ -1,27 +1,6 @@
|
||||
#ifndef __FIND_H
|
||||
#define __FIND_H
|
||||
|
||||
#define MAX_FIND_MENU 4 /* Maximum Menu */
|
||||
#define MAX_FIND_FLINES 11 /* Size of Window Where files are stored */
|
||||
#define MAX_FIND_TLINES 4 /* Size of Window Where Menu and text .. */
|
||||
#define MAX_FIND_COLS 48 /* Length of Windows */
|
||||
#define FIND_DIALOG_SIZE MAX_FIND_FLINES+MAX_FIND_TLINES
|
||||
/* Total size of the whole dialog */
|
||||
|
||||
typedef struct find_list{
|
||||
int selected; /* Selection field */
|
||||
int ypos; /* For Scrolling */
|
||||
int isdir; /* For adding a '\t' on FALSE */
|
||||
char *fname; /* Name of the file */
|
||||
char *path; /* For changing panel */
|
||||
struct find_list *up;
|
||||
struct find_list *down;
|
||||
}find_list;
|
||||
|
||||
typedef struct FStack{ /* The Stack will be used to store */
|
||||
char *dir_name; /* the directories to search */
|
||||
struct FStack *next; /* single-linked */
|
||||
}FStack;
|
||||
|
||||
void do_find(void);
|
||||
void do_find (void);
|
||||
#endif
|
||||
|
@ -66,7 +66,8 @@ int statfs (); /* We leave the type ambiguous intentionally here */
|
||||
BLOCKS FROMSIZE-byte blocks, rounding away from zero.
|
||||
TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */
|
||||
|
||||
long fs_adjust_blocks (long blocks, int fromsize, int tosize)
|
||||
static long
|
||||
fs_adjust_blocks (long blocks, int fromsize, int tosize)
|
||||
{
|
||||
if (tosize <= 0)
|
||||
abort ();
|
||||
|
15
src/help.c
15
src/help.c
@ -129,7 +129,8 @@ static int acs2pc (int acscode)
|
||||
|
||||
/* returns the position where text was found in the start buffer */
|
||||
/* or 0 if not found */
|
||||
char *search_string (char *start, char *text)
|
||||
static char *
|
||||
search_string (char *start, char *text)
|
||||
{
|
||||
char *d = text;
|
||||
char *e = start;
|
||||
@ -549,7 +550,8 @@ static int help_event (Gpm_Event *event, Widget *w)
|
||||
}
|
||||
|
||||
/* show help */
|
||||
void help_help_cmd (Dlg_head *h)
|
||||
static void
|
||||
help_help_cmd (Dlg_head *h)
|
||||
{
|
||||
history_ptr = (history_ptr+1) % HISTORY_SIZE;
|
||||
history [history_ptr].page = currentpoint;
|
||||
@ -561,7 +563,8 @@ void help_help_cmd (Dlg_head *h)
|
||||
#endif
|
||||
}
|
||||
|
||||
void help_index_cmd (Dlg_head *h)
|
||||
static void
|
||||
help_index_cmd (Dlg_head *h)
|
||||
{
|
||||
char *new_item;
|
||||
|
||||
@ -755,13 +758,15 @@ static int help_callback (struct Dlg_head *h, int id, int msg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void interactive_display_finish (void)
|
||||
static void
|
||||
interactive_display_finish (void)
|
||||
{
|
||||
clear_link_areas ();
|
||||
free (data);
|
||||
}
|
||||
|
||||
void interactive_display (char *filename, char *node)
|
||||
void
|
||||
interactive_display (char *filename, char *node)
|
||||
{
|
||||
WButtonBar *help_bar;
|
||||
Widget *md;
|
||||
|
@ -1082,7 +1082,8 @@ char *hotlist_cmd (int vfs_or_hotlist)
|
||||
return target;
|
||||
}
|
||||
|
||||
void load_group (struct hotlist *grp)
|
||||
static void
|
||||
load_group (struct hotlist *grp)
|
||||
{
|
||||
void *profile_keys;
|
||||
char *key, *value;
|
||||
@ -1324,7 +1325,7 @@ hot_load_file (struct hotlist * grp)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
clean_up_hotlist_groups (char *section)
|
||||
{
|
||||
char *grp_section;
|
||||
@ -1476,7 +1477,8 @@ void load_hotlist (void)
|
||||
current_group = hotlist;
|
||||
}
|
||||
|
||||
void save_group (struct hotlist *grp)
|
||||
static void
|
||||
save_group (struct hotlist *grp)
|
||||
{
|
||||
struct hotlist *current = grp->head;
|
||||
char *group_section;
|
||||
@ -1508,7 +1510,8 @@ void save_group (struct hotlist *grp)
|
||||
|
||||
static int list_level = 0;
|
||||
|
||||
void hot_save_group (struct hotlist *grp)
|
||||
static void
|
||||
hot_save_group (struct hotlist *grp)
|
||||
{
|
||||
struct hotlist *current = grp->head;
|
||||
int i;
|
||||
|
@ -66,7 +66,8 @@ static void info_box (Dlg_head *h, WInfo *info)
|
||||
}
|
||||
#endif
|
||||
|
||||
void info_show_info (WInfo *info)
|
||||
static void
|
||||
info_show_info (WInfo *info)
|
||||
{
|
||||
struct stat buf;
|
||||
|
||||
|
@ -6,6 +6,6 @@ typedef struct {
|
||||
int ready;
|
||||
} WInfo;
|
||||
|
||||
WInfo *info_new ();
|
||||
WInfo *info_new (void);
|
||||
|
||||
#endif
|
||||
|
21
src/key.c
21
src/key.c
@ -219,7 +219,8 @@ key_define_t mc_default_keys [] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
void define_sequences (key_define_t *kd)
|
||||
static void
|
||||
define_sequences (key_define_t *kd)
|
||||
{
|
||||
#ifndef HAVE_X
|
||||
int i;
|
||||
@ -282,7 +283,8 @@ void init_key_input_fd (void)
|
||||
|
||||
|
||||
#ifndef HAVE_X
|
||||
void xmouse_get_event (Gpm_Event *ev)
|
||||
static void
|
||||
xmouse_get_event (Gpm_Event *ev)
|
||||
{
|
||||
int btn;
|
||||
static struct timeval tv1 = { 0, 0 }; /* Force first click as single */
|
||||
@ -412,7 +414,8 @@ void define_sequence (int code, char *seq, int action)
|
||||
static int *pending_keys;
|
||||
#endif
|
||||
|
||||
int correct_key_code (int c)
|
||||
static int
|
||||
correct_key_code (int c)
|
||||
{
|
||||
/* This is needed on some OS that do not support ncurses and */
|
||||
/* do some magic after read()ing the data */
|
||||
@ -611,7 +614,8 @@ int get_key_code (int no_delay)
|
||||
|
||||
#ifndef PORT_HAS_FILE_HANDLERS
|
||||
/* If set timeout is set, then we wait 0.1 seconds, else, we block */
|
||||
void try_channels (int set_timeout)
|
||||
static void
|
||||
try_channels (int set_timeout)
|
||||
{
|
||||
struct timeval timeout;
|
||||
static fd_set select_set;
|
||||
@ -847,7 +851,8 @@ int xgetch_second (void)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_X
|
||||
void learn_store_key (char *buffer, char **p, int c)
|
||||
static void
|
||||
learn_store_key (char *buffer, char **p, int c)
|
||||
{
|
||||
if (*p - buffer > 253)
|
||||
return;
|
||||
@ -959,7 +964,8 @@ int is_idle (void)
|
||||
}
|
||||
|
||||
|
||||
int get_modifier ()
|
||||
int
|
||||
get_modifier (void)
|
||||
{
|
||||
#ifdef __linux__
|
||||
unsigned char modifiers;
|
||||
@ -975,7 +981,8 @@ int get_modifier ()
|
||||
#endif
|
||||
}
|
||||
|
||||
int ctrl_pressed ()
|
||||
int
|
||||
ctrl_pressed ()
|
||||
{
|
||||
#ifdef __linux__
|
||||
if (get_modifier () & CONTROL_PRESSED)
|
||||
|
@ -6,7 +6,7 @@ void init_key_input_fd (void);
|
||||
void done_key (void);
|
||||
int get_event (Gpm_Event *event, int redo_event, int block);
|
||||
int is_idle (void);
|
||||
int ctrl_pressed ();
|
||||
int ctrl_pressed (void);
|
||||
|
||||
#ifndef PORT_HAS_GETCH
|
||||
int mi_getch (void);
|
||||
@ -27,7 +27,7 @@ int mi_getch (void);
|
||||
#define ALTR_PRESSED 2
|
||||
#define CONTROL_PRESSED 4
|
||||
#define ALTL_PRESSED 8
|
||||
int get_modifier ();
|
||||
int get_modifier (void);
|
||||
|
||||
extern int double_click_speed;
|
||||
extern int old_esc_mode;
|
||||
|
@ -71,7 +71,7 @@
|
||||
#include "info.h" /* The Info widget */
|
||||
#include "view.h" /* The view widget */
|
||||
|
||||
#define WANT_DEFAULTS
|
||||
#define WANT_WIDGETS
|
||||
#include "setup.h" /* For save_setup() */
|
||||
|
||||
#include "x.h"
|
||||
@ -635,7 +635,8 @@ void done_screen ()
|
||||
}
|
||||
#endif /* HAVE_X */
|
||||
|
||||
void panel_do_cols (int index)
|
||||
static void
|
||||
panel_do_cols (int index)
|
||||
{
|
||||
if (get_display_type (index) == view_listing)
|
||||
set_panel_formats ((WPanel *) panels [index].widget);
|
||||
@ -761,7 +762,8 @@ void flag_winch (int dummy)
|
||||
void edit_adjust_size (Dlg_head * h);
|
||||
|
||||
#ifdef PORT_NEEDS_CHANGE_SCREEN_SIZE
|
||||
void low_level_change_screen_size (void)
|
||||
static void
|
||||
low_level_change_screen_size (void)
|
||||
{
|
||||
#if defined(HAVE_SLANG) || NCURSES_VERSION_MAJOR >= 4
|
||||
#if defined TIOCGWINSZ && !defined SCO_FLAVOR
|
||||
|
@ -41,6 +41,8 @@
|
||||
#include "key.h"
|
||||
#include "setup.h"
|
||||
#include "main.h"
|
||||
#include "learn.h"
|
||||
|
||||
#define UX 4
|
||||
#define UY 3
|
||||
|
||||
@ -310,7 +312,8 @@ static void learn_done (void)
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
void learn_save (void)
|
||||
static void
|
||||
learn_save (void)
|
||||
{
|
||||
int i;
|
||||
int profile_changed = 0;
|
||||
|
@ -234,7 +234,7 @@ static void listmode_done (void)
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
char *select_new_item (void)
|
||||
static char *select_new_item (void)
|
||||
{
|
||||
/* NOTE: The following array of possible items must match the
|
||||
formats array in screen.c. Better approach might be to make the
|
||||
@ -259,7 +259,8 @@ char *select_new_item (void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *collect_new_format (void)
|
||||
static char *
|
||||
collect_new_format (void)
|
||||
{
|
||||
char *newformat;
|
||||
int i;
|
||||
|
36
src/main.c
36
src/main.c
@ -376,7 +376,7 @@ try_to_select (WPanel *panel, char *name)
|
||||
display_mini_info (panel);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
reload_panelized (WPanel *panel)
|
||||
{
|
||||
int i, j;
|
||||
@ -919,7 +919,7 @@ directory_history_add (WPanel * panel, char *s)
|
||||
*
|
||||
* You do _NOT_ want to add any vfs aware code here. <pavel@ucw.cz>
|
||||
*/
|
||||
char*
|
||||
static char*
|
||||
get_parent_dir_name (char *cwd, char *lwd)
|
||||
{
|
||||
char *p;
|
||||
@ -931,7 +931,7 @@ get_parent_dir_name (char *cwd, char *lwd)
|
||||
}
|
||||
|
||||
/* Changes the current panel directory */
|
||||
int
|
||||
static int
|
||||
_do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type)
|
||||
{
|
||||
char *directory, *olddir;
|
||||
@ -1121,7 +1121,7 @@ maybe_cd (int char_code, int move_up_dir)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
set_sort_to (WPanel *p, sortfn *sort_order)
|
||||
{
|
||||
p->sort_type = sort_order;
|
||||
@ -1193,8 +1193,8 @@ static void
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GNOME
|
||||
void init_menu () {};
|
||||
void done_menu () {};
|
||||
void init_menu (void) {};
|
||||
void done_menu (void) {};
|
||||
#else
|
||||
/* NOTICE: hotkeys specified here are overriden in menubar_paint_idx (alex) */
|
||||
static menu_entry PanelMenu [] = {
|
||||
@ -1674,7 +1674,8 @@ static void do_suspend_cmd (void)
|
||||
edition_post_exec ();
|
||||
}
|
||||
|
||||
void suspend_cmd (void)
|
||||
void
|
||||
suspend_cmd (void)
|
||||
{
|
||||
save_cwds_stat ();
|
||||
do_suspend_cmd ();
|
||||
@ -1682,7 +1683,8 @@ void suspend_cmd (void)
|
||||
do_refresh ();
|
||||
}
|
||||
|
||||
void init_labels (Widget *paneletc)
|
||||
static void
|
||||
init_labels (Widget *paneletc)
|
||||
{
|
||||
define_label (midnight_dlg, paneletc, 1, _("Help"), help_cmd);
|
||||
define_label (midnight_dlg, paneletc, 2, _("Menu"), user_menu_cmd);
|
||||
@ -1911,7 +1913,8 @@ static void done_mc_profile ()
|
||||
* change to use npanels, just loop over the number of panels
|
||||
* and use get_panel_widget (i) and make the test done below
|
||||
*/
|
||||
void make_panels_dirty ()
|
||||
static void
|
||||
make_panels_dirty ()
|
||||
{
|
||||
if (cpanel->dirty)
|
||||
panel_update_contents (cpanel);
|
||||
@ -1927,7 +1930,8 @@ void make_panels_dirty ()
|
||||
# define check_key_backslash(x) ((x) == '\\')
|
||||
#endif
|
||||
|
||||
int midnight_callback (struct Dlg_head *h, int id, int msg)
|
||||
int
|
||||
midnight_callback (struct Dlg_head *h, int id, int msg)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -2153,7 +2157,7 @@ setup_panels_and_run_mc ()
|
||||
}
|
||||
|
||||
/* result must be free'd (I think this should go in util.c) */
|
||||
char *
|
||||
static char *
|
||||
prepend_cwd_on_local (char *filename)
|
||||
{
|
||||
char *d;
|
||||
@ -2175,7 +2179,7 @@ prepend_cwd_on_local (char *filename)
|
||||
#ifdef USE_INTERNAL_EDIT
|
||||
void edit (const char *file_name, int startline);
|
||||
|
||||
int
|
||||
static int
|
||||
mc_maybe_editor_or_viewer (void)
|
||||
{
|
||||
char *path;
|
||||
@ -2342,7 +2346,7 @@ init_sigfatals (void)
|
||||
#define CONTROL_FILE "/tmp/mc.%d.control"
|
||||
char control_file [sizeof (CONTROL_FILE) + 8];
|
||||
|
||||
void
|
||||
static void
|
||||
OS_Setup ()
|
||||
{
|
||||
char *termvalue;
|
||||
@ -2750,7 +2754,7 @@ handle_args (int argc, char *argv [])
|
||||
# define compatibility_move_mc_files()
|
||||
#else
|
||||
|
||||
int
|
||||
static int
|
||||
do_mc_filename_rename (char *mc_dir, char *o_name, char *n_name)
|
||||
{
|
||||
char *full_o_name = concat_dir_and_file (home_dir, o_name);
|
||||
@ -2763,7 +2767,7 @@ do_mc_filename_rename (char *mc_dir, char *o_name, char *n_name)
|
||||
return move;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
do_compatibility_move (char *mc_dir)
|
||||
{
|
||||
struct stat s;
|
||||
@ -2792,7 +2796,7 @@ do_compatibility_move (char *mc_dir)
|
||||
show_change_notice = 1;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
compatibility_move_mc_files (void)
|
||||
{
|
||||
char *mc_dir = concat_dir_and_file (home_dir, ".mc");
|
||||
|
@ -182,6 +182,7 @@ extern Dlg_head *midnight_dlg;
|
||||
void directory_history_add (WPanel *panel, char *s);
|
||||
int do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type);
|
||||
void update_one_panel_widget (WPanel *panel, int force_update, char *current_file);
|
||||
int midnight_callback (struct Dlg_head *h, int id, int msg);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -189,6 +190,10 @@ void update_one_panel_widget (WPanel *panel, int force_update, char *current_fil
|
||||
void edition_pre_exec (void);
|
||||
void edition_post_exec (void);
|
||||
|
||||
void done_menu (void);
|
||||
void init_menu (void);
|
||||
void exec_shell (void);
|
||||
|
||||
#ifdef OS2_NT
|
||||
# define MC_BASE ""
|
||||
#else
|
||||
|
@ -38,9 +38,6 @@ typedef struct {
|
||||
typedef sMenu *Menu;
|
||||
#endif
|
||||
|
||||
Menu create_menu (char *name, menu_entry *entries, int count);
|
||||
void destroy_menu (Menu menu);
|
||||
|
||||
extern int menubar_visible;
|
||||
|
||||
/* The button bar menu */
|
||||
@ -57,7 +54,11 @@ typedef struct {
|
||||
int previous_selection; /* Selected widget before activating menu */
|
||||
} WMenu;
|
||||
|
||||
WMenu *menubar_new (int y, int x, int cols, Menu menu [], int items);
|
||||
Menu create_menu (char *name, menu_entry *entries, int count);
|
||||
void destroy_menu (Menu menu);
|
||||
WMenu *menubar_new (int y, int x, int cols, Menu menu [], int items);
|
||||
void menubar_arrange (WMenu* menubar);
|
||||
int menubar_event (Gpm_Event *event, WMenu *menubar);
|
||||
|
||||
#endif /* __MENU_H */
|
||||
|
||||
|
@ -84,7 +84,7 @@ void slang_shell_mode (void);
|
||||
void slang_shutdown (void);
|
||||
int has_colors (void);
|
||||
/* Internal function prototypes */
|
||||
void load_terminfo_keys ();
|
||||
void load_terminfo_keys (void);
|
||||
|
||||
/* FIXME Clean up this; gnome has nothing to do here */
|
||||
#ifndef HAVE_GNOME
|
||||
@ -132,6 +132,6 @@ void init_pair (int, char *, char *);
|
||||
# define one_hline() SLsmg_draw_object (SLsmg_get_row(), SLsmg_get_column(), slow_terminal ? ' ' : ACS_HLINE)
|
||||
#endif
|
||||
|
||||
void enable_interrupt_key ();
|
||||
void disable_interrupt_key ();
|
||||
void enable_interrupt_key (void);
|
||||
void disable_interrupt_key (void);
|
||||
#endif
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "panel.h" /* Needed for the externs */
|
||||
#include "file.h"
|
||||
#include "layout.h" /* For nice_rotating_dash */
|
||||
#include "option.h"
|
||||
#define PX 4
|
||||
#define PY 2
|
||||
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include "main.h"
|
||||
#include "global.h"
|
||||
#include "../vfs/vfs.h"
|
||||
#include "panelize.h"
|
||||
|
||||
void do_external_panelize (char *command);
|
||||
|
||||
@ -254,7 +255,8 @@ static void add2panelize (char *label, char *command)
|
||||
}
|
||||
}
|
||||
|
||||
void add2panelize_cmd (void)
|
||||
void
|
||||
add2panelize_cmd (void)
|
||||
{
|
||||
char *label;
|
||||
|
||||
@ -293,7 +295,8 @@ static void remove_from_panelize (struct panelize *entry)
|
||||
}
|
||||
}
|
||||
|
||||
void external_panelize (void)
|
||||
void
|
||||
external_panelize (void)
|
||||
{
|
||||
char *target = NULL;
|
||||
|
||||
|
@ -76,7 +76,8 @@ static int is_loaded (char *FileName, TSecHeader **section)
|
||||
|
||||
#define TRANSLATION_CHAR '\200'
|
||||
|
||||
char *str_untranslate_newline_dup (char *s)
|
||||
static char *
|
||||
str_untranslate_newline_dup (char *s)
|
||||
{
|
||||
int l = 0;
|
||||
char *p = s, *q;
|
||||
@ -111,7 +112,8 @@ char *str_untranslate_newline_dup (char *s)
|
||||
return 0; /* not reached */
|
||||
}
|
||||
|
||||
char *str_translate_newline_dup (char *s)
|
||||
static char *
|
||||
str_translate_newline_dup (char *s)
|
||||
{
|
||||
char *p, *q;
|
||||
q = p = malloc (strlen (s) + 1);
|
||||
@ -255,8 +257,9 @@ static void new_key (TSecHeader *section, char *KeyName, char *Value)
|
||||
section->Keys = key;
|
||||
}
|
||||
|
||||
char *GetSetProfileChar (int set, char *AppName, char *KeyName,
|
||||
char *Default, char *FileName)
|
||||
static char *
|
||||
GetSetProfileChar (int set, char *AppName, char *KeyName,
|
||||
char *Default, char *FileName)
|
||||
{
|
||||
|
||||
TProfile *New;
|
||||
@ -307,8 +310,9 @@ char *GetSetProfileChar (int set, char *AppName, char *KeyName,
|
||||
return Default;
|
||||
}
|
||||
|
||||
short GetSetProfile (int set, char * AppName, char * KeyName, char * Default,
|
||||
char * ReturnedString, short Size, char * FileName)
|
||||
static short GetSetProfile (int set, char * AppName, char * KeyName,
|
||||
char * Default, char * ReturnedString,
|
||||
short Size, char * FileName)
|
||||
|
||||
{
|
||||
char *s;
|
||||
|
@ -143,7 +143,7 @@ set_colors (WPanel *panel)
|
||||
#endif
|
||||
|
||||
/* Delete format string, it is a linked list */
|
||||
void
|
||||
static void
|
||||
delete_format (format_e *format)
|
||||
{
|
||||
format_e *next;
|
||||
@ -157,7 +157,7 @@ delete_format (format_e *format)
|
||||
|
||||
#ifndef HAVE_X
|
||||
/* This code relies on the default justification!!! */
|
||||
void
|
||||
static void
|
||||
add_permission_string (char *dest, int width, file_entry *fe, int attr, int color, int is_octal)
|
||||
{
|
||||
int i, r, l;
|
||||
@ -1206,7 +1206,7 @@ parse_panel_size (WPanel *panel, char *format, int isstatus)
|
||||
|
||||
*/
|
||||
|
||||
format_e *
|
||||
static format_e *
|
||||
parse_display_format (WPanel *panel, char *format, char **error, int isstatus, int *res_total_cols)
|
||||
{
|
||||
format_e *darr, *old, *home = 0; /* The formats we return */
|
||||
|
41
src/setup.c
41
src/setup.c
@ -31,7 +31,7 @@
|
||||
#include "main.h"
|
||||
#include "tree.h"
|
||||
#include "profile.h"
|
||||
#define WANT_DEFAULTS
|
||||
#define WANT_WIDGETS
|
||||
#include "setup.h"
|
||||
#include "mouse.h" /* To make view.h happy */
|
||||
#include "view.h" /* For the externs */
|
||||
@ -252,7 +252,8 @@ static struct {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
void panel_save_setup (WPanel *panel, char *section)
|
||||
void
|
||||
panel_save_setup (WPanel *panel, char *section)
|
||||
{
|
||||
char buffer [40];
|
||||
int i;
|
||||
@ -288,7 +289,8 @@ void panel_save_setup (WPanel *panel, char *section)
|
||||
profile_name);
|
||||
}
|
||||
|
||||
void save_layout (void)
|
||||
void
|
||||
save_layout (void)
|
||||
{
|
||||
char *profile;
|
||||
int i;
|
||||
@ -305,7 +307,8 @@ void save_layout (void)
|
||||
free (profile);
|
||||
}
|
||||
|
||||
void save_configure (void)
|
||||
void
|
||||
save_configure (void)
|
||||
{
|
||||
char *profile;
|
||||
int i;
|
||||
@ -319,7 +322,8 @@ void save_configure (void)
|
||||
free (profile);
|
||||
}
|
||||
|
||||
static void panel_save_type (char *section, int type)
|
||||
static void
|
||||
panel_save_type (char *section, int type)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -332,7 +336,8 @@ static void panel_save_type (char *section, int type)
|
||||
}
|
||||
|
||||
#ifndef PORT_HAS_SAVE_PANEL_TYPES
|
||||
void save_panel_types ()
|
||||
void
|
||||
save_panel_types ()
|
||||
{
|
||||
int type;
|
||||
|
||||
@ -347,7 +352,8 @@ void save_panel_types ()
|
||||
}
|
||||
#endif
|
||||
|
||||
void save_setup (void)
|
||||
void
|
||||
save_setup (void)
|
||||
{
|
||||
char *profile;
|
||||
#ifdef USE_VFS
|
||||
@ -384,7 +390,8 @@ void save_setup (void)
|
||||
saving_setup = 0;
|
||||
}
|
||||
|
||||
void panel_load_setup (WPanel *panel, char *section)
|
||||
void
|
||||
panel_load_setup (WPanel *panel, char *section)
|
||||
{
|
||||
int i;
|
||||
char buffer [40];
|
||||
@ -435,7 +442,8 @@ void panel_load_setup (WPanel *panel, char *section)
|
||||
|
||||
}
|
||||
|
||||
static void load_layout (char *profile_name)
|
||||
static void
|
||||
load_layout (char *profile_name)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -445,7 +453,8 @@ static void load_layout (char *profile_name)
|
||||
*layout [i].opt_addr);
|
||||
}
|
||||
|
||||
static int load_mode (char *section)
|
||||
static int
|
||||
load_mode (char *section)
|
||||
{
|
||||
char buffer [20];
|
||||
int i;
|
||||
@ -464,7 +473,8 @@ static int load_mode (char *section)
|
||||
return mode;
|
||||
}
|
||||
|
||||
char *do_load_string (char *s, char *ss, char *def)
|
||||
static char *
|
||||
do_load_string (char *s, char *ss, char *def)
|
||||
{
|
||||
char *buffer = xmalloc (128, "dls");
|
||||
char *p;
|
||||
@ -476,7 +486,8 @@ char *do_load_string (char *s, char *ss, char *def)
|
||||
return p;
|
||||
}
|
||||
|
||||
void load_setup (void)
|
||||
void
|
||||
load_setup (void)
|
||||
{
|
||||
static char *buffer;
|
||||
char *profile;
|
||||
@ -557,7 +568,8 @@ void load_setup (void)
|
||||
|
||||
#ifdef USE_VFS
|
||||
#ifdef USE_NETCODE
|
||||
char *load_anon_passwd ()
|
||||
char *
|
||||
load_anon_passwd ()
|
||||
{
|
||||
char buffer [255];
|
||||
|
||||
@ -578,7 +590,8 @@ void done_setup (void)
|
||||
/* directory_history_free (); */
|
||||
}
|
||||
|
||||
void load_keys_from_section (char *terminal, char *profile_name)
|
||||
static void
|
||||
load_keys_from_section (char *terminal, char *profile_name)
|
||||
{
|
||||
char *section_name;
|
||||
void *profile_keys;
|
||||
|
@ -15,7 +15,7 @@ void panel_load_setup ();
|
||||
#endif
|
||||
void load_key_defs (void);
|
||||
void save_panel_types (void);
|
||||
char *load_anon_passwd ();
|
||||
char *load_anon_passwd (void);
|
||||
|
||||
extern char *profile_name;
|
||||
|
||||
|
@ -129,7 +129,7 @@ slang_intr (int signo)
|
||||
slinterrupt = 1;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
interrupts_enabled (void)
|
||||
{
|
||||
struct sigaction current_act;
|
||||
@ -268,7 +268,7 @@ slang_shutdown ()
|
||||
sequence. -- Norbert
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
slang_reset_softkeys (void)
|
||||
{
|
||||
int key;
|
||||
@ -361,7 +361,7 @@ init_pair (int index, char *foreground, char *background)
|
||||
max_index = index;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
alloc_color_pair (char *foreground, char *background)
|
||||
{
|
||||
init_pair (++max_index, foreground, background);
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <stdio.h>
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "win.h"
|
||||
|
||||
/* This flag is set by xterm detection routine in function main() */
|
||||
/* It is used by function view_other_cmd() */
|
||||
|
66
src/tree.c
66
src/tree.c
@ -129,7 +129,7 @@ static tree_entry *forw_ptr (tree_entry *ptr, int *count)
|
||||
greater than zero if p1 is found to be less than, to match, or be greater
|
||||
than p2.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
pathcmp (const char *p1, const char *p2)
|
||||
{
|
||||
for ( ;*p1 == *p2; p1++, p2++)
|
||||
@ -944,7 +944,8 @@ void tree_chdir (WTree *tree, char *dir)
|
||||
}
|
||||
}
|
||||
|
||||
void sync_tree (char *path)
|
||||
void
|
||||
sync_tree (char *path)
|
||||
{
|
||||
tree_chdir (the_tree, path);
|
||||
}
|
||||
@ -1153,13 +1154,15 @@ void tree_move (WTree *tree, char *default_dest)
|
||||
free (dest);
|
||||
}
|
||||
|
||||
static int tree_move_cmd (WTree *tree)
|
||||
static int
|
||||
tree_move_cmd (WTree *tree)
|
||||
{
|
||||
tree_move (tree, "");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int tree_mkdir_cmd (WTree *tree)
|
||||
static int
|
||||
tree_mkdir_cmd (WTree *tree)
|
||||
{
|
||||
char old_dir [MC_MAXPATHLEN];
|
||||
|
||||
@ -1177,7 +1180,8 @@ static int tree_mkdir_cmd (WTree *tree)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void tree_rmdir_cmd (WTree *tree)
|
||||
static void
|
||||
tree_rmdir_cmd (WTree *tree)
|
||||
{
|
||||
char old_dir [MC_MAXPATHLEN];
|
||||
|
||||
@ -1210,7 +1214,8 @@ static void tree_rmdir_cmd (WTree *tree)
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int tree_quit_cmd (void)
|
||||
static int
|
||||
tree_quit_cmd (void)
|
||||
{
|
||||
/*
|
||||
FIXME
|
||||
@ -1221,48 +1226,56 @@ static int tree_quit_cmd (void)
|
||||
#endif
|
||||
|
||||
static void set_navig_label (Dlg_head *h);
|
||||
static void tree_toggle_navig (Dlg_head *h)
|
||||
|
||||
static void
|
||||
tree_toggle_navig (Dlg_head *h)
|
||||
{
|
||||
tree_navigation_flag = 1 - tree_navigation_flag;
|
||||
set_navig_label (h);
|
||||
}
|
||||
|
||||
void set_navig_label (Dlg_head *h)
|
||||
void
|
||||
set_navig_label (Dlg_head *h)
|
||||
{
|
||||
define_label_data (h, (Widget *)tree,
|
||||
4, tree_navigation_flag ? _("Static") : _("Dynamc"),
|
||||
(void (*)(void *))tree_toggle_navig, h);
|
||||
}
|
||||
|
||||
static void move_down (WTree *tree)
|
||||
static void
|
||||
move_down (WTree *tree)
|
||||
{
|
||||
tree_move_forward (tree, 1);
|
||||
show_tree (tree);
|
||||
maybe_chdir (tree);
|
||||
}
|
||||
|
||||
static void move_up (WTree *tree)
|
||||
static void
|
||||
move_up (WTree *tree)
|
||||
{
|
||||
tree_move_backward (tree, 1);
|
||||
show_tree (tree);
|
||||
maybe_chdir (tree);
|
||||
}
|
||||
|
||||
static void move_home (WTree *tree)
|
||||
static void
|
||||
move_home (WTree *tree)
|
||||
{
|
||||
tree_move_to_top (tree);
|
||||
show_tree (tree);
|
||||
maybe_chdir (tree);
|
||||
}
|
||||
|
||||
static void move_end (WTree *tree)
|
||||
static void
|
||||
move_end (WTree *tree)
|
||||
{
|
||||
tree_move_to_bottom (tree);
|
||||
show_tree (tree);
|
||||
maybe_chdir (tree);
|
||||
}
|
||||
|
||||
static int move_left (WTree *tree)
|
||||
static int
|
||||
move_left (WTree *tree)
|
||||
{
|
||||
int v;
|
||||
|
||||
@ -1275,7 +1288,8 @@ static int move_left (WTree *tree)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int move_right (WTree *tree)
|
||||
static int
|
||||
move_right (WTree *tree)
|
||||
{
|
||||
if (tree_navigation_flag){
|
||||
tree_move_to_child (tree);
|
||||
@ -1286,21 +1300,24 @@ static int move_right (WTree *tree)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void move_prevp (WTree *tree)
|
||||
static void
|
||||
move_prevp (WTree *tree)
|
||||
{
|
||||
tree_move_backward (tree, tlines (tree) - 1);
|
||||
show_tree (tree);
|
||||
maybe_chdir (tree);
|
||||
}
|
||||
|
||||
static void move_nextp (WTree *tree)
|
||||
static void
|
||||
move_nextp (WTree *tree)
|
||||
{
|
||||
tree_move_forward (tree, tlines (tree) - 1);
|
||||
show_tree (tree);
|
||||
maybe_chdir (tree);
|
||||
}
|
||||
|
||||
static void chdir_sel (WTree *tree)
|
||||
static void
|
||||
chdir_sel (WTree *tree)
|
||||
{
|
||||
if (!tree->is_panel){
|
||||
tree->done = 1;
|
||||
@ -1319,7 +1336,8 @@ static void chdir_sel (WTree *tree)
|
||||
return;
|
||||
}
|
||||
|
||||
static void start_search (WTree *tree)
|
||||
static void
|
||||
start_search (WTree *tree)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1370,7 +1388,8 @@ static key_map tree_keymap [] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static inline int tree_key (WTree *tree, int key)
|
||||
static inline int
|
||||
tree_key (WTree *tree, int key)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1421,7 +1440,8 @@ static inline int tree_key (WTree *tree, int key)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tree_frame (Dlg_head *h, WTree *tree)
|
||||
static void
|
||||
tree_frame (Dlg_head *h, WTree *tree)
|
||||
{
|
||||
attrset (NORMAL_COLOR);
|
||||
widget_erase ((Widget*) tree);
|
||||
@ -1436,7 +1456,8 @@ static void tree_frame (Dlg_head *h, WTree *tree)
|
||||
}
|
||||
|
||||
|
||||
static int tree_callback (Dlg_head *h, WTree *tree, int msg, int par)
|
||||
static int
|
||||
tree_callback (Dlg_head *h, WTree *tree, int msg, int par)
|
||||
{
|
||||
switch (msg){
|
||||
case WIDGET_DRAW:
|
||||
@ -1486,7 +1507,8 @@ static int tree_callback (Dlg_head *h, WTree *tree, int msg, int par)
|
||||
return default_proc (h, msg, par);
|
||||
}
|
||||
|
||||
WTree *tree_new (int is_panel, int y, int x, int lines, int cols)
|
||||
WTree *
|
||||
tree_new (int is_panel, int y, int x, int lines, int cols)
|
||||
{
|
||||
WTree *tree = xmalloc (sizeof (WTree), "tree_new");
|
||||
|
||||
|
@ -59,7 +59,7 @@ void tree_move_to_child (WTree *tree);
|
||||
void tree_move_to_top (WTree *tree);
|
||||
void tree_move_to_bottom (WTree *tree);
|
||||
|
||||
void sync_tee (char *pathname);
|
||||
void sync_tree (char *pathname);
|
||||
|
||||
extern int tree_navigation_flag;
|
||||
extern int xtree_mode;
|
||||
|
@ -172,7 +172,8 @@ int check_format_var (char *p, char **v)
|
||||
}
|
||||
|
||||
/* strip file's extension */
|
||||
char *strip_ext(char *ss)
|
||||
static char *
|
||||
strip_ext(char *ss)
|
||||
{
|
||||
register char *s = ss;
|
||||
char *e = NULL;
|
||||
@ -377,7 +378,8 @@ static char *test_condition (char *p, int *condition)
|
||||
}
|
||||
|
||||
/* General purpose condition debug output handler */
|
||||
void debug_out (char *start, char *end, int cond)
|
||||
static void
|
||||
debug_out (char *start, char *end, int cond)
|
||||
{
|
||||
static char msg [256];
|
||||
int len;
|
||||
@ -488,7 +490,8 @@ static char *test_line (char *p, int *result)
|
||||
}
|
||||
|
||||
/* FIXME: recode this routine on version 3.0, it could be cleaner */
|
||||
void execute_menu_command (char *s)
|
||||
static void
|
||||
execute_menu_command (char *s)
|
||||
{
|
||||
char *commands;
|
||||
FILE *cmd_file;
|
||||
|
@ -861,7 +861,8 @@ char *get_current_wd (char *buffer, int size)
|
||||
|
||||
#define CHECK(x) if (x == -1) return 0;
|
||||
|
||||
long get_small_endian_long (int fd)
|
||||
static long
|
||||
get_small_endian_long (int fd)
|
||||
{
|
||||
unsigned char a, b, c, d;
|
||||
|
||||
|
22
src/view.c
22
src/view.c
@ -132,7 +132,7 @@ static char hex_char[] = "0123456789ABCDEF";
|
||||
/* }}} */
|
||||
/* {{{ Clean-up functions */
|
||||
|
||||
void
|
||||
static void
|
||||
close_view_file (WView *view)
|
||||
{
|
||||
if (view->file != -1){
|
||||
@ -141,7 +141,7 @@ close_view_file (WView *view)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
free_file (WView *view)
|
||||
{
|
||||
int i;
|
||||
@ -180,7 +180,7 @@ free_file (WView *view)
|
||||
enum { off, on };
|
||||
|
||||
/* Both views */
|
||||
void
|
||||
static void
|
||||
view_done (WView *view)
|
||||
{
|
||||
set_monitor (view, off);
|
||||
@ -208,7 +208,7 @@ view_done (WView *view)
|
||||
|
||||
static void view_hook (void *);
|
||||
|
||||
void
|
||||
static void
|
||||
view_destroy (WView *view)
|
||||
{
|
||||
view_done (view);
|
||||
@ -532,7 +532,7 @@ no_mmap:
|
||||
}
|
||||
|
||||
/* Return zero on success, -1 on failure */
|
||||
int
|
||||
static int
|
||||
do_view_init (WView *view, char *_command, char *_file, int start_line)
|
||||
{
|
||||
char *error = 0;
|
||||
@ -1002,7 +1002,7 @@ display (WView *view)
|
||||
return from;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
view_place_cursor (WView *view)
|
||||
{
|
||||
int shift;
|
||||
@ -1812,7 +1812,7 @@ toggle_hex_mode (WView *view)
|
||||
}
|
||||
|
||||
/* Both views */
|
||||
void
|
||||
static void
|
||||
toggle_hexedit_mode(WView *view)
|
||||
{
|
||||
view->hexedit_mode = 1 - view->hexedit_mode;
|
||||
@ -1846,7 +1846,7 @@ goto_line (WView *view)
|
||||
}
|
||||
|
||||
/* Both views */
|
||||
void
|
||||
static void
|
||||
regexp_search (WView *view, int direction)
|
||||
{
|
||||
char *regexp = "";
|
||||
@ -1885,7 +1885,7 @@ regexp_search_cmd (WView *view)
|
||||
}
|
||||
|
||||
/* Both views */
|
||||
void
|
||||
static void
|
||||
normal_search (WView *view, int direction)
|
||||
{
|
||||
static char *old;
|
||||
@ -1911,7 +1911,7 @@ normal_search_cmd (WView *view)
|
||||
normal_search (view, 1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
change_viewer (WView *view)
|
||||
{
|
||||
char *s;
|
||||
@ -2258,7 +2258,7 @@ view_event (WView *view, Gpm_Event *event, int *result)
|
||||
}
|
||||
|
||||
/* Real view only */
|
||||
int
|
||||
static int
|
||||
real_view_event (Gpm_Event *event, void *x)
|
||||
{
|
||||
int result;
|
||||
|
@ -150,7 +150,7 @@ extern int altered_hex_mode;
|
||||
extern int altered_magic_flag;
|
||||
extern int altered_nroff_flag;
|
||||
|
||||
void view_adjust_size ();
|
||||
void view_adjust_size (Dlg_head *);
|
||||
|
||||
/* A node for building a change list on change_list */
|
||||
struct hexedit_change_node {
|
||||
|
@ -242,7 +242,7 @@ button_len (const char *text, unsigned int flags)
|
||||
* and shifting data past it to the left results to one unused byte.
|
||||
* This does not harm though :)
|
||||
*/
|
||||
void
|
||||
static void
|
||||
button_scan_hotkey(WButton* b)
|
||||
{
|
||||
char* cp = strchr (b->text, '&');
|
||||
@ -998,7 +998,8 @@ void history_put (char *input_name, Hist *h)
|
||||
|
||||
static const char history_title[] = " History ";
|
||||
|
||||
int history_callback (Dlg_head * h, int Par, int Msg)
|
||||
static int
|
||||
history_callback (Dlg_head * h, int Par, int Msg)
|
||||
{
|
||||
#ifndef HAVE_X
|
||||
switch (Msg) {
|
||||
@ -2343,7 +2344,7 @@ listbox_get_current (WListbox *l, char **string, char **extra)
|
||||
*extra = l->current->data;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
buttonbar_callback (Dlg_head *h, WButtonBar *bb, int msg, int par)
|
||||
{
|
||||
int i;
|
||||
|
@ -89,7 +89,7 @@ common_dialog_callback (struct Dlg_head *h, int id, int msg)
|
||||
/* }}} */
|
||||
/* {{{ Listbox utility functions */
|
||||
|
||||
void
|
||||
static void
|
||||
listbox_refresh (Dlg_head *h)
|
||||
{
|
||||
dialog_repaint (h, COLOR_NORMAL, COLOR_HOT_NORMAL);
|
||||
@ -654,7 +654,8 @@ char *input_dialog (char *header, char *text, char *def_text)
|
||||
return input_dialog_help (header, text, "[Input Line Keys]", def_text);
|
||||
}
|
||||
|
||||
int input_dialog_help_2 (char *header, char *text1, char *text2, char *help, char **r1, char **r2)
|
||||
static int
|
||||
input_dialog_help_2 (char *header, char *text1, char *text2, char *help, char **r1, char **r2)
|
||||
{
|
||||
QuickDialog Quick_input;
|
||||
QuickWidget quick_widgets [] = {
|
||||
|
Loading…
Reference in New Issue
Block a user