1999-12-13 22:25:50 +00:00
|
|
|
/*
|
|
|
|
*******************************************************************************
|
|
|
|
*
|
2005-01-02 00:22:48 +00:00
|
|
|
* Copyright (C) 1999-2005, 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
|
|
|
|
|
|
|
/* character properties */
|
|
|
|
typedef struct {
|
2005-01-02 00:22:48 +00:00
|
|
|
uint32_t code;
|
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 */
|
2005-01-02 00:22:48 +00:00
|
|
|
uint8_t generalCategory, numericType, exponent;
|
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
|
|
|
|
|
|
|
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
|
|
|
|
2005-01-02 00:22:48 +00:00
|
|
|
extern void
|
2005-01-02 19:36:38 +00:00
|
|
|
exitStore(void);
|
2005-01-02 00:22:48 +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
|
|
|
|
1999-12-13 22:25:50 +00:00
|
|
|
extern void
|
2005-04-30 03:16:28 +00:00
|
|
|
generateData(const char *dataDir, UBool csource);
|
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
|
|
|
|
2005-01-02 00:22:48 +00:00
|
|
|
U_CFUNC void
|
2005-01-02 19:36:38 +00:00
|
|
|
exitAdditionalProperties(void);
|
2005-01-02 00:22:48 +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
|
2005-04-30 03:16:28 +00:00
|
|
|
writeAdditionalData(FILE *f, uint8_t *p, int32_t capacity, int32_t indexes[16]);
|
2002-02-25 18:48:30 +00:00
|
|
|
|
1999-12-13 22:25:50 +00:00
|
|
|
#endif
|