changeset 44560:0fddc27db9ae

(count_markers): New function.
author Richard M. Stallman <rms@gnu.org>
date Sat, 13 Apr 2002 17:47:20 +0000
parents a7ca9a83f673
children b79166cba466
files src/marker.c
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/marker.c	Sat Apr 13 17:46:37 2002 +0000
+++ b/src/marker.c	Sat Apr 13 17:47:20 2002 +0000
@@ -888,6 +888,23 @@
 
   return Qnil;
 }
+
+/* For debugging -- count the markers in buffer BUF.  */
+
+int
+count_markers (buf)
+     struct buffer *buf;
+{
+  int total = 0;
+  Lisp_Object tail;
+
+  for (tail = BUF_MARKERS (buf);
+       !NILP (tail);
+       tail = XMARKER (tail)->chain)
+    total++;
+
+  return total;
+}
 
 void
 syms_of_marker ()