aboutsummaryrefslogtreecommitdiffstats
path: root/src/scroll.c
diff options
context:
space:
mode:
authorStefan Monnier2012-03-25 16:37:21 -0400
committerStefan Monnier2012-03-25 16:37:21 -0400
commit699c782b7668c44d0fa4446331b0590a6d5dac82 (patch)
tree5dcce364741d0761920a3d274b0fc8aba4103d45 /src/scroll.c
parent98fb480ee31bf74cf554044f60f21df16566dd7f (diff)
parente99a9b8bdccadded1f6fae88ee7a2a93dfd4eacf (diff)
downloademacs-pending.tar.gz
emacs-pending.zip
Merge from trunkpending
Diffstat (limited to 'src/scroll.c')
-rw-r--r--src/scroll.c36
1 files changed, 9 insertions, 27 deletions
diff --git a/src/scroll.c b/src/scroll.c
index 6291936a541..77ea1007ade 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -1,6 +1,6 @@
1/* Calculate what line insertion or deletion to do, and do it 1/* Calculate what line insertion or deletion to do, and do it
2 2
3Copyright (C) 1985-1986, 1990, 1993-1994, 2001-2011 3Copyright (C) 1985-1986, 1990, 1993-1994, 2001-2012
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
@@ -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,