From 3c6a792d4b3e18edfce48085656925bcffa83f53 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Sun, 19 Sep 2004 17:46:39 +0000 Subject: [PATCH] * edit/edit.h: renamed edit() to edit_file() to avoid GCC shadow warnings (many variables are also called edit). * edit/editwidget.c: likewise. * src/cmd.c: renamed edit() to edit_file() to avoid GCC shadow warnings (many variables are also called edit). * src/main.c: likewise. --- edit/ChangeLog | 3 +++ edit/edit.h | 2 +- edit/editwidget.c | 2 +- src/ChangeLog | 3 +++ src/cmd.c | 2 +- src/main.c | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/edit/ChangeLog b/edit/ChangeLog index 16ff1fd39..bd381bf84 100644 --- a/edit/ChangeLog +++ b/edit/ChangeLog @@ -5,6 +5,9 @@ * editcmd.c (edit_replace_prompt): Allocate the label text dynamically instead of using catstrs. Don't handle ENABLE_CHARSET specially. + * edit.h: renamed edit() to edit_file() to avoid GCC shadow + warnings (many variables are also called edit). + * editwidget.c: likewise. 2004-09-17 Andrew V. Samoilov diff --git a/edit/edit.h b/edit/edit.h index f4a67122d..76fe40897 100644 --- a/edit/edit.h +++ b/edit/edit.h @@ -131,7 +131,7 @@ void edit_init_menu_normal (void); void edit_done_menu (void); void menu_save_mode_cmd (void); int edit_raw_key_query (const char *heading, const char *query, int cancel); -int edit (const char *_file, int line); +int edit_file (const char *_file, int line); int edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch); #ifndef NO_INLINE_GETBYTE diff --git a/edit/editwidget.c b/edit/editwidget.c index 4e342eca0..2a324e70b 100644 --- a/edit/editwidget.c +++ b/edit/editwidget.c @@ -163,7 +163,7 @@ edit_dialog_callback (Dlg_head *h, dlg_msg_t msg, int parm) } int -edit (const char *_file, int line) +edit_file (const char *_file, int line) { static int made_directory = 0; Dlg_head *edit_dlg; diff --git a/src/ChangeLog b/src/ChangeLog index 2b877883b..1ae70edd3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -18,6 +18,9 @@ * widget.c: likewise. * complete.c: Surrounded the declaration of environ by and #ifdef guard to avoid a GCC warning about a redundant declaration. + * cmd.c: renamed edit() to edit_file() to avoid GCC shadow + warnings (many variables are also called edit). + * main.c: likewise. 2004-09-19 Roland Illig diff --git a/src/cmd.c b/src/cmd.c index ed58974ff..97c91deda 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -269,7 +269,7 @@ void do_edit_at_line (const char *what, int start_line) #ifdef USE_INTERNAL_EDIT if (use_internal_edit){ - edit (what, start_line); + edit_file (what, start_line); update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); return; diff --git a/src/main.c b/src/main.c index 5cc334ff7..e3f4052c9 100644 --- a/src/main.c +++ b/src/main.c @@ -1713,7 +1713,7 @@ mc_maybe_editor_or_viewer (void) else { path = prepend_cwd_on_local (""); setup_dummy_mc (path); - edit (edit_one_file, edit_one_file_start_line); + edit_file (edit_one_file, edit_one_file_start_line); } #endif /* USE_INTERNAL_EDIT */ g_free (path);