From 922043282d5a0f02e89893f0de188590a56a6b2e Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Sun, 31 Jul 2005 20:29:35 +0000 Subject: [PATCH] * view.h: Renamed view to mc_internal_viewer. This avoids hundreds of shadowed names in view.c. --- src/ChangeLog | 2 ++ src/cmd.c | 8 ++++---- src/ext.c | 4 ++-- src/user.c | 2 +- src/view.c | 3 ++- src/view.h | 4 ++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9de4a3c66..2a30aa23c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * view.c: Removed global variable have_fast_cpu. It is not used anymore. + * view.h: Renamed view to mc_internal_viewer. This avoids + hundreds of shadowed names in view.c. 2005-07-31 Roland Illig diff --git a/src/cmd.c b/src/cmd.c index 3a99442a3..0aa0e5c37 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -45,7 +45,7 @@ #include "cons.saver.h" /* console_flag */ #include "tty.h" /* LINES */ #include "dialog.h" /* Widget */ -#include "view.h" /* view() */ +#include "view.h" /* mc_internal_viewer() */ #include "wtools.h" /* message() */ #include "widget.h" /* push_history() */ #include "key.h" /* application_keypad_mode() */ @@ -102,7 +102,7 @@ view_file_at_line (const char *filename, int plain_view, int internal, default_hex_mode = 0; default_nroff_flag = 0; default_magic_flag = 0; - view (0, filename, &move_dir, start_line); + mc_internal_viewer (NULL, filename, &move_dir, start_line); if (changed_hex_mode && !altered_hex_mode) default_hex_mode = 1; if (changed_nroff_flag && !altered_nroff_flag) @@ -122,7 +122,7 @@ view_file_at_line (const char *filename, int plain_view, int internal, strcpy (view_entry, "View"); if (regex_command (filename, view_entry, &move_dir) == 0) { - view (0, filename, &move_dir, start_line); + mc_internal_viewer (NULL, filename, &move_dir, start_line); repaint_screen (); } } else { @@ -254,7 +254,7 @@ filtered_view_cmd (void) if (!command) return; - view (command, "", 0, 0); + mc_internal_viewer (command, "", NULL, 0); g_free (command); } diff --git a/src/ext.c b/src/ext.c index 6f7af7d06..d37e2d010 100644 --- a/src/ext.c +++ b/src/ext.c @@ -235,10 +235,10 @@ exec_extension (const char *filename, const char *data, int *move_dir, * into view */ if (written_nonspace) { - view (cmd, filename, move_dir, start_line); + mc_internal_viewer (cmd, filename, move_dir, start_line); unlink (file_name); } else { - view (0, filename, move_dir, start_line); + mc_internal_viewer (NULL, filename, move_dir, start_line); } if (changed_hex_mode && !altered_hex_mode) default_hex_mode = def_hex_mode; diff --git a/src/user.c b/src/user.c index 83ff336a5..cb8373573 100644 --- a/src/user.c +++ b/src/user.c @@ -656,7 +656,7 @@ execute_menu_command (WEdit *edit_widget, const char *commands) chmod (file_name, S_IRWXU); if (run_view) { run_view = 0; - view (file_name, 0, &run_view, 0); + mc_internal_viewer (file_name, NULL, &run_view, 0); } else { /* execute the command indirectly to allow execution even * on no-exec filesystems. */ diff --git a/src/view.c b/src/view.c index d38d5ac56..29168f778 100644 --- a/src/view.c +++ b/src/view.c @@ -3209,7 +3209,8 @@ view_dialog_callback (Dlg_head *h, dlg_msg_t msg, int parm) /* Real view only */ int -view (const char *command, const char *file, int *move_dir_p, int start_line) +mc_internal_viewer (const char *command, const char *file, + int *move_dir_p, int start_line) { gboolean succeeded; WView *wview; diff --git a/src/view.h b/src/view.h index 6d07d4957..243fd64ef 100644 --- a/src/view.h +++ b/src/view.h @@ -14,8 +14,8 @@ int view_load (WView *view, const char *_command, const char *_file, * point to a variable that will receive the direction in which the user * wants to move (-1 = previous file, 1 = next file, 0 = do nothing). */ -int view (const char *command, const char *file, int *ret_move_direction, - int start_line); +int mc_internal_viewer (const char *command, const char *file, + int *ret_move_direction, int start_line); extern int mouse_move_pages_viewer; extern int max_dirt_limit;