1/* 2******************************************************************************* 3* 4* Copyright (C) 1999-2008, International Business Machines 5* Corporation and others. All Rights Reserved. 6* 7******************************************************************************* 8* file name: genprops.h 9* encoding: US-ASCII 10* tab size: 8 (not used) 11* indentation:4 12* 13* created on: 1999dec13 14* created by: Markus W. Scherer 15*/ 16 17#ifndef __GENPROPS_H__ 18#define __GENPROPS_H__ 19 20#include "unicode/utypes.h" 21#include "utrie.h" 22#include "propsvec.h" 23 24/* file definitions */ 25#define DATA_NAME "uprops" 26#define DATA_TYPE "icu" 27 28/* character properties */ 29typedef struct { 30 uint32_t code; 31 int32_t numericValue; /* see numericType */ 32 uint32_t denominator; /* 0: no value */ 33 uint8_t generalCategory, numericType, exponent; 34} Props; 35 36/* global flags */ 37extern UBool beVerbose, haveCopyright; 38 39extern const char *const 40genCategoryNames[]; 41 42/* properties vectors in props2.c */ 43extern UPropsVectors *pv; 44 45/* prototypes */ 46U_CFUNC void 47writeUCDFilename(char *basename, const char *filename, const char *suffix); 48 49U_CFUNC UBool 50isToken(const char *token, const char *s); 51 52U_CFUNC int32_t 53getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s); 54 55extern void 56setUnicodeVersion(const char *v); 57 58extern void 59initStore(void); 60 61extern void 62exitStore(void); 63 64extern uint32_t 65makeProps(Props *p); 66 67extern void 68addProps(uint32_t c, uint32_t props); 69 70extern uint32_t 71getProps(uint32_t c); 72 73extern void 74repeatProps(uint32_t first, uint32_t last, uint32_t props); 75 76extern void 77generateData(const char *dataDir, UBool csource); 78 79/* props2.c */ 80U_CFUNC void 81initAdditionalProperties(void); 82 83U_CFUNC void 84exitAdditionalProperties(void); 85 86U_CFUNC void 87generateAdditionalProperties(char *filename, const char *suffix, UErrorCode *pErrorCode); 88 89U_CFUNC int32_t 90writeAdditionalData(FILE *f, uint8_t *p, int32_t capacity, int32_t indexes[16]); 91 92#endif 93