/[emacs]/emacs/src/buffer.h
ViewVC logotype

Diff of /emacs/src/buffer.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.94 by monnier, Tue Jul 22 19:02:58 2003 UTC revision 1.94.2.1 by handa, Mon Sep 8 12:48:09 2003 UTC
# Line 319  else Line 319  else
319    
320  /* Variables used locally in FETCH_MULTIBYTE_CHAR.  */  /* Variables used locally in FETCH_MULTIBYTE_CHAR.  */
321  extern unsigned char *_fetch_multibyte_char_p;  extern unsigned char *_fetch_multibyte_char_p;
 extern int _fetch_multibyte_char_len;  
322    
323  /* Return character code of multi-byte form at position POS.  If POS  /* Return character code of multi-byte form at position POS.  If POS
324     doesn't point the head of valid multi-byte form, only the byte at     doesn't point the head of valid multi-byte form, only the byte at
# Line 327  extern int _fetch_multibyte_char_len; Line 326  extern int _fetch_multibyte_char_len;
326    
327  #define FETCH_MULTIBYTE_CHAR(pos)                                       \  #define FETCH_MULTIBYTE_CHAR(pos)                                       \
328    (_fetch_multibyte_char_p = (((pos) >= GPT_BYTE ? GAP_SIZE : 0)        \    (_fetch_multibyte_char_p = (((pos) >= GPT_BYTE ? GAP_SIZE : 0)        \
329                                 + (pos) + BEG_ADDR - BEG_BYTE),                  \                                 + (pos) + BEG_ADDR - BEG_BYTE),          \
330     _fetch_multibyte_char_len                                            \     STRING_CHAR (_fetch_multibyte_char_p, 0))
331        = ((pos) >= GPT_BYTE ? ZV_BYTE : GPT_BYTE) - (pos),               \  
332     STRING_CHAR (_fetch_multibyte_char_p, _fetch_multibyte_char_len))  /* Return character at position POS.  If the current buffer is unibyte
333       and the character is not ASCII, make the returning character
334       multibyte.  */
335    
336    #define FETCH_CHAR_AS_MULTIBYTE(pos)                    \
337      (!NILP (current_buffer->enable_multibyte_characters)  \
338       ? FETCH_MULTIBYTE_CHAR ((pos))                       \
339       : unibyte_char_to_multibyte (FETCH_BYTE ((pos))))
340    
341    
342  /* Macros for accessing a character or byte,  /* Macros for accessing a character or byte,
343     or converting between byte positions and addresses,     or converting between byte positions and addresses,
# Line 379  extern int _fetch_multibyte_char_len; Line 386  extern int _fetch_multibyte_char_len;
386    (_fetch_multibyte_char_p                                              \    (_fetch_multibyte_char_p                                              \
387       = (((pos) >= BUF_GPT_BYTE (buf) ? BUF_GAP_SIZE (buf) : 0)          \       = (((pos) >= BUF_GPT_BYTE (buf) ? BUF_GAP_SIZE (buf) : 0)          \
388          + (pos) + BUF_BEG_ADDR (buf) - BEG_BYTE),                       \          + (pos) + BUF_BEG_ADDR (buf) - BEG_BYTE),                       \
389     _fetch_multibyte_char_len                                            \     STRING_CHAR (_fetch_multibyte_char_p, 0))
      = (((pos) >= BUF_GPT_BYTE (buf) ? BUF_ZV_BYTE (buf) : BUF_GPT_BYTE (buf)) \  
         - (pos)),                                                       \  
    STRING_CHAR (_fetch_multibyte_char_p, _fetch_multibyte_char_len))  
390    
391  /* Define the actual buffer data structures.  */  /* Define the actual buffer data structures.  */
392    
# Line 820  extern void buffer_slot_type_mismatch P_ Line 824  extern void buffer_slot_type_mismatch P_
824  extern void fix_overlays_before P_ ((struct buffer *, EMACS_INT, EMACS_INT));  extern void fix_overlays_before P_ ((struct buffer *, EMACS_INT, EMACS_INT));
825  extern void mmap_set_vars P_ ((int));  extern void mmap_set_vars P_ ((int));
826    
827    EXFUN (Fbuffer_live_p, 1);
828  EXFUN (Fbuffer_name, 1);  EXFUN (Fbuffer_name, 1);
829  EXFUN (Fget_file_buffer, 1);  EXFUN (Fget_file_buffer, 1);
830  EXFUN (Fnext_overlay_change, 1);  EXFUN (Fnext_overlay_change, 1);

Legend:
Removed from v.1.94  
changed lines
  Added in v.1.94.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26