view_get_bottom(), view_get_right() to mark the bounds of the
rectangle that can be used for displaying data. Expressed
view_get_datalines() and view_get_datacolumns() in terms of
these four functions.
on errors. All changed bytes that could not be saved are kept
in the change list, so that the user can try to save them later.
* view.c (view_set_byte): Added for save_edit_changes().
* view.c (display): view_place_cursor() is called after displaying
in hex mode.
dpy_text_start_col, which has a similar function like start_col,
but does not have negative values. Added bounds checking for
dpy_text_start_col. Code cleanup, as usual.
practically equivalent to view->datasource != DS_NONE.
* view.c (do_view_init): Renamed to view_load().
* view.c (view_new): Every field of the WView is initialized
explicitly.
* view.c (view_move_forward2): Rewrote the hexmode algorithm to
get rid of the ?: operators. Introduced some variables with names
that better fit their actual use. Fixed a bug that appeared when
scrolling down by single lines in framed (panel) mode.
got too complex maintaining it together with the new datasource
framework. The function view_get_filesize() now takes its place.
Corrected the type of the growing buffer to unsigned char. Added
a field growbuf_finished to indicate when all data has been read.
* view.c (view_move_cursor_to_eol): Renamed to
view_hexview_move_to_eol().
* view.c (view_get_filesize): Added.
* view.c (view_get_filesize_with_exact): Added.
* view.c (get_byte_indexed): get_byte with bounds checking.
* view.c (view_growbuf_read_until): Closes the datasource after
reading has finished.
* view.c (view_percent): The percentage is only shown when its
exact value can be computed.
* view.c (view_status): The [grow] field has been removed from
the status line. Instead, the filesize is reported as ">= n"
bytes.
* view.c (count_backspaces): Added a bounds check.
* view.c (display): Using get_byte_indexed instead of get_byte.
* view.c (move_forward2): Renamed to view_move_forward2 because
of the equally-named function in src/help.c. Replaced the
algorithm for the hexview mode by a much simpler version. Now
we have 5 ?: operators less than before.
* view.c (get_bottom_first): Added bounds checking.
* view.c (move_right): Simplified the code.
* view.c (goto_addr): Fixed an off-by-one error.
* view.c (view_close_datasource): For the growing buffer cases,
check if the datasource has already been closed before.
accessed using mc_read(). Added a framework for datasources.
Introduced assertions. Removed some variables (e.g. view->data)
that were used for many things simultaneously.