Found via `codespell -q 3 -L ans,anumber,atleast,ba,bre,hace,nd,nin,ois,rsource,som,sur,tht -S icu4c/source/data/zone,icu4c/source/data/lang`
ICU-21580 Fix source (related) typos
ICU-21580 Revert extraneous auto-encoding
ICU-21580 Re-add previous reverted fix without auto-encoding
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer. Redistributions in binary
# form must reproduce the above copyright notice, this list of conditions and
- # the following disclaimer in the documentation and/or ther materials
+ # the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
sysconfdir). Note that the use of --disable-rpath assumes that the
packaging is made for a standard location, or that the package
installation/deinstallation will correctly manage the configuration
-of the system's dyanmic loader. This is the right way of doing things.
+of the system's dynamic loader. This is the right way of doing things.
-The configure script invokation should also be done with
+The configure script invocation should also be done with
CFLAGS="-O2"
+ The ICU development package
-The ICU developpment package is named `libicu-dev'. It provides all
+The ICU development package is named `libicu-dev'. It provides all
the files necessary to write applications that use ICU, along with
examples and some documentation.
- The .so symbolic links used by the linker to link against the
latest version of the libraries.
- A sample Makefile fragment that can be included by applications
-using ICU, to faciliate their building, along with a platform-specific
+using ICU, to facilitate their building, along with a platform-specific
configuration file included by this fragment.
- The sample applications from the ICU source tree, in an appropriate
location for the system that the package is installed on (for example,
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-dnl only at the first occurence in configure.ac, so if the first place
+dnl only at the first occurrence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
C4661 No suitable definition provided for explicit template instantiation request.
C4715 Not all control paths return a value.
C4706 Assignment within conditional expression.
- C4005 Macro redifintion.
+ C4005 Macro redefinition.
C4068 Unknown pragma.
C4267 Conversion from size_t to type, possible loss of data.
C4910 __declspec(dllexport) and extern are incompatible on an explicit instantiation.
/**
* See if the decomposition of cp2 is at segment starting at segmentPos
- * (with canonical rearrangment!)
+ * (with canonical rearrangement!)
* If so, take the remainder, and return the equivalents
*/
Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, const UChar *segment, int32_t segLen, int32_t segmentPos, UErrorCode &status) {
* default code page conversion, which will do the best job possible,
* but may be lossy, depending on the platform.
*
- * If no other conversion is available, use invariant conversion and substitue
+ * If no other conversion is available, use invariant conversion and substitute
* '?' for non-invariant characters.
*
* Example Usage:
// dictionary word, with a preceding word
static const int32_t THAI_PREFIX_COMBINE_THRESHOLD = 3;
-// Ellision character
+// Elision character
static const int32_t THAI_PAIYANNOI = 0x0E2F;
// Repeat character
}
// We come here after having either found a word or not. We look ahead to the
- // next word. If it's not a dictionary word, we will combine it withe the word we
+ // next word. If it's not a dictionary word, we will combine it with the word we
// just found (if there is one), but only if the preceding word does not exceed
// the threshold.
// The text iterator should now be positioned at the end of the word we found.
}
// We come here after having either found a word or not. We look ahead to the
- // next word. If it's not a dictionary word, we will combine it withe the word we
+ // next word. If it's not a dictionary word, we will combine it with the word we
// just found (if there is one), but only if the preceding word does not exceed
// the threshold.
// The text iterator should now be positioned at the end of the word we found.
/**
- * Initialize a plugin fron an entrypoint and library - but don't load it.
+ * Initialize a plugin from an entrypoint and library - but don't load it.
*/
static UPlugData* uplug_initPlugFromEntrypointAndLibrary(UPlugEntrypoint *entrypoint, const char *config, void *lib, const char *sym,
UErrorCode *status) {
alias, strings, types, replacementIndexes, length,
#if U_DEBUG
[](const char* type) {
- // Assert the aliasFrom only contains the following possibilties
+ // Assert the aliasFrom only contains the following possibilities
// language_REGION_variant
// language_REGION
// language_variant
}
if (replacedExtensions != nullptr) {
// DO NOTHING
- // UTS35 does not specifiy what should we do if we have extensions in the
+ // UTS35 does not specify what should we do if we have extensions in the
// replacement. Currently we know only the following 4 "BCP47 LegacyRules" have
// extensions in them languageAlias:
// i_default => en_x_i_default
} // while(1)
if (U_FAILURE(status)) { return false; }
- // Nothing changed and we know the order of the vaiants are not change
+ // Nothing changed and we know the order of the variants are not change
// because we have no variant or only one.
const char* extensionsStr = locale_getKeywordsStart(locale.getName());
if (changed == 0 && variants.size() <= 1 && extensionsStr == nullptr) {
* @param tag The tag to add.
* @param tagLength The length of the tag.
* @param buffer The output buffer.
- * @param bufferLength The length of the output buffer. This is an input/ouput parameter.
+ * @param bufferLength The length of the output buffer. This is an input/output parameter.
**/
static void U_CALLCONV
appendTag(
U_NAMESPACE_BEGIN
-// Uncomment the follwoing #define to debug.
+// Uncomment the following #define to debug.
// #define LSTM_DEBUG 1
// #define LSTM_VECTORIZER_DEBUG 1
{
}
-constexpr int32_t MAX_GRAPHEME_CLSTER_LENTH = 10;
+constexpr int32_t MAX_GRAPHEME_CLSTER_LENGTH = 10;
void GraphemeClusterVectorizer::vectorize(
UText *text, int32_t startPos, int32_t endPos,
}
int32_t last = startPos;
int32_t current = startPos;
- UChar str[MAX_GRAPHEME_CLSTER_LENTH];
+ UChar str[MAX_GRAPHEME_CLSTER_LENGTH];
while ((current = graphemeIter->next()) != BreakIterator::DONE) {
if (current >= endPos) {
break;
}
if (current > startPos) {
- utext_extract(text, last, current, str, MAX_GRAPHEME_CLSTER_LENTH, &status);
+ utext_extract(text, last, current, str, MAX_GRAPHEME_CLSTER_LENGTH, &status);
if (U_FAILURE(status)) return;
offsets.addElement(last, status);
indices.addElement(stringToIndex(str), status);
if (U_FAILURE(status) || last >= endPos) {
return;
}
- utext_extract(text, last, endPos, str, MAX_GRAPHEME_CLSTER_LENTH, &status);
+ utext_extract(text, last, endPos, str, MAX_GRAPHEME_CLSTER_LENGTH, &status);
if (U_SUCCESS(status)) {
offsets.addElement(last, status);
indices.addElement(stringToIndex(str), status);
/**
* Converts a category name such as "zero", "one", "two", "few", "many"
- * or "other" to a category enum. Returns NONE for urecongized
+ * or "other" to a category enum. Returns NONE for unrecognized
* category name.
*/
static Category toCategory(const UnicodeString &categoryName);
if (sizeFile != tzInfo->defaultTZFileSize) {
result = FALSE;
} else {
- /* Store the data from the files in seperate buffers and
+ /* Store the data from the files in separate buffers and
* compare each byte to determine equality.
*/
if (tzInfo->defaultTZBuffer == NULL) {
}
/**
- * Returns true if the specfied position is a boundary position. As a side
+ * Returns true if the specified position is a boundary position. As a side
* effect, leaves the iterator pointing to the first boundary position at
* or after "offset".
*
if (state == STOP_STATE) {
// This is the normal exit from the lookup state machine.
- // Transistion to state zero means we have found a safe point.
+ // Transition to state zero means we have found a safe point.
break;
}
}
# and others. All rights reserved.
#**************************************************************************
#
-# rbbicst Compile the RBBI rule paser state table data into initialized C data.
+# rbbicst Compile the RBBI rule parser state table data into initialized C data.
# Usage:
# cd icu/source/common
# perl rbbicst.pl < rbbirpt.txt > rbbirpt.h
print "U_NAMESPACE_BEGIN\n";
#
- # Emit the constants for indicies of Unicode Sets
+ # Emit the constants for indices of Unicode Sets
# Define one constant for each of the character classes encountered.
# At the same time, store the index corresponding to the set name back into hash.
#
print " rbbiLastAction};\n\n";
#
- # Emit the struct definition for transtion table elements.
+ # Emit the struct definition for transition table elements.
#
print "//-------------------------------------------------------------------------------\n";
print "//\n";
printTable("Forward State Transition Table", fForwardTable);
printTable("Reverse State Transition Table", fReverseTable);
- RBBIDebugPrintf("\nOrignal Rules source:\n");
+ RBBIDebugPrintf("\nOriginal Rules source:\n");
for (int32_t c=0; fRuleSource[c] != 0; c++) {
RBBIDebugPrintf("%c", fRuleSource[c]);
}
printNode(node);
if (node != NULL) {
// Only dump the definition under a variable reference if asked to.
- // Unconditinally dump children of all other node types.
+ // Unconditionally dump children of all other node types.
if (node->fType != varRef) {
if (node->fLeftChild != NULL) {
printTree(node->fLeftChild, FALSE);
int fLastPos; // Last position in the rule source string
// of any text associated with this node.
// If there's a right child, this will be the same
- // as that child's last postion.
+ // as that child's last position.
UBool fNullable; // See Aho.
int32_t fVal; // For leafChar nodes, the value.
private:
RBBINode &operator = (const RBBINode &other); // No defs.
- UBool operator == (const RBBINode &other); // Private, so these functions won't accidently be used.
+ UBool operator == (const RBBINode &other); // Private, so these functions won't accidentally be used.
#ifdef RBBI_DEBUG
public:
# | character from the input only if 'n' appears here.
# |
# |--- Character or named character classes to test for. If the current character being scanned
-# matches, peform the actions and go to the state specified on this line.
+# matches, perform the actions and go to the state specified on this line.
# The input character is tested sequentally, in the order written. The characters and
# character classes tested for do not need to be mutually exclusive. The first match wins.
#
# to go to after completion of the variable name scanning.
#
# The current input character must be the $ that introduces the name.
-# The $ is consummed here rather than in the state that first detected it
+# The $ is consumed here rather than in the state that first detected it
# so that the doStartVariableName action only needs to happen in one
# place (here), and the other states don't need to worry about it.
#
// Node Stack.
// Normally has one entry, which is the entire parse tree for the rules.
- // If errors occured, there may be additional subtrees left on the stack.
+ // If errors occurred, there may be additional subtrees left on the stack.
while (fNodeStackPtr > 0) {
delete fNodeStack[fNodeStackPtr];
fNodeStackPtr--;
RBBINode **destRules = (fReverseRule? &fRB->fSafeRevTree : fRB->fDefaultTree);
if (*destRules != NULL) {
- // This is not the first rule encounted.
+ // This is not the first rule encountered.
// OR previous stuff (from *destRules)
// with the current rule expression (on the Node Stack)
// with the resulting OR expression going to *destRules
// TODO: Get more accurate position of the error from UnicodeSet's return info.
// UnicodeSet appears to not be reporting correctly at this time.
#ifdef RBBI_DEBUG
- RBBIDebugPrintf("UnicodeSet parse postion.ErrorIndex = %d\n", pos.getIndex());
+ RBBIDebugPrintf("UnicodeSet parse position.ErrorIndex = %d\n", pos.getIndex());
#endif
error(localStatus);
delete uset;
}
- // Advance the RBBI parse postion over the UnicodeSet pattern.
+ // Advance the RBBI parse position over the UnicodeSet pattern.
// Don't just set fScanIndex because the line/char positions maintained
// for error reporting would be thrown off.
i = pos.getIndex();
fRB->fRules.extractBetween(n->fFirstPos, n->fLastPos, n->fText);
// findSetFor() serves several purposes here:
// - Adopts storage for the UnicodeSet, will be responsible for deleting.
- // - Mantains collection of all sets in use, needed later for establishing
+ // - Maintains collection of all sets in use, needed later for establishing
// character categories for run time engine.
// - Eliminates mulitiple instances of the same set.
// - Creates a new uset node if necessary (if this isn't a duplicate.)
//
// Walk through the tree, replacing any references to $variables with a copy of the
- // parse tree for the substition expression.
+ // parse tree for the substitution expression.
//
fTree = fTree->flattenVariables();
#ifdef RBBI_DEBUG
}
}
return;
- // delete local pointers only if error occured.
+ // delete local pointers only if error occurred.
ExitBuildSTdeleteall:
delete initialState;
delete failState;
// the first of a pair. In each of these rows, the entry for the second character
// of a safe pair is set to the stop state (0), indicating that a match was found.
// All other table entries are set to the state corresponding the current input
- // character, allowing that charcter to be the of a start following pair.
+ // character, allowing that character to be the of a start following pair.
//
// Because the safe rules are to be run in reverse, moving backwards in the text,
// the first and second pair categories are swapped when building the table.
// The table as a whole is UVector<UnicodeString>
// Each row is represented by a UnicodeString, being used as a Vector<int16>.
// Row 0 is the stop state.
- // Row 1 is the start sate.
+ // Row 1 is the start state.
// Row 2 and beyond are other states, initially one per char class, but
// after initial construction, many of the states will be combined, compacting the table.
// The String holds the nextState data only. The four leading fields of a row, fAccepting,
bool findDuplCharClassFrom(IntPair *categories);
/** Remove a column from the state table. Used when two character categories
- * have been found equivalent, and merged together, to eliminate the uneeded table column.
+ * have been found equivalent, and merged together, to eliminate the unneeded table column.
*/
void removeColumn(int32_t column);
/**
- * Check for, and remove dupicate states (table rows).
+ * Check for, and remove duplicate states (table rows).
* @return the number of states removed.
*/
int32_t removeDuplicateStates();
* so forth, until the chain is exhausted or the tag is found.
*
* Thread-safety is implemented around caches, both the cache that
- * stores all the resouce data, and the cache that stores flags
+ * stores all the resource data, and the cache that stores flags
* indicating whether or not a file has been visited. These caches
* delete their storage at static cleanup time, when the process
* quits.
* you're removing pointer to this somewhere. Management of that
* pointer will have to know how to deal with refcounts. Once
* the refcount drops to zero, the resource is released. Return
- * false if the resouce has been released.
+ * false if the resource has been released.
*/
CacheEntry* unref() {
if ((--refcount) == 0) {
/**
* <p>ServiceListener is the listener that ICUService provides by default.
- * ICUService will notifiy this listener when factories are added to
+ * ICUService will notify this listener when factories are added to
* or removed from the service. Subclasses can provide
* different listener interfaces that extend EventListener, and modify
* acceptsListener and notifyListener as appropriate.</p>
changeState_2022(args->converter,&(mySource),
mySourceLimit, ISO_2022_JP,err);
- /* If in ISO-2022-JP only and we successully completed an escape sequence, but previous segment was empty, create an error */
+ /* If in ISO-2022-JP only and we successfully completed an escape sequence, but previous segment was empty, create an error */
if(myData->version==0 && myData->key==0 && U_SUCCESS(*err) && myData->isEmptySegment) {
*err = U_ILLEGAL_ESCAPE_SEQUENCE;
args->converter->toUCallbackReason = UCNV_IRREGULAR;
* SS2 is a Chinese character as defined in CNS
* 11643-plane-2, until another SS2designation
* appears
-* (Meaning <ESC>N must preceed every 2 byte
+* (Meaning <ESC>N must precede every 2 byte
* sequence.)
*
* ESC $ + I Indicates the immediate two bytes following SS3
* is a Chinese character as defined in CNS
* 11643-plane-3, until another SS3designation
* appears
-* (Meaning <ESC>O must preceed every 2 byte
+* (Meaning <ESC>O must precede every 2 byte
* sequence.)
*
* ESC $ + J Indicates the immediate two bytes following SS3
* is a Chinese character as defined in CNS
* 11643-plane-4, until another SS3designation
* appears
-* (In English: <ESC>O must preceed every 2 byte
+* (In English: <ESC>O must precede every 2 byte
* sequence.)
*
* ESC $ + K Indicates the immediate two bytes following SS3
* If this function is not set, then ucnv_cbFromUWriteSub() writes
* the substitution character from UConverter.
* For stateful converters, it is typically necessary to handle this
- * specificially for the converter in order to properly maintain the state.
+ * specifically for the converter in order to properly maintain the state.
*/
typedef void (*UConverterWriteSub) (UConverterFromUnicodeArgs *pArgs, int32_t offsetIndex, UErrorCode *pErrorCode);
*
* ucnv_imp.h:
* Contains all internal and external data structure definitions
-* Created & Maitained by Bertrand A. Damiba
+* Created & Maintained by Bertrand A. Damiba
*
*
*
A) The optimization group
B) The locale group
C) The last group that succeeded with this string.
- D) every other group that's relevent (single or double)
+ D) every other group that's relevant (single or double)
E) If its single-byte ambiguous, try the exceptions group
4. And as a grand fallback: Unicode
}
}
- /* we have a translation. increment source and write as much as posible to target */
+ /* we have a translation. increment source and write as much as possible to target */
args->source++;
pLMBCS = LMBCS;
while (args->target < args->targetLimit && bytes_written--)
NULL
};
-/* The 1232 CCSID refers to any version of Unicode with any endianess of UTF-32 */
+/* The 1232 CCSID refers to any version of Unicode with any endianness of UTF-32 */
static const UConverterStaticData _UTF32BEStaticData = {
sizeof(UConverterStaticData),
"UTF-32BE",
NULL
};
-/* The 1232 CCSID refers to any version of Unicode with any endianess of UTF-32 */
+/* The 1232 CCSID refers to any version of Unicode with any endianness of UTF-32 */
static const UConverterStaticData _UTF32LEStaticData = {
sizeof(UConverterStaticData),
"UTF-32LE",
NULL
};
-/* The 1236 CCSID refers to any version of Unicode with a BOM sensitive endianess of UTF-32 */
+/* The 1236 CCSID refers to any version of Unicode with a BOM sensitive endianness of UTF-32 */
static const UConverterStaticData _UTF32StaticData = {
sizeof(UConverterStaticData),
"UTF-32",
MaskEnum currentMaskToUnicode; /* mask for current state in toUnicode */
MaskEnum defMaskToUnicode; /* mask for default state in toUnicode */
UBool isFirstBuffer; /* boolean for fromUnicode to see if we need to announce the first script */
- UBool resetToDefaultToUnicode; /* boolean for reseting to default delta and mask when a newline is encountered*/
+ UBool resetToDefaultToUnicode; /* boolean for resetting to default delta and mask when a newline is encountered*/
char name[sizeof(ISCII_CNV_PREFIX) + 1];
UChar32 prevToUnicodeStatus; /* Hold the previous toUnicodeStatus. This is necessary because we may need to know the last two code points. */
} UConverterDataISCII;
}
static const uint16_t lookupTable[][2]={
- { ZERO, ZERO }, /*DEFALT*/
+ { ZERO, ZERO }, /*DEFAULT*/
{ ZERO, ZERO }, /*ROMAN*/
{ DEVANAGARI, DEV_MASK },
{ BENGALI, BNG_MASK },
* ii) EXT : Extension code is used to declare switching to Sanskrit and for obscure,
* obsolete characters
* Pre context
- * i) Halant: if preceeded by a halant then it is a explicit halant
+ * i) Halant: if preceded by a halant then it is a explicit halant
* ii) Nukta :
- * a) if preceeded by a halant then it is a soft halant
- * b) if preceeded by specific consonants and the ligatures have pre-composed
+ * a) if preceded by a halant then it is a soft halant
+ * b) if preceded by specific consonants and the ligatures have pre-composed
* characters in Unicode then convert to pre-composed characters
- * iii) Danda: If Danda is preceeded by a Danda then convert to Double Danda
+ * iii) Danda: If Danda is preceded by a Danda then convert to Double Danda
*
*/
if (target < targetLimit) {
sourceChar = (unsigned char)*(source)++;
- /* look at the post-context preform special processing */
+ /* look at the post-context perform special processing */
if (*contextCharToUnicode==ATR) {
/* If we have ATR in *contextCharToUnicode then we need to change our
* For EUC encodings that use only either 0x8e or 0x8f as the first
* byte of their longest byte sequences, the first two bytes in
* this third stage indicate with their 7th bits whether these bytes
- * are to be written directly or actually need to be preceeded by
+ * are to be written directly or actually need to be preceded by
* one of the two Single-Shift codes. With this, the third stage
* stores one byte fewer per character than the actual maximum length of
* EUC byte sequences.
* four integers. The first is the fraction digits. The second is the
* rounding increment, or 0 if none. The rounding increment is in
* units of 10^(-fraction_digits). The third and fourth are the same
- * except that they are those used in cash transations ( cashDigits
+ * except that they are those used in cash transactions ( cashDigits
* and cashRounding ).
*/
static const int32_t*
// The 2nd round binary search search the second "B" in the text against
// the 2nd char in currency names, and narrow the matching range to
// "BB BBEX BBEXYZ" (and the maximum matching "BB").
- // The 3rd round returnes the range as "BBEX BBEXYZ" (without changing
+ // The 3rd round returns the range as "BBEX BBEXYZ" (without changing
// maximum matching).
// The 4th round returns the same range (the maximum matching is "BBEX").
// The 5th round returns no matching range.
* Stop if it is identical or empty, otherwise continue by adding a
* "jump" value (moduloing by the length again to keep it within
* range) and retesting. For efficiency, there need enough empty
- * values so that the searchs stop within a reasonable amount of time.
+ * values so that the searches stop within a reasonable amount of time.
* This can be changed by changing the high/low water marks.
*
* In theory, this function can return NULL, if it is full (no empty
if (next & EXTV) {
if (_isExtensionSubtag(pSubtag, subtagLen)) {
if (pExtValueSubtag == NULL) {
- /* if the start postion of this extension's value is not yet,
+ /* if the start position of this extension's value is not yet,
this one is the first value subtag */
pExtValueSubtag = pSubtag;
}
/**
* See if the decomposition of cp2 is at segment starting at segmentPos
- * (with canonical rearrangment!)
+ * (with canonical rearrangement!)
* If so, take the remainder, and return the equivalents
*/
//Set extract(int comp, String segment, int segmentPos, StringBuffer buffer);
/**
* A class representing a collection of resource information pertaining to a given
- * locale. A resource bundle provides a way of accessing locale- specfic information in
+ * locale. A resource bundle provides a way of accessing locale- specific information in
* a data file. You create a resource bundle that manages the resources for a given
* locale and then ask it for individual resources.
* <P>
* and handles the conversion.
*
* @param status the error code.
- * @param resultLength a ponter to receive the length, can be NULL.
+ * @param resultLength a pointer to receive the length, can be NULL.
* @return a pointer to the string, or NULL.
*
* @stable ICU 2.4
UErrorCode *pErrorCode);
/**
- * Gets the current calback function used by the converter when an illegal
+ * Gets the current callback function used by the converter when an illegal
* or invalid codepage sequence is found.
* Context pointers are always owned by the caller.
*
* fixed ratio of bytes to Unicode codes <i>units</i> for any particular Unicode encoding form.
* false is returned with the UErrorCode if error occurs or cnv is NULL.
* @param cnv The converter to be tested
- * @param status ICU error code in/out paramter
+ * @param status ICU error code in/out parameter
* @return true if the converter is fixed-width
* @stable ICU 4.8
*/
/**
* DO NOT CALL THIS FUNCTION DIRECTLY!
* This From Unicode callback skips any ILLEGAL_SEQUENCE, or
- * skips only UNASSINGED_SEQUENCE depending on the context parameter
+ * skips only UNASSIGNED_SEQUENCE depending on the context parameter
* simply ignoring those characters.
*
* @param context The function currently recognizes the callback options:
*
* @param context The function currently recognizes the callback options:
* <ul>
- * <li>UCNV_ESCAPE_ICU: Substitues the ILLEGAL SEQUENCE with the hexadecimal
+ * <li>UCNV_ESCAPE_ICU: Substitutes the ILLEGAL SEQUENCE with the hexadecimal
* representation in the format %UXXXX, e.g. "%uFFFE%u00AC%uC8FE").
* In the Event the converter doesn't support the characters {%,U}[A-F][0-9],
* it will substitute the illegal sequence with the substitution characters.
* Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as
* %UD84D%UDC56</li>
- * <li>UCNV_ESCAPE_JAVA: Substitues the ILLEGAL SEQUENCE with the hexadecimal
+ * <li>UCNV_ESCAPE_JAVA: Substitutes the ILLEGAL SEQUENCE with the hexadecimal
* representation in the format \\uXXXX, e.g. "\\uFFFE\\u00AC\\uC8FE").
* In the Event the converter doesn't support the characters {\,u}[A-F][0-9],
* it will substitute the illegal sequence with the substitution characters.
* Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as
* \\uD84D\\uDC56</li>
- * <li>UCNV_ESCAPE_C: Substitues the ILLEGAL SEQUENCE with the hexadecimal
+ * <li>UCNV_ESCAPE_C: Substitutes the ILLEGAL SEQUENCE with the hexadecimal
* representation in the format \\uXXXX, e.g. "\\uFFFE\\u00AC\\uC8FE").
* In the Event the converter doesn't support the characters {\,u,U}[A-F][0-9],
* it will substitute the illegal sequence with the substitution characters.
* Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as
* \\U00023456</li>
- * <li>UCNV_ESCAPE_XML_DEC: Substitues the ILLEGAL SEQUENCE with the decimal
+ * <li>UCNV_ESCAPE_XML_DEC: Substitutes the ILLEGAL SEQUENCE with the decimal
* representation in the format \htmlonly&#DDDDDDDD;, e.g. "&#65534;&#172;&#51454;")\endhtmlonly.
* In the Event the converter doesn't support the characters {&,#}[0-9],
* it will substitute the illegal sequence with the substitution characters.
* Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as
* &#144470; and Zero padding is ignored.</li>
- * <li>UCNV_ESCAPE_XML_HEX:Substitues the ILLEGAL SEQUENCE with the decimal
+ * <li>UCNV_ESCAPE_XML_HEX:Substitutes the ILLEGAL SEQUENCE with the decimal
* representation in the format \htmlonly&#xXXXX; e.g. "&#xFFFE;&#x00AC;&#xC8FE;")\endhtmlonly.
* In the Event the converter doesn't support the characters {&,#,x}[0-9],
* it will substitute the illegal sequence with the substitution characters.
/**
* DO NOT CALL THIS FUNCTION DIRECTLY!
* This To Unicode callback skips any ILLEGAL_SEQUENCE, or
- * skips only UNASSINGED_SEQUENCE depending on the context parameter
+ * skips only UNASSIGNED_SEQUENCE depending on the context parameter
* simply ignoring those characters.
*
* @param context The function currently recognizes the callback options:
*
*
* Warning: setAppData will set a U_USING_DEFAULT_WARNING code if
- * data with the specifed path that has already been opened, or
+ * data with the specified path that has already been opened, or
* if setAppData with the same path has already been called.
* Any such calls to setAppData will have no effect.
*
* @param target the target buffer for extraction, can be NULL
* if targetLength is 0
* @param targetCapacity the length of the target buffer
- * @param inv Signature-distinguishing paramater, use US_INV.
+ * @param inv Signature-distinguishing parameter, use US_INV.
* @return the output string length, not including the terminating NUL
* @stable ICU 3.2
*/
* \endcode
* @param src String using only invariant characters.
* @param textLength Length of src, or -1 if NUL-terminated.
- * @param inv Signature-distinguishing paramater, use US_INV.
+ * @param inv Signature-distinguishing parameter, use US_INV.
*
* @see US_INV
* @stable ICU 3.2
* possible space, without changing this object's value.
* A frozen set will not be modified.
*
- * @param set the object on which to perfrom the compact
+ * @param set the object on which to perform the compact
* @stable ICU 3.2
*/
U_CAPI void U_EXPORT2
/**
* Register a primary cache entry. A primary key is the first key to create
* a given SharedObject value. Subsequent keys whose create function
- * produce referneces to an already existing SharedObject are not primary -
+ * produce references to an already existing SharedObject are not primary -
* they can be evicted and subsequently recreated.
*
* On entry, gCacheMutex must be held.
* you to query for the real locale of the resource. For example, if you requested
* "en_US_CALIFORNIA" and only "en_US" bundle exists, "en_US" will be returned.
* For subresources, the locale where this resource comes from will be returned.
- * If fallback has occured, getLocale will reflect this.
+ * If fallback has occurred, getLocale will reflect this.
*
* This internal version avoids deprecated-warnings in ICU code.
*
*
* Scripts are chosen based on the <code>UScriptCode</code> enumeration.
* No attempt is made to combine related scripts into a single run. In
- * particular, Hiragana, Katakana, and Han characters will appear in seperate
+ * particular, Hiragana, Katakana, and Han characters will appear in separate
* runs.
* Here is an example of how to iterate over script runs:
* therefore all BMP code points precede all supplementary code points.
*
* Store each supplementary code point in 2 16-bit units,
- * simply with higher-then-lower 16-bit halfs.
+ * simply with higher-then-lower 16-bit halves.
*
* Precede the entire list with the length.
* If there are supplementary code points, then set bit 15 in the length
udata_close(dataMemory);
return FALSE;
}
- if( normUniVer < sprepUniVer && /* the Unicode version of SPREP file must be less than the Unicode Vesion of the normalization data */
- normUniVer < normCorrVer && /* the Unicode version of the NormalizationCorrections.txt file should be less than the Unicode Vesion of the normalization data */
+ if( normUniVer < sprepUniVer && /* the Unicode version of SPREP file must be less than the Unicode Version of the normalization data */
+ normUniVer < normCorrVer && /* the Unicode version of the NormalizationCorrections.txt file should be less than the Unicode Version of the normalization data */
((profile->indexes[_SPREP_OPTIONS] & _SPREP_NORMALIZATION_ON) > 0) /* normalization turned on*/
){
*errorCode = U_INVALID_FORMAT_ERROR;
length2=u_strlen(s2);
}
- /* limit1=start1+min(lenght1, length2) */
+ /* limit1=start1+min(length1, length2) */
if(length1<length2) {
lengthResult=-1;
limit1=start1+length1;
int32_t sIx = srcIx; // ix of last byte of multi-byte u8 char
// Get the full character from the UTF8 string.
- // use code derived from tbe macros in utf8.h
+ // use code derived from the macros in utf8.h
// Leaves srcIx pointing at the first byte of the UTF-8 char.
//
c=utf8_prevCharSafeBody(s8, 0, &srcIx, c, -3);
// For deep clones, make a copy of the string.
// The copied storage is owned by the newly created clone.
//
- // TODO: There is an isssue with using utext_nativeLength().
+ // TODO: There is an issue with using utext_nativeLength().
// That function is non-const in cases where the input was NUL terminated
// and the length has not yet been determined.
// This function (clone()) is const.
* position. Return the identifier, or an empty string if there
* is no identifier.
* @param str the string to parse
- * @param pos INPUT-OUPUT parameter. On INPUT, pos is the
+ * @param pos INPUT-OUTPUT parameter. On INPUT, pos is the
* first character to examine. It must be less than str.length(),
* and it must not point to a whitespace character. That is, must
* have pos < str.length() and
* position. Return the identifier, or an empty string if there
* is no identifier.
* @param str the string to parse
- * @param pos INPUT-OUPUT parameter. On INPUT, pos is the
+ * @param pos INPUT-OUTPUT parameter. On INPUT, pos is the
* first character to examine. It must be less than str.length(),
* and it must not point to a whitespace character. That is, must
* have pos < str.length(). On
int32_t i;
/* Check whether a start of line indenting is needed. Three cases:
* 1. At the start of the first line (output index == 0).
- * 2. At the start of subsequent lines (preceeding char in buffer == '\n')
+ * 2. At the start of subsequent lines (preceding char in buffer == '\n')
* 3. When preflighting buffer len (buffer capacity is exceeded), when
* a \n is output. Ideally we wouldn't do the indent until the following char
* is received, but that won't work because there's no place to remember that
default:
/* %. in format string, where . is some character not in the set
* of recognized format chars. Just output it as if % wasn't there.
- * (Covers "%%" outputing a single '%')
+ * (Covers "%%" outputting a single '%')
*/
outputChar(fmtC, outBuf, &outIx, capacity, indent);
}
}
- outputChar(0, outBuf, &outIx, capacity, indent); /* Make sure that output is null terminated */
- return outIx + 1; /* outIx + 1 because outIx does not increment when outputing final null. */
+ outputChar(0, outBuf, &outIx, capacity, indent); /* Make sure that output is null terminated */
+ return outIx + 1; /* outIx + 1 because outIx does not increment when outputting final null. */
}
U_NAMESPACE_BEGIN
-// Note these constants and the struct are only used when dealing with the fallback path for RDP sesssions.
+// Note these constants and the struct are only used when dealing with the fallback path for RDP sessions.
// This is the location of the time zones in the registry on Vista+ systems.
// See: https://docs.microsoft.com/windows/win32/api/timezoneapi/ns-timezoneapi-dynamic_time_zone_information
DISTY_FILES_SRC=$(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP)
DISTY_FILES=$(DISTY_FILES_SRC) $(DISTY_DOC_ZIP)
-# colon-equals because we watn to run this once!
+# colon-equals because we want to run this once!
EXCLUDES_FILE:=$(shell mktemp)
$(DISTY_FILE_DIR):
## Dependency rules
-## This is a start to how depdendencies could work
+## This is a start to how dependencies could work
# The commented out rules may not properly delete the file when ^C is pressed
# or the compiler fails.
-# make currently doesn't like rules with C:\\PROGRA~1\\.. in the depedency.
+# make currently doesn't like rules with C:\\PROGRA~1\\.. in the dependency.
# So system headers are ignored by ignoring \\
%.d : $(srcdir)/%.c
@echo "generating dependency information for $<"
## Copyright (c) 2003-2004, International Business Machines Corporation and
## others. All Rights Reserved.
##
-## Original contributer: Jason Gordon from NCR
+## Original contributor: Jason Gordon from NCR
## Flags for position independent code
SHAREDLIBCFLAGS = -K PIC
## Dependency rules
-## This is a start to how depdendencies could work
+## This is a start to how dependencies could work
# The commented out rules may not properly delete the file when ^C is pressed
# or the compiler fails.
-# make currently doesn't like rules with C:\\PROGRA~1\\.. in the depedency.
+# make currently doesn't like rules with C:\\PROGRA~1\\.. in the dependency.
# So system headers are ignored by ignoring \\
%.d : $(srcdir)/%.c
@echo "generating dependency information for $<"
ifeq (${OS390_XPLINK}, 1)
#SH# if [ "x$OS390_XPLINK" = "x1" ]; then
# These lines must be the last options specified.
-# GOFF is is the strategic object module format for S/390. It is required for XPLINK.
+# GOFF is the strategic object module format for S/390. It is required for XPLINK.
# NOTEMPINC could be used if ICU starts using templates.
ICU_XPLINK_C = -Wc,'xplink(backchain,storeargs),goff'
ICU_XPLINK_CXX = -Wc,'xplink(backchain,storeargs),goff' -Wc,'NOTEMPINC'
fi
fi
-# Check for miscellanous functions.
+# Check for miscellaneous functions.
# So, use for putil / tools only.
# Note that this will generate HAVE_GETTIMEOFDAY, not U_HAVE_GETTIMEOFDAY
for ac_func in gettimeofday
OLD_LIBS=${LIBS}
# For Compaq Tru64 (OSF1), we must look for pthread_attr_init
-# and must do this before seaching for pthread_mutex_destroy, or
+# and must do this before searching for pthread_mutex_destroy, or
# we will pick up libpthreads.so not libpthread.so
# If this fails, then we must test for HPUX specials, before
# moving on to a more generic test
datapackaging_dir=`eval echo $thedatadir`"/icu/${VERSION}"
-datapackaging_msg="(No explaination for mode $datapackaging.)"
+datapackaging_msg="(No explanation for mode $datapackaging.)"
datapackaging_msg_path="ICU will look in $datapackaging_dir which is the installation location. Call u_setDataDirectory() or use the ICU_DATA environment variable to override."
datapackaging_msg_set="ICU will use the linked data library. If linked with the stub library located in stubdata/, the application can use udata_setCommonData() or set a data path to override."
fi
fi
-# Check for miscellanous functions.
+# Check for miscellaneous functions.
# So, use for putil / tools only.
# Note that this will generate HAVE_GETTIMEOFDAY, not U_HAVE_GETTIMEOFDAY
AC_CHECK_FUNCS([gettimeofday])
OLD_LIBS=${LIBS}
# For Compaq Tru64 (OSF1), we must look for pthread_attr_init
-# and must do this before seaching for pthread_mutex_destroy, or
+# and must do this before searching for pthread_mutex_destroy, or
# we will pick up libpthreads.so not libpthread.so
# If this fails, then we must test for HPUX specials, before
# moving on to a more generic test
datapackaging_dir=`eval echo $thedatadir`"/icu/${VERSION}"
-datapackaging_msg="(No explaination for mode $datapackaging.)"
+datapackaging_msg="(No explanation for mode $datapackaging.)"
datapackaging_msg_path="ICU will look in $datapackaging_dir which is the installation location. Call u_setDataDirectory() or use the ICU_DATA environment variable to override."
datapackaging_msg_set="ICU will use the linked data library. If linked with the stub library located in stubdata/, the application can use udata_setCommonData() or set a data path to override."
ICUDATA_SOURCE_ARCHIVE = $(wildcard $(srcdir)/in/$(ICUDATA_PLATFORM_NAME).dat)
ifeq ($(ICUDATA_SOURCE_ARCHIVE),)
ICUDATA_ARCHIVE = $(firstword $(wildcard $(srcdir)/in/$(ICUDATA_BASENAME_VERSION)*.dat))
-# We don't have the data in the current endianess or charset.
+# We don't have the data in the current endianness or charset.
# See if we can find data of any archive type,
# and convert it to the current type.
ifneq ($(ICUDATA_ARCHIVE),)
else
ifneq ($(ENABLE_STATIC),YES)
ifeq ($(PKGDATA_MODE),common)
-# We have a source data common archive in the native endianess,
+# We have a source data common archive in the native endianness,
# and it's what we want to build. Try to not run any of ICU's tools.
ICUDATA_SOURCE_IS_NATIVE_TARGET=YES
endif
$LV = [\p{Grapheme_Cluster_Break = LV}];
$LVT = [\p{Grapheme_Cluster_Break = LVT}];
-# Emoji defintions
+# Emoji definitions
$Extended_Pict = [:ExtPict:];
-# LB 13 Don't break before ']' or '!' or or '/', even after spaces.
+# LB 13 Don't break before ']' or '!' or '/', even after spaces.
#
$LB8NonBreaks $CL;
$CAN_CM $CM* $CL;
-# LB 13 Don't break before ']' or '!' or or '/', even after spaces.
+# LB 13 Don't break before ']' or '!' or '/', even after spaces.
#
$LB8NonBreaks $CL;
$CAN_CM $CM* $CL;
-# LB 13 Don't break before ']' or '!' or or '/', even after spaces.
+# LB 13 Don't break before ']' or '!' or '/', even after spaces.
#
$LB8NonBreaks $CL;
$CAN_CM $CM* $CL;
-# LB 13 Don't break before ']' or '!' or or '/', even after spaces.
+# LB 13 Don't break before ']' or '!' or '/', even after spaces.
#
# Do not include $EXX here
$LB8NonBreaks $CL;
-# LB 13 Don't break before ']' or '!' or or '/', even after spaces.
+# LB 13 Don't break before ']' or '!' or '/', even after spaces.
#
$LB8NonBreaks $CL;
$CAN_CM $CM* $CL;
-# LB 13 Don't break before ']' or '!' or or '/', even after spaces.
+# LB 13 Don't break before ']' or '!' or '/', even after spaces.
#
$LB8NonBreaks $CL;
$CAN_CM $CM* $CL;
java-sjis_0213-1.6_P { UTR22* }
x-SJIS_0213 { JAVA* }
-# Here are various interpretations and extentions of Big5
+# Here are various interpretations and extensions of Big5
ibm-1373_P100-2002 { UTR22* } # IBM's interpretation of Windows' Taiwan Big-5 without HKSCS extensions
ibm-1373 { IBM* }
windows-950 # Alternate mapping. Leave untagged. This is the IBM interpretation of a Windows codepage.
ibm-4899_P100-1998 { UTR22* } ibm-4899 { IBM* } # Old EBCDIC Hebrew. Update of ibm-803
ibm-4971_P100-1999 { UTR22* } ibm-4971 { IBM* } # EBCDIC Greek. Update of ibm-875 and superceded by ibm-9067
ibm-9067_X100-2005 { UTR22* } ibm-9067 { IBM* } # EBCDIC Greek. Update of ibm-875 and ibm-4971
-ibm-12712_P100-1998 { UTR22* } ibm-12712 { IBM* } ebcdic-he # EBCDIC Hebrew (new sheqel, control charaters update). Update of ibm-424
+ibm-12712_P100-1998 { UTR22* } ibm-12712 { IBM* } ebcdic-he # EBCDIC Hebrew (new sheqel, control characters update). Update of ibm-424
ibm-16804_X110-1999 { UTR22* } ibm-16804 { IBM* } ebcdic-ar # EBCDIC Arabic. Update of ibm-420
java-Cp1399A-1.6_P { UTR22* } x-IBM1399A { JAVA* }
:: NFD (NFC) ;
# to do: make reversible
# define special conversion characters.
-# varients of this could use different characters, or set one or the other to null.
+# variants of this could use different characters, or set one or the other to null.
$pre = \↠;
$post = \→ ;
# Provide keyboard equivalents for common diacritics used in transliteration
$afterLetter = [:L:] [\'$accent]* ;
$beforeLetter = [\'$accent]* [:L:] ;
# Fix punctuation
-# preserve orginal
+# preserve original
\: ↔ \: $under ;
\? ↔ \? $under ;
\; ↔ \? ;
$consonant = [ਕ-ਹ];
\uE001→\u0A01; # SIGN CHANDRABINDU
#rules for BINDI
-# Anusvara is equivalent to BINDI when preceeded by a vowel
+# Anusvara is equivalent to BINDI when preceded by a vowel
$vowel{\uE002→\u0A02; # SIGN ANUSVARA (\u0A02 = SIGN BINDI)
# else is equivalent to TIPPI
$consonant{\uE002→\u0A70; # SIGN TIPPI
$lm = \uE055;# Telugu Length Mark
$ailm=\uE056;# AI Length Mark
$aulm=\uE057;# AU Length Mark
-#urdu compatibity forms
+#urdu compatibility forms
$uka=\uE058;
$ukha=\uE059;
$ugha=\uE05A;
$wse} $x → e\u0314;
$wso} $x → o\u0314;
$om} $x → ''om\u0314;
-# independent vowels when preceeded by vowels
+# independent vowels when preceded by vowels
$vowels{$waa → ''a\u0304;
$vowels{$wai → ''ai;
$vowels{$wau → ''au;
# after it. Continue with the rest of the consonants.
# -- If there is one consonant, attach to the following vowel
# -- If there are two consonants and a following vowel, attach one to the
-# preceeding vowel, and one to the following vowel.
+# preceding vowel, and one to the following vowel.
# -- If there are more than two consonants, join the first two together if you
# can: L + G =→ LG
# -- If you still end up with more than 2 consonants, insert EU after the
$lm = \uE055;# Telugu Length Mark
$ailm=\uE056;# AI Length Mark
$aulm=\uE057;# AU Length Mark
-#urdu compatibity forms
+#urdu compatibility forms
$uka=\uE058;
$ukha=\uE059;
$ugha=\uE05A;
\u0314o\u0306→$co;
\u0314e→$se;
\u0314o→$so;
-# preceeded by consonants
+# preceded by consonants
$consonants{ a\u0304→$aa;
$consonants{ ai→$ai;
$consonants{ au→$au;
ᦠ→ ' '; # U+1366 ETHIOPIC PREFACE COLON
᧠→ ' '; # U+1367 ETHIOPIC QUESTION MARK
ᨠ→ ' '; # U+1368 ETHIOPIC PARAGRAPH SEPARATOR
-# Likewise, Ethiopic numberals cannot be pronounced by these rules,
+# Likewise, Ethiopic numerals cannot be pronounced by these rules,
# so we replace them by whitespace in the output IPA notation.
# Applications will typically pre-process text before calling
# the am → am_FONIPA transform.
ѣ → ye ; # CYRILLIC SMALL LETTER YAT
#
#
-# Alternative rule where appropriate for local pronounciation. To apply
+# Alternative rule where appropriate for local pronunciation. To apply
# uncomment the following by removing the '#' mark at the start of the
# line and insert before the three rule lines above.
#
# Generated from CLDR
#
-# Tranformation from Czech to Czech in IPA transcription (cs_FONIPA).
+# Transformation from Czech to Czech in IPA transcription (cs_FONIPA).
# The transcription is not fully phonemic since we mark allophonic variations
# of /m/, /n/, /x/ and /ɦ/.
#
# Generated from CLDR
#
-# Tranforms Spanish to Mandarin Chinese. The input Spanish string must be in
+# Transforms Spanish to Mandarin Chinese. The input Spanish string must be in
# phonemic IPA transcription (es_FONIPA); the output is in Simplified Chinese.
$word_boundary = [-\ $];
$vowel = [aeijouw]; # Vowels and glides
xwi → æƒ ;
xwo → éœ ;
x → 赫 ;
-# å°” simplification pass. The idea is to drop most occurences of å°”
+# å°” simplification pass. The idea is to drop most occurrences of å°”
# corresponding to <r> (not to <l> or <ll>) from a word if there is another /l/
# sound nearby. There is a vague pattern like this in the data, but the details
# remain to be determined. At the moment, this does nothing, it just puts å°” in
# Generated from CLDR
#
-# Tranformation from Spanish to Spanish in IPA transcription (es_FONIPA).
+# Transformation from Spanish to Spanish in IPA transcription (es_FONIPA).
# Not fully phonemic, since we mark up allophonic variants of voiced stops,
# e.g. we break down /b/ into [b] and [β].
#
#
# Latin hyphen should be transliterated to U+30A0 (KATAKANA-HIRAGANA
# DOUBLE HYPHEN), ideally. But since the character isn't supported by
-# many fonts or softwares, we use U+FF1D (FULLWIDTH EQUALS SIGN),
+# many fonts or software, we use U+FF1D (FULLWIDTH EQUALS SIGN),
# which is widely used as "double hyphen".
#
\- → ï¼;
# Some online texts use U+1C7C PHAARKAA instead of U+1C7B RELAA for indicating
# long phonemes, presumably because the graphemes look similar in some fonts.
# Since phaarkaa is used for voicing ejectives and plosives (which cannot
-# be lenghtened), we rewrite phaarkaa to relaa.
+# be lengthened), we rewrite phaarkaa to relaa.
[ᱚᱟᱤᱩᱮᱳᱶᱢá±á±žá±±] [ᱹᱸᱺ]* {á±¼} → á±» ;
::null();
ᱚᱹᱻ → É”Ë ;
U_USING_FALLBACK_ERROR { "Using fallback data" }
U_USING_DEFAULT_ERROR { "Using default data" }
- U_ZERO_ERROR { "No error has occured" }
+ U_ZERO_ERROR { "No error has occurred" }
U_ILLEGAL_ARGUMENT_ERROR { "Illegal argument" }
U_MISSING_RESOURCE_ERROR { "A resource was missing" }
U_INVALID_FORMAT_ERROR { "Invalid format" }
*/
double CalendarAstronomer::getGreenwichSidereal() {
if (isINVALID(siderealTime)) {
- // See page 86 of "Practial Astronomy with your Calculator",
+ // See page 86 of "Practical Astronomy with your Calculator",
// by Peter Duffet-Smith, for details on the algorithm.
double UT = normalize(fTime/(double)HOUR_MS, 24.);
*/
CalendarAstronomer::Equatorial& CalendarAstronomer::eclipticToEquatorial(CalendarAstronomer::Equatorial& result, double eclipLong, double eclipLat)
{
- // See page 42 of "Practial Astronomy with your Calculator",
+ // See page 42 of "Practical Astronomy with your Calculator",
// by Peter Duffet-Smith, for details on the algorithm.
double obliq = eclipticObliquity();
*/
double CalendarAstronomer::getSunLongitude()
{
- // See page 86 of "Practial Astronomy with your Calculator",
+ // See page 86 of "Practical Astronomy with your Calculator",
// by Peter Duffet-Smith, for details on the algorithm.
if (isINVALID(sunLongitude)) {
*/
/*public*/ void CalendarAstronomer::getSunLongitude(double jDay, double &longitude, double &meanAnomaly)
{
- // See page 86 of "Practial Astronomy with your Calculator",
+ // See page 86 of "Practical Astronomy with your Calculator",
// by Peter Duffet-Smith, for details on the algorithm.
double day = jDay - JD_EPOCH; // Days since epoch
const CalendarAstronomer::Equatorial& CalendarAstronomer::getMoonPosition()
{
//
- // See page 142 of "Practial Astronomy with your Calculator",
+ // See page 142 of "Practical Astronomy with your Calculator",
// by Peter Duffet-Smith, for details on the algorithm.
//
if (moonPositionSet == FALSE) {
* @deprecated ICU 2.4. This class may be removed or modified.
*/
double CalendarAstronomer::getMoonAge() {
- // See page 147 of "Practial Astronomy with your Calculator",
+ // See page 147 of "Practical Astronomy with your Calculator",
// by Peter Duffet-Smith, for details on the algorithm.
//
// Force the moon's position to be calculated. We're going to use
* @deprecated ICU 2.4. This class may be removed or modified.
*/
double CalendarAstronomer::getMoonPhase() {
- // See page 147 of "Practial Astronomy with your Calculator",
+ // See page 147 of "Practical Astronomy with your Calculator",
// by Peter Duffet-Smith, for details on the algorithm.
return 0.5 * (1 - cos(getMoonAge()));
}
* longitude will have the desired value.
* <p>
* @param desired The desired longitude.
- * @param next <tt>true</tt> if the next occurrance of the phase
- * is desired, <tt>false</tt> for the previous occurrance.
+ * @param next <tt>true</tt> if the next occurrence of the phase
+ * is desired, <tt>false</tt> for the previous occurrence.
* @internal
* @deprecated ICU 2.4. This class may be removed or modified.
*/
* desired phase.
* <p>
* @param desired The desired phase of the moon.
- * @param next <tt>true</tt> if the next occurrance of the phase
- * is desired, <tt>false</tt> for the previous occurrance.
+ * @param next <tt>true</tt> if the next occurrence of the phase
+ * is desired, <tt>false</tt> for the previous occurrence.
* @internal
* @deprecated ICU 2.4. This class may be removed or modified.
*/
* longitude will have the desired value.
* <p>
* @param desired The desired longitude.
- * @param next <tt>true</tt> if the next occurrance of the phase
- * is desired, <tt>false</tt> for the previous occurrance.
+ * @param next <tt>true</tt> if the next occurrence of the phase
+ * is desired, <tt>false</tt> for the previous occurrence.
* @internal
*/
UDate getMoonTime(double desired, UBool next);
int32_t boundary;
for(boundary = bi->next(); boundary != UBRK_DONE && boundary < offsets.limit; boundary = bi->next()) {
if (boundary == 0) continue;
- // HACK: Check to see that preceeding item was a letter
+ // HACK: Check to see that preceding item was a letter
UChar32 cp = sText.char32At(boundary-1);
int type = u_charType(cp);
}
/**
- * Find the previous zone transtion near the given time.
+ * Find the previous zone transition near the given time.
*/
UBool Calendar::getImmediatePreviousZoneTransition(UDate base, UDate *transitionTime, UErrorCode& status) const {
BasicTimeZone *btz = getBasicTimeZone();
// recalculate offsets from the resolved time (non-wall).
// When the given wall time falls into skipped wall time,
// the offsets will be based on the zone offsets AFTER
- // the transition (which means, earliest possibe interpretation).
+ // the transition (which means, earliest possible interpretation).
UDate tgmt = wall - (rawOffset + dstOffset);
tz.getOffset(tgmt, FALSE, rawOffset, dstOffset, ec);
}
/**
* Get the ordering priority of the next character in the string.
* @return the next character's ordering. Returns NULLORDER if an error has
-* occured or if the end of string has been reached
+* occurred or if the end of string has been reached
*/
int32_t CollationElementIterator::next(UErrorCode& status)
{
* Get the ordering priority of the previous collation element in the string.
* @param status the error code status.
* @return the previous element's ordering. Returns NULLORDER if an error has
-* occured or if the start of string has been reached.
+* occurred or if the start of string has been reached.
*/
int32_t CollationElementIterator::previous(UErrorCode& status)
{
// ucsdet_getDetectableCharsets
UBool *enabledArray = ((Context *)en->context)->enabledRecognizers;
if (enabledArray != NULL) {
- // custome set
+ // custom set
while (currName == NULL && ((Context *)en->context)->currIndex < fCSRecognizers_size) {
if (enabledArray[((Context *)en->context)->currIndex]) {
currName = fCSRecognizers[((Context *)en->context)->currIndex]->recognizer->getName();
}
//
- // Initial quality is based on relative proportion of recongized vs.
+ // Initial quality is based on relative proportion of recognized vs.
// unrecognized escape sequences.
// All good: quality = 100;
// half or less good: quality = 0;
}
if (commonChars == 0) {
- // We have no statistics on frequently occuring characters.
+ // We have no statistics on frequently occurring characters.
// Assess confidence purely on having a reasonable number of
// multi-byte characters (the more the better)
confidence = 30 + doubleByteCharCount - 20*badCharCount;
}
} else {
//
- // Frequency of occurence statistics exist.
+ // Frequency of occurrence statistics exist.
//
double maxVal = log((double)doubleByteCharCount / 4); /*(float)?*/
}
- // Cook up some sort of confidence score, based on presense of a BOM
+ // Cook up some sort of confidence score, based on presence of a BOM
// and the existence of valid and/or invalid multi-byte sequences.
if (hasBOM && numInvalid==0) {
confidence = 100;
// Destination for data, modified via setters.
DecimalFormatSymbols& dfs;
// Boolean array of whether or not we have seen a particular symbol yet.
- // Can't simpy check fSymbols because it is pre-populated with defaults.
+ // Can't simply check fSymbols because it is pre-populated with defaults.
UBool seenSymbol[DecimalFormatSymbols::kFormatSymbolCount];
// Constructor/Destructor
/* Finally add the E-part, if needed. It will never be 0, has a
base maximum and minimum of +999999999 through -999999999, but
- could range down to -1999999998 for anormal numbers */
+ could range down to -1999999998 for abnormal numbers */
if (e!=0) {
Flag had=0; /* 1=had non-zero */
*c='E'; c++;
/* would certainly save at least one if it were made ten times */
/* bigger, too (for truncated fractions 0.100 through 0.999). */
/* However, for most practical evaluations, at least four or five */
-/* iterations will be neede -- so this would only speed up by */
+/* iterations will be needed -- so this would only speed up by */
/* 20-25% and that probably does not justify increasing the table */
/* size. */
/* */
// Let v = numerator / denominator < 10.
// Then we generate 'count' digits of d = x.xxxxx... (without the decimal point)
-// from left to right. Once 'count' digits have been produced we decide wether
+// from left to right. Once 'count' digits have been produced we decide whether
// to round up or down. Remainders of exactly .5 round upwards. Numbers such
// as 9.999999 propagate a carry all the way, and change the
// exponent (decimal_point), when rounding upwards.
// Example with max_leading_padding_zeroes_in_precision_mode = 6.
// ToPrecision(0.0000012345, 2) -> "0.0000012"
// ToPrecision(0.00000012345, 2) -> "1.2e-7"
- // Similarily the converter may add up to
+ // Similarly the converter may add up to
// max_trailing_padding_zeroes_in_precision_mode in precision mode to avoid
// returning an exponential representation. A zero added by the
// EMIT_TRAILING_ZERO_AFTER_POINT flag is counted for this limit.
// Example with decimal_in_shortest_low = -6,
// decimal_in_shortest_high = 21,
// EMIT_POSITIVE_EXPONENT_SIGN activated, and
- // EMIT_TRAILING_DECIMAL_POINT deactived:
+ // EMIT_TRAILING_DECIMAL_POINT deactivated:
// ToShortest(0.000001) -> "0.000001"
// ToShortest(0.0000001) -> "1e-7"
// ToShortest(111111111111111111111.0) -> "111111111111111110000"
// Example with max_leading_padding_zeroes_in_precision_mode = 6.
// ToPrecision(0.0000012345, 2) -> "0.0000012"
// ToPrecision(0.00000012345, 2) -> "1.2e-7"
- // Similarily the converter may add up to
+ // Similarly the converter may add up to
// max_trailing_padding_zeroes_in_precision_mode in precision mode to avoid
// returning an exponential representation. A zero added by the
// EMIT_TRAILING_ZERO_AFTER_POINT flag is counted for this limit.
// low-precision (3 digits):
// when read from input: 123
// when rounded from high precision: 124.
- // To do this we simply look at the neigbors of the correct result and see
+ // To do this we simply look at the neighbors of the correct result and see
// if they would round to the same float. If the guess is not correct we have
// to look at four values (since two different doubles could be the correct
// double).
if (U_FAILURE(status)) return;
- // Create a CalendarDataSink to process this data and the resouce bundles
+ // Create a CalendarDataSink to process this data and the resource bundles
CalendarDataSink calendarSink(status);
UResourceBundle *rb = ures_open(NULL, locale.getBaseName(), &status);
UResourceBundle *cb = ures_getByKey(rb, gCalendarTag, NULL, &status);
// -------------------------------------
// Creates a formattable object with a UnicodeString* value.
-// (adopting symantics)
+// (adopting semantics)
Formattable::Formattable(UnicodeString* stringToAdopt)
{
* Simple function for initializing a UParseError from a UnicodeString.
*
* @param pattern The pattern to copy into the parseError
- * @param pos The position in pattern where the error occured
+ * @param pos The position in pattern where the error occurred
* @param parseError The UParseError object to fill in
* @draft ICU 2.4
*/
Field *oldFields = getFieldPtr();
if (fLength + count > oldCapacity) {
if ((fLength + count) > INT32_MAX / 2) {
- // If we continue, then newCapacity will overlow int32_t in the next line.
+ // If we continue, then newCapacity will overflow int32_t in the next line.
status = U_INPUT_TOO_LONG_ERROR;
return -1;
}
* @param dom output parameter to receive day-of-month (1-based)
* @param dow output parameter to receive day-of-week (1-based, 1==Sun)
* @param doy output parameter to receive day-of-year (1-based)
- * @param mid output parameter to recieve millis-in-day
+ * @param mid output parameter to receive millis-in-day
*/
static void timeToFields(UDate time, int32_t& year, int32_t& month,
int32_t& dom, int32_t& dow, int32_t& doy, int32_t& mid);
}
//
- // Tally up the byte occurence statistics.
+ // Tally up the byte occurrence statistics.
// These are available for use by the various detectors.
//
int32_t fInputLen; // Length of the byte data in fInputBytes.
// byte frequency statistics for the input text.
// Value is percent, not absolute.
- // Value is rounded up, so zero really means zero occurences.
+ // Value is rounded up, so zero really means zero occurrences.
int16_t *fByteStats;
UBool fC1Bytes; // True if any bytes in the range 0x80 - 0x9F are in the input;false by default
char *fDeclaredEncoding;
// -------------------------------------
// Sets the new formats array and updates the array count.
-// This MessageFormat instance maks a copy of the new formats.
+// This MessageFormat instance makes a copy of the new formats.
void
MessageFormat::setFormats(const Format** newFormats,
#ifdef RBNF_DEBUG
fprintf(stderr, "<nfrs> exit\n");
#endif
- // finally, update the parse postion we were passed to point to the
+ // finally, update the parse position we were passed to point to the
// first character we didn't use, and return the result that
// corresponds to that string of characters
pos = highWaterMark;
}
if (0 == description.compare(gGreaterGreaterGreaterThan, 3)) {
- // the >>> token doesn't alter how this substituion calculates the
+ // the >>> token doesn't alter how this substitution calculates the
// values it uses for formatting and parsing, but it changes
// what's done with that value after it's obtained: >>> short-
// circuits the rule-search process and goes straight to the
* this method with delta=-3 will change the value to "1.23456".
*
* @param delta The number of magnitudes of ten to change by.
- * @return true if integer overflow occured; false otherwise.
+ * @return true if integer overflow occurred; false otherwise.
*/
bool adjustMagnitude(int32_t delta);
icu::UInitOnce gDefaultPropertiesInitOnce = U_INITONCE_INITIALIZER;
void U_CALLCONV initDefaultProperties(UErrorCode&) {
- // can't fail, uses placement new into staticly allocated space.
+ // can't fail, uses placement new into statically allocated space.
new(kRawDefaultProperties) DecimalFormatProperties(); // set to the default instance
}
*
* Mixed units are not supported, use MixedUnitLongNameHandler::forMeasureUnit.
*
- * This function uses a fillIn intead of returning a pointer, because we
+ * This function uses a fillIn instead of returning a pointer, because we
* want to fill in instances in a MemoryPool (which cannot adopt pointers it
* didn't create itself).
*
* Construct a localized MixedUnitLongNameHandler for the specified
* MeasureUnit. It must be a MIXED unit.
*
- * This function uses a fillIn intead of returning a pointer, because we
+ * This function uses a fillIn instead of returning a pointer, because we
* want to fill in instances in a MemoryPool (which cannot adopt pointers it
* didn't create itself).
*
};
/**
- * This implementation of ModifierStore adopts Modifer pointers.
+ * This implementation of ModifierStore adopts Modifier pointers.
*/
class U_I18N_API AdoptingModifierStore : public ModifierStore, public UMemory {
public:
*
* This test is needed for both NumberPropertyMapper::oldToNew and
* PatternStringUtils::propertiesToPatternString. In Java it cannot be
- * exported by NumberPropertyMapper (package provate) so it is in
+ * exported by NumberPropertyMapper (package private) so it is in
* PatternStringUtils, do the same in C.
*
* @param roundIncr
}
}
if (finalZone != NULL) {
- // Get the first occurence of final rule starts
+ // Get the first occurrence of final rule starts
UDate startTime = (UDate)finalStartMillis;
TimeZoneRule *firstFinalRule = NULL;
return name;
}
- // trim trailing portion, skipping over ommitted sections
+ // trim trailing portion, skipping over omitted sections
do { --len;} while (len > 0 && localeStr[len] != 0x005f); // underscore
while (len > 0 && localeStr[len-1] == 0x005F) --len;
}
* @param rules rules, separated by ';'
* @param direction either FORWARD or REVERSE.
* @param adoptedFilter the filter for this transliterator.
- * @param parseError Struct to recieve information on position
+ * @param parseError Struct to receive information on position
* of error if an error is encountered
* @param status Output param set to success/failure code.
* @exception IllegalArgumentException if rules are malformed
}
}
}
- // Remove the array and exit if memory allocation error occured.
+ // Remove the array and exit if memory allocation error occurred.
if (U_FAILURE(status)) {
for (int32_t n = i-1; n >= 0; n--) {
delete variables[n];
* call returns.
* @param rules rules, separated by ';'
* @param direction either FORWARD or REVERSE.
- * @param pe Struct to recieve information on position
+ * @param pe Struct to receive information on position
* of error if an error is encountered
* @param ec Output param set to success/failure code.
*/
// If the indexValue is < 0, then the first key character is
// a set, and we must use the more time-consuming
// matchesIndexValue check. In practice this happens
- // rarely, so we seldom tread this code path.
+ // rarely, so we seldom treat this code path.
TransliterationRule* r = (TransliterationRule*) ruleVector->elementAt(j);
if (r->matchesIndexValue((uint8_t)x)) {
v.addElement(r, status);
* @param text the text to be transliterated
* @param pos the position indices, which will be updated
* @param incremental if TRUE, assume new text may be inserted
- * at index.limit, and return FALSE if thre is a partial match.
+ * at index.limit, and return FALSE if there is a partial match.
* @return TRUE unless a U_PARTIAL_MATCH has been obtained,
* indicating that transliteration should stop until more text
* arrives.
* @param text the text to be transliterated
* @param index the position indices, which will be updated
* @param isIncremental if true, assume new text may be inserted
- * at index.limit, and return false if thre is a partial match.
+ * at index.limit, and return false if thrre is a partial match.
* @return true unless a U_PARTIAL_MATCH has been obtained,
* indicating that transliteration should stop until more text
* arrives.
appendOp(URX_START_CAPTURE, varsLoc);
appendOp(URX_NOP, 0);
- // On the Parentheses stack, start a new frame and add the postions
+ // On the Parentheses stack, start a new frame and add the positions
// of the two NOPs. Depending on what follows in the pattern, the
// NOPs may be changed to SAVE_STATE or JMP ops, with a target
// address of the end of the parenthesized group.
appendOp(URX_NOP, 0);
appendOp(URX_NOP, 0);
- // On the Parentheses stack, start a new frame and add the postions
+ // On the Parentheses stack, start a new frame and add the positions
// of the two NOPs.
fParenStack.push(fModeFlags, *fStatus); // Match mode state
fParenStack.push(plain, *fStatus); // Begin a new frame.
appendOp(URX_STO_SP, varLoc);
appendOp(URX_NOP, 0);
- // On the Parentheses stack, start a new frame and add the postions
+ // On the Parentheses stack, start a new frame and add the positions
// of the two NOPs. Depending on what follows in the pattern, the
// NOPs may be changed to SAVE_STATE or JMP ops, with a target
// address of the end of the parenthesized group.
appendOp(URX_NOP, 0);
appendOp(URX_NOP, 0);
- // On the Parentheses stack, start a new frame and add the postions
+ // On the Parentheses stack, start a new frame and add the positions
// of the NOPs.
fParenStack.push(fModeFlags, *fStatus); // Match mode state
fParenStack.push(lookAhead, *fStatus); // Frame type.
appendOp(URX_STATE_SAVE, 0); // dest address will be patched later.
appendOp(URX_NOP, 0);
- // On the Parentheses stack, start a new frame and add the postions
+ // On the Parentheses stack, start a new frame and add the positions
// of the StateSave and NOP.
fParenStack.push(fModeFlags, *fStatus); // Match mode state
fParenStack.push(negLookAhead, *fStatus); // Frame type
appendOp(URX_NOP, 0);
appendOp(URX_NOP, 0);
- // On the Parentheses stack, start a new frame and add the postions
+ // On the Parentheses stack, start a new frame and add the positions
// of the URX_LB_CONT and the NOP.
fParenStack.push(fModeFlags, *fStatus); // Match mode state
fParenStack.push(lookBehind, *fStatus); // Frame type
appendOp(URX_NOP, 0);
appendOp(URX_NOP, 0);
- // On the Parentheses stack, start a new frame and add the postions
+ // On the Parentheses stack, start a new frame and add the positions
// of the URX_LB_CONT and the NOP.
fParenStack.push(fModeFlags, *fStatus); // Match mode state
fParenStack.push(lookBehindN, *fStatus); // Frame type
case doIntervalInit:
// The '{' opening an interval quantifier was just scanned.
- // Init the counter varaiables that will accumulate the values as the digits
+ // Init the counter variables that will accumulate the values as the digits
// are scanned.
fIntervalLow = 0;
fIntervalUpper = -1;
appendOp(URX_NOP, 0);
appendOp(URX_NOP, 0);
- // On the Parentheses stack, start a new frame and add the postions
+ // On the Parentheses stack, start a new frame and add the positions
// of the two NOPs (a normal non-capturing () frame, except for the
- // saving of the orignal mode flags.)
+ // saving of the original mode flags.)
fParenStack.push(fModeFlags, *fStatus);
fParenStack.push(flags, *fStatus); // Frame Marker
fParenStack.push(fRXPat->fCompiledPat->size()-2, *fStatus); // The first NOP
return;
}
// Remove any strings from the set.
- // There shoudn't be any, but just in case.
+ // There shouldn't be any, but just in case.
// (Case Closure can add them; if we had a simple case closure available that
// ignored strings, that would be better.)
theSet->removeAllStrings();
UErrorCode status = U_ZERO_ERROR; // throwaway status for extracting context
// Fill in the context.
- // Note: extractBetween() pins supplied indicies to the string bounds.
+ // Note: extractBetween() pins supplied indices to the string bounds.
uprv_memset(fParseErr->preContext, 0, sizeof(fParseErr->preContext));
uprv_memset(fParseErr->postContext, 0, sizeof(fParseErr->postContext));
utext_extract(fRXPat->fPattern, fScanIndex-U_PARSE_CONTEXT_LEN+1, fScanIndex, fParseErr->preContext, U_PARSE_CONTEXT_LEN, &status);
//
// We are in free-spacing and comments mode.
// Scan through any white space and comments, until we
- // reach a significant character or the end of inut.
+ // reach a significant character or the end of input.
for (;;) {
if (c.fChar == (UChar32)-1) {
break; // End of Input
//
// Create a Unicode Set from a Unicode Property expression.
-// This is common code underlying both \p{...} ane [:...:] expressions.
+// This is common code underlying both \p{...} and [:...:] expressions.
// Includes trying the Java "properties" that aren't supported as
// normal ICU UnicodeSet properties
//
// initially scanned. Each new interval
// encountered overwrites these values.
// -1 for the upper interval value means none
- // was specified (unlimited occurences.)
+ // was specified (unlimited occurrences.)
int64_t fNameStartPos; // Starting position of a \N{NAME} name in a
// pattern, valid while remainder of name is
# ********************************************************************
#
# regexcst.pl
-# Compile the regular expression paser state table data into initialized C data.
+# Compile the regular expression parser state table data into initialized C data.
# Usage:
# cd icu4c/source/i18n
# perl regexcst.pl < regexcst.txt > regexcst.h
print "U_NAMESPACE_BEGIN\n";
#
-# Emit the constants for indicies of Unicode Sets
+# Emit the constants for indices of Unicode Sets
# Define one constant for each of the character classes encountered.
# At the same time, store the index corresponding to the set name back into hash.
#
print " rbbiLastAction};\n\n";
#
-# Emit the struct definition for transtion table elements.
+# Emit the struct definition for transition table elements.
#
print "//-------------------------------------------------------------------------------\n";
print "//\n";
# | character from the input only if 'n' appears here.
# |
# |--- Character or named character classes to test for. If the current character being scanned
-# matches, peform the actions and go to the state specified on this line.
+# matches, perform the actions and go to the state specified on this line.
# The input character is tested sequentally, in the order written. The characters and
# character classes tested for do not need to be mutually exclusive. The first match wins.
#
# Have scanned [[set]&
# Could be a '&' intersection operator, if a set follows.
# Could be the start of a '&&' operator.
-# Otherewise is a literal.
+# Otherwise is a literal.
set-set-amp:
'[' n set-open ^set-after-set doSetBeginIntersection1
'&' n set-after-op doSetIntersection2
# Have scanned [set]-
# Could be a '-' difference operator, if a [set] follows.
# Could be the start of a '--' operator.
-# Otherewise is a literal.
+# Otherwise is a literal.
set-set-dash:
'[' n set-open ^set-after-set doSetBeginDifference1
'-' n set-after-op doSetDifference2
URX_DOLLAR_M = 42, // $ in multi-line mode.
URX_CARET_M = 43, // ^ in multi-line mode.
URX_LB_START = 44, // LookBehind Start.
- // Paramater is data location
+ // Parameter is data location
URX_LB_CONT = 45, // LookBehind Continue.
// Param 0: the data location
// Param 1: The minimum length of the look-behind match
UBool inExpansion(); // True if last char returned from next() and the
// next to be returned both originated from a string
- // folding of the same code point from the orignal UText.
+ // folding of the same code point from the original UText.
private:
UText &fUText;
const UChar *fFoldChars;
UBool inExpansion(); // True if last char returned from next() and the
// next to be returned both originated from a string
- // folding of the same code point from the orignal UText.
+ // folding of the same code point from the original UText.
int64_t getIndex(); // Return the current input buffer index.
return dest;
}
- // Caller did not provide a prexisting UText.
+ // Caller did not provide a preexisting UText.
// Open a new one, and have it adopt the text buffer storage.
if (U_FAILURE(*status)) {
return NULL;
}
if (success && inputItr.inExpansion()) {
- // We otained a match by consuming part of a string obtained from
+ // We obtained a match by consuming part of a string obtained from
// case-folding a single code point of the input text.
// This does not count as an overall match.
success = FALSE;
break;
}
- // Look-behind match is good. Restore the orignal input string region,
+ // Look-behind match is good. Restore the original input string region,
// which had been truncated to pin the end of the lookbehind match to the
// position being looked-behind.
fActiveStart = fData[opValue+2];
// Look-behind expression matched, which means look-behind test as
// a whole Fails
- // Restore the orignal input string length, which had been truncated
+ // Restore the original input string length, which had been truncated
// inorder to pin the end of the lookbehind match
// to the position being looked-behind.
fActiveStart = fData[opValue+2];
}
if (success && inputItr.inExpansion()) {
- // We otained a match by consuming part of a string obtained from
+ // We obtained a match by consuming part of a string obtained from
// case-folding a single code point of the input text.
// This does not count as an overall match.
success = FALSE;
break;
}
- // Look-behind match is good. Restore the orignal input string region,
+ // Look-behind match is good. Restore the original input string region,
// which had been truncated to pin the end of the lookbehind match to the
// position being looked-behind.
fActiveStart = fData[opValue+2];
// Look-behind expression matched, which means look-behind test as
// a whole Fails
- // Restore the orignal input string length, which had been truncated
+ // Restore the original input string length, which had been truncated
// inorder to pin the end of the lookbehind match
// to the position being looked-behind.
fActiveStart = fData[opValue+2];
* month, regardless of what day of the week it is (e.g., (-2, 0) is the
* next-to-last day of the month).
* <li>If dayOfWeek is negative and dayOfWeekInMonth is positive, they specify the
- * first specified day of the week on or after the specfied day of the month.
+ * first specified day of the week on or after the specified day of the month.
* (e.g., (15, -SUNDAY) is the first Sunday after the 15th of the month
* [or the 15th itself if the 15th is a Sunday].)
* <li>If dayOfWeek and DayOfWeekInMonth are both negative, they specify the
};
// When calendar uses hebr numbering (i.e. he@calendar=hebrew),
-// offset the years within the current millenium down to 1-999
+// offset the years within the current millennium down to 1-999
static const int32_t HEBREW_CAL_CUR_MILLENIUM_START_YEAR = 5000;
static const int32_t HEBREW_CAL_CUR_MILLENIUM_END_YEAR = 6000;
//----------------------------------------------------------------------
/**
- * Return true if the given format character, occuring count
+ * Return true if the given format character, occurring count
* times, represents a numeric field.
*/
UBool SimpleDateFormat::isNumeric(UChar formatChar, int32_t count) {
continue; // Do not update p.
}
}
- // hack around oldleniency being a bit of a catch-all bucket and we're just adding support specifically for paritial matches
+ // hack around oldleniency being a bit of a catch-all bucket and we're just adding support specifically for partial matches
if(partialMatchLenient && oldLeniency) {
break;
}
// the flipping direction issue has already been handled
// in next()
// for boundary check purposes. this will ensure that the
- // next match will not preceed the current offset
+ // next match will not precede the current offset
// note search->matchedIndex will always be set to something
// in the code
m_search_->matchedIndex = position - 1;
// be valid even if we can't load the time zone UDataMemory.
ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup);
- // new can't fail below, as we use placement new into staticly allocated space.
+ // new can't fail below, as we use placement new into statically allocated space.
new(gRawGMT) SimpleTimeZone(0, UnicodeString(TRUE, GMT_ID, GMT_ID_LENGTH));
new(gRawUNKNOWN) SimpleTimeZone(0, UnicodeString(TRUE, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH));
if (result == NULL) {
U_DEBUG_TZ_MSG(("failed to load time zone with id - falling to Etc/Unknown(GMT)"));
const TimeZone& unknown = getUnknown();
- // Unknown zone uses staticly allocated memory, so creation of it can never fail due to OOM.
+ // Unknown zone uses statically allocated memory, so creation of it can never fail due to OOM.
result = unknown.clone();
}
return result;
// null, zero, empty.
// 2. CompoundRBT
// Here ID is the ID, aliasID is the idBlock, trans is the
- // contained RBT, and idSplitPoint is the offet in aliasID
+ // contained RBT, and idSplitPoint is the offset in aliasID
// where the contained RBT goes. compoundFilter is the
// compound filter, and it is _not_ owned.
// 3. Rules
* @param ID the given ID
* @param aliasReturn output param to receive TransliteratorAlias;
* should be NULL on entry
- * @param parseError Struct to recieve information on position
+ * @param parseError Struct to receive information on position
* of error if an error is encountered
* @param status Output param set to success/failure code.
*/
* Return a registered source specifier.
* @param index which specifier to return, from 0 to n-1, where
* n = countAvailableSources()
- * @param result fill-in paramter to receive the source specifier.
+ * @param result fill-in parameter to receive the source specifier.
* If index is out of range, result will be empty.
* @return reference to result
*/
* @param index which specifier to return, from 0 to n-1, where
* n = countAvailableTargets(source)
* @param source the source specifier
- * @param result fill-in paramter to receive the target specifier.
+ * @param result fill-in parameter to receive the target specifier.
* If source is invalid or if index is out of range, result will
* be empty.
* @return reference to result
* n = countAvailableVariants(source, target)
* @param source the source specifier
* @param target the target specifier
- * @param result fill-in paramter to receive the variant
+ * @param result fill-in parameter to receive the variant
* specifier. If source is invalid or if target is invalid or if
* index is out of range, result will be empty.
* @return reference to result
// If this is not the primary zone in the country,
// use the exemplar city name.
- // getExemplarLocationName should retur non-empty string
+ // getExemplarLocationName should return non-empty string
// if the time zone is associated with a region
UnicodeString city;
/**
* \file
- * \brief C API: Time zone generic names classe
+ * \brief C API: Time zone generic names classes
*/
#include "unicode/utypes.h"
return name;
}
-// Empty default implementation, to be overriden in tznames_impl.cpp.
+// Empty default implementation, to be overridden in tznames_impl.cpp.
void
TimeZoneNames::loadAllDisplayNames(UErrorCode& /*status*/) {
}
//
// ZNStringPool::adopt() Put a string into the hash, but do not copy the string data
// into the pool's storage. Used for strings from resource bundles,
-// which will perisist for the life of the zone string formatter, and
+// which will persist for the life of the zone string formatter, and
// therefore can be used directly without copying.
const UChar *ZNStringPool::adopt(const UChar * s, UErrorCode &status) {
const UChar *pooledString;
clear();
ures_getAllItemsWithFallback(zoneStrings, key, *this, localStatus);
- // Ignore errors, but propogate possible warnings.
+ // Ignore errors, but propagate possible warnings.
if (U_SUCCESS(localStatus)) {
errorCode = localStatus;
}
*/
struct CharacterNode {
// No constructor or destructor.
- // We malloc and free an uninitalized array of CharacterNode objects
+ // We malloc and free an uninitialized array of CharacterNode objects
// and clear and delete them ourselves.
void clear();
U_ALPHAINDEX_NORMAL = 0,
/**
- * Undeflow Label. The bucket with this label contains names
+ * Underflow Label. The bucket with this label contains names
* in scripts that sort before any of the bucket labels in this index.
* @stable ICU 4.8
*/
U_ALPHAINDEX_INFLOW = 2,
/**
- * Overflow Label. Te bucket with this label contains names in scripts
+ * Overflow Label. The bucket with this label contains names in scripts
* that sort after all of the bucket labels in this index.
* @stable ICU 4.8
*/
* changes will be ignored, except either of them is zero.
* For example, a transition from rawoffset 3:00/dstsavings 1:00
* to rawoffset 2:00/dstsavings 2:00 is excluded from the comparison,
- * but a transtion from rawoffset 2:00/dstsavings 1:00 to
+ * but a transition from rawoffset 2:00/dstsavings 1:00 to
* rawoffset 3:00/dstsavings 0:00 is included.
* @param ec Output param to filled in with a success or an error.
* @return true if the other time zone has the equivalent transitions in the
const UnicodeString &source, int32_t sourceOffset);
/**
- * Some of the ChoiceFormat constructors do not have a UErrorCode paramater.
+ * Some of the ChoiceFormat constructors do not have a UErrorCode parameter.
* We need _some_ way to provide one for the MessagePattern constructor.
* Alternatively, the MessagePattern could be a pointer field, but that is
* not nice either.
* to reset the status, shifting pointers to either the end or the start of
* the string (reset() or setText()), or the specified position (setOffset()).
* Hence at the next call of next() or previous(), the first or last collation order,
-* or collation order at the spefcifieid position will be returned. If a change of
+* or collation order at the specified position will be returned. If a change of
* direction is done without one of these calls, the result is undefined.
* <p>
* The result of a forward iterate (next()) and reversed result of the backward
enum {
/**
- * NULLORDER indicates that an error has occured while processing
+ * NULLORDER indicates that an error has occurred while processing
* @stable ICU 2.0
*/
NULLORDER = (int32_t)0xffffffff
* Gets the ordering priority of the next character in the string.
* @param status the error code status.
* @return the next character's ordering. otherwise returns NULLORDER if an
- * error has occured or if the end of string has been reached
+ * error has occurred or if the end of string has been reached
* @stable ICU 2.0
*/
int32_t next(UErrorCode& status);
* Get the ordering priority of the previous collation element in the string.
* @param status the error code status.
* @return the previous element's ordering. otherwise returns NULLORDER if an
- * error has occured or if the start of string has been reached
+ * error has occurred or if the start of string has been reached
* @stable ICU 2.0
*/
int32_t previous(UErrorCode& status);
* statfieldPositionus.getEndIndex will be set to 0 and 4, respectively.
* <P> Notice
* that if the same time field appears more than once in a pattern, the status will
- * be set for the first occurence of that time field. For instance,
+ * be set for the first occurrence of that time field. For instance,
* formatting a UDate to the time string "1 PM PDT (Pacific Daylight Time)"
* using the pattern "h a z (zzzz)" and the alignment field
* DateFormat::TIMEZONE_FIELD, the offsets fieldPosition.beginIndex and
* fieldPosition.getEndIndex will be set to 5 and 8, respectively, for the first
- * occurence of the timezone pattern character 'z'.
+ * occurrence of the timezone pattern character 'z'.
*
* @param cal Calendar set to the date and time to be formatted
* into a date/time string. When the calendar type is
* statfieldPositionus.getEndIndex will be set to 0 and 4, respectively.
* <P> Notice
* that if the same time field appears more than once in a pattern, the status will
- * be set for the first occurence of that time field. For instance,
+ * be set for the first occurrence of that time field. For instance,
* formatting a UDate to the time string "1 PM PDT (Pacific Daylight Time)"
* using the pattern "h a z (zzzz)" and the alignment field
* DateFormat::TIMEZONE_FIELD, the offsets fieldPosition.beginIndex and
* fieldPosition.getEndIndex will be set to 5 and 8, respectively, for the first
- * occurence of the timezone pattern character 'z'.
+ * occurrence of the timezone pattern character 'z'.
*
* @param date UDate to be formatted into a date/time string.
* @param appendTo Output parameter to receive result.
*
* @param symbol Constant to indicate a number format symbol.
* @param value value of the format symbol
- * @param propogateDigits If false, setting the zero digit will not automatically set 1-9.
+ * @param propagateDigits If false, setting the zero digit will not automatically set 1-9.
* The default behavior is to automatically set 1-9 if zero is being set and the value
* it is being set to corresponds to a known Unicode zero digit.
* @stable ICU 2.0
*/
- void setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits);
+ void setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propagateDigits);
#ifndef U_HIDE_INTERNAL_API
/**
* This means a minimum of 2 integer digits, 1 fraction digit, and
* a maximum of 2 fraction digits.
* <pre>
- * . Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.
+ * . Example: "#,#00.0#;(#,#00.0#)" for negatives in parentheses.
* </pre>
* In negative patterns, the minimum and maximum counts are ignored;
* these are presumed to be set in the positive pattern.
*
* @param pattern The pattern to be applied.
- * @param parseError Struct to recieve information on position
+ * @param parseError Struct to receive information on position
* of error if an error is encountered
* @param status Output param set to success/failure code on
* exit. If the pattern is invalid, this will be
* This means a minimum of 2 integer digits, 1 fraction digit, and
* a maximum of 2 fraction digits.
*
- * Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.
+ * Example: "#,#00.0#;(#,#00.0#)" for negatives in parentheses.
*
* In negative patterns, the minimum and maximum counts are ignored;
* these are presumed to be set in the positive pattern.
*
* @param pattern The localized pattern to be applied.
- * @param parseError Struct to recieve information on position
+ * @param parseError Struct to receive information on position
* of error if an error is encountered
* @param status Output param set to success/failure code on
* exit. If the pattern is invalid, this will be
/**
* Sets timezone strings. These strings are stored in a 2-dimensional array.
* <p><b>Note:</b> SimpleDateFormat no longer use the zone strings stored in
- * a DateFormatSymbols. Therefore, the time zone strings set by this mthod
+ * a DateFormatSymbols. Therefore, the time zone strings set by this method
* have no effects in an instance of SimpleDateFormat for formatting time
* zones.
* @param strings The timezone strings as a 2-d array to be copied. (not adopted; caller retains ownership)
* Whether the first date in interval pattern is later date or not.
* Fallback format set the default ordering.
* And for a particular interval pattern, the order can be
- * overriden by prefixing the interval pattern with "latestFirst:" or
+ * overridden by prefixing the interval pattern with "latestFirst:" or
* "earliestFirst:"
* For example, given 2 date, Jan 10, 2007 to Feb 10, 2007.
* if the fallback format is "{0} - {1}",
* <P>
* For power users, who want to create their own date interval patterns,
* or want to re-set date interval patterns, they could do so by
- * directly creating DateIntervalInfo and manupulating it.
+ * directly creating DateIntervalInfo and manipulating it.
*
* <P>
* Logically, the interval patterns are mappings
* the first date in the interval pattern for this locale is earlier date.
* If the fallback format is "{1} - {0}", it means the first date is the
* later date.
- * For a particular interval pattern, the default order can be overriden
+ * For a particular interval pattern, the default order can be overridden
* by prefixing "latestFirst:" or "earliestFirst:" to the interval pattern.
* For example, if the fallback format is "{0}-{1}",
* but for skeleton "yMMMd", the interval pattern when day is different is
/**
* Adds a pattern to the generator. If the pattern has the same skeleton as
* an existing pattern, and the override parameter is set, then the previous
- * value is overriden. Otherwise, the previous value is retained. In either
+ * value is overridden. Otherwise, the previous value is retained. In either
* case, the conflicting status is set and previous vale is stored in
* conflicting pattern.
* <p>
enum DateRuleType {
DOM = 0, /**< The exact day of month,
for example, March 11. */
- DOW, /**< The Nth occurence of the day of week,
+ DOW, /**< The Nth occurrence of the day of week,
for example, 2nd Sunday in March. */
- DOW_GEQ_DOM, /**< The first occurence of the day of week on or after the day of monnth,
+ DOW_GEQ_DOM, /**< The first occurrence of the day of week on or after the day of monnth,
for example, first Sunday on or after March 8. */
- DOW_LEQ_DOM /**< The last occurence of the day of week on or before the day of month,
+ DOW_LEQ_DOM /**< The last occurrence of the day of week on or before the day of month,
for example, first Sunday on or before March 14. */
};
int32_t millisInDay, TimeRuleType timeType);
/**
- * Constructs a <code>DateTimeRule</code> by the day of week and its oridinal
+ * Constructs a <code>DateTimeRule</code> by the day of week and its ordinal
* number and the time rule. The date rule type for an instance created
* by this constructor is <code>DOW</code>.
*
int32_t getRuleDayOfWeek(void) const;
/**
- * Gets the ordinal number of the occurence of the day of week
+ * Gets the ordinal number of the occurrence of the day of week
* in the month. When the date rule type is not <code>DOW</code>,
* the value is always 0.
* @return The rule day of week ordinal number in the month.
/**
* Gets the double value of this object. If this object is of type
- * long, int64 or Decimal Number then a conversion is peformed, with
+ * long, int64 or Decimal Number then a conversion is performed, with
* possible loss of precision. If the type is kObject and the
* object is a Measure, then the result of
* getNumber().getDouble(status) is returned. If this object is
* as appropriate, is returned and the status is set to
* U_INVALID_FORMAT_ERROR. If this object is of type kInt64 and
* it fits within a long, then no precision is lost. If it is of
- * type kDouble, then a conversion is peformed, with
+ * type kDouble, then a conversion is performed, with
* truncation of any fractional part. If the type is kObject and
* the object is a Measure, then the result of
* getNumber().getLong(status) is returned. If this object is
* the maximum or minimum int64 value, as appropriate, is returned
* and the status is set to U_INVALID_FORMAT_ERROR. If the
* magnitude fits in an int64, then a casting conversion is
- * peformed, with truncation of any fractional part. If the type
+ * performed, with truncation of any fractional part. If the type
* is kObject and the object is a Measure, then the result of
* getNumber().getDouble(status) is returned. If this object is
* neither a numeric type nor a Measure, then 0 is returned and
* the full precision and range of the original input, unconstrained by
* the limits of a double floating point or a 64 bit int.
*
- * This function is not thread safe, and therfore is not declared const,
+ * This function is not thread safe, and therefore is not declared const,
* even though it is logically const.
*
* Possible errors include U_MEMORY_ALLOCATION_ERROR, and
* 0xFFFD is returned.
* <P>
* If there is no match when parsing, a parse failure UErrorCode is
- * retured for methods which take no ParsePosition. For the method
+ * returned for methods which take no ParsePosition. For the method
* that takes a ParsePosition, the index parameter is left unchanged.
* <P>
* <em>User subclasses are not supported.</em> While clients may write
* Simple function for initializing a UParseError from a UnicodeString.
*
* @param pattern The pattern to copy into the parseError
- * @param pos The position in pattern where the error occured
+ * @param pos The position in pattern where the error occurred
* @param parseError The UParseError object to fill in
* @stable ICU 2.4
*/
* cout << "DST_OFFSET: " << (calendar->get( UCAL_DST_OFFSET, success )/(60*60*1000)) << endl; // in hours
*
* if (U_FAILURE(success)) {
- * cout << "An error occured. success=" << u_errorName(success) << endl;
+ * cout << "An error occurred. success=" << u_errorName(success) << endl;
* }
*
* delete ids;
* arguments. If numbered, the formatName is the
* corresponding UnicodeStrings (e.g. "0", "1", "2"...).
* The returned Format object should not be deleted by the caller,
- * nor should the ponter of other object . The pointer and its
+ * nor should the pointer of other object . The pointer and its
* contents remain valid only until the next call to any method
* of this class is made with this object.
* @param formatName the name or number specifying a format
* true, the string "1234." would be parsed as the integer value
* 1234 and parsing would stop at the "." character. Of course,
* the exact format accepted by the parse operation is locale
- * dependant and determined by sub-classes of NumberFormat.
+ * dependent and determined by sub-classes of NumberFormat.
* @return true if this format will parse numbers as integers
* only.
* @stable ICU 2.0
using NumberFormat::parse;
/**
- * Parses the specfied string, beginning at the specified position, according
+ * Parses the specified string, beginning at the specified position, according
* to this formatter's rules. This will match the string against all of the
* formatter's public rule sets and return the value corresponding to the longest
* parseable substring. This function's behavior is affected by the lenient
* <p>
* <tt>SearchIterator</tt> provides an API that is similar to that of
* other text iteration classes such as <tt>BreakIterator</tt>. Using
- * this class, it is easy to scan through text looking for all occurances of
+ * this class, it is easy to scan through text looking for all occurrences of
* a given pattern. The following example uses a <tt>StringSearch</tt>
* object to find all instances of "fox" in the target string. Any other
* subclass of <tt>SearchIterator</tt> can be used in an identical
* TimeZone.createInstance() to create a TimeZone instead of creating a
* SimpleTimeZone directly with this constructor.
* <P>
- * Various types of daylight-savings time rules can be specfied by using different
+ * Various types of daylight-savings time rules can be specified by using different
* values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a
* complete explanation of how these parameters work, see the documentation for
* setStartRule().
* TimeZone.createInstance() to create a TimeZone instead of creating a
* SimpleTimeZone directly with this constructor.
* <P>
- * Various types of daylight-savings time rules can be specfied by using different
+ * Various types of daylight-savings time rules can be specified by using different
* values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a
* complete explanation of how these parameters work, see the documentation for
* setStartRule().
* TimeZone.createInstance() to create a TimeZone instead of creating a
* SimpleTimeZone directly with this constructor.
* <P>
- * Various types of daylight-savings time rules can be specfied by using different
+ * Various types of daylight-savings time rules can be specified by using different
* values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a
* complete explanation of how these parameters work, see the documentation for
* setStartRule().
* month, regardless of what day of the week it is (e.g., (-2, 0) is the
* next-to-last day of the month).</li>
* <li>If dayOfWeek is negative and dayOfWeekInMonth is positive, they specify the
- * first specified day of the week on or after the specfied day of the month.
+ * first specified day of the week on or after the specified day of the month.
* (e.g., (15, -SUNDAY) is the first Sunday after the 15th of the month
* [or the 15th itself if the 15th is a Sunday].)</li>
* <li>If dayOfWeek and DayOfWeekInMonth are both negative, they specify the
* month, regardless of what day of the week it is (e.g., (-2, 0) is the
* next-to-last day of the month).</li>
* <li>If dayOfWeek is negative and dayOfWeekInMonth is positive, they specify the
- * first specified day of the week on or after the specfied day of the month.
+ * first specified day of the week on or after the specified day of the month.
* (e.g., (15, -SUNDAY) is the first Sunday after the 15th of the month
* [or the 15th itself if the 15th is a Sunday].)</li>
* <li>If dayOfWeek and DayOfWeekInMonth are both negative, they specify the
int32_t maxDigits) const;
/**
- * Return true if the given format character, occuring count
+ * Return true if the given format character, occurring count
* times, represents a numeric field.
*/
static UBool isNumeric(char16_t formatChar, int32_t count);
*
* @param pattern the pattern string
* @param patternOffset the starting offset into the pattern text. On
- * outupt will be set the offset of the first non-literal character in the pattern
+ * output will be set the offset of the first non-literal character in the pattern
* @param text the text being parsed
* @param textOffset the starting offset into the text. On output
* will be set to the offset of the character after the match
* Parses the given custom time zone identifier
* @param id id A string of the form GMT[+-]hh:mm, GMT[+-]hhmm, or
* GMT[+-]hh.
- * @param sign Receves parsed sign, 1 for positive, -1 for negative.
+ * @param sign Receives parsed sign, 1 for positive, -1 for negative.
* @param hour Receives parsed hour field
* @param minute Receives parsed minute field
* @param second Receives parsed second field
* @param min offset minutes
* @param sec offset seconds
* @param negative sign of the offset, true for negative offset.
- * @param id Receves the format result (normalized custom ID)
+ * @param id Receives the format result (normalized custom ID)
* @return The reference to id
*/
static UnicodeString& formatCustomID(int32_t hour, int32_t min, int32_t sec,
/**
* \file
- * \brief C++ API: Tranforms text from one format to another.
+ * \brief C++ API: Transforms text from one format to another.
*/
#if !UCONFIG_NO_TRANSLITERATION
* acts a template; future calls to {@link #createInstance } with the ID
* of the registered object return clones of that object. Thus any
* object passed to <tt>registerInstance()</tt> must implement
- * <tt>clone()</tt> propertly. To register a transliterator subclass
+ * <tt>clone()</tt> properly. To register a transliterator subclass
* without instantiating it (until it is needed), users may call
* {@link #registerFactory }. In this case, the objects are
* instantiated by invoking the zero-argument public constructor of
* replacement. The cursor is the point in the text at which the
* next replacement, if any, will be applied. The cursor is usually
* placed within the replacement text; however, it can actually be
- * placed into the precending or following context by using the
+ * placed into the preceding or following context by using the
* special character '@'. Examples:
*
* <pre>
*
* @param ID a valid ID, as enumerated by <code>getAvailableIDs()</code>
* @param dir either FORWARD or REVERSE.
- * @param parseError Struct to recieve information on position
+ * @param parseError Struct to receive information on position
* of error if an error is encountered
* @param status Output param to filled in with a success or an error.
* @return A <code>Transliterator</code> object with the given ID
* Return a registered source specifier.
* @param index which specifier to return, from 0 to n-1, where
* n = countAvailableSources()
- * @param result fill-in paramter to receive the source specifier.
+ * @param result fill-in parameter to receive the source specifier.
* If index is out of range, result will be empty.
* @return reference to result
* @stable ICU 2.0
* @param index which specifier to return, from 0 to n-1, where
* n = countAvailableTargets(source)
* @param source the source specifier
- * @param result fill-in paramter to receive the target specifier.
+ * @param result fill-in parameter to receive the target specifier.
* If source is invalid or if index is out of range, result will
* be empty.
* @return reference to result
* n = countAvailableVariants(source, target)
* @param source the source specifier
* @param target the target specifier
- * @param result fill-in paramter to receive the variant
+ * @param result fill-in parameter to receive the variant
* specifier. If source is invalid or if target is invalid or if
* index is out of range, result will be empty.
* @return reference to result
* Sets the localized GMT format pattern. The pattern must contain
* a single argument {0}, for example "GMT {0}".
* @param pattern The localized GMT format pattern to be used by this object.
- * @param status Recieves the status.
+ * @param status Receives the status.
* @see #getGMTPattern
* @stable ICU 50
*/
* Sets the default parse options.
* <p><b>Note</b>: By default, an instance of <code>TimeZoneFormat</code>
* created by {@link #createInstance} has no parse options set (UTZFMT_PARSE_OPTION_NONE).
- * To specify multipe options, use bitwise flags of UTimeZoneFormatParseOption.
+ * To specify multiple options, use bitwise flags of UTimeZoneFormatParseOption.
* @see #UTimeZoneFormatParseOption
* @stable ICU 50
*/
* @param text The text contains a time zone string at the position.
* @param style The format style
* @param pos The position.
- * @param parseOptions The parse options repesented by bitwise flags of UTimeZoneFormatParseOption.
+ * @param parseOptions The parse options represented by bitwise flags of UTimeZoneFormatParseOption.
* @param timeType The output argument for receiving the time type (standard/daylight/unknown),
* or NULL if the information is not necessary.
* @return A <code>TimeZone</code>, or null if the input could not be parsed.
* Returns the time zone ID of a match at the specified index within
* the MatchInfoCollection.
* @param matches the collection of matches
- * @param idx the index withing matches
+ * @param idx the index within matches
* @param tzID receives the resolved time zone ID
* @return a reference to tzID.
*/
* UCOL_DEFAULT (set the mode according to the rules)
* @param strength The default collation strength; one of UCOL_PRIMARY, UCOL_SECONDARY,
* UCOL_TERTIARY, UCOL_IDENTICAL,UCOL_DEFAULT_STRENGTH - can be also set in the rules.
- * @param parseError A pointer to UParseError to recieve information about errors
+ * @param parseError A pointer to UParseError to receive information about errors
* occurred during parsing. This argument can currently be set
* to NULL, but at users own risk. Please provide a real structure.
* @param status A pointer to a UErrorCode to receive any errors
* The structure and the syntax of the string is defined in the "Naming collators"
* section of the users guide:
* https://unicode-org.github.io/icu/userguide/collation/concepts#collator-naming-scheme
- * Attributes are overriden by the subsequent attributes. So, for "S2_S3", final
+ * Attributes are overridden by the subsequent attributes. So, for "S2_S3", final
* strength will be 3. 3066bis locale overrides individual locale parts.
* The call to this function is equivalent to a call to ucol_open, followed by a
* series of calls to ucol_setAttribute and ucol_setVariableTop.
* instantiating collators (like out of memory or similar), this
* API will return an error if an invalid attribute or attribute/value
* combination is specified.
- * @return A pointer to a UCollator or 0 if an error occured (including an
+ * @return A pointer to a UCollator or 0 if an error occurred (including an
* invalid attribute).
* @see ucol_open
* @see ucol_setAttribute
const UChar *target, int32_t targetLength);
/**
- * Compare two UTF-8 encoded trings.
+ * Compare two UTF-8 encoded strings.
* The strings will be compared using the options already specified.
* @param coll The UCollator containing the comparison rules.
* @param sIter The source string iterator.
* A single character may contain more than one collation element.
* Note that internally a stack is used to store buffered collation elements.
* @param elems The UCollationElements containing the text.
- * @param status A pointer to a UErrorCode to receive any errors. Noteably
+ * @param status A pointer to a UErrorCode to receive any errors. Notably
* a U_BUFFER_OVERFLOW_ERROR is returned if the internal stack
* buffer has been exhausted.
* @return The previous collation elements ordering, otherwise returns
/**
* Adds a pattern to the generator. If the pattern has the same skeleton as
* an existing pattern, and the override parameter is set, then the previous
- * value is overriden. Otherwise, the previous value is retained. In either
+ * value is overridden. Otherwise, the previous value is retained. In either
* case, the conflicting status is set and previous vale is stored in
* conflicting pattern.
* <p>
* as appropriate, is returned and the status is set to
* U_INVALID_FORMAT_ERROR. If this object is of type UFMT_INT64 and
* it fits within a long, then no precision is lost. If it is of
- * type kDouble or kDecimalNumber, then a conversion is peformed, with
+ * type kDouble or kDecimalNumber, then a conversion is performed, with
* truncation of any fractional part. If the type is UFMT_OBJECT and
* the object is a Measure, then the result of
* getNumber().getLong(status) is returned. If this object is
* the maximum or minimum int64 value, as appropriate, is returned
* and the status is set to U_INVALID_FORMAT_ERROR. If the
* magnitude fits in an int64, then a casting conversion is
- * peformed, with truncation of any fractional part. If the type
+ * performed, with truncation of any fractional part. If the type
* is UFMT_OBJECT and the object is a Measure, then the result of
* getNumber().getDouble(status) is returned. If this object is
* neither a numeric type nor a Measure, then 0 is returned and
* the full precision and range of the original input, unconstrained by
* the limits of a double floating point or a 64 bit int.
*
- * This function is not thread safe, and therfore is not declared const,
+ * This function is not thread safe, and therefore is not declared const,
* even though it is logically const.
* The resulting buffer is owned by the UFormattable and is invalid if any other functions are
* called on the UFormattable.
/**
* Returns the element gives the normal business letter size, and customary units.
* The units for the numbers are always in <em>milli-meters</em>.
- * For US since 8.5 and 11 do not yeild an integral value when converted to milli-meters,
+ * For US since 8.5 and 11 do not yield an integral value when converted to milli-meters,
* the values are rounded off.
- * So for A4 size paper the height and width are 297 mm and 210 mm repectively,
+ * So for A4 size paper the height and width are 297 mm and 210 mm respectively,
* and for US letter size the height and width are 279 mm and 216 mm respectively.
* Please note that this API will change in ICU 3.6 and will use an ulocdata object.
*
* @param localeID The id of the locale for which the paper size information to be retrieved.
- * @param height A pointer to int to recieve the height information.
- * @param width A pointer to int to recieve the width information.
+ * @param height A pointer to int to receive the height information.
+ * @param width A pointer to int to receive the width information.
* @param status Must be a valid pointer to an error code value,
* which must not indicate a failure before the function call.
* @stable ICU 2.8
/**
* Return the current CLDR version used by the library.
- * @param versionArray fillin that will recieve the version number
+ * @param versionArray fill-in that will receive the version number
* @param status error code - could be U_MISSING_RESOURCE_ERROR if the version was not found.
* @stable ICU 4.2
*/
* @param patternLength Length of the pattern to use
* @param locale The locale for which the messages are formatted.
* @param parseError A pointer to UParseError struct to receive any errors
- * occured during parsing. Can be NULL.
+ * occurred during parsing. Can be NULL.
* @param status A pointer to an UErrorCode to receive any errors.
* @return A pointer to a UMessageFormat to use for formatting
* messages, or 0 if an error occurred.
// Apply SI or binary prefix to the Factor.
void applyPrefix(UMeasurePrefix unitPrefix);
- // Does an in-place substition of the "symbolic constants" based on
+ // Does an in-place substitution of the "symbolic constants" based on
// constantExponents (resetting the exponents).
//
// In ICU4J, see UnitConverter.Factor.getConversionRate().
*
* NOTE:
* the output units and their limits will be extracted from the units preferences database by knowing
- * the followings:
+ * the following:
* - input unit
* - locale
* - usage
uregex_reset(regexp2, 0, status);
- // Note: Seperate error code variables for findNext() and appendReplacement()
+ // Note: Separate error code variables for findNext() and appendReplacement()
// are used so that destination buffer overflow errors
// in appendReplacement won't stop findNext() from working.
// appendReplacement() and appendTail() special case incoming buffer
}
//
- // Validate all paramters
+ // Validate all parameters
//
if (validateRE(regexp, TRUE, status) == FALSE) {
return 0;
return NULL;
}
-// miscellanous methods --------------------------------------------------
+// miscellaneous methods --------------------------------------------------
U_CAPI int32_t U_EXPORT2 usearch_first(UStringSearch *strsrch,
UErrorCode *status)
}
else {
// for boundary check purposes. this will ensure that the
- // next match will not preceed the current offset
+ // next match will not precede the current offset
// note search->matchedIndex will always be set to something
// in the code
search->matchedIndex = offset - 1;
// 2. An int64_t CE weight is determined for each resulting unit (high 16 bits are primary strength, next
// 16 bits are secondary, next 16 (the high 16 bits of the low 32-bit half) are tertiary. Any of these
// fields that are for strengths below that of the collator are set to 0. If this makes the int64_t
- // CE weight 0 (as for a combining diacritic with secondary weight when the collator strentgh is primary),
+ // CE weight 0 (as for a combining diacritic with secondary weight when the collator strength is primary),
// then the CE is deleted, so the following code sees only CEs that are relevant.
// For each CE, the lowIndex and highIndex correspond to where this CE begins and ends in the original text.
// If lowIndex==highIndex, either the CE resulted from an expansion/decomposition of one of the original text
#endif
// Input parameter sanity check.
- // TODO: should input indicies clip to the text length
+ // TODO: should input indices clip to the text length
// in the same way that UText does.
if(strsrch->pattern.cesLength == 0 ||
startIdx < 0 ||
// and for definitions of the types (single, whole, mixed-script) of confusables.
// We only care about a few of the check flags. Ignore the others.
- // If no tests relavant to this function have been specified, return an error.
+ // If no tests relevant to this function have been specified, return an error.
// TODO: is this really the right thing to do? It's probably an error on the caller's part,
// but logically we would just return 0 (no error).
if ((This->fChecks & USPOOF_CONFUSABLE) == 0) {
gNfdNormalizer->normalize(id, nfdText, *status);
int32_t nfdLength = nfdText.length();
- // scan for more than one occurence of the same non-spacing mark
+ // scan for more than one occurrence of the same non-spacing mark
// in a sequence of non-spacing marks.
int32_t i;
UChar32 c;
// Add an entry to the key and value tables being built
// input: data from SLTable, MATable, etc.
- // outut: entry added to fKeyVec and fValueVec
+ // output: entry added to fKeyVec and fValueVec
void addKeyEntry(UChar32 keyChar, // The key character
UHashtable *table, // The table, one of SATable, MATable, etc.
int32_t tableFlag, // One of USPOOF_SA_TABLE_FLAG, etc.
U_NAMESPACE_BEGIN
-// The maximium length (in UTF-16 UChars) of the skeleton replacement string resulting from
+// The maximum length (in UTF-16 UChars) of the skeleton replacement string resulting from
// a single input code point. This is function of the unicode.org data.
#define USPOOF_MAX_SKELETON_EXPANSION 20
// Get the confusable skeleton transform for a single code point.
// The result is a string with a length between 1 and 18 as of Unicode 9.
// This is the main public endpoint for this class.
- // @return The length in UTF-16 code units of the substition string.
+ // @return The length in UTF-16 code units of the substitution string.
int32_t confusableLookup(UChar32 inChar, UnicodeString &dest) const;
// Get the number of confusable entries in this SpoofData.
#define isContinuation(CE) (((CE) & UCOL_CONTINUATION_MARKER) == UCOL_CONTINUATION_MARKER)
/**
- * This indicates an error has occured during processing or there are no more CEs
+ * This indicates an error has occurred during processing or there are no more CEs
* to be returned.
*/
#define UCOL_PROCESSED_NULLORDER ((int64_t)U_INT64_MAX)
* @param ixHigh a pointer to an int32_t to receive the iterator index after fetching the CE.
* @param status A pointer to an UErrorCode to receive any errors.
* @return The next collation elements ordering, otherwise returns UCOL_PROCESSED_NULLORDER
- * if an error has occured or if the end of string has been reached
+ * if an error has occurred or if the end of string has been reached
*/
int64_t nextProcessed(int32_t *ixLow, int32_t *ixHigh, UErrorCode *status);
/**
*
* @param ixLow A pointer to an int32_t to receive the iterator index after fetching the CE
* @param ixHigh A pointer to an int32_t to receiver the iterator index before fetching the CE
- * @param status A pointer to an UErrorCode to receive any errors. Noteably
+ * @param status A pointer to an UErrorCode to receive any errors. Notably
* a U_BUFFER_OVERFLOW_ERROR is returned if the internal stack
* buffer has been exhausted.
* @return The previous collation elements ordering, otherwise returns
- * UCOL_PROCESSED_NULLORDER if an error has occured or if the start of
+ * UCOL_PROCESSED_NULLORDER if an error has occurred or if the start of
* string has been reached.
*/
int64_t previousProcessed(int32_t *ixLow, int32_t *ixHigh, UErrorCode *status);
break;
}
if (str.charAt(8) != 0x0054) {
- // charcter "T" must be used for separating date and time
+ // character "T" must be used for separating date and time
break;
}
if (length == 16) {
goto unsupportedRRule;
}
}
- // If ealier month, go through days to find the earliest day
+ // If earlier month, go through days to find the earliest day
if (tmp_month == earliestMonth) {
for (j = 0; j < tmp_daysCount; j++) {
tmp_days[j] = tmp_days[j] > 0 ? tmp_days[j] : MONTHLENGTH[tmp_month] + tmp_days[j] + 1;
}
/*
- * Minumum implementations of stream writer/reader, writing/reading
+ * Minimum implementations of stream writer/reader, writing/reading
* UnicodeString. For now, we do not want to introduce the dependency
* on the ICU I/O stream in this module. But we want to keep the code
* equivalent to the ICU4J implementation, which utilizes java.io.Writer/
if (startAvail && actualStart < firstStart) {
// save from offset information for the earliest rule
firstStart = actualStart;
- // If this is STD, assume the time before this transtion
+ // If this is STD, assume the time before this transition
// is DST when the difference is 1 hour. This might not be
// accurate, but VTIMEZONE data does not have such info.
if (dstSavings > 0) {
writeZonePropsByDOW(writer, isDst, zonename, fromOffset, toOffset,
month, -1*((MONTHLENGTH[month] - dayOfMonth)/7 + 1), dayOfWeek, startTime, untilTime, status);
} else if (month == UCAL_FEBRUARY && dayOfMonth == 29) {
- // Specical case for February
+ // Special case for February
writeZonePropsByDOW(writer, isDst, zonename, fromOffset, toOffset,
UCAL_FEBRUARY, -1, dayOfWeek, startTime, untilTime, status);
} else {
# Location of the executables before "make install" is used
BINDIR=$(top_builddir)/bin
-# Defined here so that it can be overriden by mh-mingw*.
+# Defined here so that it can be overridden by mh-mingw*.
# For MinGW/MSYS2 we want the DLLs to go into the bin location.
MINGW_MOVEDLLSTOBINDIR = NO
* <p>This API provides an stdio-like API wrapper around ICU's other
* formatting and parsing APIs. It is meant to ease the transition of adding
* Unicode support to a preexisting applications using stdio. The following
- * is a small list of noticable differences between stdio and ICU I/O's
+ * is a small list of noticeable differences between stdio and ICU I/O's
* ustdio implementation.</p>
*
* <ul>
* and parse output. If this parameter is NULL, the default locale will
* be used.
* @param codepage The codepage in which data will be written to and
- * read from the file. If this paramter is NULL the system default codepage
+ * read from the file. If this parameter is NULL the system default codepage
* will be used.
* @return A new UFILE, or NULL if an error occurred.
* @stable ICU 3.0
* and parse output. If this parameter is NULL, the default locale will
* be used.
* @param codepage The codepage in which data will be written to and
- * read from the file. If this paramter is NULL the system default codepage
+ * read from the file. If this parameter is NULL the system default codepage
* will be used.
* @return A new UFILE, or NULL if an error occurred.
* @stable ICU 54
* and parse output. If this parameter is NULL, the default locale will
* be used.
* @param codepage The codepage in which data will be written to and
- * read from the file. If this paramter is NULL, data will be written and
+ * read from the file. If this parameter is NULL, data will be written and
* read using the default codepage for <TT>locale</TT>, unless <TT>locale</TT>
* is NULL, in which case the system default codepage will be used.
* @return A new UFILE, or NULL if an error occurred.
* and parse output. If this parameter is NULL, the default locale will
* be used.
* @param codepage The codepage in which data will be written to and
- * read from the file. If this paramter is NULL, data will be written and
+ * read from the file. If this parameter is NULL, data will be written and
* read using the default codepage for <TT>locale</TT>, unless <TT>locale</TT>
* is NULL, in which case the system default codepage will be used.
* @return A new UFILE, or NULL if an error occurred. If an error occurs
* Unget a UChar from a UFILE.
* If this function is not the first to operate on <TT>f</TT> after a call
* to <TT>u_fgetc</TT>, the results are undefined.
- * If this function is passed a character that was not recieved from the
+ * If this function is passed a character that was not received from the
* previous <TT>u_fgetc</TT> or <TT>u_fgetcx</TT> call, the results are undefined.
* @param c The UChar to put back on the stream.
* @param f The UFILE to receive <TT>c</TT>.
* @param fontRuns a pointer to a <code>FontRuns</code> object representing the font runs.
*
* @param levelRuns is a pointer to a <code>ValueRuns</code> object representing the directional levels.
- * If this pointer in <code>NULL</code> the levels will be determined by running the Unicde
+ * If this pointer in <code>NULL</code> the levels will be determined by running the Unicode
* Bidi algorithm.
*
* @param scriptRuns is a pointer to a <code>ValueRuns</code> object representing script runs.
/**
* The destructor. Virtual so that it works correctly with
- * sublcasses.
+ * subclasses.
*
* @stable ICU 3.2
*/
* @param fontRuns a pointer to a <code>pl_fontRuns</code> object representing the font runs.
*
* @param levelRuns is a pointer to a <code>pl_valueRuns</code> object representing the directional levels.
- * If this pointer in <code>NULL</code> the levels will be determined by running the Unicde
+ * If this pointer in <code>NULL</code> the levels will be determined by running the Unicode
* Bidi algorithm.
*
* @param scriptRuns is a pointer to a <code>pl_valueRuns</code> object representing script runs.
// The font name table is full. Since there can
// only be scriptCodeCount fonts in use at once,
// there should be at least one that's not being
- // referenced; find it and resue it's index.
+ // referenced; find it and reuse it's index.
for (index = 0; index < fFontCount; index += 1) {
le_int32 script;
/**
* This method maps a single character to a glyph index, using the
- * font's charcter to glyph map.
+ * font's character to glyph map.
*
* @param ch - the character
*
* Encode a difference -0x10ffff..0x10ffff in 1..4 bytes
* and return a packed integer with them.
*
- * The encoding favors small absolut differences with short encodings
+ * The encoding favors small absolute differences with short encodings
* to compress runs of same-script characters.
*
* @param diff difference value -0x10ffff..0x10ffff
UCollator * someClonedCollators [CLONETEST_COLLATOR_COUNT];
UCollator * col;
UErrorCode err = U_ZERO_ERROR;
- int8_t idx = 6; /* Leave this here to test buffer alingment in memory*/
+ int8_t idx = 6; /* Leave this here to test buffer alignment in memory*/
uint8_t buffer [CLONETEST_COLLATOR_COUNT] [U_COL_SAFECLONE_BUFFERSIZE];
int32_t bufferSize = U_COL_SAFECLONE_BUFFERSIZE;
const char sampleRuleChars[] = "&Z < CH";
return;
}
/* this here, my friends, is either pure lunacy or something so obsolete that even it's mother
- * doesn't care about it. Essentialy, this test complains if secondary values for 'I' and '_'
+ * doesn't care about it. Essentially, this test complains if secondary values for 'I' and '_'
* are the same. According to the UCA, this is not true. Therefore, remove the test.
* Besides, if primary strengths for two code points are different, it doesn't matter one bit
* what is the relation between secondary or any other strengths.
int32_t imageSize;
if((coll==NULL)||(U_FAILURE(status))) {
- log_data_err("could not load collators or error occured: %s\n",
+ log_data_err("could not load collators or error occurred: %s\n",
u_errorName(status));
return;
}
UCA = ucol_open("root", &status);
if((UCA==NULL)||(U_FAILURE(status))) {
- log_data_err("could not load UCA collator or error occured: %s\n",
+ log_data_err("could not load UCA collator or error occurred: %s\n",
u_errorName(status));
return;
}
status=U_ZERO_ERROR;
-/* ======= Test ubrk_countAvialable() and ubrk_getAvialable() */
+/* ======= Test ubrk_countAvailable() and ubrk_getAvailable() */
log_verbose("\nTesting ubrk_countAvailable() and ubrk_getAvailable()\n");
count=ubrk_countAvailable();
/* use something sensible w/o hardcoding the count */
if(count < 0){
- log_err("FAIL: Error in ubrk_countAvialable() returned %d\n", count);
+ log_err("FAIL: Error in ubrk_countAvailable() returned %d\n", count);
}
else{
- log_verbose("PASS: ubrk_countAvialable() successful returned %d\n", count);
+ log_verbose("PASS: ubrk_countAvailable() successful returned %d\n", count);
}
for(i=0;i<count;i++)
{
static void TestBreakIteratorSafeClone(void)
{
UChar text[51]; /* Keep this odd to test for 64-bit memory alignment */
- /* NOTE: This doesn't reliably force mis-alignment of following items. */
+ /* NOTE: This doesn't reliably force misalignment of following items. */
uint8_t buffer [CLONETEST_ITERATOR_COUNT] [U_BRK_SAFECLONE_BUFFERSIZE];
int32_t bufferSize = U_BRK_SAFECLONE_BUFFERSIZE;
pos = ubrk_first(bi);
do {
if (pos2 != pos) {
- log_err("FAIL: interator from ubrk_openBinaryRules does not match original, get pos = %d instead of %d", pos2, pos);
+ log_err("FAIL: iterator from ubrk_openBinaryRules does not match original, get pos = %d instead of %d", pos2, pos);
}
pos2 = ubrk_next(bi2);
pos = ubrk_next(bi);
/*
-* TestsBreakIteratorStatusVals() Test the ubrk_getRuleStatusVec() funciton
+* TestsBreakIteratorStatusVals() Test the ubrk_getRuleStatusVec() function
*/
static void TestBreakIteratorStatusVec() {
#define RULE_STRING_LENGTH 200
ubidi_close(pBiDi);
- log_verbose("inverse Bidi: rountrips: %5u\nnon-roundtrips: %5u\n", countRoundtrips, countNonRoundtrips);
+ log_verbose("inverse Bidi: roundtrips: %5u\nnon-roundtrips: %5u\n", countRoundtrips, countNonRoundtrips);
_testWriteReverse();
/* use something sensible w/o hardcoding the count */
if(count > 0) {
log_verbose("PASS: ucal_countAvailable() works fine\n");
- log_verbose("The no: of locales for which calendars are avilable are %d\n", count);
+ log_verbose("The no: of locales for which calendars are available are %d\n", count);
} else {
log_data_err("FAIL: Error in countAvailable()\n");
}
log_err("FAIL: there is an error in getAttributes or setAttributes\n");
else
log_verbose("PASS: attribute set and got successfully\n");
- /*set it back to orginal value */
+ /*set it back to original value */
log_verbose("Setting it back to normal\n");
ucal_setAttribute(calit, UCAL_LENIENT, count);
if(ucal_getAttribute(calit, UCAL_LENIENT)!=count)
static const UChar tzGMT[] = { 0x47,0x4D,0x54,0 }; /* "GMT" */
static const TFDItem tfdItems[] = {
- /* timezone locale start target progres yDf MDf dDf HDf mDf sDf */
+ /* timezone locale start target progress yDf MDf dDf HDf mDf sDf */
/* For these we compute the progressive difference for each field - not resetting the calendar after each call */
{ tzUSPacific, "en_US", 1267459800000.0, 1277772600000.0, TRUE, 0, 3, 27, 9, 40, 0 }, /* 2010-Mar-01 08:10 -> 2010-Jun-28 17:50 */
{ tzUSPacific, "en_US", 1267459800000.0, 1299089280000.0, TRUE, 1, 0, 1, 1, 58, 0 }, /* 2010-Mar-01 08:10 -> 2011-Mar-02 10:08 */
uenum_close(allNamesEnum);
err = U_ZERO_ERROR;
- /*Tests ucnv_getAvailableName(), getAvialableCount()*/
+ /*Tests ucnv_getAvailableName(), getAvailableCount()*/
log_verbose("Testing ucnv_countAvailable()...");
continue;
}
if(len != fromUnicodeTests[i].exp){
- log_err("Did not get the expeced output for ucnv_fromUInputConsumed.\n");
+ log_err("Did not get the expected output for ucnv_fromUInputConsumed.\n");
}
}
status = U_ZERO_ERROR;
continue;
}
if(len != toUnicodeTests[i].exp){
- log_err("Did not get the expeced output for ucnv_toUInputConsumed.\n");
+ log_err("Did not get the expected output for ucnv_toUInputConsumed.\n");
}
}
status = U_ZERO_ERROR;
log_err("FAIL: Error in parsing using udat_parse(.....) %s\n", myErrorName(status) );
}
else
- log_verbose("PASS: parsing succesful\n");
+ log_verbose("PASS: parsing successful\n");
/*format it back and check for equality */
log_err("FAIL: udat_parse(\"bad string\") passed when it should have failed\n");
}
else
- log_verbose("PASS: parsing succesful\n");
+ log_verbose("PASS: parsing successful\n");
myErrorName(status) );
}
else
- log_verbose("PASS: creating dateformat using udat_openPattern() succesful\n");
+ log_verbose("PASS: creating dateformat using udat_openPattern() successful\n");
/*Testing applyPattern and toPattern */
if(u_strcmp(myNumformat(numformat1, num), myNumformat(numformat2, num)) !=0)
log_err("FAIL: error in setNumberFormat or getNumberFormat()\n");
else
- log_verbose("PASS:setNumberFormat and getNumberFormat succesful\n");
+ log_verbose("PASS:setNumberFormat and getNumberFormat successful\n");
/*Test getNumberFormat() and adoptNumberFormat() */
log_verbose("\nTesting the get and adopt NumberFormat properties of date format\n");
if(u_strcmp(myNumformat(adoptNF, num), myNumformat(numformat2, num)) !=0)
log_err("FAIL: error in adoptNumberFormat or getNumberFormat()\n");
else
- log_verbose("PASS:adoptNumberFormat and getNumberFormat succesful\n");
+ log_verbose("PASS:adoptNumberFormat and getNumberFormat successful\n");
/*try setting the number format to another format */
numformat1=udat_getNumberFormat(def);
if(u_strcmp(myNumformat(numformat1, num), myNumformat(numformat2, num)) !=0)
log_err("FAIL: error in setNumberFormat or getNumberFormat()\n");
else
- log_verbose("PASS: setNumberFormat and getNumberFormat succesful\n");
+ log_verbose("PASS: setNumberFormat and getNumberFormat successful\n");
log_err("FAIL: Error in udat_getSymbols().... %s\n", myErrorName(status) );
}
else
- log_verbose("PASS: getSymbols succesful\n");
+ log_verbose("PASS: getSymbols successful\n");
if(u_strcmp(result, pattern)==0)
log_verbose("PASS: getSymbols retrieved the right value\n");
log_err("FAIL: error in retrieving the value using getSymbols i.e roundtrip\n");
if(u_strcmp(result, value)!=0)
- log_data_err("FAIL: Error in settting and getting symbols\n");
+ log_data_err("FAIL: Error in setting and getting symbols\n");
else
log_verbose("PASS: setSymbols successful\n");
myErrorName(status) );
}
else {
- log_verbose("PASS: creating dateformat using udat_openPattern() succesful\n");
+ log_verbose("PASS: creating dateformat using udat_openPattern() successful\n");
u_uastrcpy(pattern, "dd-MMM-yy h:mm:ss 'o''clock' a z");
fmt= udat_open(UDAT_PATTERN,UDAT_PATTERN,"en_US", NULL, 0,pattern, u_strlen(pattern), &status);
}
/**
-* Testing the discontigous contractions
+* Testing the discontiguous contractions
*/
static void TestDiscontiguos() {
const char *rulestr =
free(result);
}
-/* test for uloc_getAvialable() and uloc_countAvilable()*/
+/* test for uloc_getAvailable() and uloc_countAvailable()*/
static void TestGetAvailableLocales()
{
const char *locList;
int32_t locCount,i;
- log_verbose("Testing the no of avialable locales\n");
+ log_verbose("Testing the no of available locales\n");
locCount=uloc_countAvailable();
if (locCount == 0)
log_data_err("countAvailable() returned an empty list!\n");
}
// Test case for ICU-20370.
-// The issue shows as an Addresss Sanitizer failure.
+// The issue shows as an Address Sanitizer failure.
static void TestBug20370() {
const char *localeID = "x-privatebutreallylongtagfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar";
uint32_t lcid = uloc_getLCID(localeID);
static void TestGetLocale(void);
/**
- * additional intialization for datatables storing expected values
+ * additional initialization for datatables storing expected values
*/
static void setUpDataTable(void);
static void cleanUpDataTable(void);
doTest(coll, strA, strB, UCOL_GREATER);
}
- /* Test 4: Imbedded nulls do not terminate a string when length is specified.*/
+ /* Test 4: Embedded nulls do not terminate a string when length is specified.*/
{
static const UChar strA[] = {0x41, 0x00, 0x42, 0x00};
ucol_setVariableTop(coll, first, -1, &status);
if(U_SUCCESS(status)) {
- log_err("Invalid contraction succeded in setting variable top!\n");
+ log_err("Invalid contraction succeeded in setting variable top!\n");
}
}
}
}
-/* This test uses data suplied by Masashiko Maedera to test the implementation */
+/* This test uses data supplied by Masashiko Maedera to test the implementation */
/* JIS X 4061 collation order implementation */
static void TestNewJapanese(void) {
/* Quoted characters also will work if two quoted characters are not consecutive. */
"&\\u0071<*'\\u0077'\\u0065\\u0072 &\\u0077<<*\\u0074'\\u0079'\\u0075 &\\u0074<<<*\\u0069\\u006f'\\u0070' &'\\u006f'=*\\u0061\\u0073\\u0064",
- /* Consecutive quoted charactes do not work, because a '' will be treated as a quote character. */
+ /* Consecutive quoted characters do not work, because a '' will be treated as a quote character. */
/* "&\\u0071<*'\\u0077''\\u0065''\\u0072' &\\u0077<<*'\\u0074''\\u0079''\\u0075' &\\u0074<<<*'\\u0069''\\u006f''\\u0070' &'\\u006f'=*\\u0061\\u0073\\u0064",*/
};
ucol_getSortKey(myCollation, base, baseLen, baseKey, 256);
ucol_getSortKey(myCollation, before, beforeLen, beforeKey, 256);
if (baseKey[0] != beforeKey[0]) {
- log_err("Different lead byte for sort keys using before fule and after script reordering. base character lead byte = %02x, before character lead byte = %02x\n", baseKey[0], beforeKey[0]);
+ log_err("Different lead byte for sort keys using before rule and after script reordering. base character lead byte = %02x, before character lead byte = %02x\n", baseKey[0], beforeKey[0]);
}
ucol_close(myCollation);
#include "cintltst.h"
-/* The function used to test differnet format patterns*/
+/* The function used to test different format patterns*/
static void TestPatterns(void);
/* Test the handling of quotes*/
{
UBool fcdresult = unorm_quickCheck(datastr[count], 4, UNORM_FCD, &status);
if (U_FAILURE(status)) {
- log_data_err("unorm_quickCheck(FCD) failed: exception occured at data set %d - (Are you missing data?)\n", count);
+ log_data_err("unorm_quickCheck(FCD) failed: exception occurred at data set %d - (Are you missing data?)\n", count);
break;
}
else {
normsize += unorm_normalize(data + size, 1, UNORM_NFD, 0,
norm + normsize, 100 - normsize, &status);
if (U_FAILURE(status)) {
- log_data_err("unorm_quickCheck(FCD) failed: exception occured at data generation - (Are you missing data?)\n");
+ log_data_err("unorm_quickCheck(FCD) failed: exception occurred at data generation - (Are you missing data?)\n");
break;
}
size ++;
nfdsize = unorm_normalize(data, size, UNORM_NFD, 0,
nfd, 100, &status);
if (U_FAILURE(status)) {
- log_data_err("unorm_quickCheck(FCD) failed: exception occured at normalized data generation - (Are you missing data?)\n");
+ log_data_err("unorm_quickCheck(FCD) failed: exception occurred at normalized data generation - (Are you missing data?)\n");
}
if (nfdsize != normsize || u_memcmp(nfd, norm, nfdsize) != 0) {
if(numlocales < 0)
log_err("error in countAvailable");
else{
- log_verbose("unum_countAvialable() successful\n");
- log_verbose("The no: of locales where number formattting is applicable is %d\n", numlocales);
+ log_verbose("unum_countAvailable() successful\n");
+ log_verbose("The no: of locales where number formatting is applicable is %d\n", numlocales);
}
for(i=0;i<numlocales;i++)
{
unum_getTextAttribute(cur_fr, UNUM_NEGATIVE_SUFFIX, temp, resultlength, &status);
if(U_FAILURE(status))
{
- log_err("Failure in gettting the Text attributes of number format: %s\n", myErrorName(status));
+ log_err("Failure in getting the Text attributes of number format: %s\n", myErrorName(status));
}
unum_setTextAttribute(cur_def, UNUM_NEGATIVE_SUFFIX, temp, u_strlen(temp), &status);
if(U_FAILURE(status))
{
- log_err("Failure in gettting the Text attributes of number format: %s\n", myErrorName(status));
+ log_err("Failure in getting the Text attributes of number format: %s\n", myErrorName(status));
}
unum_getTextAttribute(cur_def, UNUM_NEGATIVE_SUFFIX, suffix, resultlength, &status);
if(U_FAILURE(status))
{
- log_err("Failure in gettting the Text attributes of number format: %s\n", myErrorName(status));
+ log_err("Failure in getting the Text attributes of number format: %s\n", myErrorName(status));
}
if(u_strcmp(suffix,temp)!=0)
log_err("Fail:Error in setTextAttribute or getTextAttribute in setting and getting suffix\n");
}
u_austrncpy(desta, dest, DESTCAPACITY);
if (strcmp(numFormatted, desta) != 0) {
- log_err("File %s, Line %d, (expected, acutal) = (\"%s\", \"%s\")\n",
+ log_err("File %s, Line %d, (expected, actual) = (\"%s\", \"%s\")\n",
__FILE__, __LINE__, numFormatted, desta);
}
if ((int32_t)strlen(numFormatted) != resultSize) {
}
u_austrncpy(desta, dest, DESTCAPACITY);
if (strcmp(numFormatted, desta) != 0) {
- log_err("File %s, Line %d, (expected, acutal) = (\"%s\", \"%s\")\n",
+ log_err("File %s, Line %d, (expected, actual) = (\"%s\", \"%s\")\n",
__FILE__, __LINE__, numFormatted, desta);
}
if (fieldPos.beginIndex != 26) { /* index of "." in formatted number */
- log_err("File %s, Line %d, (expected, acutal) = (%d, %d)\n",
+ log_err("File %s, Line %d, (expected, actual) = (%d, %d)\n",
__FILE__, __LINE__, 0, fieldPos.beginIndex);
}
if (fieldPos.endIndex != 27) {
- log_err("File %s, Line %d, (expected, acutal) = (%d, %d)\n",
+ log_err("File %s, Line %d, (expected, actual) = (%d, %d)\n",
__FILE__, __LINE__, 0, fieldPos.endIndex);
}
status = U_ZERO_ERROR;
ulen = unum_formatDouble(unum, 10.0, ubuf, kUBufMax, NULL, &status);
if ( U_FAILURE(status) ) {
- log_err("unum_formatDouble (CURRRENCY) 10.0 ulen %d fails with %s\n", ulen, u_errorName(status));
+ log_err("unum_formatDouble (CURRENCY) 10.0 ulen %d fails with %s\n", ulen, u_errorName(status));
} else if (u_strcmp(ubuf, u"$10") != 0) {
u_austrncpy(bbuf, ubuf, kUBufMax);
- log_err("unum_formatDouble (CURRRENCY) 10.0 expected \"$10\", got \"%s\"\n", bbuf);
+ log_err("unum_formatDouble (CURRENCY) 10.0 expected \"$10\", got \"%s\"\n", bbuf);
}
status = U_ZERO_ERROR;
ulen = unum_formatDouble(unum, 0.9, ubuf, kUBufMax, NULL, &status);
if ( U_FAILURE(status) ) {
- log_err("unum_formatDouble (CURRRENCY) 0.9 ulen %d fails with %s\n", ulen, u_errorName(status));
+ log_err("unum_formatDouble (CURRENCY) 0.9 ulen %d fails with %s\n", ulen, u_errorName(status));
} else if (u_strcmp(ubuf, u"$.9") != 0) {
u_austrncpy(bbuf, ubuf, kUBufMax);
- log_err("unum_formatDouble (CURRRENCY) 0.9 expected \"$.9\", got \"%s\"\n", bbuf);
+ log_err("unum_formatDouble (CURRENCY) 0.9 expected \"$.9\", got \"%s\"\n", bbuf);
}
status = U_ZERO_ERROR;
ulen = unum_formatDouble(unum, 0.0, ubuf, kUBufMax, NULL, &status);
if ( U_FAILURE(status) ) {
- log_err("unum_formatDouble (CURRRENCY) 0.0 ulen %d fails with %s\n", ulen, u_errorName(status));
+ log_err("unum_formatDouble (CURRENCY) 0.0 ulen %d fails with %s\n", ulen, u_errorName(status));
} else if (u_strcmp(ubuf, u"$0") != 0) {
u_austrncpy(bbuf, ubuf, kUBufMax);
- log_err("unum_formatDouble (CURRRENCY) 0.0 expected \"$0\", got \"%s\"\n", bbuf);
+ log_err("unum_formatDouble (CURRENCY) 0.0 expected \"$0\", got \"%s\"\n", bbuf);
}
unum_close(unum);
UCOL_GREATER,
/* test priamry > 8 */
UCOL_LESS,
- UCOL_LESS, /*Turkish translator made a primary differnce between dotted and dotless I */
+ UCOL_LESS, /*Turkish translator made a primary difference between dotted and dotless I */
UCOL_GREATER
};
uscript_closeRun(scriptRun);
/*
- * Now open an interator over the testString
+ * Now open an iterator over the testString
* using uscript_openRun and make sure that it works
*/
scriptRun = uscript_openRun(testString, stringLimit, &err);
u_memcpy(temp,dataTable[i][j], 7);
if(temp[7] != 0xA4)
- log_err("an error occured in u_memcpy()\n");
+ log_err("an error occurred in u_memcpy()\n");
if(u_memcmp(temp, dataTable[i][j], 7)!=0)
- log_err("an error occured in u_memcpy() or u_memcmp()\n");
+ log_err("an error occurred in u_memcpy() or u_memcmp()\n");
}
}
if(u_memcmp(dataTable[0][0], dataTable[1][1], 7)==0)
- log_err("an error occured in u_memcmp()\n");
+ log_err("an error occurred in u_memcmp()\n");
log_verbose("Testing u_memset()\n");
nullTemp[0] = 0;
u_memset(nullTemp, 0xa4, 7);
for (i = 0; i < 7; i++) {
if(nullTemp[i] != 0xa4) {
- log_err("an error occured in u_memset()\n");
+ log_err("an error occurred in u_memset()\n");
}
}
if(nullTemp[7] != 0) {
temp[7] = 0;
u_memcpy(temp,nullTemp, 7);
if(u_memcmp(temp, nullTemp, 7)!=0 || temp[7]!=0)
- log_err("an error occured in u_memcpy() or u_memcmp()\n");
+ log_err("an error occurred in u_memcpy() or u_memcmp()\n");
log_verbose("Testing u_memmove()\n");
}
u_memmove(temp + 1, temp, 7);
if(temp[0] != 0) {
- log_err("an error occured in u_memmove()\n");
+ log_err("an error occurred in u_memmove()\n");
}
for (i = 1; i <= 7; i++) {
if(temp[i] != (i - 1)) {
- log_err("an error occured in u_memmove()\n");
+ log_err("an error occurred in u_memmove()\n");
}
}
}
}
if(u_strcmp(dataTable[0][0], dataTable[1][1])==0)
- log_err("an error occured in u_memcmp()\n");
+ log_err("an error occurred in u_memcmp()\n");
log_verbose("testing u_strcat()\n");
i=0;
log_err("Something threw an error in u_strncmp\n");
}
if(u_strncmp(dataTable[0][0], dataTable[1][1], 7)==0)
- log_err("an error occured in u_memcmp()\n");
+ log_err("an error occurred in u_memcmp()\n");
log_verbose("Testing u_strncat\n");
u_uastrcpy(delimBuf, "q"); /* Give it a delimiter that it can't find. */
ptr = u_strtok_r(currTokenBuf, delimBuf, &state);
if (ptr == NULL || u_strcmp(ptr, temp) != 0) {
- log_err("Should have recieved the same string when there are no delimiters\n");
+ log_err("Should have received the same string when there are no delimiters\n");
}
if (u_strtok_r(NULL, delimBuf, &state) != NULL) {
log_err("Should not have found another token in a one token string\n");
*
* After updating all ibm-*.ucm files with precise fallback indicators (|0, |1, |3),
* some of these codepages failed the Euro regression test.
- * This means that the actuall mappings changed when only the preciseness of fallback
+ * This means that the actual mappings changed when only the preciseness of fallback
* mappings should have changed.
* My (Markus) suspicion is that some files got Euro sign mappings added manually,
* changing their contents compared to the NLTC (IBM Toronto codepage database) definition.
&err);
if (U_FAILURE(err))
{
- log_err("Failure Occured in ucnv_fromUChars euro roundtrip test\n");
+ log_err("Failure occurred in ucnv_fromUChars euro roundtrip test\n");
return FALSE;
}
euroBackSize = ucnv_toUChars(myConv,
(void)euroBackSize; /* Suppress set but not used warning. */
if (U_FAILURE(err))
{
- log_err("Failure Occured in ucnv_toUChars euro roundtrip test\n");
+ log_err("Failure occurred in ucnv_toUChars euro roundtrip test\n");
return FALSE;
}
if (u_strcmp(euroString, euroBack))
{
- /* log_err("%s FAILED Euro rountrip\n", myName);*/
+ /* log_err("%s FAILED Euro roundtrip\n", myName);*/
return FALSE;
}
else
{
- /* log_verbose("%s PASSED Euro rountrip\n", myName);*/
+ /* log_verbose("%s PASSED Euro roundtrip\n", myName);*/
return TRUE;
}
/*
* Test Heap Functions.
* Implemented on top of the standard malloc heap.
- * All blocks increased in size by 8 to 16 bytes, and the poiner returned to ICU is
+ * All blocks increased in size by 8 to 16 bytes, and the pointer returned to ICU is
* offset up by 8 to 16, which should cause a good heap corruption if one of our "blocks"
* ends up being freed directly, without coming through us.
* Allocations are counted, to check that ICU actually does call back to us.
/* Verify that ICU can be cleaned up and reinitialized successfully.
* Failure here usually means that some ICU service didn't clean up successfully,
- * probably because some earlier test accidently left something open. */
+ * probably because some earlier test accidentally left something open. */
ctest_resetICU();
/* Un-initialize ICU */
/*"www.\\u0021.com",*/
/*"www.\\u0024.com",*/
/*"\\u003f",*/
- /* These yeild U_IDNA_PROHIBITED_ERROR*/
+ /* These yield U_IDNA_PROHIBITED_ERROR*/
/*"\\u00CF\\u0082.com",*/
/*"\\u00CE\\u00B2\\u00C3\\u009Fss.com",*/
/*"\\u00E2\\u0098\\u00BA.com",*/
static void TestSingleByte(int32_t inputsize, int32_t outputsize);
static void TestEBCDIC_STATEFUL_Sub(int32_t inputsize, int32_t outputsize);
-/* Following will return FALSE *only* on a mismach. They will return TRUE on any other error OR success, because
+/* Following will return FALSE *only* on a mismatch. They will return TRUE on any other error OR success, because
* the error would have been emitted to log_err separately. */
UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
*
* Modification History:
* Name Date Description
-* Madhu Katragadda 06/23/2000 Tests for Conveter FallBack API and Functionality
+* Madhu Katragadda 06/23/2000 Tests for Converter FallBack API and Functionality
******************************************************************************
*/
#include <stdio.h>
(const char **)&src,
(const char *)srcLimit,
checkOffsets ? offs : NULL,
- (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */
+ (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of the source data */
&status);
} while ( (status == U_BUFFER_OVERFLOW_ERROR) || (srcLimit < realSourceEnd) ); /* while we just need another buffer */
retrievedMBCSText, UPRV_LENGTHOF(retrievedMBCSText),"ibm-950", TRUE, fromIBM950offs ))
log_err("ibm-950->u(MBCS) with Fallback did not match.\n");
- /*commented untill data table is available*/
+ /*commented until data table is available*/
log_verbose("toUnicode fallback with fallback data for MBCS\n");
{
const uint8_t IBM950input[] = {
(const char **)&src,
(const char *)srcLimit,
offs,
- doFlush, /* flush if we're at the end of hte source data */
+ doFlush, /* flush if we're at the end of the source data */
&status);
if(testReset)
ucnv_resetFromUnicode(conv);
&src,
srcLimit,
checkOffsets ? offs : NULL,
- (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */
+ (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of the source data */
&status);
/* offs += (targ-oldTarg); */
{ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0007, 0x000a, 0x000d, 0x000e, 0x000e };
#ifdef U_ENABLE_GENERIC_ISO_2022
- /* Same as UTF8, but with ^[%B preceeding */
+ /* Same as UTF8, but with ^[%B preceding */
static const const uint8_t expectedISO2022[] =
{ 0x1b, 0x25, 0x42, 0x31, 0x32, 0x33, 0x00, 0xe4, 0xb8, 0x80, 0xe4, 0xba, 0x8c, 0xe4, 0xb8, 0x89, 0x2E };
static const int32_t toISO2022Offs[] =
/* Test the condition when source >= sourceLimit */
TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
ucnv_reset(cnv);
- /*Test for the condition where source > sourcelimit after consuming the shift chracter */
+ /*Test for the condition where source > sourcelimit after consuming the shift character */
{
static const uint8_t source1[]={0x0f};
TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_INDEX_OUTOFBOUNDS_ERROR, "a character is truncated");
numNeeded = bytes_needed;
} while (status == U_BUFFER_OVERFLOW_ERROR);
if(U_FAILURE(status)){
- log_err("An error occured in ucnv_fromUChars. Error: %s", u_errorName(status));
+ log_err("An error occurred in ucnv_fromUChars. Error: %s", u_errorName(status));
return;
}
ucnv_close(conv);
static void TestBug8421(void) {
- /* Bug 8421: setTimeLimit on a regular expresssion before setting text to be matched
+ /* Bug 8421: setTimeLimit on a regular expression before setting text to be matched
* was failing.
*/
URegularExpression *re;
* File spooftest.c
*
*********************************************************************************/
-/*C API TEST for the uspoof Unicode Indentifier Spoofing and Security API */
+/*C API TEST for the uspoof Unicode Identifier Spoofing and Security API */
/**
* This is an API test for ICU spoof detection in plain C. It doesn't test very many cases, and doesn't
* try to test the full functionality. It just calls each function and verifies that it
const UChar lll_Cyrl[] = {(UChar)0x0406, (UChar)0x04C0, (UChar)0x31, 0};
-/* The skeleton transform for all of thes 'lll' lookalikes is all lower case l. */
+/* The skeleton transform for all of these 'lll' lookalikes is all lower case l. */
const UChar lll_Skel[] = {(UChar)0x6c, (UChar)0x6c, (UChar)0x6c, 0};
const UChar han_Hiragana[] = {(UChar)0x3086, (UChar)0x308A, (UChar)0x0020, (UChar)0x77F3, (UChar)0x7530, 0};
return 0;
}
if (size < 0 && myEnum) {
- log_err("FAIL: size < 0, but recieved an actual object\n");
+ log_err("FAIL: size < 0, but received an actual object\n");
return 0;
}
log_verbose("\n%s %s\n", name, standard);
return 0;
}
if (size < 0 && myEnum) {
- log_err("FAIL: size < 0, but recieved an actual object\n");
+ log_err("FAIL: size < 0, but received an actual object\n");
return 0;
}
log_verbose("\n%s %s\n", name, standard);
const CheckRange checkRanges[], int32_t countCheckRanges,
UBool dataIs32, UBool latin1Linear) {
union{
- double bogus; /* needed for aligining the storage */
+ double bogus; /* needed for aligning the storage */
uint8_t storage[32768];
} storageHolder;
UTrieGetFoldingOffset *getFoldingOffset;
if (strcmp(name, "UTF-16LE") != 0) {
- log_err("Enconding detection failure for UTF-16LE: got %s\n", name);
+ log_err("Encoding detection failure for UTF-16LE: got %s\n", name);
}
if (conf != 100) {
pInfo->dataFormat[3]==0x6c &&
pInfo->formatVersion[0]==3 )
{
- log_verbose("The data from \"%s.%s\" IS acceptable using the verifing function isAcceptable1()\n", name, type);
+ log_verbose("The data from \"%s.%s\" IS acceptable using the verifying function isAcceptable1()\n", name, type);
return TRUE;
} else {
- log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifing function isAcceptable1():-\n"
+ log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifying function isAcceptable1():-\n"
"\tsize = %d\n"
"\tisBigEndian = %d\n"
"\tcharsetFamily = %d\n"
name, type, pInfo->size, pInfo->isBigEndian, pInfo->charsetFamily, pInfo->formatVersion[0],
pInfo->dataVersion[0], pInfo->dataFormat[0], pInfo->dataFormat[1], pInfo->dataFormat[2],
pInfo->dataFormat[3]);
- log_verbose("Call another verifing function to accept the data\n");
+ log_verbose("Call another verifying function to accept the data\n");
return FALSE;
}
}
pInfo->formatVersion[0]==1 &&
pInfo->dataVersion[0]==unicodeVersion[0] )
{
- log_verbose("The data from \"%s.%s\" IS acceptable using the verifing function isAcceptable2()\n", name, type);
+ log_verbose("The data from \"%s.%s\" IS acceptable using the verifying function isAcceptable2()\n", name, type);
return TRUE;
} else {
- log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifing function isAcceptable2()\n", name, type);
+ log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifying function isAcceptable2()\n", name, type);
return FALSE;
}
pInfo->dataFormat[3]==0x74 &&
pInfo->formatVersion[0]==1 &&
pInfo->dataVersion[0]==1 ) {
- log_verbose("The data from \"%s.%s\" IS acceptable using the verifing function isAcceptable3()\n", name, type);
+ log_verbose("The data from \"%s.%s\" IS acceptable using the verifying function isAcceptable3()\n", name, type);
return TRUE;
} else {
- log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifing function isAcceptable3()\n", name, type);
+ log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifying function isAcceptable3()\n", name, type);
return FALSE;
}
pInfo->formatVersion[0]==1 &&
pInfo->dataVersion[0]==1 &&
*((int*)context) == 2 ) {
- log_verbose("The data from\"%s.%s\" IS acceptable using the verifing function isAcceptable()\n", name, type);
+ log_verbose("The data from\"%s.%s\" IS acceptable using the verifying function isAcceptable()\n", name, type);
return TRUE;
} else {
- log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifing function isAcceptable()\n", name, type);
+ log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifying function isAcceptable()\n", name, type);
return FALSE;
}
}
// whatever/.../testdata/out/testdata
// The test data puts an old (2014a) version of the time zone data there.
- // Switch ICU to the testdata version of zoneinfo64.res, which is verison 2014a.
+ // Switch ICU to the testdata version of zoneinfo64.res, which is version 2014a.
ctest_resetICU();
u_setTimeZoneFilesDirectory(testDataPath, &status);
tzDataVersion = ucal_getTZDataVersion(&status);
uset_addAllCodePoints(set, STR_ab, STR_ab_LEN);
expect(set, "ab", "def{ab}", NULL);
if (uset_containsAllCodePoints(set, STR_bc, STR_bc_LEN)){
- log_err("set should not conatin all characters of \"bc\" \n");
+ log_err("set should not contain all characters of \"bc\" \n");
}
/* [] */
search.size[offsetIndex + 1] + 1,
&status) != search.offset[offsetIndex + 1] ||
U_FAILURE(status)) {
- log_err("Error getting preceeding match at index %d\n",
+ log_err("Error getting preceding match at index %d\n",
search.offset[offsetIndex + 1] + 1);
}
}
len = usearch_getMatchedLength(search);
if(pos != -1) {
- log_err("Expected failure for strentgh = UCOL_IDENTICAL: got %d instead.\n", pos);
+ log_err("Expected failure for strength = UCOL_IDENTICAL: got %d instead.\n", pos);
}
}
/* Example: rules 1. ab>x|y
* 2. yc>z
*
- * []|eabcd start - no match, copy e to tranlated buffer
+ * []|eabcd start - no match, copy e to translated buffer
* [e]|abcd match rule 1 - copy output & adjust cursor
* [ex|y]cd match rule 2 - copy output & adjust cursor
* [exz]|d no match, copy d to transliterated buffer
# Check if already cached.
exports = item.get("exports")
if exports != None: return item
- # Calculcate recursively.
+ # Calculate recursively.
parents.append(name)
imports = set()
exports = set()
<< " CXXFLAGS=\"-fsanitize=$SANITIZE\""
<< " ./runConfigureICU ... " << std::endl
<< " where $SANITIZE is 'address' or 'memory'" << std::endl
- << "Plesae run the above step and make tests to rebuild" << std::endl;
+ << "Please run the above step and make tests to rebuild" << std::endl;
// Do not return -1 here so we will pass the unit test.
}
if (argc < 2) {
return;
}
Collator *col2 = col1->clone();
- doAssert((*col1 == *col2), "Cloned object is not equal to the orginal");
+ doAssert((*col1 == *col2), "Cloned object is not equal to the original");
UnicodeString ruleset("&9 < a, A < b, B < c, C < d, D, e, E");
RuleBasedCollator *col3 = new RuleBasedCollator(ruleset, status);
if (U_FAILURE(status)) {
}
doAssert((*col1 != *col3), "Cloned object is equal to some dummy");
*col3 = *((RuleBasedCollator*)col1);
- doAssert((*col1 == *col3), "Copied object is not equal to the orginal");
+ doAssert((*col1 == *col3), "Copied object is not equal to the original");
UCollationResult res;
UnicodeString first((UChar)0x0061);
* - creation of a CollationElementIterator object
* - == and != operators
* - iterating forward
- * - reseting the iterator index
+ * - resetting the iterator index
* - requesting the order properties(primary, secondary or tertiary)
*/
void TestElemIter(/* char* par */);
buf.remove();
buf.append((UnicodeString)"[" + cal.getType() + "] " + FIELD_NAME[f]);
- // Minumum
+ // Minimum
rangeLow = cal.getMinimum(f);
rangeHigh = cal.getGreatestMinimum(f);
if (limits[j][0] != rangeLow || limits[j][1] != rangeHigh) {
for (int32_t i=0; i < 3; ++i) {
GregorianCalendar *calendar = new GregorianCalendar(zones[i], status);
if(U_FAILURE(status)) {
- dataerrln("Couldnt' create calendar.: %s", u_errorName(status));
+ dataerrln("Couldn't create calendar.: %s", u_errorName(status));
return;
}
* desired. Using YEAR in combination with WOY is ambiguous, and
* results in the first WOY/DOW day of the year satisfying the
* given fields (there may be up to two such days). In this case,
- * it propertly resolves to Tue Dec 30 1997, which has a WOY value
+ * it properly resolves to Tue Dec 30 1997, which has a WOY value
* of 1 (for YEAR_WOY 1998) and a DOW of Tuesday, and falls in the
* _calendar_ year 1997, as specified. - aliu */
c->clear();
USet *charsToTest = uset_openPattern(test_pattern, 20, &status);
// Han ext. A, Han, Jamo, Hangul, Han Ext. B
- // i.e. all the characers we handle implicitly
+ // i.e. all the characters we handle implicitly
U_STRING_DECL(remove_pattern, "[[\\u3400-\\u9FFF][\\u1100-\\u11F9][\\uAC00-\\uD7AF][\\U00020000-\\U0002A6DF]]", 70);
U_STRING_INIT(remove_pattern, "[[\\u3400-\\u9FFF][\\u1100-\\u11F9][\\uAC00-\\uD7AF][\\U00020000-\\U0002A6DF]]", 70);
USet *charsToRemove = uset_openPattern(remove_pattern, 70, &status);
*/
/*
- * Note: This module was incldued in ICU 4.0.1 as @internal technology preview for supporting
- * Boyer-Moore string search API. For now, only SSearchTest depends on this module. I temporaly
- * moved the module from i18n directory to intltest, because we have no plan to publish this
- * as public API. (2012-12-18 yoshito)
+ * Note: This module was included in ICU 4.0.1 as @internal technology preview for supporting
+ * Boyer-Moore string search API. For now, only SSearchTest depends on this module.
+ * I temporarily moved the module from i18n directory to intltest, because we have no plan to
+ * publish this as public API. (2012-12-18 yoshito)
*/
#ifndef COLL_DATA_H
const UnicodeString *get(int32_t index) const;
/**
- * Get the number of stings in the list.
+ * Get the number of strings in the list.
*
* @return the number of strings in the list.
*/
*
* This class holds the Collator-specific data needed to
* compute the length of the shortest string that can
- * generate a partcular list of CEs.
+ * generate a particular list of CEs.
*
* <code>CollData</code> objects are quite expensive to compute. Because
* of this, they are cached. When you call <code>CollData::open</code> it
* @param ce - the CE
*
* return a <code>StringList</code> object containing all
- * the stirngs, or <code>NULL</code> if there are
+ * the strings, or <code>NULL</code> if there are
* no such strings.
*/
const StringList *getStringList(int32_t ce) const;
/**
- * Get a list of the CEs generated by a partcular stirng.
+ * Get a list of the CEs generated by a particular string.
*
* @param string - the string
*
- * @return a <code>CEList</code> object containt the CEs. You
+ * @return a <code>CEList</code> object containing the CEs. You
* must call <code>freeCEList</code> when you are finished
* using the <code>CEList</code>/
*/
dLength = ucsdet_getUChars(matches[0], decoded, testLength, &status);
if (testString.compare(decoded, dLength) != 0) {
- errln("Round-trip error for " + id + ", " + eSplit[0] + ": getUChars() didn't yeild the original string.");
+ errln("Round-trip error for " + id + ", " + eSplit[0] + ": getUChars() didn't yield the original string.");
#ifdef DEBUG_DETECT
for(int32_t i = 0; i < testLength; i += 1) {
UnicodeString &appendErrorMessage,
UErrorCode &status);
/**
- * If subclass is testing formatting with copy and assignmet, it
+ * If subclass is testing formatting with copy and assignment, it
* needs to override this method to return a newly allocated formatter.
*/
virtual UObject *newFormatter(UErrorCode &status);
case 'i': expectType = Formattable::kLong; break;
case 'l': expectType = Formattable::kInt64; break;
default:
- errln("file dcfmtest.tx, line %d: unrecongized expected type \"%s\"",
+ errln("file dcfmtest.tx, line %d: unrecognized expected type \"%s\"",
lineNum, InvariantStringPiece(expectedType).data());
return;
}
}
dfFrench->format(testDate, out);
- logln((UnicodeString)"Date Formated with French Locale " + out);
+ logln((UnicodeString)"Date Formatted with French Locale " + out);
if (!(out == expectedFRENCH))
errln((UnicodeString)"FAIL: Expected " + expectedFRENCH);
out.truncate(0);
dfUS->format(testDate, out);
- logln((UnicodeString)"Date Formated with US Locale " + out);
+ logln((UnicodeString)"Date Formatted with US Locale " + out);
if (!(out == expectedUS))
errln((UnicodeString)"FAIL: Expected " + expectedUS);
delete dfUS;
// Set calendar to strict
fmt->setCalendarLenient(FALSE);
- assertFalse("isLeninent after setCalendarLenient(FALSE)", fmt->isLenient());
+ assertFalse("isLenient after setCalendarLenient(FALSE)", fmt->isLenient());
assertFalse("isCalendarLenient after setCalendarLenient(FALSE)", fmt->isCalendarLenient());
assertTrue("ALLOW_WHITESPACE after setCalendarLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
assertTrue("ALLOW_NUMERIC after setCalendarLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
// Set to strict
fmt->setLenient(FALSE);
- assertFalse("isLeninent after setLenient(FALSE)", fmt->isLenient());
+ assertFalse("isLenient after setLenient(FALSE)", fmt->isLenient());
assertFalse("isCalendarLenient after setLenient(FALSE)", fmt->isCalendarLenient());
assertFalse("ALLOW_WHITESPACE after setLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
assertFalse("ALLOW_NUMERIC after setLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
// Allow white space leniency
fmt->setBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, TRUE, status);
- assertFalse("isLeninent after ALLOW_WHITESPACE/TRUE", fmt->isLenient());
+ assertFalse("isLenient after ALLOW_WHITESPACE/TRUE", fmt->isLenient());
assertFalse("isCalendarLenient after ALLOW_WHITESPACE/TRUE", fmt->isCalendarLenient());
assertTrue("ALLOW_WHITESPACE after ALLOW_WHITESPACE/TRUE", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
assertFalse("ALLOW_NUMERIC after ALLOW_WHITESPACE/TRUE", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
assertSuccess("adoptNumberFormat singleOverrideNF", status);
fmt->adoptNumberFormat(overrideNF);
- } else if (fields == (UnicodeString) "Mo"){ // o is invlid field
+ } else if (fields == (UnicodeString) "Mo"){ // o is invalid field
fmt->adoptNumberFormat(fields, overrideNF, status);
if(status == U_INVALID_FORMAT_ERROR) {
status = U_ZERO_ERROR;
virtual void TestTwoDigitYearDSTParse(void);
public: // package
- // internal utility routine (genrates escape sequences for characters)
+ // internal utility routine (generates escape sequences for characters)
static UnicodeString& escape(UnicodeString& s);
public:
public:
/**
- * Compare two sets. In typical test usage, 'this' is the resul of
+ * Compare two sets. In typical test usage, 'this' is the result of
* a tested operation, and 'other' is the predefined expected value.
*
* @param other the set to compare against.
* If TRUE unassigned values are treated as normal Unicode code points.
* If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
* - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
- * If TRUE and the input does not statisfy STD3 rules, the operation
+ * If TRUE and the input does not satisfy STD3 rules, the operation
* will fail with U_IDNA_STD3_ASCII_RULES_ERROR
*
- * @param parseError Pointer to UParseError struct to recieve information on position
+ * @param parseError Pointer to UParseError struct to receive information on position
* of error if an error is encountered. Can be NULL.
* @param status ICU in/out error code parameter.
* U_INVALID_CHAR_FOUND if src contains
* If TRUE unassigned values are treated as normal Unicode code points.
* If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
* - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
- * If TRUE and the input does not statisfy STD3 rules, the operation
+ * If TRUE and the input does not satisfy STD3 rules, the operation
* will fail with U_IDNA_STD3_ASCII_RULES_ERROR
*
- * @param parseError Pointer to UParseError struct to recieve information on position
+ * @param parseError Pointer to UParseError struct to receive information on position
* of error if an error is encountered. Can be NULL.
* @param status ICU in/out error code parameter.
* U_INVALID_CHAR_FOUND if src contains
* If TRUE unassigned values are treated as normal Unicode code points.
* If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
* - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
- * If TRUE and the input does not statisfy STD3 rules, the operation
+ * If TRUE and the input does not satisfy STD3 rules, the operation
* will fail with U_IDNA_STD3_ASCII_RULES_ERROR
*
- * @param parseError Pointer to UParseError struct to recieve information on position
+ * @param parseError Pointer to UParseError struct to receive information on position
* of error if an error is encountered. Can be NULL.
* @param status ICU in/out error code parameter.
* U_INVALID_CHAR_FOUND if src contains
* If TRUE unassigned values are treated as normal Unicode code points.
* If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
* - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
- * If TRUE and the input does not statisfy STD3 rules, the operation
+ * If TRUE and the input does not satisfy STD3 rules, the operation
* will fail with U_IDNA_STD3_ASCII_RULES_ERROR
*
- * @param parseError Pointer to UParseError struct to recieve information on position
+ * @param parseError Pointer to UParseError struct to receive information on position
* of error if an error is encountered. Can be NULL.
* @param status ICU in/out error code parameter.
* U_INVALID_CHAR_FOUND if src contains
* If TRUE unassigned values are treated as normal Unicode code points.
* If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
* - idnaref_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
- * If TRUE and the input does not statisfy STD3 rules, the operation
+ * If TRUE and the input does not satisfy STD3 rules, the operation
* will fail with U_IDNA_STD3_ASCII_RULES_ERROR
*
* @param status ICU error code in/out parameter.
logln("Parsed OK: " + expected);
}
- CHECK(status, "Error occured testing Persian Calendar in English ");
+ CHECK(status, "Error occurred testing Persian Calendar in English ");
}
void IntlCalendarTest::TestConsistencyGregorian() {
"### IntlTest [-option1 -option2 ...] [testname1 testname2 ...] \n"
"### \n"
"### Options are: verbose (v), all (a), noerrormsg (n), \n"
- "### exhaustive (e), leaks (l), -x xmlfile.xml, prop:<propery>=<value>, \n"
+ "### exhaustive (e), leaks (l), -x xmlfile.xml, prop:<property>=<value>, \n"
"### notime (T), \n"
"### threads:<threadCount>\n"
"### (The default thread count is 12.),\n"
IntlTest();
// TestLog has a virtual destructor.
- virtual UBool runTest( char* name = NULL, char* par = NULL, char *baseName = NULL); // not to be overidden
+ virtual UBool runTest( char* name = NULL, char* par = NULL, char *baseName = NULL); // not to be overridden
virtual UBool setVerbose( UBool verbose = TRUE );
virtual UBool setNoErrMsg( UBool no_err_msg = TRUE );
const std::vector<std::string>& expected, const std::vector<std::string>& actual);
UBool assertNotEquals(const UnicodeString& message, int32_t expectedNot, int32_t actual);
- virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); // overide !
+ virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); // override !
virtual UBool runTestLoop( char* testname, char* par, char *baseName );
assertEqual(*iter1, *iter2);
}
iter1->reset();
- //now use the overloaded setText(ChracterIterator&, UErrorCode) function to set the text
+ //now use the overloaded setText(CharacterIterator&, UErrorCode) function to set the text
CharacterIterator* chariter = new StringCharacterIterator(test1);
iter2->setText(*chariter, status);
if (U_FAILURE(status))
"<<''>>", // empty string
" x<<%main>>", // first non space char not open angle bracket
"<%main>", // missing inner array
- "<<%main %other>>", // elements missing separating commma (spaces must be quoted)
+ "<<%main %other>>", // elements missing separating comma (spaces must be quoted)
"<<%main><en, Main>>", // arrays missing separating comma
"<<%main>,<en, main, foo>>", // too many elements in locale data
"<<%main>,<en>>", // too few elements in locale data
}
break;
} else {
- // Unknow test method
+ // Unknown test method
errln("Unknown test case method: There is an error in the test case data.");
break;
}
**/
void doTestDisplayNames(Locale& inLocale, int32_t compareIndex);
/**
- * additional intialization for datatables storing expected values
+ * additional initialization for datatables storing expected values
**/
void setUpDataTable(void);
ss << actual.elementAti(i) << ", ";
}
ss << value.length();
- // Turn the break points into a string for easy comparions
+ // Turn the break points into a string for easy comparison
// output.
actual_sep_str = "{" + ss.str() + "}";
} else if (key == "Output:" && !actual_sep_str.empty()) {
}
start = sep + 1;
}
- // Turn the break points into a string for easy comparions
+ // Turn the break points into a string for easy comparison
// output.
std::string expected = "{" + ss.str() + "}";
std::string utf8;
tempBuffer.remove();
tempBuffer = messageFormatter->format(params, 2, tempBuffer, pos, status);
if (tempBuffer != "Message without param" || failure(status, "messageFormat->format"))
- errln("Formatted with arguments > subsitution failed. result = " + tempBuffer);
+ errln("Formatted with arguments > substitution failed. result = " + tempBuffer);
logln("Formatted with extra params : " + tempBuffer);
//This statement gives an exception while formatting...
//If we use pattern[1] for the message with param,
* field means and how the data drive tests work, please see
* https://docs.google.com/document/d/1T2P0p953_Lh1pRwo-5CuPVrHlIBa_wcXElG-Hhg_WHM/edit?usp=sharing
* Each field is optional. That is, a certain field may be unset for a given
- * test. The UBool fields ending in "Flag" indicate whether the corrresponding
+ * test. The UBool fields ending in "Flag" indicate whether the corresponding
* field is set or not. TRUE means set; FALSE means unset. An unset field
* generally means that the corresponding setter method is not called on
* the NumberFormat object.
expectPad(fmt, "*P##.##", DecimalFormat::kPadBeforePrefix, 5, padString);
fmt.setPadCharacter((UnicodeString)"^");
expectPad(fmt, "*^#", DecimalFormat::kPadBeforePrefix, 1, (UnicodeString)"^");
- //commented untill implementation is complete
+ //commented until implementation is complete
/* fmt.setPadCharacter((UnicodeString)"^^^");
expectPad(fmt, "*^^^#", DecimalFormat::kPadBeforePrefix, 3, (UnicodeString)"^^^");
padString.remove();
//sb = new StringBuffer("");
fp.setField(0);
logln(UnicodeString(" getMaximumFractionDigits() = ") + i);
- logln(UnicodeString(" formated: ") + df->format(d, sb, fp));
+ logln(UnicodeString(" formatted: ") + df->format(d, sb, fp));
}
/*} catch (Exception foo) {
errln("Bug 4090504 regression test failed. Message : " + foo.getMessage());
* Tests all different comments.
* Response to some comments :
* [1] DecimalFormat.parse API documentation is more than just one line.
- * This is not a reproducable doc error in 116 source code.
+ * This is not a reproducible doc error in 116 source code.
* [2] See updated javadoc.
* [3] Fixed.
* [4] NumberFormat.parse(String, ParsePosition) : If parsing fails,
df->setGroupingUsed(FALSE);
UnicodeString temp;
FieldPosition pos(FieldPosition::DONT_CARE);
- logln("formated: " +
+ logln("formatted: " +
df->format(n, temp, pos));
char buf [128];
if(rb->getText() != *text2)
errln((UnicodeString)"ERROR:2 error in adoptText ");
- // Adopt where iterator range is less than the entire orignal source string.
+ // Adopt where iterator range is less than the entire original source string.
// (With the change of the break engine to working with UText internally,
// CharacterIterators starting at positions other than zero are not supported)
rb->adoptText(text3);
int32_t pos, tag;
for (pos = bi->first(); pos != BreakIterator::DONE; pos = bi->next(), i++) {
if (pos != bounds1[i]) {
- errln("%s:%d FAIL: unexpected word break at postion %d", __FILE__, __LINE__, pos);
+ errln("%s:%d FAIL: unexpected word break at position %d", __FILE__, __LINE__, pos);
break;
}
tag = bi->getRuleStatus();
// Each kind of token is recognized in its own capture group; what type of item was scanned
// is identified by which group had a match.
//
- // Caputure Group # 1 2 3 4 5
+ // Capture Group # 1 2 3 4 5
// Parses this item: divide x hex digits comment \n unrecognized \n
//
UnicodeString tokenExpr("[ \t]*(?:(\\u00F7)|(\\u00D7)|([0-9a-fA-F]+)|((?:#.*?)?$.)|(.*?$.))", -1, US_INV);
int spin = 0;
while (tokenMatcher.find()) {
if(tokenMatcher.hitEnd()) {
- /* Shouldnt Happen(TM). This means we didn't find the symbols we were looking for.
+ /* Shouldn't Happen(TM). This means we didn't find the symbols we were looking for.
This occurred when the text file was corrupt (wasn't marked as UTF-8)
and caused an infinite loop here on EBCDIC systems!
*/
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
//---------------------------------------------------------------------------------------
//
-// classs RBBIMonkeyKind
+// class RBBIMonkeyKind
//
// Monkey Test for Break Iteration
// Abstract interface class. Concrete derived classes independently
// Set the test text on which subsequent calls to next() will operate
virtual void setText(const UnicodeString &s) = 0;
- // Find the next break postion, starting from the prev break position, or from zero.
+ // Find the next break position, starting from the prev break position, or from zero.
// Return -1 after reaching end of string.
virtual int32_t next(int32_t i) = 0;
numCharClasses = mk.charClasses()->size();
chClasses = mk.charClasses();
- // Check for errors that occured during the construction of the MonkeyKind object.
- // Can't report them where they occured because errln() is a method coming from intlTest,
+ // Check for errors that occurred during the construction of the MonkeyKind object.
+ // Can't report them where they occurred because errln() is a method coming from intlTest,
// and is not visible outside of RBBITest :-(
if (U_FAILURE(mk.deferredStatus)) {
errln("status of \"%s\" in creation of RBBIMonkeyKind.", u_errorName(mk.deferredStatus));
int32_t result = bi.preceding(ruleLen);
assertEquals(WHERE, 0, result);
- // Verify that the range of rule lengths being tested cover the transations
+ // Verify that the range of rule lengths being tested cover the translations
// from 8 to 16 bit data.
bool has8BitRowData = bi.fData->fForwardTable->fFlags & RBBI_8BITS_ROWS;
bool has8BitsTrie = ucptrie_getValueWidth(bi.fData->fTrie) == UCPTRIE_VALUE_BITS_8;
}
utext_close(&ut);
- // Turn the break points into a string for easy comparions
+ // Turn the break points into a string for easy comparison
// output.
actual_sep_str = "{" + ss.str() + "}";
} else if (key == "Output:" && !actual_sep_str.empty()) {
int32_t start = 0;
int32_t curr = 0;
std::stringstream ss;
- // Incude 0 as the break point.
+ // Include 0 as the break point.
ss << "0, ";
while ((sep = input.indexOf(u'|', start)) >= 0) {
int32_t len = sep - start;
}
// Include end of the string as break point.
ss << ", " << curr + input.length() - start;
- // Turn the break points into a string for easy comparions
+ // Turn the break points into a string for easy comparison
// output.
std::string expected = "{" + ss.str() + "}";
std::string utf8;
REGEX_TESTLM("a[0-9]*b", "a123b", TRUE, TRUE);
REGEX_TESTLM("a[0-9]*b", "abc", TRUE, FALSE);
REGEX_TESTLM("[\\p{Nd}]*", "123456", TRUE, TRUE);
- REGEX_TESTLM("[\\p{Nd}]*", "a123456", TRUE, FALSE); // note that * matches 0 occurences.
+ REGEX_TESTLM("[\\p{Nd}]*", "a123456", TRUE, FALSE); // note that * matches 0 occurrences.
REGEX_TESTLM("[a][b][[:Zs:]]*", "ab ", TRUE, TRUE);
//
{
UErrorCode status = U_ZERO_ERROR;
// Enough 'a's in the string to cause the match to time out.
- // (Each on additonal 'a' doubles the time)
+ // (Each on additional 'a' doubles the time)
UnicodeString testString("aaaaaaaaaaaaaaaaaaaaa");
RegexMatcher matcher("(a+)+b", testString, 0, status);
REGEX_CHECK_STATUS;
REGEX_CHECK_STATUS;
UnicodeString result;
- // Multiple finds do NOT bump up the previous appendReplacement postion.
+ // Multiple finds do NOT bump up the previous appendReplacement position.
m.reset(s);
m.find();
m.find();
UText resultText = UTEXT_INITIALIZER;
utext_openUnicodeString(&resultText, &result, &status);
- // Multiple finds do NOT bump up the previous appendReplacement postion.
+ // Multiple finds do NOT bump up the previous appendReplacement position.
m.reset(&dataText);
m.find();
m.find();
while (perlExpr.length() > 0) {
#if !SUPPORT_MUTATING_INPUT_STRING
- // Perferred usage. Reset after any modification to input string.
+ // Preferred usage. Reset after any modification to input string.
groupsMat->reset(perlExpr);
cgMat->reset(perlExpr);
#endif
//
// At the time of this writing there are none. If any should appear in a subsequent release
// of Unicode, the code in regular expressions compilation that determines the longest
-// posssible match for a literal string will need to be enhanced.
+// possible match for a literal string will need to be enhanced.
//
// See file regexcmp.cpp, case URX_STRING_I in RegexCompile::maxMatchLength()
// for details on what to do in case of a failure of this test.
// Bug 13631. A find() of a pattern with a zero length look-behind assertions
// can cause a read past the end of the input text.
-// The failure is seen when running this test with Clang's Addresss Sanitizer.
+// The failure is seen when running this test with Clang's Address Sanitizer.
void RegexTest::TestBug13631() {
const UChar *pats[] = { u"(?<!^)",
public:
SimpleThread();
virtual ~SimpleThread();
- int32_t start(); // start the thread. Return 0 if successfull.
+ int32_t start(); // start the thread. Return 0 if successful.
void join(); // A thread must be joined before deleting its SimpleThread.
virtual void run() = 0; // Override this to provide the code to run
} \
break;
-// public contructors and destructors --------------------------------------
+// public constructors and destructors --------------------------------------
StringSearchTest::StringSearchTest()
#if !UCONFIG_NO_BREAK_ITERATION
search.size[index + 1] + 1,
status) != search.offset[index + 1] ||
U_FAILURE(status)) {
- errln("Error getting preceeding match at index %d",
+ errln("Error getting preceding match at index %d",
search.offset[index + 1] + 1);
}
}
if ((foundMatch && expectedMatchStart<0) ||
(foundStart != expectedMatchStart) ||
(foundLimit != expectedMatchLimit)) {
- TEST_ASSERT(FALSE); // ouput generic error position
+ TEST_ASSERT(FALSE); // output generic error position
infoln("Found, expected match start = %d, %d \n"
"Found, expected match limit = %d, %d",
foundStart, expectedMatchStart, foundLimit, expectedMatchLimit);
if ((foundMatch && expectedMatchStart<0) ||
(foundStart != expectedMatchStart) ||
(foundLimit != expectedMatchLimit)) {
- TEST_ASSERT(FALSE); // ouput generic error position
+ TEST_ASSERT(FALSE); // output generic error position
infoln("Found, expected backwards match start = %d, %d \n"
"Found, expected backwards match limit = %d, %d",
foundStart, expectedMatchStart, foundLimit, expectedMatchLimit);
StringSegment segment(sampleString, false);
assertEquals("Double-width code point", 0x1F4FB, segment.getCodePoint());
segment.setLength(1);
- assertEquals("Inalid A", -1, segment.getCodePoint());
+ assertEquals("Invalid A", -1, segment.getCodePoint());
segment.resetLength();
segment.adjustOffset(1);
assertEquals("Invalid B", -1, segment.getCodePoint());
const char* testPattern = "0#none|1#one|2#many";
ChoiceFormat form_pat( testPattern, status );
- if (!chkstatus( status, "*** ChoiceFormat contructor( newPattern, status)" )) {
+ if (!chkstatus( status, "*** ChoiceFormat constructor( newPattern, status)" )) {
delete fileform;
delete filenumform;
delete pattform;
form_pat.toPattern( res1 );
if (res1 == "0#none|1#one|2#many") {
- it_logln("ChoiceFormat contructor( newPattern, status) tested");
+ it_logln("ChoiceFormat constructor( newPattern, status) tested");
}else{
- it_errln("*** ChoiceFormat contructor( newPattern, status) or toPattern result!");
+ it_errln("*** ChoiceFormat constructor( newPattern, status) or toPattern result!");
}
double d_a2[] = { 3.0, 4.0 };
}
}
- test.logln("Number of Unassinged code points : %i \n",unassigned);
+ test.logln("Number of Unassigned code points : %i \n",unassigned);
test.logln("Number of Prohibited code points : %i \n",prohibited);
test.logln("Number of Mapped code points : %i \n",mapped);
test.logln("Number of Mapped with NFKC code points : %i \n",mappedWithNorm);
//"www.\\u0021.com",
//"www.\\u0024.com",
//"\\u003f",
- // These yeild U_IDNA_PROHIBITED_ERROR
+ // These yield U_IDNA_PROHIBITED_ERROR
//"\\u00CF\\u0082.com",
//"\\u00CE\\u00B2\\u00C3\\u009Fss.com",
//"\\u00E2\\u0098\\u00BA.com",
class TestFormatSmallClasses: public IntlTest {
/**
* runs tests in 4 local routines,
- * performs test for API and funtionalty of 3 smaller format classes:
+ * performs test for API and functionality of 3 smaller format classes:
* ParsePosition in test_ParsePosition(),
* FieldPosition in test_FieldPosition(),
* Formattable in test_Formattable().
"\\u0e01\\u0e32", "=", "\\u0e01\\u0e32-",
"\\u0e01\\u0e32-", "<", "\\u0e01\\u0e32\\u0e01\\u0e32",
- // Doubler follows an indentical word without the doubler
+ // Doubler follows an identical word without the doubler
"\\u0e01\\u0e32", "=", "\\u0e01\\u0e32\\u0e46",
"\\u0e01\\u0e32\\u0e46", "<", "\\u0e01\\u0e32\\u0e01\\u0e32",
/* Example: rules 1. ab>x|y
* 2. yc>z
*
- * []|eabcd start - no match, copy e to tranlated buffer
+ * []|eabcd start - no match, copy e to translated buffer
* [e]|abcd match rule 1 - copy output & adjust cursor
* [ex|y]cd match rule 2 - copy output & adjust cursor
* [exz]|d no match, copy d to transliterated buffer
}
/**
- * Compound filter semantics were orginially not implemented
+ * Compound filter semantics were originally not implemented
* correctly. Originally, each component filter f(i) is replaced by
* f'(i) = f(i) && g, where g is the filter for the compound
* transliterator.
symbols.setSymbol(key, UnicodeString(osmanyaDigitStrings[i]), FALSE);
}
// NOTE: in ICU4J, the calculation of codePointZero is smarter;
- // in ICU4C, it is more conservative and is only set if propogateDigits is true.
+ // in ICU4C, it is more conservative and is only set if propagateDigits is true.
if (-1 != symbols.getCodePointZero()) {
errln("ERROR: Code point zero be invalid");
}
// until other have completed. Verifies that cache doesn't
// deadlock when a creation is slow.
- // Note that gObjectsCreated needs to be incremeneted from 0 to 1
+ // Note that gObjectsCreated needs to be incremented from 0 to 1
// early, to keep subsequent threads from entering this path.
gObjectsCreated = 1;
while (gObjectsCreated < 3) {
* Performs tests for Greek
* This tests that if the plural count listed in time unit format does not
* match those in the plural rules for the locale, those plural count in
- * time unit format will be ingored and subsequently, fall back will kick in
+ * time unit format will be ignored and subsequently, fall back will kick in
* which is tested above.
* Without data sanitization, setNumberFormat() would crash.
- * As of CLDR shiped in ICU4.8, Greek is one such language.
+ * As of CLDR shipped in ICU4.8, Greek is one such language.
*/
void testGreekWithSanitization();
UnicodeString canonicalID;
TimeZone::getCanonicalID(*tzid, canonicalID, status);
if (U_FAILURE(status)) {
- // Uknown ID - we should not get here
+ // Unknown ID - we should not get here
errln((UnicodeString)"Unknown ID " + *tzid);
status = U_ZERO_ERROR;
} else if (outtzid != canonicalID) {
UnicodeString canonical;
TimeZone::getCanonicalID(*tzid, canonical, status);
if (U_FAILURE(status)) {
- // Uknown ID - we should not get here
+ // Unknown ID - we should not get here
errln((UnicodeString)"Unknown ID " + *tzid);
status = U_ZERO_ERROR;
} else if (outtzid != canonical) {
avail1 = stz1->getNextTransition(time1, FALSE, tzt1);
if (avail1) {
- errln("FAIL: No transition must be returned by getNextTranstion for SimpleTimeZone with no DST rule");
+ errln("FAIL: No transition must be returned by getNextTransition for SimpleTimeZone with no DST rule");
}
avail1 = stz1->getPreviousTransition(time1, FALSE, tzt1);
if (avail1) {
avail1 = stz1->getNextTransition(time1, FALSE, tzt1);
if (!avail1) {
- errln("FAIL: Non-null transition must be returned by getNextTranstion for SimpleTimeZone with a DST rule");
+ errln("FAIL: Non-null transition must be returned by getNextTransition for SimpleTimeZone with a DST rule");
}
avail1 = stz1->getPreviousTransition(time1, FALSE, tzt1);
if (!avail1) {
dataerrln("FAIL: hasEquivalentTransitions failed for vtz/otz: %s", u_errorName(status));
}
if (!equiv) {
- dataerrln("FAIL: hasEquivalentTransitons returned false for the same time zone");
+ dataerrln("FAIL: hasEquivalentTransitions returned false for the same time zone");
}
// operator=/operator==/operator!=
TimeZone *utc = TimeZone::createTimeZone("Etc/GMT");
GregorianCalendar cal(utc, status);
if (U_FAILURE(status)) {
- dataerrln("FAIL: Failed to creat a GregorianCalendar: %s", u_errorName(status));
+ dataerrln("FAIL: Failed to create a GregorianCalendar: %s", u_errorName(status));
return;
}
for (i = 0; TestDates[i][2] != 0; i++) {
UErrorCode status = U_ZERO_ERROR;
SimpleTimeZone stz(0, "CustomID", UCAL_JANUARY, 1, UCAL_SUNDAY, 0, UCAL_JULY, 1, UCAL_SUNDAY, 0, status);
if (U_FAILURE(status)) {
- errln("FAIL: Failed to creat a SimpleTimeZone");
+ errln("FAIL: Failed to create a SimpleTimeZone");
return;
}
if (!first &&
(tzt0.getTo()->getRawOffset() != tzt.getFrom()->getRawOffset()
|| tzt0.getTo()->getDSTSavings() != tzt.getFrom()->getDSTSavings())) {
- errln((UnicodeString)"FAIL: TO rule of the previous transition does not match FROM rule of this transtion at "
+ errln((UnicodeString)"FAIL: TO rule of the previous transition does not match FROM rule of this transition at "
+ dateToString(time) + " for " + icutz.getID(tzid));
}
tzt0 = tzt;
if (!first &&
(tzt0.getFrom()->getRawOffset() != tzt.getTo()->getRawOffset()
|| tzt0.getFrom()->getDSTSavings() != tzt.getTo()->getDSTSavings())) {
- errln((UnicodeString)"FAIL: TO rule of the next transition does not match FROM rule in this transtion at "
+ errln((UnicodeString)"FAIL: TO rule of the next transition does not match FROM rule in this transition at "
+ dateToString(time) + " for " + icutz.getID(tzid));
}
tzt0 = tzt;
UnifiedCache cache(status);
assertSuccess("", status);
- // Don't allow unused entries to exeed more than 100% of in use entries.
+ // Don't allow unused entries to exceed more than 100% of in use entries.
cache.setEvictionPolicy(0, 100, status);
static const char *locales[] = {
}
unusedReference->removeRef();
- // unused count not to exeed in use count
+ // unused count not to exceed in use count
assertEquals("T1", UPRV_LENGTHOF(usedReferences), cache.unusedCount());
assertEquals("T2", 2*UPRV_LENGTHOF(usedReferences), cache.keyCount());
test3.compare(0, 14, test2) != 0 ||
test4.compare(12, 14, test2) != 0 ||
test3.compare(0, 18, test1) <=0 )
- errln("compare(offset, length, UnicodeString) failes");
+ errln("compare(offset, length, UnicodeString) fails");
// test compare(UChar*)
if (test2.compare(uniChars) != 0 || test3.compare(uniChars) <= 0 || test4.compare(uniChars) >= 0)
* others. All Rights Reserved.
********************************************************************/
/************************************************************************
-* Tests for the UText and UTextIterator text abstraction classses
+* Tests for the UText and UTextIterator text abstraction classes
*
************************************************************************/
// TextTest()
//
// Top Level function for UText testing.
-// Specifies the strings to be tested, with the acutal testing itself
+// Specifies the strings to be tested, with the actual testing itself
// being carried out in another function, TestString().
//
void UTextTest::TextTest() {
// nativeMap Mapping from code points to native indexes for the UText.
// u16Map Mapping from code points to UTF-16 indexes, for use with the UnicodeString.
//
-// This function runs a whole series of opertions on each incoming UText.
+// This function runs a whole series of operations on each incoming UText.
// The UText is deep-cloned prior to each operation, so that the original UText remains unchanged.
//
void UTextTest::TestCMR(const UnicodeString &us, UText *ut, int cpCount, m *nativeMap, m *u16Map) {
TEST_ASSERT(utext_isWritable(ut) == TRUE);
- int srcLengthType; // Loop variables for selecting the postion and length
+ int srcLengthType; // Loop variables for selecting the position and length
int srcPosType; // of the block to operate on within the source text.
int destPosType;
TEST_SUCCESS(status);
// Compare the results of the two parallel tests
- int32_t usi = 0; // UnicodeString postion, utf-16 index.
+ int32_t usi = 0; // UnicodeString position, utf-16 index.
int64_t uti = 0; // UText position, native index.
int32_t cpi; // char32 position (code point index)
UChar32 usc; // code point from Unicode String
//
// Compare the results
//
- int32_t usi = 0; // UnicodeString postion, utf-16 index.
+ int32_t usi = 0; // UnicodeString position, utf-16 index.
int64_t uti = 0; // UText position, native index.
int32_t cpi; // char32 position (code point index)
UChar32 usc; // code point from Unicode String
}
//
- // next32From(), prevous32From(), Iterate in a somewhat random order.
+ // next32From(), previous32From(), Iterate in a somewhat random order.
//
int cpIndex = 0;
for (i=0; i<cpCount; i++) {
//
void UTextTest::ErrorTest()
{
- // Close of an unitialized UText. Shouldn't blow up.
+ // Close of an uninitialized UText. Shouldn't blow up.
{
UText ut;
memset(&ut, 0, sizeof(UText));
//
- // isLengthExpensive - does it make the exptected transitions after
+ // isLengthExpensive - does it make the expected transitions after
// getting the length of a nul terminated string?
//
{
* others. All Rights Reserved.
********************************************************************/
/************************************************************************
-* Tests for the UText and UTextIterator text abstraction classses
+* Tests for the UText and UTextIterator text abstraction classes
*
************************************************************************/
myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "absurd converter that can't be opened");
if (myFile) {
- log_err("Recieved a UFILE * with an invalid codepage parameter\n");
+ log_err("Received a UFILE * with an invalid codepage parameter\n");
u_fclose(myFile);
}
}
retVal = u_file_read(testBuf, u_strlen(strBadConversion), myFile);
if (u_strncmp(strBadConversion, testBuf, u_strlen(strBadConversion)) != 0) {
- log_err("The test data wasn't subsituted as expected\n");
+ log_err("The test data wasn't substituted as expected\n");
}
u_fclose(myFile);
U_CDECL_BEGIN
/*
* Note: this assumes that context is a pointer to STANDARD_TEST_FILE. It would be
- * cleaner to define an acutal context with a string pointer in it and set STANDARD_TEST_FILE
+ * cleaner to define an actual context with a string pointer in it and set STANDARD_TEST_FILE
* after the call to initArgs()...
*/
static int U_CALLCONV argHandler(int arg, int /*argc*/, const char * const argv[], void *context)
/* NOTE: we'll stop on the first failure 'cause once there's one error, it may cascade... */
if (actual->glyphCount != expected->glyphCount) {
- log_err("Test %s: incorrect glyph count: exptected %d, got %d\n",
+ log_err("Test %s: incorrect glyph count: expected %d, got %d\n",
testID, expected->glyphCount, actual->glyphCount);
return false;
}
{
/* NOTE: we'll stop on the first failure 'cause once there's one error, it may cascade... */
if (actual->glyphCount != expected->glyphCount) {
- log_err("Test %s: incorrect glyph count: exptected %d, got %d\n",
+ log_err("Test %s: incorrect glyph count: expected %d, got %d\n",
testID, expected->glyphCount, actual->glyphCount);
return false;
}
(e.g. convperf (Conversion tests)). Go to each directory and execute the perl script for each test
you want to run. (e.g. CharPerf_r.pl in CharPerf directory)
* You only need to run the perl script from the latest ICU version. The corresponding perl script
- in the previous versions of ICU do not need to be run seperately.
+ in the previous versions of ICU do not need to be run separately.
Note: When running on Windows, cygwin is preferred.
}
meanTime /= n;
- /* caculate standard deviation */
+ /* calculate standard deviation */
double sd = 0;
for(int i=0;i<n;i++) {
#if U_DEBUG
UPerfFunction* TestQC_FCD_NFC_Text();
UPerfFunction* TestQC_FCD_Orig_Text();
- /* IsNormalized performnace */
+ /* IsNormalized performance */
UPerfFunction* TestIsNormalized_NFC_NFD_Text();
UPerfFunction* TestIsNormalized_NFC_NFC_Text();
UPerfFunction* TestIsNormalized_NFC_Orig_Text();
}
# Return a 99% error based on the t distribution. The dataset
-# is desribed as getMean() +/- getError().
+# is described as getMean() +/- getError().
sub getError {
my $self = shift;
return $self->{_error} * $self->{_scale};
LV = [\p{Grapheme_Cluster_Break = LV}];
LVT = [\p{Grapheme_Cluster_Break = LVT}];
-# Emoji defintions
+# Emoji definitions
Extended_Pict = [:ExtPict:];
# The Output amount and Unit are repeated for mixed units. In such a case, only the smallest unit will have
# both a rational and decimal amount; the others will have a single integer value, such as:
# length; person-height; CA; 3429 / 12500; 0.27432; meter; 2; foot; 54 / 5; 10.8; inch
-# The input and output units are unit identifers; in particular, the output does not have further processing:
+# The input and output units are unit identifiers; in particular, the output does not have further processing:
# • no localization
# • no adjustment for pluralization
# • no formatted with the skeleton
type: toascii
=====
-desc: 5-1-2 Unassinged outside BMP; zone editors should reject
+desc: 5-1-2 Unassigned outside BMP; zone editors should reject
namebase: <10205><00ED>dn
nameutf8: í €í¸…Ãdn
namezone: xn--dn-mja7734x
# <char> any following data is for char break testing
# <title> any following data is for title break testing
# <rules> rules ... </rules> following data is tested against these rules.
-# Applies until a following occurence of <word>, <sent>, etc. or another <rules>
-# <locale locale_name> Switch to the named locale at the next occurence of <word>, <sent>, etc.
+# Applies until a following occurrence of <word>, <sent>, etc. or another <rules>
+# <locale locale_name> Switch to the named locale at the next occurrence of <word>, <sent>, etc.
# <data> ... </data> test data. May span multiple lines.
# <> Break position, status == 0
# • Break position, status == 0 (Bullet, \u2022)
<data>•Parlez-•vous •français ?•</data>
#
-# Old Line Break Test data. Orginally located in RBBITest::TestDefaultRuleBasedLineIteration()
+# Old Line Break Test data. Originally located in RBBITest::TestDefaultRuleBasedLineIteration()
#
<line>
# the end of the word and not treated as an independent punctuation mark.
#
# the one time where the paiyannoi occurs somewhere other than at the end
-# of a word is in the Thai abbrevation for "etc.", which both begins and
+# of a word is in the Thai abbreviation for "etc.", which both begins and
# ends with a paiyannoi
#
<line>
"(a?)*" "<0><1></1></0>xyz"
"(a?)+" "<0><1></1></0>xyz"
"^(?:a?b?)*$" "a--"
-"(x?)*xyz" "<0>xx<1></1>xyz</0>" # Sligthly wierd, but correct. The "last" time through (x?),
+"(x?)*xyz" "<0>xx<1></1>xyz</0>" # Sligthtly weird, but correct. The "last" time through (x?),
# it matches the empty string.
# Set expressions, basic operators and escapes work
"(abcd) \1" Z "<0><1>abcd</1> abcd</0>"
"(abcd) \1" Z "<0><1>abcd</1> abcd</0> "
-# Case Insensitve back references that hit/don't hit end.
+# Case Insensitive back references that hit/don't hit end.
"(abcd) \1" zi "abcd abc"
"(abcd) \1" Zi "<0><1>abcd</1> ABCD</0>"
"(abcd) \1" Zi "<0><1>abcd</1> ABCD</0> "
#
# These tests are only to verify that the names are recognized and the
# implementation isn't dead. They are not intended to verify that the
-# function defintions are 100% correct.
+# function definitions are 100% correct.
#
"[:InBasic Latin:]+" "ΓΔΕΖΗΘ<0>hello, world.</0>ニヌãƒãƒŽãƒãƒãƒ‘"
"[:^InBasic Latin:]+" "<0>ΓΔΕΖΗΘ</0>hello, world.ニヌãƒãƒŽãƒãƒãƒ‘"
"((a|b){2})|c" s "C"
#
-# bug 5617 ZWJ \u200d shoudn't cause word boundaries
+# bug 5617 ZWJ \u200d shouldn't cause word boundaries
#
".+?\b" "<0> </0>\u0935\u0915\u094D\u200D\u0924\u0947 "
".+?\b" 2 " <0>\u0935\u0915\u094D\u200D\u0924\u0947</0> "
"/\*[\d\D]*?\*/" G "<0>/* my multiline comment */</0>"
"/\*[\d\D]*?\*/" G "<0>/* my nested comment */</0>"
"/\*[\d\D]*?\*/" "*/ anything here /*"
-"/\*[\d\D]*?\*/" "anything between 2 seperate comments"
+"/\*[\d\D]*?\*/" "anything between 2 separate comments"
"/\*[\d\D]*?\*/" "\* *\"
"/\*[\p{N}\P{N}]*?\*/" G "<0>/* my comment */</0>"
"/\*[\p{N}\P{N}]*?\*/" G "<0>/* my multiline comment */</0>"
"/\*[\p{N}\P{N}]*?\*/" G "<0>/* my nested comment */</0>"
"/\*[\p{N}\P{N}]*?\*/" "*/ anything here /*"
-"/\*[\p{N}\P{N}]*?\*/" "anything between 2 seperate comments"
+"/\*[\p{N}\P{N}]*?\*/" "anything between 2 separate comments"
"/\*[\p{N}\P{N}]*?\*/" "\* *\"
"((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2})))" G "<0>1/31/2002</0>"
"((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2})))" G "<0>04-30-02</0>"
"^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\d|2[0-8])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$" "29/02/2003 20:15:15"
"^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\d|2[0-8])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$" "2/29/04 20:15:15"
"^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\d|2[0-8])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$" "31/3/4 9:20:17"
-"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" G "<0>somthing@someserver.com</0>"
+"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" G "<0>something@someserver.com</0>"
"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" G "<0>firstname.lastname@mailserver.domain.com</0>"
"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" G "<0>username-something@some-server.nl</0>"
"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" "username@someserver.domain.c"
#'<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>' G '<0><form></0>' #TODO: Debug
'<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>' "<input type = submit>" # TODO: \w in pattern
'<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>' '<font face = "arial">' # TODO: \w in pattern
-'<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>' "The drity brown fox stank like"
+'<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>' "The dirty brown fox stank like"
"^(1|01|2|02|3|03|4|04|5|05|6|06|7|07|8|08|9|09|10|11|12{1,2}):(([0-5]{1}[0-9]{1}\s{0,1})([AM|PM|am|pm]{2,2}))\W{0}$" G "<0>1:00 AM</0>"
"^(1|01|2|02|3|03|4|04|5|05|6|06|7|07|8|08|9|09|10|11|12{1,2}):(([0-5]{1}[0-9]{1}\s{0,1})([AM|PM|am|pm]{2,2}))\W{0}$" G "<0>12:00 PM</0>"
"^(1|01|2|02|3|03|4|04|5|05|6|06|7|07|8|08|9|09|10|11|12{1,2}):(([0-5]{1}[0-9]{1}\s{0,1})([AM|PM|am|pm]{2,2}))\W{0}$" G "<0>1:00am</0>"
-->
<test-case id="test24a" strength="IDENTICAL" locale="en">
<pattern>A\u0300</pattern>
- <pre>At IDENTICAL, shoud this match? </pre><m>\u00c0</m><post></post>
+ <pre>At IDENTICAL, should this match? </pre><m>\u00c0</m><post></post>
</test-case>
<test-case id="test24b" strength="IDENTICAL" alternate_handling="SHIFTED" locale="en">
<pattern>A\u0300</pattern>
- <pre>At IDENTICAL, shoud this match? </pre>
+ <pre>At IDENTICAL, should this match? </pre>
<m>\u00c0</m>
<post></post>
</test-case>
</test-case>
<!-- TODO: this gives an U_ILLEGAL_ARGUMENT error when opening
- the UStringSearch. How did the orignal test run? -->
+ the UStringSearch. How did the original test run? -->
<!--
<test-case id="test29" strength="PRIMARY" locale="en">
<pattern> </pattern>
<!-- COMPOSITEBOUNDARIES from usrchdat.c
- Boundaries are not identical to orignal test data because
+ Boundaries are not identical to original test data because
of matching only full combining sequences
-->
<test-case id="test40" strength="TERTIARY">
* breaks.
*
* NOTE: by it's very nature, Thai word breaking is not exact, so it is
- * exptected that this program will always report some differences.
+ * expected that this program will always report some differences.
*/
/*
}
/*
- * This method does the acutal break comparison and reports the results.
+ * This method does the actual break comparison and reports the results.
* It uses a SpaceBreakIterator to iterate over the text with spaces,
* and a word instance of a Thai BreakIterator to iterate over the text
* without spaces.
INDENT_LEVEL = depth-1; /* root */
- /* we want these messages to be at 0 indent. so just push the indent level breifly. */
+ /* we want these messages to be at 0 indent. so just push the indent level briefly. */
if(mode==SHOWTESTS) {
log_testinfo("---%s%c\n",pathToFunction, nodeList[i]->test?' ':TEST_SEPARATOR );
}
cleanUpTestTree(TestNode *tn);
/**
- * Retreive a specific subtest. (subtree).
+ * Retrieve a specific subtest. (subtree).
*
* @param root Pointer to the root.
* @param path Path relative to the root, Ex. '/a/b'
* each setting. Each call to nextSettings resets the cases iterator.
* Individual test cases have to have the same number of fields as the
* number of entries in headers. Default headers can be specified in
- * the TestDataModule info section. The default headers will be overriden
+ * the TestDataModule info section. The default headers will be overridden
* by per-test headers.
* Example:
* DataMap *settings = NULL;
class T_CTEST_EXPORT_API UPerfTest {
public:
UBool run();
- UBool runTest( char* name = NULL, char* par = NULL ); // not to be overidden
+ UBool runTest( char* name = NULL, char* par = NULL ); // not to be overridden
virtual void usage( void ) ;
void init(UOption addOptions[], int32_t addOptionsCount,
UErrorCode& status);
- virtual UPerfFunction* runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); // overide !
+ virtual UPerfFunction* runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); // override !
virtual UBool runTestLoop( char* testname, char* par );
* // Initialize cache and ensure the data is loaded.
* // This loop checks for errors in Normalization. Once we pass the initialization
* // without errors we can safelly assume that there are no errors while timing the
- * // funtion
+ * // function
* for (loops=0; loops<10; loops++) {
* for (line=0; line < gNumFileLines; line++) {
* if (opt_uselen) {
typedef struct UTimer UTimer;
-typedef void FuntionToBeTimed(void* param);
+typedef void FunctionToBeTimed(void* param);
#if U_PLATFORM_USES_ONLY_WIN32_API
#endif
/**
- * Intializes the timer with the current time
+ * Initializes the timer with the current time
*
- * @param timer A pointer to UTimer struct to recieve the current time
+ * @param timer A pointer to UTimer struct to receive the current time
*/
static inline void U_EXPORT2
utimer_getTime(UTimer* timer){
* Executes the function pointed to for a given time and returns exact time
* taken and number of iterations of the loop
* @param thresholTimeVal
- * @param loopCount output param to recieve the number of iterations
- * @param fn The funtion to be executed
+ * @param loopCount output param to receive the number of iterations
+ * @param fn The function to be executed
* @param param Parameters to be passed to the fn
* @return the time elapsed in seconds
*/
static inline double U_EXPORT2
utimer_loopUntilDone(double thresholdTimeVal,
int32_t* loopCount,
- FuntionToBeTimed fn,
+ FunctionToBeTimed fn,
void* param){
UTimer timer;
double currentVal=0;
if(inputDir[dirlen-1] != U_FILE_SEP_CHAR) {
/*
* append the input dir to openFileName if the first char in
- * filename is not file seperation char and the last char input directory is not '.'.
+ * filename is not file separation char and the last char input directory is not '.'.
* This is to support :
* genrb -s. /home/icu/data
* genrb -s. icu/data
trim(UChar *src, int32_t srcLen, UErrorCode *status){
srcLen = removeText(src, srcLen, UnicodeString("^[ \\r\\n]+ "), 0, UnicodeString(), status); // remove leading new lines
srcLen = removeText(src, srcLen, UnicodeString("^\\s+"), 0, UnicodeString(), status); // remove leading spaces
- srcLen = removeText(src, srcLen, UnicodeString("\\s+$"), 0, UnicodeString(), status); // remvoe trailing spcaes
+ srcLen = removeText(src, srcLen, UnicodeString("\\s+$"), 0, UnicodeString(), status); // remove trailing spcaes
return srcLen;
}
/*UBool j1 =FALSE;*/
/*outDir = outputDir;*/
- start = TRUE; /* Reset the start indictor*/
+ start = TRUE; /* Reset the start indicator*/
bName = (bundleName==NULL) ? "LocaleElements" : bundleName;
pName = (packageName==NULL)? "com.ibm.icu.impl.data" : packageName;
/* ICU is not endian portable, because ICU data generated on big endian machines can be
* ported to big endian machines but not to little endian machines and vice versa. The
- * conversion is not portable across platforms with different endianess.
+ * conversion is not portable across platforms with different endianness.
*/
uint32_t computeCRC(const char *ptr, uint32_t len, uint32_t lastcrc){
write_utf8_file(out,UnicodeString(">\n"));
}
}else if(getShowWarning()){
- fprintf(stderr, "Warning: Tranlate attribute for resource %s cannot be set. XLIFF prohibits it.\n", resName);
+ fprintf(stderr, "Warning: Translate attribute for resource %s cannot be set. XLIFF prohibits it.\n", resName);
/* no translate attribute .. just close the tag */
write_utf8_file(out,UnicodeString(">\n"));
}
*
* UTrie stringPrepTrie; -- size in bytes=indexes[_SPREP_INDEX_TRIE_SIZE]
*
- * uint16_t mappingTable[]; -- Contains the sequecence of code units that the code point maps to
+ * uint16_t mappingTable[]; -- Contains the sequence of code units that the code point maps to
* size in bytes = indexes[_SPREP_INDEX_MAPPING_DATA_SIZE]
*
* The indexes array contains the following values:
/* unescaping failed so we just return
* c1 and not consume the buffer
* this is useful for rules with escapes
- * in resouce bundles
+ * in resource bundles
* eg: \' \\ \"
*/
return c1;
target[0] = '\0';
/*
* append the input dir to openFileName if the first char in
- * filename is not file seperation char and the last char input directory is not '.'.
+ * filename is not file separation char and the last char input directory is not '.'.
* This is to support :
* genrb -s. /home/icu/data
* genrb -s. icu/data
* Unicode TR 13 says any of the below chars is
* a new line char in a readline function in addition
* to CR+LF combination which needs to be
- * handled seperately
+ * handled separately
*/
static UBool ucbuf_isCharNewLine(UChar c){
switch(c){
void *context; /* parameter for the function */
char shortName; /* 'f' for -f */
char hasArg; /* enum value: option takes no/requires/may have argument */
- char doesOccur; /* boolean for "this one occured" */
+ char doesOccur; /* boolean for "this one occurred" */
};
/* macro for an entry in a declaration of UOption[] */
// TODO: we don't actually parse the DOCTYPE or internal subsets.
// Some internal dtd subsets could confuse this simple-minded
// attempt at skipping over them, specifically, occurrences
- // of closeing square brackets. These could appear in comments,
+ // of closing square brackets. These could appear in comments,
// or in parameter entity declarations, for example.
mXMLDoctype(UnicodeString(
"(?s)<!DOCTYPE.*?(>|\\[.*?\\].*?>)", -1, US_INV
//
// Note that attributes are scanned twice. The first time is with
// the regex for an entire element start. There, the attributes
- // are checked syntactically, but not separted out one by one.
+ // are checked syntactically, but not separated out one by one.
// Here, we match a single attribute, and make its name and
// attribute value available to the parser code.
mAttrValue(UnicodeString(XML_SPACES "+(" XML_NAME ")" XML_SPACES "*=" XML_SPACES "*"
attValue.remove(0,1); // one char from the beginning
attValue.truncate(attValue.length()-1); // and one from the end.
- // XML Attribue value normalization.
+ // XML Attribute value normalization.
// This is one of the really screwy parts of the XML spec.
// See http://www.w3.org/TR/2004/REC-xml11-20040204/#AVNormalize
// Note that non-validating parsers must treat all entities as type CDATA
}
}
/*
- ** If type 0 is is unused in transitions,
+ ** If type 0 is unused in transitions,
** it's the type to use for early times.
*/
for (i = 0; i < sp->typecnt; ++i)
}
} else if (transitionTimes[i] > HIGHEST_TIME32) {
// Skipping the rest of the transition data. We cannot put such
- // transitions into zoneinfo.res, because data is limited to singed
+ // transitions into zoneinfo.res, because data is limited to signed
// 32bit int by the ICU resource bundle.
break;
} else {
os << " }" << endl;
}
- // 32bit transtions
+ // 32bit transitions
if (trn != transitions.end() && trn->time < HIGHEST_TIME32) {
os << " trans:intvector { ";
for (first = true; trn != transitions.end() && trn->time < HIGHEST_TIME32; ++trn) {
os << " }" << endl;
}
- // post 32bit transitons
+ // post 32bit transitions
if (trn != transitions.end()) {
os << " transPost32:intvector { ";
for (first = true; trn != transitions.end(); ++trn) {