Mercurial > hg > xemacs-beta
comparison src/buffer.h @ 5495:1f0b15040456
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 01 May 2011 18:44:03 +0100 |
parents | 308d34e9f07d |
children | 56144c8593a8 |
comparison
equal
deleted
inserted
replaced
5494:861f2601a38b | 5495:1f0b15040456 |
---|---|
4 Copyright (C) 1995 Sun Microsystems, Inc. | 4 Copyright (C) 1995 Sun Microsystems, Inc. |
5 Copyright (C) 2001, 2002, 2004 Ben Wing. | 5 Copyright (C) 2001, 2002, 2004 Ben Wing. |
6 | 6 |
7 This file is part of XEmacs. | 7 This file is part of XEmacs. |
8 | 8 |
9 XEmacs is free software; you can redistribute it and/or modify it | 9 XEmacs is free software: you can redistribute it and/or modify it |
10 under the terms of the GNU General Public License as published by the | 10 under the terms of the GNU General Public License as published by the |
11 Free Software Foundation; either version 2, or (at your option) any | 11 Free Software Foundation, either version 3 of the License, or (at your |
12 later version. | 12 option) any later version. |
13 | 13 |
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT | 14 XEmacs is distributed in the hope that it will be useful, but WITHOUT |
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | 16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
17 for more details. | 17 for more details. |
18 | 18 |
19 You should have received a copy of the GNU General Public License | 19 You should have received a copy of the GNU General Public License |
20 along with XEmacs; see the file COPYING. If not, write to | 20 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
22 Boston, MA 02111-1307, USA. */ | |
23 | 21 |
24 /* Synched up with: FSF 19.30. */ | 22 /* Synched up with: FSF 19.30. */ |
25 | 23 |
26 /* Authorship: | 24 /* Authorship: |
27 | 25 |
78 #define NUM_MOVED_POSITIONS 10 | 76 #define NUM_MOVED_POSITIONS 10 |
79 | 77 |
80 struct buffer_text | 78 struct buffer_text |
81 { | 79 { |
82 #ifdef NEW_GC | 80 #ifdef NEW_GC |
83 struct lrecord_header header; | 81 NORMAL_LISP_OBJECT_HEADER header; |
84 #endif /* NEW_GC */ | 82 #endif /* NEW_GC */ |
85 Ibyte *beg; /* Actual address of buffer contents. */ | 83 Ibyte *beg; /* Actual address of buffer contents. */ |
86 Bytebpos gpt; /* Index of gap in buffer. */ | 84 Bytebpos gpt; /* Index of gap in buffer. */ |
87 Charbpos bufgpt; /* Equivalent as a Charbpos. */ | 85 Charbpos bufgpt; /* Equivalent as a Charbpos. */ |
88 Bytebpos z; /* Index of end of buffer. */ | 86 Bytebpos z; /* Index of end of buffer. */ |
142 }; | 140 }; |
143 | 141 |
144 #ifdef NEW_GC | 142 #ifdef NEW_GC |
145 typedef struct buffer_text Lisp_Buffer_Text; | 143 typedef struct buffer_text Lisp_Buffer_Text; |
146 | 144 |
147 DECLARE_LRECORD (buffer_text, Lisp_Buffer_Text); | 145 DECLARE_LISP_OBJECT (buffer_text, Lisp_Buffer_Text); |
148 | 146 |
149 #define XBUFFER_TEXT(x) \ | 147 #define XBUFFER_TEXT(x) \ |
150 XRECORD (x, buffer_text, Lisp_Buffer_Text) | 148 XRECORD (x, buffer_text, Lisp_Buffer_Text) |
151 #define wrap_buffer_text(p) wrap_record (p, buffer_text) | 149 #define wrap_buffer_text(p) wrap_record (p, buffer_text) |
152 #define BUFFER_TEXT_P(x) RECORDP (x, buffer_text) | 150 #define BUFFER_TEXT_P(x) RECORDP (x, buffer_text) |
155 #endif /* NEW_GC */ | 153 #endif /* NEW_GC */ |
156 | 154 |
157 | 155 |
158 struct buffer | 156 struct buffer |
159 { | 157 { |
160 struct LCRECORD_HEADER header; | 158 NORMAL_LISP_OBJECT_HEADER header; |
161 | 159 |
162 /* This structure holds the coordinates of the buffer contents | 160 /* This structure holds the coordinates of the buffer contents |
163 in ordinary buffers. In indirect buffers, this is not used. */ | 161 in ordinary buffers. In indirect buffers, this is not used. */ |
164 struct buffer_text own_text; | 162 struct buffer_text own_text; |
165 | 163 |
266 #define MARKED_SLOT(x) Lisp_Object x; | 264 #define MARKED_SLOT(x) Lisp_Object x; |
267 #include "bufslots.h" | 265 #include "bufslots.h" |
268 #undef MARKED_SLOT | 266 #undef MARKED_SLOT |
269 }; | 267 }; |
270 | 268 |
271 DECLARE_LRECORD (buffer, struct buffer); | 269 DECLARE_LISP_OBJECT (buffer, struct buffer); |
272 #define XBUFFER(x) XRECORD (x, buffer, struct buffer) | 270 #define XBUFFER(x) XRECORD (x, buffer, struct buffer) |
273 #define wrap_buffer(p) wrap_record (p, buffer) | 271 #define wrap_buffer(p) wrap_record (p, buffer) |
274 #define BUFFERP(x) RECORDP (x, buffer) | 272 #define BUFFERP(x) RECORDP (x, buffer) |
275 #define CHECK_BUFFER(x) CHECK_RECORD (x, buffer) | 273 #define CHECK_BUFFER(x) CHECK_RECORD (x, buffer) |
276 #define CONCHECK_BUFFER(x) CONCHECK_RECORD (x, buffer) | 274 #define CONCHECK_BUFFER(x) CONCHECK_RECORD (x, buffer) |