3. Modify `<ICU>/source/configure.in` to properly set your **platform** C Macro define.
4. Run [autoconf](http://www.gnu.org/software/autoconf/) in `<ICU>/source/` without any options. The autoconf tool is standard on most Linux systems.
5. If you have any optimization options that you want to normally use, you can modify `<ICU>/source/runConfigureICU` to specify those options for your platform.
-6. Build and test ICU on your platform. It is very important that you run the tests. If you don't run the tests, there is no guarentee that you have properly ported ICU.
+6. Build and test ICU on your platform. It is very important that you run the tests. If you don't run the tests, there is no guarantee that you have properly ported ICU.
### Platform Dependent Implementations
goto CleanPartialInitialization;
}
- // i should initialy be the number of code units at the
+ // i should initially be the number of code units at the
// start of the string
i = U16_LENGTH(source.char32At(0));
- //int32_t i = 1;
+ // int32_t i = 1;
// find the segments
// This code iterates through the source string and
// extracts segments that end up on a codepoint that
static void uplug_unloadPlug(UPlugData *plug, UErrorCode *status) {
- if(plug->awaitingLoad) { /* shouldn't happen. Plugin hasn'tbeen loaded yet.*/
+ if(plug->awaitingLoad) { /* shouldn't happen. Plugin hasn't been loaded yet.*/
*status = U_INTERNAL_PROGRAM_ERROR;
return;
}
}
static void uplug_queryPlug(UPlugData *plug, UErrorCode *status) {
- if(!plug->awaitingLoad || !(plug->level == UPLUG_LEVEL_UNKNOWN) ) { /* shouldn't happen. Plugin hasn'tbeen loaded yet.*/
+ if(!plug->awaitingLoad || !(plug->level == UPLUG_LEVEL_UNKNOWN) ) { /* shouldn't happen. Plugin hasn't been loaded yet.*/
*status = U_INTERNAL_PROGRAM_ERROR;
return;
}
if(U_FAILURE(*status)) {
return;
}
- if(!plug->awaitingLoad || (plug->level < UPLUG_LEVEL_LOW) ) { /* shouldn't happen. Plugin hasn'tbeen loaded yet.*/
+ if(!plug->awaitingLoad || (plug->level < UPLUG_LEVEL_LOW) ) { /* shouldn't happen. Plugin hasn't been loaded yet.*/
*status = U_INTERNAL_PROGRAM_ERROR;
return;
}
fCharIter = &fSCharIter;
if (that.fCharIter != NULL && that.fCharIter != &that.fSCharIter) {
- // This is a little bit tricky - it will intially appear that
+ // This is a little bit tricky - it will initially appear that
// this->fCharIter is adopted, even if that->fCharIter was
// not adopted. That's ok.
fCharIter = that.fCharIter->clone();
/*
- * BreakCache implemetation
+ * BreakCache implementation
*/
RuleBasedBreakIterator::BreakCache::BreakCache(RuleBasedBreakIterator *bi, UErrorCode &status) :
//
-// RBBISymbolTable::lookup This function from the abstract symbol table inteface
+// RBBISymbolTable::lookup This function from the abstract symbol table interface
// looks up a variable name and returns a UnicodeString
// containing the substitution text.
//
void RBBITableBuilder::buildSafeReverseTable(UErrorCode &status) {
// The safe table creation has three steps:
- // 1. Identifiy pairs of character classes that are "safe." Safe means that boundaries
+ // 1. Identify pairs of character classes that are "safe." Safe means that boundaries
// following the pair do not depend on context or state before the pair. To test
// whether a pair is safe, run it through the main forward state table, starting
// from each state. If the the final state is the same, no matter what the starting state,
if(max==0 || *t==0) {
return 0; /* equal to length of both strings */
} else {
- return -max; /* return lengh difference */
+ return -max; /* return length difference */
}
}
* contents for locating the individual items by name.
*
* Two formats for the table of contents are supported, which is
- * why there is an abstract inteface involved.
+ * why there is an abstract interface involved.
*
*/
* contents for locating the individual items by name.
*
* Two formats for the table of contents are supported, which is
- * why there is an abstract inteface involved.
+ * why there is an abstract interface involved.
*
* These functions are part of the ICU internal implementation, and
- * are not inteded to be used directly by applications.
+ * are not intended to be used directly by applications.
*/
#ifndef __UCMNDATA_H__
LOTUS added a new group 0x14 to hold Unicode values not otherwise
represented in LMBCS: */
#define ULMBCS_GRP_UNICODE 0x14
-/* The two bytes appearing after a 0x14 are intrepreted as UFT-16 BE
+/* The two bytes appearing after a 0x14 are interpreted as UFT-16 BE
(Big-Endian) characters. The exception comes when the UTF16
representation would have a zero as the second byte. In that case,
'F6' is used in its place, and the bytes are swapped. (This prevents
};
typedef struct SCSUData {
- /* dynamic window offsets, intitialize to default values from initialDynamicOffsets */
+ /* dynamic window offsets, initialize to default values from initialDynamicOffsets */
uint32_t toUDynamicOffsets[8];
uint32_t fromUDynamicOffsets[8];
/* see cmemory.h for UObjectDeleter and uprv_deleteUObject() */
/**
- * This specifies whether or not, and how, the hastable resizes itself.
+ * This specifies whether or not, and how, the hashtable resizes itself.
* See uhash_setResizePolicy().
*/
enum UHashResizePolicy {
* NULL.
* @param keyComp A pointer to the function that compares keys. Must
* not be NULL.
- * @param size The initial capacity of this hash table.
+ * @param size The initial capacity of this hashtable.
* @param status A pointer to an UErrorCode to receive any errors.
* @return A pointer to a UHashtable, or 0 if an error occurred.
* @see uhash_open
* NULL.
* @param keyComp A pointer to the function that compares keys. Must
* not be NULL.
- * @param size The initial capacity of this hash table.
+ * @param size The initial capacity of this hashtable.
* @param status A pointer to an UErrorCode to receive any errors.
* @return A pointer to a UHashtable, or 0 if an error occurred.
* @see uhash_openSize
uhash_setValueDeleter(UHashtable *hash, UObjectDeleter *fn);
/**
- * Specify whether or not, and how, the hastable resizes itself.
+ * Specify whether or not, and how, the hashtable resizes itself.
* By default, tables grow but do not shrink (policy U_GROW).
* See enum UHashResizePolicy.
* @param hash The UHashtable to set
/* Use uprv_free() itself as a deleter for any key or value allocated using uprv_malloc. */
/**
- * Checks if the given hash tables are equal or not.
+ * Checks if the given hashtables are equal or not.
* @param hash1
* @param hash2
* @return true if the hashtables are equal and false if not.
Updated on 2018-09-12 from
https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry .
- The table lists redundant tags with preferred value in the IANA languate tag registry.
+ The table lists redundant tags with preferred value in the IANA language tag registry.
It's generated with the following command:
curl https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry |\
* whatever means are available.
*
* These functions are part of the ICU internal implementation, and
- * are not inteded to be used directly by applications.
+ * are not intended to be used directly by applications.
*
*----------------------------------------------------------------------------------*/
* The starting
* position is specified by "position". If "position" is outside the valid
* iteration range, the behavior of this object is undefined.
- * @param textPtr The char16_t array to be iteratd over
+ * @param textPtr The char16_t array to be iterated over
* @param length The length of the char16_t array
* @param position The starting position of the iteration
* @stable ICU 2.0
}
// Zero out function table of the closed UText. This is a defensive move,
- // inteded to cause applications that inadvertantly use a closed
+ // intended to cause applications that inadvertently use a closed
// utext to crash with null pointer errors.
ut->pFuncs = NULL;
static int64_t U_CALLCONV
ucstrTextLength(UText *ut) {
if (ut->a < 0) {
- // null terminated, we don't yet know the length. Scan for it.
+ // null terminated, we don't yet know the length. Scan for it.
// Access is not convenient for doing this
- // because the current interation postion can't be changed.
+ // because the current iteration position can't be changed.
const UChar *str = (const UChar *)ut->context;
for (;;) {
if (str[ut->chunkNativeLimit] == 0) {
// fields computed by handleComputeFields().
computeWeekFields(ec);
- // Compute time-related fields. These are indepent of the date and
+ // Compute time-related fields. These are independent of the date and
// of the subclass algorithm. They depend only on the local zone
// wall milliseconds in day.
int32_t millisInDay = (int32_t) (localMillis - (days * kOneDay));
* Tag for a lead surrogate code unit.
* Optional optimization for UTF-16 string processing.
* Bits 31..10: Unused, 0.
- * 9.. 8: =0: All associated supplementary code points are unassigned-implict.
+ * 9.. 8: =0: All associated supplementary code points are unassigned-implicit.
* =1: All associated supplementary code points fall back to the base data.
* else: (Normally 2) Look up the data for the supplementary code point.
*/
class CharsetMatch;
/**
- * class CharsetRecog_2022 part of the ICU charset detection imlementation.
+ * class CharsetRecog_2022 part of the ICU charset detection implementation.
* This is a superclass for the individual detectors for
* each of the detectable members of the ISO 2022 family
* of encodings.
if (U_FAILURE(status)) { return *this; }
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
return *this;
}
if (U_FAILURE(status)) { return -1; }
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
return -1;
}
return appendTo; // don't overwrite status if it's already a failure.
}
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
appendTo.setToBogus();
return appendTo;
return appendTo; // don't overwrite status if it's already a failure.
}
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
appendTo.setToBogus();
return appendTo;
return appendTo; // don't overwrite status if it's already a failure.
}
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
appendTo.setToBogus();
return appendTo;
return appendTo; // don't overwrite status if it's already a failure.
}
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
appendTo.setToBogus();
return appendTo;
return appendTo; // don't overwrite status if it's already a failure.
}
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
appendTo.setToBogus();
return appendTo;
return appendTo; // don't overwrite status if it's already a failure.
}
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
appendTo.setToBogus();
return appendTo;
return appendTo; // don't overwrite status if it's already a failure.
}
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
appendTo.setToBogus();
return appendTo;
UnicodeString& DecimalFormat::toPattern(UnicodeString& result) const {
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
result.setToBogus();
return result;
}
UnicodeString& DecimalFormat::toLocalizedPattern(UnicodeString& result) const {
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
result.setToBogus();
return result;
}
// don't overwrite status if it's already a failure.
if (U_FAILURE(status)) { return; }
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
// don't overwrite status if it's already a failure.
if (U_FAILURE(status)) { return; }
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
// don't overwrite ec if it's already a failure.
if (U_FAILURE(ec)) { return; }
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
ec = U_MEMORY_ALLOCATION_ERROR;
return;
}
// don't overwrite ec if it's already a failure.
if (U_FAILURE(*ec)) { return; }
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
*ec = U_MEMORY_ALLOCATION_ERROR;
return;
}
// don't overwrite status if it's already a failure.
if (U_FAILURE(status)) { return; }
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
// don't overwrite status if it's already a failure.
if (U_FAILURE(status)) { return; }
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
// We sometimes need to return nullptr here (see ICU-20380)
if (U_FAILURE(status)) { return nullptr; }
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
status = U_MEMORY_ALLOCATION_ERROR;
return nullptr;
}
return;
}
if (fields == nullptr) {
- // We only get here if an OOM error happend during construction, copy construction, assignment, or modification.
+ // We only get here if an OOM error happened during construction, copy construction, assignment, or modification.
// For regular construction, the caller should have checked the status variable for errors.
// For copy construction, there is unfortunately nothing to report the error, so we need to guard against
// this possible bad state here and set the status to an error.
// value, then the first one (the one we found above) is used if
// the numerator of the fraction is 1 and the second one is used if
// the numerator of the fraction is anything else (this lets us
- // do things like "one third"/"two thirds" without haveing to define
+ // do things like "one third"/"two thirds" without having to define
// a whole bunch of extra rule sets)
if ((unsigned)(winner + 1) < rules.size() &&
rules[winner + 1]->getBaseValue() == rules[winner]->getBaseValue()) {
rule2->radix = rule1->radix;
rule2->exponent = rule1->exponent;
- // rule2's rule text omits the stuff in brackets: initalize
+ // rule2's rule text omits the stuff in brackets: initialize
// its rule text and substitutions accordingly
sbuf.append(description, 0, brack1);
if (brack2 + 1 < description.length()) {
// in JDK 1.2, CollationElementIterator provides us with an
// API to map between character offsets and collation elements
// and we can do this by marching through the string comparing
- // collation elements. We can't do that in JDK 1.1. Insted,
+ // collation elements. We can't do that in JDK 1.1. Instead,
// we have to go through this horrible slow mess:
int32_t p = startingAt;
int32_t keyLen = 0;
case doConditionalExpr:
// Conditionals such as (?(1)a:b)
case doPerlInline:
- // Perl inline-condtionals. (?{perl code}a|b) We're not perl, no way to do them.
+ // Perl inline-conditionals. (?{perl code}a|b) We're not perl, no way to do them.
error(U_REGEX_UNIMPLEMENTED);
break;
// The pattern could match a string beginning with a German sharp-s
//
// To the ordinary case closure for a character c, we add all other
-// characters cx where the case closure of cx incudes a string form that begins
+// characters cx where the case closure of cx includes a string form that begins
// with the original character c.
//
// This function could be made smarter. The full pattern string is available
break;
- case URX_BACKSLASH_X: // Grahpeme Cluster. Minimum is 1, max unbounded.
+ case URX_BACKSLASH_X: // Grapheme Cluster. Minimum is 1, max unbounded.
case URX_DOTANY_ALL: // . matches one or two.
case URX_DOTANY:
case URX_DOTANY_UNIX:
case URX_BACKSLASH_R:
case URX_BACKSLASH_V:
case URX_ONECHAR_I:
- case URX_BACKSLASH_X: // Grahpeme Cluster. Minimum is 1, max unbounded.
+ case URX_BACKSLASH_X: // Grapheme Cluster. Minimum is 1, max unbounded.
case URX_DOTANY_ALL: // . matches one or two.
case URX_DOTANY:
case URX_DOTANY_UNIX:
loc++;
op = (int32_t)fRXPat->fCompiledPat->elementAti(loc);
if (URX_TYPE(op) == URX_LA_START) {
- // The boilerplate for look-ahead includes two LA_END insturctions,
+ // The boilerplate for look-ahead includes two LA_END instructions,
// Depth will be decremented by each one when it is seen.
depth += 2;
}
// Call the max length unbounded, and stop further checking.
case URX_BACKREF: // BackRef. Must assume that it might be a zero length match
case URX_BACKREF_I:
- case URX_BACKSLASH_X: // Grahpeme Cluster. Minimum is 1, max unbounded.
+ case URX_BACKSLASH_X: // Grapheme Cluster. Minimum is 1, max unbounded.
currentLen = INT32_MAX;
break;
#define REGEX_DUMP_DEBUG
#define REGEX_RUN_DEBUG
-// End of #defines inteded to be directly set.
+// End of #defines intended to be directly set.
#include <stdio.h>
#endif
// ---------------------------------------------------
-// TZGNCore - core implmentation of TimeZoneGenericNames
+// TZGNCore - core implementation of TimeZoneGenericNames
//
// TimeZoneGenericNames is parallel to TimeZoneNames,
// but handles run-time generated time zone names.
return TimeZoneNamesImpl::_getReferenceZoneID(mzID, region, tzID);
}
-// static implementaion of getReferenceZoneID
+// static implementation of getReferenceZoneID
UnicodeString&
TimeZoneNamesImpl::_getReferenceZoneID(const UnicodeString& mzID, const char* region, UnicodeString& tzID) {
ZoneMeta::getZoneIdByMetazone(mzID, UnicodeString(region, -1, US_INV), tzID);
* Copy or alias an array in another object, as appropriate.
*
* @param dstArray the copy destination array.
- * @param dstCount fill in with the lenth of 'dstArray'.
+ * @param dstCount fill in with the length of 'dstArray'.
* @param srcArray the source array to be copied.
* @param srcCount the length of items to be copied from the 'srcArray'.
*/
* transliterator <b>B</b> decrements character values, then <b>A</b>
* is an inverse of <b>B</b> and vice versa. If we compose <b>A</b>
* with <b>B</b> in a compound transliterator, the result is the
- * indentity transliterator, that is, a transliterator that does not
+ * identity transliterator, that is, a transliterator that does not
* change its input text.
*
* The <code>Transliterator</code> method <code>getInverse()</code>
const TimeZoneNames* getTimeZoneNames() const;
/**
- * Sets the time zone display name data to this format instnace.
+ * Sets the time zone display name data to this format instance.
* The caller should not delete the TimeZoenNames object after it is adopted
* by this call.
* @param tznames TimeZoneNames object to be adopted.
void adoptTimeZoneNames(TimeZoneNames *tznames);
/**
- * Sets the time zone display name data to this format instnace.
+ * Sets the time zone display name data to this format instance.
* @param tznames TimeZoneNames object to be set.
* @stable ICU 50
*/
UCAL_MAXIMUM,
/** Greatest minimum value */
UCAL_GREATEST_MINIMUM,
- /** Leaest maximum value */
+ /** Least maximum value */
UCAL_LEAST_MAXIMUM,
/** Actual minimum value */
UCAL_ACTUAL_MINIMUM,
* @param sc The USpoofChecker
* @param id1 The first of the two identifiers to be compared for
* confusability. The strings are in UTF-16 format.
- * @param length1 the length of the first identifer, expressed in
+ * @param length1 the length of the first identifier, expressed in
* 16 bit UTF-16 code units, or -1 if the string is
* nul terminated.
* @param id2 The second of the two identifiers to be compared for
*
* uspoof_impl.h
*
-* Implemenation header for spoof detection
+* Implementation header for spoof detection
*
*/
int32_t fMagic; // (0x3845fdef)
uint8_t fFormatVersion[4]; // Data Format. Same as the value in struct UDataInfo
// if there is one associated with this data.
- int32_t fLength; // Total lenght in bytes of this spoof data,
+ int32_t fLength; // Total length in bytes of this spoof data,
// including all sections, not just the header.
// The following four sections refer to data representing the confusable data
/**
* Return the canonical id for this tzid defined by CLDR, which might be the id itself.
- * This overload method returns a persistent const UChar*, which is guranteed to persist
+ * This overload method returns a persistent const UChar*, which is guaranteed to persist
* (a pointer to a resource). If the given system tzid is not known, U_ILLEGAL_ARGUMENT_ERROR
* is set in the status.
* @param tzid Zone ID
uint64_t result;
- /* intialize parameters */
+ /* initialize parameters */
limit = buffer + *len;
count = 0;
result = 0;
uint8_t bytes[sizeof(void*)];
} result;
- /* intialize variables */
+ /* initialize variables */
count = 0;
offset = 0;
result.ptr = NULL;
if(U_FAILURE(status))
ok = TRUE;
if(ok!=TRUE)
- log_err("Fail: Lenient not working: does lenient parsing in spite of setting Leninent as FALSE ");
+ log_err("Fail: Lenient not working: does lenient parsing in spite of setting Lenient as FALSE ");
udat_close(df);
LocalUNumberFormatPointer uf5(unum_open(UNUM_CURRENCY, NULL, 0, SRC_LOC.getName(), NULL, &status));
if (U_FAILURE(status)) {
- dataerrln("Error creating instanaces.");
+ dataerrln("Error creating instances.");
return;
} else {
float n = 1234.567f;
ok = FALSE;
}
- // We'll cheat a bit here. The samples happend to be in order and so are our
+ // We'll cheat a bit here. The samples happened to be in order and so are our
// expected values, so we'll just test in order until a failure. If the
// implementation changes to return samples in an arbitrary order, this test
// must change. There's no actual restriction on the order of the samples.
*/
void TransliteratorTest::TestAny(void) {
UErrorCode status = U_ZERO_ERROR;
- // Note: there is a lot of implict construction of UnicodeStrings from (char *) in
+ // Note: there is a lot of implicit construction of UnicodeStrings from (char *) in
// function call parameters going on in this test.
UnicodeSet alphabetic("[:alphabetic:]", status);
if (U_FAILURE(status)) {
// (UTF-8 wrapper, for example)
//
// The test:
-// 1. Create an inital UText
+// 1. Create an initial UText
// 2. Deep clone it. Contents should match original.
// 3. Reset original to something different.
// 4. Check that clone contents did not change.
for (;;) { // not really a loop, just allows "break" to work, to simplify
- // inadvertantly running more than one test through here.
+ // inadvertently running more than one test through here.
if (opt_strcmp || opt_strcmpCPO)
{
unsigned long startTime = timeGetTime();
break;
}
- // Figure out the lenght of the char and read the rest of the bytes
+ // Figure out the length of the char and read the rest of the bytes
// into a temp array.
int nBytes;
if (ch >= 0xF0) {nBytes=4;}
break;
}
- // Figure out the lenght of the char and read the rest of the bytes
+ // Figure out the length of the char and read the rest of the bytes
// into a temp array.
int nBytes;
if (ch >= 0xF0) {nBytes=4;}
"(?<!a(?!...z))qq" "aqqz"
# More nested lookaround: match any two chars preceded and followed by an upper case letter.
-# With gratuitious nesting of look-arounds and capture from the look-arounds.
+# With gratuitous nesting of look-arounds and capture from the look-arounds.
"(?=(?<=(\p{Lu})(?=..(\p{Lu})))).." "<1>A</1><0>jk</0><2>B</2>"
"(?=(?<=(\p{Lu})(?=..(\p{Lu})))).." "ajkB"
fNumberOfTests = ures_getSize(fTestData);
fInfoRB = ures_getByKey(fModuleBundle, "Info", NULL, &status);
if(status != U_ZERO_ERROR) {
- log.errln(UNICODE_STRING_SIMPLE("Unable to initalize test data - missing mandatory description resources!"));
+ log.errln(UNICODE_STRING_SIMPLE("Unable to initialize test data - missing mandatory description resources!"));
fDataTestValid = FALSE;
} else {
fInfo = new RBDataMap(fInfoRB, status);
#include "ucbuf.h"
U_CDECL_BEGIN
-/* One time parser initalisation */
+/* One time parser initialization */
void initParser();
/* Parse a ResourceBundle text file */
mappingDataCapacity += adjustedLen;
if(U_FAILURE(*status)){
- fprintf(stderr, "Failed to put entries into the hastable. Error: %s\n", u_errorName(*status));
+ fprintf(stderr, "Failed to put entries into the hash table. Error: %s\n", u_errorName(*status));
exit(*status);
}
}
/*
- * Given the base libName and version numbers, generate the libary file names and store it in libFileNames.
+ * Given the base libName and version numbers, generate the library file names and store it in libFileNames.
* Depending on the configuration, the library name may either end with version number or shared object suffix.
*/
static void createFileNames(UPKGOptions *o, const char mode, const char *version_major, const char *version, const char *libName, UBool reverseExt, UBool noVersion) {
const char *name;
if (i == 0) {
- /* The first iteration calls the gencmn function and initailizes the buffer. */
+ /* The first iteration calls the gencmn function and initializes the buffer. */
createCommonDataFile(o->tmpDir, o->shortName, o->entryName, NULL, o->srcDir, o->comment, o->fileListFiles->str, 0, TRUE, o->verbose, gencmnFile);
buffer[0] = 0;
#ifdef USE_SINGLE_CCODE_FILE
/**
* Returns a pointer to the internal converted buffer
* @param buf Pointer to UCHARBUF structure
- * @param len Pointer to int32_t to receive the lenth of buffer
+ * @param len Pointer to int32_t to receive the length of buffer
* @param err is a pointer to a valid <code>UErrorCode</code> value. If this value
* indicates a failure on entry, the function will immediately return.
* On exit the value will indicate the success of the operation.
* that are harder to alter than the traditional numerals (one could
* fairly easily change a one to
* a three just by adding two strokes, for example). This is also done in
- * the other countries using Chinese idographs, but different ideographs
+ * the other countries using Chinese ideographs, but different ideographs
* are used in those places.
*/
public static final String japanese =
+ "that are harder to alter than the traditional numerals (one could "
+ "fairly easily change a one to "
+ "a three just by adding two strokes, for example). This is also done in "
- + "the other countries using Chinese idographs, but different ideographs "
+ + "the other countries using Chinese ideographs, but different ideographs "
+ "are used in those places.",
"Again in Greek we have to supply the words "
/**
* Returns a charset object for the named charset.
- * This method gurantee that ICU charset is returned when
+ * This method guarantees that ICU charset is returned when
* available. If the ICU charset provider does not support
* the specified charset, then try other charset providers
* including the standard Java charset provider.
// };
private final static class SCSUData {
- /* dynamic window offsets, intitialize to default values from initialDynamicOffsets */
+ /* dynamic window offsets, initialize to default values from initialDynamicOffsets */
int toUDynamicOffsets[] = new int[8] ;
int fromUDynamicOffsets[] = new int[8] ;
* Tag for a lead surrogate code unit.
* Optional optimization for UTF-16 string processing.
* Bits 31..10: Unused, 0.
- * 9.. 8: =0: All associated supplementary code points are unassigned-implict.
+ * 9.. 8: =0: All associated supplementary code points are unassigned-implicit.
* =1: All associated supplementary code points fall back to the base data.
* else: (Normally 2) Look up the data for the supplementary code point.
*/
* If the key has a fallback, modify the key and return true,
* otherwise return false. The current ID will change if there
* is a fallback. No currentIDs should be repeated, and fallback
- * must eventually return false. This implmentation has no fallbacks
+ * must eventually return false. This implementation has no fallbacks
* and always returns false.
*/
public boolean fallback() {
int poLen = processOut.length();
if(poLen==0){
- throw new StringPrepParseException("Found zero length lable after NamePrep.",StringPrepParseException.ZERO_LENGTH_LABEL);
+ throw new StringPrepParseException("Found zero length label after NamePrep.",StringPrepParseException.ZERO_LENGTH_LABEL);
}
StringBuffer dest = new StringBuffer();
sepIndex = getSeparatorIndex(srcArr,sepIndex,srcArr.length);
String label = new String(srcArr,oldSepIndex,sepIndex-oldSepIndex);
if(label.length()==0 && sepIndex!=srcArr.length ){
- throw new StringPrepParseException("Found zero length lable after NamePrep.",StringPrepParseException.ZERO_LENGTH_LABEL);
+ throw new StringPrepParseException("Found zero length label after NamePrep.",StringPrepParseException.ZERO_LENGTH_LABEL);
}
UCharacterIterator iter = UCharacterIterator.getInstance(label);
result.append(convertToUnicode(iter,options));
* Constructs a build table
* @param aliasdata data to be filled into table
* @param maxdatalength maximum data length allowed in table
- * @param initialvalue inital data value
+ * @param initialvalue initial data value
* @param latin1linear is latin 1 to be linear
*/
public IntTrieBuilder(int aliasdata[], int maxdatalength,
if(max==0 || unfold[unfoldOffset]==0) {
return 0; /* equal to length of both strings */
} else {
- return -max; /* return lengh difference */
+ return -max; /* return length difference */
}
}
///CLOVER:OFF
/**
- * private constructor to avoid initialisation
+ * private constructor to avoid initialization
*/
private UCharacterUtility()
{
they are measured */
// hack, initialization long array using expressions with 'L' at end doesn't
- // compute entire expression using 'long'. differs from initializtion of
+ // compute entire expression using 'long'. differs from initialization of
// a single constant
static final long[] approxDurations = {
36525L*24*60*60*10, 3045*24*60*60*10L, 7*24*60*60*1000L, 24*60*60*1000L,
private final short grouping2;
/**
- * The minimum gropuing size, with the following special values:
+ * The minimum grouping size, with the following special values:
* <ul>
* <li>-2 = needs locale data
* <li>-3 = no less than 2
* UCharacter.MIN_VALUE and UCharacter.MAX_VALUE or does not have a name.
* <br>
* Note calling any methods related to code point names, e.g. get*Name*()
- * incurs a one-time initialisation cost to construct the name tables.
+ * incurs a one-time initialization cost to construct the name tables.
* @param ch the code point for which to get the name
* @return most current Unicode name
* @stable ICU 2.1
* "<codepoint_type-codepoint_hex_digits>". E.g., <noncharacter-fffe>
* </ul>
* Note calling any methods related to code point names, e.g. get*Name*()
- * incurs a one-time initialisation cost to construct the name tables.
+ * incurs a one-time initialization cost to construct the name tables.
* @param ch the code point for which to get the name
* @return a name for the argument codepoint
* @stable ICU 2.6
* UCharacter.MIN_VALUE and UCharacter.MAX_VALUE or does not have a name.
* <br>
* Note calling any methods related to code point names, e.g. get*Name*()
- * incurs a one-time initialisation cost to construct the name tables.
+ * incurs a one-time initialization cost to construct the name tables.
* @param ch the code point for which to get the name alias
* @return Unicode name alias, or null
* @stable ICU 4.4
* {@icu} <p>Finds a Unicode code point by its most current Unicode name and
* return its code point value. All Unicode names are in uppercase.
* Note calling any methods related to code point names, e.g. get*Name*()
- * incurs a one-time initialisation cost to construct the name tables.
+ * incurs a one-time initialization cost to construct the name tables.
* @param name most current Unicode character name whose code point is to
* be returned
* @return code point or -1 if name is not found
* "<codepoint_type-codepoint_hex_digits>". E.g. <noncharacter-FFFE>
* </ul>
* Note calling any methods related to code point names, e.g. get*Name*()
- * incurs a one-time initialisation cost to construct the name tables.
+ * incurs a one-time initialization cost to construct the name tables.
* @param name codepoint name
* @return code point associated with the name or -1 if the name is not
* found.
* {@icu} <p>Find a Unicode character by its corrected name alias and return
* its code point value. All Unicode names are in uppercase.
* Note calling any methods related to code point names, e.g. get*Name*()
- * incurs a one-time initialisation cost to construct the name tables.
+ * incurs a one-time initialization cost to construct the name tables.
* @param name Unicode name alias whose code point is to be returned
* @return code point or -1 if name is not found
* @stable ICU 4.4
// private constructor -----------------------------------------------
///CLOVER:OFF
/**
- * Private constructor to prevent initialisation
+ * Private constructor to prevent initialization
*/
private UCharacterCategory()
{
// private constructor =========================================
///CLOVER:OFF
/**
- * Private constructor to prevent initialisation
+ * Private constructor to prevent initialization
*/
private UCharacterDirection()
{
package com.ibm.icu.text;
/**
- * class CharsetRecog_2022 part of the ICU charset detection imlementation.
+ * class CharsetRecog_2022 part of the ICU charset detection implementation.
* This is a superclass for the individual detectors for
* each of the detectable members of the ISO 2022 family
* of encodings.
import java.util.Arrays;
/**
- * CharsetRecognizer implemenation for Asian - double or multi-byte - charsets.
+ * CharsetRecognizer implementation for Asian - double or multi-byte - charsets.
* Match is determined mostly by the input data adhering to the
* encoding scheme for the charset, and, optionally,
* frequency-of-occurence of characters.
* <P>
* DateIntervalInfo are not expected to be subclassed.
* Data for a calendar is loaded out of resource bundles.
- * Through ICU 4.4, date interval patterns are only supported in the Gregoria
+ * Through ICU 4.4, date interval patterns are only supported in the Gregorian
* calendar; non-Gregorian calendars are supported from ICU 4.4.1.
*
* @stable ICU 4.0
}
//
- // RBBISymbolTable::lookup This function from the abstract symbol table inteface
+ // RBBISymbolTable::lookup This function from the abstract symbol table interface
// looks up a variable name and returns a UnicodeString
// containing the substitution text.
//
private static final String NUMERIC_FORMAT_CHARS = "ADdFgHhKkmrSsuWwYy";
/**
- * Format characters that indicate numeric fields when pattern lengh
+ * Format characters that indicate numeric fields when pattern length
* is up to 2.
*/
private static final String NUMERIC_FORMAT_CHARS2 = "ceLMQq";
private static final int INDEX_TOP = 16; /* changing this requires a new formatVersion */
- // CharTrie implmentation for reading the trie data
+ // CharTrie implementation for reading the trie data
private CharTrie sprepTrie;
// Indexes read from the data file
private int[] indexes;
}
/**
- * Compares UnicodeSets, where shorter come first, and otherwise lexigraphically
+ * Compares UnicodeSets, where shorter come first, and otherwise lexicographically
* (according to the comparison of the first characters that differ).
* @see java.lang.Comparable#compareTo(java.lang.Object)
* @stable ICU 4.4
* If null the default ICU package name is used.
* @param localeName the locale for which a resource bundle is desired
* @param root the class object from which to load the resource bundle
- * @param disableFallback Option to disable locale inheritence.
+ * @param disableFallback Option to disable locale inheritance.
* If true the fallback chain will not be built.
* @throws MissingResourceException
* if no resource bundle for the specified base name can be found
* ICUResourceBundleIterator iterator = resB.getIterator();
* ICUResourceBundle temp;
* while (iterator.hasNext()) {
- * temp = iterartor.next();
+ * temp = iterator.next();
* int type = temp.getType();
* switch(type){
* case UResourceBundle.STRING:
// constructor -----------------------------------------------------------
/**
- * Private constructor to prevent initialisation
+ * Private constructor to prevent initialization
*/
public UCharacterCategoryTest()
{
// constructor -----------------------------------------------------------
/**
- * Private constructor to prevent initialisation
+ * Private constructor to prevent initialization
*/
public UCharacterThreadTest()
{
}
int poLen = processOut.length();
if(poLen==0){
- throw new StringPrepParseException("Found zero length lable after NamePrep.",StringPrepParseException.ZERO_LENGTH_LABEL);
+ throw new StringPrepParseException("Found zero length label after NamePrep.",StringPrepParseException.ZERO_LENGTH_LABEL);
}
StringBuffer dest = new StringBuffer();
sepIndex = getSeparatorIndex(srcArr,sepIndex,srcArr.length);
String label = new String(srcArr,oldSepIndex,sepIndex-oldSepIndex);
if(label.length()==0 && sepIndex!=srcArr.length ){
- throw new StringPrepParseException("Found zero length lable after NamePrep.",StringPrepParseException.ZERO_LENGTH_LABEL);
+ throw new StringPrepParseException("Found zero length label after NamePrep.",StringPrepParseException.ZERO_LENGTH_LABEL);
}
UCharacterIterator iter = UCharacterIterator.getInstance(label);
result.append(convertToUnicode(iter,options));
//int opt2 = 0;
for(;;) { //not really a loop, just allows "break" to work, to simplify
- //inadvertantly running more than one test through here
+ //inadvertently running more than one test through here
if(opt_strcmp) {
int r = 0;
startTime = System.currentTimeMillis();
The format of the API data file is straightforward. The first line of
the file is the header, successive lines are the api information.
Each line consists of a number of tokens, each followed by a
-semi-colon (incuding the last token on the line).
+semi-colon (including the last token on the line).
The header line contains the version number, the 'name' of the version
of ICU4J represented by the file, and a 'base directory' field
* todo: separate generation of data files (which requires taglet) from
* comparison and report generation (which does not require it)
* todo: provide command-line control of filters of which subclasses/packages to process
- * todo: record full inheritance heirarchy, not just immediate inheritance
+ * todo: record full inheritance hierarchy, not just immediate inheritance
* todo: allow for aliasing comparisons (force (pkg.)*class to be treated as though it
- * were in a different pkg/class heirarchy (facilitates comparison of icu4j and java)
+ * were in a different pkg/class hierarchy (facilitates comparison of icu4j and java)
*/
package com.ibm.icu.dev.tool.docs;
* com.ibm.icu.lang com.ibm.icu.math com.ibm.icu.text com.ibm.icu.util
*
* todo: provide command-line control of filters of which subclasses/packages to process
- * todo: record full inheritance heirarchy, not just immediate inheritance
+ * todo: record full inheritance hierarchy, not just immediate inheritance
* todo: allow for aliasing comparisons (force (pkg.)*class to be treated as though it
- * were in a different pkg/class heirarchy (facilitates comparison of icu4j and java)
+ * were in a different pkg/class hierarchy (facilitates comparison of icu4j and java)
*/
package com.ibm.icu.dev.tool.docs;
int fileSize;
boolean option_d = false; // data option. Produce exportable data
- boolean option_v = true; // verbose informaional output.
+ boolean option_v = true; // verbose informational output.
boolean sjis = false; // True if input text files are Shift_JIS encoded.
int fileSize;
boolean option_d = false; // data option. Produce exportable data
- boolean option_v = true; // verbose informaional output.
+ boolean option_v = true; // verbose informational output.
private static ImmutableSet<String> parseLocaleIds(String localeIds) {
// Need to filter out '//' style end-of-line comments first (replace with \n to avoid
- // inadvertantly joining two elements.
+ // inadvertently joining two elements.
localeIds = localeIds.replaceAll("//[^\n]*\n", "\n");
return ImmutableSet.copyOf(LIST_SPLITTER.splitToList(localeIds));
}
prefix.append(*toSort[expIndexes[n]]);
}
- // try inserting ingorables
+ // try inserting ignorables
UColAttributeValue lastStr = UCOL_OFF;
k = 0;
while(toSort[k]->strengthFromEmpty > strength) {
}
if(script == USCRIPT_UNKNOWN) {
// The last script start is for unassigned code points
- // (with high implict primary weights).
+ // (with high implicit primary weights).
// Add one more entry with the limit of this range,
// which is the start of the trailing-weights range.
U_ASSERT(scriptStartsLength < UPRV_LENGTHOF(scriptStarts));
private Date modified; // The last modification date of the item
private String creator; // The name of the person who created the item
private String modifier; // The name of the person who last modified the item
- private Hashtable lookups; // A hastable of lookups for the item (i.e. ({#}, Meaning) pairs)
+ private Hashtable lookups; // A hash table of lookups for the item (i.e. ({#}, Meaning) pairs)
private BundleGroup group; // The parent group of the item
/**
String[] encodings;
- // Initiailize the readers to the main NLS file
+ // Initialize the readers to the main NLS file
FileReader fr = new FileReader(mainFile);
BufferedReader br = new BufferedReader(fr);
<P>The Groups tab view, like all tab views, looks and functions differently
when working with the resource bundle as a whole than when working with
an individual resource file. For an overview of this difference see <A HREF="view1.html">View
- 1</A>. RB Manager adds a level of heirarchy not commonly found in resource
+ 1</A>. RB Manager adds a level of hierarchy not commonly found in resource
bundles. This addtional level is called Groups. For more information on
Resource Groups see the <A HREF="../tutorial/index.html">Tutorial</A>.</P>
<P><B>Working with a Resource Bundle</B></P>