1
1
make function edit_cursor_move() to non-return (void).
Этот коммит содержится в:
Slava Zanko 2009-01-09 01:33:17 +02:00
родитель 6f8a3b3825
Коммит 8ebe7873c9
2 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -1096,22 +1096,23 @@ edit_move_backward_lots (WEdit *edit, long increment)
#endif /* ! FAST_MOVE_CURSOR */ #endif /* ! FAST_MOVE_CURSOR */
/* moves the cursor right or left: increment positive or negative respectively */ /* moves the cursor right or left: increment positive or negative respectively */
int edit_cursor_move (WEdit * edit, long increment) void edit_cursor_move (WEdit * edit, long increment)
{ {
/* this is the same as a combination of two of the above routines, with only one push onto the undo stack */ /* this is the same as a combination of two of the above routines, with only one push onto the undo stack */
int c = -3; int c;
#ifdef FAST_MOVE_CURSOR #ifdef FAST_MOVE_CURSOR
if (increment < -256) { if (increment < -256) {
edit->force |= REDRAW_PAGE; edit->force |= REDRAW_PAGE;
return edit_move_backward_lots (edit, -increment); edit_move_backward_lots (edit, -increment);
return;
} }
#endif /* ! FAST_MOVE_CURSOR */ #endif /* ! FAST_MOVE_CURSOR */
if (increment < 0) { if (increment < 0) {
for (; increment < 0; increment++) { for (; increment < 0; increment++) {
if (!edit->curs1) if (!edit->curs1)
return -1; return;
edit_push_action (edit, CURS_RIGHT); edit_push_action (edit, CURS_RIGHT);
@ -1135,7 +1136,7 @@ int edit_cursor_move (WEdit * edit, long increment)
} else if (increment > 0) { } else if (increment > 0) {
for (; increment > 0; increment--) { for (; increment > 0; increment--) {
if (!edit->curs2) if (!edit->curs2)
return -2; return;
edit_push_action (edit, CURS_LEFT); edit_push_action (edit, CURS_LEFT);
@ -1155,8 +1156,7 @@ int edit_cursor_move (WEdit * edit, long increment)
edit->force |= REDRAW_LINE_ABOVE; edit->force |= REDRAW_LINE_ABOVE;
} }
} }
} }
return c;
} }
/* These functions return positions relative to lines */ /* These functions return positions relative to lines */

Просмотреть файл

@ -149,7 +149,7 @@ void edit_delete_line (WEdit * edit);
int edit_delete (WEdit * edit); int edit_delete (WEdit * edit);
void edit_insert (WEdit * edit, int c); void edit_insert (WEdit * edit, int c);
int edit_cursor_move (WEdit * edit, long increment); void edit_cursor_move (WEdit * edit, long increment);
void edit_push_action (WEdit * edit, long c, ...); void edit_push_action (WEdit * edit, long c, ...);
void edit_push_key_press (WEdit * edit); void edit_push_key_press (WEdit * edit);
void edit_insert_ahead (WEdit * edit, int c); void edit_insert_ahead (WEdit * edit, int c);