comparison src/extents.c @ 5126:2a462149bd6a ben-lisp-object

merge
author Ben Wing <ben@xemacs.org>
date Wed, 24 Feb 2010 19:04:27 -0600
parents b5df3737028a 0e803dc6f096
children a9c41067dd88
comparison
equal deleted inserted replaced
5125:b5df3737028a 5126:2a462149bd6a
1 /* Copyright (c) 1994, 1995 Free Software Foundation, Inc. 1 /* Copyright (c) 1994, 1995 Free Software Foundation, Inc.
2 Copyright (c) 1995 Sun Microsystems, Inc. 2 Copyright (c) 1995 Sun Microsystems, Inc.
3 Copyright (c) 1995, 1996, 2000, 2002, 2003, 2004, 2005 Ben Wing. 3 Copyright (c) 1995, 1996, 2000, 2002, 2003, 2004, 2005, 2010 Ben Wing.
4 4
5 This file is part of XEmacs. 5 This file is part of XEmacs.
6 6
7 XEmacs is free software; you can redistribute it and/or modify it 7 XEmacs is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the 8 under the terms of the GNU General Public License as published by the
4925 /* When this function is called, one end of the newly-inserted text should 4925 /* When this function is called, one end of the newly-inserted text should
4926 be adjacent to some endpoint of the extent, or disjoint from it. If 4926 be adjacent to some endpoint of the extent, or disjoint from it. If
4927 the insertion overlaps any existing extent, something is wrong. 4927 the insertion overlaps any existing extent, something is wrong.
4928 */ 4928 */
4929 #ifdef ERROR_CHECK_EXTENTS 4929 #ifdef ERROR_CHECK_EXTENTS
4930 if (extent_start (extent) > indice && 4930 assert (extent_start (extent) <= indice || extent_start (extent) >= indice + closure->length);
4931 extent_start (extent) < indice + closure->length) 4931 assert (extent_end (extent) <= indice || extent_end (extent) >= indice + closure->length);
4932 ABORT ();
4933 if (extent_end (extent) > indice &&
4934 extent_end (extent) < indice + closure->length)
4935 ABORT ();
4936 #endif 4932 #endif
4937 4933
4938 /* The extent-adjustment code adjusted the extent's endpoints as if 4934 /* The extent-adjustment code adjusted the extent's endpoints as if
4939 all extents were closed-open -- endpoints at the insertion point 4935 all extents were closed-open -- endpoints at the insertion point
4940 remain unchanged. We need to fix the other kinds of extents: 4936 remain unchanged. We need to fix the other kinds of extents: