From ba8645f061a671870b92420330a1d68430330412 Mon Sep 17 00:00:00 2001
From: Vit Rosin <vit_r@list.ru>
Date: Sat, 14 Nov 2009 15:18:05 +0000
Subject: [PATCH] fixing_some_declarations
---
edit/edit-impl.h | 6 +++---
edit/edit.c | 10 +++++-----
edit/editcmd.c | 11 ++++++-----
edit/editdraw.c | 2 +-
edit/wordproc.c | 2 +-
5 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/edit/edit-impl.h b/edit/edit-impl.h
index 4446f40..b6140d6 100644
a
|
b
|
char *edit_get_byte_ptr (WEdit * edit, long byte_index); |
159 | 159 | char *edit_get_buf_ptr (WEdit * edit, long byte_index); |
160 | 160 | int edit_get_utf (WEdit * edit, long byte_index, int *char_width); |
161 | 161 | int edit_get_prev_utf (WEdit * edit, long byte_index, int *char_width); |
162 | | int edit_count_lines (WEdit * edit, long current, int upto); |
163 | | long edit_move_forward (WEdit * edit, long current, int lines, long upto); |
| 162 | long edit_count_lines (WEdit * edit, long current, long upto); |
| 163 | long edit_move_forward (WEdit * edit, long current, long lines, long upto); |
164 | 164 | long edit_move_forward3 (WEdit * edit, long current, int cols, long upto); |
165 | | long edit_move_backward (WEdit * edit, long current, int lines); |
| 165 | long edit_move_backward (WEdit * edit, long current, long lines); |
166 | 166 | void edit_scroll_screen_over_cursor (WEdit * edit); |
167 | 167 | void edit_render_keypress (WEdit * edit); |
168 | 168 | void edit_scroll_upward (WEdit * edit, unsigned long i); |
diff --git a/edit/edit.c b/edit/edit.c
index 9a51b79..39699cf 100644
a
|
b
|
long edit_bol (WEdit * edit, long current) |
1524 | 1524 | } |
1525 | 1525 | |
1526 | 1526 | |
1527 | | int edit_count_lines (WEdit * edit, long current, int upto) |
| 1527 | long edit_count_lines (WEdit * edit, long current, long upto) |
1528 | 1528 | { |
1529 | | int lines = 0; |
| 1529 | long lines = 0; |
1530 | 1530 | if (upto > edit->last_byte) |
1531 | 1531 | upto = edit->last_byte; |
1532 | 1532 | if (current < 0) |
… |
… |
int edit_count_lines (WEdit * edit, long current, int upto) |
1540 | 1540 | |
1541 | 1541 | /* If lines is zero this returns the count of lines from current to upto. */ |
1542 | 1542 | /* If upto is zero returns index of lines forward current. */ |
1543 | | long edit_move_forward (WEdit * edit, long current, int lines, long upto) |
| 1543 | long edit_move_forward (WEdit * edit, long current, long lines, long upto) |
1544 | 1544 | { |
1545 | 1545 | if (upto) { |
1546 | 1546 | return edit_count_lines (edit, current, upto); |
1547 | 1547 | } else { |
1548 | | int next; |
| 1548 | long next; |
1549 | 1549 | if (lines < 0) |
1550 | 1550 | lines = 0; |
1551 | 1551 | while (lines--) { |
… |
… |
long edit_move_forward (WEdit * edit, long current, int lines, long upto) |
1561 | 1561 | |
1562 | 1562 | |
1563 | 1563 | /* Returns offset of 'lines' lines up from current */ |
1564 | | long edit_move_backward (WEdit * edit, long current, int lines) |
| 1564 | long edit_move_backward (WEdit * edit, long current, long lines) |
1565 | 1565 | { |
1566 | 1566 | if (lines < 0) |
1567 | 1567 | lines = 0; |
diff --git a/edit/editcmd.c b/edit/editcmd.c
index 48f1db6..5abfc27 100644
a
|
b
|
static void |
87 | 87 | edit_search_cmd_search_create_bookmark(WEdit * edit) |
88 | 88 | { |
89 | 89 | int found = 0, books = 0; |
90 | | int l = 0, l_last = -1; |
| 90 | long l = 0, l_last = -1; |
91 | 91 | long q = 0; |
92 | 92 | gsize len = 0; |
93 | 93 | |
… |
… |
edit_block_move_cmd (WEdit *edit) |
1237 | 1237 | edit_push_markers (edit); |
1238 | 1238 | current = edit->curs1; |
1239 | 1239 | if (column_highlighting) { |
1240 | | int size, c1, c2, line; |
| 1240 | long line; |
| 1241 | int size, c1, c2; |
1241 | 1242 | line = edit->curs_line; |
1242 | 1243 | if (edit->mark2 < 0) |
1243 | 1244 | edit_mark_cmd (edit, 0); |
… |
… |
static void |
1298 | 1299 | edit_delete_column_of_text (WEdit * edit) |
1299 | 1300 | { |
1300 | 1301 | long p, q, r, m1, m2; |
1301 | | int b, c, d; |
1302 | | int n; |
| 1302 | long b, c, d, n; |
1303 | 1303 | |
1304 | 1304 | eval_marks (edit, &m1, &m2); |
1305 | 1305 | n = edit_move_forward (edit, m1, 0, m2) + 1; |
… |
… |
edit_get_block (WEdit *edit, long start, long finish, int *l) |
1818 | 1818 | *l = 0; |
1819 | 1819 | /* copy from buffer, excluding chars that are out of the column 'margins' */ |
1820 | 1820 | while (start < finish) { |
1821 | | int c, x; |
| 1821 | int c; |
| 1822 | long x; |
1822 | 1823 | x = edit_move_forward3 (edit, edit_bol (edit, start), 0, |
1823 | 1824 | start); |
1824 | 1825 | c = edit_get_byte (edit, start); |
diff --git a/edit/editdraw.c b/edit/editdraw.c
index a6620eb..e5f7d5c 100644
a
|
b
|
render_edit_text (WEdit * edit, long start_row, long start_column, long end_row, |
614 | 614 | long end_column) |
615 | 615 | { |
616 | 616 | long row = 0, curs_row; |
617 | | static int prev_curs_row = 0; |
| 617 | static long prev_curs_row = 0; |
618 | 618 | static long prev_curs = 0; |
619 | 619 | |
620 | 620 | int force = edit->force; |
diff --git a/edit/wordproc.c b/edit/wordproc.c
index e3c3055..bd74489 100644
a
|
b
|
static int bad_line_start (WEdit * edit, long p) |
95 | 95 | static long |
96 | 96 | begin_paragraph (WEdit *edit, int force) |
97 | 97 | { |
98 | | int i; |
| 98 | long i; |
99 | 99 | for (i = edit->curs_line - 1; i >= 0; i--) { |
100 | 100 | if (line_is_blank (edit, i)) { |
101 | 101 | i++; |