1
1

* editoptions.c: Make some variables static.

* edit.h: Take extern declaratrions from all C files.
Этот коммит содержится в:
Pavel Roskin 2002-08-19 01:23:24 +00:00
родитель 96322324ea
Коммит 3a93326ce7
10 изменённых файлов: 11 добавлений и 28 удалений

Просмотреть файл

@ -1,5 +1,8 @@
2002-08-18 Pavel Roskin <proski@gnu.org> 2002-08-18 Pavel Roskin <proski@gnu.org>
* editoptions.c: Make some variables static.
* edit.h: Take extern declaratrions from all C files.
* editcmd.c (edit_block_process_cmd): Plug memory leak. * editcmd.c (edit_block_process_cmd): Plug memory leak.
Simplify logic, reformat. Simplify logic, reformat.

Просмотреть файл

@ -1768,8 +1768,6 @@ static void edit_left_delete_word (WEdit * edit)
} }
} }
extern int column_highlighting;
/* /*
the start column position is not recorded, and hence does not the start column position is not recorded, and hence does not
undo as it happed. But who would notice. undo as it happed. But who would notice.

Просмотреть файл

@ -192,6 +192,7 @@ void edit_menu_cmd (WEdit * e);
void edit_init_menu_emacs (void); void edit_init_menu_emacs (void);
void edit_init_menu_normal (void); void edit_init_menu_normal (void);
void edit_done_menu (void); void edit_done_menu (void);
void menu_save_mode_cmd (void);
int edit_raw_key_query (char *heading, char *query, int cancel); int edit_raw_key_query (char *heading, char *query, int cancel);
char *strcasechr (const unsigned char *s, int c); char *strcasechr (const unsigned char *s, int c);
int edit (const char *_file, int line); int edit (const char *_file, int line);
@ -373,6 +374,9 @@ extern char *home_dir;
*/ */
extern int edit_key_emulation; extern int edit_key_emulation;
extern WEdit *wedit; extern WEdit *wedit;
extern Menu EditMenuBar[];
extern Dlg_head *edit_dlg;
extern WMenu *edit_menubar;
extern int option_word_wrap_line_length; extern int option_word_wrap_line_length;
extern int option_typewriter_wrap; extern int option_typewriter_wrap;
@ -385,6 +389,7 @@ extern int option_fake_half_tabs;
extern int option_save_mode; extern int option_save_mode;
extern int option_backup_ext_int; extern int option_backup_ext_int;
extern int option_max_undo; extern int option_max_undo;
extern int option_syntax_highlighting;
extern int option_edit_right_extreme; extern int option_edit_right_extreme;
extern int option_edit_left_extreme; extern int option_edit_left_extreme;
@ -395,5 +400,6 @@ extern char *option_whole_chars_search;
extern char *option_backup_ext; extern char *option_backup_ext;
extern int edit_confirm_save; extern int edit_confirm_save;
extern int column_highlighting;
#endif /* __EDIT_H */ #endif /* __EDIT_H */

Просмотреть файл

@ -773,9 +773,6 @@ int eval_marks (WEdit * edit, long *start_mark, long *end_mark)
} }
} }
/*Block copy, move and delete commands */
extern int column_highlighting;
#define space_width 1 #define space_width 1
void edit_insert_column_of_text (WEdit * edit, unsigned char *data, int size, int width) void edit_insert_column_of_text (WEdit * edit, unsigned char *data, int size, int width)

Просмотреть файл

@ -31,8 +31,6 @@
#include "src/charsets.h" #include "src/charsets.h"
#endif #endif
extern int column_highlighting;
static void status_string (WEdit * edit, char *s, int w, int fill, int font_width) static void status_string (WEdit * edit, char *s, int w, int fill, int font_width)
{ {
char byte_str[16]; char byte_str[16];
@ -447,9 +445,6 @@ void render_edit_text (WEdit * edit, long start_row, long start_column, long end
return; return;
} }
void edit_set_space_width (int s);
extern int option_long_whitespace;
void edit_render (WEdit * edit, int page, int row_start, int col_start, int row_end, int col_end) void edit_render (WEdit * edit, int page, int row_start, int col_start, int row_end, int col_end)
{ {
if (page) /* if it was an expose event, 'page' would be set */ if (page) /* if it was an expose event, 'page' would be set */

Просмотреть файл

@ -28,11 +28,6 @@
#include "editcmddef.h" #include "editcmddef.h"
extern int edit_key_emulation;
extern WButtonBar *edit_bar;
extern Dlg_head *edit_dlg;
extern WMenu *edit_menubar;
#undef edit_message_dialog #undef edit_message_dialog
#define edit_message_dialog(w,x,y,h,s) query_dialog (h, s, 0, 1, _("&Ok")) #define edit_message_dialog(w,x,y,h,s) query_dialog (h, s, 0, 1, _("&Ok"))
#define CFocus(x) #define CFocus(x)
@ -247,8 +242,6 @@ static menu_entry CmdMenuEmacs[] =
{' ', N_("&Mail... "), 'M', menu_mail_cmd} {' ', N_("&Mail... "), 'M', menu_mail_cmd}
}; };
extern void menu_save_mode_cmd (void);
static menu_entry OptMenu[] = static menu_entry OptMenu[] =
{ {
{' ', N_("&General... "), 'G', menu_options}, {' ', N_("&General... "), 'G', menu_options},

Просмотреть файл

@ -30,16 +30,12 @@
#define USE_INTERNAL_EDIT 1 #define USE_INTERNAL_EDIT 1
#endif #endif
#include "src/main.h" /* extern int option_this_and_that ... */ static char *key_emu_str[] =
char *key_emu_str[] =
{N_("Intuitive"), N_("Emacs"), NULL}; {N_("Intuitive"), N_("Emacs"), NULL};
char *wrap_str[] = static char *wrap_str[] =
{N_("None"), N_("Dynamic paragraphing"), N_("Type writer wrap"), NULL}; {N_("None"), N_("Dynamic paragraphing"), N_("Type writer wrap"), NULL};
extern int option_syntax_highlighting;
void i18n_translate_array (char *array[]) void i18n_translate_array (char *array[])
{ {
while (*array!=NULL) { while (*array!=NULL) {

Просмотреть файл

@ -91,8 +91,6 @@ int edit_mouse_event (Gpm_Event * event, void *x)
return menubar_event (event, edit_menubar); return menubar_event (event, edit_menubar);
} }
extern Menu EditMenuBar[5];
int edit (const char *_file, int line) int edit (const char *_file, int line)
{ {
static int made_directory = 0; static int made_directory = 0;

Просмотреть файл

@ -533,8 +533,6 @@ int this_try_alloc_color_pair (char *fg, char *bg)
static char *error_file_name = 0; static char *error_file_name = 0;
extern char *mc_home;
static FILE *open_include_file (char *filename) static FILE *open_include_file (char *filename)
{ {
FILE *f; FILE *f;

Просмотреть файл

@ -139,7 +139,6 @@ static void strip_newlines (unsigned char *t, int size)
in propfont.c :( in propfont.c :(
It calculates the number of chars in a line specified to length l in pixels It calculates the number of chars in a line specified to length l in pixels
*/ */
extern int tab_width;
static inline int next_tab_pos (int x) static inline int next_tab_pos (int x)
{ {
return x += tab_width - x % tab_width; return x += tab_width - x % tab_width;