* view.c: Move call to view_update_bytes_per_line() from

view_init(), where the number of columns is unknown yet, to
view_callback() where it's already known.
(view_adjust_size): Make static.
This commit is contained in:
Pavel Roskin 2002-10-07 18:50:27 +00:00
parent a67eb057ec
commit a7dd92996c
3 changed files with 15 additions and 11 deletions

View File

@ -1,3 +1,10 @@
2002-10-07 Pavel Roskin <proski@gnu.org>
* view.c: Move call to view_update_bytes_per_line() from
view_init(), where the number of columns is unknown yet, to
view_callback() where it's already known.
(view_adjust_size): Make static.
2002-10-07 Miven Dooligan <dooligan@intergate.ca> 2002-10-07 Miven Dooligan <dooligan@intergate.ca>
* view.c (view_update_bytes_per_line): Don't use vertical bars * view.c (view_update_bytes_per_line): Don't use vertical bars

View File

@ -662,8 +662,6 @@ view_update_bytes_per_line (WView *view)
int int
view_init (WView *view, char *_command, const char *_file, int start_line) view_init (WView *view, char *_command, const char *_file, int start_line)
{ {
view_update_bytes_per_line(view);
if (!view->view_active || strcmp (_file, view->filename) || altered_magic_flag) if (!view->view_active || strcmp (_file, view->filename) || altered_magic_flag)
return do_view_init (view, _command, _file, start_line); return do_view_init (view, _command, _file, start_line);
else else
@ -2392,7 +2390,7 @@ real_view_event (Gpm_Event *event, void *x)
/* }}} */ /* }}} */
/* {{{ Window creation, destruction and a driver stub for real view */ /* {{{ Window creation, destruction and a driver stub for real view */
void static void
view_adjust_size (Dlg_head *h) view_adjust_size (Dlg_head *h)
{ {
WView *view; WView *view;
@ -2491,8 +2489,9 @@ view_callback (Dlg_head *h, WView *view, int msg, int par)
{ {
int i; int i;
switch (msg){ switch (msg) {
case WIDGET_INIT: case WIDGET_INIT:
view_update_bytes_per_line (view);
if (view->have_frame) if (view->have_frame)
add_hook (&select_file_hook, view_hook, view); add_hook (&select_file_hook, view_hook, view);
else else
@ -2510,7 +2509,7 @@ view_callback (Dlg_head *h, WView *view, int msg, int par)
break; break;
case WIDGET_KEY: case WIDGET_KEY:
i = view_handle_key ((WView *)view, par); i = view_handle_key ((WView *) view, par);
if (view->view_quit) if (view->view_quit)
dlg_stop (h); dlg_stop (h);
else { else {

View File

@ -115,8 +115,6 @@ extern int altered_magic_flag;
extern int altered_nroff_flag; extern int altered_nroff_flag;
extern Dlg_head *view_dlg; extern Dlg_head *view_dlg;
void view_adjust_size (Dlg_head *);
/* A node for building a change list on change_list */ /* A node for building a change list on change_list */
struct hexedit_change_node { struct hexedit_change_node {
struct hexedit_change_node *next; struct hexedit_change_node *next;