Mercurial > hg > xemacs-beta
comparison src/buffer.h @ 647:b39c14581166
[xemacs-hg @ 2001-08-13 04:45:47 by ben]
removal of unsigned, size_t, etc.
author | ben |
---|---|
date | Mon, 13 Aug 2001 04:46:48 +0000 |
parents | af57a77cbc92 |
children | 704cb139ec6b |
comparison
equal
deleted
inserted
replaced
646:00c54252fe4f | 647:b39c14581166 |
---|---|
81 { | 81 { |
82 Bufbyte *beg; /* Actual address of buffer contents. */ | 82 Bufbyte *beg; /* Actual address of buffer contents. */ |
83 Bytind gpt; /* Index of gap in buffer. */ | 83 Bytind gpt; /* Index of gap in buffer. */ |
84 Bytind z; /* Index of end of buffer. */ | 84 Bytind z; /* Index of end of buffer. */ |
85 Bufpos bufz; /* Equivalent as a Bufpos. */ | 85 Bufpos bufz; /* Equivalent as a Bufpos. */ |
86 int gap_size; /* Size of buffer's gap */ | 86 Memory_Count gap_size;/* Size of buffer's gap */ |
87 int end_gap_size; /* Size of buffer's end gap */ | 87 Memory_Count end_gap_size;/* Size of buffer's end gap */ |
88 long modiff; /* This counts buffer-modification events | 88 long modiff; /* This counts buffer-modification events |
89 for this buffer. It is incremented for | 89 for this buffer. It is incremented for |
90 each such event, and never otherwise | 90 each such event, and never otherwise |
91 changed. */ | 91 changed. */ |
92 long save_modiff; /* Previous value of modiff, as of last | 92 long save_modiff; /* Previous value of modiff, as of last |
248 | 248 |
249 /* Map over buffers sharing the same text as MPS_BUF. MPS_BUFVAR is a | 249 /* Map over buffers sharing the same text as MPS_BUF. MPS_BUFVAR is a |
250 variable that gets the buffer values (beginning with the base | 250 variable that gets the buffer values (beginning with the base |
251 buffer, then the children), and MPS_BUFCONS should be a temporary | 251 buffer, then the children), and MPS_BUFCONS should be a temporary |
252 Lisp_Object variable. */ | 252 Lisp_Object variable. */ |
253 #define MAP_INDIRECT_BUFFERS(mps_buf, mps_bufvar, mps_bufcons) \ | 253 #define MAP_INDIRECT_BUFFERS(mps_buf, mps_bufvar, mps_bufcons) \ |
254 for (mps_bufcons = Qunbound, \ | 254 for (mps_bufcons = Qunbound, \ |
255 mps_bufvar = BUFFER_BASE_BUFFER (mps_buf); \ | 255 mps_bufvar = BUFFER_BASE_BUFFER (mps_buf); \ |
256 UNBOUNDP (mps_bufcons) ? \ | 256 UNBOUNDP (mps_bufcons) ? \ |
257 (mps_bufcons = mps_bufvar->indirect_children, \ | 257 (mps_bufcons = mps_bufvar->indirect_children, \ |
258 1) \ | 258 1) \ |
259 : (!NILP (mps_bufcons) \ | 259 : (!NILP (mps_bufcons) \ |
260 && (mps_bufvar = XBUFFER (XCAR (mps_bufcons)), 1) \ | 260 && (mps_bufvar = XBUFFER (XCAR (mps_bufcons)), 1) \ |
261 && (mps_bufcons = XCDR (mps_bufcons), 1)); \ | 261 && (mps_bufcons = XCDR (mps_bufcons), 1)); \ |
262 ) | 262 ) |
263 | 263 |
264 | 264 |
265 | 265 |
266 /************************************************************************/ | 266 /************************************************************************/ |
551 | 551 |
552 INLINE_HEADER int valid_char_p (Emchar ch); | 552 INLINE_HEADER int valid_char_p (Emchar ch); |
553 INLINE_HEADER int | 553 INLINE_HEADER int |
554 valid_char_p (Emchar ch) | 554 valid_char_p (Emchar ch) |
555 { | 555 { |
556 return ((unsigned int) (ch) <= 0xff) || non_ascii_valid_char_p (ch); | 556 return ch <= 0xFF || non_ascii_valid_char_p (ch); |
557 } | 557 } |
558 | 558 |
559 #else /* not MULE */ | 559 #else /* not MULE */ |
560 | 560 |
561 #define valid_char_p(ch) ((unsigned int) (ch) <= 0xff) | 561 #define valid_char_p(ch) ((unsigned int) (ch) <= 0xff) |
1167 dfc_convert_to_internal_format (a, b, c, d) | 1167 dfc_convert_to_internal_format (a, b, c, d) |
1168 #endif | 1168 #endif |
1169 | 1169 |
1170 typedef union | 1170 typedef union |
1171 { | 1171 { |
1172 struct { const void *ptr; size_t len; } data; | 1172 struct { const void *ptr; Memory_Count len; } data; |
1173 Lisp_Object lisp_object; | 1173 Lisp_Object lisp_object; |
1174 } dfc_conversion_data; | 1174 } dfc_conversion_data; |
1175 | 1175 |
1176 enum dfc_conversion_type | 1176 enum dfc_conversion_type |
1177 { | 1177 { |
1800 | 1800 |
1801 | 1801 |
1802 /* Like memcmp, except first arg points at internally formatted data, | 1802 /* Like memcmp, except first arg points at internally formatted data, |
1803 while the second points at a string of only ASCII chars. */ | 1803 while the second points at a string of only ASCII chars. */ |
1804 INLINE_HEADER int | 1804 INLINE_HEADER int |
1805 bufbyte_memcmp (const Bufbyte *bp, const char *ascii_string, size_t len); | 1805 bufbyte_memcmp (const Bufbyte *bp, const char *ascii_string, Memory_Count len); |
1806 INLINE_HEADER int | 1806 INLINE_HEADER int |
1807 bufbyte_memcmp (const Bufbyte *bp, const char *ascii_string, size_t len) | 1807 bufbyte_memcmp (const Bufbyte *bp, const char *ascii_string, Memory_Count len) |
1808 { | 1808 { |
1809 #ifdef MULE | 1809 #ifdef MULE |
1810 while (len--) | 1810 while (len--) |
1811 { | 1811 { |
1812 int diff = charptr_emchar (bp) - *(Bufbyte *) ascii_string; | 1812 int diff = charptr_emchar (bp) - *(Bufbyte *) ascii_string; |