Fix duplicate declarations.

This commit is contained in:
Pavel Roskin 2002-11-15 06:38:55 +00:00
parent dc724cdb6e
commit 5cb2ef30f3
16 changed files with 17 additions and 47 deletions

View File

@ -315,8 +315,6 @@ int edit_execute_cmd (WEdit * edit, int command, int char_for_insertion);
#define color_palette(x) win->color[x].pixel #define color_palette(x) win->color[x].pixel
extern char *home_dir;
#define NUM_SELECTION_HISTORY 64 #define NUM_SELECTION_HISTORY 64
#ifndef MAX_PATH_LEN #ifndef MAX_PATH_LEN

View File

@ -497,8 +497,6 @@ static void get_args (char *l, char **args, int *argc)
#define check_a {if(!*a){result=line;break;}} #define check_a {if(!*a){result=line;break;}}
#define check_not_a {if(*a){result=line;break;}} #define check_not_a {if(*a){result=line;break;}}
int try_alloc_color_pair (char *fg, char *bg);
static int static int
this_try_alloc_color_pair (char *fg, char *bg) this_try_alloc_color_pair (char *fg, char *bg)
{ {

View File

@ -83,19 +83,7 @@ int source_route = 0;
/* If set, use the builtin editor */ /* If set, use the builtin editor */
int use_internal_edit = 1; int use_internal_edit = 1;
/* Ugly hack in order to distinguish between left and right panel in menubar */
int is_right;
#define MENU_PANEL_IDX (is_right ? 1 : 0)
/* view_file (filename, normal, internal)
*
* Inputs:
* filename: The file name to view
* plain_view: If set does not do any fancy pre-processing (no filtering) and
* always invokes the internal viewer.
* internal: If set uses the internal viewer, otherwise an external viewer.
*/
int int
view_file_at_line (char *filename, int plain_view, int internal, view_file_at_line (char *filename, int plain_view, int internal,
int start_line) int start_line)
@ -169,6 +157,14 @@ view_file_at_line (char *filename, int plain_view, int internal,
return move_dir; return move_dir;
} }
/* view_file (filename, plain_view, internal)
*
* Inputs:
* filename: The file name to view
* plain_view: If set does not do any fancy pre-processing (no filtering) and
* always invokes the internal viewer.
* internal: If set uses the internal viewer, otherwise an external viewer.
*/
int int
view_file (char *filename, int plain_view, int internal) view_file (char *filename, int plain_view, int internal)
{ {

View File

@ -83,7 +83,6 @@ int if_link_is_exe (char *full_name, file_entry *file);
extern int show_backups; extern int show_backups;
extern int show_dot_files; extern int show_dot_files;
extern int show_backups;
extern int mix_all_files; extern int mix_all_files;
#endif /* __DIR_H */ #endif /* __DIR_H */

View File

@ -59,8 +59,6 @@ static void slow_box (Dlg_head *h, int y, int x, int ys, int xs)
/* draw box in window */ /* draw box in window */
void draw_box (Dlg_head *h, int y, int x, int ys, int xs) void draw_box (Dlg_head *h, int y, int x, int ys, int xs)
{ {
extern int slow_terminal;
if (slow_terminal){ if (slow_terminal){
slow_box (h, y, x, ys, xs); slow_box (h, y, x, ys, xs);
return; return;

View File

@ -39,8 +39,6 @@ extern int file_op_compute_totals;
/* Query routines */ /* Query routines */
extern int background_wait;
int is_wildcarded (char *p); int is_wildcarded (char *p);
void compute_dir_size (char *dirname, off_t *ret_marked, double *ret_total); void compute_dir_size (char *dirname, off_t *ret_marked, double *ret_total);

View File

@ -118,6 +118,9 @@ struct WMenu *the_menubar;
/* Pointers to the selected and unselected panel */ /* Pointers to the selected and unselected panel */
WPanel *current_panel = NULL; WPanel *current_panel = NULL;
/* Set if the command is being run from the "Right" menu */
int is_right;
/* Set when main loop should be terminated */ /* Set when main loop should be terminated */
volatile int quit = 0; volatile int quit = 0;

View File

@ -47,7 +47,6 @@ extern int clear_before_exec;
extern int mou_auto_repeat; extern int mou_auto_repeat;
extern char *other_dir; extern char *other_dir;
extern int mouse_move_pages; extern int mouse_move_pages;
extern int mouse_move_pages_viewer;
#ifdef HAVE_CHARSET #ifdef HAVE_CHARSET
extern int source_codepage; extern int source_codepage;
@ -79,16 +78,16 @@ extern int searching;
extern int vfs_use_limit; extern int vfs_use_limit;
extern int alternate_plus_minus; extern int alternate_plus_minus;
extern int only_leading_plus_minus; extern int only_leading_plus_minus;
extern int ftpfs_directory_timeout;
extern int output_starts_shell; extern int output_starts_shell;
extern int midnight_shutdown; extern int midnight_shutdown;
extern char search_buffer [256]; extern char search_buffer [256];
extern char cmd_buf [512]; extern char cmd_buf [512];
extern char *cmdline_geometry; extern char *cmdline_geometry;
/* The menu panels */ /* Ugly hack in order to distinguish between left and right panel in menubar */
extern int is_right; /* If the selected menu was the right */ extern int is_right; /* If the selected menu was the right */
#define MENU_PANEL (is_right ? right_panel : left_panel) #define MENU_PANEL (is_right ? right_panel : left_panel)
#define MENU_PANEL_IDX (is_right ? 1 : 0)
#define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing) #define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
typedef void (*key_callback) (); typedef void (*key_callback) ();
@ -161,7 +160,6 @@ void edition_post_exec (void);
void done_menu (void); void done_menu (void);
void init_menu (void); void init_menu (void);
void exec_shell (void);
#ifdef NATIVE_WIN32 #ifdef NATIVE_WIN32
# define MC_BASE "" # define MC_BASE ""

View File

@ -31,7 +31,6 @@
#include "win.h" #include "win.h"
#include "key.h" /* For mi_getch() */ #include "key.h" /* For mi_getch() */
extern int is_right;
int menubar_visible = 1; /* This is the new default */ int menubar_visible = 1; /* This is the new default */
static void static void

View File

@ -48,8 +48,6 @@ static int r_but;
#define TOGGLE_VARIABLE 0 #define TOGGLE_VARIABLE 0
extern int use_internal_edit;
static int first_width, second_width; static int first_width, second_width;
static char *title1, *title2, *title3; static char *title1, *title2, *title3;

View File

@ -45,11 +45,8 @@
#include "panel.h" /* Needed for the externs */ #include "panel.h" /* Needed for the externs */
#include "file.h" #include "file.h"
#include "main.h" #include "main.h"
#include "../vfs/vfs.h"
#include "panelize.h" #include "panelize.h"
void do_external_panelize (char *command);
#define UX 5 #define UX 5
#define UY 2 #define UY 2

View File

@ -71,7 +71,6 @@ static int slinterrupt;
static int no_slang_delay; static int no_slang_delay;
/* {{{ Copied from ../slang/slgetkey.c, removed the DEC_8Bit_HACK, */ /* {{{ Copied from ../slang/slgetkey.c, removed the DEC_8Bit_HACK, */
extern unsigned int SLang_Input_Buffer_Len;
extern unsigned char SLang_Input_Buffer []; extern unsigned char SLang_Input_Buffer [];
#if SLANG_VERSION >= 10000 #if SLANG_VERSION >= 10000
extern unsigned int _SLsys_getkey (void); extern unsigned int _SLsys_getkey (void);
@ -172,9 +171,6 @@ got_interrupt (void)
void void
slang_init (void) slang_init (void)
{ {
extern int SLtt_Blink_Mode;
extern int SLtt_Has_Alt_Charset;
extern int force_ugly_line_drawing;
struct sigaction act, oact; struct sigaction act, oact;
SLtt_get_terminfo (); SLtt_get_terminfo ();

View File

@ -10,7 +10,6 @@ int view_init (WView *view, char *_command, const char *_file,
int start_line); int start_line);
void view_update_bytes_per_line (WView *view); void view_update_bytes_per_line (WView *view);
int view_file (char *filename, int normal, int internal);
/* Command: view a file, if _command != NULL we use popen on _command */ /* Command: view a file, if _command != NULL we use popen on _command */
/* move direction should be apointer that will hold the direction in which the user */ /* move direction should be apointer that will hold the direction in which the user */

View File

@ -107,8 +107,6 @@ int ftpfs_first_cd_then_ls;
/* Use the ~/.netrc */ /* Use the ~/.netrc */
int use_netrc = 1; int use_netrc = 1;
extern char *home_dir;
/* Anonymous setup */ /* Anonymous setup */
char *ftpfs_anonymous_passwd = NULL; char *ftpfs_anonymous_passwd = NULL;
int ftpfs_directory_timeout = 900; int ftpfs_directory_timeout = 900;
@ -153,7 +151,7 @@ static char reply_str [80];
static char *ftpfs_get_current_directory (vfs *me, vfs_s_super *super); static char *ftpfs_get_current_directory (vfs *me, vfs_s_super *super);
static int ftpfs_chdir_internal (vfs *me, vfs_s_super *super, char *remote_path); static int ftpfs_chdir_internal (vfs *me, vfs_s_super *super, char *remote_path);
static int command (vfs *me, vfs_s_super *super, int wait_reply, char *fmt, ...) static int command (vfs *me, vfs_s_super *super, int wait_reply, const char *fmt, ...)
__attribute__ ((format (printf, 4, 5))); __attribute__ ((format (printf, 4, 5)));
static int ftpfs_open_socket (vfs *me, vfs_s_super *super); static int ftpfs_open_socket (vfs *me, vfs_s_super *super);
static int login_server (vfs *me, vfs_s_super *super, const char *netrcpass); static int login_server (vfs *me, vfs_s_super *super, const char *netrcpass);
@ -313,7 +311,7 @@ reconnect (vfs *me, vfs_s_super *super)
} }
static int static int
command (vfs *me, vfs_s_super *super, int wait_reply, char *fmt, ...) command (vfs *me, vfs_s_super *super, int wait_reply, const char *fmt, ...)
{ {
va_list ap; va_list ap;
char *str, *fmt_str; char *str, *fmt_str;

View File

@ -54,13 +54,9 @@
# include "tcputil.h" # include "tcputil.h"
#endif #endif
extern int get_other_type (void);
int vfs_timeout = 60; /* VFS timeout in seconds */ int vfs_timeout = 60; /* VFS timeout in seconds */
static int vfs_flags = 0; /* Flags */ static int vfs_flags = 0; /* Flags */
extern int cd_symlinks; /* Defined in main.c */
/* They keep track of the current directory */ /* They keep track of the current directory */
static vfs *current_vfs = &vfs_local_ops; static vfs *current_vfs = &vfs_local_ops;
static char *current_dir = NULL; static char *current_dir = NULL;
@ -1794,7 +1790,7 @@ error:
} }
void void
vfs_die (char *m) vfs_die (const char *m)
{ {
message_1s (1, _("Internal error:"), m); message_1s (1, _("Internal error:"), m);
exit (1); exit (1);

View File

@ -203,7 +203,6 @@
int mc_link (const char *name1, const char *name2); int mc_link (const char *name1, const char *name2);
int mc_mknod (char *, int, int); int mc_mknod (char *, int, int);
int mc_rename (const char *original, const char *target); int mc_rename (const char *original, const char *target);
int mc_write (int fd, char *buf, int nbyte);
int mc_rmdir (char *path); int mc_rmdir (char *path);
int mc_mkdir (char *path, mode_t mode); int mc_mkdir (char *path, mode_t mode);
@ -318,7 +317,7 @@ extern int vfs_parse_filetype (char c);
extern int vfs_parse_filemode (const char *p); extern int vfs_parse_filemode (const char *p);
extern int vfs_parse_filedate(int idx, time_t *t); extern int vfs_parse_filedate(int idx, time_t *t);
extern void vfs_die (char *msg); extern void vfs_die (const char *msg);
extern char *vfs_get_password (char *msg); extern char *vfs_get_password (char *msg);
/* Flags for vfs_split_url() */ /* Flags for vfs_split_url() */