aboutsummaryrefslogtreecommitdiffstats
path: root/src/scroll.c
diff options
context:
space:
mode:
authorJoakim Verona2011-08-27 19:45:48 +0200
committerJoakim Verona2011-08-27 19:45:48 +0200
commit9fb7b0cab34a48a4c7b66abb6b8edc4ee20467b4 (patch)
treee94476d49f15747fcb9409d773702e88201855a4 /src/scroll.c
parentc7489583c30031c0ecfae9d20b20c149ca1935e9 (diff)
parentb75258b32810f3690442bddef2e10eef126d2d25 (diff)
downloademacs-9fb7b0cab34a48a4c7b66abb6b8edc4ee20467b4.tar.gz
emacs-9fb7b0cab34a48a4c7b66abb6b8edc4ee20467b4.zip
upstream
Diffstat (limited to 'src/scroll.c')
-rw-r--r--src/scroll.c34
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,