/[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.85.2.1 by handa, Fri Mar 1 01:10:45 2002 UTC revision 1.85.2.2 by handa, Tue Aug 20 03:59:29 2002 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 328  extern int _fetch_multibyte_char_len; Line 327  extern int _fetch_multibyte_char_len;
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 - 1),                 \                                 + (pos) + BEG_ADDR - 1),                 \
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) - 1),                              \          + (pos) + BUF_BEG_ADDR (buf) - 1),                              \
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    

Legend:
Removed from v.1.85.2.1  
changed lines
  Added in v.1.85.2.2

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