/[grep]/grep/lib/regex.c
ViewVC logotype

Diff of /grep/lib/regex.c

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

revision 1.3 by alainm, Mon Apr 2 18:04:45 2001 UTC revision 1.4 by kasal, Thu Dec 16 07:18:15 2004 UTC
# Line 60  Line 60 
60  #ifdef MBS_SUPPORT  #ifdef MBS_SUPPORT
61  # define CHAR_TYPE wchar_t  # define CHAR_TYPE wchar_t
62  # define US_CHAR_TYPE wchar_t/* unsigned character type */  # define US_CHAR_TYPE wchar_t/* unsigned character type */
63    # define CHAR_T_SIGN (1 << (sizeof(CHAR_TYPE) * 8 - 1))
64    # if defined _AIX
65    #  define WCHAR_T_NEED_SIGNEXTEND 1
66    # endif /* _AIX */
67  # define COMPILED_BUFFER_VAR wc_buffer  # define COMPILED_BUFFER_VAR wc_buffer
68  # define OFFSET_ADDRESS_SIZE 1 /* the size which STORE_NUMBER macro use */  # define OFFSET_ADDRESS_SIZE 1 /* the size which STORE_NUMBER macro use */
69  # define CHAR_CLASS_SIZE ((__alignof__(wctype_t)+sizeof(wctype_t))/sizeof(CHAR_TYPE)+1)  # define CHAR_CLASS_SIZE ((__alignof__(wctype_t)+sizeof(wctype_t))/sizeof(CHAR_TYPE)+1)
# Line 618  typedef enum Line 622  typedef enum
622  /* ifdef MBS_SUPPORT, we store NUMBER in 1 element.  */  /* ifdef MBS_SUPPORT, we store NUMBER in 1 element.  */
623    
624  #ifdef MBS_SUPPORT  #ifdef MBS_SUPPORT
625  # define EXTRACT_NUMBER(destination, source)                            \  # ifdef WCHAR_T_NEED_SIGNEXTEND
626    do {                                                                  \  #  define EXTRACT_NUMBER(destination, source)                           \
627      (destination) = *(source);                                          \       (destination) = (*(source) ^ CHAR_T_SIGN) - CHAR_T_SIGN;
628    } while (0)  # else
629    #  define EXTRACT_NUMBER(destination, source)                           \
630         (destination) = *(source)
631    # endif /* WCHAR_T_NEED_SIGNEXTEND */
632  #else  #else
633  # define EXTRACT_NUMBER(destination, source)                            \  # define EXTRACT_NUMBER(destination, source)                            \
634    do {                                                                  \    do {                                                                  \
# Line 638  extract_number (dest, source) Line 645  extract_number (dest, source)
645      US_CHAR_TYPE *source;      US_CHAR_TYPE *source;
646  {  {
647  #ifdef MBS_SUPPORT  #ifdef MBS_SUPPORT
648    # ifdef WCHAR_T_NEED_SIGNEXTEND
649      *dest = (*source ^ CHAR_T_SIGN) - CHAR_T_SIGN;
650    # else
651    *dest = *source;    *dest = *source;
652    # endif /* WCHAR_T_NEED_SIGNEXTEND */
653  #else  #else
654    int temp = SIGN_EXTEND_CHAR (*(source + 1));    int temp = SIGN_EXTEND_CHAR (*(source + 1));
655    *dest = *source & 0377;    *dest = *source & 0377;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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