Mercurial > hg > xemacs-beta
comparison src/buffer.h @ 14:9ee227acff29 r19-15b90
Import from CVS: tag r19-15b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:48:42 +0200 |
parents | 376386a54a3c |
children | 0293115a14e9 |
comparison
equal
deleted
inserted
replaced
13:13c6d0aaafe5 | 14:9ee227acff29 |
---|---|
96 | 96 |
97 /* This structure holds the coordinates of the buffer contents | 97 /* This structure holds the coordinates of the buffer contents |
98 in ordinary buffers. In indirect buffers, this is not used. */ | 98 in ordinary buffers. In indirect buffers, this is not used. */ |
99 struct buffer_text own_text; | 99 struct buffer_text own_text; |
100 | 100 |
101 /* This points to the `struct buffer_text' that used for this buffer. | 101 /* This points to the `struct buffer_text' that is used for this buffer. |
102 In an ordinary buffer, this is the own_text field above. | 102 In an ordinary buffer, this is the own_text field above. |
103 In an indirect buffer, this is the own_text field of another buffer. */ | 103 In an indirect buffer, this is the own_text field of another buffer. */ |
104 struct buffer_text *text; | 104 struct buffer_text *text; |
105 | 105 |
106 Bytind pt; /* Position of point in buffer. */ | 106 Bytind pt; /* Position of point in buffer. */ |
660 /* Converting between Bufpos's and Bytinds, for a buffer-or-string. | 660 /* Converting between Bufpos's and Bytinds, for a buffer-or-string. |
661 For strings, this maps to the bytecount<->charcount converters. */ | 661 For strings, this maps to the bytecount<->charcount converters. */ |
662 | 662 |
663 #define buffer_or_string_bufpos_to_bytind(obj, pos) \ | 663 #define buffer_or_string_bufpos_to_bytind(obj, pos) \ |
664 (BUFFERP (obj) ? bufpos_to_bytind (XBUFFER (obj), pos) : \ | 664 (BUFFERP (obj) ? bufpos_to_bytind (XBUFFER (obj), pos) : \ |
665 (Bytind) charcount_to_bytecount (string_data (XSTRING (obj)), pos)) | 665 (Bytind) charcount_to_bytecount (XSTRING_DATA (obj), pos)) |
666 | 666 |
667 #define buffer_or_string_bytind_to_bufpos(obj, ind) \ | 667 #define buffer_or_string_bytind_to_bufpos(obj, ind) \ |
668 (BUFFERP (obj) ? bytind_to_bufpos (XBUFFER (obj), ind) : \ | 668 (BUFFERP (obj) ? bytind_to_bufpos (XBUFFER (obj), ind) : \ |
669 (Bufpos) bytecount_to_charcount (string_data (XSTRING (obj)), ind)) | 669 (Bufpos) bytecount_to_charcount (XSTRING_DATA (obj), ind)) |
670 | 670 |
671 /* Similar for Bufpos's and Meminds. */ | 671 /* Similar for Bufpos's and Meminds. */ |
672 | 672 |
673 #define buffer_or_string_bufpos_to_memind(obj, pos) \ | 673 #define buffer_or_string_bufpos_to_memind(obj, pos) \ |
674 (BUFFERP (obj) ? bufpos_to_memind (XBUFFER (obj), pos) : \ | 674 (BUFFERP (obj) ? bufpos_to_memind (XBUFFER (obj), pos) : \ |
675 (Memind) charcount_to_bytecount (string_data (XSTRING (obj)), pos)) | 675 (Memind) charcount_to_bytecount (XSTRING_DATA (obj), pos)) |
676 | 676 |
677 #define buffer_or_string_memind_to_bufpos(obj, ind) \ | 677 #define buffer_or_string_memind_to_bufpos(obj, ind) \ |
678 (BUFFERP (obj) ? memind_to_bufpos (XBUFFER (obj), ind) : \ | 678 (BUFFERP (obj) ? memind_to_bufpos (XBUFFER (obj), ind) : \ |
679 (Bufpos) bytecount_to_charcount (string_data (XSTRING (obj)), ind)) | 679 (Bufpos) bytecount_to_charcount (XSTRING_DATA (obj), ind)) |
680 | 680 |
681 /************************************************************************/ | 681 /************************************************************************/ |
682 /* */ | 682 /* */ |
683 /* working with buffer-level data */ | 683 /* working with buffer-level data */ |
684 /* */ | 684 /* */ |
1140 { \ | 1140 { \ |
1141 (charset) = Vcharset_ascii; \ | 1141 (charset) = Vcharset_ascii; \ |
1142 (byte1) = (ch); \ | 1142 (byte1) = (ch); \ |
1143 (byte2) = 0; \ | 1143 (byte2) = 0; \ |
1144 } while (0) | 1144 } while (0) |
1145 #define BYTE_ASCII_P(by) 1 | 1145 #define BYTE_ASCII_P(byte) 1 |
1146 | 1146 |
1147 | 1147 |
1148 /************************************************************************/ | 1148 /************************************************************************/ |
1149 /* */ | 1149 /* */ |
1150 /* higher-level buffer-position functions */ | 1150 /* higher-level buffer-position functions */ |