diff options
Diffstat (limited to 'src/scroll.c')
| -rw-r--r-- | src/scroll.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/src/scroll.c b/src/scroll.c index 6291936a541..05f6fdf85f0 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -969,32 +969,14 @@ do_line_insertion_deletion_costs (FRAME_PTR frame, | |||
| 969 | const char *cleanup_string, | 969 | const char *cleanup_string, |
| 970 | int coefficient) | 970 | int coefficient) |
| 971 | { | 971 | { |
| 972 | if (FRAME_INSERT_COST (frame) != 0) | 972 | FRAME_INSERT_COST (frame) = |
| 973 | { | 973 | xnrealloc (FRAME_INSERT_COST (frame), FRAME_LINES (frame), sizeof (int)); |
| 974 | FRAME_INSERT_COST (frame) = | 974 | FRAME_DELETEN_COST (frame) = |
| 975 | (int *) xrealloc (FRAME_INSERT_COST (frame), | 975 | xnrealloc (FRAME_DELETEN_COST (frame), FRAME_LINES (frame), sizeof (int)); |
| 976 | FRAME_LINES (frame) * sizeof (int)); | 976 | FRAME_INSERTN_COST (frame) = |
| 977 | FRAME_DELETEN_COST (frame) = | 977 | xnrealloc (FRAME_INSERTN_COST (frame), FRAME_LINES (frame), sizeof (int)); |
| 978 | (int *) xrealloc (FRAME_DELETEN_COST (frame), | 978 | FRAME_DELETE_COST (frame) = |
| 979 | FRAME_LINES (frame) * sizeof (int)); | 979 | xnrealloc (FRAME_DELETE_COST (frame), FRAME_LINES (frame), sizeof (int)); |
| 980 | FRAME_INSERTN_COST (frame) = | ||
| 981 | (int *) xrealloc (FRAME_INSERTN_COST (frame), | ||
| 982 | FRAME_LINES (frame) * sizeof (int)); | ||
| 983 | FRAME_DELETE_COST (frame) = | ||
| 984 | (int *) xrealloc (FRAME_DELETE_COST (frame), | ||
| 985 | FRAME_LINES (frame) * sizeof (int)); | ||
| 986 | } | ||
| 987 | else | ||
| 988 | { | ||
| 989 | FRAME_INSERT_COST (frame) = | ||
| 990 | (int *) xmalloc (FRAME_LINES (frame) * sizeof (int)); | ||
| 991 | FRAME_DELETEN_COST (frame) = | ||
| 992 | (int *) xmalloc (FRAME_LINES (frame) * sizeof (int)); | ||
| 993 | FRAME_INSERTN_COST (frame) = | ||
| 994 | (int *) xmalloc (FRAME_LINES (frame) * sizeof (int)); | ||
| 995 | FRAME_DELETE_COST (frame) = | ||
| 996 | (int *) xmalloc (FRAME_LINES (frame) * sizeof (int)); | ||
| 997 | } | ||
| 998 | 980 | ||
| 999 | ins_del_costs (frame, | 981 | ins_del_costs (frame, |
| 1000 | ins_line_string, multi_ins_string, | 982 | ins_line_string, multi_ins_string, |