emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/regex.h [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/regex.h [lexbind]
Date: Tue, 06 Jul 2004 07:03:38 -0400

Index: emacs/src/regex.h
diff -c emacs/src/regex.h:1.29.18.2 emacs/src/regex.h:1.29.18.3
*** emacs/src/regex.h:1.29.18.2 Tue Jul  6 08:50:30 2004
--- emacs/src/regex.h   Tue Jul  6 10:14:29 2004
***************
*** 562,567 ****
--- 562,610 ----
  }
  #endif        /* C++ */
  
+ /* For platform which support the ISO C amendement 1 functionality we
+    support user defined character classes.  */
+ #if WIDE_CHAR_SUPPORT
+ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
+ # include <wchar.h>
+ # include <wctype.h>
+ #endif
+ 
+ #if WIDE_CHAR_SUPPORT
+ /* The GNU C library provides support for user-defined character classes
+    and the functions from ISO C amendement 1.  */
+ # ifdef CHARCLASS_NAME_MAX
+ #  define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
+ # else
+ /* This shouldn't happen but some implementation might still have this
+    problem.  Use a reasonable default value.  */
+ #  define CHAR_CLASS_MAX_LENGTH 256
+ # endif
+ typedef wctype_t re_wctype_t;
+ typedef wchar_t re_wchar_t;
+ # define re_wctype wctype
+ # define re_iswctype iswctype
+ # define re_wctype_to_bit(cc) 0
+ #else
+ # define CHAR_CLASS_MAX_LENGTH  9 /* Namely, `multibyte'.  */
+ # define btowc(c) c
+ 
+ /* Character classes.  */
+ typedef enum { RECC_ERROR = 0,
+              RECC_ALNUM, RECC_ALPHA, RECC_WORD,
+              RECC_GRAPH, RECC_PRINT,
+              RECC_LOWER, RECC_UPPER,
+              RECC_PUNCT, RECC_CNTRL,
+              RECC_DIGIT, RECC_XDIGIT,
+              RECC_BLANK, RECC_SPACE,
+              RECC_MULTIBYTE, RECC_NONASCII,
+              RECC_ASCII, RECC_UNIBYTE
+ } re_wctype_t;
+ 
+ typedef int re_wchar_t;
+ 
+ #endif /* not WIDE_CHAR_SUPPORT */
+ 
  #endif /* regex.h */
  
  /*




reply via email to

[Prev in Thread] Current Thread [Next in Thread]