[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/marker.c
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/marker.c |
Date: |
Sun, 06 Apr 2003 16:33:59 -0400 |
Index: emacs/src/marker.c
diff -c emacs/src/marker.c:1.39 emacs/src/marker.c:1.40
*** emacs/src/marker.c:1.39 Tue Feb 4 09:03:13 2003
--- emacs/src/marker.c Sun Apr 6 16:33:59 2003
***************
*** 252,257 ****
--- 252,275 ----
}
#undef CONSIDER
+
+ /* Used for debugging: recompute the bytepos corresponding to CHARPOS
+ in the simplest, most reliable way. */
+
+ int
+ verify_bytepos (charpos)
+ {
+ int below = 1;
+ int below_byte = 1;
+
+ while (below != charpos)
+ {
+ below++;
+ BUF_INC_POS (current_buffer, below_byte);
+ }
+
+ return below_byte;
+ }
/* bytepos_to_charpos returns the char position corresponding to BYTEPOS. */