Print this page
2964 need POSIX 2008 locale object support

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/port/locale/collate.h
          +++ new/usr/src/lib/libc/port/locale/collate.h
↓ open down ↓ 24 lines elided ↑ open up ↑
  25   25   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  26   26   * SUCH DAMAGE.
  27   27   */
  28   28  
  29   29  #ifndef _COLLATE_H_
  30   30  #define _COLLATE_H_
  31   31  
  32   32  #include <sys/types.h>
  33   33  #include <limits.h>
  34   34  
       35 +#include "xlocale_private.h"
       36 +
  35   37  #define COLLATE_STR_LEN         24              /* should be 64-bit multiple */
  36   38  #define COLLATE_VERSION         "IllumosCollate2\n"
  37   39  
  38   40  #define COLLATE_MAX_PRIORITY    (0x7fffffff)    /* max signed value */
  39   41  #define COLLATE_SUBST_PRIORITY  (0x40000000)    /* bit indicates subst table */
  40   42  
  41   43  #define DIRECTIVE_UNDEF         0x00
  42   44  #define DIRECTIVE_FORWARD       0x01
  43   45  #define DIRECTIVE_BACKWARD      0x02
  44   46  #define DIRECTIVE_POSITION      0x04
↓ open down ↓ 40 lines elided ↑ open up ↑
  85   87  typedef struct collate_large {
  86   88          int32_t val;
  87   89          collate_char_t pri;
  88   90  } collate_large_t;
  89   91  
  90   92  typedef struct collate_subst {
  91   93          int32_t key;
  92   94          int32_t pri[COLLATE_STR_LEN];
  93   95  } collate_subst_t;
  94   96  
       97 +struct xlocale_collate {
       98 +        struct xlocale_component header;
       99 +        int __collate_load_error;
      100 +        int __collate_substitute_nontrivial;
      101 +
      102 +        /* XXX */
      103 +};
      104 +
  95  105  int     _collate_load_tables(const char *);
  96  106  void    _collate_lookup(const wchar_t *, int *, int *, int, int **);
  97  107  size_t  _collate_wxfrm(const wchar_t *, wchar_t *, size_t);
  98  108  size_t  _collate_sxfrm(const wchar_t *, char *, size_t);
  99  109  int     _collate_range_cmp(wchar_t, wchar_t);
 100  110  
 101  111  extern int _collate_load_error;
 102  112  extern int _collate_substitute_nontrivial;
 103  113  extern collate_info_t *_collate_info;
 104  114  
 105  115  #endif /* !_COLLATE_H_ */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX