comparison src/buffer.h @ 31605:c3073b2c8dfa

(BUFFER_ALLOC, BUFFER_REALLOC, BUFFER_FREE): Removed. (enlarge_buffer_text): Add prototype.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 14 Sep 2000 15:14:15 +0000
parents 920b03e019bf
children 17cf716e8dc6
comparison
equal deleted inserted replaced
31604:91e7cea32eaa 31605:c3073b2c8dfa
214 214
215 extern void set_point P_ ((struct buffer *, int)); 215 extern void set_point P_ ((struct buffer *, int));
216 extern INLINE void temp_set_point P_ ((struct buffer *, int)); 216 extern INLINE void temp_set_point P_ ((struct buffer *, int));
217 extern void set_point_both P_ ((struct buffer *, int, int)); 217 extern void set_point_both P_ ((struct buffer *, int, int));
218 extern INLINE void temp_set_point_both P_ ((struct buffer *, int, int)); 218 extern INLINE void temp_set_point_both P_ ((struct buffer *, int, int));
219 extern void enlarge_buffer_text P_ ((struct buffer *, int));
219 220
220 221
221 /* Macros for setting the BEGV, ZV or PT of a given buffer. 222 /* Macros for setting the BEGV, ZV or PT of a given buffer.
222 223
223 SET_BUF_PT* seet to be redundant. Get rid of them? 224 SET_BUF_PT* seet to be redundant. Get rid of them?
835 We assume you know which buffer it's pointing into. */ 836 We assume you know which buffer it's pointing into. */
836 837
837 #define OVERLAY_POSITION(P) \ 838 #define OVERLAY_POSITION(P) \
838 (GC_MARKERP (P) ? marker_position (P) : (abort (), 0)) 839 (GC_MARKERP (P) ? marker_position (P) : (abort (), 0))
839 840
840 /* Allocation of buffer text. */ 841
841
842 #ifdef REL_ALLOC
843
844 extern POINTER_TYPE *r_alloc P_ ((POINTER_TYPE **, size_t));
845 extern POINTER_TYPE *r_re_alloc P_ ((POINTER_TYPE **, size_t));
846 extern void r_alloc_free P_ ((POINTER_TYPE **ptr));
847
848 #define BUFFER_ALLOC(data, size) \
849 ((unsigned char *) r_alloc ((POINTER_TYPE **) &data, (size)))
850 #define BUFFER_REALLOC(data, size) \
851 ((unsigned char *) r_re_alloc ((POINTER_TYPE **) &data, (size)))
852 #define BUFFER_FREE(data) (r_alloc_free ((POINTER_TYPE **) &data))
853
854 #else /* not REL_ALLOC */
855
856 #define BUFFER_ALLOC(data,size) (data = (unsigned char *) malloc ((size)))
857 #define BUFFER_REALLOC(data,size) ((unsigned char *) realloc ((data), (size)))
858 #define BUFFER_FREE(data) (free ((data)))
859
860 #endif /* not REL_ALLOC */
861
862 /*********************************************************************** 842 /***********************************************************************
863 Buffer-local Variables 843 Buffer-local Variables
864 ***********************************************************************/ 844 ***********************************************************************/
865 845
866 /* Number of per-buffer variables used. */ 846 /* Number of per-buffer variables used. */