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
extern char *home_dir;
#define NUM_SELECTION_HISTORY 64
#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_not_a {if(*a){result=line;break;}}
int try_alloc_color_pair (char *fg, char *bg);
static int
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 */
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
view_file_at_line (char *filename, int plain_view, int internal,
int start_line)
@ -169,6 +157,14 @@ view_file_at_line (char *filename, int plain_view, int internal,
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
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_dot_files;
extern int show_backups;
extern int mix_all_files;
#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 */
void draw_box (Dlg_head *h, int y, int x, int ys, int xs)
{
extern int slow_terminal;
if (slow_terminal){
slow_box (h, y, x, ys, xs);
return;

View File

@ -39,8 +39,6 @@ extern int file_op_compute_totals;
/* Query routines */
extern int background_wait;
int is_wildcarded (char *p);
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 */
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 */
volatile int quit = 0;

View File

@ -47,7 +47,6 @@ extern int clear_before_exec;
extern int mou_auto_repeat;
extern char *other_dir;
extern int mouse_move_pages;
extern int mouse_move_pages_viewer;
#ifdef HAVE_CHARSET
extern int source_codepage;
@ -79,16 +78,16 @@ extern int searching;
extern int vfs_use_limit;
extern int alternate_plus_minus;
extern int only_leading_plus_minus;
extern int ftpfs_directory_timeout;
extern int output_starts_shell;
extern int midnight_shutdown;
extern char search_buffer [256];
extern char cmd_buf [512];
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 */
#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)
typedef void (*key_callback) ();
@ -161,7 +160,6 @@ void edition_post_exec (void);
void done_menu (void);
void init_menu (void);
void exec_shell (void);
#ifdef NATIVE_WIN32
# define MC_BASE ""

View File

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

View File

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

View File

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

View File

@ -71,7 +71,6 @@ static int slinterrupt;
static int no_slang_delay;
/* {{{ Copied from ../slang/slgetkey.c, removed the DEC_8Bit_HACK, */
extern unsigned int SLang_Input_Buffer_Len;
extern unsigned char SLang_Input_Buffer [];
#if SLANG_VERSION >= 10000
extern unsigned int _SLsys_getkey (void);
@ -172,9 +171,6 @@ got_interrupt (void)
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;
SLtt_get_terminfo ();

View File

@ -10,7 +10,6 @@ int view_init (WView *view, char *_command, const char *_file,
int start_line);
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 */
/* 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 */
int use_netrc = 1;
extern char *home_dir;
/* Anonymous setup */
char *ftpfs_anonymous_passwd = NULL;
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 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)));
static int ftpfs_open_socket (vfs *me, vfs_s_super *super);
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
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;
char *str, *fmt_str;

View File

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

View File

@ -203,7 +203,6 @@
int mc_link (const char *name1, const char *name2);
int mc_mknod (char *, int, int);
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_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_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);
/* Flags for vfs_split_url() */