1999-12-13 22:25:50 +00:00
|
|
|
/*
|
|
|
|
*******************************************************************************
|
|
|
|
*
|
2003-03-08 18:09:39 +00:00
|
|
|
* Copyright (C) 1999-2003, International Business Machines
|
1999-12-13 22:25:50 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
*
|
|
|
|
*******************************************************************************
|
|
|
|
* file name: genprops.h
|
|
|
|
* encoding: US-ASCII
|
|
|
|
* tab size: 8 (not used)
|
|
|
|
* indentation:4
|
|
|
|
*
|
|
|
|
* created on: 1999dec13
|
|
|
|
* created by: Markus W. Scherer
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GENPROPS_H__
|
|
|
|
#define __GENPROPS_H__
|
|
|
|
|
1999-12-28 23:57:50 +00:00
|
|
|
#include "unicode/utypes.h"
|
2002-02-25 18:48:30 +00:00
|
|
|
#include "utrie.h"
|
1999-12-13 22:25:50 +00:00
|
|
|
|
|
|
|
/* file definitions */
|
|
|
|
#define DATA_NAME "uprops"
|
2002-07-17 19:23:26 +00:00
|
|
|
#define DATA_TYPE "icu"
|
1999-12-13 22:25:50 +00:00
|
|
|
|
2001-01-31 18:05:19 +00:00
|
|
|
/* special casing data */
|
|
|
|
typedef struct {
|
|
|
|
uint32_t code;
|
|
|
|
UBool isComplex;
|
|
|
|
UChar lowerCase[32], upperCase[32], titleCase[32];
|
|
|
|
} SpecialCasing;
|
|
|
|
|
2001-02-14 00:45:29 +00:00
|
|
|
/* case folding data */
|
|
|
|
typedef struct {
|
|
|
|
uint32_t code, simple;
|
|
|
|
char status;
|
|
|
|
UChar full[32];
|
|
|
|
} CaseFolding;
|
|
|
|
|
1999-12-13 22:25:50 +00:00
|
|
|
/* character properties */
|
|
|
|
typedef struct {
|
2000-04-18 16:56:02 +00:00
|
|
|
uint32_t code, lowerCase, upperCase, titleCase, mirrorMapping;
|
2002-03-01 01:58:49 +00:00
|
|
|
int32_t numericValue; /* see numericType */
|
2000-05-18 19:10:27 +00:00
|
|
|
uint32_t denominator; /* 0: no value */
|
2002-03-04 01:28:32 +00:00
|
|
|
uint8_t generalCategory, bidi, isMirrored, numericType;
|
2001-01-31 18:05:19 +00:00
|
|
|
SpecialCasing *specialCasing;
|
2001-02-14 00:45:29 +00:00
|
|
|
CaseFolding *caseFolding;
|
1999-12-13 22:25:50 +00:00
|
|
|
} Props;
|
|
|
|
|
|
|
|
/* global flags */
|
2000-05-18 22:08:39 +00:00
|
|
|
extern UBool beVerbose, haveCopyright;
|
1999-12-13 22:25:50 +00:00
|
|
|
|
|
|
|
/* name tables */
|
|
|
|
extern const char *const
|
|
|
|
bidiNames[];
|
|
|
|
|
|
|
|
extern const char *const
|
|
|
|
genCategoryNames[];
|
|
|
|
|
2002-07-04 16:50:55 +00:00
|
|
|
/* properties vectors in props2.c */
|
|
|
|
extern uint32_t *pv;
|
|
|
|
|
1999-12-13 22:25:50 +00:00
|
|
|
/* prototypes */
|
2002-02-25 18:48:30 +00:00
|
|
|
U_CFUNC void
|
|
|
|
writeUCDFilename(char *basename, const char *filename, const char *suffix);
|
|
|
|
|
2002-05-31 01:14:52 +00:00
|
|
|
U_CFUNC UBool
|
|
|
|
isToken(const char *token, const char *s);
|
|
|
|
|
2002-03-01 01:58:49 +00:00
|
|
|
U_CFUNC int32_t
|
|
|
|
getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s);
|
|
|
|
|
2000-04-18 16:56:02 +00:00
|
|
|
extern void
|
|
|
|
setUnicodeVersion(const char *v);
|
|
|
|
|
1999-12-13 22:25:50 +00:00
|
|
|
extern void
|
1999-12-22 22:57:04 +00:00
|
|
|
initStore(void);
|
1999-12-13 22:25:50 +00:00
|
|
|
|
2001-03-15 20:38:36 +00:00
|
|
|
extern uint32_t
|
|
|
|
makeProps(Props *p);
|
|
|
|
|
1999-12-13 22:25:50 +00:00
|
|
|
extern void
|
2001-03-15 20:38:36 +00:00
|
|
|
addProps(uint32_t c, uint32_t props);
|
1999-12-13 22:25:50 +00:00
|
|
|
|
2003-03-14 22:00:19 +00:00
|
|
|
extern uint32_t
|
|
|
|
getProps(uint32_t c);
|
|
|
|
|
1999-12-15 04:42:56 +00:00
|
|
|
extern void
|
2001-03-15 20:38:36 +00:00
|
|
|
repeatProps(uint32_t first, uint32_t last, uint32_t props);
|
1999-12-15 04:42:56 +00:00
|
|
|
|
2002-02-25 18:48:30 +00:00
|
|
|
U_CAPI uint32_t U_EXPORT2
|
|
|
|
getFoldedPropsValue(UNewTrie *trie, UChar32 start, int32_t offset);
|
|
|
|
|
2003-03-08 18:09:39 +00:00
|
|
|
extern void
|
|
|
|
addCaseSensitive(UChar32 first, UChar32 last);
|
|
|
|
|
1999-12-13 22:25:50 +00:00
|
|
|
extern void
|
2000-02-29 18:42:28 +00:00
|
|
|
generateData(const char *dataDir);
|
1999-12-13 22:25:50 +00:00
|
|
|
|
2002-02-25 18:48:30 +00:00
|
|
|
/* props2.c */
|
2002-03-04 01:28:32 +00:00
|
|
|
U_CFUNC void
|
2002-04-04 18:41:16 +00:00
|
|
|
initAdditionalProperties(void);
|
2002-03-04 01:28:32 +00:00
|
|
|
|
2002-02-25 18:48:30 +00:00
|
|
|
U_CFUNC void
|
|
|
|
generateAdditionalProperties(char *filename, const char *suffix, UErrorCode *pErrorCode);
|
|
|
|
|
|
|
|
U_CFUNC int32_t
|
|
|
|
writeAdditionalData(uint8_t *p, int32_t capacity, int32_t indexes[16]);
|
|
|
|
|
1999-12-13 22:25:50 +00:00
|
|
|
#endif
|
2000-02-29 18:42:28 +00:00
|
|
|
|