Ticket #151: fix_uninitalised_int-rev2.patch

File fix_uninitalised_int-rev2.patch, 1.9 KB (added by slavazanko, 16 years ago)
  • edit/edit.c

    diff --git a/edit/edit.c b/edit/edit.c
    index ff2b2e7..4bce119 100644
    a b edit_move_backward_lots (WEdit *edit, long increment) 
    10961096#endif          /* ! FAST_MOVE_CURSOR */ 
    10971097 
    10981098/* moves the cursor right or left: increment positive or negative respectively */ 
    1099 int edit_cursor_move (WEdit * edit, long increment) 
     1099void edit_cursor_move (WEdit * edit, long increment) 
    11001100{ 
    11011101/* this is the same as a combination of two of the above routines, with only one push onto the undo stack */ 
    11021102    int c; 
    int edit_cursor_move (WEdit * edit, long increment) 
    11041104#ifdef FAST_MOVE_CURSOR 
    11051105    if (increment < -256) { 
    11061106        edit->force |= REDRAW_PAGE; 
    1107         return edit_move_backward_lots (edit, -increment); 
     1107        edit_move_backward_lots (edit, -increment); 
     1108        return; 
    11081109    } 
    11091110#endif          /* ! FAST_MOVE_CURSOR */ 
    11101111 
    11111112    if (increment < 0) { 
    11121113        for (; increment < 0; increment++) { 
    11131114            if (!edit->curs1) 
    1114                 return -1; 
     1115                return; 
    11151116 
    11161117            edit_push_action (edit, CURS_RIGHT); 
    11171118 
    int edit_cursor_move (WEdit * edit, long increment) 
    11321133            } 
    11331134        } 
    11341135 
    1135         return c; 
    11361136    } else if (increment > 0) { 
    11371137        for (; increment > 0; increment--) { 
    11381138            if (!edit->curs2) 
    1139                 return -2; 
     1139                return; 
    11401140 
    11411141            edit_push_action (edit, CURS_LEFT); 
    11421142 
    int edit_cursor_move (WEdit * edit, long increment) 
    11561156                edit->force |= REDRAW_LINE_ABOVE; 
    11571157            } 
    11581158        } 
    1159         return c; 
    1160     } else 
    1161         return -3; 
     1159    } 
    11621160} 
    11631161 
    11641162/* These functions return positions relative to lines */ 
  • edit/edit.h

    diff --git a/edit/edit.h b/edit/edit.h
    index d7725b6..4a1c39b 100644
    a b void edit_delete_line (WEdit * edit); 
    149149 
    150150int edit_delete (WEdit * edit); 
    151151void edit_insert (WEdit * edit, int c); 
    152 int edit_cursor_move (WEdit * edit, long increment); 
     152void edit_cursor_move (WEdit * edit, long increment); 
    153153void edit_push_action (WEdit * edit, long c, ...); 
    154154void edit_push_key_press (WEdit * edit); 
    155155void edit_insert_ahead (WEdit * edit, int c);