Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / src / marker.c
index 9b84183..75d4fe9 100644 (file)
@@ -1,5 +1,5 @@
 /* Markers: examining, setting and deleting.
-   Copyright (C) 1985, 1997-1998, 2001-2011  Free Software Foundation, Inc.
+   Copyright (C) 1985, 1997-1998, 2001-2012  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -242,6 +242,7 @@ buf_charpos_to_bytepos (struct buffer *b, EMACS_INT charpos)
 /* Used for debugging: recompute the bytepos corresponding to CHARPOS
    in the simplest, most reliable way.  */
 
+extern EMACS_INT verify_bytepos (EMACS_INT charpos) EXTERNALLY_VISIBLE;
 EMACS_INT
 verify_bytepos (EMACS_INT charpos)
 {
@@ -257,9 +258,10 @@ verify_bytepos (EMACS_INT charpos)
   return below_byte;
 }
 \f
-/* bytepos_to_charpos returns the char position corresponding to BYTEPOS.  */
+/* buf_bytepos_to_charpos returns the char position corresponding to
+   BYTEPOS.  */
 
-/* This macro is a subroutine of bytepos_to_charpos.
+/* This macro is a subroutine of buf_bytepos_to_charpos.
    It is used when BYTEPOS is actually the byte position.  */
 
 #define CONSIDER(BYTEPOS, CHARPOS)                                     \
@@ -302,12 +304,6 @@ verify_bytepos (EMACS_INT charpos)
     }                                                                  \
 }
 
-EMACS_INT
-bytepos_to_charpos (EMACS_INT bytepos)
-{
-  return buf_bytepos_to_charpos (current_buffer, bytepos);
-}
-
 EMACS_INT
 buf_bytepos_to_charpos (struct buffer *b, EMACS_INT bytepos)
 {
@@ -439,7 +435,7 @@ Returns nil if MARKER points into a dead buffer.  */)
         does not preserve the buffer from being GC'd (it's weak), so
         markers have to be unlinked from their buffer as soon as the buffer
         is killed.  */
-      eassert (!NILP (B_ (XBUFFER (buf), name)));
+      eassert (!NILP (BVAR (XBUFFER (buf), name)));
       return buf;
     }
   return Qnil;
@@ -488,7 +484,7 @@ Returns MARKER.  */)
       CHECK_BUFFER (buffer);
       b = XBUFFER (buffer);
       /* If buffer is dead, set marker to point nowhere.  */
-      if (EQ (B_ (b, name), Qnil))
+      if (EQ (BVAR (b, name), Qnil))
        {
          unchain_marker (m);
          return marker;
@@ -563,7 +559,7 @@ set_marker_restricted (Lisp_Object marker, Lisp_Object pos, Lisp_Object buffer)
       CHECK_BUFFER (buffer);
       b = XBUFFER (buffer);
       /* If buffer is dead, set marker to point nowhere.  */
-      if (EQ (B_ (b, name), Qnil))
+      if (EQ (BVAR (b, name), Qnil))
        {
          unchain_marker (m);
          return marker;
@@ -628,7 +624,7 @@ set_marker_both (Lisp_Object marker, Lisp_Object buffer, EMACS_INT charpos, EMAC
       CHECK_BUFFER (buffer);
       b = XBUFFER (buffer);
       /* If buffer is dead, set marker to point nowhere.  */
-      if (EQ (B_ (b, name), Qnil))
+      if (EQ (BVAR (b, name), Qnil))
        {
          unchain_marker (m);
          return marker;
@@ -676,7 +672,7 @@ set_marker_restricted_both (Lisp_Object marker, Lisp_Object buffer, EMACS_INT ch
       CHECK_BUFFER (buffer);
       b = XBUFFER (buffer);
       /* If buffer is dead, set marker to point nowhere.  */
-      if (EQ (B_ (b, name), Qnil))
+      if (EQ (BVAR (b, name), Qnil))
        {
          unchain_marker (m);
          return marker;
@@ -731,7 +727,7 @@ unchain_marker (register struct Lisp_Marker *marker)
   if (b == 0)
     return;
 
-  if (EQ (B_ (b, name), Qnil))
+  if (EQ (BVAR (b, name), Qnil))
     abort ();
 
   marker->buffer = 0;
@@ -869,6 +865,7 @@ DEFUN ("buffer-has-markers-at", Fbuffer_has_markers_at, Sbuffer_has_markers_at,
 
 /* For debugging -- count the markers in buffer BUF.  */
 
+extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE;
 int
 count_markers (struct buffer *buf)
 {
@@ -896,4 +893,3 @@ syms_of_marker (void)
               doc: /* Non-nil enables debugging checks in byte/char position conversions.  */);
   byte_debug_flag = 0;
 }
-