mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-02 00:16:04 +03:00
change type of some parameters from int to long.
Changed functions: * edit_count_lines() * edit_move_forward() * edit_move_backward() Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
9c9bb27171
commit
280d7e88f9
@ -159,10 +159,10 @@ char *edit_get_byte_ptr (WEdit * edit, long byte_index);
|
||||
char *edit_get_buf_ptr (WEdit * edit, long byte_index);
|
||||
int edit_get_utf (WEdit * edit, long byte_index, int *char_width);
|
||||
int edit_get_prev_utf (WEdit * edit, long byte_index, int *char_width);
|
||||
int edit_count_lines (WEdit * edit, long current, int upto);
|
||||
long edit_move_forward (WEdit * edit, long current, int lines, long upto);
|
||||
long edit_count_lines (WEdit * edit, long current, long upto);
|
||||
long edit_move_forward (WEdit * edit, long current, long lines, long upto);
|
||||
long edit_move_forward3 (WEdit * edit, long current, int cols, long upto);
|
||||
long edit_move_backward (WEdit * edit, long current, int lines);
|
||||
long edit_move_backward (WEdit * edit, long current, long lines);
|
||||
void edit_scroll_screen_over_cursor (WEdit * edit);
|
||||
void edit_render_keypress (WEdit * edit);
|
||||
void edit_scroll_upward (WEdit * edit, unsigned long i);
|
||||
|
10
edit/edit.c
10
edit/edit.c
@ -1526,9 +1526,9 @@ long edit_bol (WEdit * edit, long current)
|
||||
}
|
||||
|
||||
|
||||
int edit_count_lines (WEdit * edit, long current, int upto)
|
||||
long edit_count_lines (WEdit * edit, long current, long upto)
|
||||
{
|
||||
int lines = 0;
|
||||
long lines = 0;
|
||||
if (upto > edit->last_byte)
|
||||
upto = edit->last_byte;
|
||||
if (current < 0)
|
||||
@ -1542,12 +1542,12 @@ int edit_count_lines (WEdit * edit, long current, int upto)
|
||||
|
||||
/* If lines is zero this returns the count of lines from current to upto. */
|
||||
/* If upto is zero returns index of lines forward current. */
|
||||
long edit_move_forward (WEdit * edit, long current, int lines, long upto)
|
||||
long edit_move_forward (WEdit * edit, long current, long lines, long upto)
|
||||
{
|
||||
if (upto) {
|
||||
return edit_count_lines (edit, current, upto);
|
||||
} else {
|
||||
int next;
|
||||
long next;
|
||||
if (lines < 0)
|
||||
lines = 0;
|
||||
while (lines--) {
|
||||
@ -1563,7 +1563,7 @@ long edit_move_forward (WEdit * edit, long current, int lines, long upto)
|
||||
|
||||
|
||||
/* Returns offset of 'lines' lines up from current */
|
||||
long edit_move_backward (WEdit * edit, long current, int lines)
|
||||
long edit_move_backward (WEdit * edit, long current, long lines)
|
||||
{
|
||||
if (lines < 0)
|
||||
lines = 0;
|
||||
|
@ -87,7 +87,7 @@ static void
|
||||
edit_search_cmd_search_create_bookmark(WEdit * edit)
|
||||
{
|
||||
int found = 0, books = 0;
|
||||
int l = 0, l_last = -1;
|
||||
long l = 0, l_last = -1;
|
||||
long q = 0;
|
||||
gsize len = 0;
|
||||
|
||||
@ -1252,7 +1252,8 @@ edit_block_move_cmd (WEdit *edit)
|
||||
edit_push_markers (edit);
|
||||
current = edit->curs1;
|
||||
if (column_highlighting) {
|
||||
int size, c1, c2, line;
|
||||
long line;
|
||||
int size, c1, c2;
|
||||
line = edit->curs_line;
|
||||
if (edit->mark2 < 0)
|
||||
edit_mark_cmd (edit, 0);
|
||||
@ -1313,8 +1314,7 @@ static void
|
||||
edit_delete_column_of_text (WEdit * edit)
|
||||
{
|
||||
long p, q, r, m1, m2;
|
||||
int b, c, d;
|
||||
int n;
|
||||
long b, c, d, n;
|
||||
|
||||
eval_marks (edit, &m1, &m2);
|
||||
n = edit_move_forward (edit, m1, 0, m2) + 1;
|
||||
@ -1856,7 +1856,8 @@ edit_get_block (WEdit *edit, long start, long finish, int *l)
|
||||
*l = 0;
|
||||
/* copy from buffer, excluding chars that are out of the column 'margins' */
|
||||
while (start < finish) {
|
||||
int c, x;
|
||||
int c;
|
||||
long x;
|
||||
x = edit_move_forward3 (edit, edit_bol (edit, start), 0,
|
||||
start);
|
||||
c = edit_get_byte (edit, start);
|
||||
|
@ -612,7 +612,7 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row,
|
||||
long end_column)
|
||||
{
|
||||
long row = 0, curs_row;
|
||||
static int prev_curs_row = 0;
|
||||
static long prev_curs_row = 0;
|
||||
static long prev_curs = 0;
|
||||
|
||||
int force = edit->force;
|
||||
|
@ -95,7 +95,7 @@ static int bad_line_start (WEdit * edit, long p)
|
||||
static long
|
||||
begin_paragraph (WEdit *edit, int force)
|
||||
{
|
||||
int i;
|
||||
long i;
|
||||
for (i = edit->curs_line - 1; i >= 0; i--) {
|
||||
if (line_is_blank (edit, i)) {
|
||||
i++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user