ICU-9101 copy icu/branches/markus/collv2/source/tools/genuca2/genuca2.cpp to tools/trunk/unicode/c/genuca/genuca.cpp

X-SVN-Rev: 35220
This commit is contained in:
Markus Scherer 2014-02-24 22:17:04 +00:00
parent d9085c6d2b
commit f6de8d8a1c
4 changed files with 898 additions and 1512 deletions

View File

@ -2,90 +2,54 @@
.\"
.\" genuca.8: manual page for the genuca utility
.\"
.\" Copyright (C) 2000-2001 IBM, Inc. and others.
.\" Copyright (C) 2000-2014 IBM, Inc. and others.
.\"
.TH GENUCA 8 "22 February 2001" "ICU MANPAGE" "ICU @VERSION@ Manual"
.TH GENUCA 8 "2014-Feb-24" "ICU MANPAGE" "ICU @VERSION@ Manual"
.SH NAME
.B genuca
\- create the UCA data table
\- create the root collation data file for ICU
.SH SYNOPSIS
.B genuca
[
.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
]
[
.BR "\-V\fP, \fB\-\-version"
]
[
.BR "\-v\fP, \fB\-\-verbose"
]
[
.BI "\-c\fP, \fB\-\-copyright"
]
[
.BI "\-s\fP, \fB\-\-sourcedir" " source"
]
[
.BI "\-d\fP, \fB\-\-destdir" " destination"
]
[
.IR file
.IR path/to/ICU/src/root
]
.SH DESCRIPTION
.B genuca
compiles the Unicode Collation Algorithm (UCA) data from
.I file
(or from
.B FractionalUCA.txt
if
.I file
is omitted) into its binary form, the files
reads path/to/ICU/src/root/source/data/unidata/FractionalUCA.txt and
writes source and binary data files with the collation root data.
The binary file
.B ucadata.dat
and
.BR invuca.dat .
These binary files can then be read directly by ICU, or used by
can then be read directly by ICU, or used by
.BR icupkg (8)
or
.BR pkgdata (8)
for incorporation into a larger archive or library.
See http://www.unicode.org/reports/tr35/tr35-collation.html#Root_Data_Files
.SH OPTIONS
.TP
.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
Print help about usage and exit.
.TP
.BR "\-V\fP, \fB\-\-version"
Print the version of
.B genuca
and exit.
.TP
.BR "\-v\fP, \fB\-\-verbose"
Display extra informative messages during execution.
.TP
.BI "\-c\fP, \fB\-\-copyright"
Include a copyright notice into the binary data.
.TP
.BI "\-s\fP, \fB\-\-sourcedir" " source"
Set the source directory to
.IR source .
The default source directory is specified by the environment variable
.BR ICU_DATA .
.TP
.BI "\-d\fP, \fB\-\-destdir" " destination"
Set the destination directory to
.IR destination .
The default destination directory is specified by the environment variable
.BR ICU_DATA .
.SH ENVIRONMENT
.TP 10
.B ICU_DATA
Specifies the directory containing ICU data. Defaults to
.BR @thepkgicudatadir@/@PACKAGE@/@VERSION@/ .
Some tools in ICU depend on the presence of the trailing slash. It is thus
important to make sure that it is present if
.B ICU_DATA
is set.
.SH FILES
.TP 15
.B FractionalUCA.txt
Machine-readable file containing data for the Unicode collation algorithm.
Machine-readable file containing data for the CLDR root collation order.
.SH VERSION
@VERSION@
.SH COPYRIGHT

File diff suppressed because it is too large Load Diff

View File

@ -1,47 +0,0 @@
/*
*******************************************************************************
*
* Copyright (C) 2000-2004, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: genuca.h
* encoding: US-ASCII
* tab size: 8 (not used)
* indentation:4
*
* created at the end of XX century
* created by: Vladimir Weinstein
*
* This program reads the Franctional UCA table and generates
* internal format for UCA table as well as inverse UCA table.
* It then writes binary files containing the data: ucadata.dat
* & invuca.dat
*/
#ifndef UCADATA_H
#define UCADATA_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_COLLATION
#include "ucol_elm.h"
#include <stdio.h>
#include <string.h>
#include "unicode/utypes.h"
#include "unicode/uchar.h"
#include "ucol_imp.h"
#include "uhash.h"
#include "unewdata.h"
void deleteElement(void *element);
int32_t readElement(char **from, char *to, char separator, UErrorCode *status);
uint32_t getSingleCEValue(char *primary, char *secondary, char *tertiary, UBool caseBit, UErrorCode *status);
void printOutTable(UCATableHeader *myData, UErrorCode *status);
UCAElements *readAnElement(FILE *data, tempUCATable *t, UCAConstants *consts, UErrorCode *status);
#endif /* #if !UCONFIG_NO_COLLATION */
#endif

View File

@ -402,10 +402,6 @@
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath=".\genuca.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"