/* Header file for the buffer manipulation primitives.
- Copyright (C) 1985, 86, 93, 94, 95, 97, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1985, 86, 93, 94, 95, 97, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GNU Emacs.
extern INLINE void temp_set_point P_ ((struct buffer *, int));
extern void set_point_both P_ ((struct buffer *, int, int));
extern INLINE void temp_set_point_both P_ ((struct buffer *, int, int));
+extern void enlarge_buffer_text P_ ((struct buffer *, int));
\f
/* Macros for setting the BEGV, ZV or PT of a given buffer.
These macros do not check that the position is in range. */
/* Access a Lisp position value in POS,
- and store the charpos in CHARPOS and the bypepos in BYPEPOS. */
+ and store the charpos in CHARPOS and the bytepos in BYTEPOS. */
#define DECODE_POSITION(charpos, bytepos, pos) \
if (1) \
end_unchanged contain no useful information. */
int overlay_unchanged_modified;
- /* Properties of this buffer's text -- conditionally compiled. */
- DECLARE_INTERVALS
+ /* Properties of this buffer's text. */
+ INTERVAL intervals;
/* The markers that refer to this buffer.
This is actually a single marker ---
\f
extern void reset_buffer P_ ((struct buffer *));
extern void evaporate_overlays P_ ((int));
-extern int overlays_at P_ ((int, int, Lisp_Object **, int *, int *, int *));
+extern int overlays_at P_ ((int, int, Lisp_Object **, int *, int *, int *, int));
extern int sort_overlays P_ ((Lisp_Object *, int, struct window *));
extern void recenter_overlay_lists P_ ((struct buffer *, int));
extern int overlay_strings P_ ((int, struct window *, unsigned char **));
extern void record_buffer P_ ((Lisp_Object));
extern void buffer_slot_type_mismatch P_ ((int));
extern void fix_overlays_before P_ ((struct buffer *, int, int));
-
+extern void mmap_set_vars P_ ((int));
EXFUN (Fbuffer_name, 1);
EXFUN (Fget_file_buffer, 1);
/* Overlays */
/* 1 if the OV is an overlay object. */
+
#define OVERLAY_VALID(OV) (OVERLAYP (OV))
/* Return the marker that stands for where OV starts in the buffer. */
+
#define OVERLAY_START(OV) (XOVERLAY (OV)->start)
/* Return the marker that stands for where OV ends in the buffer. */
+
#define OVERLAY_END(OV) (XOVERLAY (OV)->end)
+/* Return the plist of overlay OV. */
+
+#define OVERLAY_PLIST(OV) XOVERLAY ((OV))->plist
+
/* Return the actual buffer position for the marker P.
We assume you know which buffer it's pointing into. */
#define OVERLAY_POSITION(P) \
(GC_MARKERP (P) ? marker_position (P) : (abort (), 0))
-/* Allocation of buffer text. */
-
-#ifdef REL_ALLOC
-
-extern char *r_alloc P_ ((char **, unsigned long));
-extern void r_alloc_free P_ ((char **ptr));
-extern char *r_re_alloc P_ ((char **, unsigned long));
-
-#define BUFFER_ALLOC(data,size) \
- ((unsigned char *) r_alloc ((char **)&data, (size)))
-#define BUFFER_REALLOC(data,size) \
- ((unsigned char *) r_re_alloc ((char **) &data, (size)))
-#define BUFFER_FREE(data) (r_alloc_free ((char **) &data))
-#define R_ALLOC_DECLARE(var,data) (r_alloc_declare (&var, (data)))
-#else
-#define BUFFER_ALLOC(data,size) (data = (unsigned char *) malloc ((size)))
-#define BUFFER_REALLOC(data,size) ((unsigned char *) realloc ((data), (size)))
-#define BUFFER_FREE(data) (free ((data)))
-#define R_ALLOC_DECLARE(var,data)
-#endif
-
+\f
/***********************************************************************
Buffer-local Variables
***********************************************************************/